diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/__init__.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/__init__.py index 5512ab09648e..97a96941bfdd 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/__init__.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .alerts_management_client import AlertsManagementClient -from .version import VERSION +from ._configuration import AlertsManagementClientConfiguration +from ._alerts_management_client import AlertsManagementClient +__all__ = ['AlertsManagementClient', 'AlertsManagementClientConfiguration'] -__all__ = ['AlertsManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_alerts_management_client.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_alerts_management_client.py new file mode 100644 index 000000000000..b1c6ae0ef04d --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_alerts_management_client.py @@ -0,0 +1,70 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import AlertsManagementClientConfiguration +from .operations import Operations +from .operations import AlertsOperations +from .operations import SmartGroupsOperations +from .operations import ActionRulesOperations +from .operations import SmartDetectorAlertRulesOperations +from . import models + + +class AlertsManagementClient(SDKClient): + """AlertsManagement Client + + :ivar config: Configuration for client. + :vartype config: AlertsManagementClientConfiguration + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.alertsmanagement.operations.Operations + :ivar alerts: Alerts operations + :vartype alerts: azure.mgmt.alertsmanagement.operations.AlertsOperations + :ivar smart_groups: SmartGroups operations + :vartype smart_groups: azure.mgmt.alertsmanagement.operations.SmartGroupsOperations + :ivar action_rules: ActionRules operations + :vartype action_rules: azure.mgmt.alertsmanagement.operations.ActionRulesOperations + :ivar smart_detector_alert_rules: SmartDetectorAlertRules operations + :vartype smart_detector_alert_rules: azure.mgmt.alertsmanagement.operations.SmartDetectorAlertRulesOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param subscription_id1: The ID of the target subscription. + :type subscription_id1: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, subscription_id1, base_url=None): + + self.config = AlertsManagementClientConfiguration(credentials, subscription_id, subscription_id1, base_url) + super(AlertsManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.alerts = AlertsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.smart_groups = SmartGroupsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.action_rules = ActionRulesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.smart_detector_alert_rules = SmartDetectorAlertRulesOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_configuration.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_configuration.py new file mode 100644 index 000000000000..8e987865b32e --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/_configuration.py @@ -0,0 +1,53 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class AlertsManagementClientConfiguration(AzureConfiguration): + """Configuration for AlertsManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param subscription_id1: The ID of the target subscription. + :type subscription_id1: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, subscription_id1, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if subscription_id1 is None: + raise ValueError("Parameter 'subscription_id1' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(AlertsManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-alertsmanagement/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + self.subscription_id1 = subscription_id1 diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/alerts_management_client.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/alerts_management_client.py deleted file mode 100644 index 735b0c12b85c..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/alerts_management_client.py +++ /dev/null @@ -1,95 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.operations import Operations -from .operations.alerts_operations import AlertsOperations -from .operations.smart_groups_operations import SmartGroupsOperations -from . import models - - -class AlertsManagementClientConfiguration(AzureConfiguration): - """Configuration for AlertsManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'http://localhost' - - super(AlertsManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-alertsmanagement/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class AlertsManagementClient(SDKClient): - """AlertsManagement Client - - :ivar config: Configuration for client. - :vartype config: AlertsManagementClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.alertsmanagement.operations.Operations - :ivar alerts: Alerts operations - :vartype alerts: azure.mgmt.alertsmanagement.operations.AlertsOperations - :ivar smart_groups: SmartGroups operations - :vartype smart_groups: azure.mgmt.alertsmanagement.operations.SmartGroupsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = AlertsManagementClientConfiguration(credentials, subscription_id, base_url) - super(AlertsManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2018-05-05' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.alerts = AlertsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.smart_groups = SmartGroupsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/__init__.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/__init__.py index b5d44aef16b9..84870cf01aa0 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/__init__.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/__init__.py @@ -10,46 +10,97 @@ # -------------------------------------------------------------------------- try: - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .resource_py3 import Resource - from .essentials_py3 import Essentials - from .alert_properties_py3 import AlertProperties - from .alert_py3 import Alert - from .alert_modification_item_py3 import AlertModificationItem - from .alert_modification_properties_py3 import AlertModificationProperties - from .alert_modification_py3 import AlertModification - from .smart_group_modification_item_py3 import SmartGroupModificationItem - from .smart_group_modification_properties_py3 import SmartGroupModificationProperties - from .smart_group_modification_py3 import SmartGroupModification - from .alerts_summary_group_item_py3 import AlertsSummaryGroupItem - from .alerts_summary_group_py3 import AlertsSummaryGroup - from .alerts_summary_py3 import AlertsSummary - from .smart_group_aggregated_property_py3 import SmartGroupAggregatedProperty - from .smart_group_py3 import SmartGroup - from .smart_groups_list_py3 import SmartGroupsList + from ._models_py3 import ActionGroup + from ._models_py3 import ActionGroupsInformation + from ._models_py3 import ActionRule + from ._models_py3 import ActionRuleProperties + from ._models_py3 import Alert + from ._models_py3 import AlertModification + from ._models_py3 import AlertModificationItem + from ._models_py3 import AlertModificationProperties + from ._models_py3 import AlertProperties + from ._models_py3 import AlertRule + from ._models_py3 import AlertRulePatchObject + from ._models_py3 import AlertsMetaData + from ._models_py3 import AlertsMetaDataProperties + from ._models_py3 import AlertsSummary + from ._models_py3 import AlertsSummaryGroup + from ._models_py3 import AlertsSummaryGroupItem + from ._models_py3 import AzureResource + from ._models_py3 import Condition + from ._models_py3 import Conditions + from ._models_py3 import Detector + from ._models_py3 import Diagnostics + from ._models_py3 import ErrorResponse, ErrorResponseException + from ._models_py3 import ErrorResponse1, ErrorResponse1Exception + from ._models_py3 import ErrorResponseBody + from ._models_py3 import Essentials + from ._models_py3 import ManagedResource + from ._models_py3 import MonitorServiceDetails + from ._models_py3 import MonitorServiceList + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import PatchObject + from ._models_py3 import Resource + from ._models_py3 import Scope + from ._models_py3 import SmartGroup + from ._models_py3 import SmartGroupAggregatedProperty + from ._models_py3 import SmartGroupModification + from ._models_py3 import SmartGroupModificationItem + from ._models_py3 import SmartGroupModificationProperties + from ._models_py3 import Suppression + from ._models_py3 import SuppressionConfig + from ._models_py3 import SuppressionSchedule + from ._models_py3 import ThrottlingInformation except (SyntaxError, ImportError): - from .operation_display import OperationDisplay - from .operation import Operation - from .resource import Resource - from .essentials import Essentials - from .alert_properties import AlertProperties - from .alert import Alert - from .alert_modification_item import AlertModificationItem - from .alert_modification_properties import AlertModificationProperties - from .alert_modification import AlertModification - from .smart_group_modification_item import SmartGroupModificationItem - from .smart_group_modification_properties import SmartGroupModificationProperties - from .smart_group_modification import SmartGroupModification - from .alerts_summary_group_item import AlertsSummaryGroupItem - from .alerts_summary_group import AlertsSummaryGroup - from .alerts_summary import AlertsSummary - from .smart_group_aggregated_property import SmartGroupAggregatedProperty - from .smart_group import SmartGroup - from .smart_groups_list import SmartGroupsList -from .operation_paged import OperationPaged -from .alert_paged import AlertPaged -from .alerts_management_client_enums import ( + from ._models import ActionGroup + from ._models import ActionGroupsInformation + from ._models import ActionRule + from ._models import ActionRuleProperties + from ._models import Alert + from ._models import AlertModification + from ._models import AlertModificationItem + from ._models import AlertModificationProperties + from ._models import AlertProperties + from ._models import AlertRule + from ._models import AlertRulePatchObject + from ._models import AlertsMetaData + from ._models import AlertsMetaDataProperties + from ._models import AlertsSummary + from ._models import AlertsSummaryGroup + from ._models import AlertsSummaryGroupItem + from ._models import AzureResource + from ._models import Condition + from ._models import Conditions + from ._models import Detector + from ._models import Diagnostics + from ._models import ErrorResponse, ErrorResponseException + from ._models import ErrorResponse1, ErrorResponse1Exception + from ._models import ErrorResponseBody + from ._models import Essentials + from ._models import ManagedResource + from ._models import MonitorServiceDetails + from ._models import MonitorServiceList + from ._models import Operation + from ._models import OperationDisplay + from ._models import PatchObject + from ._models import Resource + from ._models import Scope + from ._models import SmartGroup + from ._models import SmartGroupAggregatedProperty + from ._models import SmartGroupModification + from ._models import SmartGroupModificationItem + from ._models import SmartGroupModificationProperties + from ._models import Suppression + from ._models import SuppressionConfig + from ._models import SuppressionSchedule + from ._models import ThrottlingInformation +from ._paged_models import ActionRulePaged +from ._paged_models import AlertPaged +from ._paged_models import AlertRulePaged +from ._paged_models import OperationPaged +from ._paged_models import SmartGroupPaged +from ._alerts_management_client_enums import ( Severity, SignalType, AlertState, @@ -58,6 +109,11 @@ AlertModificationEvent, SmartGroupModificationEvent, State, + ScopeType, + Operator, + SuppressionType, + ActionRuleStatus, + AlertRuleState, TimeRange, AlertsSortByFields, AlertsSummaryGroupByFields, @@ -65,26 +121,53 @@ ) __all__ = [ - 'OperationDisplay', - 'Operation', - 'Resource', - 'Essentials', - 'AlertProperties', + 'ActionGroup', + 'ActionGroupsInformation', + 'ActionRule', + 'ActionRuleProperties', 'Alert', + 'AlertModification', 'AlertModificationItem', 'AlertModificationProperties', - 'AlertModification', - 'SmartGroupModificationItem', - 'SmartGroupModificationProperties', - 'SmartGroupModification', - 'AlertsSummaryGroupItem', - 'AlertsSummaryGroup', + 'AlertProperties', + 'AlertRule', + 'AlertRulePatchObject', + 'AlertsMetaData', + 'AlertsMetaDataProperties', 'AlertsSummary', - 'SmartGroupAggregatedProperty', + 'AlertsSummaryGroup', + 'AlertsSummaryGroupItem', + 'AzureResource', + 'Condition', + 'Conditions', + 'Detector', + 'Diagnostics', + 'ErrorResponse', 'ErrorResponseException', + 'ErrorResponse1', 'ErrorResponse1Exception', + 'ErrorResponseBody', + 'Essentials', + 'ManagedResource', + 'MonitorServiceDetails', + 'MonitorServiceList', + 'Operation', + 'OperationDisplay', + 'PatchObject', + 'Resource', + 'Scope', 'SmartGroup', - 'SmartGroupsList', + 'SmartGroupAggregatedProperty', + 'SmartGroupModification', + 'SmartGroupModificationItem', + 'SmartGroupModificationProperties', + 'Suppression', + 'SuppressionConfig', + 'SuppressionSchedule', + 'ThrottlingInformation', 'OperationPaged', 'AlertPaged', + 'SmartGroupPaged', + 'ActionRulePaged', + 'AlertRulePaged', 'Severity', 'SignalType', 'AlertState', @@ -93,6 +176,11 @@ 'AlertModificationEvent', 'SmartGroupModificationEvent', 'State', + 'ScopeType', + 'Operator', + 'SuppressionType', + 'ActionRuleStatus', + 'AlertRuleState', 'TimeRange', 'AlertsSortByFields', 'AlertsSummaryGroupByFields', diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_alerts_management_client_enums.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_alerts_management_client_enums.py new file mode 100644 index 000000000000..2d9334e583c7 --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_alerts_management_client_enums.py @@ -0,0 +1,157 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class Severity(str, Enum): + + sev0 = "Sev0" + sev1 = "Sev1" + sev2 = "Sev2" + sev3 = "Sev3" + sev4 = "Sev4" + + +class SignalType(str, Enum): + + metric = "Metric" + log = "Log" + unknown = "Unknown" + + +class AlertState(str, Enum): + + new = "New" + acknowledged = "Acknowledged" + closed = "Closed" + + +class MonitorCondition(str, Enum): + + fired = "Fired" + resolved = "Resolved" + + +class MonitorService(str, Enum): + + application_insights = "Application Insights" + activity_log_administrative = "ActivityLog Administrative" + activity_log_security = "ActivityLog Security" + activity_log_recommendation = "ActivityLog Recommendation" + activity_log_policy = "ActivityLog Policy" + activity_log_autoscale = "ActivityLog Autoscale" + log_analytics = "Log Analytics" + nagios = "Nagios" + platform = "Platform" + scom = "SCOM" + service_health = "ServiceHealth" + smart_detector = "SmartDetector" + vm_insights = "VM Insights" + zabbix = "Zabbix" + + +class AlertModificationEvent(str, Enum): + + alert_created = "AlertCreated" + state_change = "StateChange" + monitor_condition_change = "MonitorConditionChange" + + +class SmartGroupModificationEvent(str, Enum): + + smart_group_created = "SmartGroupCreated" + state_change = "StateChange" + alert_added = "AlertAdded" + alert_removed = "AlertRemoved" + + +class State(str, Enum): + + new = "New" + acknowledged = "Acknowledged" + closed = "Closed" + + +class ScopeType(str, Enum): + + resource_group = "ResourceGroup" + resource = "Resource" + + +class Operator(str, Enum): + + equals = "Equals" + not_equals = "NotEquals" + contains = "Contains" + does_not_contain = "DoesNotContain" + + +class SuppressionType(str, Enum): + + always = "Always" + once = "Once" + daily = "Daily" + weekly = "Weekly" + monthly = "Monthly" + + +class ActionRuleStatus(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + +class AlertRuleState(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + +class TimeRange(str, Enum): + + oneh = "1h" + oned = "1d" + sevend = "7d" + three_zerod = "30d" + + +class AlertsSortByFields(str, Enum): + + name = "name" + severity = "severity" + alert_state = "alertState" + monitor_condition = "monitorCondition" + target_resource = "targetResource" + target_resource_name = "targetResourceName" + target_resource_group = "targetResourceGroup" + target_resource_type = "targetResourceType" + start_date_time = "startDateTime" + last_modified_date_time = "lastModifiedDateTime" + + +class AlertsSummaryGroupByFields(str, Enum): + + severity = "severity" + alert_state = "alertState" + monitor_condition = "monitorCondition" + monitor_service = "monitorService" + signal_type = "signalType" + alert_rule = "alertRule" + + +class SmartGroupsSortByFields(str, Enum): + + alerts_count = "alertsCount" + state = "state" + severity = "severity" + start_date_time = "startDateTime" + last_modified_date_time = "lastModifiedDateTime" diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models.py new file mode 100644 index 000000000000..a602fe2c9347 --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models.py @@ -0,0 +1,1704 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ActionRuleProperties(Model): + """Action rule properties defining scope, conditions, suppression logic for + action rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: Suppression, ActionGroup, Diagnostics + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'Suppression': 'Suppression', 'ActionGroup': 'ActionGroup', 'Diagnostics': 'Diagnostics'} + } + + def __init__(self, **kwargs): + super(ActionRuleProperties, self).__init__(**kwargs) + self.scope = kwargs.get('scope', None) + self.conditions = kwargs.get('conditions', None) + self.description = kwargs.get('description', None) + self.created_at = None + self.last_modified_at = None + self.created_by = None + self.last_modified_by = None + self.status = kwargs.get('status', None) + self.type = None + + +class ActionGroup(ActionRuleProperties): + """Action Group based Action Rule. + + Action rule with action group configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + :param action_group_id: Required. Action group to trigger if action rule + matches + :type action_group_id: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + 'action_group_id': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'action_group_id': {'key': 'actionGroupId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ActionGroup, self).__init__(**kwargs) + self.action_group_id = kwargs.get('action_group_id', None) + self.type = 'ActionGroup' + + +class ActionGroupsInformation(Model): + """The Action Groups information, used by the alert rule. + + All required parameters must be populated in order to send to Azure. + + :param custom_email_subject: An optional custom email subject to use in + email notifications. + :type custom_email_subject: str + :param custom_webhook_payload: An optional custom web-hook payload to use + in web-hook notifications. + :type custom_webhook_payload: str + :param group_ids: Required. The Action Group resource IDs. + :type group_ids: list[str] + """ + + _validation = { + 'group_ids': {'required': True}, + } + + _attribute_map = { + 'custom_email_subject': {'key': 'customEmailSubject', 'type': 'str'}, + 'custom_webhook_payload': {'key': 'customWebhookPayload', 'type': 'str'}, + 'group_ids': {'key': 'groupIds', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ActionGroupsInformation, self).__init__(**kwargs) + self.custom_email_subject = kwargs.get('custom_email_subject', None) + self.custom_webhook_payload = kwargs.get('custom_webhook_payload', None) + self.group_ids = kwargs.get('group_ids', None) + + +class Resource(Model): + """An azure resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + + +class ManagedResource(Resource): + """An azure managed resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ManagedResource, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class ActionRule(ManagedResource): + """Action rule object containing target scope, conditions and suppression + logic. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param properties: action rule properties + :type properties: ~azure.mgmt.alertsmanagement.models.ActionRuleProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'ActionRuleProperties'}, + } + + def __init__(self, **kwargs): + super(ActionRule, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class Alert(Resource): + """An alert created in alert management service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: ~azure.mgmt.alertsmanagement.models.AlertProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AlertProperties'}, + } + + def __init__(self, **kwargs): + super(Alert, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class AlertModification(Resource): + """Alert Modification details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: + ~azure.mgmt.alertsmanagement.models.AlertModificationProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AlertModificationProperties'}, + } + + def __init__(self, **kwargs): + super(AlertModification, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class AlertModificationItem(Model): + """Alert modification item. + + :param modification_event: Reason for the modification. Possible values + include: 'AlertCreated', 'StateChange', 'MonitorConditionChange' + :type modification_event: str or + ~azure.mgmt.alertsmanagement.models.AlertModificationEvent + :param old_value: Old value + :type old_value: str + :param new_value: New value + :type new_value: str + :param modified_at: Modified date and time + :type modified_at: str + :param modified_by: Modified user details (Principal client name) + :type modified_by: str + :param comments: Modification comments + :type comments: str + :param description: Description of the modification + :type description: str + """ + + _attribute_map = { + 'modification_event': {'key': 'modificationEvent', 'type': 'AlertModificationEvent'}, + 'old_value': {'key': 'oldValue', 'type': 'str'}, + 'new_value': {'key': 'newValue', 'type': 'str'}, + 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AlertModificationItem, self).__init__(**kwargs) + self.modification_event = kwargs.get('modification_event', None) + self.old_value = kwargs.get('old_value', None) + self.new_value = kwargs.get('new_value', None) + self.modified_at = kwargs.get('modified_at', None) + self.modified_by = kwargs.get('modified_by', None) + self.comments = kwargs.get('comments', None) + self.description = kwargs.get('description', None) + + +class AlertModificationProperties(Model): + """Properties of the alert modification item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar alert_id: Unique Id of the alert for which the history is being + retrieved + :vartype alert_id: str + :param modifications: Modification details + :type modifications: + list[~azure.mgmt.alertsmanagement.models.AlertModificationItem] + """ + + _validation = { + 'alert_id': {'readonly': True}, + } + + _attribute_map = { + 'alert_id': {'key': 'alertId', 'type': 'str'}, + 'modifications': {'key': 'modifications', 'type': '[AlertModificationItem]'}, + } + + def __init__(self, **kwargs): + super(AlertModificationProperties, self).__init__(**kwargs) + self.alert_id = None + self.modifications = kwargs.get('modifications', None) + + +class AlertProperties(Model): + """Alert property bag. + + :param essentials: + :type essentials: ~azure.mgmt.alertsmanagement.models.Essentials + :param context: + :type context: object + :param egress_config: + :type egress_config: object + """ + + _attribute_map = { + 'essentials': {'key': 'essentials', 'type': 'Essentials'}, + 'context': {'key': 'context', 'type': 'object'}, + 'egress_config': {'key': 'egressConfig', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AlertProperties, self).__init__(**kwargs) + self.essentials = kwargs.get('essentials', None) + self.context = kwargs.get('context', None) + self.egress_config = kwargs.get('egress_config', None) + + +class AzureResource(Model): + """An Azure resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar type: The resource type. + :vartype type: str + :ivar name: The resource name. + :vartype name: str + :param location: The resource location. Default value: "global" . + :type location: str + :param tags: The resource tags. + :type tags: object + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureResource, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.location = kwargs.get('location', "global") + self.tags = kwargs.get('tags', None) + + +class AlertRule(AzureResource): + """The alert rule information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource ID. + :vartype id: str + :ivar type: The resource type. + :vartype type: str + :ivar name: The resource name. + :vartype name: str + :param location: The resource location. Default value: "global" . + :type location: str + :param tags: The resource tags. + :type tags: object + :param description: The alert rule description. + :type description: str + :param state: Required. The alert rule state. Possible values include: + 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.alertsmanagement.models.AlertRuleState + :param severity: Required. The alert rule severity. Possible values + include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param frequency: Required. The alert rule frequency in ISO8601 format. + The time granularity must be in minutes and minimum value is 5 minutes. + :type frequency: timedelta + :param detector: Required. The alert rule's detector. + :type detector: ~azure.mgmt.alertsmanagement.models.Detector + :param scope: Required. The alert rule resources scope. + :type scope: list[str] + :param action_groups: Required. The alert rule actions. + :type action_groups: + ~azure.mgmt.alertsmanagement.models.ActionGroupsInformation + :param throttling: The alert rule throttling information. + :type throttling: + ~azure.mgmt.alertsmanagement.models.ThrottlingInformation + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'state': {'required': True}, + 'severity': {'required': True}, + 'frequency': {'required': True}, + 'detector': {'required': True}, + 'scope': {'required': True}, + 'action_groups': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'frequency': {'key': 'properties.frequency', 'type': 'duration'}, + 'detector': {'key': 'properties.detector', 'type': 'Detector'}, + 'scope': {'key': 'properties.scope', 'type': '[str]'}, + 'action_groups': {'key': 'properties.actionGroups', 'type': 'ActionGroupsInformation'}, + 'throttling': {'key': 'properties.throttling', 'type': 'ThrottlingInformation'}, + } + + def __init__(self, **kwargs): + super(AlertRule, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.state = kwargs.get('state', None) + self.severity = kwargs.get('severity', None) + self.frequency = kwargs.get('frequency', None) + self.detector = kwargs.get('detector', None) + self.scope = kwargs.get('scope', None) + self.action_groups = kwargs.get('action_groups', None) + self.throttling = kwargs.get('throttling', None) + + +class AlertRulePatchObject(Model): + """The alert rule patch information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar type: The resource type. + :vartype type: str + :ivar name: The resource name. + :vartype name: str + :param tags: The resource tags. + :type tags: object + :param description: The alert rule description. + :type description: str + :param state: The alert rule state. Possible values include: 'Enabled', + 'Disabled' + :type state: str or ~azure.mgmt.alertsmanagement.models.AlertRuleState + :param severity: The alert rule severity. Possible values include: 'Sev0', + 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param frequency: The alert rule frequency in ISO8601 format. The time + granularity must be in minutes and minimum value is 5 minutes. + :type frequency: timedelta + :param action_groups: The alert rule actions. + :type action_groups: + ~azure.mgmt.alertsmanagement.models.ActionGroupsInformation + :param throttling: The alert rule throttling information. + :type throttling: + ~azure.mgmt.alertsmanagement.models.ThrottlingInformation + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'frequency': {'key': 'properties.frequency', 'type': 'duration'}, + 'action_groups': {'key': 'properties.actionGroups', 'type': 'ActionGroupsInformation'}, + 'throttling': {'key': 'properties.throttling', 'type': 'ThrottlingInformation'}, + } + + def __init__(self, **kwargs): + super(AlertRulePatchObject, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.tags = kwargs.get('tags', None) + self.description = kwargs.get('description', None) + self.state = kwargs.get('state', None) + self.severity = kwargs.get('severity', None) + self.frequency = kwargs.get('frequency', None) + self.action_groups = kwargs.get('action_groups', None) + self.throttling = kwargs.get('throttling', None) + + +class AlertsMetaData(Model): + """alert meta data information. + + :param properties: + :type properties: + ~azure.mgmt.alertsmanagement.models.AlertsMetaDataProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'AlertsMetaDataProperties'}, + } + + def __init__(self, **kwargs): + super(AlertsMetaData, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class AlertsMetaDataProperties(Model): + """alert meta data property bag. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MonitorServiceList + + All required parameters must be populated in order to send to Azure. + + :param metadata_identifier: Required. Constant filled by server. + :type metadata_identifier: str + """ + + _validation = { + 'metadata_identifier': {'required': True}, + } + + _attribute_map = { + 'metadata_identifier': {'key': 'metadataIdentifier', 'type': 'str'}, + } + + _subtype_map = { + 'metadata_identifier': {'MonitorServiceList': 'MonitorServiceList'} + } + + def __init__(self, **kwargs): + super(AlertsMetaDataProperties, self).__init__(**kwargs) + self.metadata_identifier = None + + +class AlertsSummary(Resource): + """Summary of alerts based on the input filters and 'groupby' parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: ~azure.mgmt.alertsmanagement.models.AlertsSummaryGroup + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AlertsSummaryGroup'}, + } + + def __init__(self, **kwargs): + super(AlertsSummary, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class AlertsSummaryGroup(Model): + """Group the result set. + + :param total: Total count of the result set. + :type total: int + :param smart_groups_count: Total count of the smart groups. + :type smart_groups_count: int + :param groupedby: Name of the field aggregated + :type groupedby: str + :param values: List of the items + :type values: + list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] + """ + + _attribute_map = { + 'total': {'key': 'total', 'type': 'int'}, + 'smart_groups_count': {'key': 'smartGroupsCount', 'type': 'int'}, + 'groupedby': {'key': 'groupedby', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, + } + + def __init__(self, **kwargs): + super(AlertsSummaryGroup, self).__init__(**kwargs) + self.total = kwargs.get('total', None) + self.smart_groups_count = kwargs.get('smart_groups_count', None) + self.groupedby = kwargs.get('groupedby', None) + self.values = kwargs.get('values', None) + + +class AlertsSummaryGroupItem(Model): + """Alerts summary group item. + + :param name: Value of the aggregated field + :type name: str + :param count: Count of the aggregated field + :type count: int + :param groupedby: Name of the field aggregated + :type groupedby: str + :param values: List of the items + :type values: + list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'groupedby': {'key': 'groupedby', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, + } + + def __init__(self, **kwargs): + super(AlertsSummaryGroupItem, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.count = kwargs.get('count', None) + self.groupedby = kwargs.get('groupedby', None) + self.values = kwargs.get('values', None) + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class Condition(Model): + """condition to trigger an action rule. + + :param operator: operator for a given condition. Possible values include: + 'Equals', 'NotEquals', 'Contains', 'DoesNotContain' + :type operator: str or ~azure.mgmt.alertsmanagement.models.Operator + :param values: list of values to match for a given condition. + :type values: list[str] + """ + + _attribute_map = { + 'operator': {'key': 'operator', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(Condition, self).__init__(**kwargs) + self.operator = kwargs.get('operator', None) + self.values = kwargs.get('values', None) + + +class Conditions(Model): + """Conditions in alert instance to be matched for a given action rule. Default + value is all. Multiple values could be provided with comma separation. + + :param severity: filter alerts by severity + :type severity: ~azure.mgmt.alertsmanagement.models.Condition + :param monitor_service: filter alerts by monitor service + :type monitor_service: ~azure.mgmt.alertsmanagement.models.Condition + :param monitor_condition: filter alerts by monitor condition + :type monitor_condition: ~azure.mgmt.alertsmanagement.models.Condition + :param target_resource_type: filter alerts by target resource type + :type target_resource_type: ~azure.mgmt.alertsmanagement.models.Condition + :param alert_rule_id: filter alerts by alert rule id + :type alert_rule_id: ~azure.mgmt.alertsmanagement.models.Condition + :param description: filter alerts by alert rule description + :type description: ~azure.mgmt.alertsmanagement.models.Condition + :param alert_context: filter alerts by alert context (payload) + :type alert_context: ~azure.mgmt.alertsmanagement.models.Condition + """ + + _attribute_map = { + 'severity': {'key': 'severity', 'type': 'Condition'}, + 'monitor_service': {'key': 'monitorService', 'type': 'Condition'}, + 'monitor_condition': {'key': 'monitorCondition', 'type': 'Condition'}, + 'target_resource_type': {'key': 'targetResourceType', 'type': 'Condition'}, + 'alert_rule_id': {'key': 'alertRuleId', 'type': 'Condition'}, + 'description': {'key': 'description', 'type': 'Condition'}, + 'alert_context': {'key': 'alertContext', 'type': 'Condition'}, + } + + def __init__(self, **kwargs): + super(Conditions, self).__init__(**kwargs) + self.severity = kwargs.get('severity', None) + self.monitor_service = kwargs.get('monitor_service', None) + self.monitor_condition = kwargs.get('monitor_condition', None) + self.target_resource_type = kwargs.get('target_resource_type', None) + self.alert_rule_id = kwargs.get('alert_rule_id', None) + self.description = kwargs.get('description', None) + self.alert_context = kwargs.get('alert_context', None) + + +class Detector(Model): + """The detector information. By default this is not populated, unless it's + specified in expandDetector. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The detector id. + :type id: str + :param parameters: The detector's parameters.' + :type parameters: dict[str, object] + :param name: The Smart Detector name. By default this is not populated, + unless it's specified in expandDetector + :type name: str + :param description: The Smart Detector description. By default this is not + populated, unless it's specified in expandDetector + :type description: str + :param supported_resource_types: The Smart Detector supported resource + types. By default this is not populated, unless it's specified in + expandDetector + :type supported_resource_types: list[str] + :param image_paths: The Smart Detector image path. By default this is not + populated, unless it's specified in expandDetector + :type image_paths: list[str] + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'supported_resource_types': {'key': 'supportedResourceTypes', 'type': '[str]'}, + 'image_paths': {'key': 'imagePaths', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(Detector, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.parameters = kwargs.get('parameters', None) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.supported_resource_types = kwargs.get('supported_resource_types', None) + self.image_paths = kwargs.get('image_paths', None) + + +class Diagnostics(ActionRuleProperties): + """Diagnostics based Action Rule. + + Action rule with diagnostics configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Diagnostics, self).__init__(**kwargs) + self.type = 'Diagnostics' + + +class ErrorResponse(Model): + """An error response from the service. + + :param error: + :type error: ~azure.mgmt.alertsmanagement.models.ErrorResponseBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponseBody'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class ErrorResponse1(Model): + """Describe the format of an Error response. + + :param code: Error code + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse1, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class ErrorResponse1Exception(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse1'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponse1Exception, self).__init__(deserialize, response, 'ErrorResponse1', *args) + + +class ErrorResponseBody(Model): + """Details of error response. + + :param code: Error code, intended to be consumed programmatically. + :type code: str + :param message: Description of the error, intended for display in user + interface. + :type message: str + :param target: Target of the particular error, for example name of the + property. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.alertsmanagement.models.ErrorResponseBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorResponseBody]'}, + } + + def __init__(self, **kwargs): + super(ErrorResponseBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + + +class Essentials(Model): + """This object contains consistent fields across different monitor services. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar severity: Severity of alert Sev0 being highest and Sev4 being + lowest. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :ivar signal_type: The type of signal the alert is based on, which could + be metrics, logs or activity logs. Possible values include: 'Metric', + 'Log', 'Unknown' + :vartype signal_type: str or + ~azure.mgmt.alertsmanagement.models.SignalType + :ivar alert_state: Alert object state, which can be modified by the user. + Possible values include: 'New', 'Acknowledged', 'Closed' + :vartype alert_state: str or + ~azure.mgmt.alertsmanagement.models.AlertState + :ivar monitor_condition: Condition of the rule at the monitor service. It + represents whether the underlying conditions have crossed the defined + alert rule thresholds. Possible values include: 'Fired', 'Resolved' + :vartype monitor_condition: str or + ~azure.mgmt.alertsmanagement.models.MonitorCondition + :param target_resource: Target ARM resource, on which alert got created. + :type target_resource: str + :param target_resource_name: Name of the target ARM resource name, on + which alert got created. + :type target_resource_name: str + :param target_resource_group: Resource group of target ARM resource, on + which alert got created. + :type target_resource_group: str + :param target_resource_type: Resource type of target ARM resource, on + which alert got created. + :type target_resource_type: str + :ivar monitor_service: Monitor service on which the rule(monitor) is set. + Possible values include: 'Application Insights', 'ActivityLog + Administrative', 'ActivityLog Security', 'ActivityLog Recommendation', + 'ActivityLog Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', + 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', + 'Zabbix' + :vartype monitor_service: str or + ~azure.mgmt.alertsmanagement.models.MonitorService + :ivar alert_rule: Rule(monitor) which fired alert instance. Depending on + the monitor service, this would be ARM id or name of the rule. + :vartype alert_rule: str + :ivar source_created_id: Unique Id created by monitor service for each + alert instance. This could be used to track the issue at the monitor + service, in case of Nagios, Zabbix, SCOM etc. + :vartype source_created_id: str + :ivar smart_group_id: Unique Id of the smart group + :vartype smart_group_id: str + :ivar smart_grouping_reason: Verbose reason describing the reason why this + alert instance is added to a smart group + :vartype smart_grouping_reason: str + :ivar start_date_time: Creation time(ISO-8601 format) of alert instance. + :vartype start_date_time: datetime + :ivar last_modified_date_time: Last modification time(ISO-8601 format) of + alert instance. + :vartype last_modified_date_time: datetime + :ivar monitor_condition_resolved_date_time: Resolved time(ISO-8601 format) + of alert instance. This will be updated when monitor service resolves the + alert instance because the rule condition is no longer met. + :vartype monitor_condition_resolved_date_time: datetime + :ivar last_modified_user_name: User who last modified the alert, in case + of monitor service updates user would be 'system', otherwise name of the + user. + :vartype last_modified_user_name: str + """ + + _validation = { + 'severity': {'readonly': True}, + 'signal_type': {'readonly': True}, + 'alert_state': {'readonly': True}, + 'monitor_condition': {'readonly': True}, + 'monitor_service': {'readonly': True}, + 'alert_rule': {'readonly': True}, + 'source_created_id': {'readonly': True}, + 'smart_group_id': {'readonly': True}, + 'smart_grouping_reason': {'readonly': True}, + 'start_date_time': {'readonly': True}, + 'last_modified_date_time': {'readonly': True}, + 'monitor_condition_resolved_date_time': {'readonly': True}, + 'last_modified_user_name': {'readonly': True}, + } + + _attribute_map = { + 'severity': {'key': 'severity', 'type': 'str'}, + 'signal_type': {'key': 'signalType', 'type': 'str'}, + 'alert_state': {'key': 'alertState', 'type': 'str'}, + 'monitor_condition': {'key': 'monitorCondition', 'type': 'str'}, + 'target_resource': {'key': 'targetResource', 'type': 'str'}, + 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, + 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, + 'target_resource_type': {'key': 'targetResourceType', 'type': 'str'}, + 'monitor_service': {'key': 'monitorService', 'type': 'str'}, + 'alert_rule': {'key': 'alertRule', 'type': 'str'}, + 'source_created_id': {'key': 'sourceCreatedId', 'type': 'str'}, + 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, + 'smart_grouping_reason': {'key': 'smartGroupingReason', 'type': 'str'}, + 'start_date_time': {'key': 'startDateTime', 'type': 'iso-8601'}, + 'last_modified_date_time': {'key': 'lastModifiedDateTime', 'type': 'iso-8601'}, + 'monitor_condition_resolved_date_time': {'key': 'monitorConditionResolvedDateTime', 'type': 'iso-8601'}, + 'last_modified_user_name': {'key': 'lastModifiedUserName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Essentials, self).__init__(**kwargs) + self.severity = None + self.signal_type = None + self.alert_state = None + self.monitor_condition = None + self.target_resource = kwargs.get('target_resource', None) + self.target_resource_name = kwargs.get('target_resource_name', None) + self.target_resource_group = kwargs.get('target_resource_group', None) + self.target_resource_type = kwargs.get('target_resource_type', None) + self.monitor_service = None + self.alert_rule = None + self.source_created_id = None + self.smart_group_id = None + self.smart_grouping_reason = None + self.start_date_time = None + self.last_modified_date_time = None + self.monitor_condition_resolved_date_time = None + self.last_modified_user_name = None + + +class MonitorServiceDetails(Model): + """Details of a monitor service. + + :param name: Monitor service name + :type name: str + :param display_name: Monitor service display name + :type display_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MonitorServiceDetails, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + + +class MonitorServiceList(AlertsMetaDataProperties): + """Monitor service details. + + Monitor service details. + + All required parameters must be populated in order to send to Azure. + + :param metadata_identifier: Required. Constant filled by server. + :type metadata_identifier: str + :param data: Required. Array of operations + :type data: + list[~azure.mgmt.alertsmanagement.models.MonitorServiceDetails] + """ + + _validation = { + 'metadata_identifier': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'metadata_identifier': {'key': 'metadataIdentifier', 'type': 'str'}, + 'data': {'key': 'data', 'type': '[MonitorServiceDetails]'}, + } + + def __init__(self, **kwargs): + super(MonitorServiceList, self).__init__(**kwargs) + self.data = kwargs.get('data', None) + self.metadata_identifier = 'MonitorServiceList' + + +class Operation(Model): + """Operation provided by provider. + + :param name: Name of the operation + :type name: str + :param display: Properties of the operation + :type display: ~azure.mgmt.alertsmanagement.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + + +class OperationDisplay(Model): + """Properties of the operation. + + :param provider: Provider name + :type provider: str + :param resource: Resource name + :type resource: str + :param operation: Operation name + :type operation: str + :param description: Description of the operation + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class PatchObject(Model): + """Data contract for patch. + + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param tags: tags to be updated + :type tags: object + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(PatchObject, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.tags = kwargs.get('tags', None) + + +class Scope(Model): + """Target scope for a given action rule. By default scope will be the + subscription. User can also provide list of resource groups or list of + resources from the scope subscription as well. + + :param scope_type: type of target scope. Possible values include: + 'ResourceGroup', 'Resource' + :type scope_type: str or ~azure.mgmt.alertsmanagement.models.ScopeType + :param values: list of ARM IDs of the given scope type which will be the + target of the given action rule. + :type values: list[str] + """ + + _attribute_map = { + 'scope_type': {'key': 'scopeType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(Scope, self).__init__(**kwargs) + self.scope_type = kwargs.get('scope_type', None) + self.values = kwargs.get('values', None) + + +class SmartGroup(Resource): + """Set of related alerts grouped together smartly by AMS. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param alerts_count: Total number of alerts in smart group + :type alerts_count: int + :ivar smart_group_state: Smart group state. Possible values include: + 'New', 'Acknowledged', 'Closed' + :vartype smart_group_state: str or + ~azure.mgmt.alertsmanagement.models.State + :ivar severity: Severity of smart group is the highest(Sev0 >... > Sev4) + severity of all the alerts in the group. Possible values include: 'Sev0', + 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :ivar start_date_time: Creation time of smart group. Date-Time in ISO-8601 + format. + :vartype start_date_time: datetime + :ivar last_modified_date_time: Last updated time of smart group. Date-Time + in ISO-8601 format. + :vartype last_modified_date_time: datetime + :ivar last_modified_user_name: Last modified by user name. + :vartype last_modified_user_name: str + :param resources: Summary of target resources in the smart group + :type resources: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param resource_types: Summary of target resource types in the smart group + :type resource_types: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param resource_groups: Summary of target resource groups in the smart + group + :type resource_groups: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param monitor_services: Summary of monitorServices in the smart group + :type monitor_services: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param monitor_conditions: Summary of monitorConditions in the smart group + :type monitor_conditions: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param alert_states: Summary of alertStates in the smart group + :type alert_states: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param alert_severities: Summary of alertSeverities in the smart group + :type alert_severities: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param next_link: The URI to fetch the next page of alerts. Call + ListNext() with this URI to fetch the next page alerts. + :type next_link: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'smart_group_state': {'readonly': True}, + 'severity': {'readonly': True}, + 'start_date_time': {'readonly': True}, + 'last_modified_date_time': {'readonly': True}, + 'last_modified_user_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'alerts_count': {'key': 'properties.alertsCount', 'type': 'int'}, + 'smart_group_state': {'key': 'properties.smartGroupState', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, + 'last_modified_date_time': {'key': 'properties.lastModifiedDateTime', 'type': 'iso-8601'}, + 'last_modified_user_name': {'key': 'properties.lastModifiedUserName', 'type': 'str'}, + 'resources': {'key': 'properties.resources', 'type': '[SmartGroupAggregatedProperty]'}, + 'resource_types': {'key': 'properties.resourceTypes', 'type': '[SmartGroupAggregatedProperty]'}, + 'resource_groups': {'key': 'properties.resourceGroups', 'type': '[SmartGroupAggregatedProperty]'}, + 'monitor_services': {'key': 'properties.monitorServices', 'type': '[SmartGroupAggregatedProperty]'}, + 'monitor_conditions': {'key': 'properties.monitorConditions', 'type': '[SmartGroupAggregatedProperty]'}, + 'alert_states': {'key': 'properties.alertStates', 'type': '[SmartGroupAggregatedProperty]'}, + 'alert_severities': {'key': 'properties.alertSeverities', 'type': '[SmartGroupAggregatedProperty]'}, + 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SmartGroup, self).__init__(**kwargs) + self.alerts_count = kwargs.get('alerts_count', None) + self.smart_group_state = None + self.severity = None + self.start_date_time = None + self.last_modified_date_time = None + self.last_modified_user_name = None + self.resources = kwargs.get('resources', None) + self.resource_types = kwargs.get('resource_types', None) + self.resource_groups = kwargs.get('resource_groups', None) + self.monitor_services = kwargs.get('monitor_services', None) + self.monitor_conditions = kwargs.get('monitor_conditions', None) + self.alert_states = kwargs.get('alert_states', None) + self.alert_severities = kwargs.get('alert_severities', None) + self.next_link = kwargs.get('next_link', None) + + +class SmartGroupAggregatedProperty(Model): + """Aggregated property of each type. + + :param name: Name of the type. + :type name: str + :param count: Total number of items of type. + :type count: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(SmartGroupAggregatedProperty, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.count = kwargs.get('count', None) + + +class SmartGroupModification(Resource): + """Alert Modification details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: + ~azure.mgmt.alertsmanagement.models.SmartGroupModificationProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'SmartGroupModificationProperties'}, + } + + def __init__(self, **kwargs): + super(SmartGroupModification, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class SmartGroupModificationItem(Model): + """smartGroup modification item. + + :param modification_event: Reason for the modification. Possible values + include: 'SmartGroupCreated', 'StateChange', 'AlertAdded', 'AlertRemoved' + :type modification_event: str or + ~azure.mgmt.alertsmanagement.models.SmartGroupModificationEvent + :param old_value: Old value + :type old_value: str + :param new_value: New value + :type new_value: str + :param modified_at: Modified date and time + :type modified_at: str + :param modified_by: Modified user details (Principal client name) + :type modified_by: str + :param comments: Modification comments + :type comments: str + :param description: Description of the modification + :type description: str + """ + + _attribute_map = { + 'modification_event': {'key': 'modificationEvent', 'type': 'SmartGroupModificationEvent'}, + 'old_value': {'key': 'oldValue', 'type': 'str'}, + 'new_value': {'key': 'newValue', 'type': 'str'}, + 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SmartGroupModificationItem, self).__init__(**kwargs) + self.modification_event = kwargs.get('modification_event', None) + self.old_value = kwargs.get('old_value', None) + self.new_value = kwargs.get('new_value', None) + self.modified_at = kwargs.get('modified_at', None) + self.modified_by = kwargs.get('modified_by', None) + self.comments = kwargs.get('comments', None) + self.description = kwargs.get('description', None) + + +class SmartGroupModificationProperties(Model): + """Properties of the smartGroup modification item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar smart_group_id: Unique Id of the smartGroup for which the history is + being retrieved + :vartype smart_group_id: str + :param modifications: Modification details + :type modifications: + list[~azure.mgmt.alertsmanagement.models.SmartGroupModificationItem] + :param next_link: URL to fetch the next set of results. + :type next_link: str + """ + + _validation = { + 'smart_group_id': {'readonly': True}, + } + + _attribute_map = { + 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, + 'modifications': {'key': 'modifications', 'type': '[SmartGroupModificationItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SmartGroupModificationProperties, self).__init__(**kwargs) + self.smart_group_id = None + self.modifications = kwargs.get('modifications', None) + self.next_link = kwargs.get('next_link', None) + + +class Suppression(ActionRuleProperties): + """Suppression based Action Rule. + + Action rule with suppression configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + :param suppression_config: Required. suppression configuration for the + action rule + :type suppression_config: + ~azure.mgmt.alertsmanagement.models.SuppressionConfig + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + 'suppression_config': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'suppression_config': {'key': 'suppressionConfig', 'type': 'SuppressionConfig'}, + } + + def __init__(self, **kwargs): + super(Suppression, self).__init__(**kwargs) + self.suppression_config = kwargs.get('suppression_config', None) + self.type = 'Suppression' + + +class SuppressionConfig(Model): + """Suppression logic for a given action rule. + + All required parameters must be populated in order to send to Azure. + + :param recurrence_type: Required. Specifies when the suppression should be + applied. Possible values include: 'Always', 'Once', 'Daily', 'Weekly', + 'Monthly' + :type recurrence_type: str or + ~azure.mgmt.alertsmanagement.models.SuppressionType + :param schedule: suppression schedule configuration + :type schedule: ~azure.mgmt.alertsmanagement.models.SuppressionSchedule + """ + + _validation = { + 'recurrence_type': {'required': True}, + } + + _attribute_map = { + 'recurrence_type': {'key': 'recurrenceType', 'type': 'str'}, + 'schedule': {'key': 'schedule', 'type': 'SuppressionSchedule'}, + } + + def __init__(self, **kwargs): + super(SuppressionConfig, self).__init__(**kwargs) + self.recurrence_type = kwargs.get('recurrence_type', None) + self.schedule = kwargs.get('schedule', None) + + +class SuppressionSchedule(Model): + """Schedule for a given suppression configuration. + + :param start_date: Start date for suppression + :type start_date: str + :param end_date: End date for suppression + :type end_date: str + :param start_time: Start time for suppression + :type start_time: str + :param end_time: End date for suppression + :type end_time: str + :param recurrence_values: Specifies the values for recurrence pattern + :type recurrence_values: list[int] + """ + + _attribute_map = { + 'start_date': {'key': 'startDate', 'type': 'str'}, + 'end_date': {'key': 'endDate', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, + 'recurrence_values': {'key': 'recurrenceValues', 'type': '[int]'}, + } + + def __init__(self, **kwargs): + super(SuppressionSchedule, self).__init__(**kwargs) + self.start_date = kwargs.get('start_date', None) + self.end_date = kwargs.get('end_date', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.recurrence_values = kwargs.get('recurrence_values', None) + + +class ThrottlingInformation(Model): + """Optional throttling information for the alert rule. + + :param duration: The required duration (in ISO8601 format) to wait before + notifying on the alert rule again. The time granularity must be in minutes + and minimum value is 0 minutes + :type duration: timedelta + """ + + _attribute_map = { + 'duration': {'key': 'duration', 'type': 'duration'}, + } + + def __init__(self, **kwargs): + super(ThrottlingInformation, self).__init__(**kwargs) + self.duration = kwargs.get('duration', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models_py3.py new file mode 100644 index 000000000000..635be9d76f8e --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_models_py3.py @@ -0,0 +1,1704 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ActionRuleProperties(Model): + """Action rule properties defining scope, conditions, suppression logic for + action rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: Suppression, ActionGroup, Diagnostics + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'Suppression': 'Suppression', 'ActionGroup': 'ActionGroup', 'Diagnostics': 'Diagnostics'} + } + + def __init__(self, *, scope=None, conditions=None, description: str=None, status=None, **kwargs) -> None: + super(ActionRuleProperties, self).__init__(**kwargs) + self.scope = scope + self.conditions = conditions + self.description = description + self.created_at = None + self.last_modified_at = None + self.created_by = None + self.last_modified_by = None + self.status = status + self.type = None + + +class ActionGroup(ActionRuleProperties): + """Action Group based Action Rule. + + Action rule with action group configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + :param action_group_id: Required. Action group to trigger if action rule + matches + :type action_group_id: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + 'action_group_id': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'action_group_id': {'key': 'actionGroupId', 'type': 'str'}, + } + + def __init__(self, *, action_group_id: str, scope=None, conditions=None, description: str=None, status=None, **kwargs) -> None: + super(ActionGroup, self).__init__(scope=scope, conditions=conditions, description=description, status=status, **kwargs) + self.action_group_id = action_group_id + self.type = 'ActionGroup' + + +class ActionGroupsInformation(Model): + """The Action Groups information, used by the alert rule. + + All required parameters must be populated in order to send to Azure. + + :param custom_email_subject: An optional custom email subject to use in + email notifications. + :type custom_email_subject: str + :param custom_webhook_payload: An optional custom web-hook payload to use + in web-hook notifications. + :type custom_webhook_payload: str + :param group_ids: Required. The Action Group resource IDs. + :type group_ids: list[str] + """ + + _validation = { + 'group_ids': {'required': True}, + } + + _attribute_map = { + 'custom_email_subject': {'key': 'customEmailSubject', 'type': 'str'}, + 'custom_webhook_payload': {'key': 'customWebhookPayload', 'type': 'str'}, + 'group_ids': {'key': 'groupIds', 'type': '[str]'}, + } + + def __init__(self, *, group_ids, custom_email_subject: str=None, custom_webhook_payload: str=None, **kwargs) -> None: + super(ActionGroupsInformation, self).__init__(**kwargs) + self.custom_email_subject = custom_email_subject + self.custom_webhook_payload = custom_webhook_payload + self.group_ids = group_ids + + +class Resource(Model): + """An azure resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + + +class ManagedResource(Resource): + """An azure managed resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(ManagedResource, self).__init__(**kwargs) + self.location = location + self.tags = tags + + +class ActionRule(ManagedResource): + """Action rule object containing target scope, conditions and suppression + logic. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param properties: action rule properties + :type properties: ~azure.mgmt.alertsmanagement.models.ActionRuleProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'ActionRuleProperties'}, + } + + def __init__(self, *, location: str, tags=None, properties=None, **kwargs) -> None: + super(ActionRule, self).__init__(location=location, tags=tags, **kwargs) + self.properties = properties + + +class Alert(Resource): + """An alert created in alert management service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: ~azure.mgmt.alertsmanagement.models.AlertProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AlertProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(Alert, self).__init__(**kwargs) + self.properties = properties + + +class AlertModification(Resource): + """Alert Modification details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: + ~azure.mgmt.alertsmanagement.models.AlertModificationProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AlertModificationProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(AlertModification, self).__init__(**kwargs) + self.properties = properties + + +class AlertModificationItem(Model): + """Alert modification item. + + :param modification_event: Reason for the modification. Possible values + include: 'AlertCreated', 'StateChange', 'MonitorConditionChange' + :type modification_event: str or + ~azure.mgmt.alertsmanagement.models.AlertModificationEvent + :param old_value: Old value + :type old_value: str + :param new_value: New value + :type new_value: str + :param modified_at: Modified date and time + :type modified_at: str + :param modified_by: Modified user details (Principal client name) + :type modified_by: str + :param comments: Modification comments + :type comments: str + :param description: Description of the modification + :type description: str + """ + + _attribute_map = { + 'modification_event': {'key': 'modificationEvent', 'type': 'AlertModificationEvent'}, + 'old_value': {'key': 'oldValue', 'type': 'str'}, + 'new_value': {'key': 'newValue', 'type': 'str'}, + 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, modification_event=None, old_value: str=None, new_value: str=None, modified_at: str=None, modified_by: str=None, comments: str=None, description: str=None, **kwargs) -> None: + super(AlertModificationItem, self).__init__(**kwargs) + self.modification_event = modification_event + self.old_value = old_value + self.new_value = new_value + self.modified_at = modified_at + self.modified_by = modified_by + self.comments = comments + self.description = description + + +class AlertModificationProperties(Model): + """Properties of the alert modification item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar alert_id: Unique Id of the alert for which the history is being + retrieved + :vartype alert_id: str + :param modifications: Modification details + :type modifications: + list[~azure.mgmt.alertsmanagement.models.AlertModificationItem] + """ + + _validation = { + 'alert_id': {'readonly': True}, + } + + _attribute_map = { + 'alert_id': {'key': 'alertId', 'type': 'str'}, + 'modifications': {'key': 'modifications', 'type': '[AlertModificationItem]'}, + } + + def __init__(self, *, modifications=None, **kwargs) -> None: + super(AlertModificationProperties, self).__init__(**kwargs) + self.alert_id = None + self.modifications = modifications + + +class AlertProperties(Model): + """Alert property bag. + + :param essentials: + :type essentials: ~azure.mgmt.alertsmanagement.models.Essentials + :param context: + :type context: object + :param egress_config: + :type egress_config: object + """ + + _attribute_map = { + 'essentials': {'key': 'essentials', 'type': 'Essentials'}, + 'context': {'key': 'context', 'type': 'object'}, + 'egress_config': {'key': 'egressConfig', 'type': 'object'}, + } + + def __init__(self, *, essentials=None, context=None, egress_config=None, **kwargs) -> None: + super(AlertProperties, self).__init__(**kwargs) + self.essentials = essentials + self.context = context + self.egress_config = egress_config + + +class AzureResource(Model): + """An Azure resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar type: The resource type. + :vartype type: str + :ivar name: The resource name. + :vartype name: str + :param location: The resource location. Default value: "global" . + :type location: str + :param tags: The resource tags. + :type tags: object + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + } + + def __init__(self, *, location: str="global", tags=None, **kwargs) -> None: + super(AzureResource, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.location = location + self.tags = tags + + +class AlertRule(AzureResource): + """The alert rule information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource ID. + :vartype id: str + :ivar type: The resource type. + :vartype type: str + :ivar name: The resource name. + :vartype name: str + :param location: The resource location. Default value: "global" . + :type location: str + :param tags: The resource tags. + :type tags: object + :param description: The alert rule description. + :type description: str + :param state: Required. The alert rule state. Possible values include: + 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.alertsmanagement.models.AlertRuleState + :param severity: Required. The alert rule severity. Possible values + include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param frequency: Required. The alert rule frequency in ISO8601 format. + The time granularity must be in minutes and minimum value is 5 minutes. + :type frequency: timedelta + :param detector: Required. The alert rule's detector. + :type detector: ~azure.mgmt.alertsmanagement.models.Detector + :param scope: Required. The alert rule resources scope. + :type scope: list[str] + :param action_groups: Required. The alert rule actions. + :type action_groups: + ~azure.mgmt.alertsmanagement.models.ActionGroupsInformation + :param throttling: The alert rule throttling information. + :type throttling: + ~azure.mgmt.alertsmanagement.models.ThrottlingInformation + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'state': {'required': True}, + 'severity': {'required': True}, + 'frequency': {'required': True}, + 'detector': {'required': True}, + 'scope': {'required': True}, + 'action_groups': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'frequency': {'key': 'properties.frequency', 'type': 'duration'}, + 'detector': {'key': 'properties.detector', 'type': 'Detector'}, + 'scope': {'key': 'properties.scope', 'type': '[str]'}, + 'action_groups': {'key': 'properties.actionGroups', 'type': 'ActionGroupsInformation'}, + 'throttling': {'key': 'properties.throttling', 'type': 'ThrottlingInformation'}, + } + + def __init__(self, *, state, severity, frequency, detector, scope, action_groups, location: str="global", tags=None, description: str=None, throttling=None, **kwargs) -> None: + super(AlertRule, self).__init__(location=location, tags=tags, **kwargs) + self.description = description + self.state = state + self.severity = severity + self.frequency = frequency + self.detector = detector + self.scope = scope + self.action_groups = action_groups + self.throttling = throttling + + +class AlertRulePatchObject(Model): + """The alert rule patch information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar type: The resource type. + :vartype type: str + :ivar name: The resource name. + :vartype name: str + :param tags: The resource tags. + :type tags: object + :param description: The alert rule description. + :type description: str + :param state: The alert rule state. Possible values include: 'Enabled', + 'Disabled' + :type state: str or ~azure.mgmt.alertsmanagement.models.AlertRuleState + :param severity: The alert rule severity. Possible values include: 'Sev0', + 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param frequency: The alert rule frequency in ISO8601 format. The time + granularity must be in minutes and minimum value is 5 minutes. + :type frequency: timedelta + :param action_groups: The alert rule actions. + :type action_groups: + ~azure.mgmt.alertsmanagement.models.ActionGroupsInformation + :param throttling: The alert rule throttling information. + :type throttling: + ~azure.mgmt.alertsmanagement.models.ThrottlingInformation + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'frequency': {'key': 'properties.frequency', 'type': 'duration'}, + 'action_groups': {'key': 'properties.actionGroups', 'type': 'ActionGroupsInformation'}, + 'throttling': {'key': 'properties.throttling', 'type': 'ThrottlingInformation'}, + } + + def __init__(self, *, tags=None, description: str=None, state=None, severity=None, frequency=None, action_groups=None, throttling=None, **kwargs) -> None: + super(AlertRulePatchObject, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.tags = tags + self.description = description + self.state = state + self.severity = severity + self.frequency = frequency + self.action_groups = action_groups + self.throttling = throttling + + +class AlertsMetaData(Model): + """alert meta data information. + + :param properties: + :type properties: + ~azure.mgmt.alertsmanagement.models.AlertsMetaDataProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'AlertsMetaDataProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(AlertsMetaData, self).__init__(**kwargs) + self.properties = properties + + +class AlertsMetaDataProperties(Model): + """alert meta data property bag. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MonitorServiceList + + All required parameters must be populated in order to send to Azure. + + :param metadata_identifier: Required. Constant filled by server. + :type metadata_identifier: str + """ + + _validation = { + 'metadata_identifier': {'required': True}, + } + + _attribute_map = { + 'metadata_identifier': {'key': 'metadataIdentifier', 'type': 'str'}, + } + + _subtype_map = { + 'metadata_identifier': {'MonitorServiceList': 'MonitorServiceList'} + } + + def __init__(self, **kwargs) -> None: + super(AlertsMetaDataProperties, self).__init__(**kwargs) + self.metadata_identifier = None + + +class AlertsSummary(Resource): + """Summary of alerts based on the input filters and 'groupby' parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: ~azure.mgmt.alertsmanagement.models.AlertsSummaryGroup + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AlertsSummaryGroup'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(AlertsSummary, self).__init__(**kwargs) + self.properties = properties + + +class AlertsSummaryGroup(Model): + """Group the result set. + + :param total: Total count of the result set. + :type total: int + :param smart_groups_count: Total count of the smart groups. + :type smart_groups_count: int + :param groupedby: Name of the field aggregated + :type groupedby: str + :param values: List of the items + :type values: + list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] + """ + + _attribute_map = { + 'total': {'key': 'total', 'type': 'int'}, + 'smart_groups_count': {'key': 'smartGroupsCount', 'type': 'int'}, + 'groupedby': {'key': 'groupedby', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, + } + + def __init__(self, *, total: int=None, smart_groups_count: int=None, groupedby: str=None, values=None, **kwargs) -> None: + super(AlertsSummaryGroup, self).__init__(**kwargs) + self.total = total + self.smart_groups_count = smart_groups_count + self.groupedby = groupedby + self.values = values + + +class AlertsSummaryGroupItem(Model): + """Alerts summary group item. + + :param name: Value of the aggregated field + :type name: str + :param count: Count of the aggregated field + :type count: int + :param groupedby: Name of the field aggregated + :type groupedby: str + :param values: List of the items + :type values: + list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'groupedby': {'key': 'groupedby', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, + } + + def __init__(self, *, name: str=None, count: int=None, groupedby: str=None, values=None, **kwargs) -> None: + super(AlertsSummaryGroupItem, self).__init__(**kwargs) + self.name = name + self.count = count + self.groupedby = groupedby + self.values = values + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class Condition(Model): + """condition to trigger an action rule. + + :param operator: operator for a given condition. Possible values include: + 'Equals', 'NotEquals', 'Contains', 'DoesNotContain' + :type operator: str or ~azure.mgmt.alertsmanagement.models.Operator + :param values: list of values to match for a given condition. + :type values: list[str] + """ + + _attribute_map = { + 'operator': {'key': 'operator', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, *, operator=None, values=None, **kwargs) -> None: + super(Condition, self).__init__(**kwargs) + self.operator = operator + self.values = values + + +class Conditions(Model): + """Conditions in alert instance to be matched for a given action rule. Default + value is all. Multiple values could be provided with comma separation. + + :param severity: filter alerts by severity + :type severity: ~azure.mgmt.alertsmanagement.models.Condition + :param monitor_service: filter alerts by monitor service + :type monitor_service: ~azure.mgmt.alertsmanagement.models.Condition + :param monitor_condition: filter alerts by monitor condition + :type monitor_condition: ~azure.mgmt.alertsmanagement.models.Condition + :param target_resource_type: filter alerts by target resource type + :type target_resource_type: ~azure.mgmt.alertsmanagement.models.Condition + :param alert_rule_id: filter alerts by alert rule id + :type alert_rule_id: ~azure.mgmt.alertsmanagement.models.Condition + :param description: filter alerts by alert rule description + :type description: ~azure.mgmt.alertsmanagement.models.Condition + :param alert_context: filter alerts by alert context (payload) + :type alert_context: ~azure.mgmt.alertsmanagement.models.Condition + """ + + _attribute_map = { + 'severity': {'key': 'severity', 'type': 'Condition'}, + 'monitor_service': {'key': 'monitorService', 'type': 'Condition'}, + 'monitor_condition': {'key': 'monitorCondition', 'type': 'Condition'}, + 'target_resource_type': {'key': 'targetResourceType', 'type': 'Condition'}, + 'alert_rule_id': {'key': 'alertRuleId', 'type': 'Condition'}, + 'description': {'key': 'description', 'type': 'Condition'}, + 'alert_context': {'key': 'alertContext', 'type': 'Condition'}, + } + + def __init__(self, *, severity=None, monitor_service=None, monitor_condition=None, target_resource_type=None, alert_rule_id=None, description=None, alert_context=None, **kwargs) -> None: + super(Conditions, self).__init__(**kwargs) + self.severity = severity + self.monitor_service = monitor_service + self.monitor_condition = monitor_condition + self.target_resource_type = target_resource_type + self.alert_rule_id = alert_rule_id + self.description = description + self.alert_context = alert_context + + +class Detector(Model): + """The detector information. By default this is not populated, unless it's + specified in expandDetector. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The detector id. + :type id: str + :param parameters: The detector's parameters.' + :type parameters: dict[str, object] + :param name: The Smart Detector name. By default this is not populated, + unless it's specified in expandDetector + :type name: str + :param description: The Smart Detector description. By default this is not + populated, unless it's specified in expandDetector + :type description: str + :param supported_resource_types: The Smart Detector supported resource + types. By default this is not populated, unless it's specified in + expandDetector + :type supported_resource_types: list[str] + :param image_paths: The Smart Detector image path. By default this is not + populated, unless it's specified in expandDetector + :type image_paths: list[str] + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'supported_resource_types': {'key': 'supportedResourceTypes', 'type': '[str]'}, + 'image_paths': {'key': 'imagePaths', 'type': '[str]'}, + } + + def __init__(self, *, id: str, parameters=None, name: str=None, description: str=None, supported_resource_types=None, image_paths=None, **kwargs) -> None: + super(Detector, self).__init__(**kwargs) + self.id = id + self.parameters = parameters + self.name = name + self.description = description + self.supported_resource_types = supported_resource_types + self.image_paths = image_paths + + +class Diagnostics(ActionRuleProperties): + """Diagnostics based Action Rule. + + Action rule with diagnostics configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, scope=None, conditions=None, description: str=None, status=None, **kwargs) -> None: + super(Diagnostics, self).__init__(scope=scope, conditions=conditions, description=description, status=status, **kwargs) + self.type = 'Diagnostics' + + +class ErrorResponse(Model): + """An error response from the service. + + :param error: + :type error: ~azure.mgmt.alertsmanagement.models.ErrorResponseBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponseBody'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class ErrorResponse1(Model): + """Describe the format of an Error response. + + :param code: Error code + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(ErrorResponse1, self).__init__(**kwargs) + self.code = code + self.message = message + + +class ErrorResponse1Exception(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse1'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponse1Exception, self).__init__(deserialize, response, 'ErrorResponse1', *args) + + +class ErrorResponseBody(Model): + """Details of error response. + + :param code: Error code, intended to be consumed programmatically. + :type code: str + :param message: Description of the error, intended for display in user + interface. + :type message: str + :param target: Target of the particular error, for example name of the + property. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.alertsmanagement.models.ErrorResponseBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorResponseBody]'}, + } + + def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: + super(ErrorResponseBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class Essentials(Model): + """This object contains consistent fields across different monitor services. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar severity: Severity of alert Sev0 being highest and Sev4 being + lowest. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :ivar signal_type: The type of signal the alert is based on, which could + be metrics, logs or activity logs. Possible values include: 'Metric', + 'Log', 'Unknown' + :vartype signal_type: str or + ~azure.mgmt.alertsmanagement.models.SignalType + :ivar alert_state: Alert object state, which can be modified by the user. + Possible values include: 'New', 'Acknowledged', 'Closed' + :vartype alert_state: str or + ~azure.mgmt.alertsmanagement.models.AlertState + :ivar monitor_condition: Condition of the rule at the monitor service. It + represents whether the underlying conditions have crossed the defined + alert rule thresholds. Possible values include: 'Fired', 'Resolved' + :vartype monitor_condition: str or + ~azure.mgmt.alertsmanagement.models.MonitorCondition + :param target_resource: Target ARM resource, on which alert got created. + :type target_resource: str + :param target_resource_name: Name of the target ARM resource name, on + which alert got created. + :type target_resource_name: str + :param target_resource_group: Resource group of target ARM resource, on + which alert got created. + :type target_resource_group: str + :param target_resource_type: Resource type of target ARM resource, on + which alert got created. + :type target_resource_type: str + :ivar monitor_service: Monitor service on which the rule(monitor) is set. + Possible values include: 'Application Insights', 'ActivityLog + Administrative', 'ActivityLog Security', 'ActivityLog Recommendation', + 'ActivityLog Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', + 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', + 'Zabbix' + :vartype monitor_service: str or + ~azure.mgmt.alertsmanagement.models.MonitorService + :ivar alert_rule: Rule(monitor) which fired alert instance. Depending on + the monitor service, this would be ARM id or name of the rule. + :vartype alert_rule: str + :ivar source_created_id: Unique Id created by monitor service for each + alert instance. This could be used to track the issue at the monitor + service, in case of Nagios, Zabbix, SCOM etc. + :vartype source_created_id: str + :ivar smart_group_id: Unique Id of the smart group + :vartype smart_group_id: str + :ivar smart_grouping_reason: Verbose reason describing the reason why this + alert instance is added to a smart group + :vartype smart_grouping_reason: str + :ivar start_date_time: Creation time(ISO-8601 format) of alert instance. + :vartype start_date_time: datetime + :ivar last_modified_date_time: Last modification time(ISO-8601 format) of + alert instance. + :vartype last_modified_date_time: datetime + :ivar monitor_condition_resolved_date_time: Resolved time(ISO-8601 format) + of alert instance. This will be updated when monitor service resolves the + alert instance because the rule condition is no longer met. + :vartype monitor_condition_resolved_date_time: datetime + :ivar last_modified_user_name: User who last modified the alert, in case + of monitor service updates user would be 'system', otherwise name of the + user. + :vartype last_modified_user_name: str + """ + + _validation = { + 'severity': {'readonly': True}, + 'signal_type': {'readonly': True}, + 'alert_state': {'readonly': True}, + 'monitor_condition': {'readonly': True}, + 'monitor_service': {'readonly': True}, + 'alert_rule': {'readonly': True}, + 'source_created_id': {'readonly': True}, + 'smart_group_id': {'readonly': True}, + 'smart_grouping_reason': {'readonly': True}, + 'start_date_time': {'readonly': True}, + 'last_modified_date_time': {'readonly': True}, + 'monitor_condition_resolved_date_time': {'readonly': True}, + 'last_modified_user_name': {'readonly': True}, + } + + _attribute_map = { + 'severity': {'key': 'severity', 'type': 'str'}, + 'signal_type': {'key': 'signalType', 'type': 'str'}, + 'alert_state': {'key': 'alertState', 'type': 'str'}, + 'monitor_condition': {'key': 'monitorCondition', 'type': 'str'}, + 'target_resource': {'key': 'targetResource', 'type': 'str'}, + 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, + 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, + 'target_resource_type': {'key': 'targetResourceType', 'type': 'str'}, + 'monitor_service': {'key': 'monitorService', 'type': 'str'}, + 'alert_rule': {'key': 'alertRule', 'type': 'str'}, + 'source_created_id': {'key': 'sourceCreatedId', 'type': 'str'}, + 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, + 'smart_grouping_reason': {'key': 'smartGroupingReason', 'type': 'str'}, + 'start_date_time': {'key': 'startDateTime', 'type': 'iso-8601'}, + 'last_modified_date_time': {'key': 'lastModifiedDateTime', 'type': 'iso-8601'}, + 'monitor_condition_resolved_date_time': {'key': 'monitorConditionResolvedDateTime', 'type': 'iso-8601'}, + 'last_modified_user_name': {'key': 'lastModifiedUserName', 'type': 'str'}, + } + + def __init__(self, *, target_resource: str=None, target_resource_name: str=None, target_resource_group: str=None, target_resource_type: str=None, **kwargs) -> None: + super(Essentials, self).__init__(**kwargs) + self.severity = None + self.signal_type = None + self.alert_state = None + self.monitor_condition = None + self.target_resource = target_resource + self.target_resource_name = target_resource_name + self.target_resource_group = target_resource_group + self.target_resource_type = target_resource_type + self.monitor_service = None + self.alert_rule = None + self.source_created_id = None + self.smart_group_id = None + self.smart_grouping_reason = None + self.start_date_time = None + self.last_modified_date_time = None + self.monitor_condition_resolved_date_time = None + self.last_modified_user_name = None + + +class MonitorServiceDetails(Model): + """Details of a monitor service. + + :param name: Monitor service name + :type name: str + :param display_name: Monitor service display name + :type display_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, **kwargs) -> None: + super(MonitorServiceDetails, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + + +class MonitorServiceList(AlertsMetaDataProperties): + """Monitor service details. + + Monitor service details. + + All required parameters must be populated in order to send to Azure. + + :param metadata_identifier: Required. Constant filled by server. + :type metadata_identifier: str + :param data: Required. Array of operations + :type data: + list[~azure.mgmt.alertsmanagement.models.MonitorServiceDetails] + """ + + _validation = { + 'metadata_identifier': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'metadata_identifier': {'key': 'metadataIdentifier', 'type': 'str'}, + 'data': {'key': 'data', 'type': '[MonitorServiceDetails]'}, + } + + def __init__(self, *, data, **kwargs) -> None: + super(MonitorServiceList, self).__init__(**kwargs) + self.data = data + self.metadata_identifier = 'MonitorServiceList' + + +class Operation(Model): + """Operation provided by provider. + + :param name: Name of the operation + :type name: str + :param display: Properties of the operation + :type display: ~azure.mgmt.alertsmanagement.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, name: str=None, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display + + +class OperationDisplay(Model): + """Properties of the operation. + + :param provider: Provider name + :type provider: str + :param resource: Resource name + :type resource: str + :param operation: Operation name + :type operation: str + :param description: Description of the operation + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class PatchObject(Model): + """Data contract for patch. + + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param tags: tags to be updated + :type tags: object + """ + + _attribute_map = { + 'status': {'key': 'properties.status', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'object'}, + } + + def __init__(self, *, status=None, tags=None, **kwargs) -> None: + super(PatchObject, self).__init__(**kwargs) + self.status = status + self.tags = tags + + +class Scope(Model): + """Target scope for a given action rule. By default scope will be the + subscription. User can also provide list of resource groups or list of + resources from the scope subscription as well. + + :param scope_type: type of target scope. Possible values include: + 'ResourceGroup', 'Resource' + :type scope_type: str or ~azure.mgmt.alertsmanagement.models.ScopeType + :param values: list of ARM IDs of the given scope type which will be the + target of the given action rule. + :type values: list[str] + """ + + _attribute_map = { + 'scope_type': {'key': 'scopeType', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, *, scope_type=None, values=None, **kwargs) -> None: + super(Scope, self).__init__(**kwargs) + self.scope_type = scope_type + self.values = values + + +class SmartGroup(Resource): + """Set of related alerts grouped together smartly by AMS. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param alerts_count: Total number of alerts in smart group + :type alerts_count: int + :ivar smart_group_state: Smart group state. Possible values include: + 'New', 'Acknowledged', 'Closed' + :vartype smart_group_state: str or + ~azure.mgmt.alertsmanagement.models.State + :ivar severity: Severity of smart group is the highest(Sev0 >... > Sev4) + severity of all the alerts in the group. Possible values include: 'Sev0', + 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :ivar start_date_time: Creation time of smart group. Date-Time in ISO-8601 + format. + :vartype start_date_time: datetime + :ivar last_modified_date_time: Last updated time of smart group. Date-Time + in ISO-8601 format. + :vartype last_modified_date_time: datetime + :ivar last_modified_user_name: Last modified by user name. + :vartype last_modified_user_name: str + :param resources: Summary of target resources in the smart group + :type resources: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param resource_types: Summary of target resource types in the smart group + :type resource_types: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param resource_groups: Summary of target resource groups in the smart + group + :type resource_groups: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param monitor_services: Summary of monitorServices in the smart group + :type monitor_services: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param monitor_conditions: Summary of monitorConditions in the smart group + :type monitor_conditions: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param alert_states: Summary of alertStates in the smart group + :type alert_states: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param alert_severities: Summary of alertSeverities in the smart group + :type alert_severities: + list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] + :param next_link: The URI to fetch the next page of alerts. Call + ListNext() with this URI to fetch the next page alerts. + :type next_link: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'smart_group_state': {'readonly': True}, + 'severity': {'readonly': True}, + 'start_date_time': {'readonly': True}, + 'last_modified_date_time': {'readonly': True}, + 'last_modified_user_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'alerts_count': {'key': 'properties.alertsCount', 'type': 'int'}, + 'smart_group_state': {'key': 'properties.smartGroupState', 'type': 'str'}, + 'severity': {'key': 'properties.severity', 'type': 'str'}, + 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, + 'last_modified_date_time': {'key': 'properties.lastModifiedDateTime', 'type': 'iso-8601'}, + 'last_modified_user_name': {'key': 'properties.lastModifiedUserName', 'type': 'str'}, + 'resources': {'key': 'properties.resources', 'type': '[SmartGroupAggregatedProperty]'}, + 'resource_types': {'key': 'properties.resourceTypes', 'type': '[SmartGroupAggregatedProperty]'}, + 'resource_groups': {'key': 'properties.resourceGroups', 'type': '[SmartGroupAggregatedProperty]'}, + 'monitor_services': {'key': 'properties.monitorServices', 'type': '[SmartGroupAggregatedProperty]'}, + 'monitor_conditions': {'key': 'properties.monitorConditions', 'type': '[SmartGroupAggregatedProperty]'}, + 'alert_states': {'key': 'properties.alertStates', 'type': '[SmartGroupAggregatedProperty]'}, + 'alert_severities': {'key': 'properties.alertSeverities', 'type': '[SmartGroupAggregatedProperty]'}, + 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, + } + + def __init__(self, *, alerts_count: int=None, resources=None, resource_types=None, resource_groups=None, monitor_services=None, monitor_conditions=None, alert_states=None, alert_severities=None, next_link: str=None, **kwargs) -> None: + super(SmartGroup, self).__init__(**kwargs) + self.alerts_count = alerts_count + self.smart_group_state = None + self.severity = None + self.start_date_time = None + self.last_modified_date_time = None + self.last_modified_user_name = None + self.resources = resources + self.resource_types = resource_types + self.resource_groups = resource_groups + self.monitor_services = monitor_services + self.monitor_conditions = monitor_conditions + self.alert_states = alert_states + self.alert_severities = alert_severities + self.next_link = next_link + + +class SmartGroupAggregatedProperty(Model): + """Aggregated property of each type. + + :param name: Name of the type. + :type name: str + :param count: Total number of items of type. + :type count: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__(self, *, name: str=None, count: int=None, **kwargs) -> None: + super(SmartGroupAggregatedProperty, self).__init__(**kwargs) + self.name = name + self.count = count + + +class SmartGroupModification(Resource): + """Alert Modification details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar type: Azure resource type + :vartype type: str + :ivar name: Azure resource name + :vartype name: str + :param properties: + :type properties: + ~azure.mgmt.alertsmanagement.models.SmartGroupModificationProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'SmartGroupModificationProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(SmartGroupModification, self).__init__(**kwargs) + self.properties = properties + + +class SmartGroupModificationItem(Model): + """smartGroup modification item. + + :param modification_event: Reason for the modification. Possible values + include: 'SmartGroupCreated', 'StateChange', 'AlertAdded', 'AlertRemoved' + :type modification_event: str or + ~azure.mgmt.alertsmanagement.models.SmartGroupModificationEvent + :param old_value: Old value + :type old_value: str + :param new_value: New value + :type new_value: str + :param modified_at: Modified date and time + :type modified_at: str + :param modified_by: Modified user details (Principal client name) + :type modified_by: str + :param comments: Modification comments + :type comments: str + :param description: Description of the modification + :type description: str + """ + + _attribute_map = { + 'modification_event': {'key': 'modificationEvent', 'type': 'SmartGroupModificationEvent'}, + 'old_value': {'key': 'oldValue', 'type': 'str'}, + 'new_value': {'key': 'newValue', 'type': 'str'}, + 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, modification_event=None, old_value: str=None, new_value: str=None, modified_at: str=None, modified_by: str=None, comments: str=None, description: str=None, **kwargs) -> None: + super(SmartGroupModificationItem, self).__init__(**kwargs) + self.modification_event = modification_event + self.old_value = old_value + self.new_value = new_value + self.modified_at = modified_at + self.modified_by = modified_by + self.comments = comments + self.description = description + + +class SmartGroupModificationProperties(Model): + """Properties of the smartGroup modification item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar smart_group_id: Unique Id of the smartGroup for which the history is + being retrieved + :vartype smart_group_id: str + :param modifications: Modification details + :type modifications: + list[~azure.mgmt.alertsmanagement.models.SmartGroupModificationItem] + :param next_link: URL to fetch the next set of results. + :type next_link: str + """ + + _validation = { + 'smart_group_id': {'readonly': True}, + } + + _attribute_map = { + 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, + 'modifications': {'key': 'modifications', 'type': '[SmartGroupModificationItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, modifications=None, next_link: str=None, **kwargs) -> None: + super(SmartGroupModificationProperties, self).__init__(**kwargs) + self.smart_group_id = None + self.modifications = modifications + self.next_link = next_link + + +class Suppression(ActionRuleProperties): + """Suppression based Action Rule. + + Action rule with suppression configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param scope: scope on which action rule will apply + :type scope: ~azure.mgmt.alertsmanagement.models.Scope + :param conditions: conditions on which alerts will be filtered + :type conditions: ~azure.mgmt.alertsmanagement.models.Conditions + :param description: Description of action rule + :type description: str + :ivar created_at: Creation time of action rule. Date-Time in ISO-8601 + format. + :vartype created_at: datetime + :ivar last_modified_at: Last updated time of action rule. Date-Time in + ISO-8601 format. + :vartype last_modified_at: datetime + :ivar created_by: Created by user name. + :vartype created_by: str + :ivar last_modified_by: Last modified by user name. + :vartype last_modified_by: str + :param status: Indicates if the given action rule is enabled or disabled. + Possible values include: 'Enabled', 'Disabled' + :type status: str or ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param type: Required. Constant filled by server. + :type type: str + :param suppression_config: Required. suppression configuration for the + action rule + :type suppression_config: + ~azure.mgmt.alertsmanagement.models.SuppressionConfig + """ + + _validation = { + 'created_at': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + 'created_by': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'type': {'required': True}, + 'suppression_config': {'required': True}, + } + + _attribute_map = { + 'scope': {'key': 'scope', 'type': 'Scope'}, + 'conditions': {'key': 'conditions', 'type': 'Conditions'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'suppression_config': {'key': 'suppressionConfig', 'type': 'SuppressionConfig'}, + } + + def __init__(self, *, suppression_config, scope=None, conditions=None, description: str=None, status=None, **kwargs) -> None: + super(Suppression, self).__init__(scope=scope, conditions=conditions, description=description, status=status, **kwargs) + self.suppression_config = suppression_config + self.type = 'Suppression' + + +class SuppressionConfig(Model): + """Suppression logic for a given action rule. + + All required parameters must be populated in order to send to Azure. + + :param recurrence_type: Required. Specifies when the suppression should be + applied. Possible values include: 'Always', 'Once', 'Daily', 'Weekly', + 'Monthly' + :type recurrence_type: str or + ~azure.mgmt.alertsmanagement.models.SuppressionType + :param schedule: suppression schedule configuration + :type schedule: ~azure.mgmt.alertsmanagement.models.SuppressionSchedule + """ + + _validation = { + 'recurrence_type': {'required': True}, + } + + _attribute_map = { + 'recurrence_type': {'key': 'recurrenceType', 'type': 'str'}, + 'schedule': {'key': 'schedule', 'type': 'SuppressionSchedule'}, + } + + def __init__(self, *, recurrence_type, schedule=None, **kwargs) -> None: + super(SuppressionConfig, self).__init__(**kwargs) + self.recurrence_type = recurrence_type + self.schedule = schedule + + +class SuppressionSchedule(Model): + """Schedule for a given suppression configuration. + + :param start_date: Start date for suppression + :type start_date: str + :param end_date: End date for suppression + :type end_date: str + :param start_time: Start time for suppression + :type start_time: str + :param end_time: End date for suppression + :type end_time: str + :param recurrence_values: Specifies the values for recurrence pattern + :type recurrence_values: list[int] + """ + + _attribute_map = { + 'start_date': {'key': 'startDate', 'type': 'str'}, + 'end_date': {'key': 'endDate', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, + 'recurrence_values': {'key': 'recurrenceValues', 'type': '[int]'}, + } + + def __init__(self, *, start_date: str=None, end_date: str=None, start_time: str=None, end_time: str=None, recurrence_values=None, **kwargs) -> None: + super(SuppressionSchedule, self).__init__(**kwargs) + self.start_date = start_date + self.end_date = end_date + self.start_time = start_time + self.end_time = end_time + self.recurrence_values = recurrence_values + + +class ThrottlingInformation(Model): + """Optional throttling information for the alert rule. + + :param duration: The required duration (in ISO8601 format) to wait before + notifying on the alert rule again. The time granularity must be in minutes + and minimum value is 0 minutes + :type duration: timedelta + """ + + _attribute_map = { + 'duration': {'key': 'duration', 'type': 'duration'}, + } + + def __init__(self, *, duration=None, **kwargs) -> None: + super(ThrottlingInformation, self).__init__(**kwargs) + self.duration = duration diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_paged_models.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_paged_models.py new file mode 100644 index 000000000000..aece7093df75 --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/_paged_models.py @@ -0,0 +1,79 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class AlertPaged(Paged): + """ + A paging container for iterating over a list of :class:`Alert ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Alert]'} + } + + def __init__(self, *args, **kwargs): + + super(AlertPaged, self).__init__(*args, **kwargs) +class SmartGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`SmartGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SmartGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(SmartGroupPaged, self).__init__(*args, **kwargs) +class ActionRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`ActionRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ActionRule]'} + } + + def __init__(self, *args, **kwargs): + + super(ActionRulePaged, self).__init__(*args, **kwargs) +class AlertRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`AlertRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AlertRule]'} + } + + def __init__(self, *args, **kwargs): + + super(AlertRulePaged, self).__init__(*args, **kwargs) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert.py deleted file mode 100644 index 634c2c747b17..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Alert(Resource): - """An alert created in alert management service. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: ~azure.mgmt.alertsmanagement.models.AlertProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertProperties'}, - } - - def __init__(self, **kwargs): - super(Alert, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification.py deleted file mode 100644 index e2d77167596c..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class AlertModification(Resource): - """Alert Modification details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: - ~azure.mgmt.alertsmanagement.models.AlertModificationProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertModificationProperties'}, - } - - def __init__(self, **kwargs): - super(AlertModification, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item.py deleted file mode 100644 index 50915b06ce40..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertModificationItem(Model): - """Alert modification item. - - :param modification_event: Reason for the modification. Possible values - include: 'AlertCreated', 'StateChange', 'MonitorConditionChange' - :type modification_event: str or - ~azure.mgmt.alertsmanagement.models.AlertModificationEvent - :param old_value: Old value - :type old_value: str - :param new_value: New value - :type new_value: str - :param modified_at: Modified date and time - :type modified_at: str - :param modified_by: Modified user details (Principal client name) - :type modified_by: str - :param comments: Modification comments - :type comments: str - :param description: Description of the modification - :type description: str - """ - - _attribute_map = { - 'modification_event': {'key': 'modificationEvent', 'type': 'AlertModificationEvent'}, - 'old_value': {'key': 'oldValue', 'type': 'str'}, - 'new_value': {'key': 'newValue', 'type': 'str'}, - 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, - 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, - 'comments': {'key': 'comments', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AlertModificationItem, self).__init__(**kwargs) - self.modification_event = kwargs.get('modification_event', None) - self.old_value = kwargs.get('old_value', None) - self.new_value = kwargs.get('new_value', None) - self.modified_at = kwargs.get('modified_at', None) - self.modified_by = kwargs.get('modified_by', None) - self.comments = kwargs.get('comments', None) - self.description = kwargs.get('description', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item_py3.py deleted file mode 100644 index b051daad6d2a..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_item_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertModificationItem(Model): - """Alert modification item. - - :param modification_event: Reason for the modification. Possible values - include: 'AlertCreated', 'StateChange', 'MonitorConditionChange' - :type modification_event: str or - ~azure.mgmt.alertsmanagement.models.AlertModificationEvent - :param old_value: Old value - :type old_value: str - :param new_value: New value - :type new_value: str - :param modified_at: Modified date and time - :type modified_at: str - :param modified_by: Modified user details (Principal client name) - :type modified_by: str - :param comments: Modification comments - :type comments: str - :param description: Description of the modification - :type description: str - """ - - _attribute_map = { - 'modification_event': {'key': 'modificationEvent', 'type': 'AlertModificationEvent'}, - 'old_value': {'key': 'oldValue', 'type': 'str'}, - 'new_value': {'key': 'newValue', 'type': 'str'}, - 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, - 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, - 'comments': {'key': 'comments', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, modification_event=None, old_value: str=None, new_value: str=None, modified_at: str=None, modified_by: str=None, comments: str=None, description: str=None, **kwargs) -> None: - super(AlertModificationItem, self).__init__(**kwargs) - self.modification_event = modification_event - self.old_value = old_value - self.new_value = new_value - self.modified_at = modified_at - self.modified_by = modified_by - self.comments = comments - self.description = description diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties.py deleted file mode 100644 index c1d1b8123ecd..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertModificationProperties(Model): - """Properties of the alert modification item. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar alert_id: Unique Id of the alert for which the history is being - retrieved - :vartype alert_id: str - :param modifications: Modification details - :type modifications: - list[~azure.mgmt.alertsmanagement.models.AlertModificationItem] - """ - - _validation = { - 'alert_id': {'readonly': True}, - } - - _attribute_map = { - 'alert_id': {'key': 'alertId', 'type': 'str'}, - 'modifications': {'key': 'modifications', 'type': '[AlertModificationItem]'}, - } - - def __init__(self, **kwargs): - super(AlertModificationProperties, self).__init__(**kwargs) - self.alert_id = None - self.modifications = kwargs.get('modifications', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties_py3.py deleted file mode 100644 index 51e67637a07a..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_properties_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertModificationProperties(Model): - """Properties of the alert modification item. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar alert_id: Unique Id of the alert for which the history is being - retrieved - :vartype alert_id: str - :param modifications: Modification details - :type modifications: - list[~azure.mgmt.alertsmanagement.models.AlertModificationItem] - """ - - _validation = { - 'alert_id': {'readonly': True}, - } - - _attribute_map = { - 'alert_id': {'key': 'alertId', 'type': 'str'}, - 'modifications': {'key': 'modifications', 'type': '[AlertModificationItem]'}, - } - - def __init__(self, *, modifications=None, **kwargs) -> None: - super(AlertModificationProperties, self).__init__(**kwargs) - self.alert_id = None - self.modifications = modifications diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_py3.py deleted file mode 100644 index b7cae8114091..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_modification_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class AlertModification(Resource): - """Alert Modification details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: - ~azure.mgmt.alertsmanagement.models.AlertModificationProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertModificationProperties'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(AlertModification, self).__init__(**kwargs) - self.properties = properties diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_paged.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_paged.py deleted file mode 100644 index 2ae2c88ee2e1..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class AlertPaged(Paged): - """ - A paging container for iterating over a list of :class:`Alert ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Alert]'} - } - - def __init__(self, *args, **kwargs): - - super(AlertPaged, self).__init__(*args, **kwargs) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties.py deleted file mode 100644 index a8c7b761aba5..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertProperties(Model): - """Alert property bag. - - :param essentials: - :type essentials: ~azure.mgmt.alertsmanagement.models.Essentials - :param context: - :type context: object - :param egress_config: - :type egress_config: object - """ - - _attribute_map = { - 'essentials': {'key': 'essentials', 'type': 'Essentials'}, - 'context': {'key': 'context', 'type': 'object'}, - 'egress_config': {'key': 'egressConfig', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AlertProperties, self).__init__(**kwargs) - self.essentials = kwargs.get('essentials', None) - self.context = kwargs.get('context', None) - self.egress_config = kwargs.get('egress_config', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties_py3.py deleted file mode 100644 index a6c9cf43db24..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_properties_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertProperties(Model): - """Alert property bag. - - :param essentials: - :type essentials: ~azure.mgmt.alertsmanagement.models.Essentials - :param context: - :type context: object - :param egress_config: - :type egress_config: object - """ - - _attribute_map = { - 'essentials': {'key': 'essentials', 'type': 'Essentials'}, - 'context': {'key': 'context', 'type': 'object'}, - 'egress_config': {'key': 'egressConfig', 'type': 'object'}, - } - - def __init__(self, *, essentials=None, context=None, egress_config=None, **kwargs) -> None: - super(AlertProperties, self).__init__(**kwargs) - self.essentials = essentials - self.context = context - self.egress_config = egress_config diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_py3.py deleted file mode 100644 index 4068ed33b63a..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alert_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Alert(Resource): - """An alert created in alert management service. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: ~azure.mgmt.alertsmanagement.models.AlertProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertProperties'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(Alert, self).__init__(**kwargs) - self.properties = properties diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_management_client_enums.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_management_client_enums.py deleted file mode 100644 index f3295fc6ef88..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_management_client_enums.py +++ /dev/null @@ -1,122 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class Severity(str, Enum): - - sev0 = "Sev0" - sev1 = "Sev1" - sev2 = "Sev2" - sev3 = "Sev3" - sev4 = "Sev4" - - -class SignalType(str, Enum): - - metric = "Metric" - log = "Log" - unknown = "Unknown" - - -class AlertState(str, Enum): - - new = "New" - acknowledged = "Acknowledged" - closed = "Closed" - - -class MonitorCondition(str, Enum): - - fired = "Fired" - resolved = "Resolved" - - -class MonitorService(str, Enum): - - application_insights = "Application Insights" - activity_log_administrative = "ActivityLog Administrative" - activity_log_security = "ActivityLog Security" - activity_log_recommendation = "ActivityLog Recommendation" - activity_log_policy = "ActivityLog Policy" - activity_log_autoscale = "ActivityLog Autoscale" - log_analytics = "Log Analytics" - nagios = "Nagios" - platform = "Platform" - scom = "SCOM" - service_health = "ServiceHealth" - smart_detector = "SmartDetector" - vm_insights = "VM Insights" - zabbix = "Zabbix" - - -class AlertModificationEvent(str, Enum): - - alert_created = "AlertCreated" - state_change = "StateChange" - monitor_condition_change = "MonitorConditionChange" - - -class SmartGroupModificationEvent(str, Enum): - - smart_group_created = "SmartGroupCreated" - state_change = "StateChange" - alert_added = "AlertAdded" - alert_removed = "AlertRemoved" - - -class State(str, Enum): - - new = "New" - acknowledged = "Acknowledged" - closed = "Closed" - - -class TimeRange(str, Enum): - - oneh = "1h" - oned = "1d" - sevend = "7d" - three_zerod = "30d" - - -class AlertsSortByFields(str, Enum): - - name = "name" - severity = "severity" - alert_state = "alertState" - monitor_condition = "monitorCondition" - target_resource = "targetResource" - target_resource_name = "targetResourceName" - target_resource_group = "targetResourceGroup" - target_resource_type = "targetResourceType" - start_date_time = "startDateTime" - last_modified_date_time = "lastModifiedDateTime" - - -class AlertsSummaryGroupByFields(str, Enum): - - severity = "severity" - alert_state = "alertState" - monitor_condition = "monitorCondition" - monitor_service = "monitorService" - signal_type = "signalType" - alert_rule = "alertRule" - - -class SmartGroupsSortByFields(str, Enum): - - alerts_count = "alertsCount" - state = "state" - severity = "severity" - start_date_time = "startDateTime" - last_modified_date_time = "lastModifiedDateTime" diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary.py deleted file mode 100644 index 9521d5cb5d32..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class AlertsSummary(Resource): - """Summary of alerts based on the input filters and 'groupby' parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: ~azure.mgmt.alertsmanagement.models.AlertsSummaryGroup - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertsSummaryGroup'}, - } - - def __init__(self, **kwargs): - super(AlertsSummary, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group.py deleted file mode 100644 index 470f52f8efdf..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertsSummaryGroup(Model): - """Group the result set. - - :param total: Total count of the result set. - :type total: int - :param smart_groups_count: Total count of the smart groups. - :type smart_groups_count: int - :param groupedby: Name of the field aggregated - :type groupedby: str - :param values: List of the items - :type values: - list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] - """ - - _attribute_map = { - 'total': {'key': 'total', 'type': 'int'}, - 'smart_groups_count': {'key': 'smartGroupsCount', 'type': 'int'}, - 'groupedby': {'key': 'groupedby', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, - } - - def __init__(self, **kwargs): - super(AlertsSummaryGroup, self).__init__(**kwargs) - self.total = kwargs.get('total', None) - self.smart_groups_count = kwargs.get('smart_groups_count', None) - self.groupedby = kwargs.get('groupedby', None) - self.values = kwargs.get('values', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item.py deleted file mode 100644 index 232fd9f12e08..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertsSummaryGroupItem(Model): - """Alerts summary group item. - - :param name: Value of the aggregated field - :type name: str - :param count: Count of the aggregated field - :type count: int - :param groupedby: Name of the field aggregated - :type groupedby: str - :param values: List of the items - :type values: - list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - 'groupedby': {'key': 'groupedby', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, - } - - def __init__(self, **kwargs): - super(AlertsSummaryGroupItem, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.count = kwargs.get('count', None) - self.groupedby = kwargs.get('groupedby', None) - self.values = kwargs.get('values', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item_py3.py deleted file mode 100644 index f802c4f1eaa3..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertsSummaryGroupItem(Model): - """Alerts summary group item. - - :param name: Value of the aggregated field - :type name: str - :param count: Count of the aggregated field - :type count: int - :param groupedby: Name of the field aggregated - :type groupedby: str - :param values: List of the items - :type values: - list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - 'groupedby': {'key': 'groupedby', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, - } - - def __init__(self, *, name: str=None, count: int=None, groupedby: str=None, values=None, **kwargs) -> None: - super(AlertsSummaryGroupItem, self).__init__(**kwargs) - self.name = name - self.count = count - self.groupedby = groupedby - self.values = values diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_py3.py deleted file mode 100644 index b9d4c71d3403..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertsSummaryGroup(Model): - """Group the result set. - - :param total: Total count of the result set. - :type total: int - :param smart_groups_count: Total count of the smart groups. - :type smart_groups_count: int - :param groupedby: Name of the field aggregated - :type groupedby: str - :param values: List of the items - :type values: - list[~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupItem] - """ - - _attribute_map = { - 'total': {'key': 'total', 'type': 'int'}, - 'smart_groups_count': {'key': 'smartGroupsCount', 'type': 'int'}, - 'groupedby': {'key': 'groupedby', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[AlertsSummaryGroupItem]'}, - } - - def __init__(self, *, total: int=None, smart_groups_count: int=None, groupedby: str=None, values=None, **kwargs) -> None: - super(AlertsSummaryGroup, self).__init__(**kwargs) - self.total = total - self.smart_groups_count = smart_groups_count - self.groupedby = groupedby - self.values = values diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_py3.py deleted file mode 100644 index ed41ea6d10de..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class AlertsSummary(Resource): - """Summary of alerts based on the input filters and 'groupby' parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: ~azure.mgmt.alertsmanagement.models.AlertsSummaryGroup - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AlertsSummaryGroup'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(AlertsSummary, self).__init__(**kwargs) - self.properties = properties diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials.py deleted file mode 100644 index a333d42f1b82..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials.py +++ /dev/null @@ -1,138 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Essentials(Model): - """This object contains normalized fields across different monitor service and - also contains state related fields. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar severity: Severity of alert Sev0 being highest and Sev3 being - lowest. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' - :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity - :ivar signal_type: Log based alert or metric based alert. Possible values - include: 'Metric', 'Log', 'Unknown' - :vartype signal_type: str or - ~azure.mgmt.alertsmanagement.models.SignalType - :ivar alert_state: Alert object state, which is modified by the user. - Possible values include: 'New', 'Acknowledged', 'Closed' - :vartype alert_state: str or - ~azure.mgmt.alertsmanagement.models.AlertState - :ivar monitor_condition: Represents rule condition(Fired/Resolved) - maintained by monitor service depending on the state of the state. - Possible values include: 'Fired', 'Resolved' - :vartype monitor_condition: str or - ~azure.mgmt.alertsmanagement.models.MonitorCondition - :param target_resource: Target ARM resource, on which alert got created. - :type target_resource: str - :param target_resource_name: Name of the target ARM resource name, on - which alert got created. - :type target_resource_name: str - :param target_resource_group: Resource group of target ARM resource, on - which alert got created. - :type target_resource_group: str - :param target_resource_type: Resource type of target ARM resource, on - which alert got created. - :type target_resource_type: str - :ivar monitor_service: Monitor service on which the rule(monitor) is set. - Possible values include: 'Application Insights', 'ActivityLog - Administrative', 'ActivityLog Security', 'ActivityLog Recommendation', - 'ActivityLog Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', - 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', - 'Zabbix' - :vartype monitor_service: str or - ~azure.mgmt.alertsmanagement.models.MonitorService - :ivar alert_rule: Rule(monitor) which fired alert instance. Depending on - the monitor service, this would be ARM id or name of the rule. - :vartype alert_rule: str - :ivar source_created_id: Unique Id created by monitor service for each - alert instance. This could be used to track the issue at the monitor - service, in case of Nagios, Zabbix, SCOM etc. - :vartype source_created_id: str - :ivar smart_group_id: Unique Id of the smart group - :vartype smart_group_id: str - :ivar smart_grouping_reason: Verbose reason describing the reason why this - alert instance is added to a smart group - :vartype smart_grouping_reason: str - :ivar start_date_time: Creation time(ISO-8601 format) of alert instance. - :vartype start_date_time: datetime - :ivar last_modified_date_time: Last modification time(ISO-8601 format) of - alert instance. - :vartype last_modified_date_time: datetime - :ivar monitor_condition_resolved_date_time: Resolved time(ISO-8601 format) - of alert instance. This will be updated when monitor service resolves the - alert instance because of the rule condition is not met. - :vartype monitor_condition_resolved_date_time: datetime - :ivar last_modified_user_name: User who last modified the alert, in case - of monitor service updates user would be 'system', otherwise name of the - user. - :vartype last_modified_user_name: str - """ - - _validation = { - 'severity': {'readonly': True}, - 'signal_type': {'readonly': True}, - 'alert_state': {'readonly': True}, - 'monitor_condition': {'readonly': True}, - 'monitor_service': {'readonly': True}, - 'alert_rule': {'readonly': True}, - 'source_created_id': {'readonly': True}, - 'smart_group_id': {'readonly': True}, - 'smart_grouping_reason': {'readonly': True}, - 'start_date_time': {'readonly': True}, - 'last_modified_date_time': {'readonly': True}, - 'monitor_condition_resolved_date_time': {'readonly': True}, - 'last_modified_user_name': {'readonly': True}, - } - - _attribute_map = { - 'severity': {'key': 'severity', 'type': 'str'}, - 'signal_type': {'key': 'signalType', 'type': 'str'}, - 'alert_state': {'key': 'alertState', 'type': 'str'}, - 'monitor_condition': {'key': 'monitorCondition', 'type': 'str'}, - 'target_resource': {'key': 'targetResource', 'type': 'str'}, - 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, - 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, - 'target_resource_type': {'key': 'targetResourceType', 'type': 'str'}, - 'monitor_service': {'key': 'monitorService', 'type': 'str'}, - 'alert_rule': {'key': 'alertRule', 'type': 'str'}, - 'source_created_id': {'key': 'sourceCreatedId', 'type': 'str'}, - 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, - 'smart_grouping_reason': {'key': 'smartGroupingReason', 'type': 'str'}, - 'start_date_time': {'key': 'startDateTime', 'type': 'iso-8601'}, - 'last_modified_date_time': {'key': 'lastModifiedDateTime', 'type': 'iso-8601'}, - 'monitor_condition_resolved_date_time': {'key': 'monitorConditionResolvedDateTime', 'type': 'iso-8601'}, - 'last_modified_user_name': {'key': 'lastModifiedUserName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Essentials, self).__init__(**kwargs) - self.severity = None - self.signal_type = None - self.alert_state = None - self.monitor_condition = None - self.target_resource = kwargs.get('target_resource', None) - self.target_resource_name = kwargs.get('target_resource_name', None) - self.target_resource_group = kwargs.get('target_resource_group', None) - self.target_resource_type = kwargs.get('target_resource_type', None) - self.monitor_service = None - self.alert_rule = None - self.source_created_id = None - self.smart_group_id = None - self.smart_grouping_reason = None - self.start_date_time = None - self.last_modified_date_time = None - self.monitor_condition_resolved_date_time = None - self.last_modified_user_name = None diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials_py3.py deleted file mode 100644 index 01052b35702e..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/essentials_py3.py +++ /dev/null @@ -1,138 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Essentials(Model): - """This object contains normalized fields across different monitor service and - also contains state related fields. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar severity: Severity of alert Sev0 being highest and Sev3 being - lowest. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' - :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity - :ivar signal_type: Log based alert or metric based alert. Possible values - include: 'Metric', 'Log', 'Unknown' - :vartype signal_type: str or - ~azure.mgmt.alertsmanagement.models.SignalType - :ivar alert_state: Alert object state, which is modified by the user. - Possible values include: 'New', 'Acknowledged', 'Closed' - :vartype alert_state: str or - ~azure.mgmt.alertsmanagement.models.AlertState - :ivar monitor_condition: Represents rule condition(Fired/Resolved) - maintained by monitor service depending on the state of the state. - Possible values include: 'Fired', 'Resolved' - :vartype monitor_condition: str or - ~azure.mgmt.alertsmanagement.models.MonitorCondition - :param target_resource: Target ARM resource, on which alert got created. - :type target_resource: str - :param target_resource_name: Name of the target ARM resource name, on - which alert got created. - :type target_resource_name: str - :param target_resource_group: Resource group of target ARM resource, on - which alert got created. - :type target_resource_group: str - :param target_resource_type: Resource type of target ARM resource, on - which alert got created. - :type target_resource_type: str - :ivar monitor_service: Monitor service on which the rule(monitor) is set. - Possible values include: 'Application Insights', 'ActivityLog - Administrative', 'ActivityLog Security', 'ActivityLog Recommendation', - 'ActivityLog Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', - 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', - 'Zabbix' - :vartype monitor_service: str or - ~azure.mgmt.alertsmanagement.models.MonitorService - :ivar alert_rule: Rule(monitor) which fired alert instance. Depending on - the monitor service, this would be ARM id or name of the rule. - :vartype alert_rule: str - :ivar source_created_id: Unique Id created by monitor service for each - alert instance. This could be used to track the issue at the monitor - service, in case of Nagios, Zabbix, SCOM etc. - :vartype source_created_id: str - :ivar smart_group_id: Unique Id of the smart group - :vartype smart_group_id: str - :ivar smart_grouping_reason: Verbose reason describing the reason why this - alert instance is added to a smart group - :vartype smart_grouping_reason: str - :ivar start_date_time: Creation time(ISO-8601 format) of alert instance. - :vartype start_date_time: datetime - :ivar last_modified_date_time: Last modification time(ISO-8601 format) of - alert instance. - :vartype last_modified_date_time: datetime - :ivar monitor_condition_resolved_date_time: Resolved time(ISO-8601 format) - of alert instance. This will be updated when monitor service resolves the - alert instance because of the rule condition is not met. - :vartype monitor_condition_resolved_date_time: datetime - :ivar last_modified_user_name: User who last modified the alert, in case - of monitor service updates user would be 'system', otherwise name of the - user. - :vartype last_modified_user_name: str - """ - - _validation = { - 'severity': {'readonly': True}, - 'signal_type': {'readonly': True}, - 'alert_state': {'readonly': True}, - 'monitor_condition': {'readonly': True}, - 'monitor_service': {'readonly': True}, - 'alert_rule': {'readonly': True}, - 'source_created_id': {'readonly': True}, - 'smart_group_id': {'readonly': True}, - 'smart_grouping_reason': {'readonly': True}, - 'start_date_time': {'readonly': True}, - 'last_modified_date_time': {'readonly': True}, - 'monitor_condition_resolved_date_time': {'readonly': True}, - 'last_modified_user_name': {'readonly': True}, - } - - _attribute_map = { - 'severity': {'key': 'severity', 'type': 'str'}, - 'signal_type': {'key': 'signalType', 'type': 'str'}, - 'alert_state': {'key': 'alertState', 'type': 'str'}, - 'monitor_condition': {'key': 'monitorCondition', 'type': 'str'}, - 'target_resource': {'key': 'targetResource', 'type': 'str'}, - 'target_resource_name': {'key': 'targetResourceName', 'type': 'str'}, - 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, - 'target_resource_type': {'key': 'targetResourceType', 'type': 'str'}, - 'monitor_service': {'key': 'monitorService', 'type': 'str'}, - 'alert_rule': {'key': 'alertRule', 'type': 'str'}, - 'source_created_id': {'key': 'sourceCreatedId', 'type': 'str'}, - 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, - 'smart_grouping_reason': {'key': 'smartGroupingReason', 'type': 'str'}, - 'start_date_time': {'key': 'startDateTime', 'type': 'iso-8601'}, - 'last_modified_date_time': {'key': 'lastModifiedDateTime', 'type': 'iso-8601'}, - 'monitor_condition_resolved_date_time': {'key': 'monitorConditionResolvedDateTime', 'type': 'iso-8601'}, - 'last_modified_user_name': {'key': 'lastModifiedUserName', 'type': 'str'}, - } - - def __init__(self, *, target_resource: str=None, target_resource_name: str=None, target_resource_group: str=None, target_resource_type: str=None, **kwargs) -> None: - super(Essentials, self).__init__(**kwargs) - self.severity = None - self.signal_type = None - self.alert_state = None - self.monitor_condition = None - self.target_resource = target_resource - self.target_resource_name = target_resource_name - self.target_resource_group = target_resource_group - self.target_resource_type = target_resource_type - self.monitor_service = None - self.alert_rule = None - self.source_created_id = None - self.smart_group_id = None - self.smart_grouping_reason = None - self.start_date_time = None - self.last_modified_date_time = None - self.monitor_condition_resolved_date_time = None - self.last_modified_user_name = None diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation.py deleted file mode 100644 index 1b5fea4ff02a..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """Operation provided by provider. - - :param name: Name of the operation - :type name: str - :param display: Properties of the operation - :type display: ~azure.mgmt.alertsmanagement.models.OperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display.py deleted file mode 100644 index 89c4bdd6ccb6..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """Properties of the operation. - - :param provider: Provider name - :type provider: str - :param resource: Resource name - :type resource: str - :param operation: Operation name - :type operation: str - :param description: Description of the operation - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.resource = kwargs.get('resource', None) - self.operation = kwargs.get('operation', None) - self.description = kwargs.get('description', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display_py3.py deleted file mode 100644 index fa3740dfc655..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_display_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """Properties of the operation. - - :param provider: Provider name - :type provider: str - :param resource: Resource name - :type resource: str - :param operation: Operation name - :type operation: str - :param description: Description of the operation - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_paged.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_paged.py deleted file mode 100644 index 3794d02c84f1..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_py3.py deleted file mode 100644 index ee66b4cfa181..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/operation_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """Operation provided by provider. - - :param name: Name of the operation - :type name: str - :param display: Properties of the operation - :type display: ~azure.mgmt.alertsmanagement.models.OperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, *, name: str=None, display=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = name - self.display = display diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource.py deleted file mode 100644 index 7454d56b9033..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """An azure resource object. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.type = None - self.name = None diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource_py3.py deleted file mode 100644 index 83ff9951fb91..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/resource_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """An azure resource object. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.type = None - self.name = None diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group.py deleted file mode 100644 index b1754f67fb4c..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group.py +++ /dev/null @@ -1,118 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class SmartGroup(Resource): - """Set of related alerts grouped together smartly by AMS. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param alerts_count: Total number of alerts in smart group - :type alerts_count: int - :ivar smart_group_state: Smart group state. Possible values include: - 'New', 'Acknowledged', 'Closed' - :vartype smart_group_state: str or - ~azure.mgmt.alertsmanagement.models.State - :ivar severity: Severity of smart group is the highest(Sev0 >... > Sev4) - severity of all the alerts in the group. Possible values include: 'Sev0', - 'Sev1', 'Sev2', 'Sev3', 'Sev4' - :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity - :ivar start_date_time: Creation time of smart group. Date-Time in ISO-8601 - format. - :vartype start_date_time: datetime - :ivar last_modified_date_time: Last updated time of smart group. Date-Time - in ISO-8601 format. - :vartype last_modified_date_time: datetime - :ivar last_modified_user_name: Last modified by user name. - :vartype last_modified_user_name: str - :param resources: Summary of target resources in the smart group - :type resources: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param resource_types: Summary of target resource types in the smart group - :type resource_types: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param resource_groups: Summary of target resource groups in the smart - group - :type resource_groups: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param monitor_services: Summary of monitorServices in the smart group - :type monitor_services: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param monitor_conditions: Summary of monitorConditions in the smart group - :type monitor_conditions: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param alert_states: Summary of alertStates in the smart group - :type alert_states: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param alert_severities: Summary of alertSeverities in the smart group - :type alert_severities: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param next_link: The URI to fetch the next page of alerts. Call - ListNext() with this URI to fetch the next page alerts. - :type next_link: str - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - 'smart_group_state': {'readonly': True}, - 'severity': {'readonly': True}, - 'start_date_time': {'readonly': True}, - 'last_modified_date_time': {'readonly': True}, - 'last_modified_user_name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'alerts_count': {'key': 'properties.alertsCount', 'type': 'int'}, - 'smart_group_state': {'key': 'properties.smartGroupState', 'type': 'str'}, - 'severity': {'key': 'properties.severity', 'type': 'str'}, - 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, - 'last_modified_date_time': {'key': 'properties.lastModifiedDateTime', 'type': 'iso-8601'}, - 'last_modified_user_name': {'key': 'properties.lastModifiedUserName', 'type': 'str'}, - 'resources': {'key': 'properties.resources', 'type': '[SmartGroupAggregatedProperty]'}, - 'resource_types': {'key': 'properties.resourceTypes', 'type': '[SmartGroupAggregatedProperty]'}, - 'resource_groups': {'key': 'properties.resourceGroups', 'type': '[SmartGroupAggregatedProperty]'}, - 'monitor_services': {'key': 'properties.monitorServices', 'type': '[SmartGroupAggregatedProperty]'}, - 'monitor_conditions': {'key': 'properties.monitorConditions', 'type': '[SmartGroupAggregatedProperty]'}, - 'alert_states': {'key': 'properties.alertStates', 'type': '[SmartGroupAggregatedProperty]'}, - 'alert_severities': {'key': 'properties.alertSeverities', 'type': '[SmartGroupAggregatedProperty]'}, - 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SmartGroup, self).__init__(**kwargs) - self.alerts_count = kwargs.get('alerts_count', None) - self.smart_group_state = None - self.severity = None - self.start_date_time = None - self.last_modified_date_time = None - self.last_modified_user_name = None - self.resources = kwargs.get('resources', None) - self.resource_types = kwargs.get('resource_types', None) - self.resource_groups = kwargs.get('resource_groups', None) - self.monitor_services = kwargs.get('monitor_services', None) - self.monitor_conditions = kwargs.get('monitor_conditions', None) - self.alert_states = kwargs.get('alert_states', None) - self.alert_severities = kwargs.get('alert_severities', None) - self.next_link = kwargs.get('next_link', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property.py deleted file mode 100644 index 4681ff600eff..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupAggregatedProperty(Model): - """Aggregated property of each type. - - :param name: Name of the type. - :type name: str - :param count: Total number of items of type. - :type count: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(SmartGroupAggregatedProperty, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.count = kwargs.get('count', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property_py3.py deleted file mode 100644 index 5a6bfb2d896e..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_aggregated_property_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupAggregatedProperty(Model): - """Aggregated property of each type. - - :param name: Name of the type. - :type name: str - :param count: Total number of items of type. - :type count: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - } - - def __init__(self, *, name: str=None, count: int=None, **kwargs) -> None: - super(SmartGroupAggregatedProperty, self).__init__(**kwargs) - self.name = name - self.count = count diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification.py deleted file mode 100644 index b0c27ebc02c4..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class SmartGroupModification(Resource): - """Alert Modification details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: - ~azure.mgmt.alertsmanagement.models.SmartGroupModificationProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'SmartGroupModificationProperties'}, - } - - def __init__(self, **kwargs): - super(SmartGroupModification, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item.py deleted file mode 100644 index b87b7a06465d..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupModificationItem(Model): - """smartGroup modification item. - - :param modification_event: Reason for the modification. Possible values - include: 'SmartGroupCreated', 'StateChange', 'AlertAdded', 'AlertRemoved' - :type modification_event: str or - ~azure.mgmt.alertsmanagement.models.SmartGroupModificationEvent - :param old_value: Old value - :type old_value: str - :param new_value: New value - :type new_value: str - :param modified_at: Modified date and time - :type modified_at: str - :param modified_by: Modified user details (Principal client name) - :type modified_by: str - :param comments: Modification comments - :type comments: str - :param description: Description of the modification - :type description: str - """ - - _attribute_map = { - 'modification_event': {'key': 'modificationEvent', 'type': 'SmartGroupModificationEvent'}, - 'old_value': {'key': 'oldValue', 'type': 'str'}, - 'new_value': {'key': 'newValue', 'type': 'str'}, - 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, - 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, - 'comments': {'key': 'comments', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SmartGroupModificationItem, self).__init__(**kwargs) - self.modification_event = kwargs.get('modification_event', None) - self.old_value = kwargs.get('old_value', None) - self.new_value = kwargs.get('new_value', None) - self.modified_at = kwargs.get('modified_at', None) - self.modified_by = kwargs.get('modified_by', None) - self.comments = kwargs.get('comments', None) - self.description = kwargs.get('description', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item_py3.py deleted file mode 100644 index aa07075fb384..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_item_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupModificationItem(Model): - """smartGroup modification item. - - :param modification_event: Reason for the modification. Possible values - include: 'SmartGroupCreated', 'StateChange', 'AlertAdded', 'AlertRemoved' - :type modification_event: str or - ~azure.mgmt.alertsmanagement.models.SmartGroupModificationEvent - :param old_value: Old value - :type old_value: str - :param new_value: New value - :type new_value: str - :param modified_at: Modified date and time - :type modified_at: str - :param modified_by: Modified user details (Principal client name) - :type modified_by: str - :param comments: Modification comments - :type comments: str - :param description: Description of the modification - :type description: str - """ - - _attribute_map = { - 'modification_event': {'key': 'modificationEvent', 'type': 'SmartGroupModificationEvent'}, - 'old_value': {'key': 'oldValue', 'type': 'str'}, - 'new_value': {'key': 'newValue', 'type': 'str'}, - 'modified_at': {'key': 'modifiedAt', 'type': 'str'}, - 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, - 'comments': {'key': 'comments', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, modification_event=None, old_value: str=None, new_value: str=None, modified_at: str=None, modified_by: str=None, comments: str=None, description: str=None, **kwargs) -> None: - super(SmartGroupModificationItem, self).__init__(**kwargs) - self.modification_event = modification_event - self.old_value = old_value - self.new_value = new_value - self.modified_at = modified_at - self.modified_by = modified_by - self.comments = comments - self.description = description diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties.py deleted file mode 100644 index 5535552813b3..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupModificationProperties(Model): - """Properties of the smartGroup modification item. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar smart_group_id: Unique Id of the smartGroup for which the history is - being retrieved - :vartype smart_group_id: str - :param modifications: Modification details - :type modifications: - list[~azure.mgmt.alertsmanagement.models.SmartGroupModificationItem] - :param next_link: URL to fetch the next set of results. - :type next_link: str - """ - - _validation = { - 'smart_group_id': {'readonly': True}, - } - - _attribute_map = { - 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, - 'modifications': {'key': 'modifications', 'type': '[SmartGroupModificationItem]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SmartGroupModificationProperties, self).__init__(**kwargs) - self.smart_group_id = None - self.modifications = kwargs.get('modifications', None) - self.next_link = kwargs.get('next_link', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties_py3.py deleted file mode 100644 index 40d128112187..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_properties_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupModificationProperties(Model): - """Properties of the smartGroup modification item. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar smart_group_id: Unique Id of the smartGroup for which the history is - being retrieved - :vartype smart_group_id: str - :param modifications: Modification details - :type modifications: - list[~azure.mgmt.alertsmanagement.models.SmartGroupModificationItem] - :param next_link: URL to fetch the next set of results. - :type next_link: str - """ - - _validation = { - 'smart_group_id': {'readonly': True}, - } - - _attribute_map = { - 'smart_group_id': {'key': 'smartGroupId', 'type': 'str'}, - 'modifications': {'key': 'modifications', 'type': '[SmartGroupModificationItem]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, *, modifications=None, next_link: str=None, **kwargs) -> None: - super(SmartGroupModificationProperties, self).__init__(**kwargs) - self.smart_group_id = None - self.modifications = modifications - self.next_link = next_link diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_py3.py deleted file mode 100644 index b8cb946b706a..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_modification_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class SmartGroupModification(Resource): - """Alert Modification details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param properties: - :type properties: - ~azure.mgmt.alertsmanagement.models.SmartGroupModificationProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'SmartGroupModificationProperties'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(SmartGroupModification, self).__init__(**kwargs) - self.properties = properties diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_py3.py deleted file mode 100644 index a0c00f029485..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_group_py3.py +++ /dev/null @@ -1,118 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class SmartGroup(Resource): - """Set of related alerts grouped together smartly by AMS. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar type: Azure resource type - :vartype type: str - :ivar name: Azure resource name - :vartype name: str - :param alerts_count: Total number of alerts in smart group - :type alerts_count: int - :ivar smart_group_state: Smart group state. Possible values include: - 'New', 'Acknowledged', 'Closed' - :vartype smart_group_state: str or - ~azure.mgmt.alertsmanagement.models.State - :ivar severity: Severity of smart group is the highest(Sev0 >... > Sev4) - severity of all the alerts in the group. Possible values include: 'Sev0', - 'Sev1', 'Sev2', 'Sev3', 'Sev4' - :vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity - :ivar start_date_time: Creation time of smart group. Date-Time in ISO-8601 - format. - :vartype start_date_time: datetime - :ivar last_modified_date_time: Last updated time of smart group. Date-Time - in ISO-8601 format. - :vartype last_modified_date_time: datetime - :ivar last_modified_user_name: Last modified by user name. - :vartype last_modified_user_name: str - :param resources: Summary of target resources in the smart group - :type resources: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param resource_types: Summary of target resource types in the smart group - :type resource_types: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param resource_groups: Summary of target resource groups in the smart - group - :type resource_groups: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param monitor_services: Summary of monitorServices in the smart group - :type monitor_services: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param monitor_conditions: Summary of monitorConditions in the smart group - :type monitor_conditions: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param alert_states: Summary of alertStates in the smart group - :type alert_states: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param alert_severities: Summary of alertSeverities in the smart group - :type alert_severities: - list[~azure.mgmt.alertsmanagement.models.SmartGroupAggregatedProperty] - :param next_link: The URI to fetch the next page of alerts. Call - ListNext() with this URI to fetch the next page alerts. - :type next_link: str - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - 'smart_group_state': {'readonly': True}, - 'severity': {'readonly': True}, - 'start_date_time': {'readonly': True}, - 'last_modified_date_time': {'readonly': True}, - 'last_modified_user_name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'alerts_count': {'key': 'properties.alertsCount', 'type': 'int'}, - 'smart_group_state': {'key': 'properties.smartGroupState', 'type': 'str'}, - 'severity': {'key': 'properties.severity', 'type': 'str'}, - 'start_date_time': {'key': 'properties.startDateTime', 'type': 'iso-8601'}, - 'last_modified_date_time': {'key': 'properties.lastModifiedDateTime', 'type': 'iso-8601'}, - 'last_modified_user_name': {'key': 'properties.lastModifiedUserName', 'type': 'str'}, - 'resources': {'key': 'properties.resources', 'type': '[SmartGroupAggregatedProperty]'}, - 'resource_types': {'key': 'properties.resourceTypes', 'type': '[SmartGroupAggregatedProperty]'}, - 'resource_groups': {'key': 'properties.resourceGroups', 'type': '[SmartGroupAggregatedProperty]'}, - 'monitor_services': {'key': 'properties.monitorServices', 'type': '[SmartGroupAggregatedProperty]'}, - 'monitor_conditions': {'key': 'properties.monitorConditions', 'type': '[SmartGroupAggregatedProperty]'}, - 'alert_states': {'key': 'properties.alertStates', 'type': '[SmartGroupAggregatedProperty]'}, - 'alert_severities': {'key': 'properties.alertSeverities', 'type': '[SmartGroupAggregatedProperty]'}, - 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, - } - - def __init__(self, *, alerts_count: int=None, resources=None, resource_types=None, resource_groups=None, monitor_services=None, monitor_conditions=None, alert_states=None, alert_severities=None, next_link: str=None, **kwargs) -> None: - super(SmartGroup, self).__init__(**kwargs) - self.alerts_count = alerts_count - self.smart_group_state = None - self.severity = None - self.start_date_time = None - self.last_modified_date_time = None - self.last_modified_user_name = None - self.resources = resources - self.resource_types = resource_types - self.resource_groups = resource_groups - self.monitor_services = monitor_services - self.monitor_conditions = monitor_conditions - self.alert_states = alert_states - self.alert_severities = alert_severities - self.next_link = next_link diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list.py deleted file mode 100644 index 17302096edc5..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupsList(Model): - """List the alerts. - - :param next_link: URL to fetch the next set of alerts. - :type next_link: str - :param value: List of alerts - :type value: list[~azure.mgmt.alertsmanagement.models.SmartGroup] - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[SmartGroup]'}, - } - - def __init__(self, **kwargs): - super(SmartGroupsList, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list_py3.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list_py3.py deleted file mode 100644 index 538de5af7747..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/smart_groups_list_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SmartGroupsList(Model): - """List the alerts. - - :param next_link: URL to fetch the next set of alerts. - :type next_link: str - :param value: List of alerts - :type value: list[~azure.mgmt.alertsmanagement.models.SmartGroup] - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[SmartGroup]'}, - } - - def __init__(self, *, next_link: str=None, value=None, **kwargs) -> None: - super(SmartGroupsList, self).__init__(**kwargs) - self.next_link = next_link - self.value = value diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/__init__.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/__init__.py index 9341f4bfee3b..946b389ce5fb 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/__init__.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/__init__.py @@ -9,12 +9,16 @@ # regenerated. # -------------------------------------------------------------------------- -from .operations import Operations -from .alerts_operations import AlertsOperations -from .smart_groups_operations import SmartGroupsOperations +from ._operations import Operations +from ._alerts_operations import AlertsOperations +from ._smart_groups_operations import SmartGroupsOperations +from ._action_rules_operations import ActionRulesOperations +from ._smart_detector_alert_rules_operations import SmartDetectorAlertRulesOperations __all__ = [ 'Operations', 'AlertsOperations', 'SmartGroupsOperations', + 'ActionRulesOperations', + 'SmartDetectorAlertRulesOperations', ] diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_action_rules_operations.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_action_rules_operations.py new file mode 100644 index 000000000000..d07e0fd19b74 --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_action_rules_operations.py @@ -0,0 +1,575 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ActionRulesOperations(object): + """ActionRulesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: client API version. Constant value: "2019-05-05-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-05-05-preview" + + self.config = config + + def list_by_subscription( + self, target_resource_group=None, target_resource_type=None, target_resource=None, severity=None, monitor_service=None, impacted_scope=None, description=None, alert_rule_id=None, action_group=None, name=None, custom_headers=None, raw=False, **operation_config): + """Get all action rule in a given subscription. + + List all action rules of the subscription and given input filters. + + :param target_resource_group: Filter by target resource group name. + Default value is select all. + :type target_resource_group: str + :param target_resource_type: Filter by target resource type. Default + value is select all. + :type target_resource_type: str + :param target_resource: Filter by target resource( which is full ARM + ID) Default value is select all. + :type target_resource: str + :param severity: Filter by severity. Default value is select all. + Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param monitor_service: Filter by monitor service which generates the + alert instance. Default value is select all. Possible values include: + 'Application Insights', 'ActivityLog Administrative', 'ActivityLog + Security', 'ActivityLog Recommendation', 'ActivityLog Policy', + 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', 'Platform', + 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', 'Zabbix' + :type monitor_service: str or + ~azure.mgmt.alertsmanagement.models.MonitorService + :param impacted_scope: filter by impacted/target scope (provide comma + separated list for multiple scopes). The value should be an well + constructed ARM id of the scope. + :type impacted_scope: str + :param description: filter by alert rule description + :type description: str + :param alert_rule_id: filter by alert rule id + :type alert_rule_id: str + :param action_group: filter by action group configured as part of + action rule + :type action_group: str + :param name: filter by action rule name + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ActionRule + :rtype: + ~azure.mgmt.alertsmanagement.models.ActionRulePaged[~azure.mgmt.alertsmanagement.models.ActionRule] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if target_resource_group is not None: + query_parameters['targetResourceGroup'] = self._serialize.query("target_resource_group", target_resource_group, 'str') + if target_resource_type is not None: + query_parameters['targetResourceType'] = self._serialize.query("target_resource_type", target_resource_type, 'str') + if target_resource is not None: + query_parameters['targetResource'] = self._serialize.query("target_resource", target_resource, 'str') + if severity is not None: + query_parameters['severity'] = self._serialize.query("severity", severity, 'str') + if monitor_service is not None: + query_parameters['monitorService'] = self._serialize.query("monitor_service", monitor_service, 'str') + if impacted_scope is not None: + query_parameters['impactedScope'] = self._serialize.query("impacted_scope", impacted_scope, 'str') + if description is not None: + query_parameters['description'] = self._serialize.query("description", description, 'str') + if alert_rule_id is not None: + query_parameters['alertRuleId'] = self._serialize.query("alert_rule_id", alert_rule_id, 'str') + if action_group is not None: + query_parameters['actionGroup'] = self._serialize.query("action_group", action_group, 'str') + if name is not None: + query_parameters['name'] = self._serialize.query("name", name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ActionRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/actionRules'} + + def list_by_resource_group( + self, resource_group_name, target_resource_group=None, target_resource_type=None, target_resource=None, severity=None, monitor_service=None, impacted_scope=None, description=None, alert_rule_id=None, action_group=None, name=None, custom_headers=None, raw=False, **operation_config): + """Get all action rules created in a resource group. + + List all action rules of the subscription, created in given resource + group and given input filters. + + :param resource_group_name: Resource group name where the resource is + created. + :type resource_group_name: str + :param target_resource_group: Filter by target resource group name. + Default value is select all. + :type target_resource_group: str + :param target_resource_type: Filter by target resource type. Default + value is select all. + :type target_resource_type: str + :param target_resource: Filter by target resource( which is full ARM + ID) Default value is select all. + :type target_resource: str + :param severity: Filter by severity. Default value is select all. + Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param monitor_service: Filter by monitor service which generates the + alert instance. Default value is select all. Possible values include: + 'Application Insights', 'ActivityLog Administrative', 'ActivityLog + Security', 'ActivityLog Recommendation', 'ActivityLog Policy', + 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', 'Platform', + 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', 'Zabbix' + :type monitor_service: str or + ~azure.mgmt.alertsmanagement.models.MonitorService + :param impacted_scope: filter by impacted/target scope (provide comma + separated list for multiple scopes). The value should be an well + constructed ARM id of the scope. + :type impacted_scope: str + :param description: filter by alert rule description + :type description: str + :param alert_rule_id: filter by alert rule id + :type alert_rule_id: str + :param action_group: filter by action group configured as part of + action rule + :type action_group: str + :param name: filter by action rule name + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ActionRule + :rtype: + ~azure.mgmt.alertsmanagement.models.ActionRulePaged[~azure.mgmt.alertsmanagement.models.ActionRule] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if target_resource_group is not None: + query_parameters['targetResourceGroup'] = self._serialize.query("target_resource_group", target_resource_group, 'str') + if target_resource_type is not None: + query_parameters['targetResourceType'] = self._serialize.query("target_resource_type", target_resource_type, 'str') + if target_resource is not None: + query_parameters['targetResource'] = self._serialize.query("target_resource", target_resource, 'str') + if severity is not None: + query_parameters['severity'] = self._serialize.query("severity", severity, 'str') + if monitor_service is not None: + query_parameters['monitorService'] = self._serialize.query("monitor_service", monitor_service, 'str') + if impacted_scope is not None: + query_parameters['impactedScope'] = self._serialize.query("impacted_scope", impacted_scope, 'str') + if description is not None: + query_parameters['description'] = self._serialize.query("description", description, 'str') + if alert_rule_id is not None: + query_parameters['alertRuleId'] = self._serialize.query("alert_rule_id", alert_rule_id, 'str') + if action_group is not None: + query_parameters['actionGroup'] = self._serialize.query("action_group", action_group, 'str') + if name is not None: + query_parameters['name'] = self._serialize.query("name", name, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ActionRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules'} + + def get_by_name( + self, resource_group_name, action_rule_name, custom_headers=None, raw=False, **operation_config): + """Get action rule by name. + + Get a specific action rule. + + :param resource_group_name: Resource group name where the resource is + created. + :type resource_group_name: str + :param action_rule_name: The name of action rule that needs to be + fetched + :type action_rule_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ActionRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.ActionRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_by_name.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'actionRuleName': self._serialize.url("action_rule_name", action_rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ActionRule', response) + header_dict = { + 'x-ms-request-id': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get_by_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{actionRuleName}'} + + def create_update( + self, resource_group_name, action_rule_name, action_rule, custom_headers=None, raw=False, **operation_config): + """Create/update an action rule. + + Creates/Updates a specific action rule. + + :param resource_group_name: Resource group name where the resource is + created. + :type resource_group_name: str + :param action_rule_name: The name of action rule that needs to be + created/updated + :type action_rule_name: str + :param action_rule: action rule to be created/updated + :type action_rule: ~azure.mgmt.alertsmanagement.models.ActionRule + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ActionRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.ActionRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'actionRuleName': self._serialize.url("action_rule_name", action_rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(action_rule, 'ActionRule') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ActionRule', response) + header_dict = { + 'x-ms-request-id': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + create_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{actionRuleName}'} + + def delete( + self, resource_group_name, action_rule_name, custom_headers=None, raw=False, **operation_config): + """Delete action rule. + + Deletes a given action rule. + + :param resource_group_name: Resource group name where the resource is + created. + :type resource_group_name: str + :param action_rule_name: The name that needs to be deleted + :type action_rule_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: bool or ClientRawResponse if raw=true + :rtype: bool or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'actionRuleName': self._serialize.url("action_rule_name", action_rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('bool', response) + header_dict = { + 'x-ms-request-id': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{actionRuleName}'} + + def update( + self, resource_group_name, action_rule_name, status=None, tags=None, custom_headers=None, raw=False, **operation_config): + """Patch action rule. + + Update enabled flag and/or tags for the given action rule. + + :param resource_group_name: Resource group name where the resource is + created. + :type resource_group_name: str + :param action_rule_name: The name that needs to be updated + :type action_rule_name: str + :param status: Indicates if the given action rule is enabled or + disabled. Possible values include: 'Enabled', 'Disabled' + :type status: str or + ~azure.mgmt.alertsmanagement.models.ActionRuleStatus + :param tags: tags to be updated + :type tags: object + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ActionRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.ActionRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + action_rule_patch = models.PatchObject(status=status, tags=tags) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'actionRuleName': self._serialize.url("action_rule_name", action_rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(action_rule_patch, 'PatchObject') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ActionRule', response) + header_dict = { + 'x-ms-request-id': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{actionRuleName}'} diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_alerts_operations.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_alerts_operations.py new file mode 100644 index 000000000000..da6c76c07ff5 --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_alerts_operations.py @@ -0,0 +1,582 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class AlertsOperations(object): + """AlertsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: client API version. Constant value: "2019-05-05-preview". + :ivar identifier: Identification of the information to be retrieved by API call. Constant value: "MonitorServiceList". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-05-05-preview" + self.identifier = "MonitorServiceList" + + self.config = config + + def meta_data( + self, custom_headers=None, raw=False, **operation_config): + """List alerts meta data information based on value of identifier + parameter. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AlertsMetaData or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.AlertsMetaData or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.meta_data.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['identifier'] = self._serialize.query("self.identifier", self.identifier, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AlertsMetaData', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + meta_data.metadata = {'url': '/providers/Microsoft.AlertsManagement/alertsMetaData'} + + def get_all( + self, target_resource=None, target_resource_type=None, target_resource_group=None, monitor_service=None, monitor_condition=None, severity=None, alert_state=None, alert_rule=None, smart_group_id=None, include_context=None, include_egress_config=None, page_count=None, sort_by=None, sort_order=None, select=None, time_range=None, custom_time_range=None, custom_headers=None, raw=False, **operation_config): + """List all existing alerts, where the results can be filtered on the + basis of multiple parameters (e.g. time range). The results can then be + sorted on the basis specific fields, with the default being + lastModifiedDateTime. . + + :param target_resource: Filter by target resource( which is full ARM + ID) Default value is select all. + :type target_resource: str + :param target_resource_type: Filter by target resource type. Default + value is select all. + :type target_resource_type: str + :param target_resource_group: Filter by target resource group name. + Default value is select all. + :type target_resource_group: str + :param monitor_service: Filter by monitor service which generates the + alert instance. Default value is select all. Possible values include: + 'Application Insights', 'ActivityLog Administrative', 'ActivityLog + Security', 'ActivityLog Recommendation', 'ActivityLog Policy', + 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', 'Platform', + 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', 'Zabbix' + :type monitor_service: str or + ~azure.mgmt.alertsmanagement.models.MonitorService + :param monitor_condition: Filter by monitor condition which is either + 'Fired' or 'Resolved'. Default value is to select all. Possible values + include: 'Fired', 'Resolved' + :type monitor_condition: str or + ~azure.mgmt.alertsmanagement.models.MonitorCondition + :param severity: Filter by severity. Default value is select all. + Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param alert_state: Filter by state of the alert instance. Default + value is to select all. Possible values include: 'New', + 'Acknowledged', 'Closed' + :type alert_state: str or + ~azure.mgmt.alertsmanagement.models.AlertState + :param alert_rule: Filter by specific alert rule. Default value is to + select all. + :type alert_rule: str + :param smart_group_id: Filter the alerts list by the Smart Group Id. + Default value is none. + :type smart_group_id: str + :param include_context: Include context which has contextual data + specific to the monitor service. Default value is false' + :type include_context: bool + :param include_egress_config: Include egress config which would be + used for displaying the content in portal. Default value is 'false'. + :type include_egress_config: bool + :param page_count: Determines number of alerts returned per page in + response. Permissible value is between 1 to 250. When the + "includeContent" filter is selected, maximum value allowed is 25. + Default value is 25. + :type page_count: int + :param sort_by: Sort the query results by input field, Default value + is 'lastModifiedDateTime'. Possible values include: 'name', + 'severity', 'alertState', 'monitorCondition', 'targetResource', + 'targetResourceName', 'targetResourceGroup', 'targetResourceType', + 'startDateTime', 'lastModifiedDateTime' + :type sort_by: str or + ~azure.mgmt.alertsmanagement.models.AlertsSortByFields + :param sort_order: Sort the query results order in either ascending or + descending. Default value is 'desc' for time fields and 'asc' for + others. Possible values include: 'asc', 'desc' + :type sort_order: str + :param select: This filter allows to selection of the fields(comma + separated) which would be part of the essential section. This would + allow to project only the required fields rather than getting entire + content. Default is to fetch all the fields in the essentials + section. + :type select: str + :param time_range: Filter by time range by below listed values. + Default value is 1 day. Possible values include: '1h', '1d', '7d', + '30d' + :type time_range: str or ~azure.mgmt.alertsmanagement.models.TimeRange + :param custom_time_range: Filter by custom time range in the format + / where time is in (ISO-8601 format)'. + Permissible values is within 30 days from query time. Either + timeRange or customTimeRange could be used but not both. Default is + none. + :type custom_time_range: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Alert + :rtype: + ~azure.mgmt.alertsmanagement.models.AlertPaged[~azure.mgmt.alertsmanagement.models.Alert] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_all.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if target_resource is not None: + query_parameters['targetResource'] = self._serialize.query("target_resource", target_resource, 'str') + if target_resource_type is not None: + query_parameters['targetResourceType'] = self._serialize.query("target_resource_type", target_resource_type, 'str') + if target_resource_group is not None: + query_parameters['targetResourceGroup'] = self._serialize.query("target_resource_group", target_resource_group, 'str') + if monitor_service is not None: + query_parameters['monitorService'] = self._serialize.query("monitor_service", monitor_service, 'str') + if monitor_condition is not None: + query_parameters['monitorCondition'] = self._serialize.query("monitor_condition", monitor_condition, 'str') + if severity is not None: + query_parameters['severity'] = self._serialize.query("severity", severity, 'str') + if alert_state is not None: + query_parameters['alertState'] = self._serialize.query("alert_state", alert_state, 'str') + if alert_rule is not None: + query_parameters['alertRule'] = self._serialize.query("alert_rule", alert_rule, 'str') + if smart_group_id is not None: + query_parameters['smartGroupId'] = self._serialize.query("smart_group_id", smart_group_id, 'str') + if include_context is not None: + query_parameters['includeContext'] = self._serialize.query("include_context", include_context, 'bool') + if include_egress_config is not None: + query_parameters['includeEgressConfig'] = self._serialize.query("include_egress_config", include_egress_config, 'bool') + if page_count is not None: + query_parameters['pageCount'] = self._serialize.query("page_count", page_count, 'int') + if sort_by is not None: + query_parameters['sortBy'] = self._serialize.query("sort_by", sort_by, 'str') + if sort_order is not None: + query_parameters['sortOrder'] = self._serialize.query("sort_order", sort_order, 'str') + if select is not None: + query_parameters['select'] = self._serialize.query("select", select, 'str') + if time_range is not None: + query_parameters['timeRange'] = self._serialize.query("time_range", time_range, 'str') + if custom_time_range is not None: + query_parameters['customTimeRange'] = self._serialize.query("custom_time_range", custom_time_range, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts'} + + def get_by_id( + self, alert_id, custom_headers=None, raw=False, **operation_config): + """Get a specific alert. + + Get information related to a specific alert. + + :param alert_id: Unique ID of an alert instance. + :type alert_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Alert or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.Alert or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_by_id.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'alertId': self._serialize.url("alert_id", alert_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Alert', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_by_id.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts/{alertId}'} + + def change_state( + self, alert_id, new_state, custom_headers=None, raw=False, **operation_config): + """Change the state of an alert. + + :param alert_id: Unique ID of an alert instance. + :type alert_id: str + :param new_state: New state of the alert. Possible values include: + 'New', 'Acknowledged', 'Closed' + :type new_state: str or ~azure.mgmt.alertsmanagement.models.AlertState + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Alert or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.Alert or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.change_state.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'alertId': self._serialize.url("alert_id", alert_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['newState'] = self._serialize.query("new_state", new_state, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Alert', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + change_state.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts/{alertId}/changestate'} + + def get_history( + self, alert_id, custom_headers=None, raw=False, **operation_config): + """Get the history of an alert, which captures any monitor condition + changes (Fired/Resolved) and alert state changes + (New/Acknowledged/Closed). + + :param alert_id: Unique ID of an alert instance. + :type alert_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AlertModification or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.AlertModification or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_history.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'alertId': self._serialize.url("alert_id", alert_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AlertModification', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_history.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts/{alertId}/history'} + + def get_summary( + self, groupby, include_smart_groups_count=None, target_resource=None, target_resource_type=None, target_resource_group=None, monitor_service=None, monitor_condition=None, severity=None, alert_state=None, alert_rule=None, time_range=None, custom_time_range=None, custom_headers=None, raw=False, **operation_config): + """Get a summarized count of your alerts grouped by various parameters + (e.g. grouping by 'Severity' returns the count of alerts for each + severity). + + :param groupby: This parameter allows the result set to be grouped by + input fields (Maximum 2 comma separated fields supported). For + example, groupby=severity or groupby=severity,alertstate. Possible + values include: 'severity', 'alertState', 'monitorCondition', + 'monitorService', 'signalType', 'alertRule' + :type groupby: str or + ~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupByFields + :param include_smart_groups_count: Include count of the SmartGroups as + part of the summary. Default value is 'false'. + :type include_smart_groups_count: bool + :param target_resource: Filter by target resource( which is full ARM + ID) Default value is select all. + :type target_resource: str + :param target_resource_type: Filter by target resource type. Default + value is select all. + :type target_resource_type: str + :param target_resource_group: Filter by target resource group name. + Default value is select all. + :type target_resource_group: str + :param monitor_service: Filter by monitor service which generates the + alert instance. Default value is select all. Possible values include: + 'Application Insights', 'ActivityLog Administrative', 'ActivityLog + Security', 'ActivityLog Recommendation', 'ActivityLog Policy', + 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', 'Platform', + 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', 'Zabbix' + :type monitor_service: str or + ~azure.mgmt.alertsmanagement.models.MonitorService + :param monitor_condition: Filter by monitor condition which is either + 'Fired' or 'Resolved'. Default value is to select all. Possible values + include: 'Fired', 'Resolved' + :type monitor_condition: str or + ~azure.mgmt.alertsmanagement.models.MonitorCondition + :param severity: Filter by severity. Default value is select all. + Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param alert_state: Filter by state of the alert instance. Default + value is to select all. Possible values include: 'New', + 'Acknowledged', 'Closed' + :type alert_state: str or + ~azure.mgmt.alertsmanagement.models.AlertState + :param alert_rule: Filter by specific alert rule. Default value is to + select all. + :type alert_rule: str + :param time_range: Filter by time range by below listed values. + Default value is 1 day. Possible values include: '1h', '1d', '7d', + '30d' + :type time_range: str or ~azure.mgmt.alertsmanagement.models.TimeRange + :param custom_time_range: Filter by custom time range in the format + / where time is in (ISO-8601 format)'. + Permissible values is within 30 days from query time. Either + timeRange or customTimeRange could be used but not both. Default is + none. + :type custom_time_range: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AlertsSummary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.AlertsSummary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_summary.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['groupby'] = self._serialize.query("groupby", groupby, 'str') + if include_smart_groups_count is not None: + query_parameters['includeSmartGroupsCount'] = self._serialize.query("include_smart_groups_count", include_smart_groups_count, 'bool') + if target_resource is not None: + query_parameters['targetResource'] = self._serialize.query("target_resource", target_resource, 'str') + if target_resource_type is not None: + query_parameters['targetResourceType'] = self._serialize.query("target_resource_type", target_resource_type, 'str') + if target_resource_group is not None: + query_parameters['targetResourceGroup'] = self._serialize.query("target_resource_group", target_resource_group, 'str') + if monitor_service is not None: + query_parameters['monitorService'] = self._serialize.query("monitor_service", monitor_service, 'str') + if monitor_condition is not None: + query_parameters['monitorCondition'] = self._serialize.query("monitor_condition", monitor_condition, 'str') + if severity is not None: + query_parameters['severity'] = self._serialize.query("severity", severity, 'str') + if alert_state is not None: + query_parameters['alertState'] = self._serialize.query("alert_state", alert_state, 'str') + if alert_rule is not None: + query_parameters['alertRule'] = self._serialize.query("alert_rule", alert_rule, 'str') + if time_range is not None: + query_parameters['timeRange'] = self._serialize.query("time_range", time_range, 'str') + if custom_time_range is not None: + query_parameters['customTimeRange'] = self._serialize.query("custom_time_range", custom_time_range, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AlertsSummary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_summary.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alertsSummary'} diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_operations.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_operations.py new file mode 100644 index 000000000000..057900f678f2 --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_operations.py @@ -0,0 +1,103 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class Operations(object): + """Operations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: client API version. Constant value: "2019-05-05-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-05-05-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """List all operations available through Azure Alerts Management Resource + Provider. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Operation + :rtype: + ~azure.mgmt.alertsmanagement.models.OperationPaged[~azure.mgmt.alertsmanagement.models.Operation] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.AlertsManagement/operations'} diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_detector_alert_rules_operations.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_detector_alert_rules_operations.py new file mode 100644 index 000000000000..8119e32986ff --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_detector_alert_rules_operations.py @@ -0,0 +1,436 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class SmartDetectorAlertRulesOperations(object): + """SmartDetectorAlertRulesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2019-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-06-01" + + self.config = config + + def list( + self, expand_detector=None, custom_headers=None, raw=False, **operation_config): + """List all the existing Smart Detector alert rules within the + subscription. + + :param expand_detector: Indicates if Smart Detector should be + expanded. + :type expand_detector: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AlertRule + :rtype: + ~azure.mgmt.alertsmanagement.models.AlertRulePaged[~azure.mgmt.alertsmanagement.models.AlertRule] + :raises: + :class:`ErrorResponse1Exception` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if expand_detector is not None: + query_parameters['expandDetector'] = self._serialize.query("expand_detector", expand_detector, 'bool') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponse1Exception(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AlertRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.alertsManagement/smartDetectorAlertRules'} + + def list_by_resource_group( + self, resource_group_name, expand_detector=None, custom_headers=None, raw=False, **operation_config): + """List all the existing Smart Detector alert rules within the + subscription and resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param expand_detector: Indicates if Smart Detector should be + expanded. + :type expand_detector: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AlertRule + :rtype: + ~azure.mgmt.alertsmanagement.models.AlertRulePaged[~azure.mgmt.alertsmanagement.models.AlertRule] + :raises: + :class:`ErrorResponse1Exception` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if expand_detector is not None: + query_parameters['expandDetector'] = self._serialize.query("expand_detector", expand_detector, 'bool') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponse1Exception(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AlertRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.alertsManagement/smartDetectorAlertRules'} + + def get( + self, resource_group_name, alert_rule_name, expand_detector=None, custom_headers=None, raw=False, **operation_config): + """Get a specific Smart Detector alert rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param alert_rule_name: The name of the alert rule. + :type alert_rule_name: str + :param expand_detector: Indicates if Smart Detector should be + expanded. + :type expand_detector: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AlertRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.AlertRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponse1Exception` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'alertRuleName': self._serialize.url("alert_rule_name", alert_rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if expand_detector is not None: + query_parameters['expandDetector'] = self._serialize.query("expand_detector", expand_detector, 'bool') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponse1Exception(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AlertRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.alertsManagement/smartDetectorAlertRules/{alertRuleName}'} + + def create_or_update( + self, resource_group_name, alert_rule_name, parameters, custom_headers=None, raw=False, **operation_config): + """Create or update a Smart Detector alert rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param alert_rule_name: The name of the alert rule. + :type alert_rule_name: str + :param parameters: Parameters supplied to the operation. + :type parameters: ~azure.mgmt.alertsmanagement.models.AlertRule + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AlertRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.AlertRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponse1Exception` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'alertRuleName': self._serialize.url("alert_rule_name", alert_rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'AlertRule') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponse1Exception(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AlertRule', response) + if response.status_code == 201: + deserialized = self._deserialize('AlertRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.alertsManagement/smartDetectorAlertRules/{alertRuleName}'} + + def patch( + self, resource_group_name, alert_rule_name, parameters, custom_headers=None, raw=False, **operation_config): + """Patch a specific Smart Detector alert rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param alert_rule_name: The name of the alert rule. + :type alert_rule_name: str + :param parameters: Parameters supplied to the operation. + :type parameters: + ~azure.mgmt.alertsmanagement.models.AlertRulePatchObject + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AlertRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.AlertRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponse1Exception` + """ + # Construct URL + url = self.patch.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'alertRuleName': self._serialize.url("alert_rule_name", alert_rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'AlertRulePatchObject') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponse1Exception(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AlertRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + patch.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.alertsManagement/smartDetectorAlertRules/{alertRuleName}'} + + def delete( + self, resource_group_name, alert_rule_name, custom_headers=None, raw=False, **operation_config): + """Delete an existing Smart Detector alert rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param alert_rule_name: The name of the alert rule. + :type alert_rule_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponse1Exception` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'alertRuleName': self._serialize.url("alert_rule_name", alert_rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponse1Exception(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.alertsManagement/smartDetectorAlertRules/{alertRuleName}'} diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_groups_operations.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_groups_operations.py new file mode 100644 index 000000000000..c797322bad46 --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/_smart_groups_operations.py @@ -0,0 +1,365 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class SmartGroupsOperations(object): + """SmartGroupsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: client API version. Constant value: "2019-05-05-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-05-05-preview" + + self.config = config + + def get_all( + self, target_resource=None, target_resource_group=None, target_resource_type=None, monitor_service=None, monitor_condition=None, severity=None, smart_group_state=None, time_range=None, page_count=None, sort_by=None, sort_order=None, custom_headers=None, raw=False, **operation_config): + """Get all Smart Groups within a specified subscription. + + List all the Smart Groups within a specified subscription. . + + :param target_resource: Filter by target resource( which is full ARM + ID) Default value is select all. + :type target_resource: str + :param target_resource_group: Filter by target resource group name. + Default value is select all. + :type target_resource_group: str + :param target_resource_type: Filter by target resource type. Default + value is select all. + :type target_resource_type: str + :param monitor_service: Filter by monitor service which generates the + alert instance. Default value is select all. Possible values include: + 'Application Insights', 'ActivityLog Administrative', 'ActivityLog + Security', 'ActivityLog Recommendation', 'ActivityLog Policy', + 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', 'Platform', + 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', 'Zabbix' + :type monitor_service: str or + ~azure.mgmt.alertsmanagement.models.MonitorService + :param monitor_condition: Filter by monitor condition which is either + 'Fired' or 'Resolved'. Default value is to select all. Possible values + include: 'Fired', 'Resolved' + :type monitor_condition: str or + ~azure.mgmt.alertsmanagement.models.MonitorCondition + :param severity: Filter by severity. Default value is select all. + Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' + :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity + :param smart_group_state: Filter by state of the smart group. Default + value is to select all. Possible values include: 'New', + 'Acknowledged', 'Closed' + :type smart_group_state: str or + ~azure.mgmt.alertsmanagement.models.AlertState + :param time_range: Filter by time range by below listed values. + Default value is 1 day. Possible values include: '1h', '1d', '7d', + '30d' + :type time_range: str or ~azure.mgmt.alertsmanagement.models.TimeRange + :param page_count: Determines number of alerts returned per page in + response. Permissible value is between 1 to 250. When the + "includeContent" filter is selected, maximum value allowed is 25. + Default value is 25. + :type page_count: int + :param sort_by: Sort the query results by input field. Default value + is sort by 'lastModifiedDateTime'. Possible values include: + 'alertsCount', 'state', 'severity', 'startDateTime', + 'lastModifiedDateTime' + :type sort_by: str or + ~azure.mgmt.alertsmanagement.models.SmartGroupsSortByFields + :param sort_order: Sort the query results order in either ascending or + descending. Default value is 'desc' for time fields and 'asc' for + others. Possible values include: 'asc', 'desc' + :type sort_order: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SmartGroup + :rtype: + ~azure.mgmt.alertsmanagement.models.SmartGroupPaged[~azure.mgmt.alertsmanagement.models.SmartGroup] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_all.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if target_resource is not None: + query_parameters['targetResource'] = self._serialize.query("target_resource", target_resource, 'str') + if target_resource_group is not None: + query_parameters['targetResourceGroup'] = self._serialize.query("target_resource_group", target_resource_group, 'str') + if target_resource_type is not None: + query_parameters['targetResourceType'] = self._serialize.query("target_resource_type", target_resource_type, 'str') + if monitor_service is not None: + query_parameters['monitorService'] = self._serialize.query("monitor_service", monitor_service, 'str') + if monitor_condition is not None: + query_parameters['monitorCondition'] = self._serialize.query("monitor_condition", monitor_condition, 'str') + if severity is not None: + query_parameters['severity'] = self._serialize.query("severity", severity, 'str') + if smart_group_state is not None: + query_parameters['smartGroupState'] = self._serialize.query("smart_group_state", smart_group_state, 'str') + if time_range is not None: + query_parameters['timeRange'] = self._serialize.query("time_range", time_range, 'str') + if page_count is not None: + query_parameters['pageCount'] = self._serialize.query("page_count", page_count, 'int') + if sort_by is not None: + query_parameters['sortBy'] = self._serialize.query("sort_by", sort_by, 'str') + if sort_order is not None: + query_parameters['sortOrder'] = self._serialize.query("sort_order", sort_order, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SmartGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups'} + + def get_by_id( + self, smart_group_id, custom_headers=None, raw=False, **operation_config): + """Get information related to a specific Smart Group. + + Get information related to a specific Smart Group. + + :param smart_group_id: Smart group unique id. + :type smart_group_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SmartGroup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.SmartGroup or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_by_id.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'smartGroupId': self._serialize.url("smart_group_id", smart_group_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SmartGroup', response) + header_dict = { + 'x-ms-request-id': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get_by_id.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups/{smartGroupId}'} + + def change_state( + self, smart_group_id, new_state, custom_headers=None, raw=False, **operation_config): + """Change the state of a Smart Group. + + :param smart_group_id: Smart group unique id. + :type smart_group_id: str + :param new_state: New state of the alert. Possible values include: + 'New', 'Acknowledged', 'Closed' + :type new_state: str or ~azure.mgmt.alertsmanagement.models.AlertState + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SmartGroup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.SmartGroup or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.change_state.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'smartGroupId': self._serialize.url("smart_group_id", smart_group_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['newState'] = self._serialize.query("new_state", new_state, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SmartGroup', response) + header_dict = { + 'x-ms-request-id': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + change_state.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups/{smartGroupId}/changeState'} + + def get_history( + self, smart_group_id, custom_headers=None, raw=False, **operation_config): + """Get the history a smart group, which captures any Smart Group state + changes (New/Acknowledged/Closed) . + + :param smart_group_id: Smart group unique id. + :type smart_group_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SmartGroupModification or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.alertsmanagement.models.SmartGroupModification or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_history.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'smartGroupId': self._serialize.url("smart_group_id", smart_group_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SmartGroupModification', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_history.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups/{smartGroupId}/history'} diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/alerts_operations.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/alerts_operations.py deleted file mode 100644 index fd15f46bc817..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/alerts_operations.py +++ /dev/null @@ -1,522 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class AlertsOperations(object): - """AlertsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API version. Constant value: "2018-05-05". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-05-05" - - self.config = config - - def get_all( - self, target_resource=None, target_resource_type=None, target_resource_group=None, monitor_service=None, monitor_condition=None, severity=None, alert_state=None, alert_rule=None, smart_group_id=None, include_context=None, include_egress_config=None, page_count=None, sort_by=None, sort_order=None, select=None, time_range=None, custom_time_range=None, custom_headers=None, raw=False, **operation_config): - """List all the existing alerts, where the results can be selective by - passing multiple filter parameters including time range and sorted on - specific fields. . - - :param target_resource: Filter by target resource( which is full ARM - ID) Default value is select all. - :type target_resource: str - :param target_resource_type: Filter by target resource type. Default - value is select all. - :type target_resource_type: str - :param target_resource_group: Filter by target resource group name. - Default value is select all. - :type target_resource_group: str - :param monitor_service: Filter by monitor service which is the source - of the alert instance. Default value is select all. Possible values - include: 'Application Insights', 'ActivityLog Administrative', - 'ActivityLog Security', 'ActivityLog Recommendation', 'ActivityLog - Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', - 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', - 'Zabbix' - :type monitor_service: str or - ~azure.mgmt.alertsmanagement.models.MonitorService - :param monitor_condition: Filter by monitor condition which is the - state of the monitor(alertRule) at monitor service. Default value is - to select all. Possible values include: 'Fired', 'Resolved' - :type monitor_condition: str or - ~azure.mgmt.alertsmanagement.models.MonitorCondition - :param severity: Filter by severity. Defaut value is select all. - Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' - :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity - :param alert_state: Filter by state of the alert instance. Default - value is to select all. Possible values include: 'New', - 'Acknowledged', 'Closed' - :type alert_state: str or - ~azure.mgmt.alertsmanagement.models.AlertState - :param alert_rule: Filter by alert rule(monitor) which fired alert - instance. Default value is to select all. - :type alert_rule: str - :param smart_group_id: Filter the alerts list by the Smart Group Id. - Default value is none. - :type smart_group_id: str - :param include_context: Include context which has data contextual to - the monitor service. Default value is false' - :type include_context: bool - :param include_egress_config: Include egress config which would be - used for displaying the content in portal. Default value is 'false'. - :type include_egress_config: bool - :param page_count: Determines number of alerts returned per page in - response. Permissible value is between 1 to 250. When the - "includeContent" filter is selected, maximum value allowed is 25. - Default value is 25. - :type page_count: int - :param sort_by: Sort the query results by input field, Default value - is 'lastModifiedDateTime'. Possible values include: 'name', - 'severity', 'alertState', 'monitorCondition', 'targetResource', - 'targetResourceName', 'targetResourceGroup', 'targetResourceType', - 'startDateTime', 'lastModifiedDateTime' - :type sort_by: str or - ~azure.mgmt.alertsmanagement.models.AlertsSortByFields - :param sort_order: Sort the query results order in either ascending or - descending. Default value is 'desc' for time fields and 'asc' for - others. Possible values include: 'asc', 'desc' - :type sort_order: str - :param select: This filter allows to selection of the fields(comma - seperated) which would be part of the the essential section. This - would allow to project only the required fields rather than getting - entire content. Default is to fetch all the fields in the essentials - section. - :type select: str - :param time_range: Filter by time range by below listed values. - Default value is 1 day. Possible values include: '1h', '1d', '7d', - '30d' - :type time_range: str or ~azure.mgmt.alertsmanagement.models.TimeRange - :param custom_time_range: Filter by custom time range in the format - / where time is in (ISO-8601 format)'. - Permissible values is within 30 days from query time. Either - timeRange or customTimeRange could be used but not both. Default is - none. - :type custom_time_range: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Alert - :rtype: - ~azure.mgmt.alertsmanagement.models.AlertPaged[~azure.mgmt.alertsmanagement.models.Alert] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.get_all.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if target_resource is not None: - query_parameters['targetResource'] = self._serialize.query("target_resource", target_resource, 'str') - if target_resource_type is not None: - query_parameters['targetResourceType'] = self._serialize.query("target_resource_type", target_resource_type, 'str') - if target_resource_group is not None: - query_parameters['targetResourceGroup'] = self._serialize.query("target_resource_group", target_resource_group, 'str') - if monitor_service is not None: - query_parameters['monitorService'] = self._serialize.query("monitor_service", monitor_service, 'str') - if monitor_condition is not None: - query_parameters['monitorCondition'] = self._serialize.query("monitor_condition", monitor_condition, 'str') - if severity is not None: - query_parameters['severity'] = self._serialize.query("severity", severity, 'str') - if alert_state is not None: - query_parameters['alertState'] = self._serialize.query("alert_state", alert_state, 'str') - if alert_rule is not None: - query_parameters['alertRule'] = self._serialize.query("alert_rule", alert_rule, 'str') - if smart_group_id is not None: - query_parameters['smartGroupId'] = self._serialize.query("smart_group_id", smart_group_id, 'str') - if include_context is not None: - query_parameters['includeContext'] = self._serialize.query("include_context", include_context, 'bool') - if include_egress_config is not None: - query_parameters['includeEgressConfig'] = self._serialize.query("include_egress_config", include_egress_config, 'bool') - if page_count is not None: - query_parameters['pageCount'] = self._serialize.query("page_count", page_count, 'int') - if sort_by is not None: - query_parameters['sortBy'] = self._serialize.query("sort_by", sort_by, 'str') - if sort_order is not None: - query_parameters['sortOrder'] = self._serialize.query("sort_order", sort_order, 'str') - if select is not None: - query_parameters['select'] = self._serialize.query("select", select, 'str') - if time_range is not None: - query_parameters['timeRange'] = self._serialize.query("time_range", time_range, 'str') - if custom_time_range is not None: - query_parameters['customTimeRange'] = self._serialize.query("custom_time_range", custom_time_range, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - get_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts'} - - def get_by_id( - self, alert_id, custom_headers=None, raw=False, **operation_config): - """Get a specific alert. - - Get information related to a specific alert. - - :param alert_id: Unique ID of an alert instance. - :type alert_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Alert or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.alertsmanagement.models.Alert or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_by_id.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'alertId': self._serialize.url("alert_id", alert_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Alert', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_by_id.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts/{alertId}'} - - def change_state( - self, alert_id, new_state, custom_headers=None, raw=False, **operation_config): - """Change the state of the alert. - - :param alert_id: Unique ID of an alert instance. - :type alert_id: str - :param new_state: New state of the alert. Possible values include: - 'New', 'Acknowledged', 'Closed' - :type new_state: str or ~azure.mgmt.alertsmanagement.models.AlertState - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Alert or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.alertsmanagement.models.Alert or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.change_state.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'alertId': self._serialize.url("alert_id", alert_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - query_parameters['newState'] = self._serialize.query("new_state", new_state, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Alert', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - change_state.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts/{alertId}/changestate'} - - def get_history( - self, alert_id, custom_headers=None, raw=False, **operation_config): - """Get the history of the changes of an alert. - - :param alert_id: Unique ID of an alert instance. - :type alert_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AlertModification or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.alertsmanagement.models.AlertModification or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_history.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'alertId': self._serialize.url("alert_id", alert_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AlertModification', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_history.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts/{alertId}/history'} - - def get_summary( - self, groupby, include_smart_groups_count=None, target_resource=None, target_resource_type=None, target_resource_group=None, monitor_service=None, monitor_condition=None, severity=None, alert_state=None, alert_rule=None, time_range=None, custom_time_range=None, custom_headers=None, raw=False, **operation_config): - """Summary of alerts with the count each severity. - - :param groupby: This parameter allows the result set to be aggregated - by input fields. For example, groupby=severity,alertstate. Possible - values include: 'severity', 'alertState', 'monitorCondition', - 'monitorService', 'signalType', 'alertRule' - :type groupby: str or - ~azure.mgmt.alertsmanagement.models.AlertsSummaryGroupByFields - :param include_smart_groups_count: Include count of the SmartGroups as - part of the summary. Default value is 'false'. - :type include_smart_groups_count: bool - :param target_resource: Filter by target resource( which is full ARM - ID) Default value is select all. - :type target_resource: str - :param target_resource_type: Filter by target resource type. Default - value is select all. - :type target_resource_type: str - :param target_resource_group: Filter by target resource group name. - Default value is select all. - :type target_resource_group: str - :param monitor_service: Filter by monitor service which is the source - of the alert instance. Default value is select all. Possible values - include: 'Application Insights', 'ActivityLog Administrative', - 'ActivityLog Security', 'ActivityLog Recommendation', 'ActivityLog - Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', - 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', - 'Zabbix' - :type monitor_service: str or - ~azure.mgmt.alertsmanagement.models.MonitorService - :param monitor_condition: Filter by monitor condition which is the - state of the monitor(alertRule) at monitor service. Default value is - to select all. Possible values include: 'Fired', 'Resolved' - :type monitor_condition: str or - ~azure.mgmt.alertsmanagement.models.MonitorCondition - :param severity: Filter by severity. Defaut value is select all. - Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' - :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity - :param alert_state: Filter by state of the alert instance. Default - value is to select all. Possible values include: 'New', - 'Acknowledged', 'Closed' - :type alert_state: str or - ~azure.mgmt.alertsmanagement.models.AlertState - :param alert_rule: Filter by alert rule(monitor) which fired alert - instance. Default value is to select all. - :type alert_rule: str - :param time_range: Filter by time range by below listed values. - Default value is 1 day. Possible values include: '1h', '1d', '7d', - '30d' - :type time_range: str or ~azure.mgmt.alertsmanagement.models.TimeRange - :param custom_time_range: Filter by custom time range in the format - / where time is in (ISO-8601 format)'. - Permissible values is within 30 days from query time. Either - timeRange or customTimeRange could be used but not both. Default is - none. - :type custom_time_range: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AlertsSummary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.alertsmanagement.models.AlertsSummary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_summary.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['groupby'] = self._serialize.query("groupby", groupby, 'str') - if include_smart_groups_count is not None: - query_parameters['includeSmartGroupsCount'] = self._serialize.query("include_smart_groups_count", include_smart_groups_count, 'bool') - if target_resource is not None: - query_parameters['targetResource'] = self._serialize.query("target_resource", target_resource, 'str') - if target_resource_type is not None: - query_parameters['targetResourceType'] = self._serialize.query("target_resource_type", target_resource_type, 'str') - if target_resource_group is not None: - query_parameters['targetResourceGroup'] = self._serialize.query("target_resource_group", target_resource_group, 'str') - if monitor_service is not None: - query_parameters['monitorService'] = self._serialize.query("monitor_service", monitor_service, 'str') - if monitor_condition is not None: - query_parameters['monitorCondition'] = self._serialize.query("monitor_condition", monitor_condition, 'str') - if severity is not None: - query_parameters['severity'] = self._serialize.query("severity", severity, 'str') - if alert_state is not None: - query_parameters['alertState'] = self._serialize.query("alert_state", alert_state, 'str') - if alert_rule is not None: - query_parameters['alertRule'] = self._serialize.query("alert_rule", alert_rule, 'str') - if time_range is not None: - query_parameters['timeRange'] = self._serialize.query("time_range", time_range, 'str') - if custom_time_range is not None: - query_parameters['customTimeRange'] = self._serialize.query("custom_time_range", custom_time_range, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AlertsSummary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_summary.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alertsSummary'} diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/operations.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/operations.py deleted file mode 100644 index 9718bb4566f6..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/operations.py +++ /dev/null @@ -1,99 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API version. Constant value: "2018-05-05". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-05-05" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """List all operations available through Azure Alerts Management Resource - Provider. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Operation - :rtype: - ~azure.mgmt.alertsmanagement.models.OperationPaged[~azure.mgmt.alertsmanagement.models.Operation] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/providers/Microsoft.AlertsManagement/operations'} diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/smart_groups_operations.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/smart_groups_operations.py deleted file mode 100644 index 8ff2c33ae120..000000000000 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/operations/smart_groups_operations.py +++ /dev/null @@ -1,357 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class SmartGroupsOperations(object): - """SmartGroupsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API version. Constant value: "2018-05-05". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-05-05" - - self.config = config - - def get_all( - self, target_resource=None, target_resource_group=None, target_resource_type=None, monitor_service=None, monitor_condition=None, severity=None, smart_group_state=None, time_range=None, page_count=None, sort_by=None, sort_order=None, custom_headers=None, raw=False, **operation_config): - """Get all smartGroups within the subscription. - - List all the smartGroups within the specified subscription. . - - :param target_resource: Filter by target resource( which is full ARM - ID) Default value is select all. - :type target_resource: str - :param target_resource_group: Filter by target resource group name. - Default value is select all. - :type target_resource_group: str - :param target_resource_type: Filter by target resource type. Default - value is select all. - :type target_resource_type: str - :param monitor_service: Filter by monitor service which is the source - of the alert instance. Default value is select all. Possible values - include: 'Application Insights', 'ActivityLog Administrative', - 'ActivityLog Security', 'ActivityLog Recommendation', 'ActivityLog - Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', - 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', - 'Zabbix' - :type monitor_service: str or - ~azure.mgmt.alertsmanagement.models.MonitorService - :param monitor_condition: Filter by monitor condition which is the - state of the monitor(alertRule) at monitor service. Default value is - to select all. Possible values include: 'Fired', 'Resolved' - :type monitor_condition: str or - ~azure.mgmt.alertsmanagement.models.MonitorCondition - :param severity: Filter by severity. Defaut value is select all. - Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4' - :type severity: str or ~azure.mgmt.alertsmanagement.models.Severity - :param smart_group_state: Filter by state of the smart group. Default - value is to select all. Possible values include: 'New', - 'Acknowledged', 'Closed' - :type smart_group_state: str or - ~azure.mgmt.alertsmanagement.models.AlertState - :param time_range: Filter by time range by below listed values. - Default value is 1 day. Possible values include: '1h', '1d', '7d', - '30d' - :type time_range: str or ~azure.mgmt.alertsmanagement.models.TimeRange - :param page_count: Determines number of alerts returned per page in - response. Permissible value is between 1 to 250. When the - "includeContent" filter is selected, maximum value allowed is 25. - Default value is 25. - :type page_count: int - :param sort_by: Sort the query results by input field Default value - is sort by 'lastModifiedDateTime'. Possible values include: - 'alertsCount', 'state', 'severity', 'startDateTime', - 'lastModifiedDateTime' - :type sort_by: str or - ~azure.mgmt.alertsmanagement.models.SmartGroupsSortByFields - :param sort_order: Sort the query results order in either ascending or - descending. Default value is 'desc' for time fields and 'asc' for - others. Possible values include: 'asc', 'desc' - :type sort_order: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SmartGroupsList or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.alertsmanagement.models.SmartGroupsList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_all.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if target_resource is not None: - query_parameters['targetResource'] = self._serialize.query("target_resource", target_resource, 'str') - if target_resource_group is not None: - query_parameters['targetResourceGroup'] = self._serialize.query("target_resource_group", target_resource_group, 'str') - if target_resource_type is not None: - query_parameters['targetResourceType'] = self._serialize.query("target_resource_type", target_resource_type, 'str') - if monitor_service is not None: - query_parameters['monitorService'] = self._serialize.query("monitor_service", monitor_service, 'str') - if monitor_condition is not None: - query_parameters['monitorCondition'] = self._serialize.query("monitor_condition", monitor_condition, 'str') - if severity is not None: - query_parameters['severity'] = self._serialize.query("severity", severity, 'str') - if smart_group_state is not None: - query_parameters['smartGroupState'] = self._serialize.query("smart_group_state", smart_group_state, 'str') - if time_range is not None: - query_parameters['timeRange'] = self._serialize.query("time_range", time_range, 'str') - if page_count is not None: - query_parameters['pageCount'] = self._serialize.query("page_count", page_count, 'int') - if sort_by is not None: - query_parameters['sortBy'] = self._serialize.query("sort_by", sort_by, 'str') - if sort_order is not None: - query_parameters['sortOrder'] = self._serialize.query("sort_order", sort_order, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SmartGroupsList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups'} - - def get_by_id( - self, smart_group_id, custom_headers=None, raw=False, **operation_config): - """Get information of smart alerts group. - - Get details of smart group. - - :param smart_group_id: Smart group unique id. - :type smart_group_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SmartGroup or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.alertsmanagement.models.SmartGroup or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_by_id.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'smartGroupId': self._serialize.url("smart_group_id", smart_group_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('SmartGroup', response) - header_dict = { - 'x-ms-request-id': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get_by_id.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups/{smartGroupId}'} - - def change_state( - self, smart_group_id, new_state, custom_headers=None, raw=False, **operation_config): - """Change the state from unresolved to resolved and all the alerts within - the smart group will also be resolved. - - :param smart_group_id: Smart group unique id. - :type smart_group_id: str - :param new_state: New state of the alert. Possible values include: - 'New', 'Acknowledged', 'Closed' - :type new_state: str or ~azure.mgmt.alertsmanagement.models.AlertState - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SmartGroup or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.alertsmanagement.models.SmartGroup or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.change_state.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'smartGroupId': self._serialize.url("smart_group_id", smart_group_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - query_parameters['newState'] = self._serialize.query("new_state", new_state, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('SmartGroup', response) - header_dict = { - 'x-ms-request-id': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - change_state.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups/{smartGroupId}/changeState'} - - def get_history( - self, smart_group_id, custom_headers=None, raw=False, **operation_config): - """Get the history of the changes of smart group. - - :param smart_group_id: Smart group unique id. - :type smart_group_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SmartGroupModification or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.alertsmanagement.models.SmartGroupModification or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_history.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'smartGroupId': self._serialize.url("smart_group_id", smart_group_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SmartGroupModification', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_history.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups/{smartGroupId}/history'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/__init__.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/__init__.py index a25abe1811a6..f361c01f449f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/__init__.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .api_management_client import ApiManagementClient -from .version import VERSION +from ._configuration import ApiManagementClientConfiguration +from ._api_management_client import ApiManagementClient +__all__ = ['ApiManagementClient', 'ApiManagementClientConfiguration'] -__all__ = ['ApiManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_api_management_client.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_api_management_client.py new file mode 100644 index 000000000000..c2284245c9d0 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_api_management_client.py @@ -0,0 +1,351 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import ApiManagementClientConfiguration +from .operations import ApiOperations +from .operations import ApiRevisionOperations +from .operations import ApiReleaseOperations +from .operations import ApiOperationOperations +from .operations import ApiOperationPolicyOperations +from .operations import TagOperations +from .operations import ApiProductOperations +from .operations import ApiPolicyOperations +from .operations import ApiSchemaOperations +from .operations import ApiDiagnosticOperations +from .operations import ApiIssueOperations +from .operations import ApiIssueCommentOperations +from .operations import ApiIssueAttachmentOperations +from .operations import ApiTagDescriptionOperations +from .operations import OperationOperations +from .operations import ApiVersionSetOperations +from .operations import AuthorizationServerOperations +from .operations import BackendOperations +from .operations import CacheOperations +from .operations import CertificateOperations +from .operations import ApiManagementOperations +from .operations import ApiManagementServiceSkusOperations +from .operations import ApiManagementServiceOperations +from .operations import DiagnosticOperations +from .operations import EmailTemplateOperations +from .operations import GroupOperations +from .operations import GroupUserOperations +from .operations import IdentityProviderOperations +from .operations import IssueOperations +from .operations import LoggerOperations +from .operations import NetworkStatusOperations +from .operations import NotificationOperations +from .operations import NotificationRecipientUserOperations +from .operations import NotificationRecipientEmailOperations +from .operations import OpenIdConnectProviderOperations +from .operations import PolicyOperations +from .operations import PolicySnippetOperations +from .operations import SignInSettingsOperations +from .operations import SignUpSettingsOperations +from .operations import DelegationSettingsOperations +from .operations import ProductOperations +from .operations import ProductApiOperations +from .operations import ProductGroupOperations +from .operations import ProductSubscriptionsOperations +from .operations import ProductPolicyOperations +from .operations import PropertyOperations +from .operations import QuotaByCounterKeysOperations +from .operations import QuotaByPeriodKeysOperations +from .operations import RegionOperations +from .operations import ReportsOperations +from .operations import SubscriptionOperations +from .operations import TagResourceOperations +from .operations import TenantAccessOperations +from .operations import TenantAccessGitOperations +from .operations import TenantConfigurationOperations +from .operations import UserOperations +from .operations import UserGroupOperations +from .operations import UserSubscriptionOperations +from .operations import UserIdentitiesOperations +from .operations import UserConfirmationPasswordOperations +from .operations import ApiExportOperations +from . import models + + +class ApiManagementClient(SDKClient): + """ApiManagement Client + + :ivar config: Configuration for client. + :vartype config: ApiManagementClientConfiguration + + :ivar api: Api operations + :vartype api: azure.mgmt.apimanagement.operations.ApiOperations + :ivar api_revision: ApiRevision operations + :vartype api_revision: azure.mgmt.apimanagement.operations.ApiRevisionOperations + :ivar api_release: ApiRelease operations + :vartype api_release: azure.mgmt.apimanagement.operations.ApiReleaseOperations + :ivar api_operation: ApiOperation operations + :vartype api_operation: azure.mgmt.apimanagement.operations.ApiOperationOperations + :ivar api_operation_policy: ApiOperationPolicy operations + :vartype api_operation_policy: azure.mgmt.apimanagement.operations.ApiOperationPolicyOperations + :ivar tag: Tag operations + :vartype tag: azure.mgmt.apimanagement.operations.TagOperations + :ivar api_product: ApiProduct operations + :vartype api_product: azure.mgmt.apimanagement.operations.ApiProductOperations + :ivar api_policy: ApiPolicy operations + :vartype api_policy: azure.mgmt.apimanagement.operations.ApiPolicyOperations + :ivar api_schema: ApiSchema operations + :vartype api_schema: azure.mgmt.apimanagement.operations.ApiSchemaOperations + :ivar api_diagnostic: ApiDiagnostic operations + :vartype api_diagnostic: azure.mgmt.apimanagement.operations.ApiDiagnosticOperations + :ivar api_issue: ApiIssue operations + :vartype api_issue: azure.mgmt.apimanagement.operations.ApiIssueOperations + :ivar api_issue_comment: ApiIssueComment operations + :vartype api_issue_comment: azure.mgmt.apimanagement.operations.ApiIssueCommentOperations + :ivar api_issue_attachment: ApiIssueAttachment operations + :vartype api_issue_attachment: azure.mgmt.apimanagement.operations.ApiIssueAttachmentOperations + :ivar api_tag_description: ApiTagDescription operations + :vartype api_tag_description: azure.mgmt.apimanagement.operations.ApiTagDescriptionOperations + :ivar operation: Operation operations + :vartype operation: azure.mgmt.apimanagement.operations.OperationOperations + :ivar api_version_set: ApiVersionSet operations + :vartype api_version_set: azure.mgmt.apimanagement.operations.ApiVersionSetOperations + :ivar authorization_server: AuthorizationServer operations + :vartype authorization_server: azure.mgmt.apimanagement.operations.AuthorizationServerOperations + :ivar backend: Backend operations + :vartype backend: azure.mgmt.apimanagement.operations.BackendOperations + :ivar cache: Cache operations + :vartype cache: azure.mgmt.apimanagement.operations.CacheOperations + :ivar certificate: Certificate operations + :vartype certificate: azure.mgmt.apimanagement.operations.CertificateOperations + :ivar api_management_operations: ApiManagementOperations operations + :vartype api_management_operations: azure.mgmt.apimanagement.operations.ApiManagementOperations + :ivar api_management_service_skus: ApiManagementServiceSkus operations + :vartype api_management_service_skus: azure.mgmt.apimanagement.operations.ApiManagementServiceSkusOperations + :ivar api_management_service: ApiManagementService operations + :vartype api_management_service: azure.mgmt.apimanagement.operations.ApiManagementServiceOperations + :ivar diagnostic: Diagnostic operations + :vartype diagnostic: azure.mgmt.apimanagement.operations.DiagnosticOperations + :ivar email_template: EmailTemplate operations + :vartype email_template: azure.mgmt.apimanagement.operations.EmailTemplateOperations + :ivar group: Group operations + :vartype group: azure.mgmt.apimanagement.operations.GroupOperations + :ivar group_user: GroupUser operations + :vartype group_user: azure.mgmt.apimanagement.operations.GroupUserOperations + :ivar identity_provider: IdentityProvider operations + :vartype identity_provider: azure.mgmt.apimanagement.operations.IdentityProviderOperations + :ivar issue: Issue operations + :vartype issue: azure.mgmt.apimanagement.operations.IssueOperations + :ivar logger: Logger operations + :vartype logger: azure.mgmt.apimanagement.operations.LoggerOperations + :ivar network_status: NetworkStatus operations + :vartype network_status: azure.mgmt.apimanagement.operations.NetworkStatusOperations + :ivar notification: Notification operations + :vartype notification: azure.mgmt.apimanagement.operations.NotificationOperations + :ivar notification_recipient_user: NotificationRecipientUser operations + :vartype notification_recipient_user: azure.mgmt.apimanagement.operations.NotificationRecipientUserOperations + :ivar notification_recipient_email: NotificationRecipientEmail operations + :vartype notification_recipient_email: azure.mgmt.apimanagement.operations.NotificationRecipientEmailOperations + :ivar open_id_connect_provider: OpenIdConnectProvider operations + :vartype open_id_connect_provider: azure.mgmt.apimanagement.operations.OpenIdConnectProviderOperations + :ivar policy: Policy operations + :vartype policy: azure.mgmt.apimanagement.operations.PolicyOperations + :ivar policy_snippet: PolicySnippet operations + :vartype policy_snippet: azure.mgmt.apimanagement.operations.PolicySnippetOperations + :ivar sign_in_settings: SignInSettings operations + :vartype sign_in_settings: azure.mgmt.apimanagement.operations.SignInSettingsOperations + :ivar sign_up_settings: SignUpSettings operations + :vartype sign_up_settings: azure.mgmt.apimanagement.operations.SignUpSettingsOperations + :ivar delegation_settings: DelegationSettings operations + :vartype delegation_settings: azure.mgmt.apimanagement.operations.DelegationSettingsOperations + :ivar product: Product operations + :vartype product: azure.mgmt.apimanagement.operations.ProductOperations + :ivar product_api: ProductApi operations + :vartype product_api: azure.mgmt.apimanagement.operations.ProductApiOperations + :ivar product_group: ProductGroup operations + :vartype product_group: azure.mgmt.apimanagement.operations.ProductGroupOperations + :ivar product_subscriptions: ProductSubscriptions operations + :vartype product_subscriptions: azure.mgmt.apimanagement.operations.ProductSubscriptionsOperations + :ivar product_policy: ProductPolicy operations + :vartype product_policy: azure.mgmt.apimanagement.operations.ProductPolicyOperations + :ivar property: Property operations + :vartype property: azure.mgmt.apimanagement.operations.PropertyOperations + :ivar quota_by_counter_keys: QuotaByCounterKeys operations + :vartype quota_by_counter_keys: azure.mgmt.apimanagement.operations.QuotaByCounterKeysOperations + :ivar quota_by_period_keys: QuotaByPeriodKeys operations + :vartype quota_by_period_keys: azure.mgmt.apimanagement.operations.QuotaByPeriodKeysOperations + :ivar region: Region operations + :vartype region: azure.mgmt.apimanagement.operations.RegionOperations + :ivar reports: Reports operations + :vartype reports: azure.mgmt.apimanagement.operations.ReportsOperations + :ivar subscription: Subscription operations + :vartype subscription: azure.mgmt.apimanagement.operations.SubscriptionOperations + :ivar tag_resource: TagResource operations + :vartype tag_resource: azure.mgmt.apimanagement.operations.TagResourceOperations + :ivar tenant_access: TenantAccess operations + :vartype tenant_access: azure.mgmt.apimanagement.operations.TenantAccessOperations + :ivar tenant_access_git: TenantAccessGit operations + :vartype tenant_access_git: azure.mgmt.apimanagement.operations.TenantAccessGitOperations + :ivar tenant_configuration: TenantConfiguration operations + :vartype tenant_configuration: azure.mgmt.apimanagement.operations.TenantConfigurationOperations + :ivar user: User operations + :vartype user: azure.mgmt.apimanagement.operations.UserOperations + :ivar user_group: UserGroup operations + :vartype user_group: azure.mgmt.apimanagement.operations.UserGroupOperations + :ivar user_subscription: UserSubscription operations + :vartype user_subscription: azure.mgmt.apimanagement.operations.UserSubscriptionOperations + :ivar user_identities: UserIdentities operations + :vartype user_identities: azure.mgmt.apimanagement.operations.UserIdentitiesOperations + :ivar user_confirmation_password: UserConfirmationPassword operations + :vartype user_confirmation_password: azure.mgmt.apimanagement.operations.UserConfirmationPasswordOperations + :ivar api_export: ApiExport operations + :vartype api_export: azure.mgmt.apimanagement.operations.ApiExportOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = ApiManagementClientConfiguration(credentials, subscription_id, base_url) + super(ApiManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2019-01-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.api = ApiOperations( + self._client, self.config, self._serialize, self._deserialize) + self.api_revision = ApiRevisionOperations( + self._client, self.config, self._serialize, self._deserialize) + self.api_release = ApiReleaseOperations( + self._client, self.config, self._serialize, self._deserialize) + self.api_operation = ApiOperationOperations( + self._client, self.config, self._serialize, self._deserialize) + self.api_operation_policy = ApiOperationPolicyOperations( + self._client, self.config, self._serialize, self._deserialize) + self.tag = TagOperations( + self._client, self.config, self._serialize, self._deserialize) + self.api_product = ApiProductOperations( + self._client, self.config, self._serialize, self._deserialize) + self.api_policy = ApiPolicyOperations( + self._client, self.config, self._serialize, self._deserialize) + self.api_schema = ApiSchemaOperations( + self._client, self.config, self._serialize, self._deserialize) + self.api_diagnostic = ApiDiagnosticOperations( + self._client, self.config, self._serialize, self._deserialize) + self.api_issue = ApiIssueOperations( + self._client, self.config, self._serialize, self._deserialize) + self.api_issue_comment = ApiIssueCommentOperations( + self._client, self.config, self._serialize, self._deserialize) + self.api_issue_attachment = ApiIssueAttachmentOperations( + self._client, self.config, self._serialize, self._deserialize) + self.api_tag_description = ApiTagDescriptionOperations( + self._client, self.config, self._serialize, self._deserialize) + self.operation = OperationOperations( + self._client, self.config, self._serialize, self._deserialize) + self.api_version_set = ApiVersionSetOperations( + self._client, self.config, self._serialize, self._deserialize) + self.authorization_server = AuthorizationServerOperations( + self._client, self.config, self._serialize, self._deserialize) + self.backend = BackendOperations( + self._client, self.config, self._serialize, self._deserialize) + self.cache = CacheOperations( + self._client, self.config, self._serialize, self._deserialize) + self.certificate = CertificateOperations( + self._client, self.config, self._serialize, self._deserialize) + self.api_management_operations = ApiManagementOperations( + self._client, self.config, self._serialize, self._deserialize) + self.api_management_service_skus = ApiManagementServiceSkusOperations( + self._client, self.config, self._serialize, self._deserialize) + self.api_management_service = ApiManagementServiceOperations( + self._client, self.config, self._serialize, self._deserialize) + self.diagnostic = DiagnosticOperations( + self._client, self.config, self._serialize, self._deserialize) + self.email_template = EmailTemplateOperations( + self._client, self.config, self._serialize, self._deserialize) + self.group = GroupOperations( + self._client, self.config, self._serialize, self._deserialize) + self.group_user = GroupUserOperations( + self._client, self.config, self._serialize, self._deserialize) + self.identity_provider = IdentityProviderOperations( + self._client, self.config, self._serialize, self._deserialize) + self.issue = IssueOperations( + self._client, self.config, self._serialize, self._deserialize) + self.logger = LoggerOperations( + self._client, self.config, self._serialize, self._deserialize) + self.network_status = NetworkStatusOperations( + self._client, self.config, self._serialize, self._deserialize) + self.notification = NotificationOperations( + self._client, self.config, self._serialize, self._deserialize) + self.notification_recipient_user = NotificationRecipientUserOperations( + self._client, self.config, self._serialize, self._deserialize) + self.notification_recipient_email = NotificationRecipientEmailOperations( + self._client, self.config, self._serialize, self._deserialize) + self.open_id_connect_provider = OpenIdConnectProviderOperations( + self._client, self.config, self._serialize, self._deserialize) + self.policy = PolicyOperations( + self._client, self.config, self._serialize, self._deserialize) + self.policy_snippet = PolicySnippetOperations( + self._client, self.config, self._serialize, self._deserialize) + self.sign_in_settings = SignInSettingsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.sign_up_settings = SignUpSettingsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.delegation_settings = DelegationSettingsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.product = ProductOperations( + self._client, self.config, self._serialize, self._deserialize) + self.product_api = ProductApiOperations( + self._client, self.config, self._serialize, self._deserialize) + self.product_group = ProductGroupOperations( + self._client, self.config, self._serialize, self._deserialize) + self.product_subscriptions = ProductSubscriptionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.product_policy = ProductPolicyOperations( + self._client, self.config, self._serialize, self._deserialize) + self.property = PropertyOperations( + self._client, self.config, self._serialize, self._deserialize) + self.quota_by_counter_keys = QuotaByCounterKeysOperations( + self._client, self.config, self._serialize, self._deserialize) + self.quota_by_period_keys = QuotaByPeriodKeysOperations( + self._client, self.config, self._serialize, self._deserialize) + self.region = RegionOperations( + self._client, self.config, self._serialize, self._deserialize) + self.reports = ReportsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.subscription = SubscriptionOperations( + self._client, self.config, self._serialize, self._deserialize) + self.tag_resource = TagResourceOperations( + self._client, self.config, self._serialize, self._deserialize) + self.tenant_access = TenantAccessOperations( + self._client, self.config, self._serialize, self._deserialize) + self.tenant_access_git = TenantAccessGitOperations( + self._client, self.config, self._serialize, self._deserialize) + self.tenant_configuration = TenantConfigurationOperations( + self._client, self.config, self._serialize, self._deserialize) + self.user = UserOperations( + self._client, self.config, self._serialize, self._deserialize) + self.user_group = UserGroupOperations( + self._client, self.config, self._serialize, self._deserialize) + self.user_subscription = UserSubscriptionOperations( + self._client, self.config, self._serialize, self._deserialize) + self.user_identities = UserIdentitiesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.user_confirmation_password = UserConfirmationPasswordOperations( + self._client, self.config, self._serialize, self._deserialize) + self.api_export = ApiExportOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_configuration.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_configuration.py new file mode 100644 index 000000000000..ec13079f346d --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_configuration.py @@ -0,0 +1,50 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class ApiManagementClientConfiguration(AzureConfiguration): + """Configuration for ApiManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(ApiManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-apimanagement/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/api_management_client.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/api_management_client.py deleted file mode 100644 index 123b9684fa27..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/api_management_client.py +++ /dev/null @@ -1,385 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.api_operations import ApiOperations -from .operations.api_revision_operations import ApiRevisionOperations -from .operations.api_release_operations import ApiReleaseOperations -from .operations.api_operation_operations import ApiOperationOperations -from .operations.api_operation_policy_operations import ApiOperationPolicyOperations -from .operations.tag_operations import TagOperations -from .operations.api_product_operations import ApiProductOperations -from .operations.api_policy_operations import ApiPolicyOperations -from .operations.api_schema_operations import ApiSchemaOperations -from .operations.api_diagnostic_operations import ApiDiagnosticOperations -from .operations.api_issue_operations import ApiIssueOperations -from .operations.api_issue_comment_operations import ApiIssueCommentOperations -from .operations.api_issue_attachment_operations import ApiIssueAttachmentOperations -from .operations.api_tag_description_operations import ApiTagDescriptionOperations -from .operations.operation_operations import OperationOperations -from .operations.api_version_set_operations import ApiVersionSetOperations -from .operations.authorization_server_operations import AuthorizationServerOperations -from .operations.backend_operations import BackendOperations -from .operations.cache_operations import CacheOperations -from .operations.certificate_operations import CertificateOperations -from .operations.api_management_operations import ApiManagementOperations -from .operations.api_management_service_skus_operations import ApiManagementServiceSkusOperations -from .operations.api_management_service_operations import ApiManagementServiceOperations -from .operations.diagnostic_operations import DiagnosticOperations -from .operations.email_template_operations import EmailTemplateOperations -from .operations.group_operations import GroupOperations -from .operations.group_user_operations import GroupUserOperations -from .operations.identity_provider_operations import IdentityProviderOperations -from .operations.issue_operations import IssueOperations -from .operations.logger_operations import LoggerOperations -from .operations.network_status_operations import NetworkStatusOperations -from .operations.notification_operations import NotificationOperations -from .operations.notification_recipient_user_operations import NotificationRecipientUserOperations -from .operations.notification_recipient_email_operations import NotificationRecipientEmailOperations -from .operations.open_id_connect_provider_operations import OpenIdConnectProviderOperations -from .operations.policy_operations import PolicyOperations -from .operations.policy_snippet_operations import PolicySnippetOperations -from .operations.sign_in_settings_operations import SignInSettingsOperations -from .operations.sign_up_settings_operations import SignUpSettingsOperations -from .operations.delegation_settings_operations import DelegationSettingsOperations -from .operations.product_operations import ProductOperations -from .operations.product_api_operations import ProductApiOperations -from .operations.product_group_operations import ProductGroupOperations -from .operations.product_subscriptions_operations import ProductSubscriptionsOperations -from .operations.product_policy_operations import ProductPolicyOperations -from .operations.property_operations import PropertyOperations -from .operations.quota_by_counter_keys_operations import QuotaByCounterKeysOperations -from .operations.quota_by_period_keys_operations import QuotaByPeriodKeysOperations -from .operations.region_operations import RegionOperations -from .operations.reports_operations import ReportsOperations -from .operations.subscription_operations import SubscriptionOperations -from .operations.tag_resource_operations import TagResourceOperations -from .operations.tenant_access_operations import TenantAccessOperations -from .operations.tenant_access_git_operations import TenantAccessGitOperations -from .operations.tenant_configuration_operations import TenantConfigurationOperations -from .operations.user_operations import UserOperations -from .operations.user_group_operations import UserGroupOperations -from .operations.user_subscription_operations import UserSubscriptionOperations -from .operations.user_identities_operations import UserIdentitiesOperations -from .operations.user_confirmation_password_operations import UserConfirmationPasswordOperations -from .operations.api_export_operations import ApiExportOperations -from . import models - - -class ApiManagementClientConfiguration(AzureConfiguration): - """Configuration for ApiManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ApiManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-apimanagement/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class ApiManagementClient(SDKClient): - """ApiManagement Client - - :ivar config: Configuration for client. - :vartype config: ApiManagementClientConfiguration - - :ivar api: Api operations - :vartype api: azure.mgmt.apimanagement.operations.ApiOperations - :ivar api_revision: ApiRevision operations - :vartype api_revision: azure.mgmt.apimanagement.operations.ApiRevisionOperations - :ivar api_release: ApiRelease operations - :vartype api_release: azure.mgmt.apimanagement.operations.ApiReleaseOperations - :ivar api_operation: ApiOperation operations - :vartype api_operation: azure.mgmt.apimanagement.operations.ApiOperationOperations - :ivar api_operation_policy: ApiOperationPolicy operations - :vartype api_operation_policy: azure.mgmt.apimanagement.operations.ApiOperationPolicyOperations - :ivar tag: Tag operations - :vartype tag: azure.mgmt.apimanagement.operations.TagOperations - :ivar api_product: ApiProduct operations - :vartype api_product: azure.mgmt.apimanagement.operations.ApiProductOperations - :ivar api_policy: ApiPolicy operations - :vartype api_policy: azure.mgmt.apimanagement.operations.ApiPolicyOperations - :ivar api_schema: ApiSchema operations - :vartype api_schema: azure.mgmt.apimanagement.operations.ApiSchemaOperations - :ivar api_diagnostic: ApiDiagnostic operations - :vartype api_diagnostic: azure.mgmt.apimanagement.operations.ApiDiagnosticOperations - :ivar api_issue: ApiIssue operations - :vartype api_issue: azure.mgmt.apimanagement.operations.ApiIssueOperations - :ivar api_issue_comment: ApiIssueComment operations - :vartype api_issue_comment: azure.mgmt.apimanagement.operations.ApiIssueCommentOperations - :ivar api_issue_attachment: ApiIssueAttachment operations - :vartype api_issue_attachment: azure.mgmt.apimanagement.operations.ApiIssueAttachmentOperations - :ivar api_tag_description: ApiTagDescription operations - :vartype api_tag_description: azure.mgmt.apimanagement.operations.ApiTagDescriptionOperations - :ivar operation: Operation operations - :vartype operation: azure.mgmt.apimanagement.operations.OperationOperations - :ivar api_version_set: ApiVersionSet operations - :vartype api_version_set: azure.mgmt.apimanagement.operations.ApiVersionSetOperations - :ivar authorization_server: AuthorizationServer operations - :vartype authorization_server: azure.mgmt.apimanagement.operations.AuthorizationServerOperations - :ivar backend: Backend operations - :vartype backend: azure.mgmt.apimanagement.operations.BackendOperations - :ivar cache: Cache operations - :vartype cache: azure.mgmt.apimanagement.operations.CacheOperations - :ivar certificate: Certificate operations - :vartype certificate: azure.mgmt.apimanagement.operations.CertificateOperations - :ivar api_management_operations: ApiManagementOperations operations - :vartype api_management_operations: azure.mgmt.apimanagement.operations.ApiManagementOperations - :ivar api_management_service_skus: ApiManagementServiceSkus operations - :vartype api_management_service_skus: azure.mgmt.apimanagement.operations.ApiManagementServiceSkusOperations - :ivar api_management_service: ApiManagementService operations - :vartype api_management_service: azure.mgmt.apimanagement.operations.ApiManagementServiceOperations - :ivar diagnostic: Diagnostic operations - :vartype diagnostic: azure.mgmt.apimanagement.operations.DiagnosticOperations - :ivar email_template: EmailTemplate operations - :vartype email_template: azure.mgmt.apimanagement.operations.EmailTemplateOperations - :ivar group: Group operations - :vartype group: azure.mgmt.apimanagement.operations.GroupOperations - :ivar group_user: GroupUser operations - :vartype group_user: azure.mgmt.apimanagement.operations.GroupUserOperations - :ivar identity_provider: IdentityProvider operations - :vartype identity_provider: azure.mgmt.apimanagement.operations.IdentityProviderOperations - :ivar issue: Issue operations - :vartype issue: azure.mgmt.apimanagement.operations.IssueOperations - :ivar logger: Logger operations - :vartype logger: azure.mgmt.apimanagement.operations.LoggerOperations - :ivar network_status: NetworkStatus operations - :vartype network_status: azure.mgmt.apimanagement.operations.NetworkStatusOperations - :ivar notification: Notification operations - :vartype notification: azure.mgmt.apimanagement.operations.NotificationOperations - :ivar notification_recipient_user: NotificationRecipientUser operations - :vartype notification_recipient_user: azure.mgmt.apimanagement.operations.NotificationRecipientUserOperations - :ivar notification_recipient_email: NotificationRecipientEmail operations - :vartype notification_recipient_email: azure.mgmt.apimanagement.operations.NotificationRecipientEmailOperations - :ivar open_id_connect_provider: OpenIdConnectProvider operations - :vartype open_id_connect_provider: azure.mgmt.apimanagement.operations.OpenIdConnectProviderOperations - :ivar policy: Policy operations - :vartype policy: azure.mgmt.apimanagement.operations.PolicyOperations - :ivar policy_snippet: PolicySnippet operations - :vartype policy_snippet: azure.mgmt.apimanagement.operations.PolicySnippetOperations - :ivar sign_in_settings: SignInSettings operations - :vartype sign_in_settings: azure.mgmt.apimanagement.operations.SignInSettingsOperations - :ivar sign_up_settings: SignUpSettings operations - :vartype sign_up_settings: azure.mgmt.apimanagement.operations.SignUpSettingsOperations - :ivar delegation_settings: DelegationSettings operations - :vartype delegation_settings: azure.mgmt.apimanagement.operations.DelegationSettingsOperations - :ivar product: Product operations - :vartype product: azure.mgmt.apimanagement.operations.ProductOperations - :ivar product_api: ProductApi operations - :vartype product_api: azure.mgmt.apimanagement.operations.ProductApiOperations - :ivar product_group: ProductGroup operations - :vartype product_group: azure.mgmt.apimanagement.operations.ProductGroupOperations - :ivar product_subscriptions: ProductSubscriptions operations - :vartype product_subscriptions: azure.mgmt.apimanagement.operations.ProductSubscriptionsOperations - :ivar product_policy: ProductPolicy operations - :vartype product_policy: azure.mgmt.apimanagement.operations.ProductPolicyOperations - :ivar property: Property operations - :vartype property: azure.mgmt.apimanagement.operations.PropertyOperations - :ivar quota_by_counter_keys: QuotaByCounterKeys operations - :vartype quota_by_counter_keys: azure.mgmt.apimanagement.operations.QuotaByCounterKeysOperations - :ivar quota_by_period_keys: QuotaByPeriodKeys operations - :vartype quota_by_period_keys: azure.mgmt.apimanagement.operations.QuotaByPeriodKeysOperations - :ivar region: Region operations - :vartype region: azure.mgmt.apimanagement.operations.RegionOperations - :ivar reports: Reports operations - :vartype reports: azure.mgmt.apimanagement.operations.ReportsOperations - :ivar subscription: Subscription operations - :vartype subscription: azure.mgmt.apimanagement.operations.SubscriptionOperations - :ivar tag_resource: TagResource operations - :vartype tag_resource: azure.mgmt.apimanagement.operations.TagResourceOperations - :ivar tenant_access: TenantAccess operations - :vartype tenant_access: azure.mgmt.apimanagement.operations.TenantAccessOperations - :ivar tenant_access_git: TenantAccessGit operations - :vartype tenant_access_git: azure.mgmt.apimanagement.operations.TenantAccessGitOperations - :ivar tenant_configuration: TenantConfiguration operations - :vartype tenant_configuration: azure.mgmt.apimanagement.operations.TenantConfigurationOperations - :ivar user: User operations - :vartype user: azure.mgmt.apimanagement.operations.UserOperations - :ivar user_group: UserGroup operations - :vartype user_group: azure.mgmt.apimanagement.operations.UserGroupOperations - :ivar user_subscription: UserSubscription operations - :vartype user_subscription: azure.mgmt.apimanagement.operations.UserSubscriptionOperations - :ivar user_identities: UserIdentities operations - :vartype user_identities: azure.mgmt.apimanagement.operations.UserIdentitiesOperations - :ivar user_confirmation_password: UserConfirmationPassword operations - :vartype user_confirmation_password: azure.mgmt.apimanagement.operations.UserConfirmationPasswordOperations - :ivar api_export: ApiExport operations - :vartype api_export: azure.mgmt.apimanagement.operations.ApiExportOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription credentials which uniquely identify - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ApiManagementClientConfiguration(credentials, subscription_id, base_url) - super(ApiManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2019-01-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.api = ApiOperations( - self._client, self.config, self._serialize, self._deserialize) - self.api_revision = ApiRevisionOperations( - self._client, self.config, self._serialize, self._deserialize) - self.api_release = ApiReleaseOperations( - self._client, self.config, self._serialize, self._deserialize) - self.api_operation = ApiOperationOperations( - self._client, self.config, self._serialize, self._deserialize) - self.api_operation_policy = ApiOperationPolicyOperations( - self._client, self.config, self._serialize, self._deserialize) - self.tag = TagOperations( - self._client, self.config, self._serialize, self._deserialize) - self.api_product = ApiProductOperations( - self._client, self.config, self._serialize, self._deserialize) - self.api_policy = ApiPolicyOperations( - self._client, self.config, self._serialize, self._deserialize) - self.api_schema = ApiSchemaOperations( - self._client, self.config, self._serialize, self._deserialize) - self.api_diagnostic = ApiDiagnosticOperations( - self._client, self.config, self._serialize, self._deserialize) - self.api_issue = ApiIssueOperations( - self._client, self.config, self._serialize, self._deserialize) - self.api_issue_comment = ApiIssueCommentOperations( - self._client, self.config, self._serialize, self._deserialize) - self.api_issue_attachment = ApiIssueAttachmentOperations( - self._client, self.config, self._serialize, self._deserialize) - self.api_tag_description = ApiTagDescriptionOperations( - self._client, self.config, self._serialize, self._deserialize) - self.operation = OperationOperations( - self._client, self.config, self._serialize, self._deserialize) - self.api_version_set = ApiVersionSetOperations( - self._client, self.config, self._serialize, self._deserialize) - self.authorization_server = AuthorizationServerOperations( - self._client, self.config, self._serialize, self._deserialize) - self.backend = BackendOperations( - self._client, self.config, self._serialize, self._deserialize) - self.cache = CacheOperations( - self._client, self.config, self._serialize, self._deserialize) - self.certificate = CertificateOperations( - self._client, self.config, self._serialize, self._deserialize) - self.api_management_operations = ApiManagementOperations( - self._client, self.config, self._serialize, self._deserialize) - self.api_management_service_skus = ApiManagementServiceSkusOperations( - self._client, self.config, self._serialize, self._deserialize) - self.api_management_service = ApiManagementServiceOperations( - self._client, self.config, self._serialize, self._deserialize) - self.diagnostic = DiagnosticOperations( - self._client, self.config, self._serialize, self._deserialize) - self.email_template = EmailTemplateOperations( - self._client, self.config, self._serialize, self._deserialize) - self.group = GroupOperations( - self._client, self.config, self._serialize, self._deserialize) - self.group_user = GroupUserOperations( - self._client, self.config, self._serialize, self._deserialize) - self.identity_provider = IdentityProviderOperations( - self._client, self.config, self._serialize, self._deserialize) - self.issue = IssueOperations( - self._client, self.config, self._serialize, self._deserialize) - self.logger = LoggerOperations( - self._client, self.config, self._serialize, self._deserialize) - self.network_status = NetworkStatusOperations( - self._client, self.config, self._serialize, self._deserialize) - self.notification = NotificationOperations( - self._client, self.config, self._serialize, self._deserialize) - self.notification_recipient_user = NotificationRecipientUserOperations( - self._client, self.config, self._serialize, self._deserialize) - self.notification_recipient_email = NotificationRecipientEmailOperations( - self._client, self.config, self._serialize, self._deserialize) - self.open_id_connect_provider = OpenIdConnectProviderOperations( - self._client, self.config, self._serialize, self._deserialize) - self.policy = PolicyOperations( - self._client, self.config, self._serialize, self._deserialize) - self.policy_snippet = PolicySnippetOperations( - self._client, self.config, self._serialize, self._deserialize) - self.sign_in_settings = SignInSettingsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.sign_up_settings = SignUpSettingsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.delegation_settings = DelegationSettingsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.product = ProductOperations( - self._client, self.config, self._serialize, self._deserialize) - self.product_api = ProductApiOperations( - self._client, self.config, self._serialize, self._deserialize) - self.product_group = ProductGroupOperations( - self._client, self.config, self._serialize, self._deserialize) - self.product_subscriptions = ProductSubscriptionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.product_policy = ProductPolicyOperations( - self._client, self.config, self._serialize, self._deserialize) - self.property = PropertyOperations( - self._client, self.config, self._serialize, self._deserialize) - self.quota_by_counter_keys = QuotaByCounterKeysOperations( - self._client, self.config, self._serialize, self._deserialize) - self.quota_by_period_keys = QuotaByPeriodKeysOperations( - self._client, self.config, self._serialize, self._deserialize) - self.region = RegionOperations( - self._client, self.config, self._serialize, self._deserialize) - self.reports = ReportsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.subscription = SubscriptionOperations( - self._client, self.config, self._serialize, self._deserialize) - self.tag_resource = TagResourceOperations( - self._client, self.config, self._serialize, self._deserialize) - self.tenant_access = TenantAccessOperations( - self._client, self.config, self._serialize, self._deserialize) - self.tenant_access_git = TenantAccessGitOperations( - self._client, self.config, self._serialize, self._deserialize) - self.tenant_configuration = TenantConfigurationOperations( - self._client, self.config, self._serialize, self._deserialize) - self.user = UserOperations( - self._client, self.config, self._serialize, self._deserialize) - self.user_group = UserGroupOperations( - self._client, self.config, self._serialize, self._deserialize) - self.user_subscription = UserSubscriptionOperations( - self._client, self.config, self._serialize, self._deserialize) - self.user_identities = UserIdentitiesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.user_confirmation_password = UserConfirmationPasswordOperations( - self._client, self.config, self._serialize, self._deserialize) - self.api_export = ApiExportOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py index 5638845c3e6e..26cb1758d143 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py @@ -10,352 +10,352 @@ # -------------------------------------------------------------------------- try: - from .error_field_contract_py3 import ErrorFieldContract - from .error_response_body_py3 import ErrorResponseBody - from .error_response_py3 import ErrorResponse, ErrorResponseException - from .region_contract_py3 import RegionContract - from .resource_py3 import Resource - from .api_export_result_value_py3 import ApiExportResultValue - from .api_export_result_py3 import ApiExportResult - from .product_entity_base_parameters_py3 import ProductEntityBaseParameters - from .product_tag_resource_contract_properties_py3 import ProductTagResourceContractProperties - from .operation_tag_resource_contract_properties_py3 import OperationTagResourceContractProperties - from .subscription_key_parameter_names_contract_py3 import SubscriptionKeyParameterNamesContract - from .open_id_authentication_settings_contract_py3 import OpenIdAuthenticationSettingsContract - from .oauth2_authentication_settings_contract_py3 import OAuth2AuthenticationSettingsContract - from .authentication_settings_contract_py3 import AuthenticationSettingsContract - from .api_version_set_contract_details_py3 import ApiVersionSetContractDetails - from .api_create_or_update_properties_wsdl_selector_py3 import ApiCreateOrUpdatePropertiesWsdlSelector - from .api_contract_properties_py3 import ApiContractProperties - from .api_entity_base_contract_py3 import ApiEntityBaseContract - from .api_tag_resource_contract_properties_py3 import ApiTagResourceContractProperties - from .tag_tag_resource_contract_properties_py3 import TagTagResourceContractProperties - from .tag_resource_contract_py3 import TagResourceContract - from .tag_contract_py3 import TagContract - from .tag_description_contract_py3 import TagDescriptionContract - from .tag_description_create_parameters_py3 import TagDescriptionCreateParameters - from .issue_attachment_contract_py3 import IssueAttachmentContract - from .issue_comment_contract_py3 import IssueCommentContract - from .issue_contract_base_properties_py3 import IssueContractBaseProperties - from .issue_update_contract_py3 import IssueUpdateContract - from .issue_contract_py3 import IssueContract - from .body_diagnostic_settings_py3 import BodyDiagnosticSettings - from .http_message_diagnostic_py3 import HttpMessageDiagnostic - from .pipeline_diagnostic_settings_py3 import PipelineDiagnosticSettings - from .sampling_settings_py3 import SamplingSettings - from .diagnostic_contract_py3 import DiagnosticContract - from .schema_contract_py3 import SchemaContract - from .schema_create_or_update_contract_py3 import SchemaCreateOrUpdateContract - from .policy_contract_py3 import PolicyContract - from .policy_collection_py3 import PolicyCollection - from .product_contract_py3 import ProductContract - from .parameter_contract_py3 import ParameterContract - from .representation_contract_py3 import RepresentationContract - from .response_contract_py3 import ResponseContract - from .request_contract_py3 import RequestContract - from .operation_entity_base_contract_py3 import OperationEntityBaseContract - from .operation_update_contract_py3 import OperationUpdateContract - from .operation_contract_py3 import OperationContract - from .api_release_contract_py3 import ApiReleaseContract - from .api_revision_contract_py3 import ApiRevisionContract - from .api_update_contract_py3 import ApiUpdateContract - from .api_contract_py3 import ApiContract - from .api_create_or_update_parameter_py3 import ApiCreateOrUpdateParameter - from .api_version_set_entity_base_py3 import ApiVersionSetEntityBase - from .api_version_set_update_parameters_py3 import ApiVersionSetUpdateParameters - from .api_version_set_contract_py3 import ApiVersionSetContract - from .token_body_parameter_contract_py3 import TokenBodyParameterContract - from .authorization_server_contract_base_properties_py3 import AuthorizationServerContractBaseProperties - from .authorization_server_update_contract_py3 import AuthorizationServerUpdateContract - from .authorization_server_contract_py3 import AuthorizationServerContract - from .backend_reconnect_contract_py3 import BackendReconnectContract - from .backend_tls_properties_py3 import BackendTlsProperties - from .backend_proxy_contract_py3 import BackendProxyContract - from .backend_authorization_header_credentials_py3 import BackendAuthorizationHeaderCredentials - from .backend_credentials_contract_py3 import BackendCredentialsContract - from .x509_certificate_name_py3 import X509CertificateName - from .backend_service_fabric_cluster_properties_py3 import BackendServiceFabricClusterProperties - from .backend_properties_py3 import BackendProperties - from .backend_base_parameters_py3 import BackendBaseParameters - from .backend_update_parameters_py3 import BackendUpdateParameters - from .backend_contract_py3 import BackendContract - from .cache_update_parameters_py3 import CacheUpdateParameters - from .cache_contract_py3 import CacheContract - from .certificate_contract_py3 import CertificateContract - from .certificate_create_or_update_parameters_py3 import CertificateCreateOrUpdateParameters - from .resource_sku_py3 import ResourceSku - from .resource_sku_capacity_py3 import ResourceSkuCapacity - from .resource_sku_result_py3 import ResourceSkuResult - from .certificate_information_py3 import CertificateInformation - from .certificate_configuration_py3 import CertificateConfiguration - from .hostname_configuration_py3 import HostnameConfiguration - from .virtual_network_configuration_py3 import VirtualNetworkConfiguration - from .api_management_service_sku_properties_py3 import ApiManagementServiceSkuProperties - from .additional_location_py3 import AdditionalLocation - from .api_management_service_backup_restore_parameters_py3 import ApiManagementServiceBackupRestoreParameters - from .api_management_service_base_properties_py3 import ApiManagementServiceBaseProperties - from .api_management_service_identity_py3 import ApiManagementServiceIdentity - from .api_management_service_resource_py3 import ApiManagementServiceResource - from .apim_resource_py3 import ApimResource - from .api_management_service_update_parameters_py3 import ApiManagementServiceUpdateParameters - from .api_management_service_get_sso_token_result_py3 import ApiManagementServiceGetSsoTokenResult - from .api_management_service_check_name_availability_parameters_py3 import ApiManagementServiceCheckNameAvailabilityParameters - from .api_management_service_name_availability_result_py3 import ApiManagementServiceNameAvailabilityResult - from .api_management_service_apply_network_configuration_parameters_py3 import ApiManagementServiceApplyNetworkConfigurationParameters - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .email_template_parameters_contract_properties_py3 import EmailTemplateParametersContractProperties - from .email_template_update_parameters_py3 import EmailTemplateUpdateParameters - from .email_template_contract_py3 import EmailTemplateContract - from .user_identity_contract_py3 import UserIdentityContract - from .user_entity_base_parameters_py3 import UserEntityBaseParameters - from .group_contract_properties_py3 import GroupContractProperties - from .user_contract_py3 import UserContract - from .group_update_parameters_py3 import GroupUpdateParameters - from .group_contract_py3 import GroupContract - from .group_create_parameters_py3 import GroupCreateParameters - from .identity_provider_base_parameters_py3 import IdentityProviderBaseParameters - from .identity_provider_update_parameters_py3 import IdentityProviderUpdateParameters - from .identity_provider_contract_py3 import IdentityProviderContract - from .logger_update_contract_py3 import LoggerUpdateContract - from .logger_contract_py3 import LoggerContract - from .connectivity_status_contract_py3 import ConnectivityStatusContract - from .network_status_contract_py3 import NetworkStatusContract - from .network_status_contract_by_location_py3 import NetworkStatusContractByLocation - from .recipient_email_contract_py3 import RecipientEmailContract - from .recipient_email_collection_py3 import RecipientEmailCollection - from .recipient_user_contract_py3 import RecipientUserContract - from .recipient_user_collection_py3 import RecipientUserCollection - from .recipients_contract_properties_py3 import RecipientsContractProperties - from .notification_contract_py3 import NotificationContract - from .openid_connect_provider_update_contract_py3 import OpenidConnectProviderUpdateContract - from .openid_connect_provider_contract_py3 import OpenidConnectProviderContract - from .policy_snippet_contract_py3 import PolicySnippetContract - from .policy_snippets_collection_py3 import PolicySnippetsCollection - from .registration_delegation_settings_properties_py3 import RegistrationDelegationSettingsProperties - from .subscriptions_delegation_settings_properties_py3 import SubscriptionsDelegationSettingsProperties - from .portal_delegation_settings_py3 import PortalDelegationSettings - from .terms_of_service_properties_py3 import TermsOfServiceProperties - from .portal_signup_settings_py3 import PortalSignupSettings - from .portal_signin_settings_py3 import PortalSigninSettings - from .subscription_contract_py3 import SubscriptionContract - from .product_update_parameters_py3 import ProductUpdateParameters - from .property_entity_base_parameters_py3 import PropertyEntityBaseParameters - from .property_update_parameters_py3 import PropertyUpdateParameters - from .property_contract_py3 import PropertyContract - from .quota_counter_value_contract_properties_py3 import QuotaCounterValueContractProperties - from .quota_counter_contract_py3 import QuotaCounterContract - from .quota_counter_collection_py3 import QuotaCounterCollection - from .request_report_record_contract_py3 import RequestReportRecordContract - from .report_record_contract_py3 import ReportRecordContract - from .subscription_update_parameters_py3 import SubscriptionUpdateParameters - from .subscription_create_parameters_py3 import SubscriptionCreateParameters - from .tag_create_update_parameters_py3 import TagCreateUpdateParameters - from .tenant_configuration_sync_state_contract_py3 import TenantConfigurationSyncStateContract - from .operation_result_log_item_contract_py3 import OperationResultLogItemContract - from .operation_result_contract_py3 import OperationResultContract - from .deploy_configuration_parameters_py3 import DeployConfigurationParameters - from .save_configuration_parameter_py3 import SaveConfigurationParameter - from .access_information_contract_py3 import AccessInformationContract - from .access_information_update_parameters_py3 import AccessInformationUpdateParameters - from .user_token_result_py3 import UserTokenResult - from .user_token_parameters_py3 import UserTokenParameters - from .generate_sso_url_result_py3 import GenerateSsoUrlResult - from .user_update_parameters_py3 import UserUpdateParameters - from .user_create_parameters_py3 import UserCreateParameters - from .api_revision_info_contract_py3 import ApiRevisionInfoContract - from .quota_counter_value_contract_py3 import QuotaCounterValueContract + from ._models_py3 import AccessInformationContract + from ._models_py3 import AccessInformationUpdateParameters + from ._models_py3 import AdditionalLocation + from ._models_py3 import ApiContract + from ._models_py3 import ApiContractProperties + from ._models_py3 import ApiCreateOrUpdateParameter + from ._models_py3 import ApiCreateOrUpdatePropertiesWsdlSelector + from ._models_py3 import ApiEntityBaseContract + from ._models_py3 import ApiExportResult + from ._models_py3 import ApiExportResultValue + from ._models_py3 import ApiManagementServiceApplyNetworkConfigurationParameters + from ._models_py3 import ApiManagementServiceBackupRestoreParameters + from ._models_py3 import ApiManagementServiceBaseProperties + from ._models_py3 import ApiManagementServiceCheckNameAvailabilityParameters + from ._models_py3 import ApiManagementServiceGetSsoTokenResult + from ._models_py3 import ApiManagementServiceIdentity + from ._models_py3 import ApiManagementServiceNameAvailabilityResult + from ._models_py3 import ApiManagementServiceResource + from ._models_py3 import ApiManagementServiceSkuProperties + from ._models_py3 import ApiManagementServiceUpdateParameters + from ._models_py3 import ApimResource + from ._models_py3 import ApiReleaseContract + from ._models_py3 import ApiRevisionContract + from ._models_py3 import ApiRevisionInfoContract + from ._models_py3 import ApiTagResourceContractProperties + from ._models_py3 import ApiUpdateContract + from ._models_py3 import ApiVersionSetContract + from ._models_py3 import ApiVersionSetContractDetails + from ._models_py3 import ApiVersionSetEntityBase + from ._models_py3 import ApiVersionSetUpdateParameters + from ._models_py3 import AuthenticationSettingsContract + from ._models_py3 import AuthorizationServerContract + from ._models_py3 import AuthorizationServerContractBaseProperties + from ._models_py3 import AuthorizationServerUpdateContract + from ._models_py3 import BackendAuthorizationHeaderCredentials + from ._models_py3 import BackendBaseParameters + from ._models_py3 import BackendContract + from ._models_py3 import BackendCredentialsContract + from ._models_py3 import BackendProperties + from ._models_py3 import BackendProxyContract + from ._models_py3 import BackendReconnectContract + from ._models_py3 import BackendServiceFabricClusterProperties + from ._models_py3 import BackendTlsProperties + from ._models_py3 import BackendUpdateParameters + from ._models_py3 import BodyDiagnosticSettings + from ._models_py3 import CacheContract + from ._models_py3 import CacheUpdateParameters + from ._models_py3 import CertificateConfiguration + from ._models_py3 import CertificateContract + from ._models_py3 import CertificateCreateOrUpdateParameters + from ._models_py3 import CertificateInformation + from ._models_py3 import ConnectivityStatusContract + from ._models_py3 import DeployConfigurationParameters + from ._models_py3 import DiagnosticContract + from ._models_py3 import EmailTemplateContract + from ._models_py3 import EmailTemplateParametersContractProperties + from ._models_py3 import EmailTemplateUpdateParameters + from ._models_py3 import ErrorFieldContract + from ._models_py3 import ErrorResponse, ErrorResponseException + from ._models_py3 import ErrorResponseBody + from ._models_py3 import GenerateSsoUrlResult + from ._models_py3 import GroupContract + from ._models_py3 import GroupContractProperties + from ._models_py3 import GroupCreateParameters + from ._models_py3 import GroupUpdateParameters + from ._models_py3 import HostnameConfiguration + from ._models_py3 import HttpMessageDiagnostic + from ._models_py3 import IdentityProviderBaseParameters + from ._models_py3 import IdentityProviderContract + from ._models_py3 import IdentityProviderUpdateParameters + from ._models_py3 import IssueAttachmentContract + from ._models_py3 import IssueCommentContract + from ._models_py3 import IssueContract + from ._models_py3 import IssueContractBaseProperties + from ._models_py3 import IssueUpdateContract + from ._models_py3 import LoggerContract + from ._models_py3 import LoggerUpdateContract + from ._models_py3 import NetworkStatusContract + from ._models_py3 import NetworkStatusContractByLocation + from ._models_py3 import NotificationContract + from ._models_py3 import OAuth2AuthenticationSettingsContract + from ._models_py3 import OpenIdAuthenticationSettingsContract + from ._models_py3 import OpenidConnectProviderContract + from ._models_py3 import OpenidConnectProviderUpdateContract + from ._models_py3 import Operation + from ._models_py3 import OperationContract + from ._models_py3 import OperationDisplay + from ._models_py3 import OperationEntityBaseContract + from ._models_py3 import OperationResultContract + from ._models_py3 import OperationResultLogItemContract + from ._models_py3 import OperationTagResourceContractProperties + from ._models_py3 import OperationUpdateContract + from ._models_py3 import ParameterContract + from ._models_py3 import PipelineDiagnosticSettings + from ._models_py3 import PolicyCollection + from ._models_py3 import PolicyContract + from ._models_py3 import PolicySnippetContract + from ._models_py3 import PolicySnippetsCollection + from ._models_py3 import PortalDelegationSettings + from ._models_py3 import PortalSigninSettings + from ._models_py3 import PortalSignupSettings + from ._models_py3 import ProductContract + from ._models_py3 import ProductEntityBaseParameters + from ._models_py3 import ProductTagResourceContractProperties + from ._models_py3 import ProductUpdateParameters + from ._models_py3 import PropertyContract + from ._models_py3 import PropertyEntityBaseParameters + from ._models_py3 import PropertyUpdateParameters + from ._models_py3 import QuotaCounterCollection + from ._models_py3 import QuotaCounterContract + from ._models_py3 import QuotaCounterValueContract + from ._models_py3 import QuotaCounterValueContractProperties + from ._models_py3 import RecipientEmailCollection + from ._models_py3 import RecipientEmailContract + from ._models_py3 import RecipientsContractProperties + from ._models_py3 import RecipientUserCollection + from ._models_py3 import RecipientUserContract + from ._models_py3 import RegionContract + from ._models_py3 import RegistrationDelegationSettingsProperties + from ._models_py3 import ReportRecordContract + from ._models_py3 import RepresentationContract + from ._models_py3 import RequestContract + from ._models_py3 import RequestReportRecordContract + from ._models_py3 import Resource + from ._models_py3 import ResourceSku + from ._models_py3 import ResourceSkuCapacity + from ._models_py3 import ResourceSkuResult + from ._models_py3 import ResponseContract + from ._models_py3 import SamplingSettings + from ._models_py3 import SaveConfigurationParameter + from ._models_py3 import SchemaContract + from ._models_py3 import SchemaCreateOrUpdateContract + from ._models_py3 import SubscriptionContract + from ._models_py3 import SubscriptionCreateParameters + from ._models_py3 import SubscriptionKeyParameterNamesContract + from ._models_py3 import SubscriptionsDelegationSettingsProperties + from ._models_py3 import SubscriptionUpdateParameters + from ._models_py3 import TagContract + from ._models_py3 import TagCreateUpdateParameters + from ._models_py3 import TagDescriptionContract + from ._models_py3 import TagDescriptionCreateParameters + from ._models_py3 import TagResourceContract + from ._models_py3 import TagTagResourceContractProperties + from ._models_py3 import TenantConfigurationSyncStateContract + from ._models_py3 import TermsOfServiceProperties + from ._models_py3 import TokenBodyParameterContract + from ._models_py3 import UserContract + from ._models_py3 import UserCreateParameters + from ._models_py3 import UserEntityBaseParameters + from ._models_py3 import UserIdentityContract + from ._models_py3 import UserTokenParameters + from ._models_py3 import UserTokenResult + from ._models_py3 import UserUpdateParameters + from ._models_py3 import VirtualNetworkConfiguration + from ._models_py3 import X509CertificateName except (SyntaxError, ImportError): - from .error_field_contract import ErrorFieldContract - from .error_response_body import ErrorResponseBody - from .error_response import ErrorResponse, ErrorResponseException - from .region_contract import RegionContract - from .resource import Resource - from .api_export_result_value import ApiExportResultValue - from .api_export_result import ApiExportResult - from .product_entity_base_parameters import ProductEntityBaseParameters - from .product_tag_resource_contract_properties import ProductTagResourceContractProperties - from .operation_tag_resource_contract_properties import OperationTagResourceContractProperties - from .subscription_key_parameter_names_contract import SubscriptionKeyParameterNamesContract - from .open_id_authentication_settings_contract import OpenIdAuthenticationSettingsContract - from .oauth2_authentication_settings_contract import OAuth2AuthenticationSettingsContract - from .authentication_settings_contract import AuthenticationSettingsContract - from .api_version_set_contract_details import ApiVersionSetContractDetails - from .api_create_or_update_properties_wsdl_selector import ApiCreateOrUpdatePropertiesWsdlSelector - from .api_contract_properties import ApiContractProperties - from .api_entity_base_contract import ApiEntityBaseContract - from .api_tag_resource_contract_properties import ApiTagResourceContractProperties - from .tag_tag_resource_contract_properties import TagTagResourceContractProperties - from .tag_resource_contract import TagResourceContract - from .tag_contract import TagContract - from .tag_description_contract import TagDescriptionContract - from .tag_description_create_parameters import TagDescriptionCreateParameters - from .issue_attachment_contract import IssueAttachmentContract - from .issue_comment_contract import IssueCommentContract - from .issue_contract_base_properties import IssueContractBaseProperties - from .issue_update_contract import IssueUpdateContract - from .issue_contract import IssueContract - from .body_diagnostic_settings import BodyDiagnosticSettings - from .http_message_diagnostic import HttpMessageDiagnostic - from .pipeline_diagnostic_settings import PipelineDiagnosticSettings - from .sampling_settings import SamplingSettings - from .diagnostic_contract import DiagnosticContract - from .schema_contract import SchemaContract - from .schema_create_or_update_contract import SchemaCreateOrUpdateContract - from .policy_contract import PolicyContract - from .policy_collection import PolicyCollection - from .product_contract import ProductContract - from .parameter_contract import ParameterContract - from .representation_contract import RepresentationContract - from .response_contract import ResponseContract - from .request_contract import RequestContract - from .operation_entity_base_contract import OperationEntityBaseContract - from .operation_update_contract import OperationUpdateContract - from .operation_contract import OperationContract - from .api_release_contract import ApiReleaseContract - from .api_revision_contract import ApiRevisionContract - from .api_update_contract import ApiUpdateContract - from .api_contract import ApiContract - from .api_create_or_update_parameter import ApiCreateOrUpdateParameter - from .api_version_set_entity_base import ApiVersionSetEntityBase - from .api_version_set_update_parameters import ApiVersionSetUpdateParameters - from .api_version_set_contract import ApiVersionSetContract - from .token_body_parameter_contract import TokenBodyParameterContract - from .authorization_server_contract_base_properties import AuthorizationServerContractBaseProperties - from .authorization_server_update_contract import AuthorizationServerUpdateContract - from .authorization_server_contract import AuthorizationServerContract - from .backend_reconnect_contract import BackendReconnectContract - from .backend_tls_properties import BackendTlsProperties - from .backend_proxy_contract import BackendProxyContract - from .backend_authorization_header_credentials import BackendAuthorizationHeaderCredentials - from .backend_credentials_contract import BackendCredentialsContract - from .x509_certificate_name import X509CertificateName - from .backend_service_fabric_cluster_properties import BackendServiceFabricClusterProperties - from .backend_properties import BackendProperties - from .backend_base_parameters import BackendBaseParameters - from .backend_update_parameters import BackendUpdateParameters - from .backend_contract import BackendContract - from .cache_update_parameters import CacheUpdateParameters - from .cache_contract import CacheContract - from .certificate_contract import CertificateContract - from .certificate_create_or_update_parameters import CertificateCreateOrUpdateParameters - from .resource_sku import ResourceSku - from .resource_sku_capacity import ResourceSkuCapacity - from .resource_sku_result import ResourceSkuResult - from .certificate_information import CertificateInformation - from .certificate_configuration import CertificateConfiguration - from .hostname_configuration import HostnameConfiguration - from .virtual_network_configuration import VirtualNetworkConfiguration - from .api_management_service_sku_properties import ApiManagementServiceSkuProperties - from .additional_location import AdditionalLocation - from .api_management_service_backup_restore_parameters import ApiManagementServiceBackupRestoreParameters - from .api_management_service_base_properties import ApiManagementServiceBaseProperties - from .api_management_service_identity import ApiManagementServiceIdentity - from .api_management_service_resource import ApiManagementServiceResource - from .apim_resource import ApimResource - from .api_management_service_update_parameters import ApiManagementServiceUpdateParameters - from .api_management_service_get_sso_token_result import ApiManagementServiceGetSsoTokenResult - from .api_management_service_check_name_availability_parameters import ApiManagementServiceCheckNameAvailabilityParameters - from .api_management_service_name_availability_result import ApiManagementServiceNameAvailabilityResult - from .api_management_service_apply_network_configuration_parameters import ApiManagementServiceApplyNetworkConfigurationParameters - from .operation_display import OperationDisplay - from .operation import Operation - from .email_template_parameters_contract_properties import EmailTemplateParametersContractProperties - from .email_template_update_parameters import EmailTemplateUpdateParameters - from .email_template_contract import EmailTemplateContract - from .user_identity_contract import UserIdentityContract - from .user_entity_base_parameters import UserEntityBaseParameters - from .group_contract_properties import GroupContractProperties - from .user_contract import UserContract - from .group_update_parameters import GroupUpdateParameters - from .group_contract import GroupContract - from .group_create_parameters import GroupCreateParameters - from .identity_provider_base_parameters import IdentityProviderBaseParameters - from .identity_provider_update_parameters import IdentityProviderUpdateParameters - from .identity_provider_contract import IdentityProviderContract - from .logger_update_contract import LoggerUpdateContract - from .logger_contract import LoggerContract - from .connectivity_status_contract import ConnectivityStatusContract - from .network_status_contract import NetworkStatusContract - from .network_status_contract_by_location import NetworkStatusContractByLocation - from .recipient_email_contract import RecipientEmailContract - from .recipient_email_collection import RecipientEmailCollection - from .recipient_user_contract import RecipientUserContract - from .recipient_user_collection import RecipientUserCollection - from .recipients_contract_properties import RecipientsContractProperties - from .notification_contract import NotificationContract - from .openid_connect_provider_update_contract import OpenidConnectProviderUpdateContract - from .openid_connect_provider_contract import OpenidConnectProviderContract - from .policy_snippet_contract import PolicySnippetContract - from .policy_snippets_collection import PolicySnippetsCollection - from .registration_delegation_settings_properties import RegistrationDelegationSettingsProperties - from .subscriptions_delegation_settings_properties import SubscriptionsDelegationSettingsProperties - from .portal_delegation_settings import PortalDelegationSettings - from .terms_of_service_properties import TermsOfServiceProperties - from .portal_signup_settings import PortalSignupSettings - from .portal_signin_settings import PortalSigninSettings - from .subscription_contract import SubscriptionContract - from .product_update_parameters import ProductUpdateParameters - from .property_entity_base_parameters import PropertyEntityBaseParameters - from .property_update_parameters import PropertyUpdateParameters - from .property_contract import PropertyContract - from .quota_counter_value_contract_properties import QuotaCounterValueContractProperties - from .quota_counter_contract import QuotaCounterContract - from .quota_counter_collection import QuotaCounterCollection - from .request_report_record_contract import RequestReportRecordContract - from .report_record_contract import ReportRecordContract - from .subscription_update_parameters import SubscriptionUpdateParameters - from .subscription_create_parameters import SubscriptionCreateParameters - from .tag_create_update_parameters import TagCreateUpdateParameters - from .tenant_configuration_sync_state_contract import TenantConfigurationSyncStateContract - from .operation_result_log_item_contract import OperationResultLogItemContract - from .operation_result_contract import OperationResultContract - from .deploy_configuration_parameters import DeployConfigurationParameters - from .save_configuration_parameter import SaveConfigurationParameter - from .access_information_contract import AccessInformationContract - from .access_information_update_parameters import AccessInformationUpdateParameters - from .user_token_result import UserTokenResult - from .user_token_parameters import UserTokenParameters - from .generate_sso_url_result import GenerateSsoUrlResult - from .user_update_parameters import UserUpdateParameters - from .user_create_parameters import UserCreateParameters - from .api_revision_info_contract import ApiRevisionInfoContract - from .quota_counter_value_contract import QuotaCounterValueContract -from .api_contract_paged import ApiContractPaged -from .tag_resource_contract_paged import TagResourceContractPaged -from .api_revision_contract_paged import ApiRevisionContractPaged -from .api_release_contract_paged import ApiReleaseContractPaged -from .operation_contract_paged import OperationContractPaged -from .tag_contract_paged import TagContractPaged -from .product_contract_paged import ProductContractPaged -from .schema_contract_paged import SchemaContractPaged -from .diagnostic_contract_paged import DiagnosticContractPaged -from .issue_contract_paged import IssueContractPaged -from .issue_comment_contract_paged import IssueCommentContractPaged -from .issue_attachment_contract_paged import IssueAttachmentContractPaged -from .tag_description_contract_paged import TagDescriptionContractPaged -from .api_version_set_contract_paged import ApiVersionSetContractPaged -from .authorization_server_contract_paged import AuthorizationServerContractPaged -from .backend_contract_paged import BackendContractPaged -from .cache_contract_paged import CacheContractPaged -from .certificate_contract_paged import CertificateContractPaged -from .operation_paged import OperationPaged -from .resource_sku_result_paged import ResourceSkuResultPaged -from .api_management_service_resource_paged import ApiManagementServiceResourcePaged -from .email_template_contract_paged import EmailTemplateContractPaged -from .group_contract_paged import GroupContractPaged -from .user_contract_paged import UserContractPaged -from .identity_provider_contract_paged import IdentityProviderContractPaged -from .logger_contract_paged import LoggerContractPaged -from .notification_contract_paged import NotificationContractPaged -from .openid_connect_provider_contract_paged import OpenidConnectProviderContractPaged -from .subscription_contract_paged import SubscriptionContractPaged -from .property_contract_paged import PropertyContractPaged -from .region_contract_paged import RegionContractPaged -from .report_record_contract_paged import ReportRecordContractPaged -from .request_report_record_contract_paged import RequestReportRecordContractPaged -from .user_identity_contract_paged import UserIdentityContractPaged -from .api_management_client_enums import ( + from ._models import AccessInformationContract + from ._models import AccessInformationUpdateParameters + from ._models import AdditionalLocation + from ._models import ApiContract + from ._models import ApiContractProperties + from ._models import ApiCreateOrUpdateParameter + from ._models import ApiCreateOrUpdatePropertiesWsdlSelector + from ._models import ApiEntityBaseContract + from ._models import ApiExportResult + from ._models import ApiExportResultValue + from ._models import ApiManagementServiceApplyNetworkConfigurationParameters + from ._models import ApiManagementServiceBackupRestoreParameters + from ._models import ApiManagementServiceBaseProperties + from ._models import ApiManagementServiceCheckNameAvailabilityParameters + from ._models import ApiManagementServiceGetSsoTokenResult + from ._models import ApiManagementServiceIdentity + from ._models import ApiManagementServiceNameAvailabilityResult + from ._models import ApiManagementServiceResource + from ._models import ApiManagementServiceSkuProperties + from ._models import ApiManagementServiceUpdateParameters + from ._models import ApimResource + from ._models import ApiReleaseContract + from ._models import ApiRevisionContract + from ._models import ApiRevisionInfoContract + from ._models import ApiTagResourceContractProperties + from ._models import ApiUpdateContract + from ._models import ApiVersionSetContract + from ._models import ApiVersionSetContractDetails + from ._models import ApiVersionSetEntityBase + from ._models import ApiVersionSetUpdateParameters + from ._models import AuthenticationSettingsContract + from ._models import AuthorizationServerContract + from ._models import AuthorizationServerContractBaseProperties + from ._models import AuthorizationServerUpdateContract + from ._models import BackendAuthorizationHeaderCredentials + from ._models import BackendBaseParameters + from ._models import BackendContract + from ._models import BackendCredentialsContract + from ._models import BackendProperties + from ._models import BackendProxyContract + from ._models import BackendReconnectContract + from ._models import BackendServiceFabricClusterProperties + from ._models import BackendTlsProperties + from ._models import BackendUpdateParameters + from ._models import BodyDiagnosticSettings + from ._models import CacheContract + from ._models import CacheUpdateParameters + from ._models import CertificateConfiguration + from ._models import CertificateContract + from ._models import CertificateCreateOrUpdateParameters + from ._models import CertificateInformation + from ._models import ConnectivityStatusContract + from ._models import DeployConfigurationParameters + from ._models import DiagnosticContract + from ._models import EmailTemplateContract + from ._models import EmailTemplateParametersContractProperties + from ._models import EmailTemplateUpdateParameters + from ._models import ErrorFieldContract + from ._models import ErrorResponse, ErrorResponseException + from ._models import ErrorResponseBody + from ._models import GenerateSsoUrlResult + from ._models import GroupContract + from ._models import GroupContractProperties + from ._models import GroupCreateParameters + from ._models import GroupUpdateParameters + from ._models import HostnameConfiguration + from ._models import HttpMessageDiagnostic + from ._models import IdentityProviderBaseParameters + from ._models import IdentityProviderContract + from ._models import IdentityProviderUpdateParameters + from ._models import IssueAttachmentContract + from ._models import IssueCommentContract + from ._models import IssueContract + from ._models import IssueContractBaseProperties + from ._models import IssueUpdateContract + from ._models import LoggerContract + from ._models import LoggerUpdateContract + from ._models import NetworkStatusContract + from ._models import NetworkStatusContractByLocation + from ._models import NotificationContract + from ._models import OAuth2AuthenticationSettingsContract + from ._models import OpenIdAuthenticationSettingsContract + from ._models import OpenidConnectProviderContract + from ._models import OpenidConnectProviderUpdateContract + from ._models import Operation + from ._models import OperationContract + from ._models import OperationDisplay + from ._models import OperationEntityBaseContract + from ._models import OperationResultContract + from ._models import OperationResultLogItemContract + from ._models import OperationTagResourceContractProperties + from ._models import OperationUpdateContract + from ._models import ParameterContract + from ._models import PipelineDiagnosticSettings + from ._models import PolicyCollection + from ._models import PolicyContract + from ._models import PolicySnippetContract + from ._models import PolicySnippetsCollection + from ._models import PortalDelegationSettings + from ._models import PortalSigninSettings + from ._models import PortalSignupSettings + from ._models import ProductContract + from ._models import ProductEntityBaseParameters + from ._models import ProductTagResourceContractProperties + from ._models import ProductUpdateParameters + from ._models import PropertyContract + from ._models import PropertyEntityBaseParameters + from ._models import PropertyUpdateParameters + from ._models import QuotaCounterCollection + from ._models import QuotaCounterContract + from ._models import QuotaCounterValueContract + from ._models import QuotaCounterValueContractProperties + from ._models import RecipientEmailCollection + from ._models import RecipientEmailContract + from ._models import RecipientsContractProperties + from ._models import RecipientUserCollection + from ._models import RecipientUserContract + from ._models import RegionContract + from ._models import RegistrationDelegationSettingsProperties + from ._models import ReportRecordContract + from ._models import RepresentationContract + from ._models import RequestContract + from ._models import RequestReportRecordContract + from ._models import Resource + from ._models import ResourceSku + from ._models import ResourceSkuCapacity + from ._models import ResourceSkuResult + from ._models import ResponseContract + from ._models import SamplingSettings + from ._models import SaveConfigurationParameter + from ._models import SchemaContract + from ._models import SchemaCreateOrUpdateContract + from ._models import SubscriptionContract + from ._models import SubscriptionCreateParameters + from ._models import SubscriptionKeyParameterNamesContract + from ._models import SubscriptionsDelegationSettingsProperties + from ._models import SubscriptionUpdateParameters + from ._models import TagContract + from ._models import TagCreateUpdateParameters + from ._models import TagDescriptionContract + from ._models import TagDescriptionCreateParameters + from ._models import TagResourceContract + from ._models import TagTagResourceContractProperties + from ._models import TenantConfigurationSyncStateContract + from ._models import TermsOfServiceProperties + from ._models import TokenBodyParameterContract + from ._models import UserContract + from ._models import UserCreateParameters + from ._models import UserEntityBaseParameters + from ._models import UserIdentityContract + from ._models import UserTokenParameters + from ._models import UserTokenResult + from ._models import UserUpdateParameters + from ._models import VirtualNetworkConfiguration + from ._models import X509CertificateName +from ._paged_models import ApiContractPaged +from ._paged_models import ApiManagementServiceResourcePaged +from ._paged_models import ApiReleaseContractPaged +from ._paged_models import ApiRevisionContractPaged +from ._paged_models import ApiVersionSetContractPaged +from ._paged_models import AuthorizationServerContractPaged +from ._paged_models import BackendContractPaged +from ._paged_models import CacheContractPaged +from ._paged_models import CertificateContractPaged +from ._paged_models import DiagnosticContractPaged +from ._paged_models import EmailTemplateContractPaged +from ._paged_models import GroupContractPaged +from ._paged_models import IdentityProviderContractPaged +from ._paged_models import IssueAttachmentContractPaged +from ._paged_models import IssueCommentContractPaged +from ._paged_models import IssueContractPaged +from ._paged_models import LoggerContractPaged +from ._paged_models import NotificationContractPaged +from ._paged_models import OpenidConnectProviderContractPaged +from ._paged_models import OperationContractPaged +from ._paged_models import OperationPaged +from ._paged_models import ProductContractPaged +from ._paged_models import PropertyContractPaged +from ._paged_models import RegionContractPaged +from ._paged_models import ReportRecordContractPaged +from ._paged_models import RequestReportRecordContractPaged +from ._paged_models import ResourceSkuResultPaged +from ._paged_models import SchemaContractPaged +from ._paged_models import SubscriptionContractPaged +from ._paged_models import TagContractPaged +from ._paged_models import TagDescriptionContractPaged +from ._paged_models import TagResourceContractPaged +from ._paged_models import UserContractPaged +from ._paged_models import UserIdentityContractPaged +from ._api_management_client_enums import ( ExportResultFormat, ProductState, BearerTokenSendingMethods, @@ -395,161 +395,161 @@ ) __all__ = [ - 'ErrorFieldContract', - 'ErrorResponseBody', - 'ErrorResponse', 'ErrorResponseException', - 'RegionContract', - 'Resource', - 'ApiExportResultValue', - 'ApiExportResult', - 'ProductEntityBaseParameters', - 'ProductTagResourceContractProperties', - 'OperationTagResourceContractProperties', - 'SubscriptionKeyParameterNamesContract', - 'OpenIdAuthenticationSettingsContract', - 'OAuth2AuthenticationSettingsContract', - 'AuthenticationSettingsContract', - 'ApiVersionSetContractDetails', - 'ApiCreateOrUpdatePropertiesWsdlSelector', + 'AccessInformationContract', + 'AccessInformationUpdateParameters', + 'AdditionalLocation', + 'ApiContract', 'ApiContractProperties', + 'ApiCreateOrUpdateParameter', + 'ApiCreateOrUpdatePropertiesWsdlSelector', 'ApiEntityBaseContract', - 'ApiTagResourceContractProperties', - 'TagTagResourceContractProperties', - 'TagResourceContract', - 'TagContract', - 'TagDescriptionContract', - 'TagDescriptionCreateParameters', - 'IssueAttachmentContract', - 'IssueCommentContract', - 'IssueContractBaseProperties', - 'IssueUpdateContract', - 'IssueContract', - 'BodyDiagnosticSettings', - 'HttpMessageDiagnostic', - 'PipelineDiagnosticSettings', - 'SamplingSettings', - 'DiagnosticContract', - 'SchemaContract', - 'SchemaCreateOrUpdateContract', - 'PolicyContract', - 'PolicyCollection', - 'ProductContract', - 'ParameterContract', - 'RepresentationContract', - 'ResponseContract', - 'RequestContract', - 'OperationEntityBaseContract', - 'OperationUpdateContract', - 'OperationContract', + 'ApiExportResult', + 'ApiExportResultValue', + 'ApiManagementServiceApplyNetworkConfigurationParameters', + 'ApiManagementServiceBackupRestoreParameters', + 'ApiManagementServiceBaseProperties', + 'ApiManagementServiceCheckNameAvailabilityParameters', + 'ApiManagementServiceGetSsoTokenResult', + 'ApiManagementServiceIdentity', + 'ApiManagementServiceNameAvailabilityResult', + 'ApiManagementServiceResource', + 'ApiManagementServiceSkuProperties', + 'ApiManagementServiceUpdateParameters', + 'ApimResource', 'ApiReleaseContract', 'ApiRevisionContract', + 'ApiRevisionInfoContract', + 'ApiTagResourceContractProperties', 'ApiUpdateContract', - 'ApiContract', - 'ApiCreateOrUpdateParameter', + 'ApiVersionSetContract', + 'ApiVersionSetContractDetails', 'ApiVersionSetEntityBase', 'ApiVersionSetUpdateParameters', - 'ApiVersionSetContract', - 'TokenBodyParameterContract', + 'AuthenticationSettingsContract', + 'AuthorizationServerContract', 'AuthorizationServerContractBaseProperties', 'AuthorizationServerUpdateContract', - 'AuthorizationServerContract', - 'BackendReconnectContract', - 'BackendTlsProperties', - 'BackendProxyContract', 'BackendAuthorizationHeaderCredentials', + 'BackendBaseParameters', + 'BackendContract', 'BackendCredentialsContract', - 'X509CertificateName', - 'BackendServiceFabricClusterProperties', 'BackendProperties', - 'BackendBaseParameters', + 'BackendProxyContract', + 'BackendReconnectContract', + 'BackendServiceFabricClusterProperties', + 'BackendTlsProperties', 'BackendUpdateParameters', - 'BackendContract', - 'CacheUpdateParameters', + 'BodyDiagnosticSettings', 'CacheContract', + 'CacheUpdateParameters', + 'CertificateConfiguration', 'CertificateContract', 'CertificateCreateOrUpdateParameters', - 'ResourceSku', - 'ResourceSkuCapacity', - 'ResourceSkuResult', 'CertificateInformation', - 'CertificateConfiguration', - 'HostnameConfiguration', - 'VirtualNetworkConfiguration', - 'ApiManagementServiceSkuProperties', - 'AdditionalLocation', - 'ApiManagementServiceBackupRestoreParameters', - 'ApiManagementServiceBaseProperties', - 'ApiManagementServiceIdentity', - 'ApiManagementServiceResource', - 'ApimResource', - 'ApiManagementServiceUpdateParameters', - 'ApiManagementServiceGetSsoTokenResult', - 'ApiManagementServiceCheckNameAvailabilityParameters', - 'ApiManagementServiceNameAvailabilityResult', - 'ApiManagementServiceApplyNetworkConfigurationParameters', - 'OperationDisplay', - 'Operation', + 'ConnectivityStatusContract', + 'DeployConfigurationParameters', + 'DiagnosticContract', + 'EmailTemplateContract', 'EmailTemplateParametersContractProperties', 'EmailTemplateUpdateParameters', - 'EmailTemplateContract', - 'UserIdentityContract', - 'UserEntityBaseParameters', - 'GroupContractProperties', - 'UserContract', - 'GroupUpdateParameters', + 'ErrorFieldContract', + 'ErrorResponse', 'ErrorResponseException', + 'ErrorResponseBody', + 'GenerateSsoUrlResult', 'GroupContract', + 'GroupContractProperties', 'GroupCreateParameters', + 'GroupUpdateParameters', + 'HostnameConfiguration', + 'HttpMessageDiagnostic', 'IdentityProviderBaseParameters', - 'IdentityProviderUpdateParameters', 'IdentityProviderContract', - 'LoggerUpdateContract', + 'IdentityProviderUpdateParameters', + 'IssueAttachmentContract', + 'IssueCommentContract', + 'IssueContract', + 'IssueContractBaseProperties', + 'IssueUpdateContract', 'LoggerContract', - 'ConnectivityStatusContract', + 'LoggerUpdateContract', 'NetworkStatusContract', 'NetworkStatusContractByLocation', - 'RecipientEmailContract', - 'RecipientEmailCollection', - 'RecipientUserContract', - 'RecipientUserCollection', - 'RecipientsContractProperties', 'NotificationContract', - 'OpenidConnectProviderUpdateContract', + 'OAuth2AuthenticationSettingsContract', + 'OpenIdAuthenticationSettingsContract', 'OpenidConnectProviderContract', + 'OpenidConnectProviderUpdateContract', + 'Operation', + 'OperationContract', + 'OperationDisplay', + 'OperationEntityBaseContract', + 'OperationResultContract', + 'OperationResultLogItemContract', + 'OperationTagResourceContractProperties', + 'OperationUpdateContract', + 'ParameterContract', + 'PipelineDiagnosticSettings', + 'PolicyCollection', + 'PolicyContract', 'PolicySnippetContract', 'PolicySnippetsCollection', - 'RegistrationDelegationSettingsProperties', - 'SubscriptionsDelegationSettingsProperties', 'PortalDelegationSettings', - 'TermsOfServiceProperties', - 'PortalSignupSettings', 'PortalSigninSettings', - 'SubscriptionContract', + 'PortalSignupSettings', + 'ProductContract', + 'ProductEntityBaseParameters', + 'ProductTagResourceContractProperties', 'ProductUpdateParameters', + 'PropertyContract', 'PropertyEntityBaseParameters', 'PropertyUpdateParameters', - 'PropertyContract', - 'QuotaCounterValueContractProperties', - 'QuotaCounterContract', 'QuotaCounterCollection', - 'RequestReportRecordContract', + 'QuotaCounterContract', + 'QuotaCounterValueContract', + 'QuotaCounterValueContractProperties', + 'RecipientEmailCollection', + 'RecipientEmailContract', + 'RecipientsContractProperties', + 'RecipientUserCollection', + 'RecipientUserContract', + 'RegionContract', + 'RegistrationDelegationSettingsProperties', 'ReportRecordContract', - 'SubscriptionUpdateParameters', + 'RepresentationContract', + 'RequestContract', + 'RequestReportRecordContract', + 'Resource', + 'ResourceSku', + 'ResourceSkuCapacity', + 'ResourceSkuResult', + 'ResponseContract', + 'SamplingSettings', + 'SaveConfigurationParameter', + 'SchemaContract', + 'SchemaCreateOrUpdateContract', + 'SubscriptionContract', 'SubscriptionCreateParameters', + 'SubscriptionKeyParameterNamesContract', + 'SubscriptionsDelegationSettingsProperties', + 'SubscriptionUpdateParameters', + 'TagContract', 'TagCreateUpdateParameters', + 'TagDescriptionContract', + 'TagDescriptionCreateParameters', + 'TagResourceContract', + 'TagTagResourceContractProperties', 'TenantConfigurationSyncStateContract', - 'OperationResultLogItemContract', - 'OperationResultContract', - 'DeployConfigurationParameters', - 'SaveConfigurationParameter', - 'AccessInformationContract', - 'AccessInformationUpdateParameters', - 'UserTokenResult', + 'TermsOfServiceProperties', + 'TokenBodyParameterContract', + 'UserContract', + 'UserCreateParameters', + 'UserEntityBaseParameters', + 'UserIdentityContract', 'UserTokenParameters', - 'GenerateSsoUrlResult', + 'UserTokenResult', 'UserUpdateParameters', - 'UserCreateParameters', - 'ApiRevisionInfoContract', - 'QuotaCounterValueContract', + 'VirtualNetworkConfiguration', + 'X509CertificateName', 'ApiContractPaged', 'TagResourceContractPaged', 'ApiRevisionContractPaged', diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_client_enums.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_api_management_client_enums.py similarity index 100% rename from sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_client_enums.py rename to sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_api_management_client_enums.py diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models.py new file mode 100644 index 000000000000..0c23d077a3d7 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models.py @@ -0,0 +1,7289 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AccessInformationContract(Model): + """Tenant access information contract of the API Management service. + + :param id: Identifier. + :type id: str + :param primary_key: Primary access key. + :type primary_key: str + :param secondary_key: Secondary access key. + :type secondary_key: str + :param enabled: Determines whether direct access is enabled. + :type enabled: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(AccessInformationContract, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.primary_key = kwargs.get('primary_key', None) + self.secondary_key = kwargs.get('secondary_key', None) + self.enabled = kwargs.get('enabled', None) + + +class AccessInformationUpdateParameters(Model): + """Tenant access information update parameters. + + :param enabled: Determines whether direct access is enabled. + :type enabled: bool + """ + + _attribute_map = { + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(AccessInformationUpdateParameters, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + + +class AdditionalLocation(Model): + """Description of an additional API Management resource location. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The location name of the additional region + among Azure Data center regions. + :type location: str + :param sku: Required. SKU properties of the API Management service. + :type sku: + ~azure.mgmt.apimanagement.models.ApiManagementServiceSkuProperties + :ivar public_ip_addresses: Public Static Load Balanced IP addresses of the + API Management service in the additional location. Available only for + Basic, Standard and Premium SKU. + :vartype public_ip_addresses: list[str] + :ivar private_ip_addresses: Private Static Load Balanced IP addresses of + the API Management service which is deployed in an Internal Virtual + Network in a particular additional location. Available only for Basic, + Standard and Premium SKU. + :vartype private_ip_addresses: list[str] + :param virtual_network_configuration: Virtual network configuration for + the location. + :type virtual_network_configuration: + ~azure.mgmt.apimanagement.models.VirtualNetworkConfiguration + :ivar gateway_regional_url: Gateway URL of the API Management service in + the Region. + :vartype gateway_regional_url: str + """ + + _validation = { + 'location': {'required': True}, + 'sku': {'required': True}, + 'public_ip_addresses': {'readonly': True}, + 'private_ip_addresses': {'readonly': True}, + 'gateway_regional_url': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'ApiManagementServiceSkuProperties'}, + 'public_ip_addresses': {'key': 'publicIPAddresses', 'type': '[str]'}, + 'private_ip_addresses': {'key': 'privateIPAddresses', 'type': '[str]'}, + 'virtual_network_configuration': {'key': 'virtualNetworkConfiguration', 'type': 'VirtualNetworkConfiguration'}, + 'gateway_regional_url': {'key': 'gatewayRegionalUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AdditionalLocation, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.sku = kwargs.get('sku', None) + self.public_ip_addresses = None + self.private_ip_addresses = None + self.virtual_network_configuration = kwargs.get('virtual_network_configuration', None) + self.gateway_regional_url = None + + +class Resource(Model): + """The Resource definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class ApiContract(Resource): + """Api details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param description: Description of the API. May include HTML formatting + tags. + :type description: str + :param authentication_settings: Collection of authentication settings + included into this API. + :type authentication_settings: + ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract + :param subscription_key_parameter_names: Protocols over which API is made + available. + :type subscription_key_parameter_names: + ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract + :param api_type: Type of API. Possible values include: 'http', 'soap' + :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType + :param api_revision: Describes the Revision of the Api. If no value is + provided, default revision 1 is created + :type api_revision: str + :param api_version: Indicates the Version identifier of the API if the API + is versioned + :type api_version: str + :param is_current: Indicates if API revision is current api revision. + :type is_current: bool + :ivar is_online: Indicates if API revision is accessible via the gateway. + :vartype is_online: bool + :param api_revision_description: Description of the Api Revision. + :type api_revision_description: str + :param api_version_description: Description of the Api Version. + :type api_version_description: str + :param api_version_set_id: A resource identifier for the related + ApiVersionSet. + :type api_version_set_id: str + :param subscription_required: Specifies whether an API or Product + subscription is required for accessing the API. + :type subscription_required: bool + :param source_api_id: API identifier of the source API. + :type source_api_id: str + :param display_name: API name. Must be 1 to 300 characters long. + :type display_name: str + :param service_url: Absolute URL of the backend service implementing this + API. Cannot be more than 2000 characters long. + :type service_url: str + :param path: Required. Relative URL uniquely identifying this API and all + of its resource paths within the API Management service instance. It is + appended to the API endpoint base URL specified during the service + instance creation to form a public URL for this API. + :type path: str + :param protocols: Describes on which protocols the operations in this API + can be invoked. + :type protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] + :param api_version_set: Version set details + :type api_version_set: + ~azure.mgmt.apimanagement.models.ApiVersionSetContractDetails + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'api_revision': {'max_length': 100, 'min_length': 1}, + 'api_version': {'max_length': 100}, + 'is_online': {'readonly': True}, + 'api_revision_description': {'max_length': 256}, + 'api_version_description': {'max_length': 256}, + 'display_name': {'max_length': 300, 'min_length': 1}, + 'service_url': {'max_length': 2000, 'min_length': 0}, + 'path': {'required': True, 'max_length': 400, 'min_length': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'authentication_settings': {'key': 'properties.authenticationSettings', 'type': 'AuthenticationSettingsContract'}, + 'subscription_key_parameter_names': {'key': 'properties.subscriptionKeyParameterNames', 'type': 'SubscriptionKeyParameterNamesContract'}, + 'api_type': {'key': 'properties.type', 'type': 'str'}, + 'api_revision': {'key': 'properties.apiRevision', 'type': 'str'}, + 'api_version': {'key': 'properties.apiVersion', 'type': 'str'}, + 'is_current': {'key': 'properties.isCurrent', 'type': 'bool'}, + 'is_online': {'key': 'properties.isOnline', 'type': 'bool'}, + 'api_revision_description': {'key': 'properties.apiRevisionDescription', 'type': 'str'}, + 'api_version_description': {'key': 'properties.apiVersionDescription', 'type': 'str'}, + 'api_version_set_id': {'key': 'properties.apiVersionSetId', 'type': 'str'}, + 'subscription_required': {'key': 'properties.subscriptionRequired', 'type': 'bool'}, + 'source_api_id': {'key': 'properties.sourceApiId', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'service_url': {'key': 'properties.serviceUrl', 'type': 'str'}, + 'path': {'key': 'properties.path', 'type': 'str'}, + 'protocols': {'key': 'properties.protocols', 'type': '[Protocol]'}, + 'api_version_set': {'key': 'properties.apiVersionSet', 'type': 'ApiVersionSetContractDetails'}, + } + + def __init__(self, **kwargs): + super(ApiContract, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.authentication_settings = kwargs.get('authentication_settings', None) + self.subscription_key_parameter_names = kwargs.get('subscription_key_parameter_names', None) + self.api_type = kwargs.get('api_type', None) + self.api_revision = kwargs.get('api_revision', None) + self.api_version = kwargs.get('api_version', None) + self.is_current = kwargs.get('is_current', None) + self.is_online = None + self.api_revision_description = kwargs.get('api_revision_description', None) + self.api_version_description = kwargs.get('api_version_description', None) + self.api_version_set_id = kwargs.get('api_version_set_id', None) + self.subscription_required = kwargs.get('subscription_required', None) + self.source_api_id = kwargs.get('source_api_id', None) + self.display_name = kwargs.get('display_name', None) + self.service_url = kwargs.get('service_url', None) + self.path = kwargs.get('path', None) + self.protocols = kwargs.get('protocols', None) + self.api_version_set = kwargs.get('api_version_set', None) + + +class ApiEntityBaseContract(Model): + """API base contract details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param description: Description of the API. May include HTML formatting + tags. + :type description: str + :param authentication_settings: Collection of authentication settings + included into this API. + :type authentication_settings: + ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract + :param subscription_key_parameter_names: Protocols over which API is made + available. + :type subscription_key_parameter_names: + ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract + :param api_type: Type of API. Possible values include: 'http', 'soap' + :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType + :param api_revision: Describes the Revision of the Api. If no value is + provided, default revision 1 is created + :type api_revision: str + :param api_version: Indicates the Version identifier of the API if the API + is versioned + :type api_version: str + :param is_current: Indicates if API revision is current api revision. + :type is_current: bool + :ivar is_online: Indicates if API revision is accessible via the gateway. + :vartype is_online: bool + :param api_revision_description: Description of the Api Revision. + :type api_revision_description: str + :param api_version_description: Description of the Api Version. + :type api_version_description: str + :param api_version_set_id: A resource identifier for the related + ApiVersionSet. + :type api_version_set_id: str + :param subscription_required: Specifies whether an API or Product + subscription is required for accessing the API. + :type subscription_required: bool + """ + + _validation = { + 'api_revision': {'max_length': 100, 'min_length': 1}, + 'api_version': {'max_length': 100}, + 'is_online': {'readonly': True}, + 'api_revision_description': {'max_length': 256}, + 'api_version_description': {'max_length': 256}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'authentication_settings': {'key': 'authenticationSettings', 'type': 'AuthenticationSettingsContract'}, + 'subscription_key_parameter_names': {'key': 'subscriptionKeyParameterNames', 'type': 'SubscriptionKeyParameterNamesContract'}, + 'api_type': {'key': 'type', 'type': 'str'}, + 'api_revision': {'key': 'apiRevision', 'type': 'str'}, + 'api_version': {'key': 'apiVersion', 'type': 'str'}, + 'is_current': {'key': 'isCurrent', 'type': 'bool'}, + 'is_online': {'key': 'isOnline', 'type': 'bool'}, + 'api_revision_description': {'key': 'apiRevisionDescription', 'type': 'str'}, + 'api_version_description': {'key': 'apiVersionDescription', 'type': 'str'}, + 'api_version_set_id': {'key': 'apiVersionSetId', 'type': 'str'}, + 'subscription_required': {'key': 'subscriptionRequired', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ApiEntityBaseContract, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.authentication_settings = kwargs.get('authentication_settings', None) + self.subscription_key_parameter_names = kwargs.get('subscription_key_parameter_names', None) + self.api_type = kwargs.get('api_type', None) + self.api_revision = kwargs.get('api_revision', None) + self.api_version = kwargs.get('api_version', None) + self.is_current = kwargs.get('is_current', None) + self.is_online = None + self.api_revision_description = kwargs.get('api_revision_description', None) + self.api_version_description = kwargs.get('api_version_description', None) + self.api_version_set_id = kwargs.get('api_version_set_id', None) + self.subscription_required = kwargs.get('subscription_required', None) + + +class ApiContractProperties(ApiEntityBaseContract): + """Api Entity Properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param description: Description of the API. May include HTML formatting + tags. + :type description: str + :param authentication_settings: Collection of authentication settings + included into this API. + :type authentication_settings: + ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract + :param subscription_key_parameter_names: Protocols over which API is made + available. + :type subscription_key_parameter_names: + ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract + :param api_type: Type of API. Possible values include: 'http', 'soap' + :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType + :param api_revision: Describes the Revision of the Api. If no value is + provided, default revision 1 is created + :type api_revision: str + :param api_version: Indicates the Version identifier of the API if the API + is versioned + :type api_version: str + :param is_current: Indicates if API revision is current api revision. + :type is_current: bool + :ivar is_online: Indicates if API revision is accessible via the gateway. + :vartype is_online: bool + :param api_revision_description: Description of the Api Revision. + :type api_revision_description: str + :param api_version_description: Description of the Api Version. + :type api_version_description: str + :param api_version_set_id: A resource identifier for the related + ApiVersionSet. + :type api_version_set_id: str + :param subscription_required: Specifies whether an API or Product + subscription is required for accessing the API. + :type subscription_required: bool + :param source_api_id: API identifier of the source API. + :type source_api_id: str + :param display_name: API name. Must be 1 to 300 characters long. + :type display_name: str + :param service_url: Absolute URL of the backend service implementing this + API. Cannot be more than 2000 characters long. + :type service_url: str + :param path: Required. Relative URL uniquely identifying this API and all + of its resource paths within the API Management service instance. It is + appended to the API endpoint base URL specified during the service + instance creation to form a public URL for this API. + :type path: str + :param protocols: Describes on which protocols the operations in this API + can be invoked. + :type protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] + :param api_version_set: Version set details + :type api_version_set: + ~azure.mgmt.apimanagement.models.ApiVersionSetContractDetails + """ + + _validation = { + 'api_revision': {'max_length': 100, 'min_length': 1}, + 'api_version': {'max_length': 100}, + 'is_online': {'readonly': True}, + 'api_revision_description': {'max_length': 256}, + 'api_version_description': {'max_length': 256}, + 'display_name': {'max_length': 300, 'min_length': 1}, + 'service_url': {'max_length': 2000, 'min_length': 0}, + 'path': {'required': True, 'max_length': 400, 'min_length': 0}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'authentication_settings': {'key': 'authenticationSettings', 'type': 'AuthenticationSettingsContract'}, + 'subscription_key_parameter_names': {'key': 'subscriptionKeyParameterNames', 'type': 'SubscriptionKeyParameterNamesContract'}, + 'api_type': {'key': 'type', 'type': 'str'}, + 'api_revision': {'key': 'apiRevision', 'type': 'str'}, + 'api_version': {'key': 'apiVersion', 'type': 'str'}, + 'is_current': {'key': 'isCurrent', 'type': 'bool'}, + 'is_online': {'key': 'isOnline', 'type': 'bool'}, + 'api_revision_description': {'key': 'apiRevisionDescription', 'type': 'str'}, + 'api_version_description': {'key': 'apiVersionDescription', 'type': 'str'}, + 'api_version_set_id': {'key': 'apiVersionSetId', 'type': 'str'}, + 'subscription_required': {'key': 'subscriptionRequired', 'type': 'bool'}, + 'source_api_id': {'key': 'sourceApiId', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'service_url': {'key': 'serviceUrl', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'protocols': {'key': 'protocols', 'type': '[Protocol]'}, + 'api_version_set': {'key': 'apiVersionSet', 'type': 'ApiVersionSetContractDetails'}, + } + + def __init__(self, **kwargs): + super(ApiContractProperties, self).__init__(**kwargs) + self.source_api_id = kwargs.get('source_api_id', None) + self.display_name = kwargs.get('display_name', None) + self.service_url = kwargs.get('service_url', None) + self.path = kwargs.get('path', None) + self.protocols = kwargs.get('protocols', None) + self.api_version_set = kwargs.get('api_version_set', None) + + +class ApiCreateOrUpdateParameter(Model): + """API Create or Update Parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param description: Description of the API. May include HTML formatting + tags. + :type description: str + :param authentication_settings: Collection of authentication settings + included into this API. + :type authentication_settings: + ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract + :param subscription_key_parameter_names: Protocols over which API is made + available. + :type subscription_key_parameter_names: + ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract + :param api_type: Type of API. Possible values include: 'http', 'soap' + :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType + :param api_revision: Describes the Revision of the Api. If no value is + provided, default revision 1 is created + :type api_revision: str + :param api_version: Indicates the Version identifier of the API if the API + is versioned + :type api_version: str + :param is_current: Indicates if API revision is current api revision. + :type is_current: bool + :ivar is_online: Indicates if API revision is accessible via the gateway. + :vartype is_online: bool + :param api_revision_description: Description of the Api Revision. + :type api_revision_description: str + :param api_version_description: Description of the Api Version. + :type api_version_description: str + :param api_version_set_id: A resource identifier for the related + ApiVersionSet. + :type api_version_set_id: str + :param subscription_required: Specifies whether an API or Product + subscription is required for accessing the API. + :type subscription_required: bool + :param source_api_id: API identifier of the source API. + :type source_api_id: str + :param display_name: API name. Must be 1 to 300 characters long. + :type display_name: str + :param service_url: Absolute URL of the backend service implementing this + API. Cannot be more than 2000 characters long. + :type service_url: str + :param path: Required. Relative URL uniquely identifying this API and all + of its resource paths within the API Management service instance. It is + appended to the API endpoint base URL specified during the service + instance creation to form a public URL for this API. + :type path: str + :param protocols: Describes on which protocols the operations in this API + can be invoked. + :type protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] + :param api_version_set: Version set details + :type api_version_set: + ~azure.mgmt.apimanagement.models.ApiVersionSetContractDetails + :param value: Content value when Importing an API. + :type value: str + :param format: Format of the Content in which the API is getting imported. + Possible values include: 'wadl-xml', 'wadl-link-json', 'swagger-json', + 'swagger-link-json', 'wsdl', 'wsdl-link', 'openapi', 'openapi+json', + 'openapi-link' + :type format: str or ~azure.mgmt.apimanagement.models.ContentFormat + :param wsdl_selector: Criteria to limit import of WSDL to a subset of the + document. + :type wsdl_selector: + ~azure.mgmt.apimanagement.models.ApiCreateOrUpdatePropertiesWsdlSelector + :param soap_api_type: Type of Api to create. + * `http` creates a SOAP to REST API + * `soap` creates a SOAP pass-through API. Possible values include: + 'SoapToRest', 'SoapPassThrough' + :type soap_api_type: str or ~azure.mgmt.apimanagement.models.SoapApiType + """ + + _validation = { + 'api_revision': {'max_length': 100, 'min_length': 1}, + 'api_version': {'max_length': 100}, + 'is_online': {'readonly': True}, + 'api_revision_description': {'max_length': 256}, + 'api_version_description': {'max_length': 256}, + 'display_name': {'max_length': 300, 'min_length': 1}, + 'service_url': {'max_length': 2000, 'min_length': 0}, + 'path': {'required': True, 'max_length': 400, 'min_length': 0}, + } + + _attribute_map = { + 'description': {'key': 'properties.description', 'type': 'str'}, + 'authentication_settings': {'key': 'properties.authenticationSettings', 'type': 'AuthenticationSettingsContract'}, + 'subscription_key_parameter_names': {'key': 'properties.subscriptionKeyParameterNames', 'type': 'SubscriptionKeyParameterNamesContract'}, + 'api_type': {'key': 'properties.type', 'type': 'str'}, + 'api_revision': {'key': 'properties.apiRevision', 'type': 'str'}, + 'api_version': {'key': 'properties.apiVersion', 'type': 'str'}, + 'is_current': {'key': 'properties.isCurrent', 'type': 'bool'}, + 'is_online': {'key': 'properties.isOnline', 'type': 'bool'}, + 'api_revision_description': {'key': 'properties.apiRevisionDescription', 'type': 'str'}, + 'api_version_description': {'key': 'properties.apiVersionDescription', 'type': 'str'}, + 'api_version_set_id': {'key': 'properties.apiVersionSetId', 'type': 'str'}, + 'subscription_required': {'key': 'properties.subscriptionRequired', 'type': 'bool'}, + 'source_api_id': {'key': 'properties.sourceApiId', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'service_url': {'key': 'properties.serviceUrl', 'type': 'str'}, + 'path': {'key': 'properties.path', 'type': 'str'}, + 'protocols': {'key': 'properties.protocols', 'type': '[Protocol]'}, + 'api_version_set': {'key': 'properties.apiVersionSet', 'type': 'ApiVersionSetContractDetails'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + 'format': {'key': 'properties.format', 'type': 'str'}, + 'wsdl_selector': {'key': 'properties.wsdlSelector', 'type': 'ApiCreateOrUpdatePropertiesWsdlSelector'}, + 'soap_api_type': {'key': 'properties.apiType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiCreateOrUpdateParameter, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.authentication_settings = kwargs.get('authentication_settings', None) + self.subscription_key_parameter_names = kwargs.get('subscription_key_parameter_names', None) + self.api_type = kwargs.get('api_type', None) + self.api_revision = kwargs.get('api_revision', None) + self.api_version = kwargs.get('api_version', None) + self.is_current = kwargs.get('is_current', None) + self.is_online = None + self.api_revision_description = kwargs.get('api_revision_description', None) + self.api_version_description = kwargs.get('api_version_description', None) + self.api_version_set_id = kwargs.get('api_version_set_id', None) + self.subscription_required = kwargs.get('subscription_required', None) + self.source_api_id = kwargs.get('source_api_id', None) + self.display_name = kwargs.get('display_name', None) + self.service_url = kwargs.get('service_url', None) + self.path = kwargs.get('path', None) + self.protocols = kwargs.get('protocols', None) + self.api_version_set = kwargs.get('api_version_set', None) + self.value = kwargs.get('value', None) + self.format = kwargs.get('format', None) + self.wsdl_selector = kwargs.get('wsdl_selector', None) + self.soap_api_type = kwargs.get('soap_api_type', None) + + +class ApiCreateOrUpdatePropertiesWsdlSelector(Model): + """Criteria to limit import of WSDL to a subset of the document. + + :param wsdl_service_name: Name of service to import from WSDL + :type wsdl_service_name: str + :param wsdl_endpoint_name: Name of endpoint(port) to import from WSDL + :type wsdl_endpoint_name: str + """ + + _attribute_map = { + 'wsdl_service_name': {'key': 'wsdlServiceName', 'type': 'str'}, + 'wsdl_endpoint_name': {'key': 'wsdlEndpointName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiCreateOrUpdatePropertiesWsdlSelector, self).__init__(**kwargs) + self.wsdl_service_name = kwargs.get('wsdl_service_name', None) + self.wsdl_endpoint_name = kwargs.get('wsdl_endpoint_name', None) + + +class ApiExportResult(Model): + """API Export result. + + :param id: ResourceId of the API which was exported. + :type id: str + :param export_result_format: Format in which the Api Details are exported + to the Storage Blob with Sas Key valid for 5 minutes. Possible values + include: 'Swagger', 'Wsdl', 'Wadl', 'OpenApi' + :type export_result_format: str or + ~azure.mgmt.apimanagement.models.ExportResultFormat + :param value: The object defining the schema of the exported Api Detail + :type value: ~azure.mgmt.apimanagement.models.ApiExportResultValue + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'export_result_format': {'key': 'format', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'ApiExportResultValue'}, + } + + def __init__(self, **kwargs): + super(ApiExportResult, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.export_result_format = kwargs.get('export_result_format', None) + self.value = kwargs.get('value', None) + + +class ApiExportResultValue(Model): + """The object defining the schema of the exported Api Detail. + + :param link: Link to the Storage Blob containing the result of the export + operation. The Blob Uri is only valid for 5 minutes. + :type link: str + """ + + _attribute_map = { + 'link': {'key': 'link', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiExportResultValue, self).__init__(**kwargs) + self.link = kwargs.get('link', None) + + +class ApiManagementServiceApplyNetworkConfigurationParameters(Model): + """Parameter supplied to the Apply Network configuration operation. + + :param location: Location of the Api Management service to update for a + multi-region service. For a service deployed in a single region, this + parameter is not required. + :type location: str + """ + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiManagementServiceApplyNetworkConfigurationParameters, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + + +class ApiManagementServiceBackupRestoreParameters(Model): + """Parameters supplied to the Backup/Restore of an API Management service + operation. + + All required parameters must be populated in order to send to Azure. + + :param storage_account: Required. Azure Cloud Storage account (used to + place/retrieve the backup) name. + :type storage_account: str + :param access_key: Required. Azure Cloud Storage account (used to + place/retrieve the backup) access key. + :type access_key: str + :param container_name: Required. Azure Cloud Storage blob container name + used to place/retrieve the backup. + :type container_name: str + :param backup_name: Required. The name of the backup file to create. + :type backup_name: str + """ + + _validation = { + 'storage_account': {'required': True}, + 'access_key': {'required': True}, + 'container_name': {'required': True}, + 'backup_name': {'required': True}, + } + + _attribute_map = { + 'storage_account': {'key': 'storageAccount', 'type': 'str'}, + 'access_key': {'key': 'accessKey', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'backup_name': {'key': 'backupName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiManagementServiceBackupRestoreParameters, self).__init__(**kwargs) + self.storage_account = kwargs.get('storage_account', None) + self.access_key = kwargs.get('access_key', None) + self.container_name = kwargs.get('container_name', None) + self.backup_name = kwargs.get('backup_name', None) + + +class ApiManagementServiceBaseProperties(Model): + """Base Properties of an API Management service resource description. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param notification_sender_email: Email address from which the + notification will be sent. + :type notification_sender_email: str + :ivar provisioning_state: The current provisioning state of the API + Management service which can be one of the following: + Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + :vartype provisioning_state: str + :ivar target_provisioning_state: The provisioning state of the API + Management service, which is targeted by the long running operation + started on the service. + :vartype target_provisioning_state: str + :ivar created_at_utc: Creation UTC date of the API Management service.The + date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified + by the ISO 8601 standard. + :vartype created_at_utc: datetime + :ivar gateway_url: Gateway URL of the API Management service. + :vartype gateway_url: str + :ivar gateway_regional_url: Gateway URL of the API Management service in + the Default Region. + :vartype gateway_regional_url: str + :ivar portal_url: Publisher portal endpoint Url of the API Management + service. + :vartype portal_url: str + :ivar management_api_url: Management API endpoint URL of the API + Management service. + :vartype management_api_url: str + :ivar scm_url: SCM endpoint URL of the API Management service. + :vartype scm_url: str + :param hostname_configurations: Custom hostname configuration of the API + Management service. + :type hostname_configurations: + list[~azure.mgmt.apimanagement.models.HostnameConfiguration] + :ivar public_ip_addresses: Public Static Load Balanced IP addresses of the + API Management service in Primary region. Available only for Basic, + Standard and Premium SKU. + :vartype public_ip_addresses: list[str] + :ivar private_ip_addresses: Private Static Load Balanced IP addresses of + the API Management service in Primary region which is deployed in an + Internal Virtual Network. Available only for Basic, Standard and Premium + SKU. + :vartype private_ip_addresses: list[str] + :param virtual_network_configuration: Virtual network configuration of the + API Management service. + :type virtual_network_configuration: + ~azure.mgmt.apimanagement.models.VirtualNetworkConfiguration + :param additional_locations: Additional datacenter locations of the API + Management service. + :type additional_locations: + list[~azure.mgmt.apimanagement.models.AdditionalLocation] + :param custom_properties: Custom properties of the API Management + service.
Setting + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` + will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 + and 1.2).
Setting + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` + can be used to disable just TLS 1.1.
Setting + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` + can be used to disable TLS 1.0 on an API Management service.
Setting + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` + can be used to disable just TLS 1.1 for communications with + backends.
Setting + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` + can be used to disable TLS 1.0 for communications with + backends.
Setting + `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can + be used to enable HTTP2 protocol on an API Management service.
Not + specifying any of these properties on PATCH operation will reset omitted + properties' values to their defaults. For all the settings except Http2 + the default value is `True` if the service was created on or before April + 1st 2018 and `False` otherwise. Http2 setting's default value is + `False`.

You can disable any of next ciphers by using settings + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: + TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, + TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, + TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, + TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, + TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. + The default value is `true` for them. + :type custom_properties: dict[str, str] + :param certificates: List of Certificates that need to be installed in the + API Management service. Max supported certificates that can be installed + is 10. + :type certificates: + list[~azure.mgmt.apimanagement.models.CertificateConfiguration] + :param enable_client_certificate: Property only meant to be used for + Consumption SKU Service. This enforces a client certificate to be + presented on each request to the gateway. This also enables the ability to + authenticate the certificate in the policy on the gateway. Default value: + False . + :type enable_client_certificate: bool + :param virtual_network_type: The type of VPN in which API Management + service needs to be configured in. None (Default Value) means the API + Management service is not part of any Virtual Network, External means the + API Management deployment is set up inside a Virtual Network having an + Internet Facing Endpoint, and Internal means that API Management + deployment is setup inside a Virtual Network having an Intranet Facing + Endpoint only. Possible values include: 'None', 'External', 'Internal'. + Default value: "None" . + :type virtual_network_type: str or + ~azure.mgmt.apimanagement.models.VirtualNetworkType + """ + + _validation = { + 'notification_sender_email': {'max_length': 100}, + 'provisioning_state': {'readonly': True}, + 'target_provisioning_state': {'readonly': True}, + 'created_at_utc': {'readonly': True}, + 'gateway_url': {'readonly': True}, + 'gateway_regional_url': {'readonly': True}, + 'portal_url': {'readonly': True}, + 'management_api_url': {'readonly': True}, + 'scm_url': {'readonly': True}, + 'public_ip_addresses': {'readonly': True}, + 'private_ip_addresses': {'readonly': True}, + } + + _attribute_map = { + 'notification_sender_email': {'key': 'notificationSenderEmail', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'target_provisioning_state': {'key': 'targetProvisioningState', 'type': 'str'}, + 'created_at_utc': {'key': 'createdAtUtc', 'type': 'iso-8601'}, + 'gateway_url': {'key': 'gatewayUrl', 'type': 'str'}, + 'gateway_regional_url': {'key': 'gatewayRegionalUrl', 'type': 'str'}, + 'portal_url': {'key': 'portalUrl', 'type': 'str'}, + 'management_api_url': {'key': 'managementApiUrl', 'type': 'str'}, + 'scm_url': {'key': 'scmUrl', 'type': 'str'}, + 'hostname_configurations': {'key': 'hostnameConfigurations', 'type': '[HostnameConfiguration]'}, + 'public_ip_addresses': {'key': 'publicIPAddresses', 'type': '[str]'}, + 'private_ip_addresses': {'key': 'privateIPAddresses', 'type': '[str]'}, + 'virtual_network_configuration': {'key': 'virtualNetworkConfiguration', 'type': 'VirtualNetworkConfiguration'}, + 'additional_locations': {'key': 'additionalLocations', 'type': '[AdditionalLocation]'}, + 'custom_properties': {'key': 'customProperties', 'type': '{str}'}, + 'certificates': {'key': 'certificates', 'type': '[CertificateConfiguration]'}, + 'enable_client_certificate': {'key': 'enableClientCertificate', 'type': 'bool'}, + 'virtual_network_type': {'key': 'virtualNetworkType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiManagementServiceBaseProperties, self).__init__(**kwargs) + self.notification_sender_email = kwargs.get('notification_sender_email', None) + self.provisioning_state = None + self.target_provisioning_state = None + self.created_at_utc = None + self.gateway_url = None + self.gateway_regional_url = None + self.portal_url = None + self.management_api_url = None + self.scm_url = None + self.hostname_configurations = kwargs.get('hostname_configurations', None) + self.public_ip_addresses = None + self.private_ip_addresses = None + self.virtual_network_configuration = kwargs.get('virtual_network_configuration', None) + self.additional_locations = kwargs.get('additional_locations', None) + self.custom_properties = kwargs.get('custom_properties', None) + self.certificates = kwargs.get('certificates', None) + self.enable_client_certificate = kwargs.get('enable_client_certificate', False) + self.virtual_network_type = kwargs.get('virtual_network_type', "None") + + +class ApiManagementServiceCheckNameAvailabilityParameters(Model): + """Parameters supplied to the CheckNameAvailability operation. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name to check for availability. + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiManagementServiceCheckNameAvailabilityParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class ApiManagementServiceGetSsoTokenResult(Model): + """The response of the GetSsoToken operation. + + :param redirect_uri: Redirect URL to the Publisher Portal containing the + SSO token. + :type redirect_uri: str + """ + + _attribute_map = { + 'redirect_uri': {'key': 'redirectUri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiManagementServiceGetSsoTokenResult, self).__init__(**kwargs) + self.redirect_uri = kwargs.get('redirect_uri', None) + + +class ApiManagementServiceIdentity(Model): + """Identity properties of the Api Management service resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. The identity type. Currently the only supported type + is 'SystemAssigned'. Default value: "SystemAssigned" . + :vartype type: str + :ivar principal_id: The principal id of the identity. + :vartype principal_id: str + :ivar tenant_id: The client tenant id of the identity. + :vartype tenant_id: str + """ + + _validation = { + 'type': {'required': True, 'constant': True}, + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + type = "SystemAssigned" + + def __init__(self, **kwargs): + super(ApiManagementServiceIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + + +class ApiManagementServiceNameAvailabilityResult(Model): + """Response of the CheckNameAvailability operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name_available: True if the name is available and can be used to + create a new API Management service; otherwise false. + :vartype name_available: bool + :ivar message: If reason == invalid, provide the user with the reason why + the given name is invalid, and provide the resource naming requirements so + that the user can select a valid name. If reason == AlreadyExists, explain + that is already in use, and direct them to select a + different name. + :vartype message: str + :param reason: Invalid indicates the name provided does not match the + resource provider’s naming requirements (incorrect length, unsupported + characters, etc.) AlreadyExists indicates that the name is already in use + and is therefore unavailable. Possible values include: 'Valid', 'Invalid', + 'AlreadyExists' + :type reason: str or + ~azure.mgmt.apimanagement.models.NameAvailabilityReason + """ + + _validation = { + 'name_available': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'message': {'key': 'message', 'type': 'str'}, + 'reason': {'key': 'reason', 'type': 'NameAvailabilityReason'}, + } + + def __init__(self, **kwargs): + super(ApiManagementServiceNameAvailabilityResult, self).__init__(**kwargs) + self.name_available = None + self.message = None + self.reason = kwargs.get('reason', None) + + +class ApimResource(Model): + """The Resource definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource is set to + Microsoft.ApiManagement. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ApimResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = kwargs.get('tags', None) + + +class ApiManagementServiceResource(ApimResource): + """A single API Management service resource in List or Get response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource is set to + Microsoft.ApiManagement. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param notification_sender_email: Email address from which the + notification will be sent. + :type notification_sender_email: str + :ivar provisioning_state: The current provisioning state of the API + Management service which can be one of the following: + Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + :vartype provisioning_state: str + :ivar target_provisioning_state: The provisioning state of the API + Management service, which is targeted by the long running operation + started on the service. + :vartype target_provisioning_state: str + :ivar created_at_utc: Creation UTC date of the API Management service.The + date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified + by the ISO 8601 standard. + :vartype created_at_utc: datetime + :ivar gateway_url: Gateway URL of the API Management service. + :vartype gateway_url: str + :ivar gateway_regional_url: Gateway URL of the API Management service in + the Default Region. + :vartype gateway_regional_url: str + :ivar portal_url: Publisher portal endpoint Url of the API Management + service. + :vartype portal_url: str + :ivar management_api_url: Management API endpoint URL of the API + Management service. + :vartype management_api_url: str + :ivar scm_url: SCM endpoint URL of the API Management service. + :vartype scm_url: str + :param hostname_configurations: Custom hostname configuration of the API + Management service. + :type hostname_configurations: + list[~azure.mgmt.apimanagement.models.HostnameConfiguration] + :ivar public_ip_addresses: Public Static Load Balanced IP addresses of the + API Management service in Primary region. Available only for Basic, + Standard and Premium SKU. + :vartype public_ip_addresses: list[str] + :ivar private_ip_addresses: Private Static Load Balanced IP addresses of + the API Management service in Primary region which is deployed in an + Internal Virtual Network. Available only for Basic, Standard and Premium + SKU. + :vartype private_ip_addresses: list[str] + :param virtual_network_configuration: Virtual network configuration of the + API Management service. + :type virtual_network_configuration: + ~azure.mgmt.apimanagement.models.VirtualNetworkConfiguration + :param additional_locations: Additional datacenter locations of the API + Management service. + :type additional_locations: + list[~azure.mgmt.apimanagement.models.AdditionalLocation] + :param custom_properties: Custom properties of the API Management + service.
Setting + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` + will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 + and 1.2).
Setting + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` + can be used to disable just TLS 1.1.
Setting + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` + can be used to disable TLS 1.0 on an API Management service.
Setting + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` + can be used to disable just TLS 1.1 for communications with + backends.
Setting + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` + can be used to disable TLS 1.0 for communications with + backends.
Setting + `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can + be used to enable HTTP2 protocol on an API Management service.
Not + specifying any of these properties on PATCH operation will reset omitted + properties' values to their defaults. For all the settings except Http2 + the default value is `True` if the service was created on or before April + 1st 2018 and `False` otherwise. Http2 setting's default value is + `False`.

You can disable any of next ciphers by using settings + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: + TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, + TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, + TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, + TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, + TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. + The default value is `true` for them. + :type custom_properties: dict[str, str] + :param certificates: List of Certificates that need to be installed in the + API Management service. Max supported certificates that can be installed + is 10. + :type certificates: + list[~azure.mgmt.apimanagement.models.CertificateConfiguration] + :param enable_client_certificate: Property only meant to be used for + Consumption SKU Service. This enforces a client certificate to be + presented on each request to the gateway. This also enables the ability to + authenticate the certificate in the policy on the gateway. Default value: + False . + :type enable_client_certificate: bool + :param virtual_network_type: The type of VPN in which API Management + service needs to be configured in. None (Default Value) means the API + Management service is not part of any Virtual Network, External means the + API Management deployment is set up inside a Virtual Network having an + Internet Facing Endpoint, and Internal means that API Management + deployment is setup inside a Virtual Network having an Intranet Facing + Endpoint only. Possible values include: 'None', 'External', 'Internal'. + Default value: "None" . + :type virtual_network_type: str or + ~azure.mgmt.apimanagement.models.VirtualNetworkType + :param publisher_email: Required. Publisher email. + :type publisher_email: str + :param publisher_name: Required. Publisher name. + :type publisher_name: str + :param sku: Required. SKU properties of the API Management service. + :type sku: + ~azure.mgmt.apimanagement.models.ApiManagementServiceSkuProperties + :param identity: Managed service identity of the Api Management service. + :type identity: + ~azure.mgmt.apimanagement.models.ApiManagementServiceIdentity + :param location: Required. Resource location. + :type location: str + :ivar etag: ETag of the resource. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'notification_sender_email': {'max_length': 100}, + 'provisioning_state': {'readonly': True}, + 'target_provisioning_state': {'readonly': True}, + 'created_at_utc': {'readonly': True}, + 'gateway_url': {'readonly': True}, + 'gateway_regional_url': {'readonly': True}, + 'portal_url': {'readonly': True}, + 'management_api_url': {'readonly': True}, + 'scm_url': {'readonly': True}, + 'public_ip_addresses': {'readonly': True}, + 'private_ip_addresses': {'readonly': True}, + 'publisher_email': {'required': True, 'max_length': 100}, + 'publisher_name': {'required': True, 'max_length': 100}, + 'sku': {'required': True}, + 'location': {'required': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'notification_sender_email': {'key': 'properties.notificationSenderEmail', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'target_provisioning_state': {'key': 'properties.targetProvisioningState', 'type': 'str'}, + 'created_at_utc': {'key': 'properties.createdAtUtc', 'type': 'iso-8601'}, + 'gateway_url': {'key': 'properties.gatewayUrl', 'type': 'str'}, + 'gateway_regional_url': {'key': 'properties.gatewayRegionalUrl', 'type': 'str'}, + 'portal_url': {'key': 'properties.portalUrl', 'type': 'str'}, + 'management_api_url': {'key': 'properties.managementApiUrl', 'type': 'str'}, + 'scm_url': {'key': 'properties.scmUrl', 'type': 'str'}, + 'hostname_configurations': {'key': 'properties.hostnameConfigurations', 'type': '[HostnameConfiguration]'}, + 'public_ip_addresses': {'key': 'properties.publicIPAddresses', 'type': '[str]'}, + 'private_ip_addresses': {'key': 'properties.privateIPAddresses', 'type': '[str]'}, + 'virtual_network_configuration': {'key': 'properties.virtualNetworkConfiguration', 'type': 'VirtualNetworkConfiguration'}, + 'additional_locations': {'key': 'properties.additionalLocations', 'type': '[AdditionalLocation]'}, + 'custom_properties': {'key': 'properties.customProperties', 'type': '{str}'}, + 'certificates': {'key': 'properties.certificates', 'type': '[CertificateConfiguration]'}, + 'enable_client_certificate': {'key': 'properties.enableClientCertificate', 'type': 'bool'}, + 'virtual_network_type': {'key': 'properties.virtualNetworkType', 'type': 'str'}, + 'publisher_email': {'key': 'properties.publisherEmail', 'type': 'str'}, + 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'ApiManagementServiceSkuProperties'}, + 'identity': {'key': 'identity', 'type': 'ApiManagementServiceIdentity'}, + 'location': {'key': 'location', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiManagementServiceResource, self).__init__(**kwargs) + self.notification_sender_email = kwargs.get('notification_sender_email', None) + self.provisioning_state = None + self.target_provisioning_state = None + self.created_at_utc = None + self.gateway_url = None + self.gateway_regional_url = None + self.portal_url = None + self.management_api_url = None + self.scm_url = None + self.hostname_configurations = kwargs.get('hostname_configurations', None) + self.public_ip_addresses = None + self.private_ip_addresses = None + self.virtual_network_configuration = kwargs.get('virtual_network_configuration', None) + self.additional_locations = kwargs.get('additional_locations', None) + self.custom_properties = kwargs.get('custom_properties', None) + self.certificates = kwargs.get('certificates', None) + self.enable_client_certificate = kwargs.get('enable_client_certificate', False) + self.virtual_network_type = kwargs.get('virtual_network_type', "None") + self.publisher_email = kwargs.get('publisher_email', None) + self.publisher_name = kwargs.get('publisher_name', None) + self.sku = kwargs.get('sku', None) + self.identity = kwargs.get('identity', None) + self.location = kwargs.get('location', None) + self.etag = None + + +class ApiManagementServiceSkuProperties(Model): + """API Management service resource SKU properties. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the Sku. Possible values include: + 'Developer', 'Standard', 'Premium', 'Basic', 'Consumption' + :type name: str or ~azure.mgmt.apimanagement.models.SkuType + :param capacity: Capacity of the SKU (number of deployed units of the + SKU). + :type capacity: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ApiManagementServiceSkuProperties, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.capacity = kwargs.get('capacity', None) + + +class ApiManagementServiceUpdateParameters(ApimResource): + """Parameter supplied to Update Api Management Service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource is set to + Microsoft.ApiManagement. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param notification_sender_email: Email address from which the + notification will be sent. + :type notification_sender_email: str + :ivar provisioning_state: The current provisioning state of the API + Management service which can be one of the following: + Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + :vartype provisioning_state: str + :ivar target_provisioning_state: The provisioning state of the API + Management service, which is targeted by the long running operation + started on the service. + :vartype target_provisioning_state: str + :ivar created_at_utc: Creation UTC date of the API Management service.The + date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified + by the ISO 8601 standard. + :vartype created_at_utc: datetime + :ivar gateway_url: Gateway URL of the API Management service. + :vartype gateway_url: str + :ivar gateway_regional_url: Gateway URL of the API Management service in + the Default Region. + :vartype gateway_regional_url: str + :ivar portal_url: Publisher portal endpoint Url of the API Management + service. + :vartype portal_url: str + :ivar management_api_url: Management API endpoint URL of the API + Management service. + :vartype management_api_url: str + :ivar scm_url: SCM endpoint URL of the API Management service. + :vartype scm_url: str + :param hostname_configurations: Custom hostname configuration of the API + Management service. + :type hostname_configurations: + list[~azure.mgmt.apimanagement.models.HostnameConfiguration] + :ivar public_ip_addresses: Public Static Load Balanced IP addresses of the + API Management service in Primary region. Available only for Basic, + Standard and Premium SKU. + :vartype public_ip_addresses: list[str] + :ivar private_ip_addresses: Private Static Load Balanced IP addresses of + the API Management service in Primary region which is deployed in an + Internal Virtual Network. Available only for Basic, Standard and Premium + SKU. + :vartype private_ip_addresses: list[str] + :param virtual_network_configuration: Virtual network configuration of the + API Management service. + :type virtual_network_configuration: + ~azure.mgmt.apimanagement.models.VirtualNetworkConfiguration + :param additional_locations: Additional datacenter locations of the API + Management service. + :type additional_locations: + list[~azure.mgmt.apimanagement.models.AdditionalLocation] + :param custom_properties: Custom properties of the API Management + service.
Setting + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` + will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 + and 1.2).
Setting + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` + can be used to disable just TLS 1.1.
Setting + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` + can be used to disable TLS 1.0 on an API Management service.
Setting + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` + can be used to disable just TLS 1.1 for communications with + backends.
Setting + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` + can be used to disable TLS 1.0 for communications with + backends.
Setting + `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can + be used to enable HTTP2 protocol on an API Management service.
Not + specifying any of these properties on PATCH operation will reset omitted + properties' values to their defaults. For all the settings except Http2 + the default value is `True` if the service was created on or before April + 1st 2018 and `False` otherwise. Http2 setting's default value is + `False`.

You can disable any of next ciphers by using settings + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: + TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, + TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, + TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, + TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, + TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. + The default value is `true` for them. + :type custom_properties: dict[str, str] + :param certificates: List of Certificates that need to be installed in the + API Management service. Max supported certificates that can be installed + is 10. + :type certificates: + list[~azure.mgmt.apimanagement.models.CertificateConfiguration] + :param enable_client_certificate: Property only meant to be used for + Consumption SKU Service. This enforces a client certificate to be + presented on each request to the gateway. This also enables the ability to + authenticate the certificate in the policy on the gateway. Default value: + False . + :type enable_client_certificate: bool + :param virtual_network_type: The type of VPN in which API Management + service needs to be configured in. None (Default Value) means the API + Management service is not part of any Virtual Network, External means the + API Management deployment is set up inside a Virtual Network having an + Internet Facing Endpoint, and Internal means that API Management + deployment is setup inside a Virtual Network having an Intranet Facing + Endpoint only. Possible values include: 'None', 'External', 'Internal'. + Default value: "None" . + :type virtual_network_type: str or + ~azure.mgmt.apimanagement.models.VirtualNetworkType + :param publisher_email: Publisher email. + :type publisher_email: str + :param publisher_name: Publisher name. + :type publisher_name: str + :param sku: SKU properties of the API Management service. + :type sku: + ~azure.mgmt.apimanagement.models.ApiManagementServiceSkuProperties + :param identity: Managed service identity of the Api Management service. + :type identity: + ~azure.mgmt.apimanagement.models.ApiManagementServiceIdentity + :ivar etag: ETag of the resource. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'notification_sender_email': {'max_length': 100}, + 'provisioning_state': {'readonly': True}, + 'target_provisioning_state': {'readonly': True}, + 'created_at_utc': {'readonly': True}, + 'gateway_url': {'readonly': True}, + 'gateway_regional_url': {'readonly': True}, + 'portal_url': {'readonly': True}, + 'management_api_url': {'readonly': True}, + 'scm_url': {'readonly': True}, + 'public_ip_addresses': {'readonly': True}, + 'private_ip_addresses': {'readonly': True}, + 'publisher_email': {'max_length': 100}, + 'publisher_name': {'max_length': 100}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'notification_sender_email': {'key': 'properties.notificationSenderEmail', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'target_provisioning_state': {'key': 'properties.targetProvisioningState', 'type': 'str'}, + 'created_at_utc': {'key': 'properties.createdAtUtc', 'type': 'iso-8601'}, + 'gateway_url': {'key': 'properties.gatewayUrl', 'type': 'str'}, + 'gateway_regional_url': {'key': 'properties.gatewayRegionalUrl', 'type': 'str'}, + 'portal_url': {'key': 'properties.portalUrl', 'type': 'str'}, + 'management_api_url': {'key': 'properties.managementApiUrl', 'type': 'str'}, + 'scm_url': {'key': 'properties.scmUrl', 'type': 'str'}, + 'hostname_configurations': {'key': 'properties.hostnameConfigurations', 'type': '[HostnameConfiguration]'}, + 'public_ip_addresses': {'key': 'properties.publicIPAddresses', 'type': '[str]'}, + 'private_ip_addresses': {'key': 'properties.privateIPAddresses', 'type': '[str]'}, + 'virtual_network_configuration': {'key': 'properties.virtualNetworkConfiguration', 'type': 'VirtualNetworkConfiguration'}, + 'additional_locations': {'key': 'properties.additionalLocations', 'type': '[AdditionalLocation]'}, + 'custom_properties': {'key': 'properties.customProperties', 'type': '{str}'}, + 'certificates': {'key': 'properties.certificates', 'type': '[CertificateConfiguration]'}, + 'enable_client_certificate': {'key': 'properties.enableClientCertificate', 'type': 'bool'}, + 'virtual_network_type': {'key': 'properties.virtualNetworkType', 'type': 'str'}, + 'publisher_email': {'key': 'properties.publisherEmail', 'type': 'str'}, + 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'ApiManagementServiceSkuProperties'}, + 'identity': {'key': 'identity', 'type': 'ApiManagementServiceIdentity'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiManagementServiceUpdateParameters, self).__init__(**kwargs) + self.notification_sender_email = kwargs.get('notification_sender_email', None) + self.provisioning_state = None + self.target_provisioning_state = None + self.created_at_utc = None + self.gateway_url = None + self.gateway_regional_url = None + self.portal_url = None + self.management_api_url = None + self.scm_url = None + self.hostname_configurations = kwargs.get('hostname_configurations', None) + self.public_ip_addresses = None + self.private_ip_addresses = None + self.virtual_network_configuration = kwargs.get('virtual_network_configuration', None) + self.additional_locations = kwargs.get('additional_locations', None) + self.custom_properties = kwargs.get('custom_properties', None) + self.certificates = kwargs.get('certificates', None) + self.enable_client_certificate = kwargs.get('enable_client_certificate', False) + self.virtual_network_type = kwargs.get('virtual_network_type', "None") + self.publisher_email = kwargs.get('publisher_email', None) + self.publisher_name = kwargs.get('publisher_name', None) + self.sku = kwargs.get('sku', None) + self.identity = kwargs.get('identity', None) + self.etag = None + + +class ApiReleaseContract(Resource): + """ApiRelease details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param api_id: Identifier of the API the release belongs to. + :type api_id: str + :ivar created_date_time: The time the API was released. The date conforms + to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 + standard. + :vartype created_date_time: datetime + :ivar updated_date_time: The time the API release was updated. + :vartype updated_date_time: datetime + :param notes: Release Notes + :type notes: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date_time': {'readonly': True}, + 'updated_date_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'api_id': {'key': 'properties.apiId', 'type': 'str'}, + 'created_date_time': {'key': 'properties.createdDateTime', 'type': 'iso-8601'}, + 'updated_date_time': {'key': 'properties.updatedDateTime', 'type': 'iso-8601'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiReleaseContract, self).__init__(**kwargs) + self.api_id = kwargs.get('api_id', None) + self.created_date_time = None + self.updated_date_time = None + self.notes = kwargs.get('notes', None) + + +class ApiRevisionContract(Model): + """Summary of revision metadata. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar api_id: Identifier of the API Revision. + :vartype api_id: str + :ivar api_revision: Revision number of API. + :vartype api_revision: str + :ivar created_date_time: The time the API Revision was created. The date + conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the + ISO 8601 standard. + :vartype created_date_time: datetime + :ivar updated_date_time: The time the API Revision were updated. The date + conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the + ISO 8601 standard. + :vartype updated_date_time: datetime + :ivar description: Description of the API Revision. + :vartype description: str + :ivar private_url: Gateway URL for accessing the non-current API Revision. + :vartype private_url: str + :ivar is_online: Indicates if API revision is the current api revision. + :vartype is_online: bool + :ivar is_current: Indicates if API revision is accessible via the gateway. + :vartype is_current: bool + """ + + _validation = { + 'api_id': {'readonly': True}, + 'api_revision': {'readonly': True, 'max_length': 100, 'min_length': 1}, + 'created_date_time': {'readonly': True}, + 'updated_date_time': {'readonly': True}, + 'description': {'readonly': True, 'max_length': 256}, + 'private_url': {'readonly': True}, + 'is_online': {'readonly': True}, + 'is_current': {'readonly': True}, + } + + _attribute_map = { + 'api_id': {'key': 'apiId', 'type': 'str'}, + 'api_revision': {'key': 'apiRevision', 'type': 'str'}, + 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, + 'updated_date_time': {'key': 'updatedDateTime', 'type': 'iso-8601'}, + 'description': {'key': 'description', 'type': 'str'}, + 'private_url': {'key': 'privateUrl', 'type': 'str'}, + 'is_online': {'key': 'isOnline', 'type': 'bool'}, + 'is_current': {'key': 'isCurrent', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ApiRevisionContract, self).__init__(**kwargs) + self.api_id = None + self.api_revision = None + self.created_date_time = None + self.updated_date_time = None + self.description = None + self.private_url = None + self.is_online = None + self.is_current = None + + +class ApiRevisionInfoContract(Model): + """Object used to create an API Revision or Version based on an existing API + Revision. + + :param source_api_id: Resource identifier of API to be used to create the + revision from. + :type source_api_id: str + :param api_version_name: Version identifier for the new API Version. + :type api_version_name: str + :param api_revision_description: Description of new API Revision. + :type api_revision_description: str + :param api_version_set: Version set details + :type api_version_set: + ~azure.mgmt.apimanagement.models.ApiVersionSetContractDetails + """ + + _validation = { + 'api_version_name': {'max_length': 100}, + 'api_revision_description': {'max_length': 256}, + } + + _attribute_map = { + 'source_api_id': {'key': 'sourceApiId', 'type': 'str'}, + 'api_version_name': {'key': 'apiVersionName', 'type': 'str'}, + 'api_revision_description': {'key': 'apiRevisionDescription', 'type': 'str'}, + 'api_version_set': {'key': 'apiVersionSet', 'type': 'ApiVersionSetContractDetails'}, + } + + def __init__(self, **kwargs): + super(ApiRevisionInfoContract, self).__init__(**kwargs) + self.source_api_id = kwargs.get('source_api_id', None) + self.api_version_name = kwargs.get('api_version_name', None) + self.api_revision_description = kwargs.get('api_revision_description', None) + self.api_version_set = kwargs.get('api_version_set', None) + + +class ApiTagResourceContractProperties(ApiEntityBaseContract): + """API contract properties for the Tag Resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param description: Description of the API. May include HTML formatting + tags. + :type description: str + :param authentication_settings: Collection of authentication settings + included into this API. + :type authentication_settings: + ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract + :param subscription_key_parameter_names: Protocols over which API is made + available. + :type subscription_key_parameter_names: + ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract + :param api_type: Type of API. Possible values include: 'http', 'soap' + :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType + :param api_revision: Describes the Revision of the Api. If no value is + provided, default revision 1 is created + :type api_revision: str + :param api_version: Indicates the Version identifier of the API if the API + is versioned + :type api_version: str + :param is_current: Indicates if API revision is current api revision. + :type is_current: bool + :ivar is_online: Indicates if API revision is accessible via the gateway. + :vartype is_online: bool + :param api_revision_description: Description of the Api Revision. + :type api_revision_description: str + :param api_version_description: Description of the Api Version. + :type api_version_description: str + :param api_version_set_id: A resource identifier for the related + ApiVersionSet. + :type api_version_set_id: str + :param subscription_required: Specifies whether an API or Product + subscription is required for accessing the API. + :type subscription_required: bool + :param id: API identifier in the form /apis/{apiId}. + :type id: str + :param name: API name. + :type name: str + :param service_url: Absolute URL of the backend service implementing this + API. + :type service_url: str + :param path: Relative URL uniquely identifying this API and all of its + resource paths within the API Management service instance. It is appended + to the API endpoint base URL specified during the service instance + creation to form a public URL for this API. + :type path: str + :param protocols: Describes on which protocols the operations in this API + can be invoked. + :type protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] + """ + + _validation = { + 'api_revision': {'max_length': 100, 'min_length': 1}, + 'api_version': {'max_length': 100}, + 'is_online': {'readonly': True}, + 'api_revision_description': {'max_length': 256}, + 'api_version_description': {'max_length': 256}, + 'name': {'max_length': 300, 'min_length': 1}, + 'service_url': {'max_length': 2000, 'min_length': 1}, + 'path': {'max_length': 400, 'min_length': 0}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'authentication_settings': {'key': 'authenticationSettings', 'type': 'AuthenticationSettingsContract'}, + 'subscription_key_parameter_names': {'key': 'subscriptionKeyParameterNames', 'type': 'SubscriptionKeyParameterNamesContract'}, + 'api_type': {'key': 'type', 'type': 'str'}, + 'api_revision': {'key': 'apiRevision', 'type': 'str'}, + 'api_version': {'key': 'apiVersion', 'type': 'str'}, + 'is_current': {'key': 'isCurrent', 'type': 'bool'}, + 'is_online': {'key': 'isOnline', 'type': 'bool'}, + 'api_revision_description': {'key': 'apiRevisionDescription', 'type': 'str'}, + 'api_version_description': {'key': 'apiVersionDescription', 'type': 'str'}, + 'api_version_set_id': {'key': 'apiVersionSetId', 'type': 'str'}, + 'subscription_required': {'key': 'subscriptionRequired', 'type': 'bool'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'service_url': {'key': 'serviceUrl', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'protocols': {'key': 'protocols', 'type': '[Protocol]'}, + } + + def __init__(self, **kwargs): + super(ApiTagResourceContractProperties, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.service_url = kwargs.get('service_url', None) + self.path = kwargs.get('path', None) + self.protocols = kwargs.get('protocols', None) + + +class ApiUpdateContract(Model): + """API update contract details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param description: Description of the API. May include HTML formatting + tags. + :type description: str + :param authentication_settings: Collection of authentication settings + included into this API. + :type authentication_settings: + ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract + :param subscription_key_parameter_names: Protocols over which API is made + available. + :type subscription_key_parameter_names: + ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract + :param api_type: Type of API. Possible values include: 'http', 'soap' + :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType + :param api_revision: Describes the Revision of the Api. If no value is + provided, default revision 1 is created + :type api_revision: str + :param api_version: Indicates the Version identifier of the API if the API + is versioned + :type api_version: str + :param is_current: Indicates if API revision is current api revision. + :type is_current: bool + :ivar is_online: Indicates if API revision is accessible via the gateway. + :vartype is_online: bool + :param api_revision_description: Description of the Api Revision. + :type api_revision_description: str + :param api_version_description: Description of the Api Version. + :type api_version_description: str + :param api_version_set_id: A resource identifier for the related + ApiVersionSet. + :type api_version_set_id: str + :param subscription_required: Specifies whether an API or Product + subscription is required for accessing the API. + :type subscription_required: bool + :param display_name: API name. + :type display_name: str + :param service_url: Absolute URL of the backend service implementing this + API. + :type service_url: str + :param path: Relative URL uniquely identifying this API and all of its + resource paths within the API Management service instance. It is appended + to the API endpoint base URL specified during the service instance + creation to form a public URL for this API. + :type path: str + :param protocols: Describes on which protocols the operations in this API + can be invoked. + :type protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] + """ + + _validation = { + 'api_revision': {'max_length': 100, 'min_length': 1}, + 'api_version': {'max_length': 100}, + 'is_online': {'readonly': True}, + 'api_revision_description': {'max_length': 256}, + 'api_version_description': {'max_length': 256}, + 'display_name': {'max_length': 300, 'min_length': 1}, + 'service_url': {'max_length': 2000, 'min_length': 1}, + 'path': {'max_length': 400, 'min_length': 0}, + } + + _attribute_map = { + 'description': {'key': 'properties.description', 'type': 'str'}, + 'authentication_settings': {'key': 'properties.authenticationSettings', 'type': 'AuthenticationSettingsContract'}, + 'subscription_key_parameter_names': {'key': 'properties.subscriptionKeyParameterNames', 'type': 'SubscriptionKeyParameterNamesContract'}, + 'api_type': {'key': 'properties.type', 'type': 'str'}, + 'api_revision': {'key': 'properties.apiRevision', 'type': 'str'}, + 'api_version': {'key': 'properties.apiVersion', 'type': 'str'}, + 'is_current': {'key': 'properties.isCurrent', 'type': 'bool'}, + 'is_online': {'key': 'properties.isOnline', 'type': 'bool'}, + 'api_revision_description': {'key': 'properties.apiRevisionDescription', 'type': 'str'}, + 'api_version_description': {'key': 'properties.apiVersionDescription', 'type': 'str'}, + 'api_version_set_id': {'key': 'properties.apiVersionSetId', 'type': 'str'}, + 'subscription_required': {'key': 'properties.subscriptionRequired', 'type': 'bool'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'service_url': {'key': 'properties.serviceUrl', 'type': 'str'}, + 'path': {'key': 'properties.path', 'type': 'str'}, + 'protocols': {'key': 'properties.protocols', 'type': '[Protocol]'}, + } + + def __init__(self, **kwargs): + super(ApiUpdateContract, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.authentication_settings = kwargs.get('authentication_settings', None) + self.subscription_key_parameter_names = kwargs.get('subscription_key_parameter_names', None) + self.api_type = kwargs.get('api_type', None) + self.api_revision = kwargs.get('api_revision', None) + self.api_version = kwargs.get('api_version', None) + self.is_current = kwargs.get('is_current', None) + self.is_online = None + self.api_revision_description = kwargs.get('api_revision_description', None) + self.api_version_description = kwargs.get('api_version_description', None) + self.api_version_set_id = kwargs.get('api_version_set_id', None) + self.subscription_required = kwargs.get('subscription_required', None) + self.display_name = kwargs.get('display_name', None) + self.service_url = kwargs.get('service_url', None) + self.path = kwargs.get('path', None) + self.protocols = kwargs.get('protocols', None) + + +class ApiVersionSetContract(Resource): + """Api Version Set Contract details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param description: Description of API Version Set. + :type description: str + :param version_query_name: Name of query parameter that indicates the API + Version if versioningScheme is set to `query`. + :type version_query_name: str + :param version_header_name: Name of HTTP header parameter that indicates + the API Version if versioningScheme is set to `header`. + :type version_header_name: str + :param display_name: Required. Name of API Version Set + :type display_name: str + :param versioning_scheme: Required. An value that determines where the API + Version identifer will be located in a HTTP request. Possible values + include: 'Segment', 'Query', 'Header' + :type versioning_scheme: str or + ~azure.mgmt.apimanagement.models.VersioningScheme + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'version_query_name': {'max_length': 100, 'min_length': 1}, + 'version_header_name': {'max_length': 100, 'min_length': 1}, + 'display_name': {'required': True, 'max_length': 100, 'min_length': 1}, + 'versioning_scheme': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'version_query_name': {'key': 'properties.versionQueryName', 'type': 'str'}, + 'version_header_name': {'key': 'properties.versionHeaderName', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'versioning_scheme': {'key': 'properties.versioningScheme', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiVersionSetContract, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.version_query_name = kwargs.get('version_query_name', None) + self.version_header_name = kwargs.get('version_header_name', None) + self.display_name = kwargs.get('display_name', None) + self.versioning_scheme = kwargs.get('versioning_scheme', None) + + +class ApiVersionSetContractDetails(Model): + """An API Version Set contains the common configuration for a set of API + Versions relating . + + :param id: Identifier for existing API Version Set. Omit this value to + create a new Version Set. + :type id: str + :param name: The display Name of the API Version Set. + :type name: str + :param description: Description of API Version Set. + :type description: str + :param versioning_scheme: An value that determines where the API Version + identifer will be located in a HTTP request. Possible values include: + 'Segment', 'Query', 'Header' + :type versioning_scheme: str or ~azure.mgmt.apimanagement.models.enum + :param version_query_name: Name of query parameter that indicates the API + Version if versioningScheme is set to `query`. + :type version_query_name: str + :param version_header_name: Name of HTTP header parameter that indicates + the API Version if versioningScheme is set to `header`. + :type version_header_name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'versioning_scheme': {'key': 'versioningScheme', 'type': 'str'}, + 'version_query_name': {'key': 'versionQueryName', 'type': 'str'}, + 'version_header_name': {'key': 'versionHeaderName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiVersionSetContractDetails, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.versioning_scheme = kwargs.get('versioning_scheme', None) + self.version_query_name = kwargs.get('version_query_name', None) + self.version_header_name = kwargs.get('version_header_name', None) + + +class ApiVersionSetEntityBase(Model): + """Api Version set base parameters. + + :param description: Description of API Version Set. + :type description: str + :param version_query_name: Name of query parameter that indicates the API + Version if versioningScheme is set to `query`. + :type version_query_name: str + :param version_header_name: Name of HTTP header parameter that indicates + the API Version if versioningScheme is set to `header`. + :type version_header_name: str + """ + + _validation = { + 'version_query_name': {'max_length': 100, 'min_length': 1}, + 'version_header_name': {'max_length': 100, 'min_length': 1}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'version_query_name': {'key': 'versionQueryName', 'type': 'str'}, + 'version_header_name': {'key': 'versionHeaderName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiVersionSetEntityBase, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.version_query_name = kwargs.get('version_query_name', None) + self.version_header_name = kwargs.get('version_header_name', None) + + +class ApiVersionSetUpdateParameters(Model): + """Parameters to update or create an Api Version Set Contract. + + :param description: Description of API Version Set. + :type description: str + :param version_query_name: Name of query parameter that indicates the API + Version if versioningScheme is set to `query`. + :type version_query_name: str + :param version_header_name: Name of HTTP header parameter that indicates + the API Version if versioningScheme is set to `header`. + :type version_header_name: str + :param display_name: Name of API Version Set + :type display_name: str + :param versioning_scheme: An value that determines where the API Version + identifer will be located in a HTTP request. Possible values include: + 'Segment', 'Query', 'Header' + :type versioning_scheme: str or + ~azure.mgmt.apimanagement.models.VersioningScheme + """ + + _validation = { + 'version_query_name': {'max_length': 100, 'min_length': 1}, + 'version_header_name': {'max_length': 100, 'min_length': 1}, + 'display_name': {'max_length': 100, 'min_length': 1}, + } + + _attribute_map = { + 'description': {'key': 'properties.description', 'type': 'str'}, + 'version_query_name': {'key': 'properties.versionQueryName', 'type': 'str'}, + 'version_header_name': {'key': 'properties.versionHeaderName', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'versioning_scheme': {'key': 'properties.versioningScheme', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiVersionSetUpdateParameters, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.version_query_name = kwargs.get('version_query_name', None) + self.version_header_name = kwargs.get('version_header_name', None) + self.display_name = kwargs.get('display_name', None) + self.versioning_scheme = kwargs.get('versioning_scheme', None) + + +class AuthenticationSettingsContract(Model): + """API Authentication Settings. + + :param o_auth2: OAuth2 Authentication settings + :type o_auth2: + ~azure.mgmt.apimanagement.models.OAuth2AuthenticationSettingsContract + :param openid: OpenID Connect Authentication Settings + :type openid: + ~azure.mgmt.apimanagement.models.OpenIdAuthenticationSettingsContract + :param subscription_key_required: Specifies whether subscription key is + required during call to this API, true - API is included into closed + products only, false - API is included into open products alone, null - + there is a mix of products. + :type subscription_key_required: bool + """ + + _attribute_map = { + 'o_auth2': {'key': 'oAuth2', 'type': 'OAuth2AuthenticationSettingsContract'}, + 'openid': {'key': 'openid', 'type': 'OpenIdAuthenticationSettingsContract'}, + 'subscription_key_required': {'key': 'subscriptionKeyRequired', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(AuthenticationSettingsContract, self).__init__(**kwargs) + self.o_auth2 = kwargs.get('o_auth2', None) + self.openid = kwargs.get('openid', None) + self.subscription_key_required = kwargs.get('subscription_key_required', None) + + +class AuthorizationServerContract(Resource): + """External OAuth authorization server settings. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param description: Description of the authorization server. Can contain + HTML formatting tags. + :type description: str + :param authorization_methods: HTTP verbs supported by the authorization + endpoint. GET must be always present. POST is optional. + :type authorization_methods: list[str or + ~azure.mgmt.apimanagement.models.AuthorizationMethod] + :param client_authentication_method: Method of authentication supported by + the token endpoint of this authorization server. Possible values are Basic + and/or Body. When Body is specified, client credentials and other + parameters are passed within the request body in the + application/x-www-form-urlencoded format. + :type client_authentication_method: list[str or + ~azure.mgmt.apimanagement.models.ClientAuthenticationMethod] + :param token_body_parameters: Additional parameters required by the token + endpoint of this authorization server represented as an array of JSON + objects with name and value string properties, i.e. {"name" : "name + value", "value": "a value"}. + :type token_body_parameters: + list[~azure.mgmt.apimanagement.models.TokenBodyParameterContract] + :param token_endpoint: OAuth token endpoint. Contains absolute URI to + entity being referenced. + :type token_endpoint: str + :param support_state: If true, authorization server will include state + parameter from the authorization request to its response. Client may use + state parameter to raise protocol security. + :type support_state: bool + :param default_scope: Access token scope that is going to be requested by + default. Can be overridden at the API level. Should be provided in the + form of a string containing space-delimited values. + :type default_scope: str + :param bearer_token_sending_methods: Specifies the mechanism by which + access token is passed to the API. + :type bearer_token_sending_methods: list[str or + ~azure.mgmt.apimanagement.models.BearerTokenSendingMethod] + :param client_secret: Client or app secret registered with this + authorization server. + :type client_secret: str + :param resource_owner_username: Can be optionally specified when resource + owner password grant type is supported by this authorization server. + Default resource owner username. + :type resource_owner_username: str + :param resource_owner_password: Can be optionally specified when resource + owner password grant type is supported by this authorization server. + Default resource owner password. + :type resource_owner_password: str + :param display_name: Required. User-friendly authorization server name. + :type display_name: str + :param client_registration_endpoint: Required. Optional reference to a + page where client or app registration for this authorization server is + performed. Contains absolute URL to entity being referenced. + :type client_registration_endpoint: str + :param authorization_endpoint: Required. OAuth authorization endpoint. See + http://tools.ietf.org/html/rfc6749#section-3.2. + :type authorization_endpoint: str + :param grant_types: Required. Form of an authorization grant, which the + client uses to request the access token. + :type grant_types: list[str or ~azure.mgmt.apimanagement.models.GrantType] + :param client_id: Required. Client or app id registered with this + authorization server. + :type client_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'required': True, 'max_length': 50, 'min_length': 1}, + 'client_registration_endpoint': {'required': True}, + 'authorization_endpoint': {'required': True}, + 'grant_types': {'required': True}, + 'client_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'authorization_methods': {'key': 'properties.authorizationMethods', 'type': '[AuthorizationMethod]'}, + 'client_authentication_method': {'key': 'properties.clientAuthenticationMethod', 'type': '[str]'}, + 'token_body_parameters': {'key': 'properties.tokenBodyParameters', 'type': '[TokenBodyParameterContract]'}, + 'token_endpoint': {'key': 'properties.tokenEndpoint', 'type': 'str'}, + 'support_state': {'key': 'properties.supportState', 'type': 'bool'}, + 'default_scope': {'key': 'properties.defaultScope', 'type': 'str'}, + 'bearer_token_sending_methods': {'key': 'properties.bearerTokenSendingMethods', 'type': '[str]'}, + 'client_secret': {'key': 'properties.clientSecret', 'type': 'str'}, + 'resource_owner_username': {'key': 'properties.resourceOwnerUsername', 'type': 'str'}, + 'resource_owner_password': {'key': 'properties.resourceOwnerPassword', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'client_registration_endpoint': {'key': 'properties.clientRegistrationEndpoint', 'type': 'str'}, + 'authorization_endpoint': {'key': 'properties.authorizationEndpoint', 'type': 'str'}, + 'grant_types': {'key': 'properties.grantTypes', 'type': '[str]'}, + 'client_id': {'key': 'properties.clientId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AuthorizationServerContract, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.authorization_methods = kwargs.get('authorization_methods', None) + self.client_authentication_method = kwargs.get('client_authentication_method', None) + self.token_body_parameters = kwargs.get('token_body_parameters', None) + self.token_endpoint = kwargs.get('token_endpoint', None) + self.support_state = kwargs.get('support_state', None) + self.default_scope = kwargs.get('default_scope', None) + self.bearer_token_sending_methods = kwargs.get('bearer_token_sending_methods', None) + self.client_secret = kwargs.get('client_secret', None) + self.resource_owner_username = kwargs.get('resource_owner_username', None) + self.resource_owner_password = kwargs.get('resource_owner_password', None) + self.display_name = kwargs.get('display_name', None) + self.client_registration_endpoint = kwargs.get('client_registration_endpoint', None) + self.authorization_endpoint = kwargs.get('authorization_endpoint', None) + self.grant_types = kwargs.get('grant_types', None) + self.client_id = kwargs.get('client_id', None) + + +class AuthorizationServerContractBaseProperties(Model): + """External OAuth authorization server Update settings contract. + + :param description: Description of the authorization server. Can contain + HTML formatting tags. + :type description: str + :param authorization_methods: HTTP verbs supported by the authorization + endpoint. GET must be always present. POST is optional. + :type authorization_methods: list[str or + ~azure.mgmt.apimanagement.models.AuthorizationMethod] + :param client_authentication_method: Method of authentication supported by + the token endpoint of this authorization server. Possible values are Basic + and/or Body. When Body is specified, client credentials and other + parameters are passed within the request body in the + application/x-www-form-urlencoded format. + :type client_authentication_method: list[str or + ~azure.mgmt.apimanagement.models.ClientAuthenticationMethod] + :param token_body_parameters: Additional parameters required by the token + endpoint of this authorization server represented as an array of JSON + objects with name and value string properties, i.e. {"name" : "name + value", "value": "a value"}. + :type token_body_parameters: + list[~azure.mgmt.apimanagement.models.TokenBodyParameterContract] + :param token_endpoint: OAuth token endpoint. Contains absolute URI to + entity being referenced. + :type token_endpoint: str + :param support_state: If true, authorization server will include state + parameter from the authorization request to its response. Client may use + state parameter to raise protocol security. + :type support_state: bool + :param default_scope: Access token scope that is going to be requested by + default. Can be overridden at the API level. Should be provided in the + form of a string containing space-delimited values. + :type default_scope: str + :param bearer_token_sending_methods: Specifies the mechanism by which + access token is passed to the API. + :type bearer_token_sending_methods: list[str or + ~azure.mgmt.apimanagement.models.BearerTokenSendingMethod] + :param client_secret: Client or app secret registered with this + authorization server. + :type client_secret: str + :param resource_owner_username: Can be optionally specified when resource + owner password grant type is supported by this authorization server. + Default resource owner username. + :type resource_owner_username: str + :param resource_owner_password: Can be optionally specified when resource + owner password grant type is supported by this authorization server. + Default resource owner password. + :type resource_owner_password: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'authorization_methods': {'key': 'authorizationMethods', 'type': '[AuthorizationMethod]'}, + 'client_authentication_method': {'key': 'clientAuthenticationMethod', 'type': '[str]'}, + 'token_body_parameters': {'key': 'tokenBodyParameters', 'type': '[TokenBodyParameterContract]'}, + 'token_endpoint': {'key': 'tokenEndpoint', 'type': 'str'}, + 'support_state': {'key': 'supportState', 'type': 'bool'}, + 'default_scope': {'key': 'defaultScope', 'type': 'str'}, + 'bearer_token_sending_methods': {'key': 'bearerTokenSendingMethods', 'type': '[str]'}, + 'client_secret': {'key': 'clientSecret', 'type': 'str'}, + 'resource_owner_username': {'key': 'resourceOwnerUsername', 'type': 'str'}, + 'resource_owner_password': {'key': 'resourceOwnerPassword', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AuthorizationServerContractBaseProperties, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.authorization_methods = kwargs.get('authorization_methods', None) + self.client_authentication_method = kwargs.get('client_authentication_method', None) + self.token_body_parameters = kwargs.get('token_body_parameters', None) + self.token_endpoint = kwargs.get('token_endpoint', None) + self.support_state = kwargs.get('support_state', None) + self.default_scope = kwargs.get('default_scope', None) + self.bearer_token_sending_methods = kwargs.get('bearer_token_sending_methods', None) + self.client_secret = kwargs.get('client_secret', None) + self.resource_owner_username = kwargs.get('resource_owner_username', None) + self.resource_owner_password = kwargs.get('resource_owner_password', None) + + +class AuthorizationServerUpdateContract(Resource): + """External OAuth authorization server settings. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param description: Description of the authorization server. Can contain + HTML formatting tags. + :type description: str + :param authorization_methods: HTTP verbs supported by the authorization + endpoint. GET must be always present. POST is optional. + :type authorization_methods: list[str or + ~azure.mgmt.apimanagement.models.AuthorizationMethod] + :param client_authentication_method: Method of authentication supported by + the token endpoint of this authorization server. Possible values are Basic + and/or Body. When Body is specified, client credentials and other + parameters are passed within the request body in the + application/x-www-form-urlencoded format. + :type client_authentication_method: list[str or + ~azure.mgmt.apimanagement.models.ClientAuthenticationMethod] + :param token_body_parameters: Additional parameters required by the token + endpoint of this authorization server represented as an array of JSON + objects with name and value string properties, i.e. {"name" : "name + value", "value": "a value"}. + :type token_body_parameters: + list[~azure.mgmt.apimanagement.models.TokenBodyParameterContract] + :param token_endpoint: OAuth token endpoint. Contains absolute URI to + entity being referenced. + :type token_endpoint: str + :param support_state: If true, authorization server will include state + parameter from the authorization request to its response. Client may use + state parameter to raise protocol security. + :type support_state: bool + :param default_scope: Access token scope that is going to be requested by + default. Can be overridden at the API level. Should be provided in the + form of a string containing space-delimited values. + :type default_scope: str + :param bearer_token_sending_methods: Specifies the mechanism by which + access token is passed to the API. + :type bearer_token_sending_methods: list[str or + ~azure.mgmt.apimanagement.models.BearerTokenSendingMethod] + :param client_secret: Client or app secret registered with this + authorization server. + :type client_secret: str + :param resource_owner_username: Can be optionally specified when resource + owner password grant type is supported by this authorization server. + Default resource owner username. + :type resource_owner_username: str + :param resource_owner_password: Can be optionally specified when resource + owner password grant type is supported by this authorization server. + Default resource owner password. + :type resource_owner_password: str + :param display_name: User-friendly authorization server name. + :type display_name: str + :param client_registration_endpoint: Optional reference to a page where + client or app registration for this authorization server is performed. + Contains absolute URL to entity being referenced. + :type client_registration_endpoint: str + :param authorization_endpoint: OAuth authorization endpoint. See + http://tools.ietf.org/html/rfc6749#section-3.2. + :type authorization_endpoint: str + :param grant_types: Form of an authorization grant, which the client uses + to request the access token. + :type grant_types: list[str or ~azure.mgmt.apimanagement.models.GrantType] + :param client_id: Client or app id registered with this authorization + server. + :type client_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'max_length': 50, 'min_length': 1}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'authorization_methods': {'key': 'properties.authorizationMethods', 'type': '[AuthorizationMethod]'}, + 'client_authentication_method': {'key': 'properties.clientAuthenticationMethod', 'type': '[str]'}, + 'token_body_parameters': {'key': 'properties.tokenBodyParameters', 'type': '[TokenBodyParameterContract]'}, + 'token_endpoint': {'key': 'properties.tokenEndpoint', 'type': 'str'}, + 'support_state': {'key': 'properties.supportState', 'type': 'bool'}, + 'default_scope': {'key': 'properties.defaultScope', 'type': 'str'}, + 'bearer_token_sending_methods': {'key': 'properties.bearerTokenSendingMethods', 'type': '[str]'}, + 'client_secret': {'key': 'properties.clientSecret', 'type': 'str'}, + 'resource_owner_username': {'key': 'properties.resourceOwnerUsername', 'type': 'str'}, + 'resource_owner_password': {'key': 'properties.resourceOwnerPassword', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'client_registration_endpoint': {'key': 'properties.clientRegistrationEndpoint', 'type': 'str'}, + 'authorization_endpoint': {'key': 'properties.authorizationEndpoint', 'type': 'str'}, + 'grant_types': {'key': 'properties.grantTypes', 'type': '[str]'}, + 'client_id': {'key': 'properties.clientId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AuthorizationServerUpdateContract, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.authorization_methods = kwargs.get('authorization_methods', None) + self.client_authentication_method = kwargs.get('client_authentication_method', None) + self.token_body_parameters = kwargs.get('token_body_parameters', None) + self.token_endpoint = kwargs.get('token_endpoint', None) + self.support_state = kwargs.get('support_state', None) + self.default_scope = kwargs.get('default_scope', None) + self.bearer_token_sending_methods = kwargs.get('bearer_token_sending_methods', None) + self.client_secret = kwargs.get('client_secret', None) + self.resource_owner_username = kwargs.get('resource_owner_username', None) + self.resource_owner_password = kwargs.get('resource_owner_password', None) + self.display_name = kwargs.get('display_name', None) + self.client_registration_endpoint = kwargs.get('client_registration_endpoint', None) + self.authorization_endpoint = kwargs.get('authorization_endpoint', None) + self.grant_types = kwargs.get('grant_types', None) + self.client_id = kwargs.get('client_id', None) + + +class BackendAuthorizationHeaderCredentials(Model): + """Authorization header information. + + All required parameters must be populated in order to send to Azure. + + :param scheme: Required. Authentication Scheme name. + :type scheme: str + :param parameter: Required. Authentication Parameter value. + :type parameter: str + """ + + _validation = { + 'scheme': {'required': True, 'max_length': 100, 'min_length': 1}, + 'parameter': {'required': True, 'max_length': 300, 'min_length': 1}, + } + + _attribute_map = { + 'scheme': {'key': 'scheme', 'type': 'str'}, + 'parameter': {'key': 'parameter', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BackendAuthorizationHeaderCredentials, self).__init__(**kwargs) + self.scheme = kwargs.get('scheme', None) + self.parameter = kwargs.get('parameter', None) + + +class BackendBaseParameters(Model): + """Backend entity base Parameter set. + + :param title: Backend Title. + :type title: str + :param description: Backend Description. + :type description: str + :param resource_id: Management Uri of the Resource in External System. + This url can be the Arm Resource Id of Logic Apps, Function Apps or Api + Apps. + :type resource_id: str + :param properties: Backend Properties contract + :type properties: ~azure.mgmt.apimanagement.models.BackendProperties + :param credentials: Backend Credentials Contract Properties + :type credentials: + ~azure.mgmt.apimanagement.models.BackendCredentialsContract + :param proxy: Backend Proxy Contract Properties + :type proxy: ~azure.mgmt.apimanagement.models.BackendProxyContract + :param tls: Backend TLS Properties + :type tls: ~azure.mgmt.apimanagement.models.BackendTlsProperties + """ + + _validation = { + 'title': {'max_length': 300, 'min_length': 1}, + 'description': {'max_length': 2000, 'min_length': 1}, + 'resource_id': {'max_length': 2000, 'min_length': 1}, + } + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'BackendProperties'}, + 'credentials': {'key': 'credentials', 'type': 'BackendCredentialsContract'}, + 'proxy': {'key': 'proxy', 'type': 'BackendProxyContract'}, + 'tls': {'key': 'tls', 'type': 'BackendTlsProperties'}, + } + + def __init__(self, **kwargs): + super(BackendBaseParameters, self).__init__(**kwargs) + self.title = kwargs.get('title', None) + self.description = kwargs.get('description', None) + self.resource_id = kwargs.get('resource_id', None) + self.properties = kwargs.get('properties', None) + self.credentials = kwargs.get('credentials', None) + self.proxy = kwargs.get('proxy', None) + self.tls = kwargs.get('tls', None) + + +class BackendContract(Resource): + """Backend details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param title: Backend Title. + :type title: str + :param description: Backend Description. + :type description: str + :param resource_id: Management Uri of the Resource in External System. + This url can be the Arm Resource Id of Logic Apps, Function Apps or Api + Apps. + :type resource_id: str + :param properties: Backend Properties contract + :type properties: ~azure.mgmt.apimanagement.models.BackendProperties + :param credentials: Backend Credentials Contract Properties + :type credentials: + ~azure.mgmt.apimanagement.models.BackendCredentialsContract + :param proxy: Backend Proxy Contract Properties + :type proxy: ~azure.mgmt.apimanagement.models.BackendProxyContract + :param tls: Backend TLS Properties + :type tls: ~azure.mgmt.apimanagement.models.BackendTlsProperties + :param url: Required. Runtime Url of the Backend. + :type url: str + :param protocol: Required. Backend communication protocol. Possible values + include: 'http', 'soap' + :type protocol: str or ~azure.mgmt.apimanagement.models.BackendProtocol + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'title': {'max_length': 300, 'min_length': 1}, + 'description': {'max_length': 2000, 'min_length': 1}, + 'resource_id': {'max_length': 2000, 'min_length': 1}, + 'url': {'required': True, 'max_length': 2000, 'min_length': 1}, + 'protocol': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, + 'properties': {'key': 'properties.properties', 'type': 'BackendProperties'}, + 'credentials': {'key': 'properties.credentials', 'type': 'BackendCredentialsContract'}, + 'proxy': {'key': 'properties.proxy', 'type': 'BackendProxyContract'}, + 'tls': {'key': 'properties.tls', 'type': 'BackendTlsProperties'}, + 'url': {'key': 'properties.url', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BackendContract, self).__init__(**kwargs) + self.title = kwargs.get('title', None) + self.description = kwargs.get('description', None) + self.resource_id = kwargs.get('resource_id', None) + self.properties = kwargs.get('properties', None) + self.credentials = kwargs.get('credentials', None) + self.proxy = kwargs.get('proxy', None) + self.tls = kwargs.get('tls', None) + self.url = kwargs.get('url', None) + self.protocol = kwargs.get('protocol', None) + + +class BackendCredentialsContract(Model): + """Details of the Credentials used to connect to Backend. + + :param certificate: List of Client Certificate Thumbprint. + :type certificate: list[str] + :param query: Query Parameter description. + :type query: dict[str, list[str]] + :param header: Header Parameter description. + :type header: dict[str, list[str]] + :param authorization: Authorization header authentication + :type authorization: + ~azure.mgmt.apimanagement.models.BackendAuthorizationHeaderCredentials + """ + + _validation = { + 'certificate': {'max_items': 32}, + } + + _attribute_map = { + 'certificate': {'key': 'certificate', 'type': '[str]'}, + 'query': {'key': 'query', 'type': '{[str]}'}, + 'header': {'key': 'header', 'type': '{[str]}'}, + 'authorization': {'key': 'authorization', 'type': 'BackendAuthorizationHeaderCredentials'}, + } + + def __init__(self, **kwargs): + super(BackendCredentialsContract, self).__init__(**kwargs) + self.certificate = kwargs.get('certificate', None) + self.query = kwargs.get('query', None) + self.header = kwargs.get('header', None) + self.authorization = kwargs.get('authorization', None) + + +class BackendProperties(Model): + """Properties specific to the Backend Type. + + :param service_fabric_cluster: Backend Service Fabric Cluster Properties + :type service_fabric_cluster: + ~azure.mgmt.apimanagement.models.BackendServiceFabricClusterProperties + """ + + _attribute_map = { + 'service_fabric_cluster': {'key': 'serviceFabricCluster', 'type': 'BackendServiceFabricClusterProperties'}, + } + + def __init__(self, **kwargs): + super(BackendProperties, self).__init__(**kwargs) + self.service_fabric_cluster = kwargs.get('service_fabric_cluster', None) + + +class BackendProxyContract(Model): + """Details of the Backend WebProxy Server to use in the Request to Backend. + + All required parameters must be populated in order to send to Azure. + + :param url: Required. WebProxy Server AbsoluteUri property which includes + the entire URI stored in the Uri instance, including all fragments and + query strings. + :type url: str + :param username: Username to connect to the WebProxy server + :type username: str + :param password: Password to connect to the WebProxy Server + :type password: str + """ + + _validation = { + 'url': {'required': True, 'max_length': 2000, 'min_length': 1}, + } + + _attribute_map = { + 'url': {'key': 'url', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BackendProxyContract, self).__init__(**kwargs) + self.url = kwargs.get('url', None) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + + +class BackendReconnectContract(Resource): + """Reconnect request parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param after: Duration in ISO8601 format after which reconnect will be + initiated. Minimum duration of the Reconnect is PT2M. + :type after: timedelta + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'after': {'key': 'properties.after', 'type': 'duration'}, + } + + def __init__(self, **kwargs): + super(BackendReconnectContract, self).__init__(**kwargs) + self.after = kwargs.get('after', None) + + +class BackendServiceFabricClusterProperties(Model): + """Properties of the Service Fabric Type Backend. + + All required parameters must be populated in order to send to Azure. + + :param client_certificatethumbprint: Required. The client certificate + thumbprint for the management endpoint. + :type client_certificatethumbprint: str + :param max_partition_resolution_retries: Maximum number of retries while + attempting resolve the partition. + :type max_partition_resolution_retries: int + :param management_endpoints: Required. The cluster management endpoint. + :type management_endpoints: list[str] + :param server_certificate_thumbprints: Thumbprints of certificates cluster + management service uses for tls communication + :type server_certificate_thumbprints: list[str] + :param server_x509_names: Server X509 Certificate Names Collection + :type server_x509_names: + list[~azure.mgmt.apimanagement.models.X509CertificateName] + """ + + _validation = { + 'client_certificatethumbprint': {'required': True}, + 'management_endpoints': {'required': True}, + } + + _attribute_map = { + 'client_certificatethumbprint': {'key': 'clientCertificatethumbprint', 'type': 'str'}, + 'max_partition_resolution_retries': {'key': 'maxPartitionResolutionRetries', 'type': 'int'}, + 'management_endpoints': {'key': 'managementEndpoints', 'type': '[str]'}, + 'server_certificate_thumbprints': {'key': 'serverCertificateThumbprints', 'type': '[str]'}, + 'server_x509_names': {'key': 'serverX509Names', 'type': '[X509CertificateName]'}, + } + + def __init__(self, **kwargs): + super(BackendServiceFabricClusterProperties, self).__init__(**kwargs) + self.client_certificatethumbprint = kwargs.get('client_certificatethumbprint', None) + self.max_partition_resolution_retries = kwargs.get('max_partition_resolution_retries', None) + self.management_endpoints = kwargs.get('management_endpoints', None) + self.server_certificate_thumbprints = kwargs.get('server_certificate_thumbprints', None) + self.server_x509_names = kwargs.get('server_x509_names', None) + + +class BackendTlsProperties(Model): + """Properties controlling TLS Certificate Validation. + + :param validate_certificate_chain: Flag indicating whether SSL certificate + chain validation should be done when using self-signed certificates for + this backend host. Default value: True . + :type validate_certificate_chain: bool + :param validate_certificate_name: Flag indicating whether SSL certificate + name validation should be done when using self-signed certificates for + this backend host. Default value: True . + :type validate_certificate_name: bool + """ + + _attribute_map = { + 'validate_certificate_chain': {'key': 'validateCertificateChain', 'type': 'bool'}, + 'validate_certificate_name': {'key': 'validateCertificateName', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(BackendTlsProperties, self).__init__(**kwargs) + self.validate_certificate_chain = kwargs.get('validate_certificate_chain', True) + self.validate_certificate_name = kwargs.get('validate_certificate_name', True) + + +class BackendUpdateParameters(Model): + """Backend update parameters. + + :param title: Backend Title. + :type title: str + :param description: Backend Description. + :type description: str + :param resource_id: Management Uri of the Resource in External System. + This url can be the Arm Resource Id of Logic Apps, Function Apps or Api + Apps. + :type resource_id: str + :param properties: Backend Properties contract + :type properties: ~azure.mgmt.apimanagement.models.BackendProperties + :param credentials: Backend Credentials Contract Properties + :type credentials: + ~azure.mgmt.apimanagement.models.BackendCredentialsContract + :param proxy: Backend Proxy Contract Properties + :type proxy: ~azure.mgmt.apimanagement.models.BackendProxyContract + :param tls: Backend TLS Properties + :type tls: ~azure.mgmt.apimanagement.models.BackendTlsProperties + :param url: Runtime Url of the Backend. + :type url: str + :param protocol: Backend communication protocol. Possible values include: + 'http', 'soap' + :type protocol: str or ~azure.mgmt.apimanagement.models.BackendProtocol + """ + + _validation = { + 'title': {'max_length': 300, 'min_length': 1}, + 'description': {'max_length': 2000, 'min_length': 1}, + 'resource_id': {'max_length': 2000, 'min_length': 1}, + 'url': {'max_length': 2000, 'min_length': 1}, + } + + _attribute_map = { + 'title': {'key': 'properties.title', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, + 'properties': {'key': 'properties.properties', 'type': 'BackendProperties'}, + 'credentials': {'key': 'properties.credentials', 'type': 'BackendCredentialsContract'}, + 'proxy': {'key': 'properties.proxy', 'type': 'BackendProxyContract'}, + 'tls': {'key': 'properties.tls', 'type': 'BackendTlsProperties'}, + 'url': {'key': 'properties.url', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BackendUpdateParameters, self).__init__(**kwargs) + self.title = kwargs.get('title', None) + self.description = kwargs.get('description', None) + self.resource_id = kwargs.get('resource_id', None) + self.properties = kwargs.get('properties', None) + self.credentials = kwargs.get('credentials', None) + self.proxy = kwargs.get('proxy', None) + self.tls = kwargs.get('tls', None) + self.url = kwargs.get('url', None) + self.protocol = kwargs.get('protocol', None) + + +class BodyDiagnosticSettings(Model): + """Body logging settings. + + :param bytes: Number of request body bytes to log. + :type bytes: int + """ + + _validation = { + 'bytes': {'maximum': 8192}, + } + + _attribute_map = { + 'bytes': {'key': 'bytes', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(BodyDiagnosticSettings, self).__init__(**kwargs) + self.bytes = kwargs.get('bytes', None) + + +class CacheContract(Resource): + """Cache details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param description: Cache description + :type description: str + :param connection_string: Required. Runtime connection string to cache + :type connection_string: str + :param resource_id: Original uri of entity in external system cache points + to + :type resource_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'max_length': 2000}, + 'connection_string': {'required': True, 'max_length': 300}, + 'resource_id': {'max_length': 2000}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'connection_string': {'key': 'properties.connectionString', 'type': 'str'}, + 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CacheContract, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.connection_string = kwargs.get('connection_string', None) + self.resource_id = kwargs.get('resource_id', None) + + +class CacheUpdateParameters(Model): + """Cache update details. + + :param description: Cache description + :type description: str + :param connection_string: Runtime connection string to cache + :type connection_string: str + :param resource_id: Original uri of entity in external system cache points + to + :type resource_id: str + """ + + _validation = { + 'description': {'max_length': 2000}, + 'connection_string': {'max_length': 300}, + 'resource_id': {'max_length': 2000}, + } + + _attribute_map = { + 'description': {'key': 'properties.description', 'type': 'str'}, + 'connection_string': {'key': 'properties.connectionString', 'type': 'str'}, + 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CacheUpdateParameters, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.connection_string = kwargs.get('connection_string', None) + self.resource_id = kwargs.get('resource_id', None) + + +class CertificateConfiguration(Model): + """Certificate configuration which consist of non-trusted intermediates and + root certificates. + + All required parameters must be populated in order to send to Azure. + + :param encoded_certificate: Base64 Encoded certificate. + :type encoded_certificate: str + :param certificate_password: Certificate Password. + :type certificate_password: str + :param store_name: Required. The + System.Security.Cryptography.x509certificates.StoreName certificate store + location. Only Root and CertificateAuthority are valid locations. Possible + values include: 'CertificateAuthority', 'Root' + :type store_name: str or ~azure.mgmt.apimanagement.models.enum + :param certificate: Certificate information. + :type certificate: ~azure.mgmt.apimanagement.models.CertificateInformation + """ + + _validation = { + 'store_name': {'required': True}, + } + + _attribute_map = { + 'encoded_certificate': {'key': 'encodedCertificate', 'type': 'str'}, + 'certificate_password': {'key': 'certificatePassword', 'type': 'str'}, + 'store_name': {'key': 'storeName', 'type': 'str'}, + 'certificate': {'key': 'certificate', 'type': 'CertificateInformation'}, + } + + def __init__(self, **kwargs): + super(CertificateConfiguration, self).__init__(**kwargs) + self.encoded_certificate = kwargs.get('encoded_certificate', None) + self.certificate_password = kwargs.get('certificate_password', None) + self.store_name = kwargs.get('store_name', None) + self.certificate = kwargs.get('certificate', None) + + +class CertificateContract(Resource): + """Certificate details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param subject: Required. Subject attribute of the certificate. + :type subject: str + :param thumbprint: Required. Thumbprint of the certificate. + :type thumbprint: str + :param expiration_date: Required. Expiration date of the certificate. The + date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified + by the ISO 8601 standard. + :type expiration_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'subject': {'required': True}, + 'thumbprint': {'required': True}, + 'expiration_date': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'subject': {'key': 'properties.subject', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(CertificateContract, self).__init__(**kwargs) + self.subject = kwargs.get('subject', None) + self.thumbprint = kwargs.get('thumbprint', None) + self.expiration_date = kwargs.get('expiration_date', None) + + +class CertificateCreateOrUpdateParameters(Model): + """Certificate create or update details. + + All required parameters must be populated in order to send to Azure. + + :param data: Required. Base 64 encoded certificate using the + application/x-pkcs12 representation. + :type data: str + :param password: Required. Password for the Certificate + :type password: str + """ + + _validation = { + 'data': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'data': {'key': 'properties.data', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateCreateOrUpdateParameters, self).__init__(**kwargs) + self.data = kwargs.get('data', None) + self.password = kwargs.get('password', None) + + +class CertificateInformation(Model): + """SSL certificate information. + + All required parameters must be populated in order to send to Azure. + + :param expiry: Required. Expiration date of the certificate. The date + conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by + the ISO 8601 standard. + :type expiry: datetime + :param thumbprint: Required. Thumbprint of the certificate. + :type thumbprint: str + :param subject: Required. Subject of the certificate. + :type subject: str + """ + + _validation = { + 'expiry': {'required': True}, + 'thumbprint': {'required': True}, + 'subject': {'required': True}, + } + + _attribute_map = { + 'expiry': {'key': 'expiry', 'type': 'iso-8601'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'subject': {'key': 'subject', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateInformation, self).__init__(**kwargs) + self.expiry = kwargs.get('expiry', None) + self.thumbprint = kwargs.get('thumbprint', None) + self.subject = kwargs.get('subject', None) + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ConnectivityStatusContract(Model): + """Details about connectivity to a resource. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The hostname of the resource which the service + depends on. This can be the database, storage or any other azure resource + on which the service depends upon. + :type name: str + :param status: Required. Resource Connectivity Status Type identifier. + Possible values include: 'initializing', 'success', 'failure' + :type status: str or + ~azure.mgmt.apimanagement.models.ConnectivityStatusType + :param error: Error details of the connectivity to the resource. + :type error: str + :param last_updated: Required. The date when the resource connectivity + status was last updated. This status should be updated every 15 minutes. + If this status has not been updated, then it means that the service has + lost network connectivity to the resource, from inside the Virtual + Network.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` + as specified by the ISO 8601 standard. + :type last_updated: datetime + :param last_status_change: Required. The date when the resource + connectivity status last Changed from success to failure or vice-versa. + The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as + specified by the ISO 8601 standard. + :type last_status_change: datetime + """ + + _validation = { + 'name': {'required': True, 'min_length': 1}, + 'status': {'required': True}, + 'last_updated': {'required': True}, + 'last_status_change': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'str'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, + 'last_status_change': {'key': 'lastStatusChange', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ConnectivityStatusContract, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.status = kwargs.get('status', None) + self.error = kwargs.get('error', None) + self.last_updated = kwargs.get('last_updated', None) + self.last_status_change = kwargs.get('last_status_change', None) + + +class DeployConfigurationParameters(Model): + """Deploy Tenant Configuration Contract. + + All required parameters must be populated in order to send to Azure. + + :param branch: Required. The name of the Git branch from which the + configuration is to be deployed to the configuration database. + :type branch: str + :param force: The value enforcing deleting subscriptions to products that + are deleted in this update. + :type force: bool + """ + + _validation = { + 'branch': {'required': True}, + } + + _attribute_map = { + 'branch': {'key': 'properties.branch', 'type': 'str'}, + 'force': {'key': 'properties.force', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(DeployConfigurationParameters, self).__init__(**kwargs) + self.branch = kwargs.get('branch', None) + self.force = kwargs.get('force', None) + + +class DiagnosticContract(Resource): + """Diagnostic details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param always_log: Specifies for what type of messages sampling settings + should not apply. Possible values include: 'allErrors' + :type always_log: str or ~azure.mgmt.apimanagement.models.AlwaysLog + :param logger_id: Required. Resource Id of a target logger. + :type logger_id: str + :param sampling: Sampling settings for Diagnostic. + :type sampling: ~azure.mgmt.apimanagement.models.SamplingSettings + :param frontend: Diagnostic settings for incoming/outgoing HTTP messages + to the Gateway. + :type frontend: + ~azure.mgmt.apimanagement.models.PipelineDiagnosticSettings + :param backend: Diagnostic settings for incoming/outgoing HTTP messages to + the Backend + :type backend: ~azure.mgmt.apimanagement.models.PipelineDiagnosticSettings + :param enable_http_correlation_headers: Whether to process Correlation + Headers coming to Api Management Service. Only applicable to Application + Insights diagnostics. Default is true. + :type enable_http_correlation_headers: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'logger_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'always_log': {'key': 'properties.alwaysLog', 'type': 'str'}, + 'logger_id': {'key': 'properties.loggerId', 'type': 'str'}, + 'sampling': {'key': 'properties.sampling', 'type': 'SamplingSettings'}, + 'frontend': {'key': 'properties.frontend', 'type': 'PipelineDiagnosticSettings'}, + 'backend': {'key': 'properties.backend', 'type': 'PipelineDiagnosticSettings'}, + 'enable_http_correlation_headers': {'key': 'properties.enableHttpCorrelationHeaders', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(DiagnosticContract, self).__init__(**kwargs) + self.always_log = kwargs.get('always_log', None) + self.logger_id = kwargs.get('logger_id', None) + self.sampling = kwargs.get('sampling', None) + self.frontend = kwargs.get('frontend', None) + self.backend = kwargs.get('backend', None) + self.enable_http_correlation_headers = kwargs.get('enable_http_correlation_headers', None) + + +class EmailTemplateContract(Resource): + """Email Template details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param subject: Required. Subject of the Template. + :type subject: str + :param body: Required. Email Template Body. This should be a valid + XDocument + :type body: str + :param title: Title of the Template. + :type title: str + :param description: Description of the Email Template. + :type description: str + :ivar is_default: Whether the template is the default template provided by + Api Management or has been edited. + :vartype is_default: bool + :param parameters: Email Template Parameter values. + :type parameters: + list[~azure.mgmt.apimanagement.models.EmailTemplateParametersContractProperties] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'subject': {'required': True, 'max_length': 1000, 'min_length': 1}, + 'body': {'required': True, 'min_length': 1}, + 'is_default': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'subject': {'key': 'properties.subject', 'type': 'str'}, + 'body': {'key': 'properties.body', 'type': 'str'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'is_default': {'key': 'properties.isDefault', 'type': 'bool'}, + 'parameters': {'key': 'properties.parameters', 'type': '[EmailTemplateParametersContractProperties]'}, + } + + def __init__(self, **kwargs): + super(EmailTemplateContract, self).__init__(**kwargs) + self.subject = kwargs.get('subject', None) + self.body = kwargs.get('body', None) + self.title = kwargs.get('title', None) + self.description = kwargs.get('description', None) + self.is_default = None + self.parameters = kwargs.get('parameters', None) + + +class EmailTemplateParametersContractProperties(Model): + """Email Template Parameter contract. + + :param name: Template parameter name. + :type name: str + :param title: Template parameter title. + :type title: str + :param description: Template parameter description. + :type description: str + """ + + _validation = { + 'name': {'max_length': 256, 'min_length': 1, 'pattern': r'^[A-Za-z0-9-._]+$'}, + 'title': {'max_length': 4096, 'min_length': 1}, + 'description': {'max_length': 256, 'min_length': 1, 'pattern': r'^[A-Za-z0-9-._]+$'}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'title': {'key': 'title', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EmailTemplateParametersContractProperties, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.title = kwargs.get('title', None) + self.description = kwargs.get('description', None) + + +class EmailTemplateUpdateParameters(Model): + """Email Template update Parameters. + + :param subject: Subject of the Template. + :type subject: str + :param title: Title of the Template. + :type title: str + :param description: Description of the Email Template. + :type description: str + :param body: Email Template Body. This should be a valid XDocument + :type body: str + :param parameters: Email Template Parameter values. + :type parameters: + list[~azure.mgmt.apimanagement.models.EmailTemplateParametersContractProperties] + """ + + _validation = { + 'subject': {'max_length': 1000, 'min_length': 1}, + 'body': {'min_length': 1}, + } + + _attribute_map = { + 'subject': {'key': 'properties.subject', 'type': 'str'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'body': {'key': 'properties.body', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': '[EmailTemplateParametersContractProperties]'}, + } + + def __init__(self, **kwargs): + super(EmailTemplateUpdateParameters, self).__init__(**kwargs) + self.subject = kwargs.get('subject', None) + self.title = kwargs.get('title', None) + self.description = kwargs.get('description', None) + self.body = kwargs.get('body', None) + self.parameters = kwargs.get('parameters', None) + + +class ErrorFieldContract(Model): + """Error Field contract. + + :param code: Property level error code. + :type code: str + :param message: Human-readable representation of property-level error. + :type message: str + :param target: Property name. + :type target: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorFieldContract, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + + +class ErrorResponse(Model): + """Error Response. + + :param code: Service-defined error code. This code serves as a sub-status + for the HTTP error code specified in the response. + :type code: str + :param message: Human-readable representation of the error. + :type message: str + :param details: The list of invalid fields send in request, in case of + validation error. + :type details: list[~azure.mgmt.apimanagement.models.ErrorFieldContract] + """ + + _attribute_map = { + 'code': {'key': 'error.code', 'type': 'str'}, + 'message': {'key': 'error.message', 'type': 'str'}, + 'details': {'key': 'error.details', 'type': '[ErrorFieldContract]'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.details = kwargs.get('details', None) + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class ErrorResponseBody(Model): + """Error Body contract. + + :param code: Service-defined error code. This code serves as a sub-status + for the HTTP error code specified in the response. + :type code: str + :param message: Human-readable representation of the error. + :type message: str + :param details: The list of invalid fields send in request, in case of + validation error. + :type details: list[~azure.mgmt.apimanagement.models.ErrorFieldContract] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorFieldContract]'}, + } + + def __init__(self, **kwargs): + super(ErrorResponseBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.details = kwargs.get('details', None) + + +class GenerateSsoUrlResult(Model): + """Generate SSO Url operations response details. + + :param value: Redirect Url containing the SSO URL value. + :type value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GenerateSsoUrlResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class GroupContract(Resource): + """Contract details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param display_name: Required. Group name. + :type display_name: str + :param description: Group description. Can contain HTML formatting tags. + :type description: str + :ivar built_in: true if the group is one of the three system groups + (Administrators, Developers, or Guests); otherwise false. + :vartype built_in: bool + :param group_contract_type: Group type. Possible values include: 'custom', + 'system', 'external' + :type group_contract_type: str or + ~azure.mgmt.apimanagement.models.GroupType + :param external_id: For external groups, this property contains the id of + the group from the external identity provider, e.g. for Azure Active + Directory `aad://.onmicrosoft.com/groups/`; + otherwise the value is null. + :type external_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'required': True, 'max_length': 300, 'min_length': 1}, + 'description': {'max_length': 1000}, + 'built_in': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'built_in': {'key': 'properties.builtIn', 'type': 'bool'}, + 'group_contract_type': {'key': 'properties.type', 'type': 'GroupType'}, + 'external_id': {'key': 'properties.externalId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GroupContract, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.built_in = None + self.group_contract_type = kwargs.get('group_contract_type', None) + self.external_id = kwargs.get('external_id', None) + + +class GroupContractProperties(Model): + """Group contract Properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param display_name: Required. Group name. + :type display_name: str + :param description: Group description. Can contain HTML formatting tags. + :type description: str + :ivar built_in: true if the group is one of the three system groups + (Administrators, Developers, or Guests); otherwise false. + :vartype built_in: bool + :param type: Group type. Possible values include: 'custom', 'system', + 'external' + :type type: str or ~azure.mgmt.apimanagement.models.GroupType + :param external_id: For external groups, this property contains the id of + the group from the external identity provider, e.g. for Azure Active + Directory `aad://.onmicrosoft.com/groups/`; + otherwise the value is null. + :type external_id: str + """ + + _validation = { + 'display_name': {'required': True, 'max_length': 300, 'min_length': 1}, + 'description': {'max_length': 1000}, + 'built_in': {'readonly': True}, + } + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'built_in': {'key': 'builtIn', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'GroupType'}, + 'external_id': {'key': 'externalId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GroupContractProperties, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.built_in = None + self.type = kwargs.get('type', None) + self.external_id = kwargs.get('external_id', None) + + +class GroupCreateParameters(Model): + """Parameters supplied to the Create Group operation. + + All required parameters must be populated in order to send to Azure. + + :param display_name: Required. Group name. + :type display_name: str + :param description: Group description. + :type description: str + :param type: Group type. Possible values include: 'custom', 'system', + 'external' + :type type: str or ~azure.mgmt.apimanagement.models.GroupType + :param external_id: Identifier of the external groups, this property + contains the id of the group from the external identity provider, e.g. for + Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. + :type external_id: str + """ + + _validation = { + 'display_name': {'required': True, 'max_length': 300, 'min_length': 1}, + } + + _attribute_map = { + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'GroupType'}, + 'external_id': {'key': 'properties.externalId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GroupCreateParameters, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.type = kwargs.get('type', None) + self.external_id = kwargs.get('external_id', None) + + +class GroupUpdateParameters(Model): + """Parameters supplied to the Update Group operation. + + :param display_name: Group name. + :type display_name: str + :param description: Group description. + :type description: str + :param type: Group type. Possible values include: 'custom', 'system', + 'external' + :type type: str or ~azure.mgmt.apimanagement.models.GroupType + :param external_id: Identifier of the external groups, this property + contains the id of the group from the external identity provider, e.g. for + Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. + :type external_id: str + """ + + _validation = { + 'display_name': {'max_length': 300, 'min_length': 1}, + } + + _attribute_map = { + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'GroupType'}, + 'external_id': {'key': 'properties.externalId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GroupUpdateParameters, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.type = kwargs.get('type', None) + self.external_id = kwargs.get('external_id', None) + + +class HostnameConfiguration(Model): + """Custom hostname configuration. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Hostname type. Possible values include: 'Proxy', + 'Portal', 'Management', 'Scm', 'DeveloperPortal' + :type type: str or ~azure.mgmt.apimanagement.models.HostnameType + :param host_name: Required. Hostname to configure on the Api Management + service. + :type host_name: str + :param key_vault_id: Url to the KeyVault Secret containing the Ssl + Certificate. If absolute Url containing version is provided, auto-update + of ssl certificate will not work. This requires Api Management service to + be configured with MSI. The secret should be of type + *application/x-pkcs12* + :type key_vault_id: str + :param encoded_certificate: Base64 Encoded certificate. + :type encoded_certificate: str + :param certificate_password: Certificate Password. + :type certificate_password: str + :param default_ssl_binding: Specify true to setup the certificate + associated with this Hostname as the Default SSL Certificate. If a client + does not send the SNI header, then this will be the certificate that will + be challenged. The property is useful if a service has multiple custom + hostname enabled and it needs to decide on the default ssl certificate. + The setting only applied to Proxy Hostname Type. Default value: False . + :type default_ssl_binding: bool + :param negotiate_client_certificate: Specify true to always negotiate + client certificate on the hostname. Default Value is false. Default value: + False . + :type negotiate_client_certificate: bool + :param certificate: Certificate information. + :type certificate: ~azure.mgmt.apimanagement.models.CertificateInformation + """ + + _validation = { + 'type': {'required': True}, + 'host_name': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'host_name': {'key': 'hostName', 'type': 'str'}, + 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, + 'encoded_certificate': {'key': 'encodedCertificate', 'type': 'str'}, + 'certificate_password': {'key': 'certificatePassword', 'type': 'str'}, + 'default_ssl_binding': {'key': 'defaultSslBinding', 'type': 'bool'}, + 'negotiate_client_certificate': {'key': 'negotiateClientCertificate', 'type': 'bool'}, + 'certificate': {'key': 'certificate', 'type': 'CertificateInformation'}, + } + + def __init__(self, **kwargs): + super(HostnameConfiguration, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.host_name = kwargs.get('host_name', None) + self.key_vault_id = kwargs.get('key_vault_id', None) + self.encoded_certificate = kwargs.get('encoded_certificate', None) + self.certificate_password = kwargs.get('certificate_password', None) + self.default_ssl_binding = kwargs.get('default_ssl_binding', False) + self.negotiate_client_certificate = kwargs.get('negotiate_client_certificate', False) + self.certificate = kwargs.get('certificate', None) + + +class HttpMessageDiagnostic(Model): + """Http message diagnostic settings. + + :param headers: Array of HTTP Headers to log. + :type headers: list[str] + :param body: Body logging settings. + :type body: ~azure.mgmt.apimanagement.models.BodyDiagnosticSettings + """ + + _attribute_map = { + 'headers': {'key': 'headers', 'type': '[str]'}, + 'body': {'key': 'body', 'type': 'BodyDiagnosticSettings'}, + } + + def __init__(self, **kwargs): + super(HttpMessageDiagnostic, self).__init__(**kwargs) + self.headers = kwargs.get('headers', None) + self.body = kwargs.get('body', None) + + +class IdentityProviderBaseParameters(Model): + """Identity Provider Base Parameter Properties. + + :param type: Identity Provider Type identifier. Possible values include: + 'facebook', 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' + :type type: str or ~azure.mgmt.apimanagement.models.IdentityProviderType + :param allowed_tenants: List of Allowed Tenants when configuring Azure + Active Directory login. + :type allowed_tenants: list[str] + :param authority: OpenID Connect discovery endpoint hostname for AAD or + AAD B2C. + :type authority: str + :param signup_policy_name: Signup Policy Name. Only applies to AAD B2C + Identity Provider. + :type signup_policy_name: str + :param signin_policy_name: Signin Policy Name. Only applies to AAD B2C + Identity Provider. + :type signin_policy_name: str + :param profile_editing_policy_name: Profile Editing Policy Name. Only + applies to AAD B2C Identity Provider. + :type profile_editing_policy_name: str + :param password_reset_policy_name: Password Reset Policy Name. Only + applies to AAD B2C Identity Provider. + :type password_reset_policy_name: str + """ + + _validation = { + 'allowed_tenants': {'max_items': 32}, + 'signup_policy_name': {'min_length': 1}, + 'signin_policy_name': {'min_length': 1}, + 'profile_editing_policy_name': {'min_length': 1}, + 'password_reset_policy_name': {'min_length': 1}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'allowed_tenants': {'key': 'allowedTenants', 'type': '[str]'}, + 'authority': {'key': 'authority', 'type': 'str'}, + 'signup_policy_name': {'key': 'signupPolicyName', 'type': 'str'}, + 'signin_policy_name': {'key': 'signinPolicyName', 'type': 'str'}, + 'profile_editing_policy_name': {'key': 'profileEditingPolicyName', 'type': 'str'}, + 'password_reset_policy_name': {'key': 'passwordResetPolicyName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IdentityProviderBaseParameters, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.allowed_tenants = kwargs.get('allowed_tenants', None) + self.authority = kwargs.get('authority', None) + self.signup_policy_name = kwargs.get('signup_policy_name', None) + self.signin_policy_name = kwargs.get('signin_policy_name', None) + self.profile_editing_policy_name = kwargs.get('profile_editing_policy_name', None) + self.password_reset_policy_name = kwargs.get('password_reset_policy_name', None) + + +class IdentityProviderContract(Resource): + """Identity Provider details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param identity_provider_contract_type: Identity Provider Type identifier. + Possible values include: 'facebook', 'google', 'microsoft', 'twitter', + 'aad', 'aadB2C' + :type identity_provider_contract_type: str or + ~azure.mgmt.apimanagement.models.IdentityProviderType + :param allowed_tenants: List of Allowed Tenants when configuring Azure + Active Directory login. + :type allowed_tenants: list[str] + :param authority: OpenID Connect discovery endpoint hostname for AAD or + AAD B2C. + :type authority: str + :param signup_policy_name: Signup Policy Name. Only applies to AAD B2C + Identity Provider. + :type signup_policy_name: str + :param signin_policy_name: Signin Policy Name. Only applies to AAD B2C + Identity Provider. + :type signin_policy_name: str + :param profile_editing_policy_name: Profile Editing Policy Name. Only + applies to AAD B2C Identity Provider. + :type profile_editing_policy_name: str + :param password_reset_policy_name: Password Reset Policy Name. Only + applies to AAD B2C Identity Provider. + :type password_reset_policy_name: str + :param client_id: Required. Client Id of the Application in the external + Identity Provider. It is App ID for Facebook login, Client ID for Google + login, App ID for Microsoft. + :type client_id: str + :param client_secret: Required. Client secret of the Application in + external Identity Provider, used to authenticate login request. For + example, it is App Secret for Facebook login, API Key for Google login, + Public Key for Microsoft. + :type client_secret: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'allowed_tenants': {'max_items': 32}, + 'signup_policy_name': {'min_length': 1}, + 'signin_policy_name': {'min_length': 1}, + 'profile_editing_policy_name': {'min_length': 1}, + 'password_reset_policy_name': {'min_length': 1}, + 'client_id': {'required': True, 'min_length': 1}, + 'client_secret': {'required': True, 'min_length': 1}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'identity_provider_contract_type': {'key': 'properties.type', 'type': 'str'}, + 'allowed_tenants': {'key': 'properties.allowedTenants', 'type': '[str]'}, + 'authority': {'key': 'properties.authority', 'type': 'str'}, + 'signup_policy_name': {'key': 'properties.signupPolicyName', 'type': 'str'}, + 'signin_policy_name': {'key': 'properties.signinPolicyName', 'type': 'str'}, + 'profile_editing_policy_name': {'key': 'properties.profileEditingPolicyName', 'type': 'str'}, + 'password_reset_policy_name': {'key': 'properties.passwordResetPolicyName', 'type': 'str'}, + 'client_id': {'key': 'properties.clientId', 'type': 'str'}, + 'client_secret': {'key': 'properties.clientSecret', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IdentityProviderContract, self).__init__(**kwargs) + self.identity_provider_contract_type = kwargs.get('identity_provider_contract_type', None) + self.allowed_tenants = kwargs.get('allowed_tenants', None) + self.authority = kwargs.get('authority', None) + self.signup_policy_name = kwargs.get('signup_policy_name', None) + self.signin_policy_name = kwargs.get('signin_policy_name', None) + self.profile_editing_policy_name = kwargs.get('profile_editing_policy_name', None) + self.password_reset_policy_name = kwargs.get('password_reset_policy_name', None) + self.client_id = kwargs.get('client_id', None) + self.client_secret = kwargs.get('client_secret', None) + + +class IdentityProviderUpdateParameters(Model): + """Parameters supplied to update Identity Provider. + + :param type: Identity Provider Type identifier. Possible values include: + 'facebook', 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' + :type type: str or ~azure.mgmt.apimanagement.models.IdentityProviderType + :param allowed_tenants: List of Allowed Tenants when configuring Azure + Active Directory login. + :type allowed_tenants: list[str] + :param authority: OpenID Connect discovery endpoint hostname for AAD or + AAD B2C. + :type authority: str + :param signup_policy_name: Signup Policy Name. Only applies to AAD B2C + Identity Provider. + :type signup_policy_name: str + :param signin_policy_name: Signin Policy Name. Only applies to AAD B2C + Identity Provider. + :type signin_policy_name: str + :param profile_editing_policy_name: Profile Editing Policy Name. Only + applies to AAD B2C Identity Provider. + :type profile_editing_policy_name: str + :param password_reset_policy_name: Password Reset Policy Name. Only + applies to AAD B2C Identity Provider. + :type password_reset_policy_name: str + :param client_id: Client Id of the Application in the external Identity + Provider. It is App ID for Facebook login, Client ID for Google login, App + ID for Microsoft. + :type client_id: str + :param client_secret: Client secret of the Application in external + Identity Provider, used to authenticate login request. For example, it is + App Secret for Facebook login, API Key for Google login, Public Key for + Microsoft. + :type client_secret: str + """ + + _validation = { + 'allowed_tenants': {'max_items': 32}, + 'signup_policy_name': {'min_length': 1}, + 'signin_policy_name': {'min_length': 1}, + 'profile_editing_policy_name': {'min_length': 1}, + 'password_reset_policy_name': {'min_length': 1}, + 'client_id': {'min_length': 1}, + 'client_secret': {'min_length': 1}, + } + + _attribute_map = { + 'type': {'key': 'properties.type', 'type': 'str'}, + 'allowed_tenants': {'key': 'properties.allowedTenants', 'type': '[str]'}, + 'authority': {'key': 'properties.authority', 'type': 'str'}, + 'signup_policy_name': {'key': 'properties.signupPolicyName', 'type': 'str'}, + 'signin_policy_name': {'key': 'properties.signinPolicyName', 'type': 'str'}, + 'profile_editing_policy_name': {'key': 'properties.profileEditingPolicyName', 'type': 'str'}, + 'password_reset_policy_name': {'key': 'properties.passwordResetPolicyName', 'type': 'str'}, + 'client_id': {'key': 'properties.clientId', 'type': 'str'}, + 'client_secret': {'key': 'properties.clientSecret', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IdentityProviderUpdateParameters, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.allowed_tenants = kwargs.get('allowed_tenants', None) + self.authority = kwargs.get('authority', None) + self.signup_policy_name = kwargs.get('signup_policy_name', None) + self.signin_policy_name = kwargs.get('signin_policy_name', None) + self.profile_editing_policy_name = kwargs.get('profile_editing_policy_name', None) + self.password_reset_policy_name = kwargs.get('password_reset_policy_name', None) + self.client_id = kwargs.get('client_id', None) + self.client_secret = kwargs.get('client_secret', None) + + +class IssueAttachmentContract(Resource): + """Issue Attachment Contract details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param title: Required. Filename by which the binary data will be saved. + :type title: str + :param content_format: Required. Either 'link' if content is provided via + an HTTP link or the MIME type of the Base64-encoded binary data provided + in the 'content' property. + :type content_format: str + :param content: Required. An HTTP link or Base64-encoded binary data. + :type content: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'title': {'required': True}, + 'content_format': {'required': True}, + 'content': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'content_format': {'key': 'properties.contentFormat', 'type': 'str'}, + 'content': {'key': 'properties.content', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IssueAttachmentContract, self).__init__(**kwargs) + self.title = kwargs.get('title', None) + self.content_format = kwargs.get('content_format', None) + self.content = kwargs.get('content', None) + + +class IssueCommentContract(Resource): + """Issue Comment Contract details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param text: Required. Comment text. + :type text: str + :param created_date: Date and time when the comment was created. + :type created_date: datetime + :param user_id: Required. A resource identifier for the user who left the + comment. + :type user_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'text': {'required': True}, + 'user_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'text': {'key': 'properties.text', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'user_id': {'key': 'properties.userId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IssueCommentContract, self).__init__(**kwargs) + self.text = kwargs.get('text', None) + self.created_date = kwargs.get('created_date', None) + self.user_id = kwargs.get('user_id', None) + + +class IssueContract(Resource): + """Issue Contract details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param created_date: Date and time when the issue was created. + :type created_date: datetime + :param state: Status of the issue. Possible values include: 'proposed', + 'open', 'removed', 'resolved', 'closed' + :type state: str or ~azure.mgmt.apimanagement.models.State + :param api_id: A resource identifier for the API the issue was created + for. + :type api_id: str + :param title: Required. The issue title. + :type title: str + :param description: Required. Text describing the issue. + :type description: str + :param user_id: Required. A resource identifier for the user created the + issue. + :type user_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'title': {'required': True}, + 'description': {'required': True}, + 'user_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'api_id': {'key': 'properties.apiId', 'type': 'str'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'user_id': {'key': 'properties.userId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IssueContract, self).__init__(**kwargs) + self.created_date = kwargs.get('created_date', None) + self.state = kwargs.get('state', None) + self.api_id = kwargs.get('api_id', None) + self.title = kwargs.get('title', None) + self.description = kwargs.get('description', None) + self.user_id = kwargs.get('user_id', None) + + +class IssueContractBaseProperties(Model): + """Issue contract Base Properties. + + :param created_date: Date and time when the issue was created. + :type created_date: datetime + :param state: Status of the issue. Possible values include: 'proposed', + 'open', 'removed', 'resolved', 'closed' + :type state: str or ~azure.mgmt.apimanagement.models.State + :param api_id: A resource identifier for the API the issue was created + for. + :type api_id: str + """ + + _attribute_map = { + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'state': {'key': 'state', 'type': 'str'}, + 'api_id': {'key': 'apiId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IssueContractBaseProperties, self).__init__(**kwargs) + self.created_date = kwargs.get('created_date', None) + self.state = kwargs.get('state', None) + self.api_id = kwargs.get('api_id', None) + + +class IssueUpdateContract(Model): + """Issue update Parameters. + + :param created_date: Date and time when the issue was created. + :type created_date: datetime + :param state: Status of the issue. Possible values include: 'proposed', + 'open', 'removed', 'resolved', 'closed' + :type state: str or ~azure.mgmt.apimanagement.models.State + :param api_id: A resource identifier for the API the issue was created + for. + :type api_id: str + :param title: The issue title. + :type title: str + :param description: Text describing the issue. + :type description: str + :param user_id: A resource identifier for the user created the issue. + :type user_id: str + """ + + _attribute_map = { + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'api_id': {'key': 'properties.apiId', 'type': 'str'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'user_id': {'key': 'properties.userId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IssueUpdateContract, self).__init__(**kwargs) + self.created_date = kwargs.get('created_date', None) + self.state = kwargs.get('state', None) + self.api_id = kwargs.get('api_id', None) + self.title = kwargs.get('title', None) + self.description = kwargs.get('description', None) + self.user_id = kwargs.get('user_id', None) + + +class LoggerContract(Resource): + """Logger details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param logger_type: Required. Logger type. Possible values include: + 'azureEventHub', 'applicationInsights' + :type logger_type: str or ~azure.mgmt.apimanagement.models.LoggerType + :param description: Logger description. + :type description: str + :param credentials: Required. The name and SendRule connection string of + the event hub for azureEventHub logger. + Instrumentation key for applicationInsights logger. + :type credentials: dict[str, str] + :param is_buffered: Whether records are buffered in the logger before + publishing. Default is assumed to be true. + :type is_buffered: bool + :param resource_id: Azure Resource Id of a log target (either Azure Event + Hub resource or Azure Application Insights resource). + :type resource_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'logger_type': {'required': True}, + 'description': {'max_length': 256}, + 'credentials': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'logger_type': {'key': 'properties.loggerType', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'credentials': {'key': 'properties.credentials', 'type': '{str}'}, + 'is_buffered': {'key': 'properties.isBuffered', 'type': 'bool'}, + 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LoggerContract, self).__init__(**kwargs) + self.logger_type = kwargs.get('logger_type', None) + self.description = kwargs.get('description', None) + self.credentials = kwargs.get('credentials', None) + self.is_buffered = kwargs.get('is_buffered', None) + self.resource_id = kwargs.get('resource_id', None) + + +class LoggerUpdateContract(Model): + """Logger update contract. + + :param logger_type: Logger type. Possible values include: 'azureEventHub', + 'applicationInsights' + :type logger_type: str or ~azure.mgmt.apimanagement.models.LoggerType + :param description: Logger description. + :type description: str + :param credentials: Logger credentials. + :type credentials: dict[str, str] + :param is_buffered: Whether records are buffered in the logger before + publishing. Default is assumed to be true. + :type is_buffered: bool + """ + + _attribute_map = { + 'logger_type': {'key': 'properties.loggerType', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'credentials': {'key': 'properties.credentials', 'type': '{str}'}, + 'is_buffered': {'key': 'properties.isBuffered', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(LoggerUpdateContract, self).__init__(**kwargs) + self.logger_type = kwargs.get('logger_type', None) + self.description = kwargs.get('description', None) + self.credentials = kwargs.get('credentials', None) + self.is_buffered = kwargs.get('is_buffered', None) + + +class NetworkStatusContract(Model): + """Network Status details. + + All required parameters must be populated in order to send to Azure. + + :param dns_servers: Required. Gets the list of DNS servers IPV4 addresses. + :type dns_servers: list[str] + :param connectivity_status: Required. Gets the list of Connectivity Status + to the Resources on which the service depends upon. + :type connectivity_status: + list[~azure.mgmt.apimanagement.models.ConnectivityStatusContract] + """ + + _validation = { + 'dns_servers': {'required': True}, + 'connectivity_status': {'required': True}, + } + + _attribute_map = { + 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, + 'connectivity_status': {'key': 'connectivityStatus', 'type': '[ConnectivityStatusContract]'}, + } + + def __init__(self, **kwargs): + super(NetworkStatusContract, self).__init__(**kwargs) + self.dns_servers = kwargs.get('dns_servers', None) + self.connectivity_status = kwargs.get('connectivity_status', None) + + +class NetworkStatusContractByLocation(Model): + """Network Status in the Location. + + :param location: Location of service + :type location: str + :param network_status: Network status in Location + :type network_status: + ~azure.mgmt.apimanagement.models.NetworkStatusContract + """ + + _validation = { + 'location': {'min_length': 1}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'network_status': {'key': 'networkStatus', 'type': 'NetworkStatusContract'}, + } + + def __init__(self, **kwargs): + super(NetworkStatusContractByLocation, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.network_status = kwargs.get('network_status', None) + + +class NotificationContract(Resource): + """Notification details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param title: Required. Title of the Notification. + :type title: str + :param description: Description of the Notification. + :type description: str + :param recipients: Recipient Parameter values. + :type recipients: + ~azure.mgmt.apimanagement.models.RecipientsContractProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'title': {'required': True, 'max_length': 1000, 'min_length': 1}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'recipients': {'key': 'properties.recipients', 'type': 'RecipientsContractProperties'}, + } + + def __init__(self, **kwargs): + super(NotificationContract, self).__init__(**kwargs) + self.title = kwargs.get('title', None) + self.description = kwargs.get('description', None) + self.recipients = kwargs.get('recipients', None) + + +class OAuth2AuthenticationSettingsContract(Model): + """API OAuth2 Authentication settings details. + + :param authorization_server_id: OAuth authorization server identifier. + :type authorization_server_id: str + :param scope: operations scope. + :type scope: str + """ + + _attribute_map = { + 'authorization_server_id': {'key': 'authorizationServerId', 'type': 'str'}, + 'scope': {'key': 'scope', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OAuth2AuthenticationSettingsContract, self).__init__(**kwargs) + self.authorization_server_id = kwargs.get('authorization_server_id', None) + self.scope = kwargs.get('scope', None) + + +class OpenIdAuthenticationSettingsContract(Model): + """API OAuth2 Authentication settings details. + + :param openid_provider_id: OAuth authorization server identifier. + :type openid_provider_id: str + :param bearer_token_sending_methods: How to send token to the server. + :type bearer_token_sending_methods: list[str or + ~azure.mgmt.apimanagement.models.BearerTokenSendingMethods] + """ + + _attribute_map = { + 'openid_provider_id': {'key': 'openidProviderId', 'type': 'str'}, + 'bearer_token_sending_methods': {'key': 'bearerTokenSendingMethods', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(OpenIdAuthenticationSettingsContract, self).__init__(**kwargs) + self.openid_provider_id = kwargs.get('openid_provider_id', None) + self.bearer_token_sending_methods = kwargs.get('bearer_token_sending_methods', None) + + +class OpenidConnectProviderContract(Resource): + """OpenId Connect Provider details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param display_name: Required. User-friendly OpenID Connect Provider name. + :type display_name: str + :param description: User-friendly description of OpenID Connect Provider. + :type description: str + :param metadata_endpoint: Required. Metadata endpoint URI. + :type metadata_endpoint: str + :param client_id: Required. Client ID of developer console which is the + client application. + :type client_id: str + :param client_secret: Client Secret of developer console which is the + client application. + :type client_secret: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'required': True, 'max_length': 50}, + 'metadata_endpoint': {'required': True}, + 'client_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'metadata_endpoint': {'key': 'properties.metadataEndpoint', 'type': 'str'}, + 'client_id': {'key': 'properties.clientId', 'type': 'str'}, + 'client_secret': {'key': 'properties.clientSecret', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OpenidConnectProviderContract, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.metadata_endpoint = kwargs.get('metadata_endpoint', None) + self.client_id = kwargs.get('client_id', None) + self.client_secret = kwargs.get('client_secret', None) + + +class OpenidConnectProviderUpdateContract(Model): + """Parameters supplied to the Update OpenID Connect Provider operation. + + :param display_name: User-friendly OpenID Connect Provider name. + :type display_name: str + :param description: User-friendly description of OpenID Connect Provider. + :type description: str + :param metadata_endpoint: Metadata endpoint URI. + :type metadata_endpoint: str + :param client_id: Client ID of developer console which is the client + application. + :type client_id: str + :param client_secret: Client Secret of developer console which is the + client application. + :type client_secret: str + """ + + _validation = { + 'display_name': {'max_length': 50}, + } + + _attribute_map = { + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'metadata_endpoint': {'key': 'properties.metadataEndpoint', 'type': 'str'}, + 'client_id': {'key': 'properties.clientId', 'type': 'str'}, + 'client_secret': {'key': 'properties.clientSecret', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OpenidConnectProviderUpdateContract, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.metadata_endpoint = kwargs.get('metadata_endpoint', None) + self.client_id = kwargs.get('client_id', None) + self.client_secret = kwargs.get('client_secret', None) + + +class Operation(Model): + """REST API operation. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: The object that describes the operation. + :type display: ~azure.mgmt.apimanagement.models.OperationDisplay + :param origin: The operation origin. + :type origin: str + :param properties: The operation properties. + :type properties: object + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + self.properties = kwargs.get('properties', None) + + +class OperationContract(Resource): + """Api Operation details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param template_parameters: Collection of URL template parameters. + :type template_parameters: + list[~azure.mgmt.apimanagement.models.ParameterContract] + :param description: Description of the operation. May include HTML + formatting tags. + :type description: str + :param request: An entity containing request details. + :type request: ~azure.mgmt.apimanagement.models.RequestContract + :param responses: Array of Operation responses. + :type responses: list[~azure.mgmt.apimanagement.models.ResponseContract] + :param policies: Operation Policies + :type policies: str + :param display_name: Required. Operation Name. + :type display_name: str + :param method: Required. A Valid HTTP Operation Method. Typical Http + Methods like GET, PUT, POST but not limited by only them. + :type method: str + :param url_template: Required. Relative URL template identifying the + target resource for this operation. May include parameters. Example: + /customers/{cid}/orders/{oid}/?date={date} + :type url_template: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'max_length': 1000}, + 'display_name': {'required': True, 'max_length': 300, 'min_length': 1}, + 'method': {'required': True}, + 'url_template': {'required': True, 'max_length': 1000, 'min_length': 1}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'template_parameters': {'key': 'properties.templateParameters', 'type': '[ParameterContract]'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'request': {'key': 'properties.request', 'type': 'RequestContract'}, + 'responses': {'key': 'properties.responses', 'type': '[ResponseContract]'}, + 'policies': {'key': 'properties.policies', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'method': {'key': 'properties.method', 'type': 'str'}, + 'url_template': {'key': 'properties.urlTemplate', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationContract, self).__init__(**kwargs) + self.template_parameters = kwargs.get('template_parameters', None) + self.description = kwargs.get('description', None) + self.request = kwargs.get('request', None) + self.responses = kwargs.get('responses', None) + self.policies = kwargs.get('policies', None) + self.display_name = kwargs.get('display_name', None) + self.method = kwargs.get('method', None) + self.url_template = kwargs.get('url_template', None) + + +class OperationDisplay(Model): + """The object that describes the operation. + + :param provider: Friendly name of the resource provider + :type provider: str + :param operation: Operation type: read, write, delete, listKeys/action, + etc. + :type operation: str + :param resource: Resource type on which the operation is performed. + :type resource: str + :param description: Friendly name of the operation + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.operation = kwargs.get('operation', None) + self.resource = kwargs.get('resource', None) + self.description = kwargs.get('description', None) + + +class OperationEntityBaseContract(Model): + """Api Operation Entity Base Contract details. + + :param template_parameters: Collection of URL template parameters. + :type template_parameters: + list[~azure.mgmt.apimanagement.models.ParameterContract] + :param description: Description of the operation. May include HTML + formatting tags. + :type description: str + :param request: An entity containing request details. + :type request: ~azure.mgmt.apimanagement.models.RequestContract + :param responses: Array of Operation responses. + :type responses: list[~azure.mgmt.apimanagement.models.ResponseContract] + :param policies: Operation Policies + :type policies: str + """ + + _validation = { + 'description': {'max_length': 1000}, + } + + _attribute_map = { + 'template_parameters': {'key': 'templateParameters', 'type': '[ParameterContract]'}, + 'description': {'key': 'description', 'type': 'str'}, + 'request': {'key': 'request', 'type': 'RequestContract'}, + 'responses': {'key': 'responses', 'type': '[ResponseContract]'}, + 'policies': {'key': 'policies', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationEntityBaseContract, self).__init__(**kwargs) + self.template_parameters = kwargs.get('template_parameters', None) + self.description = kwargs.get('description', None) + self.request = kwargs.get('request', None) + self.responses = kwargs.get('responses', None) + self.policies = kwargs.get('policies', None) + + +class OperationResultContract(Model): + """Operation Result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: Operation result identifier. + :type id: str + :param status: Status of an async operation. Possible values include: + 'Started', 'InProgress', 'Succeeded', 'Failed' + :type status: str or ~azure.mgmt.apimanagement.models.AsyncOperationStatus + :param started: Start time of an async operation. The date conforms to the + following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 + standard. + :type started: datetime + :param updated: Last update time of an async operation. The date conforms + to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO + 8601 standard. + :type updated: datetime + :param result_info: Optional result info. + :type result_info: str + :param error: Error Body Contract + :type error: ~azure.mgmt.apimanagement.models.ErrorResponseBody + :ivar action_log: This property if only provided as part of the + TenantConfiguration_Validate operation. It contains the log the entities + which will be updated/created/deleted as part of the + TenantConfiguration_Deploy operation. + :vartype action_log: + list[~azure.mgmt.apimanagement.models.OperationResultLogItemContract] + """ + + _validation = { + 'action_log': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'AsyncOperationStatus'}, + 'started': {'key': 'started', 'type': 'iso-8601'}, + 'updated': {'key': 'updated', 'type': 'iso-8601'}, + 'result_info': {'key': 'resultInfo', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ErrorResponseBody'}, + 'action_log': {'key': 'actionLog', 'type': '[OperationResultLogItemContract]'}, + } + + def __init__(self, **kwargs): + super(OperationResultContract, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.status = kwargs.get('status', None) + self.started = kwargs.get('started', None) + self.updated = kwargs.get('updated', None) + self.result_info = kwargs.get('result_info', None) + self.error = kwargs.get('error', None) + self.action_log = None + + +class OperationResultLogItemContract(Model): + """Log of the entity being created, updated or deleted. + + :param object_type: The type of entity contract. + :type object_type: str + :param action: Action like create/update/delete. + :type action: str + :param object_key: Identifier of the entity being created/updated/deleted. + :type object_key: str + """ + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'str'}, + 'object_key': {'key': 'objectKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationResultLogItemContract, self).__init__(**kwargs) + self.object_type = kwargs.get('object_type', None) + self.action = kwargs.get('action', None) + self.object_key = kwargs.get('object_key', None) + + +class OperationTagResourceContractProperties(Model): + """Operation Entity contract Properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: Identifier of the operation in form /operations/{operationId}. + :type id: str + :ivar name: Operation name. + :vartype name: str + :ivar api_name: Api Name. + :vartype api_name: str + :ivar api_revision: Api Revision. + :vartype api_revision: str + :ivar api_version: Api Version. + :vartype api_version: str + :ivar description: Operation Description. + :vartype description: str + :ivar method: A Valid HTTP Operation Method. Typical Http Methods like + GET, PUT, POST but not limited by only them. + :vartype method: str + :ivar url_template: Relative URL template identifying the target resource + for this operation. May include parameters. Example: + /customers/{cid}/orders/{oid}/?date={date} + :vartype url_template: str + """ + + _validation = { + 'name': {'readonly': True}, + 'api_name': {'readonly': True}, + 'api_revision': {'readonly': True}, + 'api_version': {'readonly': True}, + 'description': {'readonly': True}, + 'method': {'readonly': True}, + 'url_template': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'api_name': {'key': 'apiName', 'type': 'str'}, + 'api_revision': {'key': 'apiRevision', 'type': 'str'}, + 'api_version': {'key': 'apiVersion', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'method': {'key': 'method', 'type': 'str'}, + 'url_template': {'key': 'urlTemplate', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationTagResourceContractProperties, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = None + self.api_name = None + self.api_revision = None + self.api_version = None + self.description = None + self.method = None + self.url_template = None + + +class OperationUpdateContract(Model): + """Api Operation Update Contract details. + + :param template_parameters: Collection of URL template parameters. + :type template_parameters: + list[~azure.mgmt.apimanagement.models.ParameterContract] + :param description: Description of the operation. May include HTML + formatting tags. + :type description: str + :param request: An entity containing request details. + :type request: ~azure.mgmt.apimanagement.models.RequestContract + :param responses: Array of Operation responses. + :type responses: list[~azure.mgmt.apimanagement.models.ResponseContract] + :param policies: Operation Policies + :type policies: str + :param display_name: Operation Name. + :type display_name: str + :param method: A Valid HTTP Operation Method. Typical Http Methods like + GET, PUT, POST but not limited by only them. + :type method: str + :param url_template: Relative URL template identifying the target resource + for this operation. May include parameters. Example: + /customers/{cid}/orders/{oid}/?date={date} + :type url_template: str + """ + + _validation = { + 'description': {'max_length': 1000}, + 'display_name': {'max_length': 300, 'min_length': 1}, + 'url_template': {'max_length': 1000, 'min_length': 1}, + } + + _attribute_map = { + 'template_parameters': {'key': 'properties.templateParameters', 'type': '[ParameterContract]'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'request': {'key': 'properties.request', 'type': 'RequestContract'}, + 'responses': {'key': 'properties.responses', 'type': '[ResponseContract]'}, + 'policies': {'key': 'properties.policies', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'method': {'key': 'properties.method', 'type': 'str'}, + 'url_template': {'key': 'properties.urlTemplate', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationUpdateContract, self).__init__(**kwargs) + self.template_parameters = kwargs.get('template_parameters', None) + self.description = kwargs.get('description', None) + self.request = kwargs.get('request', None) + self.responses = kwargs.get('responses', None) + self.policies = kwargs.get('policies', None) + self.display_name = kwargs.get('display_name', None) + self.method = kwargs.get('method', None) + self.url_template = kwargs.get('url_template', None) + + +class ParameterContract(Model): + """Operation parameters details. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Parameter name. + :type name: str + :param description: Parameter description. + :type description: str + :param type: Required. Parameter type. + :type type: str + :param default_value: Default parameter value. + :type default_value: str + :param required: Specifies whether parameter is required or not. + :type required: bool + :param values: Parameter values. + :type values: list[str] + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'required': {'key': 'required', 'type': 'bool'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ParameterContract, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.type = kwargs.get('type', None) + self.default_value = kwargs.get('default_value', None) + self.required = kwargs.get('required', None) + self.values = kwargs.get('values', None) + + +class PipelineDiagnosticSettings(Model): + """Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. + + :param request: Diagnostic settings for request. + :type request: ~azure.mgmt.apimanagement.models.HttpMessageDiagnostic + :param response: Diagnostic settings for response. + :type response: ~azure.mgmt.apimanagement.models.HttpMessageDiagnostic + """ + + _attribute_map = { + 'request': {'key': 'request', 'type': 'HttpMessageDiagnostic'}, + 'response': {'key': 'response', 'type': 'HttpMessageDiagnostic'}, + } + + def __init__(self, **kwargs): + super(PipelineDiagnosticSettings, self).__init__(**kwargs) + self.request = kwargs.get('request', None) + self.response = kwargs.get('response', None) + + +class PolicyCollection(Model): + """The response of the list policy operation. + + :param value: Policy Contract value. + :type value: list[~azure.mgmt.apimanagement.models.PolicyContract] + :param next_link: Next page link if any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PolicyContract]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PolicyCollection, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class PolicyContract(Resource): + """Policy Contract details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param value: Required. Contents of the Policy as defined by the format. + :type value: str + :param format: Format of the policyContent. Possible values include: + 'xml', 'xml-link', 'rawxml', 'rawxml-link'. Default value: "xml" . + :type format: str or ~azure.mgmt.apimanagement.models.PolicyContentFormat + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + 'format': {'key': 'properties.format', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PolicyContract, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.format = kwargs.get('format', "xml") + + +class PolicySnippetContract(Model): + """Policy snippet. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Snippet name. + :vartype name: str + :ivar content: Snippet content. + :vartype content: str + :ivar tool_tip: Snippet toolTip. + :vartype tool_tip: str + :ivar scope: Binary OR value of the Snippet scope. + :vartype scope: int + """ + + _validation = { + 'name': {'readonly': True}, + 'content': {'readonly': True}, + 'tool_tip': {'readonly': True}, + 'scope': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'content': {'key': 'content', 'type': 'str'}, + 'tool_tip': {'key': 'toolTip', 'type': 'str'}, + 'scope': {'key': 'scope', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(PolicySnippetContract, self).__init__(**kwargs) + self.name = None + self.content = None + self.tool_tip = None + self.scope = None + + +class PolicySnippetsCollection(Model): + """The response of the list policy snippets operation. + + :param value: Policy snippet value. + :type value: list[~azure.mgmt.apimanagement.models.PolicySnippetContract] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PolicySnippetContract]'}, + } + + def __init__(self, **kwargs): + super(PolicySnippetsCollection, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class PortalDelegationSettings(Resource): + """Delegation settings for a developer portal. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param url: A delegation Url. + :type url: str + :param validation_key: A base64-encoded validation key to validate, that a + request is coming from Azure API Management. + :type validation_key: str + :param subscriptions: Subscriptions delegation settings. + :type subscriptions: + ~azure.mgmt.apimanagement.models.SubscriptionsDelegationSettingsProperties + :param user_registration: User registration delegation settings. + :type user_registration: + ~azure.mgmt.apimanagement.models.RegistrationDelegationSettingsProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'url': {'key': 'properties.url', 'type': 'str'}, + 'validation_key': {'key': 'properties.validationKey', 'type': 'str'}, + 'subscriptions': {'key': 'properties.subscriptions', 'type': 'SubscriptionsDelegationSettingsProperties'}, + 'user_registration': {'key': 'properties.userRegistration', 'type': 'RegistrationDelegationSettingsProperties'}, + } + + def __init__(self, **kwargs): + super(PortalDelegationSettings, self).__init__(**kwargs) + self.url = kwargs.get('url', None) + self.validation_key = kwargs.get('validation_key', None) + self.subscriptions = kwargs.get('subscriptions', None) + self.user_registration = kwargs.get('user_registration', None) + + +class PortalSigninSettings(Resource): + """Sign-In settings for the Developer Portal. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param enabled: Redirect Anonymous users to the Sign-In page. + :type enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(PortalSigninSettings, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + + +class PortalSignupSettings(Resource): + """Sign-Up settings for a developer portal. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param enabled: Allow users to sign up on a developer portal. + :type enabled: bool + :param terms_of_service: Terms of service contract properties. + :type terms_of_service: + ~azure.mgmt.apimanagement.models.TermsOfServiceProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'terms_of_service': {'key': 'properties.termsOfService', 'type': 'TermsOfServiceProperties'}, + } + + def __init__(self, **kwargs): + super(PortalSignupSettings, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.terms_of_service = kwargs.get('terms_of_service', None) + + +class ProductContract(Resource): + """Product details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param description: Product description. May include HTML formatting tags. + :type description: str + :param terms: Product terms of use. Developers trying to subscribe to the + product will be presented and required to accept these terms before they + can complete the subscription process. + :type terms: str + :param subscription_required: Whether a product subscription is required + for accessing APIs included in this product. If true, the product is + referred to as "protected" and a valid subscription key is required for a + request to an API included in the product to succeed. If false, the + product is referred to as "open" and requests to an API included in the + product can be made without a subscription key. If property is omitted + when creating a new product it's value is assumed to be true. + :type subscription_required: bool + :param approval_required: whether subscription approval is required. If + false, new subscriptions will be approved automatically enabling + developers to call the product’s APIs immediately after subscribing. If + true, administrators must manually approve the subscription before the + developer can any of the product’s APIs. Can be present only if + subscriptionRequired property is present and has a value of false. + :type approval_required: bool + :param subscriptions_limit: Whether the number of subscriptions a user can + have to this product at the same time. Set to null or omit to allow + unlimited per user subscriptions. Can be present only if + subscriptionRequired property is present and has a value of false. + :type subscriptions_limit: int + :param state: whether product is published or not. Published products are + discoverable by users of developer portal. Non published products are + visible only to administrators. Default state of Product is notPublished. + Possible values include: 'notPublished', 'published' + :type state: str or ~azure.mgmt.apimanagement.models.ProductState + :param display_name: Required. Product name. + :type display_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'max_length': 1000, 'min_length': 1}, + 'display_name': {'required': True, 'max_length': 300, 'min_length': 1}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'terms': {'key': 'properties.terms', 'type': 'str'}, + 'subscription_required': {'key': 'properties.subscriptionRequired', 'type': 'bool'}, + 'approval_required': {'key': 'properties.approvalRequired', 'type': 'bool'}, + 'subscriptions_limit': {'key': 'properties.subscriptionsLimit', 'type': 'int'}, + 'state': {'key': 'properties.state', 'type': 'ProductState'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProductContract, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.terms = kwargs.get('terms', None) + self.subscription_required = kwargs.get('subscription_required', None) + self.approval_required = kwargs.get('approval_required', None) + self.subscriptions_limit = kwargs.get('subscriptions_limit', None) + self.state = kwargs.get('state', None) + self.display_name = kwargs.get('display_name', None) + + +class ProductEntityBaseParameters(Model): + """Product Entity Base Parameters. + + :param description: Product description. May include HTML formatting tags. + :type description: str + :param terms: Product terms of use. Developers trying to subscribe to the + product will be presented and required to accept these terms before they + can complete the subscription process. + :type terms: str + :param subscription_required: Whether a product subscription is required + for accessing APIs included in this product. If true, the product is + referred to as "protected" and a valid subscription key is required for a + request to an API included in the product to succeed. If false, the + product is referred to as "open" and requests to an API included in the + product can be made without a subscription key. If property is omitted + when creating a new product it's value is assumed to be true. + :type subscription_required: bool + :param approval_required: whether subscription approval is required. If + false, new subscriptions will be approved automatically enabling + developers to call the product’s APIs immediately after subscribing. If + true, administrators must manually approve the subscription before the + developer can any of the product’s APIs. Can be present only if + subscriptionRequired property is present and has a value of false. + :type approval_required: bool + :param subscriptions_limit: Whether the number of subscriptions a user can + have to this product at the same time. Set to null or omit to allow + unlimited per user subscriptions. Can be present only if + subscriptionRequired property is present and has a value of false. + :type subscriptions_limit: int + :param state: whether product is published or not. Published products are + discoverable by users of developer portal. Non published products are + visible only to administrators. Default state of Product is notPublished. + Possible values include: 'notPublished', 'published' + :type state: str or ~azure.mgmt.apimanagement.models.ProductState + """ + + _validation = { + 'description': {'max_length': 1000, 'min_length': 1}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'terms': {'key': 'terms', 'type': 'str'}, + 'subscription_required': {'key': 'subscriptionRequired', 'type': 'bool'}, + 'approval_required': {'key': 'approvalRequired', 'type': 'bool'}, + 'subscriptions_limit': {'key': 'subscriptionsLimit', 'type': 'int'}, + 'state': {'key': 'state', 'type': 'ProductState'}, + } + + def __init__(self, **kwargs): + super(ProductEntityBaseParameters, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.terms = kwargs.get('terms', None) + self.subscription_required = kwargs.get('subscription_required', None) + self.approval_required = kwargs.get('approval_required', None) + self.subscriptions_limit = kwargs.get('subscriptions_limit', None) + self.state = kwargs.get('state', None) + + +class ProductTagResourceContractProperties(ProductEntityBaseParameters): + """Product profile. + + All required parameters must be populated in order to send to Azure. + + :param description: Product description. May include HTML formatting tags. + :type description: str + :param terms: Product terms of use. Developers trying to subscribe to the + product will be presented and required to accept these terms before they + can complete the subscription process. + :type terms: str + :param subscription_required: Whether a product subscription is required + for accessing APIs included in this product. If true, the product is + referred to as "protected" and a valid subscription key is required for a + request to an API included in the product to succeed. If false, the + product is referred to as "open" and requests to an API included in the + product can be made without a subscription key. If property is omitted + when creating a new product it's value is assumed to be true. + :type subscription_required: bool + :param approval_required: whether subscription approval is required. If + false, new subscriptions will be approved automatically enabling + developers to call the product’s APIs immediately after subscribing. If + true, administrators must manually approve the subscription before the + developer can any of the product’s APIs. Can be present only if + subscriptionRequired property is present and has a value of false. + :type approval_required: bool + :param subscriptions_limit: Whether the number of subscriptions a user can + have to this product at the same time. Set to null or omit to allow + unlimited per user subscriptions. Can be present only if + subscriptionRequired property is present and has a value of false. + :type subscriptions_limit: int + :param state: whether product is published or not. Published products are + discoverable by users of developer portal. Non published products are + visible only to administrators. Default state of Product is notPublished. + Possible values include: 'notPublished', 'published' + :type state: str or ~azure.mgmt.apimanagement.models.ProductState + :param id: Identifier of the product in the form of /products/{productId} + :type id: str + :param name: Required. Product name. + :type name: str + """ + + _validation = { + 'description': {'max_length': 1000, 'min_length': 1}, + 'name': {'required': True, 'max_length': 300, 'min_length': 1}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'terms': {'key': 'terms', 'type': 'str'}, + 'subscription_required': {'key': 'subscriptionRequired', 'type': 'bool'}, + 'approval_required': {'key': 'approvalRequired', 'type': 'bool'}, + 'subscriptions_limit': {'key': 'subscriptionsLimit', 'type': 'int'}, + 'state': {'key': 'state', 'type': 'ProductState'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProductTagResourceContractProperties, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + + +class ProductUpdateParameters(Model): + """Product Update parameters. + + :param description: Product description. May include HTML formatting tags. + :type description: str + :param terms: Product terms of use. Developers trying to subscribe to the + product will be presented and required to accept these terms before they + can complete the subscription process. + :type terms: str + :param subscription_required: Whether a product subscription is required + for accessing APIs included in this product. If true, the product is + referred to as "protected" and a valid subscription key is required for a + request to an API included in the product to succeed. If false, the + product is referred to as "open" and requests to an API included in the + product can be made without a subscription key. If property is omitted + when creating a new product it's value is assumed to be true. + :type subscription_required: bool + :param approval_required: whether subscription approval is required. If + false, new subscriptions will be approved automatically enabling + developers to call the product’s APIs immediately after subscribing. If + true, administrators must manually approve the subscription before the + developer can any of the product’s APIs. Can be present only if + subscriptionRequired property is present and has a value of false. + :type approval_required: bool + :param subscriptions_limit: Whether the number of subscriptions a user can + have to this product at the same time. Set to null or omit to allow + unlimited per user subscriptions. Can be present only if + subscriptionRequired property is present and has a value of false. + :type subscriptions_limit: int + :param state: whether product is published or not. Published products are + discoverable by users of developer portal. Non published products are + visible only to administrators. Default state of Product is notPublished. + Possible values include: 'notPublished', 'published' + :type state: str or ~azure.mgmt.apimanagement.models.ProductState + :param display_name: Product name. + :type display_name: str + """ + + _validation = { + 'description': {'max_length': 1000, 'min_length': 1}, + 'display_name': {'max_length': 300, 'min_length': 1}, + } + + _attribute_map = { + 'description': {'key': 'properties.description', 'type': 'str'}, + 'terms': {'key': 'properties.terms', 'type': 'str'}, + 'subscription_required': {'key': 'properties.subscriptionRequired', 'type': 'bool'}, + 'approval_required': {'key': 'properties.approvalRequired', 'type': 'bool'}, + 'subscriptions_limit': {'key': 'properties.subscriptionsLimit', 'type': 'int'}, + 'state': {'key': 'properties.state', 'type': 'ProductState'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProductUpdateParameters, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.terms = kwargs.get('terms', None) + self.subscription_required = kwargs.get('subscription_required', None) + self.approval_required = kwargs.get('approval_required', None) + self.subscriptions_limit = kwargs.get('subscriptions_limit', None) + self.state = kwargs.get('state', None) + self.display_name = kwargs.get('display_name', None) + + +class PropertyContract(Resource): + """Property details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param tags: Optional tags that when provided can be used to filter the + property list. + :type tags: list[str] + :param secret: Determines whether the value is a secret and should be + encrypted or not. Default value is false. + :type secret: bool + :param display_name: Required. Unique name of Property. It may contain + only letters, digits, period, dash, and underscore characters. + :type display_name: str + :param value: Required. Value of the property. Can contain policy + expressions. It may not be empty or consist only of whitespace. + :type value: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'max_items': 32}, + 'display_name': {'required': True, 'max_length': 256, 'min_length': 1, 'pattern': r'^[A-Za-z0-9-._]+$'}, + 'value': {'required': True, 'max_length': 4096, 'min_length': 1}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'properties.tags', 'type': '[str]'}, + 'secret': {'key': 'properties.secret', 'type': 'bool'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PropertyContract, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.secret = kwargs.get('secret', None) + self.display_name = kwargs.get('display_name', None) + self.value = kwargs.get('value', None) + + +class PropertyEntityBaseParameters(Model): + """Property Entity Base Parameters set. + + :param tags: Optional tags that when provided can be used to filter the + property list. + :type tags: list[str] + :param secret: Determines whether the value is a secret and should be + encrypted or not. Default value is false. + :type secret: bool + """ + + _validation = { + 'tags': {'max_items': 32}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '[str]'}, + 'secret': {'key': 'secret', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(PropertyEntityBaseParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.secret = kwargs.get('secret', None) + + +class PropertyUpdateParameters(Model): + """Property update Parameters. + + :param tags: Optional tags that when provided can be used to filter the + property list. + :type tags: list[str] + :param secret: Determines whether the value is a secret and should be + encrypted or not. Default value is false. + :type secret: bool + :param display_name: Unique name of Property. It may contain only letters, + digits, period, dash, and underscore characters. + :type display_name: str + :param value: Value of the property. Can contain policy expressions. It + may not be empty or consist only of whitespace. + :type value: str + """ + + _validation = { + 'tags': {'max_items': 32}, + 'display_name': {'max_length': 256, 'min_length': 1, 'pattern': r'^[A-Za-z0-9-._]+$'}, + 'value': {'max_length': 4096, 'min_length': 1}, + } + + _attribute_map = { + 'tags': {'key': 'properties.tags', 'type': '[str]'}, + 'secret': {'key': 'properties.secret', 'type': 'bool'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PropertyUpdateParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.secret = kwargs.get('secret', None) + self.display_name = kwargs.get('display_name', None) + self.value = kwargs.get('value', None) + + +class QuotaCounterCollection(Model): + """Paged Quota Counter list representation. + + :param value: Quota counter values. + :type value: list[~azure.mgmt.apimanagement.models.QuotaCounterContract] + :param count: Total record count number across all pages. + :type count: long + :param next_link: Next page link if any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[QuotaCounterContract]'}, + 'count': {'key': 'count', 'type': 'long'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(QuotaCounterCollection, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.count = kwargs.get('count', None) + self.next_link = kwargs.get('next_link', None) + + +class QuotaCounterContract(Model): + """Quota counter details. + + All required parameters must be populated in order to send to Azure. + + :param counter_key: Required. The Key value of the Counter. Must not be + empty. + :type counter_key: str + :param period_key: Required. Identifier of the Period for which the + counter was collected. Must not be empty. + :type period_key: str + :param period_start_time: Required. The date of the start of Counter + Period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` + as specified by the ISO 8601 standard. + :type period_start_time: datetime + :param period_end_time: Required. The date of the end of Counter Period. + The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as + specified by the ISO 8601 standard. + :type period_end_time: datetime + :param value: Quota Value Properties + :type value: + ~azure.mgmt.apimanagement.models.QuotaCounterValueContractProperties + """ + + _validation = { + 'counter_key': {'required': True, 'min_length': 1}, + 'period_key': {'required': True, 'min_length': 1}, + 'period_start_time': {'required': True}, + 'period_end_time': {'required': True}, + } + + _attribute_map = { + 'counter_key': {'key': 'counterKey', 'type': 'str'}, + 'period_key': {'key': 'periodKey', 'type': 'str'}, + 'period_start_time': {'key': 'periodStartTime', 'type': 'iso-8601'}, + 'period_end_time': {'key': 'periodEndTime', 'type': 'iso-8601'}, + 'value': {'key': 'value', 'type': 'QuotaCounterValueContractProperties'}, + } + + def __init__(self, **kwargs): + super(QuotaCounterContract, self).__init__(**kwargs) + self.counter_key = kwargs.get('counter_key', None) + self.period_key = kwargs.get('period_key', None) + self.period_start_time = kwargs.get('period_start_time', None) + self.period_end_time = kwargs.get('period_end_time', None) + self.value = kwargs.get('value', None) + + +class QuotaCounterValueContract(Model): + """Quota counter value details. + + :param calls_count: Number of times Counter was called. + :type calls_count: int + :param kb_transferred: Data Transferred in KiloBytes. + :type kb_transferred: float + """ + + _attribute_map = { + 'calls_count': {'key': 'value.callsCount', 'type': 'int'}, + 'kb_transferred': {'key': 'value.kbTransferred', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(QuotaCounterValueContract, self).__init__(**kwargs) + self.calls_count = kwargs.get('calls_count', None) + self.kb_transferred = kwargs.get('kb_transferred', None) + + +class QuotaCounterValueContractProperties(Model): + """Quota counter value details. + + :param calls_count: Number of times Counter was called. + :type calls_count: int + :param kb_transferred: Data Transferred in KiloBytes. + :type kb_transferred: float + """ + + _attribute_map = { + 'calls_count': {'key': 'callsCount', 'type': 'int'}, + 'kb_transferred': {'key': 'kbTransferred', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(QuotaCounterValueContractProperties, self).__init__(**kwargs) + self.calls_count = kwargs.get('calls_count', None) + self.kb_transferred = kwargs.get('kb_transferred', None) + + +class RecipientEmailCollection(Model): + """Paged Recipient User list representation. + + :param value: Page values. + :type value: list[~azure.mgmt.apimanagement.models.RecipientEmailContract] + :param next_link: Next page link if any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RecipientEmailContract]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RecipientEmailCollection, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class RecipientEmailContract(Resource): + """Recipient Email details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param email: User Email subscribed to notification. + :type email: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'email': {'key': 'properties.email', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RecipientEmailContract, self).__init__(**kwargs) + self.email = kwargs.get('email', None) + + +class RecipientsContractProperties(Model): + """Notification Parameter contract. + + :param emails: List of Emails subscribed for the notification. + :type emails: list[str] + :param users: List of Users subscribed for the notification. + :type users: list[str] + """ + + _attribute_map = { + 'emails': {'key': 'emails', 'type': '[str]'}, + 'users': {'key': 'users', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(RecipientsContractProperties, self).__init__(**kwargs) + self.emails = kwargs.get('emails', None) + self.users = kwargs.get('users', None) + + +class RecipientUserCollection(Model): + """Paged Recipient User list representation. + + :param value: Page values. + :type value: list[~azure.mgmt.apimanagement.models.RecipientUserContract] + :param next_link: Next page link if any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RecipientUserContract]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RecipientUserCollection, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class RecipientUserContract(Resource): + """Recipient User details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param user_id: API Management UserId subscribed to notification. + :type user_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'user_id': {'key': 'properties.userId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RecipientUserContract, self).__init__(**kwargs) + self.user_id = kwargs.get('user_id', None) + + +class RegionContract(Model): + """Region profile. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Region name. + :vartype name: str + :param is_master_region: whether Region is the master region. + :type is_master_region: bool + :param is_deleted: whether Region is deleted. + :type is_deleted: bool + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'is_master_region': {'key': 'isMasterRegion', 'type': 'bool'}, + 'is_deleted': {'key': 'isDeleted', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(RegionContract, self).__init__(**kwargs) + self.name = None + self.is_master_region = kwargs.get('is_master_region', None) + self.is_deleted = kwargs.get('is_deleted', None) + + +class RegistrationDelegationSettingsProperties(Model): + """User registration delegation settings properties. + + :param enabled: Enable or disable delegation for user registration. + :type enabled: bool + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(RegistrationDelegationSettingsProperties, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + + +class ReportRecordContract(Model): + """Report data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param name: Name depending on report endpoint specifies product, API, + operation or developer name. + :type name: str + :param timestamp: Start of aggregation period. The date conforms to the + following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 + standard. + :type timestamp: datetime + :param interval: Length of aggregation period. Interval must be multiple + of 15 minutes and may not be zero. The value should be in ISO 8601 format + (http://en.wikipedia.org/wiki/ISO_8601#Durations). + :type interval: str + :param country: Country to which this record data is related. + :type country: str + :param region: Country region to which this record data is related. + :type region: str + :param zip: Zip code to which this record data is related. + :type zip: str + :ivar user_id: User identifier path. /users/{userId} + :vartype user_id: str + :ivar product_id: Product identifier path. /products/{productId} + :vartype product_id: str + :param api_id: API identifier path. /apis/{apiId} + :type api_id: str + :param operation_id: Operation identifier path. + /apis/{apiId}/operations/{operationId} + :type operation_id: str + :param api_region: API region identifier. + :type api_region: str + :param subscription_id: Subscription identifier path. + /subscriptions/{subscriptionId} + :type subscription_id: str + :param call_count_success: Number of successful calls. This includes calls + returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and + HttpStatusCode.TemporaryRedirect + :type call_count_success: int + :param call_count_blocked: Number of calls blocked due to invalid + credentials. This includes calls returning HttpStatusCode.Unauthorized and + HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests + :type call_count_blocked: int + :param call_count_failed: Number of calls failed due to proxy or backend + errors. This includes calls returning HttpStatusCode.BadRequest(400) and + any Code between HttpStatusCode.InternalServerError (500) and 600 + :type call_count_failed: int + :param call_count_other: Number of other calls. + :type call_count_other: int + :param call_count_total: Total number of calls. + :type call_count_total: int + :param bandwidth: Bandwidth consumed. + :type bandwidth: long + :param cache_hit_count: Number of times when content was served from cache + policy. + :type cache_hit_count: int + :param cache_miss_count: Number of times content was fetched from backend. + :type cache_miss_count: int + :param api_time_avg: Average time it took to process request. + :type api_time_avg: float + :param api_time_min: Minimum time it took to process request. + :type api_time_min: float + :param api_time_max: Maximum time it took to process request. + :type api_time_max: float + :param service_time_avg: Average time it took to process request on + backend. + :type service_time_avg: float + :param service_time_min: Minimum time it took to process request on + backend. + :type service_time_min: float + :param service_time_max: Maximum time it took to process request on + backend. + :type service_time_max: float + """ + + _validation = { + 'user_id': {'readonly': True}, + 'product_id': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'interval': {'key': 'interval', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'region': {'key': 'region', 'type': 'str'}, + 'zip': {'key': 'zip', 'type': 'str'}, + 'user_id': {'key': 'userId', 'type': 'str'}, + 'product_id': {'key': 'productId', 'type': 'str'}, + 'api_id': {'key': 'apiId', 'type': 'str'}, + 'operation_id': {'key': 'operationId', 'type': 'str'}, + 'api_region': {'key': 'apiRegion', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'call_count_success': {'key': 'callCountSuccess', 'type': 'int'}, + 'call_count_blocked': {'key': 'callCountBlocked', 'type': 'int'}, + 'call_count_failed': {'key': 'callCountFailed', 'type': 'int'}, + 'call_count_other': {'key': 'callCountOther', 'type': 'int'}, + 'call_count_total': {'key': 'callCountTotal', 'type': 'int'}, + 'bandwidth': {'key': 'bandwidth', 'type': 'long'}, + 'cache_hit_count': {'key': 'cacheHitCount', 'type': 'int'}, + 'cache_miss_count': {'key': 'cacheMissCount', 'type': 'int'}, + 'api_time_avg': {'key': 'apiTimeAvg', 'type': 'float'}, + 'api_time_min': {'key': 'apiTimeMin', 'type': 'float'}, + 'api_time_max': {'key': 'apiTimeMax', 'type': 'float'}, + 'service_time_avg': {'key': 'serviceTimeAvg', 'type': 'float'}, + 'service_time_min': {'key': 'serviceTimeMin', 'type': 'float'}, + 'service_time_max': {'key': 'serviceTimeMax', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(ReportRecordContract, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.timestamp = kwargs.get('timestamp', None) + self.interval = kwargs.get('interval', None) + self.country = kwargs.get('country', None) + self.region = kwargs.get('region', None) + self.zip = kwargs.get('zip', None) + self.user_id = None + self.product_id = None + self.api_id = kwargs.get('api_id', None) + self.operation_id = kwargs.get('operation_id', None) + self.api_region = kwargs.get('api_region', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.call_count_success = kwargs.get('call_count_success', None) + self.call_count_blocked = kwargs.get('call_count_blocked', None) + self.call_count_failed = kwargs.get('call_count_failed', None) + self.call_count_other = kwargs.get('call_count_other', None) + self.call_count_total = kwargs.get('call_count_total', None) + self.bandwidth = kwargs.get('bandwidth', None) + self.cache_hit_count = kwargs.get('cache_hit_count', None) + self.cache_miss_count = kwargs.get('cache_miss_count', None) + self.api_time_avg = kwargs.get('api_time_avg', None) + self.api_time_min = kwargs.get('api_time_min', None) + self.api_time_max = kwargs.get('api_time_max', None) + self.service_time_avg = kwargs.get('service_time_avg', None) + self.service_time_min = kwargs.get('service_time_min', None) + self.service_time_max = kwargs.get('service_time_max', None) + + +class RepresentationContract(Model): + """Operation request/response representation details. + + All required parameters must be populated in order to send to Azure. + + :param content_type: Required. Specifies a registered or custom content + type for this representation, e.g. application/xml. + :type content_type: str + :param sample: An example of the representation. + :type sample: str + :param schema_id: Schema identifier. Applicable only if 'contentType' + value is neither 'application/x-www-form-urlencoded' nor + 'multipart/form-data'. + :type schema_id: str + :param type_name: Type name defined by the schema. Applicable only if + 'contentType' value is neither 'application/x-www-form-urlencoded' nor + 'multipart/form-data'. + :type type_name: str + :param form_parameters: Collection of form parameters. Required if + 'contentType' value is either 'application/x-www-form-urlencoded' or + 'multipart/form-data'.. + :type form_parameters: + list[~azure.mgmt.apimanagement.models.ParameterContract] + """ + + _validation = { + 'content_type': {'required': True}, + } + + _attribute_map = { + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'sample': {'key': 'sample', 'type': 'str'}, + 'schema_id': {'key': 'schemaId', 'type': 'str'}, + 'type_name': {'key': 'typeName', 'type': 'str'}, + 'form_parameters': {'key': 'formParameters', 'type': '[ParameterContract]'}, + } + + def __init__(self, **kwargs): + super(RepresentationContract, self).__init__(**kwargs) + self.content_type = kwargs.get('content_type', None) + self.sample = kwargs.get('sample', None) + self.schema_id = kwargs.get('schema_id', None) + self.type_name = kwargs.get('type_name', None) + self.form_parameters = kwargs.get('form_parameters', None) + + +class RequestContract(Model): + """Operation request details. + + :param description: Operation request description. + :type description: str + :param query_parameters: Collection of operation request query parameters. + :type query_parameters: + list[~azure.mgmt.apimanagement.models.ParameterContract] + :param headers: Collection of operation request headers. + :type headers: list[~azure.mgmt.apimanagement.models.ParameterContract] + :param representations: Collection of operation request representations. + :type representations: + list[~azure.mgmt.apimanagement.models.RepresentationContract] + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'query_parameters': {'key': 'queryParameters', 'type': '[ParameterContract]'}, + 'headers': {'key': 'headers', 'type': '[ParameterContract]'}, + 'representations': {'key': 'representations', 'type': '[RepresentationContract]'}, + } + + def __init__(self, **kwargs): + super(RequestContract, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.query_parameters = kwargs.get('query_parameters', None) + self.headers = kwargs.get('headers', None) + self.representations = kwargs.get('representations', None) + + +class RequestReportRecordContract(Model): + """Request Report data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param api_id: API identifier path. /apis/{apiId} + :type api_id: str + :param operation_id: Operation identifier path. + /apis/{apiId}/operations/{operationId} + :type operation_id: str + :ivar product_id: Product identifier path. /products/{productId} + :vartype product_id: str + :ivar user_id: User identifier path. /users/{userId} + :vartype user_id: str + :param method: The HTTP method associated with this request.. + :type method: str + :param url: The full URL associated with this request. + :type url: str + :param ip_address: The client IP address associated with this request. + :type ip_address: str + :param backend_response_code: The HTTP status code received by the gateway + as a result of forwarding this request to the backend. + :type backend_response_code: str + :param response_code: The HTTP status code returned by the gateway. + :type response_code: int + :param response_size: The size of the response returned by the gateway. + :type response_size: int + :param timestamp: The date and time when this request was received by the + gateway in ISO 8601 format. + :type timestamp: datetime + :param cache: Specifies if response cache was involved in generating the + response. If the value is none, the cache was not used. If the value is + hit, cached response was returned. If the value is miss, the cache was + used but lookup resulted in a miss and request was fulfilled by the + backend. + :type cache: str + :param api_time: The total time it took to process this request. + :type api_time: float + :param service_time: he time it took to forward this request to the + backend and get the response back. + :type service_time: float + :param api_region: Azure region where the gateway that processed this + request is located. + :type api_region: str + :param subscription_id: Subscription identifier path. + /subscriptions/{subscriptionId} + :type subscription_id: str + :param request_id: Request Identifier. + :type request_id: str + :param request_size: The size of this request.. + :type request_size: int + """ + + _validation = { + 'product_id': {'readonly': True}, + 'user_id': {'readonly': True}, + } + + _attribute_map = { + 'api_id': {'key': 'apiId', 'type': 'str'}, + 'operation_id': {'key': 'operationId', 'type': 'str'}, + 'product_id': {'key': 'productId', 'type': 'str'}, + 'user_id': {'key': 'userId', 'type': 'str'}, + 'method': {'key': 'method', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'backend_response_code': {'key': 'backendResponseCode', 'type': 'str'}, + 'response_code': {'key': 'responseCode', 'type': 'int'}, + 'response_size': {'key': 'responseSize', 'type': 'int'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'cache': {'key': 'cache', 'type': 'str'}, + 'api_time': {'key': 'apiTime', 'type': 'float'}, + 'service_time': {'key': 'serviceTime', 'type': 'float'}, + 'api_region': {'key': 'apiRegion', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'request_size': {'key': 'requestSize', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RequestReportRecordContract, self).__init__(**kwargs) + self.api_id = kwargs.get('api_id', None) + self.operation_id = kwargs.get('operation_id', None) + self.product_id = None + self.user_id = None + self.method = kwargs.get('method', None) + self.url = kwargs.get('url', None) + self.ip_address = kwargs.get('ip_address', None) + self.backend_response_code = kwargs.get('backend_response_code', None) + self.response_code = kwargs.get('response_code', None) + self.response_size = kwargs.get('response_size', None) + self.timestamp = kwargs.get('timestamp', None) + self.cache = kwargs.get('cache', None) + self.api_time = kwargs.get('api_time', None) + self.service_time = kwargs.get('service_time', None) + self.api_region = kwargs.get('api_region', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.request_id = kwargs.get('request_id', None) + self.request_size = kwargs.get('request_size', None) + + +class ResourceSku(Model): + """Describes an available API Management SKU. + + :param name: Name of the Sku. Possible values include: 'Developer', + 'Standard', 'Premium', 'Basic', 'Consumption' + :type name: str or ~azure.mgmt.apimanagement.models.SkuType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceSku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class ResourceSkuCapacity(Model): + """Describes scaling information of a SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar minimum: The minimum capacity. + :vartype minimum: int + :ivar maximum: The maximum capacity that can be set. + :vartype maximum: int + :ivar default: The default capacity. + :vartype default: int + :ivar scale_type: The scale type applicable to the sku. Possible values + include: 'automatic', 'manual', 'none' + :vartype scale_type: str or + ~azure.mgmt.apimanagement.models.ResourceSkuCapacityScaleType + """ + + _validation = { + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'default': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'int'}, + 'maximum': {'key': 'maximum', 'type': 'int'}, + 'default': {'key': 'default', 'type': 'int'}, + 'scale_type': {'key': 'scaleType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceSkuCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default = None + self.scale_type = None + + +class ResourceSkuResult(Model): + """Describes an available API Management service SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of resource the SKU applies to. + :vartype resource_type: str + :ivar sku: Specifies API Management SKU. + :vartype sku: ~azure.mgmt.apimanagement.models.ResourceSku + :ivar capacity: Specifies the number of API Management units. + :vartype capacity: ~azure.mgmt.apimanagement.models.ResourceSkuCapacity + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'sku': {'readonly': True}, + 'capacity': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'ResourceSku'}, + 'capacity': {'key': 'capacity', 'type': 'ResourceSkuCapacity'}, + } + + def __init__(self, **kwargs): + super(ResourceSkuResult, self).__init__(**kwargs) + self.resource_type = None + self.sku = None + self.capacity = None + + +class ResponseContract(Model): + """Operation response details. + + All required parameters must be populated in order to send to Azure. + + :param status_code: Required. Operation response HTTP status code. + :type status_code: int + :param description: Operation response description. + :type description: str + :param representations: Collection of operation response representations. + :type representations: + list[~azure.mgmt.apimanagement.models.RepresentationContract] + :param headers: Collection of operation response headers. + :type headers: list[~azure.mgmt.apimanagement.models.ParameterContract] + """ + + _validation = { + 'status_code': {'required': True}, + } + + _attribute_map = { + 'status_code': {'key': 'statusCode', 'type': 'int'}, + 'description': {'key': 'description', 'type': 'str'}, + 'representations': {'key': 'representations', 'type': '[RepresentationContract]'}, + 'headers': {'key': 'headers', 'type': '[ParameterContract]'}, + } + + def __init__(self, **kwargs): + super(ResponseContract, self).__init__(**kwargs) + self.status_code = kwargs.get('status_code', None) + self.description = kwargs.get('description', None) + self.representations = kwargs.get('representations', None) + self.headers = kwargs.get('headers', None) + + +class SamplingSettings(Model): + """Sampling settings for Diagnostic. + + :param sampling_type: Sampling type. Possible values include: 'fixed' + :type sampling_type: str or ~azure.mgmt.apimanagement.models.SamplingType + :param percentage: Rate of sampling for fixed-rate sampling. + :type percentage: float + """ + + _validation = { + 'percentage': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'sampling_type': {'key': 'samplingType', 'type': 'str'}, + 'percentage': {'key': 'percentage', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(SamplingSettings, self).__init__(**kwargs) + self.sampling_type = kwargs.get('sampling_type', None) + self.percentage = kwargs.get('percentage', None) + + +class SaveConfigurationParameter(Model): + """Save Tenant Configuration Contract details. + + All required parameters must be populated in order to send to Azure. + + :param branch: Required. The name of the Git branch in which to commit the + current configuration snapshot. + :type branch: str + :param force: The value if true, the current configuration database is + committed to the Git repository, even if the Git repository has newer + changes that would be overwritten. + :type force: bool + """ + + _validation = { + 'branch': {'required': True}, + } + + _attribute_map = { + 'branch': {'key': 'properties.branch', 'type': 'str'}, + 'force': {'key': 'properties.force', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(SaveConfigurationParameter, self).__init__(**kwargs) + self.branch = kwargs.get('branch', None) + self.force = kwargs.get('force', None) + + +class SchemaContract(Resource): + """Schema Contract details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param content_type: Required. Must be a valid a media type used in a + Content-Type header as defined in the RFC 2616. Media type of the schema + document (e.g. application/json, application/xml).
- `Swagger` + Schema use `application/vnd.ms-azure-apim.swagger.definitions+json`
+ - `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml`
- + `OpenApi` Schema use `application/vnd.oai.openapi.components+json`
- + `WADL Schema` use `application/vnd.ms-azure-apim.wadl.grammars+xml`. + :type content_type: str + :param document: Properties of the Schema Document. + :type document: object + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'content_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'content_type': {'key': 'properties.contentType', 'type': 'str'}, + 'document': {'key': 'properties.document', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SchemaContract, self).__init__(**kwargs) + self.content_type = kwargs.get('content_type', None) + self.document = kwargs.get('document', None) + + +class SchemaCreateOrUpdateContract(Resource): + """Schema Contract details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param content_type: Required. Must be a valid a media type used in a + Content-Type header as defined in the RFC 2616. Media type of the schema + document (e.g. application/json, application/xml).
- `Swagger` + Schema use `application/vnd.ms-azure-apim.swagger.definitions+json`
+ - `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml`
- + `OpenApi` Schema use `application/vnd.oai.openapi.components+json`
- + `WADL Schema` use `application/vnd.ms-azure-apim.wadl.grammars+xml`. + :type content_type: str + :param value: Json escaped string defining the document representing the + Schema. + :type value: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'content_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'content_type': {'key': 'properties.contentType', 'type': 'str'}, + 'value': {'key': 'properties.document.value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SchemaCreateOrUpdateContract, self).__init__(**kwargs) + self.content_type = kwargs.get('content_type', None) + self.value = kwargs.get('value', None) + + +class SubscriptionContract(Resource): + """Subscription details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param owner_id: The user resource identifier of the subscription owner. + The value is a valid relative URL in the format of /users/{userId} where + {userId} is a user identifier. + :type owner_id: str + :param scope: Required. Scope like /products/{productId} or /apis or + /apis/{apiId}. + :type scope: str + :param display_name: The name of the subscription, or null if the + subscription has no name. + :type display_name: str + :param state: Required. Subscription state. Possible states are * active – + the subscription is active, * suspended – the subscription is blocked, and + the subscriber cannot call any APIs of the product, * submitted – the + subscription request has been made by the developer, but has not yet been + approved or rejected, * rejected – the subscription request has been + denied by an administrator, * cancelled – the subscription has been + cancelled by the developer or administrator, * expired – the subscription + reached its expiration date and was deactivated. Possible values include: + 'suspended', 'active', 'expired', 'submitted', 'rejected', 'cancelled' + :type state: str or ~azure.mgmt.apimanagement.models.SubscriptionState + :ivar created_date: Subscription creation date. The date conforms to the + following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 + standard. + :vartype created_date: datetime + :param start_date: Subscription activation date. The setting is for audit + purposes only and the subscription is not automatically activated. The + subscription lifecycle can be managed by using the `state` property. The + date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified + by the ISO 8601 standard. + :type start_date: datetime + :param expiration_date: Subscription expiration date. The setting is for + audit purposes only and the subscription is not automatically expired. The + subscription lifecycle can be managed by using the `state` property. The + date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified + by the ISO 8601 standard. + :type expiration_date: datetime + :param end_date: Date when subscription was cancelled or expired. The + setting is for audit purposes only and the subscription is not + automatically cancelled. The subscription lifecycle can be managed by + using the `state` property. The date conforms to the following format: + `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + :type end_date: datetime + :param notification_date: Upcoming subscription expiration notification + date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as + specified by the ISO 8601 standard. + :type notification_date: datetime + :param primary_key: Required. Subscription primary key. + :type primary_key: str + :param secondary_key: Required. Subscription secondary key. + :type secondary_key: str + :param state_comment: Optional subscription comment added by an + administrator. + :type state_comment: str + :param allow_tracing: Determines whether tracing is enabled + :type allow_tracing: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'scope': {'required': True}, + 'display_name': {'max_length': 100, 'min_length': 0}, + 'state': {'required': True}, + 'created_date': {'readonly': True}, + 'primary_key': {'required': True, 'max_length': 256, 'min_length': 1}, + 'secondary_key': {'required': True, 'max_length': 256, 'min_length': 1}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'owner_id': {'key': 'properties.ownerId', 'type': 'str'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SubscriptionState'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'start_date': {'key': 'properties.startDate', 'type': 'iso-8601'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'end_date': {'key': 'properties.endDate', 'type': 'iso-8601'}, + 'notification_date': {'key': 'properties.notificationDate', 'type': 'iso-8601'}, + 'primary_key': {'key': 'properties.primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'properties.secondaryKey', 'type': 'str'}, + 'state_comment': {'key': 'properties.stateComment', 'type': 'str'}, + 'allow_tracing': {'key': 'properties.allowTracing', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(SubscriptionContract, self).__init__(**kwargs) + self.owner_id = kwargs.get('owner_id', None) + self.scope = kwargs.get('scope', None) + self.display_name = kwargs.get('display_name', None) + self.state = kwargs.get('state', None) + self.created_date = None + self.start_date = kwargs.get('start_date', None) + self.expiration_date = kwargs.get('expiration_date', None) + self.end_date = kwargs.get('end_date', None) + self.notification_date = kwargs.get('notification_date', None) + self.primary_key = kwargs.get('primary_key', None) + self.secondary_key = kwargs.get('secondary_key', None) + self.state_comment = kwargs.get('state_comment', None) + self.allow_tracing = kwargs.get('allow_tracing', None) + + +class SubscriptionCreateParameters(Model): + """Subscription create details. + + All required parameters must be populated in order to send to Azure. + + :param owner_id: User (user id path) for whom subscription is being + created in form /users/{userId} + :type owner_id: str + :param scope: Required. Scope like /products/{productId} or /apis or + /apis/{apiId}. + :type scope: str + :param display_name: Required. Subscription name. + :type display_name: str + :param primary_key: Primary subscription key. If not specified during + request key will be generated automatically. + :type primary_key: str + :param secondary_key: Secondary subscription key. If not specified during + request key will be generated automatically. + :type secondary_key: str + :param state: Initial subscription state. If no value is specified, + subscription is created with Submitted state. Possible states are * active + – the subscription is active, * suspended – the subscription is blocked, + and the subscriber cannot call any APIs of the product, * submitted – the + subscription request has been made by the developer, but has not yet been + approved or rejected, * rejected – the subscription request has been + denied by an administrator, * cancelled – the subscription has been + cancelled by the developer or administrator, * expired – the subscription + reached its expiration date and was deactivated. Possible values include: + 'suspended', 'active', 'expired', 'submitted', 'rejected', 'cancelled' + :type state: str or ~azure.mgmt.apimanagement.models.SubscriptionState + :param allow_tracing: Determines whether tracing can be enabled + :type allow_tracing: bool + """ + + _validation = { + 'scope': {'required': True}, + 'display_name': {'required': True, 'max_length': 100, 'min_length': 1}, + 'primary_key': {'max_length': 256, 'min_length': 1}, + 'secondary_key': {'max_length': 256, 'min_length': 1}, + } + + _attribute_map = { + 'owner_id': {'key': 'properties.ownerId', 'type': 'str'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'primary_key': {'key': 'properties.primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'properties.secondaryKey', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SubscriptionState'}, + 'allow_tracing': {'key': 'properties.allowTracing', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(SubscriptionCreateParameters, self).__init__(**kwargs) + self.owner_id = kwargs.get('owner_id', None) + self.scope = kwargs.get('scope', None) + self.display_name = kwargs.get('display_name', None) + self.primary_key = kwargs.get('primary_key', None) + self.secondary_key = kwargs.get('secondary_key', None) + self.state = kwargs.get('state', None) + self.allow_tracing = kwargs.get('allow_tracing', None) + + +class SubscriptionKeyParameterNamesContract(Model): + """Subscription key parameter names details. + + :param header: Subscription key header name. + :type header: str + :param query: Subscription key query string parameter name. + :type query: str + """ + + _attribute_map = { + 'header': {'key': 'header', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubscriptionKeyParameterNamesContract, self).__init__(**kwargs) + self.header = kwargs.get('header', None) + self.query = kwargs.get('query', None) + + +class SubscriptionsDelegationSettingsProperties(Model): + """Subscriptions delegation settings properties. + + :param enabled: Enable or disable delegation for subscriptions. + :type enabled: bool + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(SubscriptionsDelegationSettingsProperties, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + + +class SubscriptionUpdateParameters(Model): + """Subscription update details. + + :param owner_id: User identifier path: /users/{userId} + :type owner_id: str + :param scope: Scope like /products/{productId} or /apis or /apis/{apiId} + :type scope: str + :param expiration_date: Subscription expiration date. The setting is for + audit purposes only and the subscription is not automatically expired. The + subscription lifecycle can be managed by using the `state` property. The + date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified + by the ISO 8601 standard. + :type expiration_date: datetime + :param display_name: Subscription name. + :type display_name: str + :param primary_key: Primary subscription key. + :type primary_key: str + :param secondary_key: Secondary subscription key. + :type secondary_key: str + :param state: Subscription state. Possible states are * active – the + subscription is active, * suspended – the subscription is blocked, and the + subscriber cannot call any APIs of the product, * submitted – the + subscription request has been made by the developer, but has not yet been + approved or rejected, * rejected – the subscription request has been + denied by an administrator, * cancelled – the subscription has been + cancelled by the developer or administrator, * expired – the subscription + reached its expiration date and was deactivated. Possible values include: + 'suspended', 'active', 'expired', 'submitted', 'rejected', 'cancelled' + :type state: str or ~azure.mgmt.apimanagement.models.SubscriptionState + :param state_comment: Comments describing subscription state change by the + administrator. + :type state_comment: str + :param allow_tracing: Determines whether tracing can be enabled + :type allow_tracing: bool + """ + + _validation = { + 'primary_key': {'max_length': 256, 'min_length': 1}, + 'secondary_key': {'max_length': 256, 'min_length': 1}, + } + + _attribute_map = { + 'owner_id': {'key': 'properties.ownerId', 'type': 'str'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'primary_key': {'key': 'properties.primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'properties.secondaryKey', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SubscriptionState'}, + 'state_comment': {'key': 'properties.stateComment', 'type': 'str'}, + 'allow_tracing': {'key': 'properties.allowTracing', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(SubscriptionUpdateParameters, self).__init__(**kwargs) + self.owner_id = kwargs.get('owner_id', None) + self.scope = kwargs.get('scope', None) + self.expiration_date = kwargs.get('expiration_date', None) + self.display_name = kwargs.get('display_name', None) + self.primary_key = kwargs.get('primary_key', None) + self.secondary_key = kwargs.get('secondary_key', None) + self.state = kwargs.get('state', None) + self.state_comment = kwargs.get('state_comment', None) + self.allow_tracing = kwargs.get('allow_tracing', None) + + +class TagContract(Resource): + """Tag Contract details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param display_name: Required. Tag name. + :type display_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'required': True, 'max_length': 160, 'min_length': 1}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TagContract, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + + +class TagCreateUpdateParameters(Model): + """Parameters supplied to Create/Update Tag operations. + + All required parameters must be populated in order to send to Azure. + + :param display_name: Required. Tag name. + :type display_name: str + """ + + _validation = { + 'display_name': {'required': True, 'max_length': 160, 'min_length': 1}, + } + + _attribute_map = { + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TagCreateUpdateParameters, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + + +class TagDescriptionContract(Resource): + """Contract details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param description: Description of the Tag. + :type description: str + :param external_docs_url: Absolute URL of external resources describing + the tag. + :type external_docs_url: str + :param external_docs_description: Description of the external resources + describing the tag. + :type external_docs_description: str + :param display_name: Tag name. + :type display_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'external_docs_url': {'max_length': 2000}, + 'display_name': {'max_length': 160, 'min_length': 1}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'external_docs_url': {'key': 'properties.externalDocsUrl', 'type': 'str'}, + 'external_docs_description': {'key': 'properties.externalDocsDescription', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TagDescriptionContract, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.external_docs_url = kwargs.get('external_docs_url', None) + self.external_docs_description = kwargs.get('external_docs_description', None) + self.display_name = kwargs.get('display_name', None) + + +class TagDescriptionCreateParameters(Model): + """Parameters supplied to the Create TagDescription operation. + + :param description: Description of the Tag. + :type description: str + :param external_docs_url: Absolute URL of external resources describing + the tag. + :type external_docs_url: str + :param external_docs_description: Description of the external resources + describing the tag. + :type external_docs_description: str + """ + + _validation = { + 'external_docs_url': {'max_length': 2000}, + } + + _attribute_map = { + 'description': {'key': 'properties.description', 'type': 'str'}, + 'external_docs_url': {'key': 'properties.externalDocsUrl', 'type': 'str'}, + 'external_docs_description': {'key': 'properties.externalDocsDescription', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TagDescriptionCreateParameters, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.external_docs_url = kwargs.get('external_docs_url', None) + self.external_docs_description = kwargs.get('external_docs_description', None) + + +class TagResourceContract(Model): + """TagResource contract properties. + + All required parameters must be populated in order to send to Azure. + + :param tag: Required. Tag associated with the resource. + :type tag: + ~azure.mgmt.apimanagement.models.TagTagResourceContractProperties + :param api: Api associated with the tag. + :type api: + ~azure.mgmt.apimanagement.models.ApiTagResourceContractProperties + :param operation: Operation associated with the tag. + :type operation: + ~azure.mgmt.apimanagement.models.OperationTagResourceContractProperties + :param product: Product associated with the tag. + :type product: + ~azure.mgmt.apimanagement.models.ProductTagResourceContractProperties + """ + + _validation = { + 'tag': {'required': True}, + } + + _attribute_map = { + 'tag': {'key': 'tag', 'type': 'TagTagResourceContractProperties'}, + 'api': {'key': 'api', 'type': 'ApiTagResourceContractProperties'}, + 'operation': {'key': 'operation', 'type': 'OperationTagResourceContractProperties'}, + 'product': {'key': 'product', 'type': 'ProductTagResourceContractProperties'}, + } + + def __init__(self, **kwargs): + super(TagResourceContract, self).__init__(**kwargs) + self.tag = kwargs.get('tag', None) + self.api = kwargs.get('api', None) + self.operation = kwargs.get('operation', None) + self.product = kwargs.get('product', None) + + +class TagTagResourceContractProperties(Model): + """Contract defining the Tag property in the Tag Resource Contract. + + :param id: Tag identifier + :type id: str + :param name: Tag Name + :type name: str + """ + + _validation = { + 'name': {'max_length': 160, 'min_length': 1}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TagTagResourceContractProperties, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + + +class TenantConfigurationSyncStateContract(Model): + """Tenant Configuration Synchronization State. + + :param branch: The name of Git branch. + :type branch: str + :param commit_id: The latest commit Id. + :type commit_id: str + :param is_export: value indicating if last sync was save (true) or deploy + (false) operation. + :type is_export: bool + :param is_synced: value indicating if last synchronization was later than + the configuration change. + :type is_synced: bool + :param is_git_enabled: value indicating whether Git configuration access + is enabled. + :type is_git_enabled: bool + :param sync_date: The date of the latest synchronization. The date + conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by + the ISO 8601 standard. + :type sync_date: datetime + :param configuration_change_date: The date of the latest configuration + change. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` + as specified by the ISO 8601 standard. + :type configuration_change_date: datetime + """ + + _attribute_map = { + 'branch': {'key': 'branch', 'type': 'str'}, + 'commit_id': {'key': 'commitId', 'type': 'str'}, + 'is_export': {'key': 'isExport', 'type': 'bool'}, + 'is_synced': {'key': 'isSynced', 'type': 'bool'}, + 'is_git_enabled': {'key': 'isGitEnabled', 'type': 'bool'}, + 'sync_date': {'key': 'syncDate', 'type': 'iso-8601'}, + 'configuration_change_date': {'key': 'configurationChangeDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(TenantConfigurationSyncStateContract, self).__init__(**kwargs) + self.branch = kwargs.get('branch', None) + self.commit_id = kwargs.get('commit_id', None) + self.is_export = kwargs.get('is_export', None) + self.is_synced = kwargs.get('is_synced', None) + self.is_git_enabled = kwargs.get('is_git_enabled', None) + self.sync_date = kwargs.get('sync_date', None) + self.configuration_change_date = kwargs.get('configuration_change_date', None) + + +class TermsOfServiceProperties(Model): + """Terms of service contract properties. + + :param text: A terms of service text. + :type text: str + :param enabled: Display terms of service during a sign-up process. + :type enabled: bool + :param consent_required: Ask user for consent to the terms of service. + :type consent_required: bool + """ + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'consent_required': {'key': 'consentRequired', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(TermsOfServiceProperties, self).__init__(**kwargs) + self.text = kwargs.get('text', None) + self.enabled = kwargs.get('enabled', None) + self.consent_required = kwargs.get('consent_required', None) + + +class TokenBodyParameterContract(Model): + """OAuth acquire token request body parameter (www-url-form-encoded). + + All required parameters must be populated in order to send to Azure. + + :param name: Required. body parameter name. + :type name: str + :param value: Required. body parameter value. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TokenBodyParameterContract, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class UserContract(Resource): + """User details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param state: Account state. Specifies whether the user is active or not. + Blocked users are unable to sign into the developer portal or call any + APIs of subscribed products. Default state is Active. Possible values + include: 'active', 'blocked', 'pending', 'deleted'. Default value: + "active" . + :type state: str or ~azure.mgmt.apimanagement.models.UserState + :param note: Optional note about a user set by the administrator. + :type note: str + :param identities: Collection of user identities. + :type identities: + list[~azure.mgmt.apimanagement.models.UserIdentityContract] + :param first_name: First name. + :type first_name: str + :param last_name: Last name. + :type last_name: str + :param email: Email address. + :type email: str + :param registration_date: Date of user registration. The date conforms to + the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 + standard. + :type registration_date: datetime + :ivar groups: Collection of groups user is part of. + :vartype groups: + list[~azure.mgmt.apimanagement.models.GroupContractProperties] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'groups': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'note': {'key': 'properties.note', 'type': 'str'}, + 'identities': {'key': 'properties.identities', 'type': '[UserIdentityContract]'}, + 'first_name': {'key': 'properties.firstName', 'type': 'str'}, + 'last_name': {'key': 'properties.lastName', 'type': 'str'}, + 'email': {'key': 'properties.email', 'type': 'str'}, + 'registration_date': {'key': 'properties.registrationDate', 'type': 'iso-8601'}, + 'groups': {'key': 'properties.groups', 'type': '[GroupContractProperties]'}, + } + + def __init__(self, **kwargs): + super(UserContract, self).__init__(**kwargs) + self.state = kwargs.get('state', "active") + self.note = kwargs.get('note', None) + self.identities = kwargs.get('identities', None) + self.first_name = kwargs.get('first_name', None) + self.last_name = kwargs.get('last_name', None) + self.email = kwargs.get('email', None) + self.registration_date = kwargs.get('registration_date', None) + self.groups = None + + +class UserCreateParameters(Model): + """User create details. + + All required parameters must be populated in order to send to Azure. + + :param state: Account state. Specifies whether the user is active or not. + Blocked users are unable to sign into the developer portal or call any + APIs of subscribed products. Default state is Active. Possible values + include: 'active', 'blocked', 'pending', 'deleted'. Default value: + "active" . + :type state: str or ~azure.mgmt.apimanagement.models.UserState + :param note: Optional note about a user set by the administrator. + :type note: str + :param identities: Collection of user identities. + :type identities: + list[~azure.mgmt.apimanagement.models.UserIdentityContract] + :param email: Required. Email address. Must not be empty and must be + unique within the service instance. + :type email: str + :param first_name: Required. First name. + :type first_name: str + :param last_name: Required. Last name. + :type last_name: str + :param password: User Password. If no value is provided, a default + password is generated. + :type password: str + :param confirmation: Determines the type of confirmation e-mail that will + be sent to the newly created user. Possible values include: 'signup', + 'invite' + :type confirmation: str or ~azure.mgmt.apimanagement.models.Confirmation + """ + + _validation = { + 'email': {'required': True, 'max_length': 254, 'min_length': 1}, + 'first_name': {'required': True, 'max_length': 100, 'min_length': 1}, + 'last_name': {'required': True, 'max_length': 100, 'min_length': 1}, + } + + _attribute_map = { + 'state': {'key': 'properties.state', 'type': 'str'}, + 'note': {'key': 'properties.note', 'type': 'str'}, + 'identities': {'key': 'properties.identities', 'type': '[UserIdentityContract]'}, + 'email': {'key': 'properties.email', 'type': 'str'}, + 'first_name': {'key': 'properties.firstName', 'type': 'str'}, + 'last_name': {'key': 'properties.lastName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'confirmation': {'key': 'properties.confirmation', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserCreateParameters, self).__init__(**kwargs) + self.state = kwargs.get('state', "active") + self.note = kwargs.get('note', None) + self.identities = kwargs.get('identities', None) + self.email = kwargs.get('email', None) + self.first_name = kwargs.get('first_name', None) + self.last_name = kwargs.get('last_name', None) + self.password = kwargs.get('password', None) + self.confirmation = kwargs.get('confirmation', None) + + +class UserEntityBaseParameters(Model): + """User Entity Base Parameters set. + + :param state: Account state. Specifies whether the user is active or not. + Blocked users are unable to sign into the developer portal or call any + APIs of subscribed products. Default state is Active. Possible values + include: 'active', 'blocked', 'pending', 'deleted'. Default value: + "active" . + :type state: str or ~azure.mgmt.apimanagement.models.UserState + :param note: Optional note about a user set by the administrator. + :type note: str + :param identities: Collection of user identities. + :type identities: + list[~azure.mgmt.apimanagement.models.UserIdentityContract] + """ + + _attribute_map = { + 'state': {'key': 'state', 'type': 'str'}, + 'note': {'key': 'note', 'type': 'str'}, + 'identities': {'key': 'identities', 'type': '[UserIdentityContract]'}, + } + + def __init__(self, **kwargs): + super(UserEntityBaseParameters, self).__init__(**kwargs) + self.state = kwargs.get('state', "active") + self.note = kwargs.get('note', None) + self.identities = kwargs.get('identities', None) + + +class UserIdentityContract(Model): + """User identity details. + + :param provider: Identity provider name. + :type provider: str + :param id: Identifier value within provider. + :type id: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserIdentityContract, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.id = kwargs.get('id', None) + + +class UserTokenParameters(Model): + """Get User Token parameters. + + All required parameters must be populated in order to send to Azure. + + :param key_type: Required. The Key to be used to generate token for user. + Possible values include: 'primary', 'secondary'. Default value: "primary" + . + :type key_type: str or ~azure.mgmt.apimanagement.models.KeyType + :param expiry: Required. The Expiry time of the Token. Maximum token + expiry time is set to 30 days. The date conforms to the following format: + `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + :type expiry: datetime + """ + + _validation = { + 'key_type': {'required': True}, + 'expiry': {'required': True}, + } + + _attribute_map = { + 'key_type': {'key': 'properties.keyType', 'type': 'KeyType'}, + 'expiry': {'key': 'properties.expiry', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(UserTokenParameters, self).__init__(**kwargs) + self.key_type = kwargs.get('key_type', "primary") + self.expiry = kwargs.get('expiry', None) + + +class UserTokenResult(Model): + """Get User Token response details. + + :param value: Shared Access Authorization token for the User. + :type value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserTokenResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class UserUpdateParameters(Model): + """User update parameters. + + :param state: Account state. Specifies whether the user is active or not. + Blocked users are unable to sign into the developer portal or call any + APIs of subscribed products. Default state is Active. Possible values + include: 'active', 'blocked', 'pending', 'deleted'. Default value: + "active" . + :type state: str or ~azure.mgmt.apimanagement.models.UserState + :param note: Optional note about a user set by the administrator. + :type note: str + :param identities: Collection of user identities. + :type identities: + list[~azure.mgmt.apimanagement.models.UserIdentityContract] + :param email: Email address. Must not be empty and must be unique within + the service instance. + :type email: str + :param password: User Password. + :type password: str + :param first_name: First name. + :type first_name: str + :param last_name: Last name. + :type last_name: str + """ + + _validation = { + 'email': {'max_length': 254, 'min_length': 1}, + 'first_name': {'max_length': 100, 'min_length': 1}, + 'last_name': {'max_length': 100, 'min_length': 1}, + } + + _attribute_map = { + 'state': {'key': 'properties.state', 'type': 'str'}, + 'note': {'key': 'properties.note', 'type': 'str'}, + 'identities': {'key': 'properties.identities', 'type': '[UserIdentityContract]'}, + 'email': {'key': 'properties.email', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'first_name': {'key': 'properties.firstName', 'type': 'str'}, + 'last_name': {'key': 'properties.lastName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserUpdateParameters, self).__init__(**kwargs) + self.state = kwargs.get('state', "active") + self.note = kwargs.get('note', None) + self.identities = kwargs.get('identities', None) + self.email = kwargs.get('email', None) + self.password = kwargs.get('password', None) + self.first_name = kwargs.get('first_name', None) + self.last_name = kwargs.get('last_name', None) + + +class VirtualNetworkConfiguration(Model): + """Configuration of a virtual network to which API Management service is + deployed. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar vnetid: The virtual network ID. This is typically a GUID. Expect a + null GUID by default. + :vartype vnetid: str + :ivar subnetname: The name of the subnet. + :vartype subnetname: str + :param subnet_resource_id: The full resource ID of a subnet in a virtual + network to deploy the API Management service in. + :type subnet_resource_id: str + """ + + _validation = { + 'vnetid': {'readonly': True}, + 'subnetname': {'readonly': True}, + 'subnet_resource_id': {'pattern': r'^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.(ClassicNetwork|Network)/virtualNetworks/[^/]*/subnets/[^/]*$'}, + } + + _attribute_map = { + 'vnetid': {'key': 'vnetid', 'type': 'str'}, + 'subnetname': {'key': 'subnetname', 'type': 'str'}, + 'subnet_resource_id': {'key': 'subnetResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualNetworkConfiguration, self).__init__(**kwargs) + self.vnetid = None + self.subnetname = None + self.subnet_resource_id = kwargs.get('subnet_resource_id', None) + + +class X509CertificateName(Model): + """Properties of server X509Names. + + :param name: Common Name of the Certificate. + :type name: str + :param issuer_certificate_thumbprint: Thumbprint for the Issuer of the + Certificate. + :type issuer_certificate_thumbprint: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'issuer_certificate_thumbprint': {'key': 'issuerCertificateThumbprint', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(X509CertificateName, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.issuer_certificate_thumbprint = kwargs.get('issuer_certificate_thumbprint', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models_py3.py new file mode 100644 index 000000000000..360c09c36903 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models_py3.py @@ -0,0 +1,7289 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AccessInformationContract(Model): + """Tenant access information contract of the API Management service. + + :param id: Identifier. + :type id: str + :param primary_key: Primary access key. + :type primary_key: str + :param secondary_key: Secondary access key. + :type secondary_key: str + :param enabled: Determines whether direct access is enabled. + :type enabled: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, *, id: str=None, primary_key: str=None, secondary_key: str=None, enabled: bool=None, **kwargs) -> None: + super(AccessInformationContract, self).__init__(**kwargs) + self.id = id + self.primary_key = primary_key + self.secondary_key = secondary_key + self.enabled = enabled + + +class AccessInformationUpdateParameters(Model): + """Tenant access information update parameters. + + :param enabled: Determines whether direct access is enabled. + :type enabled: bool + """ + + _attribute_map = { + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__(self, *, enabled: bool=None, **kwargs) -> None: + super(AccessInformationUpdateParameters, self).__init__(**kwargs) + self.enabled = enabled + + +class AdditionalLocation(Model): + """Description of an additional API Management resource location. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The location name of the additional region + among Azure Data center regions. + :type location: str + :param sku: Required. SKU properties of the API Management service. + :type sku: + ~azure.mgmt.apimanagement.models.ApiManagementServiceSkuProperties + :ivar public_ip_addresses: Public Static Load Balanced IP addresses of the + API Management service in the additional location. Available only for + Basic, Standard and Premium SKU. + :vartype public_ip_addresses: list[str] + :ivar private_ip_addresses: Private Static Load Balanced IP addresses of + the API Management service which is deployed in an Internal Virtual + Network in a particular additional location. Available only for Basic, + Standard and Premium SKU. + :vartype private_ip_addresses: list[str] + :param virtual_network_configuration: Virtual network configuration for + the location. + :type virtual_network_configuration: + ~azure.mgmt.apimanagement.models.VirtualNetworkConfiguration + :ivar gateway_regional_url: Gateway URL of the API Management service in + the Region. + :vartype gateway_regional_url: str + """ + + _validation = { + 'location': {'required': True}, + 'sku': {'required': True}, + 'public_ip_addresses': {'readonly': True}, + 'private_ip_addresses': {'readonly': True}, + 'gateway_regional_url': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'ApiManagementServiceSkuProperties'}, + 'public_ip_addresses': {'key': 'publicIPAddresses', 'type': '[str]'}, + 'private_ip_addresses': {'key': 'privateIPAddresses', 'type': '[str]'}, + 'virtual_network_configuration': {'key': 'virtualNetworkConfiguration', 'type': 'VirtualNetworkConfiguration'}, + 'gateway_regional_url': {'key': 'gatewayRegionalUrl', 'type': 'str'}, + } + + def __init__(self, *, location: str, sku, virtual_network_configuration=None, **kwargs) -> None: + super(AdditionalLocation, self).__init__(**kwargs) + self.location = location + self.sku = sku + self.public_ip_addresses = None + self.private_ip_addresses = None + self.virtual_network_configuration = virtual_network_configuration + self.gateway_regional_url = None + + +class Resource(Model): + """The Resource definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class ApiContract(Resource): + """Api details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param description: Description of the API. May include HTML formatting + tags. + :type description: str + :param authentication_settings: Collection of authentication settings + included into this API. + :type authentication_settings: + ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract + :param subscription_key_parameter_names: Protocols over which API is made + available. + :type subscription_key_parameter_names: + ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract + :param api_type: Type of API. Possible values include: 'http', 'soap' + :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType + :param api_revision: Describes the Revision of the Api. If no value is + provided, default revision 1 is created + :type api_revision: str + :param api_version: Indicates the Version identifier of the API if the API + is versioned + :type api_version: str + :param is_current: Indicates if API revision is current api revision. + :type is_current: bool + :ivar is_online: Indicates if API revision is accessible via the gateway. + :vartype is_online: bool + :param api_revision_description: Description of the Api Revision. + :type api_revision_description: str + :param api_version_description: Description of the Api Version. + :type api_version_description: str + :param api_version_set_id: A resource identifier for the related + ApiVersionSet. + :type api_version_set_id: str + :param subscription_required: Specifies whether an API or Product + subscription is required for accessing the API. + :type subscription_required: bool + :param source_api_id: API identifier of the source API. + :type source_api_id: str + :param display_name: API name. Must be 1 to 300 characters long. + :type display_name: str + :param service_url: Absolute URL of the backend service implementing this + API. Cannot be more than 2000 characters long. + :type service_url: str + :param path: Required. Relative URL uniquely identifying this API and all + of its resource paths within the API Management service instance. It is + appended to the API endpoint base URL specified during the service + instance creation to form a public URL for this API. + :type path: str + :param protocols: Describes on which protocols the operations in this API + can be invoked. + :type protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] + :param api_version_set: Version set details + :type api_version_set: + ~azure.mgmt.apimanagement.models.ApiVersionSetContractDetails + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'api_revision': {'max_length': 100, 'min_length': 1}, + 'api_version': {'max_length': 100}, + 'is_online': {'readonly': True}, + 'api_revision_description': {'max_length': 256}, + 'api_version_description': {'max_length': 256}, + 'display_name': {'max_length': 300, 'min_length': 1}, + 'service_url': {'max_length': 2000, 'min_length': 0}, + 'path': {'required': True, 'max_length': 400, 'min_length': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'authentication_settings': {'key': 'properties.authenticationSettings', 'type': 'AuthenticationSettingsContract'}, + 'subscription_key_parameter_names': {'key': 'properties.subscriptionKeyParameterNames', 'type': 'SubscriptionKeyParameterNamesContract'}, + 'api_type': {'key': 'properties.type', 'type': 'str'}, + 'api_revision': {'key': 'properties.apiRevision', 'type': 'str'}, + 'api_version': {'key': 'properties.apiVersion', 'type': 'str'}, + 'is_current': {'key': 'properties.isCurrent', 'type': 'bool'}, + 'is_online': {'key': 'properties.isOnline', 'type': 'bool'}, + 'api_revision_description': {'key': 'properties.apiRevisionDescription', 'type': 'str'}, + 'api_version_description': {'key': 'properties.apiVersionDescription', 'type': 'str'}, + 'api_version_set_id': {'key': 'properties.apiVersionSetId', 'type': 'str'}, + 'subscription_required': {'key': 'properties.subscriptionRequired', 'type': 'bool'}, + 'source_api_id': {'key': 'properties.sourceApiId', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'service_url': {'key': 'properties.serviceUrl', 'type': 'str'}, + 'path': {'key': 'properties.path', 'type': 'str'}, + 'protocols': {'key': 'properties.protocols', 'type': '[Protocol]'}, + 'api_version_set': {'key': 'properties.apiVersionSet', 'type': 'ApiVersionSetContractDetails'}, + } + + def __init__(self, *, path: str, description: str=None, authentication_settings=None, subscription_key_parameter_names=None, api_type=None, api_revision: str=None, api_version: str=None, is_current: bool=None, api_revision_description: str=None, api_version_description: str=None, api_version_set_id: str=None, subscription_required: bool=None, source_api_id: str=None, display_name: str=None, service_url: str=None, protocols=None, api_version_set=None, **kwargs) -> None: + super(ApiContract, self).__init__(**kwargs) + self.description = description + self.authentication_settings = authentication_settings + self.subscription_key_parameter_names = subscription_key_parameter_names + self.api_type = api_type + self.api_revision = api_revision + self.api_version = api_version + self.is_current = is_current + self.is_online = None + self.api_revision_description = api_revision_description + self.api_version_description = api_version_description + self.api_version_set_id = api_version_set_id + self.subscription_required = subscription_required + self.source_api_id = source_api_id + self.display_name = display_name + self.service_url = service_url + self.path = path + self.protocols = protocols + self.api_version_set = api_version_set + + +class ApiEntityBaseContract(Model): + """API base contract details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param description: Description of the API. May include HTML formatting + tags. + :type description: str + :param authentication_settings: Collection of authentication settings + included into this API. + :type authentication_settings: + ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract + :param subscription_key_parameter_names: Protocols over which API is made + available. + :type subscription_key_parameter_names: + ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract + :param api_type: Type of API. Possible values include: 'http', 'soap' + :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType + :param api_revision: Describes the Revision of the Api. If no value is + provided, default revision 1 is created + :type api_revision: str + :param api_version: Indicates the Version identifier of the API if the API + is versioned + :type api_version: str + :param is_current: Indicates if API revision is current api revision. + :type is_current: bool + :ivar is_online: Indicates if API revision is accessible via the gateway. + :vartype is_online: bool + :param api_revision_description: Description of the Api Revision. + :type api_revision_description: str + :param api_version_description: Description of the Api Version. + :type api_version_description: str + :param api_version_set_id: A resource identifier for the related + ApiVersionSet. + :type api_version_set_id: str + :param subscription_required: Specifies whether an API or Product + subscription is required for accessing the API. + :type subscription_required: bool + """ + + _validation = { + 'api_revision': {'max_length': 100, 'min_length': 1}, + 'api_version': {'max_length': 100}, + 'is_online': {'readonly': True}, + 'api_revision_description': {'max_length': 256}, + 'api_version_description': {'max_length': 256}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'authentication_settings': {'key': 'authenticationSettings', 'type': 'AuthenticationSettingsContract'}, + 'subscription_key_parameter_names': {'key': 'subscriptionKeyParameterNames', 'type': 'SubscriptionKeyParameterNamesContract'}, + 'api_type': {'key': 'type', 'type': 'str'}, + 'api_revision': {'key': 'apiRevision', 'type': 'str'}, + 'api_version': {'key': 'apiVersion', 'type': 'str'}, + 'is_current': {'key': 'isCurrent', 'type': 'bool'}, + 'is_online': {'key': 'isOnline', 'type': 'bool'}, + 'api_revision_description': {'key': 'apiRevisionDescription', 'type': 'str'}, + 'api_version_description': {'key': 'apiVersionDescription', 'type': 'str'}, + 'api_version_set_id': {'key': 'apiVersionSetId', 'type': 'str'}, + 'subscription_required': {'key': 'subscriptionRequired', 'type': 'bool'}, + } + + def __init__(self, *, description: str=None, authentication_settings=None, subscription_key_parameter_names=None, api_type=None, api_revision: str=None, api_version: str=None, is_current: bool=None, api_revision_description: str=None, api_version_description: str=None, api_version_set_id: str=None, subscription_required: bool=None, **kwargs) -> None: + super(ApiEntityBaseContract, self).__init__(**kwargs) + self.description = description + self.authentication_settings = authentication_settings + self.subscription_key_parameter_names = subscription_key_parameter_names + self.api_type = api_type + self.api_revision = api_revision + self.api_version = api_version + self.is_current = is_current + self.is_online = None + self.api_revision_description = api_revision_description + self.api_version_description = api_version_description + self.api_version_set_id = api_version_set_id + self.subscription_required = subscription_required + + +class ApiContractProperties(ApiEntityBaseContract): + """Api Entity Properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param description: Description of the API. May include HTML formatting + tags. + :type description: str + :param authentication_settings: Collection of authentication settings + included into this API. + :type authentication_settings: + ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract + :param subscription_key_parameter_names: Protocols over which API is made + available. + :type subscription_key_parameter_names: + ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract + :param api_type: Type of API. Possible values include: 'http', 'soap' + :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType + :param api_revision: Describes the Revision of the Api. If no value is + provided, default revision 1 is created + :type api_revision: str + :param api_version: Indicates the Version identifier of the API if the API + is versioned + :type api_version: str + :param is_current: Indicates if API revision is current api revision. + :type is_current: bool + :ivar is_online: Indicates if API revision is accessible via the gateway. + :vartype is_online: bool + :param api_revision_description: Description of the Api Revision. + :type api_revision_description: str + :param api_version_description: Description of the Api Version. + :type api_version_description: str + :param api_version_set_id: A resource identifier for the related + ApiVersionSet. + :type api_version_set_id: str + :param subscription_required: Specifies whether an API or Product + subscription is required for accessing the API. + :type subscription_required: bool + :param source_api_id: API identifier of the source API. + :type source_api_id: str + :param display_name: API name. Must be 1 to 300 characters long. + :type display_name: str + :param service_url: Absolute URL of the backend service implementing this + API. Cannot be more than 2000 characters long. + :type service_url: str + :param path: Required. Relative URL uniquely identifying this API and all + of its resource paths within the API Management service instance. It is + appended to the API endpoint base URL specified during the service + instance creation to form a public URL for this API. + :type path: str + :param protocols: Describes on which protocols the operations in this API + can be invoked. + :type protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] + :param api_version_set: Version set details + :type api_version_set: + ~azure.mgmt.apimanagement.models.ApiVersionSetContractDetails + """ + + _validation = { + 'api_revision': {'max_length': 100, 'min_length': 1}, + 'api_version': {'max_length': 100}, + 'is_online': {'readonly': True}, + 'api_revision_description': {'max_length': 256}, + 'api_version_description': {'max_length': 256}, + 'display_name': {'max_length': 300, 'min_length': 1}, + 'service_url': {'max_length': 2000, 'min_length': 0}, + 'path': {'required': True, 'max_length': 400, 'min_length': 0}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'authentication_settings': {'key': 'authenticationSettings', 'type': 'AuthenticationSettingsContract'}, + 'subscription_key_parameter_names': {'key': 'subscriptionKeyParameterNames', 'type': 'SubscriptionKeyParameterNamesContract'}, + 'api_type': {'key': 'type', 'type': 'str'}, + 'api_revision': {'key': 'apiRevision', 'type': 'str'}, + 'api_version': {'key': 'apiVersion', 'type': 'str'}, + 'is_current': {'key': 'isCurrent', 'type': 'bool'}, + 'is_online': {'key': 'isOnline', 'type': 'bool'}, + 'api_revision_description': {'key': 'apiRevisionDescription', 'type': 'str'}, + 'api_version_description': {'key': 'apiVersionDescription', 'type': 'str'}, + 'api_version_set_id': {'key': 'apiVersionSetId', 'type': 'str'}, + 'subscription_required': {'key': 'subscriptionRequired', 'type': 'bool'}, + 'source_api_id': {'key': 'sourceApiId', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'service_url': {'key': 'serviceUrl', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'protocols': {'key': 'protocols', 'type': '[Protocol]'}, + 'api_version_set': {'key': 'apiVersionSet', 'type': 'ApiVersionSetContractDetails'}, + } + + def __init__(self, *, path: str, description: str=None, authentication_settings=None, subscription_key_parameter_names=None, api_type=None, api_revision: str=None, api_version: str=None, is_current: bool=None, api_revision_description: str=None, api_version_description: str=None, api_version_set_id: str=None, subscription_required: bool=None, source_api_id: str=None, display_name: str=None, service_url: str=None, protocols=None, api_version_set=None, **kwargs) -> None: + super(ApiContractProperties, self).__init__(description=description, authentication_settings=authentication_settings, subscription_key_parameter_names=subscription_key_parameter_names, api_type=api_type, api_revision=api_revision, api_version=api_version, is_current=is_current, api_revision_description=api_revision_description, api_version_description=api_version_description, api_version_set_id=api_version_set_id, subscription_required=subscription_required, **kwargs) + self.source_api_id = source_api_id + self.display_name = display_name + self.service_url = service_url + self.path = path + self.protocols = protocols + self.api_version_set = api_version_set + + +class ApiCreateOrUpdateParameter(Model): + """API Create or Update Parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param description: Description of the API. May include HTML formatting + tags. + :type description: str + :param authentication_settings: Collection of authentication settings + included into this API. + :type authentication_settings: + ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract + :param subscription_key_parameter_names: Protocols over which API is made + available. + :type subscription_key_parameter_names: + ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract + :param api_type: Type of API. Possible values include: 'http', 'soap' + :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType + :param api_revision: Describes the Revision of the Api. If no value is + provided, default revision 1 is created + :type api_revision: str + :param api_version: Indicates the Version identifier of the API if the API + is versioned + :type api_version: str + :param is_current: Indicates if API revision is current api revision. + :type is_current: bool + :ivar is_online: Indicates if API revision is accessible via the gateway. + :vartype is_online: bool + :param api_revision_description: Description of the Api Revision. + :type api_revision_description: str + :param api_version_description: Description of the Api Version. + :type api_version_description: str + :param api_version_set_id: A resource identifier for the related + ApiVersionSet. + :type api_version_set_id: str + :param subscription_required: Specifies whether an API or Product + subscription is required for accessing the API. + :type subscription_required: bool + :param source_api_id: API identifier of the source API. + :type source_api_id: str + :param display_name: API name. Must be 1 to 300 characters long. + :type display_name: str + :param service_url: Absolute URL of the backend service implementing this + API. Cannot be more than 2000 characters long. + :type service_url: str + :param path: Required. Relative URL uniquely identifying this API and all + of its resource paths within the API Management service instance. It is + appended to the API endpoint base URL specified during the service + instance creation to form a public URL for this API. + :type path: str + :param protocols: Describes on which protocols the operations in this API + can be invoked. + :type protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] + :param api_version_set: Version set details + :type api_version_set: + ~azure.mgmt.apimanagement.models.ApiVersionSetContractDetails + :param value: Content value when Importing an API. + :type value: str + :param format: Format of the Content in which the API is getting imported. + Possible values include: 'wadl-xml', 'wadl-link-json', 'swagger-json', + 'swagger-link-json', 'wsdl', 'wsdl-link', 'openapi', 'openapi+json', + 'openapi-link' + :type format: str or ~azure.mgmt.apimanagement.models.ContentFormat + :param wsdl_selector: Criteria to limit import of WSDL to a subset of the + document. + :type wsdl_selector: + ~azure.mgmt.apimanagement.models.ApiCreateOrUpdatePropertiesWsdlSelector + :param soap_api_type: Type of Api to create. + * `http` creates a SOAP to REST API + * `soap` creates a SOAP pass-through API. Possible values include: + 'SoapToRest', 'SoapPassThrough' + :type soap_api_type: str or ~azure.mgmt.apimanagement.models.SoapApiType + """ + + _validation = { + 'api_revision': {'max_length': 100, 'min_length': 1}, + 'api_version': {'max_length': 100}, + 'is_online': {'readonly': True}, + 'api_revision_description': {'max_length': 256}, + 'api_version_description': {'max_length': 256}, + 'display_name': {'max_length': 300, 'min_length': 1}, + 'service_url': {'max_length': 2000, 'min_length': 0}, + 'path': {'required': True, 'max_length': 400, 'min_length': 0}, + } + + _attribute_map = { + 'description': {'key': 'properties.description', 'type': 'str'}, + 'authentication_settings': {'key': 'properties.authenticationSettings', 'type': 'AuthenticationSettingsContract'}, + 'subscription_key_parameter_names': {'key': 'properties.subscriptionKeyParameterNames', 'type': 'SubscriptionKeyParameterNamesContract'}, + 'api_type': {'key': 'properties.type', 'type': 'str'}, + 'api_revision': {'key': 'properties.apiRevision', 'type': 'str'}, + 'api_version': {'key': 'properties.apiVersion', 'type': 'str'}, + 'is_current': {'key': 'properties.isCurrent', 'type': 'bool'}, + 'is_online': {'key': 'properties.isOnline', 'type': 'bool'}, + 'api_revision_description': {'key': 'properties.apiRevisionDescription', 'type': 'str'}, + 'api_version_description': {'key': 'properties.apiVersionDescription', 'type': 'str'}, + 'api_version_set_id': {'key': 'properties.apiVersionSetId', 'type': 'str'}, + 'subscription_required': {'key': 'properties.subscriptionRequired', 'type': 'bool'}, + 'source_api_id': {'key': 'properties.sourceApiId', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'service_url': {'key': 'properties.serviceUrl', 'type': 'str'}, + 'path': {'key': 'properties.path', 'type': 'str'}, + 'protocols': {'key': 'properties.protocols', 'type': '[Protocol]'}, + 'api_version_set': {'key': 'properties.apiVersionSet', 'type': 'ApiVersionSetContractDetails'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + 'format': {'key': 'properties.format', 'type': 'str'}, + 'wsdl_selector': {'key': 'properties.wsdlSelector', 'type': 'ApiCreateOrUpdatePropertiesWsdlSelector'}, + 'soap_api_type': {'key': 'properties.apiType', 'type': 'str'}, + } + + def __init__(self, *, path: str, description: str=None, authentication_settings=None, subscription_key_parameter_names=None, api_type=None, api_revision: str=None, api_version: str=None, is_current: bool=None, api_revision_description: str=None, api_version_description: str=None, api_version_set_id: str=None, subscription_required: bool=None, source_api_id: str=None, display_name: str=None, service_url: str=None, protocols=None, api_version_set=None, value: str=None, format=None, wsdl_selector=None, soap_api_type=None, **kwargs) -> None: + super(ApiCreateOrUpdateParameter, self).__init__(**kwargs) + self.description = description + self.authentication_settings = authentication_settings + self.subscription_key_parameter_names = subscription_key_parameter_names + self.api_type = api_type + self.api_revision = api_revision + self.api_version = api_version + self.is_current = is_current + self.is_online = None + self.api_revision_description = api_revision_description + self.api_version_description = api_version_description + self.api_version_set_id = api_version_set_id + self.subscription_required = subscription_required + self.source_api_id = source_api_id + self.display_name = display_name + self.service_url = service_url + self.path = path + self.protocols = protocols + self.api_version_set = api_version_set + self.value = value + self.format = format + self.wsdl_selector = wsdl_selector + self.soap_api_type = soap_api_type + + +class ApiCreateOrUpdatePropertiesWsdlSelector(Model): + """Criteria to limit import of WSDL to a subset of the document. + + :param wsdl_service_name: Name of service to import from WSDL + :type wsdl_service_name: str + :param wsdl_endpoint_name: Name of endpoint(port) to import from WSDL + :type wsdl_endpoint_name: str + """ + + _attribute_map = { + 'wsdl_service_name': {'key': 'wsdlServiceName', 'type': 'str'}, + 'wsdl_endpoint_name': {'key': 'wsdlEndpointName', 'type': 'str'}, + } + + def __init__(self, *, wsdl_service_name: str=None, wsdl_endpoint_name: str=None, **kwargs) -> None: + super(ApiCreateOrUpdatePropertiesWsdlSelector, self).__init__(**kwargs) + self.wsdl_service_name = wsdl_service_name + self.wsdl_endpoint_name = wsdl_endpoint_name + + +class ApiExportResult(Model): + """API Export result. + + :param id: ResourceId of the API which was exported. + :type id: str + :param export_result_format: Format in which the Api Details are exported + to the Storage Blob with Sas Key valid for 5 minutes. Possible values + include: 'Swagger', 'Wsdl', 'Wadl', 'OpenApi' + :type export_result_format: str or + ~azure.mgmt.apimanagement.models.ExportResultFormat + :param value: The object defining the schema of the exported Api Detail + :type value: ~azure.mgmt.apimanagement.models.ApiExportResultValue + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'export_result_format': {'key': 'format', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'ApiExportResultValue'}, + } + + def __init__(self, *, id: str=None, export_result_format=None, value=None, **kwargs) -> None: + super(ApiExportResult, self).__init__(**kwargs) + self.id = id + self.export_result_format = export_result_format + self.value = value + + +class ApiExportResultValue(Model): + """The object defining the schema of the exported Api Detail. + + :param link: Link to the Storage Blob containing the result of the export + operation. The Blob Uri is only valid for 5 minutes. + :type link: str + """ + + _attribute_map = { + 'link': {'key': 'link', 'type': 'str'}, + } + + def __init__(self, *, link: str=None, **kwargs) -> None: + super(ApiExportResultValue, self).__init__(**kwargs) + self.link = link + + +class ApiManagementServiceApplyNetworkConfigurationParameters(Model): + """Parameter supplied to the Apply Network configuration operation. + + :param location: Location of the Api Management service to update for a + multi-region service. For a service deployed in a single region, this + parameter is not required. + :type location: str + """ + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, **kwargs) -> None: + super(ApiManagementServiceApplyNetworkConfigurationParameters, self).__init__(**kwargs) + self.location = location + + +class ApiManagementServiceBackupRestoreParameters(Model): + """Parameters supplied to the Backup/Restore of an API Management service + operation. + + All required parameters must be populated in order to send to Azure. + + :param storage_account: Required. Azure Cloud Storage account (used to + place/retrieve the backup) name. + :type storage_account: str + :param access_key: Required. Azure Cloud Storage account (used to + place/retrieve the backup) access key. + :type access_key: str + :param container_name: Required. Azure Cloud Storage blob container name + used to place/retrieve the backup. + :type container_name: str + :param backup_name: Required. The name of the backup file to create. + :type backup_name: str + """ + + _validation = { + 'storage_account': {'required': True}, + 'access_key': {'required': True}, + 'container_name': {'required': True}, + 'backup_name': {'required': True}, + } + + _attribute_map = { + 'storage_account': {'key': 'storageAccount', 'type': 'str'}, + 'access_key': {'key': 'accessKey', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'backup_name': {'key': 'backupName', 'type': 'str'}, + } + + def __init__(self, *, storage_account: str, access_key: str, container_name: str, backup_name: str, **kwargs) -> None: + super(ApiManagementServiceBackupRestoreParameters, self).__init__(**kwargs) + self.storage_account = storage_account + self.access_key = access_key + self.container_name = container_name + self.backup_name = backup_name + + +class ApiManagementServiceBaseProperties(Model): + """Base Properties of an API Management service resource description. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param notification_sender_email: Email address from which the + notification will be sent. + :type notification_sender_email: str + :ivar provisioning_state: The current provisioning state of the API + Management service which can be one of the following: + Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + :vartype provisioning_state: str + :ivar target_provisioning_state: The provisioning state of the API + Management service, which is targeted by the long running operation + started on the service. + :vartype target_provisioning_state: str + :ivar created_at_utc: Creation UTC date of the API Management service.The + date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified + by the ISO 8601 standard. + :vartype created_at_utc: datetime + :ivar gateway_url: Gateway URL of the API Management service. + :vartype gateway_url: str + :ivar gateway_regional_url: Gateway URL of the API Management service in + the Default Region. + :vartype gateway_regional_url: str + :ivar portal_url: Publisher portal endpoint Url of the API Management + service. + :vartype portal_url: str + :ivar management_api_url: Management API endpoint URL of the API + Management service. + :vartype management_api_url: str + :ivar scm_url: SCM endpoint URL of the API Management service. + :vartype scm_url: str + :param hostname_configurations: Custom hostname configuration of the API + Management service. + :type hostname_configurations: + list[~azure.mgmt.apimanagement.models.HostnameConfiguration] + :ivar public_ip_addresses: Public Static Load Balanced IP addresses of the + API Management service in Primary region. Available only for Basic, + Standard and Premium SKU. + :vartype public_ip_addresses: list[str] + :ivar private_ip_addresses: Private Static Load Balanced IP addresses of + the API Management service in Primary region which is deployed in an + Internal Virtual Network. Available only for Basic, Standard and Premium + SKU. + :vartype private_ip_addresses: list[str] + :param virtual_network_configuration: Virtual network configuration of the + API Management service. + :type virtual_network_configuration: + ~azure.mgmt.apimanagement.models.VirtualNetworkConfiguration + :param additional_locations: Additional datacenter locations of the API + Management service. + :type additional_locations: + list[~azure.mgmt.apimanagement.models.AdditionalLocation] + :param custom_properties: Custom properties of the API Management + service.
Setting + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` + will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 + and 1.2).
Setting + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` + can be used to disable just TLS 1.1.
Setting + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` + can be used to disable TLS 1.0 on an API Management service.
Setting + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` + can be used to disable just TLS 1.1 for communications with + backends.
Setting + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` + can be used to disable TLS 1.0 for communications with + backends.
Setting + `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can + be used to enable HTTP2 protocol on an API Management service.
Not + specifying any of these properties on PATCH operation will reset omitted + properties' values to their defaults. For all the settings except Http2 + the default value is `True` if the service was created on or before April + 1st 2018 and `False` otherwise. Http2 setting's default value is + `False`.

You can disable any of next ciphers by using settings + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: + TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, + TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, + TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, + TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, + TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. + The default value is `true` for them. + :type custom_properties: dict[str, str] + :param certificates: List of Certificates that need to be installed in the + API Management service. Max supported certificates that can be installed + is 10. + :type certificates: + list[~azure.mgmt.apimanagement.models.CertificateConfiguration] + :param enable_client_certificate: Property only meant to be used for + Consumption SKU Service. This enforces a client certificate to be + presented on each request to the gateway. This also enables the ability to + authenticate the certificate in the policy on the gateway. Default value: + False . + :type enable_client_certificate: bool + :param virtual_network_type: The type of VPN in which API Management + service needs to be configured in. None (Default Value) means the API + Management service is not part of any Virtual Network, External means the + API Management deployment is set up inside a Virtual Network having an + Internet Facing Endpoint, and Internal means that API Management + deployment is setup inside a Virtual Network having an Intranet Facing + Endpoint only. Possible values include: 'None', 'External', 'Internal'. + Default value: "None" . + :type virtual_network_type: str or + ~azure.mgmt.apimanagement.models.VirtualNetworkType + """ + + _validation = { + 'notification_sender_email': {'max_length': 100}, + 'provisioning_state': {'readonly': True}, + 'target_provisioning_state': {'readonly': True}, + 'created_at_utc': {'readonly': True}, + 'gateway_url': {'readonly': True}, + 'gateway_regional_url': {'readonly': True}, + 'portal_url': {'readonly': True}, + 'management_api_url': {'readonly': True}, + 'scm_url': {'readonly': True}, + 'public_ip_addresses': {'readonly': True}, + 'private_ip_addresses': {'readonly': True}, + } + + _attribute_map = { + 'notification_sender_email': {'key': 'notificationSenderEmail', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'target_provisioning_state': {'key': 'targetProvisioningState', 'type': 'str'}, + 'created_at_utc': {'key': 'createdAtUtc', 'type': 'iso-8601'}, + 'gateway_url': {'key': 'gatewayUrl', 'type': 'str'}, + 'gateway_regional_url': {'key': 'gatewayRegionalUrl', 'type': 'str'}, + 'portal_url': {'key': 'portalUrl', 'type': 'str'}, + 'management_api_url': {'key': 'managementApiUrl', 'type': 'str'}, + 'scm_url': {'key': 'scmUrl', 'type': 'str'}, + 'hostname_configurations': {'key': 'hostnameConfigurations', 'type': '[HostnameConfiguration]'}, + 'public_ip_addresses': {'key': 'publicIPAddresses', 'type': '[str]'}, + 'private_ip_addresses': {'key': 'privateIPAddresses', 'type': '[str]'}, + 'virtual_network_configuration': {'key': 'virtualNetworkConfiguration', 'type': 'VirtualNetworkConfiguration'}, + 'additional_locations': {'key': 'additionalLocations', 'type': '[AdditionalLocation]'}, + 'custom_properties': {'key': 'customProperties', 'type': '{str}'}, + 'certificates': {'key': 'certificates', 'type': '[CertificateConfiguration]'}, + 'enable_client_certificate': {'key': 'enableClientCertificate', 'type': 'bool'}, + 'virtual_network_type': {'key': 'virtualNetworkType', 'type': 'str'}, + } + + def __init__(self, *, notification_sender_email: str=None, hostname_configurations=None, virtual_network_configuration=None, additional_locations=None, custom_properties=None, certificates=None, enable_client_certificate: bool=False, virtual_network_type="None", **kwargs) -> None: + super(ApiManagementServiceBaseProperties, self).__init__(**kwargs) + self.notification_sender_email = notification_sender_email + self.provisioning_state = None + self.target_provisioning_state = None + self.created_at_utc = None + self.gateway_url = None + self.gateway_regional_url = None + self.portal_url = None + self.management_api_url = None + self.scm_url = None + self.hostname_configurations = hostname_configurations + self.public_ip_addresses = None + self.private_ip_addresses = None + self.virtual_network_configuration = virtual_network_configuration + self.additional_locations = additional_locations + self.custom_properties = custom_properties + self.certificates = certificates + self.enable_client_certificate = enable_client_certificate + self.virtual_network_type = virtual_network_type + + +class ApiManagementServiceCheckNameAvailabilityParameters(Model): + """Parameters supplied to the CheckNameAvailability operation. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name to check for availability. + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str, **kwargs) -> None: + super(ApiManagementServiceCheckNameAvailabilityParameters, self).__init__(**kwargs) + self.name = name + + +class ApiManagementServiceGetSsoTokenResult(Model): + """The response of the GetSsoToken operation. + + :param redirect_uri: Redirect URL to the Publisher Portal containing the + SSO token. + :type redirect_uri: str + """ + + _attribute_map = { + 'redirect_uri': {'key': 'redirectUri', 'type': 'str'}, + } + + def __init__(self, *, redirect_uri: str=None, **kwargs) -> None: + super(ApiManagementServiceGetSsoTokenResult, self).__init__(**kwargs) + self.redirect_uri = redirect_uri + + +class ApiManagementServiceIdentity(Model): + """Identity properties of the Api Management service resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. The identity type. Currently the only supported type + is 'SystemAssigned'. Default value: "SystemAssigned" . + :vartype type: str + :ivar principal_id: The principal id of the identity. + :vartype principal_id: str + :ivar tenant_id: The client tenant id of the identity. + :vartype tenant_id: str + """ + + _validation = { + 'type': {'required': True, 'constant': True}, + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + type = "SystemAssigned" + + def __init__(self, **kwargs) -> None: + super(ApiManagementServiceIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + + +class ApiManagementServiceNameAvailabilityResult(Model): + """Response of the CheckNameAvailability operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name_available: True if the name is available and can be used to + create a new API Management service; otherwise false. + :vartype name_available: bool + :ivar message: If reason == invalid, provide the user with the reason why + the given name is invalid, and provide the resource naming requirements so + that the user can select a valid name. If reason == AlreadyExists, explain + that is already in use, and direct them to select a + different name. + :vartype message: str + :param reason: Invalid indicates the name provided does not match the + resource provider’s naming requirements (incorrect length, unsupported + characters, etc.) AlreadyExists indicates that the name is already in use + and is therefore unavailable. Possible values include: 'Valid', 'Invalid', + 'AlreadyExists' + :type reason: str or + ~azure.mgmt.apimanagement.models.NameAvailabilityReason + """ + + _validation = { + 'name_available': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'message': {'key': 'message', 'type': 'str'}, + 'reason': {'key': 'reason', 'type': 'NameAvailabilityReason'}, + } + + def __init__(self, *, reason=None, **kwargs) -> None: + super(ApiManagementServiceNameAvailabilityResult, self).__init__(**kwargs) + self.name_available = None + self.message = None + self.reason = reason + + +class ApimResource(Model): + """The Resource definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource is set to + Microsoft.ApiManagement. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(ApimResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = tags + + +class ApiManagementServiceResource(ApimResource): + """A single API Management service resource in List or Get response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource is set to + Microsoft.ApiManagement. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param notification_sender_email: Email address from which the + notification will be sent. + :type notification_sender_email: str + :ivar provisioning_state: The current provisioning state of the API + Management service which can be one of the following: + Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + :vartype provisioning_state: str + :ivar target_provisioning_state: The provisioning state of the API + Management service, which is targeted by the long running operation + started on the service. + :vartype target_provisioning_state: str + :ivar created_at_utc: Creation UTC date of the API Management service.The + date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified + by the ISO 8601 standard. + :vartype created_at_utc: datetime + :ivar gateway_url: Gateway URL of the API Management service. + :vartype gateway_url: str + :ivar gateway_regional_url: Gateway URL of the API Management service in + the Default Region. + :vartype gateway_regional_url: str + :ivar portal_url: Publisher portal endpoint Url of the API Management + service. + :vartype portal_url: str + :ivar management_api_url: Management API endpoint URL of the API + Management service. + :vartype management_api_url: str + :ivar scm_url: SCM endpoint URL of the API Management service. + :vartype scm_url: str + :param hostname_configurations: Custom hostname configuration of the API + Management service. + :type hostname_configurations: + list[~azure.mgmt.apimanagement.models.HostnameConfiguration] + :ivar public_ip_addresses: Public Static Load Balanced IP addresses of the + API Management service in Primary region. Available only for Basic, + Standard and Premium SKU. + :vartype public_ip_addresses: list[str] + :ivar private_ip_addresses: Private Static Load Balanced IP addresses of + the API Management service in Primary region which is deployed in an + Internal Virtual Network. Available only for Basic, Standard and Premium + SKU. + :vartype private_ip_addresses: list[str] + :param virtual_network_configuration: Virtual network configuration of the + API Management service. + :type virtual_network_configuration: + ~azure.mgmt.apimanagement.models.VirtualNetworkConfiguration + :param additional_locations: Additional datacenter locations of the API + Management service. + :type additional_locations: + list[~azure.mgmt.apimanagement.models.AdditionalLocation] + :param custom_properties: Custom properties of the API Management + service.
Setting + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` + will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 + and 1.2).
Setting + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` + can be used to disable just TLS 1.1.
Setting + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` + can be used to disable TLS 1.0 on an API Management service.
Setting + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` + can be used to disable just TLS 1.1 for communications with + backends.
Setting + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` + can be used to disable TLS 1.0 for communications with + backends.
Setting + `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can + be used to enable HTTP2 protocol on an API Management service.
Not + specifying any of these properties on PATCH operation will reset omitted + properties' values to their defaults. For all the settings except Http2 + the default value is `True` if the service was created on or before April + 1st 2018 and `False` otherwise. Http2 setting's default value is + `False`.

You can disable any of next ciphers by using settings + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: + TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, + TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, + TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, + TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, + TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. + The default value is `true` for them. + :type custom_properties: dict[str, str] + :param certificates: List of Certificates that need to be installed in the + API Management service. Max supported certificates that can be installed + is 10. + :type certificates: + list[~azure.mgmt.apimanagement.models.CertificateConfiguration] + :param enable_client_certificate: Property only meant to be used for + Consumption SKU Service. This enforces a client certificate to be + presented on each request to the gateway. This also enables the ability to + authenticate the certificate in the policy on the gateway. Default value: + False . + :type enable_client_certificate: bool + :param virtual_network_type: The type of VPN in which API Management + service needs to be configured in. None (Default Value) means the API + Management service is not part of any Virtual Network, External means the + API Management deployment is set up inside a Virtual Network having an + Internet Facing Endpoint, and Internal means that API Management + deployment is setup inside a Virtual Network having an Intranet Facing + Endpoint only. Possible values include: 'None', 'External', 'Internal'. + Default value: "None" . + :type virtual_network_type: str or + ~azure.mgmt.apimanagement.models.VirtualNetworkType + :param publisher_email: Required. Publisher email. + :type publisher_email: str + :param publisher_name: Required. Publisher name. + :type publisher_name: str + :param sku: Required. SKU properties of the API Management service. + :type sku: + ~azure.mgmt.apimanagement.models.ApiManagementServiceSkuProperties + :param identity: Managed service identity of the Api Management service. + :type identity: + ~azure.mgmt.apimanagement.models.ApiManagementServiceIdentity + :param location: Required. Resource location. + :type location: str + :ivar etag: ETag of the resource. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'notification_sender_email': {'max_length': 100}, + 'provisioning_state': {'readonly': True}, + 'target_provisioning_state': {'readonly': True}, + 'created_at_utc': {'readonly': True}, + 'gateway_url': {'readonly': True}, + 'gateway_regional_url': {'readonly': True}, + 'portal_url': {'readonly': True}, + 'management_api_url': {'readonly': True}, + 'scm_url': {'readonly': True}, + 'public_ip_addresses': {'readonly': True}, + 'private_ip_addresses': {'readonly': True}, + 'publisher_email': {'required': True, 'max_length': 100}, + 'publisher_name': {'required': True, 'max_length': 100}, + 'sku': {'required': True}, + 'location': {'required': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'notification_sender_email': {'key': 'properties.notificationSenderEmail', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'target_provisioning_state': {'key': 'properties.targetProvisioningState', 'type': 'str'}, + 'created_at_utc': {'key': 'properties.createdAtUtc', 'type': 'iso-8601'}, + 'gateway_url': {'key': 'properties.gatewayUrl', 'type': 'str'}, + 'gateway_regional_url': {'key': 'properties.gatewayRegionalUrl', 'type': 'str'}, + 'portal_url': {'key': 'properties.portalUrl', 'type': 'str'}, + 'management_api_url': {'key': 'properties.managementApiUrl', 'type': 'str'}, + 'scm_url': {'key': 'properties.scmUrl', 'type': 'str'}, + 'hostname_configurations': {'key': 'properties.hostnameConfigurations', 'type': '[HostnameConfiguration]'}, + 'public_ip_addresses': {'key': 'properties.publicIPAddresses', 'type': '[str]'}, + 'private_ip_addresses': {'key': 'properties.privateIPAddresses', 'type': '[str]'}, + 'virtual_network_configuration': {'key': 'properties.virtualNetworkConfiguration', 'type': 'VirtualNetworkConfiguration'}, + 'additional_locations': {'key': 'properties.additionalLocations', 'type': '[AdditionalLocation]'}, + 'custom_properties': {'key': 'properties.customProperties', 'type': '{str}'}, + 'certificates': {'key': 'properties.certificates', 'type': '[CertificateConfiguration]'}, + 'enable_client_certificate': {'key': 'properties.enableClientCertificate', 'type': 'bool'}, + 'virtual_network_type': {'key': 'properties.virtualNetworkType', 'type': 'str'}, + 'publisher_email': {'key': 'properties.publisherEmail', 'type': 'str'}, + 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'ApiManagementServiceSkuProperties'}, + 'identity': {'key': 'identity', 'type': 'ApiManagementServiceIdentity'}, + 'location': {'key': 'location', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, *, publisher_email: str, publisher_name: str, sku, location: str, tags=None, notification_sender_email: str=None, hostname_configurations=None, virtual_network_configuration=None, additional_locations=None, custom_properties=None, certificates=None, enable_client_certificate: bool=False, virtual_network_type="None", identity=None, **kwargs) -> None: + super(ApiManagementServiceResource, self).__init__(tags=tags, **kwargs) + self.notification_sender_email = notification_sender_email + self.provisioning_state = None + self.target_provisioning_state = None + self.created_at_utc = None + self.gateway_url = None + self.gateway_regional_url = None + self.portal_url = None + self.management_api_url = None + self.scm_url = None + self.hostname_configurations = hostname_configurations + self.public_ip_addresses = None + self.private_ip_addresses = None + self.virtual_network_configuration = virtual_network_configuration + self.additional_locations = additional_locations + self.custom_properties = custom_properties + self.certificates = certificates + self.enable_client_certificate = enable_client_certificate + self.virtual_network_type = virtual_network_type + self.publisher_email = publisher_email + self.publisher_name = publisher_name + self.sku = sku + self.identity = identity + self.location = location + self.etag = None + + +class ApiManagementServiceSkuProperties(Model): + """API Management service resource SKU properties. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the Sku. Possible values include: + 'Developer', 'Standard', 'Premium', 'Basic', 'Consumption' + :type name: str or ~azure.mgmt.apimanagement.models.SkuType + :param capacity: Capacity of the SKU (number of deployed units of the + SKU). + :type capacity: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__(self, *, name, capacity: int=None, **kwargs) -> None: + super(ApiManagementServiceSkuProperties, self).__init__(**kwargs) + self.name = name + self.capacity = capacity + + +class ApiManagementServiceUpdateParameters(ApimResource): + """Parameter supplied to Update Api Management Service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource is set to + Microsoft.ApiManagement. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param notification_sender_email: Email address from which the + notification will be sent. + :type notification_sender_email: str + :ivar provisioning_state: The current provisioning state of the API + Management service which can be one of the following: + Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + :vartype provisioning_state: str + :ivar target_provisioning_state: The provisioning state of the API + Management service, which is targeted by the long running operation + started on the service. + :vartype target_provisioning_state: str + :ivar created_at_utc: Creation UTC date of the API Management service.The + date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified + by the ISO 8601 standard. + :vartype created_at_utc: datetime + :ivar gateway_url: Gateway URL of the API Management service. + :vartype gateway_url: str + :ivar gateway_regional_url: Gateway URL of the API Management service in + the Default Region. + :vartype gateway_regional_url: str + :ivar portal_url: Publisher portal endpoint Url of the API Management + service. + :vartype portal_url: str + :ivar management_api_url: Management API endpoint URL of the API + Management service. + :vartype management_api_url: str + :ivar scm_url: SCM endpoint URL of the API Management service. + :vartype scm_url: str + :param hostname_configurations: Custom hostname configuration of the API + Management service. + :type hostname_configurations: + list[~azure.mgmt.apimanagement.models.HostnameConfiguration] + :ivar public_ip_addresses: Public Static Load Balanced IP addresses of the + API Management service in Primary region. Available only for Basic, + Standard and Premium SKU. + :vartype public_ip_addresses: list[str] + :ivar private_ip_addresses: Private Static Load Balanced IP addresses of + the API Management service in Primary region which is deployed in an + Internal Virtual Network. Available only for Basic, Standard and Premium + SKU. + :vartype private_ip_addresses: list[str] + :param virtual_network_configuration: Virtual network configuration of the + API Management service. + :type virtual_network_configuration: + ~azure.mgmt.apimanagement.models.VirtualNetworkConfiguration + :param additional_locations: Additional datacenter locations of the API + Management service. + :type additional_locations: + list[~azure.mgmt.apimanagement.models.AdditionalLocation] + :param custom_properties: Custom properties of the API Management + service.
Setting + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` + will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 + and 1.2).
Setting + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` + can be used to disable just TLS 1.1.
Setting + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` + can be used to disable TLS 1.0 on an API Management service.
Setting + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` + can be used to disable just TLS 1.1 for communications with + backends.
Setting + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` + can be used to disable TLS 1.0 for communications with + backends.
Setting + `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can + be used to enable HTTP2 protocol on an API Management service.
Not + specifying any of these properties on PATCH operation will reset omitted + properties' values to their defaults. For all the settings except Http2 + the default value is `True` if the service was created on or before April + 1st 2018 and `False` otherwise. Http2 setting's default value is + `False`.

You can disable any of next ciphers by using settings + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: + TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, + TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, + TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, + TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, + TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, + `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. + The default value is `true` for them. + :type custom_properties: dict[str, str] + :param certificates: List of Certificates that need to be installed in the + API Management service. Max supported certificates that can be installed + is 10. + :type certificates: + list[~azure.mgmt.apimanagement.models.CertificateConfiguration] + :param enable_client_certificate: Property only meant to be used for + Consumption SKU Service. This enforces a client certificate to be + presented on each request to the gateway. This also enables the ability to + authenticate the certificate in the policy on the gateway. Default value: + False . + :type enable_client_certificate: bool + :param virtual_network_type: The type of VPN in which API Management + service needs to be configured in. None (Default Value) means the API + Management service is not part of any Virtual Network, External means the + API Management deployment is set up inside a Virtual Network having an + Internet Facing Endpoint, and Internal means that API Management + deployment is setup inside a Virtual Network having an Intranet Facing + Endpoint only. Possible values include: 'None', 'External', 'Internal'. + Default value: "None" . + :type virtual_network_type: str or + ~azure.mgmt.apimanagement.models.VirtualNetworkType + :param publisher_email: Publisher email. + :type publisher_email: str + :param publisher_name: Publisher name. + :type publisher_name: str + :param sku: SKU properties of the API Management service. + :type sku: + ~azure.mgmt.apimanagement.models.ApiManagementServiceSkuProperties + :param identity: Managed service identity of the Api Management service. + :type identity: + ~azure.mgmt.apimanagement.models.ApiManagementServiceIdentity + :ivar etag: ETag of the resource. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'notification_sender_email': {'max_length': 100}, + 'provisioning_state': {'readonly': True}, + 'target_provisioning_state': {'readonly': True}, + 'created_at_utc': {'readonly': True}, + 'gateway_url': {'readonly': True}, + 'gateway_regional_url': {'readonly': True}, + 'portal_url': {'readonly': True}, + 'management_api_url': {'readonly': True}, + 'scm_url': {'readonly': True}, + 'public_ip_addresses': {'readonly': True}, + 'private_ip_addresses': {'readonly': True}, + 'publisher_email': {'max_length': 100}, + 'publisher_name': {'max_length': 100}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'notification_sender_email': {'key': 'properties.notificationSenderEmail', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'target_provisioning_state': {'key': 'properties.targetProvisioningState', 'type': 'str'}, + 'created_at_utc': {'key': 'properties.createdAtUtc', 'type': 'iso-8601'}, + 'gateway_url': {'key': 'properties.gatewayUrl', 'type': 'str'}, + 'gateway_regional_url': {'key': 'properties.gatewayRegionalUrl', 'type': 'str'}, + 'portal_url': {'key': 'properties.portalUrl', 'type': 'str'}, + 'management_api_url': {'key': 'properties.managementApiUrl', 'type': 'str'}, + 'scm_url': {'key': 'properties.scmUrl', 'type': 'str'}, + 'hostname_configurations': {'key': 'properties.hostnameConfigurations', 'type': '[HostnameConfiguration]'}, + 'public_ip_addresses': {'key': 'properties.publicIPAddresses', 'type': '[str]'}, + 'private_ip_addresses': {'key': 'properties.privateIPAddresses', 'type': '[str]'}, + 'virtual_network_configuration': {'key': 'properties.virtualNetworkConfiguration', 'type': 'VirtualNetworkConfiguration'}, + 'additional_locations': {'key': 'properties.additionalLocations', 'type': '[AdditionalLocation]'}, + 'custom_properties': {'key': 'properties.customProperties', 'type': '{str}'}, + 'certificates': {'key': 'properties.certificates', 'type': '[CertificateConfiguration]'}, + 'enable_client_certificate': {'key': 'properties.enableClientCertificate', 'type': 'bool'}, + 'virtual_network_type': {'key': 'properties.virtualNetworkType', 'type': 'str'}, + 'publisher_email': {'key': 'properties.publisherEmail', 'type': 'str'}, + 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'ApiManagementServiceSkuProperties'}, + 'identity': {'key': 'identity', 'type': 'ApiManagementServiceIdentity'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, *, tags=None, notification_sender_email: str=None, hostname_configurations=None, virtual_network_configuration=None, additional_locations=None, custom_properties=None, certificates=None, enable_client_certificate: bool=False, virtual_network_type="None", publisher_email: str=None, publisher_name: str=None, sku=None, identity=None, **kwargs) -> None: + super(ApiManagementServiceUpdateParameters, self).__init__(tags=tags, **kwargs) + self.notification_sender_email = notification_sender_email + self.provisioning_state = None + self.target_provisioning_state = None + self.created_at_utc = None + self.gateway_url = None + self.gateway_regional_url = None + self.portal_url = None + self.management_api_url = None + self.scm_url = None + self.hostname_configurations = hostname_configurations + self.public_ip_addresses = None + self.private_ip_addresses = None + self.virtual_network_configuration = virtual_network_configuration + self.additional_locations = additional_locations + self.custom_properties = custom_properties + self.certificates = certificates + self.enable_client_certificate = enable_client_certificate + self.virtual_network_type = virtual_network_type + self.publisher_email = publisher_email + self.publisher_name = publisher_name + self.sku = sku + self.identity = identity + self.etag = None + + +class ApiReleaseContract(Resource): + """ApiRelease details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param api_id: Identifier of the API the release belongs to. + :type api_id: str + :ivar created_date_time: The time the API was released. The date conforms + to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 + standard. + :vartype created_date_time: datetime + :ivar updated_date_time: The time the API release was updated. + :vartype updated_date_time: datetime + :param notes: Release Notes + :type notes: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_date_time': {'readonly': True}, + 'updated_date_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'api_id': {'key': 'properties.apiId', 'type': 'str'}, + 'created_date_time': {'key': 'properties.createdDateTime', 'type': 'iso-8601'}, + 'updated_date_time': {'key': 'properties.updatedDateTime', 'type': 'iso-8601'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + } + + def __init__(self, *, api_id: str=None, notes: str=None, **kwargs) -> None: + super(ApiReleaseContract, self).__init__(**kwargs) + self.api_id = api_id + self.created_date_time = None + self.updated_date_time = None + self.notes = notes + + +class ApiRevisionContract(Model): + """Summary of revision metadata. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar api_id: Identifier of the API Revision. + :vartype api_id: str + :ivar api_revision: Revision number of API. + :vartype api_revision: str + :ivar created_date_time: The time the API Revision was created. The date + conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the + ISO 8601 standard. + :vartype created_date_time: datetime + :ivar updated_date_time: The time the API Revision were updated. The date + conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the + ISO 8601 standard. + :vartype updated_date_time: datetime + :ivar description: Description of the API Revision. + :vartype description: str + :ivar private_url: Gateway URL for accessing the non-current API Revision. + :vartype private_url: str + :ivar is_online: Indicates if API revision is the current api revision. + :vartype is_online: bool + :ivar is_current: Indicates if API revision is accessible via the gateway. + :vartype is_current: bool + """ + + _validation = { + 'api_id': {'readonly': True}, + 'api_revision': {'readonly': True, 'max_length': 100, 'min_length': 1}, + 'created_date_time': {'readonly': True}, + 'updated_date_time': {'readonly': True}, + 'description': {'readonly': True, 'max_length': 256}, + 'private_url': {'readonly': True}, + 'is_online': {'readonly': True}, + 'is_current': {'readonly': True}, + } + + _attribute_map = { + 'api_id': {'key': 'apiId', 'type': 'str'}, + 'api_revision': {'key': 'apiRevision', 'type': 'str'}, + 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, + 'updated_date_time': {'key': 'updatedDateTime', 'type': 'iso-8601'}, + 'description': {'key': 'description', 'type': 'str'}, + 'private_url': {'key': 'privateUrl', 'type': 'str'}, + 'is_online': {'key': 'isOnline', 'type': 'bool'}, + 'is_current': {'key': 'isCurrent', 'type': 'bool'}, + } + + def __init__(self, **kwargs) -> None: + super(ApiRevisionContract, self).__init__(**kwargs) + self.api_id = None + self.api_revision = None + self.created_date_time = None + self.updated_date_time = None + self.description = None + self.private_url = None + self.is_online = None + self.is_current = None + + +class ApiRevisionInfoContract(Model): + """Object used to create an API Revision or Version based on an existing API + Revision. + + :param source_api_id: Resource identifier of API to be used to create the + revision from. + :type source_api_id: str + :param api_version_name: Version identifier for the new API Version. + :type api_version_name: str + :param api_revision_description: Description of new API Revision. + :type api_revision_description: str + :param api_version_set: Version set details + :type api_version_set: + ~azure.mgmt.apimanagement.models.ApiVersionSetContractDetails + """ + + _validation = { + 'api_version_name': {'max_length': 100}, + 'api_revision_description': {'max_length': 256}, + } + + _attribute_map = { + 'source_api_id': {'key': 'sourceApiId', 'type': 'str'}, + 'api_version_name': {'key': 'apiVersionName', 'type': 'str'}, + 'api_revision_description': {'key': 'apiRevisionDescription', 'type': 'str'}, + 'api_version_set': {'key': 'apiVersionSet', 'type': 'ApiVersionSetContractDetails'}, + } + + def __init__(self, *, source_api_id: str=None, api_version_name: str=None, api_revision_description: str=None, api_version_set=None, **kwargs) -> None: + super(ApiRevisionInfoContract, self).__init__(**kwargs) + self.source_api_id = source_api_id + self.api_version_name = api_version_name + self.api_revision_description = api_revision_description + self.api_version_set = api_version_set + + +class ApiTagResourceContractProperties(ApiEntityBaseContract): + """API contract properties for the Tag Resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param description: Description of the API. May include HTML formatting + tags. + :type description: str + :param authentication_settings: Collection of authentication settings + included into this API. + :type authentication_settings: + ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract + :param subscription_key_parameter_names: Protocols over which API is made + available. + :type subscription_key_parameter_names: + ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract + :param api_type: Type of API. Possible values include: 'http', 'soap' + :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType + :param api_revision: Describes the Revision of the Api. If no value is + provided, default revision 1 is created + :type api_revision: str + :param api_version: Indicates the Version identifier of the API if the API + is versioned + :type api_version: str + :param is_current: Indicates if API revision is current api revision. + :type is_current: bool + :ivar is_online: Indicates if API revision is accessible via the gateway. + :vartype is_online: bool + :param api_revision_description: Description of the Api Revision. + :type api_revision_description: str + :param api_version_description: Description of the Api Version. + :type api_version_description: str + :param api_version_set_id: A resource identifier for the related + ApiVersionSet. + :type api_version_set_id: str + :param subscription_required: Specifies whether an API or Product + subscription is required for accessing the API. + :type subscription_required: bool + :param id: API identifier in the form /apis/{apiId}. + :type id: str + :param name: API name. + :type name: str + :param service_url: Absolute URL of the backend service implementing this + API. + :type service_url: str + :param path: Relative URL uniquely identifying this API and all of its + resource paths within the API Management service instance. It is appended + to the API endpoint base URL specified during the service instance + creation to form a public URL for this API. + :type path: str + :param protocols: Describes on which protocols the operations in this API + can be invoked. + :type protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] + """ + + _validation = { + 'api_revision': {'max_length': 100, 'min_length': 1}, + 'api_version': {'max_length': 100}, + 'is_online': {'readonly': True}, + 'api_revision_description': {'max_length': 256}, + 'api_version_description': {'max_length': 256}, + 'name': {'max_length': 300, 'min_length': 1}, + 'service_url': {'max_length': 2000, 'min_length': 1}, + 'path': {'max_length': 400, 'min_length': 0}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'authentication_settings': {'key': 'authenticationSettings', 'type': 'AuthenticationSettingsContract'}, + 'subscription_key_parameter_names': {'key': 'subscriptionKeyParameterNames', 'type': 'SubscriptionKeyParameterNamesContract'}, + 'api_type': {'key': 'type', 'type': 'str'}, + 'api_revision': {'key': 'apiRevision', 'type': 'str'}, + 'api_version': {'key': 'apiVersion', 'type': 'str'}, + 'is_current': {'key': 'isCurrent', 'type': 'bool'}, + 'is_online': {'key': 'isOnline', 'type': 'bool'}, + 'api_revision_description': {'key': 'apiRevisionDescription', 'type': 'str'}, + 'api_version_description': {'key': 'apiVersionDescription', 'type': 'str'}, + 'api_version_set_id': {'key': 'apiVersionSetId', 'type': 'str'}, + 'subscription_required': {'key': 'subscriptionRequired', 'type': 'bool'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'service_url': {'key': 'serviceUrl', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'protocols': {'key': 'protocols', 'type': '[Protocol]'}, + } + + def __init__(self, *, description: str=None, authentication_settings=None, subscription_key_parameter_names=None, api_type=None, api_revision: str=None, api_version: str=None, is_current: bool=None, api_revision_description: str=None, api_version_description: str=None, api_version_set_id: str=None, subscription_required: bool=None, id: str=None, name: str=None, service_url: str=None, path: str=None, protocols=None, **kwargs) -> None: + super(ApiTagResourceContractProperties, self).__init__(description=description, authentication_settings=authentication_settings, subscription_key_parameter_names=subscription_key_parameter_names, api_type=api_type, api_revision=api_revision, api_version=api_version, is_current=is_current, api_revision_description=api_revision_description, api_version_description=api_version_description, api_version_set_id=api_version_set_id, subscription_required=subscription_required, **kwargs) + self.id = id + self.name = name + self.service_url = service_url + self.path = path + self.protocols = protocols + + +class ApiUpdateContract(Model): + """API update contract details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param description: Description of the API. May include HTML formatting + tags. + :type description: str + :param authentication_settings: Collection of authentication settings + included into this API. + :type authentication_settings: + ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract + :param subscription_key_parameter_names: Protocols over which API is made + available. + :type subscription_key_parameter_names: + ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract + :param api_type: Type of API. Possible values include: 'http', 'soap' + :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType + :param api_revision: Describes the Revision of the Api. If no value is + provided, default revision 1 is created + :type api_revision: str + :param api_version: Indicates the Version identifier of the API if the API + is versioned + :type api_version: str + :param is_current: Indicates if API revision is current api revision. + :type is_current: bool + :ivar is_online: Indicates if API revision is accessible via the gateway. + :vartype is_online: bool + :param api_revision_description: Description of the Api Revision. + :type api_revision_description: str + :param api_version_description: Description of the Api Version. + :type api_version_description: str + :param api_version_set_id: A resource identifier for the related + ApiVersionSet. + :type api_version_set_id: str + :param subscription_required: Specifies whether an API or Product + subscription is required for accessing the API. + :type subscription_required: bool + :param display_name: API name. + :type display_name: str + :param service_url: Absolute URL of the backend service implementing this + API. + :type service_url: str + :param path: Relative URL uniquely identifying this API and all of its + resource paths within the API Management service instance. It is appended + to the API endpoint base URL specified during the service instance + creation to form a public URL for this API. + :type path: str + :param protocols: Describes on which protocols the operations in this API + can be invoked. + :type protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] + """ + + _validation = { + 'api_revision': {'max_length': 100, 'min_length': 1}, + 'api_version': {'max_length': 100}, + 'is_online': {'readonly': True}, + 'api_revision_description': {'max_length': 256}, + 'api_version_description': {'max_length': 256}, + 'display_name': {'max_length': 300, 'min_length': 1}, + 'service_url': {'max_length': 2000, 'min_length': 1}, + 'path': {'max_length': 400, 'min_length': 0}, + } + + _attribute_map = { + 'description': {'key': 'properties.description', 'type': 'str'}, + 'authentication_settings': {'key': 'properties.authenticationSettings', 'type': 'AuthenticationSettingsContract'}, + 'subscription_key_parameter_names': {'key': 'properties.subscriptionKeyParameterNames', 'type': 'SubscriptionKeyParameterNamesContract'}, + 'api_type': {'key': 'properties.type', 'type': 'str'}, + 'api_revision': {'key': 'properties.apiRevision', 'type': 'str'}, + 'api_version': {'key': 'properties.apiVersion', 'type': 'str'}, + 'is_current': {'key': 'properties.isCurrent', 'type': 'bool'}, + 'is_online': {'key': 'properties.isOnline', 'type': 'bool'}, + 'api_revision_description': {'key': 'properties.apiRevisionDescription', 'type': 'str'}, + 'api_version_description': {'key': 'properties.apiVersionDescription', 'type': 'str'}, + 'api_version_set_id': {'key': 'properties.apiVersionSetId', 'type': 'str'}, + 'subscription_required': {'key': 'properties.subscriptionRequired', 'type': 'bool'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'service_url': {'key': 'properties.serviceUrl', 'type': 'str'}, + 'path': {'key': 'properties.path', 'type': 'str'}, + 'protocols': {'key': 'properties.protocols', 'type': '[Protocol]'}, + } + + def __init__(self, *, description: str=None, authentication_settings=None, subscription_key_parameter_names=None, api_type=None, api_revision: str=None, api_version: str=None, is_current: bool=None, api_revision_description: str=None, api_version_description: str=None, api_version_set_id: str=None, subscription_required: bool=None, display_name: str=None, service_url: str=None, path: str=None, protocols=None, **kwargs) -> None: + super(ApiUpdateContract, self).__init__(**kwargs) + self.description = description + self.authentication_settings = authentication_settings + self.subscription_key_parameter_names = subscription_key_parameter_names + self.api_type = api_type + self.api_revision = api_revision + self.api_version = api_version + self.is_current = is_current + self.is_online = None + self.api_revision_description = api_revision_description + self.api_version_description = api_version_description + self.api_version_set_id = api_version_set_id + self.subscription_required = subscription_required + self.display_name = display_name + self.service_url = service_url + self.path = path + self.protocols = protocols + + +class ApiVersionSetContract(Resource): + """Api Version Set Contract details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param description: Description of API Version Set. + :type description: str + :param version_query_name: Name of query parameter that indicates the API + Version if versioningScheme is set to `query`. + :type version_query_name: str + :param version_header_name: Name of HTTP header parameter that indicates + the API Version if versioningScheme is set to `header`. + :type version_header_name: str + :param display_name: Required. Name of API Version Set + :type display_name: str + :param versioning_scheme: Required. An value that determines where the API + Version identifer will be located in a HTTP request. Possible values + include: 'Segment', 'Query', 'Header' + :type versioning_scheme: str or + ~azure.mgmt.apimanagement.models.VersioningScheme + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'version_query_name': {'max_length': 100, 'min_length': 1}, + 'version_header_name': {'max_length': 100, 'min_length': 1}, + 'display_name': {'required': True, 'max_length': 100, 'min_length': 1}, + 'versioning_scheme': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'version_query_name': {'key': 'properties.versionQueryName', 'type': 'str'}, + 'version_header_name': {'key': 'properties.versionHeaderName', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'versioning_scheme': {'key': 'properties.versioningScheme', 'type': 'str'}, + } + + def __init__(self, *, display_name: str, versioning_scheme, description: str=None, version_query_name: str=None, version_header_name: str=None, **kwargs) -> None: + super(ApiVersionSetContract, self).__init__(**kwargs) + self.description = description + self.version_query_name = version_query_name + self.version_header_name = version_header_name + self.display_name = display_name + self.versioning_scheme = versioning_scheme + + +class ApiVersionSetContractDetails(Model): + """An API Version Set contains the common configuration for a set of API + Versions relating . + + :param id: Identifier for existing API Version Set. Omit this value to + create a new Version Set. + :type id: str + :param name: The display Name of the API Version Set. + :type name: str + :param description: Description of API Version Set. + :type description: str + :param versioning_scheme: An value that determines where the API Version + identifer will be located in a HTTP request. Possible values include: + 'Segment', 'Query', 'Header' + :type versioning_scheme: str or ~azure.mgmt.apimanagement.models.enum + :param version_query_name: Name of query parameter that indicates the API + Version if versioningScheme is set to `query`. + :type version_query_name: str + :param version_header_name: Name of HTTP header parameter that indicates + the API Version if versioningScheme is set to `header`. + :type version_header_name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'versioning_scheme': {'key': 'versioningScheme', 'type': 'str'}, + 'version_query_name': {'key': 'versionQueryName', 'type': 'str'}, + 'version_header_name': {'key': 'versionHeaderName', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, description: str=None, versioning_scheme=None, version_query_name: str=None, version_header_name: str=None, **kwargs) -> None: + super(ApiVersionSetContractDetails, self).__init__(**kwargs) + self.id = id + self.name = name + self.description = description + self.versioning_scheme = versioning_scheme + self.version_query_name = version_query_name + self.version_header_name = version_header_name + + +class ApiVersionSetEntityBase(Model): + """Api Version set base parameters. + + :param description: Description of API Version Set. + :type description: str + :param version_query_name: Name of query parameter that indicates the API + Version if versioningScheme is set to `query`. + :type version_query_name: str + :param version_header_name: Name of HTTP header parameter that indicates + the API Version if versioningScheme is set to `header`. + :type version_header_name: str + """ + + _validation = { + 'version_query_name': {'max_length': 100, 'min_length': 1}, + 'version_header_name': {'max_length': 100, 'min_length': 1}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'version_query_name': {'key': 'versionQueryName', 'type': 'str'}, + 'version_header_name': {'key': 'versionHeaderName', 'type': 'str'}, + } + + def __init__(self, *, description: str=None, version_query_name: str=None, version_header_name: str=None, **kwargs) -> None: + super(ApiVersionSetEntityBase, self).__init__(**kwargs) + self.description = description + self.version_query_name = version_query_name + self.version_header_name = version_header_name + + +class ApiVersionSetUpdateParameters(Model): + """Parameters to update or create an Api Version Set Contract. + + :param description: Description of API Version Set. + :type description: str + :param version_query_name: Name of query parameter that indicates the API + Version if versioningScheme is set to `query`. + :type version_query_name: str + :param version_header_name: Name of HTTP header parameter that indicates + the API Version if versioningScheme is set to `header`. + :type version_header_name: str + :param display_name: Name of API Version Set + :type display_name: str + :param versioning_scheme: An value that determines where the API Version + identifer will be located in a HTTP request. Possible values include: + 'Segment', 'Query', 'Header' + :type versioning_scheme: str or + ~azure.mgmt.apimanagement.models.VersioningScheme + """ + + _validation = { + 'version_query_name': {'max_length': 100, 'min_length': 1}, + 'version_header_name': {'max_length': 100, 'min_length': 1}, + 'display_name': {'max_length': 100, 'min_length': 1}, + } + + _attribute_map = { + 'description': {'key': 'properties.description', 'type': 'str'}, + 'version_query_name': {'key': 'properties.versionQueryName', 'type': 'str'}, + 'version_header_name': {'key': 'properties.versionHeaderName', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'versioning_scheme': {'key': 'properties.versioningScheme', 'type': 'str'}, + } + + def __init__(self, *, description: str=None, version_query_name: str=None, version_header_name: str=None, display_name: str=None, versioning_scheme=None, **kwargs) -> None: + super(ApiVersionSetUpdateParameters, self).__init__(**kwargs) + self.description = description + self.version_query_name = version_query_name + self.version_header_name = version_header_name + self.display_name = display_name + self.versioning_scheme = versioning_scheme + + +class AuthenticationSettingsContract(Model): + """API Authentication Settings. + + :param o_auth2: OAuth2 Authentication settings + :type o_auth2: + ~azure.mgmt.apimanagement.models.OAuth2AuthenticationSettingsContract + :param openid: OpenID Connect Authentication Settings + :type openid: + ~azure.mgmt.apimanagement.models.OpenIdAuthenticationSettingsContract + :param subscription_key_required: Specifies whether subscription key is + required during call to this API, true - API is included into closed + products only, false - API is included into open products alone, null - + there is a mix of products. + :type subscription_key_required: bool + """ + + _attribute_map = { + 'o_auth2': {'key': 'oAuth2', 'type': 'OAuth2AuthenticationSettingsContract'}, + 'openid': {'key': 'openid', 'type': 'OpenIdAuthenticationSettingsContract'}, + 'subscription_key_required': {'key': 'subscriptionKeyRequired', 'type': 'bool'}, + } + + def __init__(self, *, o_auth2=None, openid=None, subscription_key_required: bool=None, **kwargs) -> None: + super(AuthenticationSettingsContract, self).__init__(**kwargs) + self.o_auth2 = o_auth2 + self.openid = openid + self.subscription_key_required = subscription_key_required + + +class AuthorizationServerContract(Resource): + """External OAuth authorization server settings. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param description: Description of the authorization server. Can contain + HTML formatting tags. + :type description: str + :param authorization_methods: HTTP verbs supported by the authorization + endpoint. GET must be always present. POST is optional. + :type authorization_methods: list[str or + ~azure.mgmt.apimanagement.models.AuthorizationMethod] + :param client_authentication_method: Method of authentication supported by + the token endpoint of this authorization server. Possible values are Basic + and/or Body. When Body is specified, client credentials and other + parameters are passed within the request body in the + application/x-www-form-urlencoded format. + :type client_authentication_method: list[str or + ~azure.mgmt.apimanagement.models.ClientAuthenticationMethod] + :param token_body_parameters: Additional parameters required by the token + endpoint of this authorization server represented as an array of JSON + objects with name and value string properties, i.e. {"name" : "name + value", "value": "a value"}. + :type token_body_parameters: + list[~azure.mgmt.apimanagement.models.TokenBodyParameterContract] + :param token_endpoint: OAuth token endpoint. Contains absolute URI to + entity being referenced. + :type token_endpoint: str + :param support_state: If true, authorization server will include state + parameter from the authorization request to its response. Client may use + state parameter to raise protocol security. + :type support_state: bool + :param default_scope: Access token scope that is going to be requested by + default. Can be overridden at the API level. Should be provided in the + form of a string containing space-delimited values. + :type default_scope: str + :param bearer_token_sending_methods: Specifies the mechanism by which + access token is passed to the API. + :type bearer_token_sending_methods: list[str or + ~azure.mgmt.apimanagement.models.BearerTokenSendingMethod] + :param client_secret: Client or app secret registered with this + authorization server. + :type client_secret: str + :param resource_owner_username: Can be optionally specified when resource + owner password grant type is supported by this authorization server. + Default resource owner username. + :type resource_owner_username: str + :param resource_owner_password: Can be optionally specified when resource + owner password grant type is supported by this authorization server. + Default resource owner password. + :type resource_owner_password: str + :param display_name: Required. User-friendly authorization server name. + :type display_name: str + :param client_registration_endpoint: Required. Optional reference to a + page where client or app registration for this authorization server is + performed. Contains absolute URL to entity being referenced. + :type client_registration_endpoint: str + :param authorization_endpoint: Required. OAuth authorization endpoint. See + http://tools.ietf.org/html/rfc6749#section-3.2. + :type authorization_endpoint: str + :param grant_types: Required. Form of an authorization grant, which the + client uses to request the access token. + :type grant_types: list[str or ~azure.mgmt.apimanagement.models.GrantType] + :param client_id: Required. Client or app id registered with this + authorization server. + :type client_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'required': True, 'max_length': 50, 'min_length': 1}, + 'client_registration_endpoint': {'required': True}, + 'authorization_endpoint': {'required': True}, + 'grant_types': {'required': True}, + 'client_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'authorization_methods': {'key': 'properties.authorizationMethods', 'type': '[AuthorizationMethod]'}, + 'client_authentication_method': {'key': 'properties.clientAuthenticationMethod', 'type': '[str]'}, + 'token_body_parameters': {'key': 'properties.tokenBodyParameters', 'type': '[TokenBodyParameterContract]'}, + 'token_endpoint': {'key': 'properties.tokenEndpoint', 'type': 'str'}, + 'support_state': {'key': 'properties.supportState', 'type': 'bool'}, + 'default_scope': {'key': 'properties.defaultScope', 'type': 'str'}, + 'bearer_token_sending_methods': {'key': 'properties.bearerTokenSendingMethods', 'type': '[str]'}, + 'client_secret': {'key': 'properties.clientSecret', 'type': 'str'}, + 'resource_owner_username': {'key': 'properties.resourceOwnerUsername', 'type': 'str'}, + 'resource_owner_password': {'key': 'properties.resourceOwnerPassword', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'client_registration_endpoint': {'key': 'properties.clientRegistrationEndpoint', 'type': 'str'}, + 'authorization_endpoint': {'key': 'properties.authorizationEndpoint', 'type': 'str'}, + 'grant_types': {'key': 'properties.grantTypes', 'type': '[str]'}, + 'client_id': {'key': 'properties.clientId', 'type': 'str'}, + } + + def __init__(self, *, display_name: str, client_registration_endpoint: str, authorization_endpoint: str, grant_types, client_id: str, description: str=None, authorization_methods=None, client_authentication_method=None, token_body_parameters=None, token_endpoint: str=None, support_state: bool=None, default_scope: str=None, bearer_token_sending_methods=None, client_secret: str=None, resource_owner_username: str=None, resource_owner_password: str=None, **kwargs) -> None: + super(AuthorizationServerContract, self).__init__(**kwargs) + self.description = description + self.authorization_methods = authorization_methods + self.client_authentication_method = client_authentication_method + self.token_body_parameters = token_body_parameters + self.token_endpoint = token_endpoint + self.support_state = support_state + self.default_scope = default_scope + self.bearer_token_sending_methods = bearer_token_sending_methods + self.client_secret = client_secret + self.resource_owner_username = resource_owner_username + self.resource_owner_password = resource_owner_password + self.display_name = display_name + self.client_registration_endpoint = client_registration_endpoint + self.authorization_endpoint = authorization_endpoint + self.grant_types = grant_types + self.client_id = client_id + + +class AuthorizationServerContractBaseProperties(Model): + """External OAuth authorization server Update settings contract. + + :param description: Description of the authorization server. Can contain + HTML formatting tags. + :type description: str + :param authorization_methods: HTTP verbs supported by the authorization + endpoint. GET must be always present. POST is optional. + :type authorization_methods: list[str or + ~azure.mgmt.apimanagement.models.AuthorizationMethod] + :param client_authentication_method: Method of authentication supported by + the token endpoint of this authorization server. Possible values are Basic + and/or Body. When Body is specified, client credentials and other + parameters are passed within the request body in the + application/x-www-form-urlencoded format. + :type client_authentication_method: list[str or + ~azure.mgmt.apimanagement.models.ClientAuthenticationMethod] + :param token_body_parameters: Additional parameters required by the token + endpoint of this authorization server represented as an array of JSON + objects with name and value string properties, i.e. {"name" : "name + value", "value": "a value"}. + :type token_body_parameters: + list[~azure.mgmt.apimanagement.models.TokenBodyParameterContract] + :param token_endpoint: OAuth token endpoint. Contains absolute URI to + entity being referenced. + :type token_endpoint: str + :param support_state: If true, authorization server will include state + parameter from the authorization request to its response. Client may use + state parameter to raise protocol security. + :type support_state: bool + :param default_scope: Access token scope that is going to be requested by + default. Can be overridden at the API level. Should be provided in the + form of a string containing space-delimited values. + :type default_scope: str + :param bearer_token_sending_methods: Specifies the mechanism by which + access token is passed to the API. + :type bearer_token_sending_methods: list[str or + ~azure.mgmt.apimanagement.models.BearerTokenSendingMethod] + :param client_secret: Client or app secret registered with this + authorization server. + :type client_secret: str + :param resource_owner_username: Can be optionally specified when resource + owner password grant type is supported by this authorization server. + Default resource owner username. + :type resource_owner_username: str + :param resource_owner_password: Can be optionally specified when resource + owner password grant type is supported by this authorization server. + Default resource owner password. + :type resource_owner_password: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'authorization_methods': {'key': 'authorizationMethods', 'type': '[AuthorizationMethod]'}, + 'client_authentication_method': {'key': 'clientAuthenticationMethod', 'type': '[str]'}, + 'token_body_parameters': {'key': 'tokenBodyParameters', 'type': '[TokenBodyParameterContract]'}, + 'token_endpoint': {'key': 'tokenEndpoint', 'type': 'str'}, + 'support_state': {'key': 'supportState', 'type': 'bool'}, + 'default_scope': {'key': 'defaultScope', 'type': 'str'}, + 'bearer_token_sending_methods': {'key': 'bearerTokenSendingMethods', 'type': '[str]'}, + 'client_secret': {'key': 'clientSecret', 'type': 'str'}, + 'resource_owner_username': {'key': 'resourceOwnerUsername', 'type': 'str'}, + 'resource_owner_password': {'key': 'resourceOwnerPassword', 'type': 'str'}, + } + + def __init__(self, *, description: str=None, authorization_methods=None, client_authentication_method=None, token_body_parameters=None, token_endpoint: str=None, support_state: bool=None, default_scope: str=None, bearer_token_sending_methods=None, client_secret: str=None, resource_owner_username: str=None, resource_owner_password: str=None, **kwargs) -> None: + super(AuthorizationServerContractBaseProperties, self).__init__(**kwargs) + self.description = description + self.authorization_methods = authorization_methods + self.client_authentication_method = client_authentication_method + self.token_body_parameters = token_body_parameters + self.token_endpoint = token_endpoint + self.support_state = support_state + self.default_scope = default_scope + self.bearer_token_sending_methods = bearer_token_sending_methods + self.client_secret = client_secret + self.resource_owner_username = resource_owner_username + self.resource_owner_password = resource_owner_password + + +class AuthorizationServerUpdateContract(Resource): + """External OAuth authorization server settings. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param description: Description of the authorization server. Can contain + HTML formatting tags. + :type description: str + :param authorization_methods: HTTP verbs supported by the authorization + endpoint. GET must be always present. POST is optional. + :type authorization_methods: list[str or + ~azure.mgmt.apimanagement.models.AuthorizationMethod] + :param client_authentication_method: Method of authentication supported by + the token endpoint of this authorization server. Possible values are Basic + and/or Body. When Body is specified, client credentials and other + parameters are passed within the request body in the + application/x-www-form-urlencoded format. + :type client_authentication_method: list[str or + ~azure.mgmt.apimanagement.models.ClientAuthenticationMethod] + :param token_body_parameters: Additional parameters required by the token + endpoint of this authorization server represented as an array of JSON + objects with name and value string properties, i.e. {"name" : "name + value", "value": "a value"}. + :type token_body_parameters: + list[~azure.mgmt.apimanagement.models.TokenBodyParameterContract] + :param token_endpoint: OAuth token endpoint. Contains absolute URI to + entity being referenced. + :type token_endpoint: str + :param support_state: If true, authorization server will include state + parameter from the authorization request to its response. Client may use + state parameter to raise protocol security. + :type support_state: bool + :param default_scope: Access token scope that is going to be requested by + default. Can be overridden at the API level. Should be provided in the + form of a string containing space-delimited values. + :type default_scope: str + :param bearer_token_sending_methods: Specifies the mechanism by which + access token is passed to the API. + :type bearer_token_sending_methods: list[str or + ~azure.mgmt.apimanagement.models.BearerTokenSendingMethod] + :param client_secret: Client or app secret registered with this + authorization server. + :type client_secret: str + :param resource_owner_username: Can be optionally specified when resource + owner password grant type is supported by this authorization server. + Default resource owner username. + :type resource_owner_username: str + :param resource_owner_password: Can be optionally specified when resource + owner password grant type is supported by this authorization server. + Default resource owner password. + :type resource_owner_password: str + :param display_name: User-friendly authorization server name. + :type display_name: str + :param client_registration_endpoint: Optional reference to a page where + client or app registration for this authorization server is performed. + Contains absolute URL to entity being referenced. + :type client_registration_endpoint: str + :param authorization_endpoint: OAuth authorization endpoint. See + http://tools.ietf.org/html/rfc6749#section-3.2. + :type authorization_endpoint: str + :param grant_types: Form of an authorization grant, which the client uses + to request the access token. + :type grant_types: list[str or ~azure.mgmt.apimanagement.models.GrantType] + :param client_id: Client or app id registered with this authorization + server. + :type client_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'max_length': 50, 'min_length': 1}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'authorization_methods': {'key': 'properties.authorizationMethods', 'type': '[AuthorizationMethod]'}, + 'client_authentication_method': {'key': 'properties.clientAuthenticationMethod', 'type': '[str]'}, + 'token_body_parameters': {'key': 'properties.tokenBodyParameters', 'type': '[TokenBodyParameterContract]'}, + 'token_endpoint': {'key': 'properties.tokenEndpoint', 'type': 'str'}, + 'support_state': {'key': 'properties.supportState', 'type': 'bool'}, + 'default_scope': {'key': 'properties.defaultScope', 'type': 'str'}, + 'bearer_token_sending_methods': {'key': 'properties.bearerTokenSendingMethods', 'type': '[str]'}, + 'client_secret': {'key': 'properties.clientSecret', 'type': 'str'}, + 'resource_owner_username': {'key': 'properties.resourceOwnerUsername', 'type': 'str'}, + 'resource_owner_password': {'key': 'properties.resourceOwnerPassword', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'client_registration_endpoint': {'key': 'properties.clientRegistrationEndpoint', 'type': 'str'}, + 'authorization_endpoint': {'key': 'properties.authorizationEndpoint', 'type': 'str'}, + 'grant_types': {'key': 'properties.grantTypes', 'type': '[str]'}, + 'client_id': {'key': 'properties.clientId', 'type': 'str'}, + } + + def __init__(self, *, description: str=None, authorization_methods=None, client_authentication_method=None, token_body_parameters=None, token_endpoint: str=None, support_state: bool=None, default_scope: str=None, bearer_token_sending_methods=None, client_secret: str=None, resource_owner_username: str=None, resource_owner_password: str=None, display_name: str=None, client_registration_endpoint: str=None, authorization_endpoint: str=None, grant_types=None, client_id: str=None, **kwargs) -> None: + super(AuthorizationServerUpdateContract, self).__init__(**kwargs) + self.description = description + self.authorization_methods = authorization_methods + self.client_authentication_method = client_authentication_method + self.token_body_parameters = token_body_parameters + self.token_endpoint = token_endpoint + self.support_state = support_state + self.default_scope = default_scope + self.bearer_token_sending_methods = bearer_token_sending_methods + self.client_secret = client_secret + self.resource_owner_username = resource_owner_username + self.resource_owner_password = resource_owner_password + self.display_name = display_name + self.client_registration_endpoint = client_registration_endpoint + self.authorization_endpoint = authorization_endpoint + self.grant_types = grant_types + self.client_id = client_id + + +class BackendAuthorizationHeaderCredentials(Model): + """Authorization header information. + + All required parameters must be populated in order to send to Azure. + + :param scheme: Required. Authentication Scheme name. + :type scheme: str + :param parameter: Required. Authentication Parameter value. + :type parameter: str + """ + + _validation = { + 'scheme': {'required': True, 'max_length': 100, 'min_length': 1}, + 'parameter': {'required': True, 'max_length': 300, 'min_length': 1}, + } + + _attribute_map = { + 'scheme': {'key': 'scheme', 'type': 'str'}, + 'parameter': {'key': 'parameter', 'type': 'str'}, + } + + def __init__(self, *, scheme: str, parameter: str, **kwargs) -> None: + super(BackendAuthorizationHeaderCredentials, self).__init__(**kwargs) + self.scheme = scheme + self.parameter = parameter + + +class BackendBaseParameters(Model): + """Backend entity base Parameter set. + + :param title: Backend Title. + :type title: str + :param description: Backend Description. + :type description: str + :param resource_id: Management Uri of the Resource in External System. + This url can be the Arm Resource Id of Logic Apps, Function Apps or Api + Apps. + :type resource_id: str + :param properties: Backend Properties contract + :type properties: ~azure.mgmt.apimanagement.models.BackendProperties + :param credentials: Backend Credentials Contract Properties + :type credentials: + ~azure.mgmt.apimanagement.models.BackendCredentialsContract + :param proxy: Backend Proxy Contract Properties + :type proxy: ~azure.mgmt.apimanagement.models.BackendProxyContract + :param tls: Backend TLS Properties + :type tls: ~azure.mgmt.apimanagement.models.BackendTlsProperties + """ + + _validation = { + 'title': {'max_length': 300, 'min_length': 1}, + 'description': {'max_length': 2000, 'min_length': 1}, + 'resource_id': {'max_length': 2000, 'min_length': 1}, + } + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'BackendProperties'}, + 'credentials': {'key': 'credentials', 'type': 'BackendCredentialsContract'}, + 'proxy': {'key': 'proxy', 'type': 'BackendProxyContract'}, + 'tls': {'key': 'tls', 'type': 'BackendTlsProperties'}, + } + + def __init__(self, *, title: str=None, description: str=None, resource_id: str=None, properties=None, credentials=None, proxy=None, tls=None, **kwargs) -> None: + super(BackendBaseParameters, self).__init__(**kwargs) + self.title = title + self.description = description + self.resource_id = resource_id + self.properties = properties + self.credentials = credentials + self.proxy = proxy + self.tls = tls + + +class BackendContract(Resource): + """Backend details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param title: Backend Title. + :type title: str + :param description: Backend Description. + :type description: str + :param resource_id: Management Uri of the Resource in External System. + This url can be the Arm Resource Id of Logic Apps, Function Apps or Api + Apps. + :type resource_id: str + :param properties: Backend Properties contract + :type properties: ~azure.mgmt.apimanagement.models.BackendProperties + :param credentials: Backend Credentials Contract Properties + :type credentials: + ~azure.mgmt.apimanagement.models.BackendCredentialsContract + :param proxy: Backend Proxy Contract Properties + :type proxy: ~azure.mgmt.apimanagement.models.BackendProxyContract + :param tls: Backend TLS Properties + :type tls: ~azure.mgmt.apimanagement.models.BackendTlsProperties + :param url: Required. Runtime Url of the Backend. + :type url: str + :param protocol: Required. Backend communication protocol. Possible values + include: 'http', 'soap' + :type protocol: str or ~azure.mgmt.apimanagement.models.BackendProtocol + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'title': {'max_length': 300, 'min_length': 1}, + 'description': {'max_length': 2000, 'min_length': 1}, + 'resource_id': {'max_length': 2000, 'min_length': 1}, + 'url': {'required': True, 'max_length': 2000, 'min_length': 1}, + 'protocol': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, + 'properties': {'key': 'properties.properties', 'type': 'BackendProperties'}, + 'credentials': {'key': 'properties.credentials', 'type': 'BackendCredentialsContract'}, + 'proxy': {'key': 'properties.proxy', 'type': 'BackendProxyContract'}, + 'tls': {'key': 'properties.tls', 'type': 'BackendTlsProperties'}, + 'url': {'key': 'properties.url', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + } + + def __init__(self, *, url: str, protocol, title: str=None, description: str=None, resource_id: str=None, properties=None, credentials=None, proxy=None, tls=None, **kwargs) -> None: + super(BackendContract, self).__init__(**kwargs) + self.title = title + self.description = description + self.resource_id = resource_id + self.properties = properties + self.credentials = credentials + self.proxy = proxy + self.tls = tls + self.url = url + self.protocol = protocol + + +class BackendCredentialsContract(Model): + """Details of the Credentials used to connect to Backend. + + :param certificate: List of Client Certificate Thumbprint. + :type certificate: list[str] + :param query: Query Parameter description. + :type query: dict[str, list[str]] + :param header: Header Parameter description. + :type header: dict[str, list[str]] + :param authorization: Authorization header authentication + :type authorization: + ~azure.mgmt.apimanagement.models.BackendAuthorizationHeaderCredentials + """ + + _validation = { + 'certificate': {'max_items': 32}, + } + + _attribute_map = { + 'certificate': {'key': 'certificate', 'type': '[str]'}, + 'query': {'key': 'query', 'type': '{[str]}'}, + 'header': {'key': 'header', 'type': '{[str]}'}, + 'authorization': {'key': 'authorization', 'type': 'BackendAuthorizationHeaderCredentials'}, + } + + def __init__(self, *, certificate=None, query=None, header=None, authorization=None, **kwargs) -> None: + super(BackendCredentialsContract, self).__init__(**kwargs) + self.certificate = certificate + self.query = query + self.header = header + self.authorization = authorization + + +class BackendProperties(Model): + """Properties specific to the Backend Type. + + :param service_fabric_cluster: Backend Service Fabric Cluster Properties + :type service_fabric_cluster: + ~azure.mgmt.apimanagement.models.BackendServiceFabricClusterProperties + """ + + _attribute_map = { + 'service_fabric_cluster': {'key': 'serviceFabricCluster', 'type': 'BackendServiceFabricClusterProperties'}, + } + + def __init__(self, *, service_fabric_cluster=None, **kwargs) -> None: + super(BackendProperties, self).__init__(**kwargs) + self.service_fabric_cluster = service_fabric_cluster + + +class BackendProxyContract(Model): + """Details of the Backend WebProxy Server to use in the Request to Backend. + + All required parameters must be populated in order to send to Azure. + + :param url: Required. WebProxy Server AbsoluteUri property which includes + the entire URI stored in the Uri instance, including all fragments and + query strings. + :type url: str + :param username: Username to connect to the WebProxy server + :type username: str + :param password: Password to connect to the WebProxy Server + :type password: str + """ + + _validation = { + 'url': {'required': True, 'max_length': 2000, 'min_length': 1}, + } + + _attribute_map = { + 'url': {'key': 'url', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__(self, *, url: str, username: str=None, password: str=None, **kwargs) -> None: + super(BackendProxyContract, self).__init__(**kwargs) + self.url = url + self.username = username + self.password = password + + +class BackendReconnectContract(Resource): + """Reconnect request parameters. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param after: Duration in ISO8601 format after which reconnect will be + initiated. Minimum duration of the Reconnect is PT2M. + :type after: timedelta + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'after': {'key': 'properties.after', 'type': 'duration'}, + } + + def __init__(self, *, after=None, **kwargs) -> None: + super(BackendReconnectContract, self).__init__(**kwargs) + self.after = after + + +class BackendServiceFabricClusterProperties(Model): + """Properties of the Service Fabric Type Backend. + + All required parameters must be populated in order to send to Azure. + + :param client_certificatethumbprint: Required. The client certificate + thumbprint for the management endpoint. + :type client_certificatethumbprint: str + :param max_partition_resolution_retries: Maximum number of retries while + attempting resolve the partition. + :type max_partition_resolution_retries: int + :param management_endpoints: Required. The cluster management endpoint. + :type management_endpoints: list[str] + :param server_certificate_thumbprints: Thumbprints of certificates cluster + management service uses for tls communication + :type server_certificate_thumbprints: list[str] + :param server_x509_names: Server X509 Certificate Names Collection + :type server_x509_names: + list[~azure.mgmt.apimanagement.models.X509CertificateName] + """ + + _validation = { + 'client_certificatethumbprint': {'required': True}, + 'management_endpoints': {'required': True}, + } + + _attribute_map = { + 'client_certificatethumbprint': {'key': 'clientCertificatethumbprint', 'type': 'str'}, + 'max_partition_resolution_retries': {'key': 'maxPartitionResolutionRetries', 'type': 'int'}, + 'management_endpoints': {'key': 'managementEndpoints', 'type': '[str]'}, + 'server_certificate_thumbprints': {'key': 'serverCertificateThumbprints', 'type': '[str]'}, + 'server_x509_names': {'key': 'serverX509Names', 'type': '[X509CertificateName]'}, + } + + def __init__(self, *, client_certificatethumbprint: str, management_endpoints, max_partition_resolution_retries: int=None, server_certificate_thumbprints=None, server_x509_names=None, **kwargs) -> None: + super(BackendServiceFabricClusterProperties, self).__init__(**kwargs) + self.client_certificatethumbprint = client_certificatethumbprint + self.max_partition_resolution_retries = max_partition_resolution_retries + self.management_endpoints = management_endpoints + self.server_certificate_thumbprints = server_certificate_thumbprints + self.server_x509_names = server_x509_names + + +class BackendTlsProperties(Model): + """Properties controlling TLS Certificate Validation. + + :param validate_certificate_chain: Flag indicating whether SSL certificate + chain validation should be done when using self-signed certificates for + this backend host. Default value: True . + :type validate_certificate_chain: bool + :param validate_certificate_name: Flag indicating whether SSL certificate + name validation should be done when using self-signed certificates for + this backend host. Default value: True . + :type validate_certificate_name: bool + """ + + _attribute_map = { + 'validate_certificate_chain': {'key': 'validateCertificateChain', 'type': 'bool'}, + 'validate_certificate_name': {'key': 'validateCertificateName', 'type': 'bool'}, + } + + def __init__(self, *, validate_certificate_chain: bool=True, validate_certificate_name: bool=True, **kwargs) -> None: + super(BackendTlsProperties, self).__init__(**kwargs) + self.validate_certificate_chain = validate_certificate_chain + self.validate_certificate_name = validate_certificate_name + + +class BackendUpdateParameters(Model): + """Backend update parameters. + + :param title: Backend Title. + :type title: str + :param description: Backend Description. + :type description: str + :param resource_id: Management Uri of the Resource in External System. + This url can be the Arm Resource Id of Logic Apps, Function Apps or Api + Apps. + :type resource_id: str + :param properties: Backend Properties contract + :type properties: ~azure.mgmt.apimanagement.models.BackendProperties + :param credentials: Backend Credentials Contract Properties + :type credentials: + ~azure.mgmt.apimanagement.models.BackendCredentialsContract + :param proxy: Backend Proxy Contract Properties + :type proxy: ~azure.mgmt.apimanagement.models.BackendProxyContract + :param tls: Backend TLS Properties + :type tls: ~azure.mgmt.apimanagement.models.BackendTlsProperties + :param url: Runtime Url of the Backend. + :type url: str + :param protocol: Backend communication protocol. Possible values include: + 'http', 'soap' + :type protocol: str or ~azure.mgmt.apimanagement.models.BackendProtocol + """ + + _validation = { + 'title': {'max_length': 300, 'min_length': 1}, + 'description': {'max_length': 2000, 'min_length': 1}, + 'resource_id': {'max_length': 2000, 'min_length': 1}, + 'url': {'max_length': 2000, 'min_length': 1}, + } + + _attribute_map = { + 'title': {'key': 'properties.title', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, + 'properties': {'key': 'properties.properties', 'type': 'BackendProperties'}, + 'credentials': {'key': 'properties.credentials', 'type': 'BackendCredentialsContract'}, + 'proxy': {'key': 'properties.proxy', 'type': 'BackendProxyContract'}, + 'tls': {'key': 'properties.tls', 'type': 'BackendTlsProperties'}, + 'url': {'key': 'properties.url', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + } + + def __init__(self, *, title: str=None, description: str=None, resource_id: str=None, properties=None, credentials=None, proxy=None, tls=None, url: str=None, protocol=None, **kwargs) -> None: + super(BackendUpdateParameters, self).__init__(**kwargs) + self.title = title + self.description = description + self.resource_id = resource_id + self.properties = properties + self.credentials = credentials + self.proxy = proxy + self.tls = tls + self.url = url + self.protocol = protocol + + +class BodyDiagnosticSettings(Model): + """Body logging settings. + + :param bytes: Number of request body bytes to log. + :type bytes: int + """ + + _validation = { + 'bytes': {'maximum': 8192}, + } + + _attribute_map = { + 'bytes': {'key': 'bytes', 'type': 'int'}, + } + + def __init__(self, *, bytes: int=None, **kwargs) -> None: + super(BodyDiagnosticSettings, self).__init__(**kwargs) + self.bytes = bytes + + +class CacheContract(Resource): + """Cache details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param description: Cache description + :type description: str + :param connection_string: Required. Runtime connection string to cache + :type connection_string: str + :param resource_id: Original uri of entity in external system cache points + to + :type resource_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'max_length': 2000}, + 'connection_string': {'required': True, 'max_length': 300}, + 'resource_id': {'max_length': 2000}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'connection_string': {'key': 'properties.connectionString', 'type': 'str'}, + 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, + } + + def __init__(self, *, connection_string: str, description: str=None, resource_id: str=None, **kwargs) -> None: + super(CacheContract, self).__init__(**kwargs) + self.description = description + self.connection_string = connection_string + self.resource_id = resource_id + + +class CacheUpdateParameters(Model): + """Cache update details. + + :param description: Cache description + :type description: str + :param connection_string: Runtime connection string to cache + :type connection_string: str + :param resource_id: Original uri of entity in external system cache points + to + :type resource_id: str + """ + + _validation = { + 'description': {'max_length': 2000}, + 'connection_string': {'max_length': 300}, + 'resource_id': {'max_length': 2000}, + } + + _attribute_map = { + 'description': {'key': 'properties.description', 'type': 'str'}, + 'connection_string': {'key': 'properties.connectionString', 'type': 'str'}, + 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, + } + + def __init__(self, *, description: str=None, connection_string: str=None, resource_id: str=None, **kwargs) -> None: + super(CacheUpdateParameters, self).__init__(**kwargs) + self.description = description + self.connection_string = connection_string + self.resource_id = resource_id + + +class CertificateConfiguration(Model): + """Certificate configuration which consist of non-trusted intermediates and + root certificates. + + All required parameters must be populated in order to send to Azure. + + :param encoded_certificate: Base64 Encoded certificate. + :type encoded_certificate: str + :param certificate_password: Certificate Password. + :type certificate_password: str + :param store_name: Required. The + System.Security.Cryptography.x509certificates.StoreName certificate store + location. Only Root and CertificateAuthority are valid locations. Possible + values include: 'CertificateAuthority', 'Root' + :type store_name: str or ~azure.mgmt.apimanagement.models.enum + :param certificate: Certificate information. + :type certificate: ~azure.mgmt.apimanagement.models.CertificateInformation + """ + + _validation = { + 'store_name': {'required': True}, + } + + _attribute_map = { + 'encoded_certificate': {'key': 'encodedCertificate', 'type': 'str'}, + 'certificate_password': {'key': 'certificatePassword', 'type': 'str'}, + 'store_name': {'key': 'storeName', 'type': 'str'}, + 'certificate': {'key': 'certificate', 'type': 'CertificateInformation'}, + } + + def __init__(self, *, store_name, encoded_certificate: str=None, certificate_password: str=None, certificate=None, **kwargs) -> None: + super(CertificateConfiguration, self).__init__(**kwargs) + self.encoded_certificate = encoded_certificate + self.certificate_password = certificate_password + self.store_name = store_name + self.certificate = certificate + + +class CertificateContract(Resource): + """Certificate details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param subject: Required. Subject attribute of the certificate. + :type subject: str + :param thumbprint: Required. Thumbprint of the certificate. + :type thumbprint: str + :param expiration_date: Required. Expiration date of the certificate. The + date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified + by the ISO 8601 standard. + :type expiration_date: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'subject': {'required': True}, + 'thumbprint': {'required': True}, + 'expiration_date': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'subject': {'key': 'properties.subject', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + } + + def __init__(self, *, subject: str, thumbprint: str, expiration_date, **kwargs) -> None: + super(CertificateContract, self).__init__(**kwargs) + self.subject = subject + self.thumbprint = thumbprint + self.expiration_date = expiration_date + + +class CertificateCreateOrUpdateParameters(Model): + """Certificate create or update details. + + All required parameters must be populated in order to send to Azure. + + :param data: Required. Base 64 encoded certificate using the + application/x-pkcs12 representation. + :type data: str + :param password: Required. Password for the Certificate + :type password: str + """ + + _validation = { + 'data': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'data': {'key': 'properties.data', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + } + + def __init__(self, *, data: str, password: str, **kwargs) -> None: + super(CertificateCreateOrUpdateParameters, self).__init__(**kwargs) + self.data = data + self.password = password + + +class CertificateInformation(Model): + """SSL certificate information. + + All required parameters must be populated in order to send to Azure. + + :param expiry: Required. Expiration date of the certificate. The date + conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by + the ISO 8601 standard. + :type expiry: datetime + :param thumbprint: Required. Thumbprint of the certificate. + :type thumbprint: str + :param subject: Required. Subject of the certificate. + :type subject: str + """ + + _validation = { + 'expiry': {'required': True}, + 'thumbprint': {'required': True}, + 'subject': {'required': True}, + } + + _attribute_map = { + 'expiry': {'key': 'expiry', 'type': 'iso-8601'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'subject': {'key': 'subject', 'type': 'str'}, + } + + def __init__(self, *, expiry, thumbprint: str, subject: str, **kwargs) -> None: + super(CertificateInformation, self).__init__(**kwargs) + self.expiry = expiry + self.thumbprint = thumbprint + self.subject = subject + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ConnectivityStatusContract(Model): + """Details about connectivity to a resource. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The hostname of the resource which the service + depends on. This can be the database, storage or any other azure resource + on which the service depends upon. + :type name: str + :param status: Required. Resource Connectivity Status Type identifier. + Possible values include: 'initializing', 'success', 'failure' + :type status: str or + ~azure.mgmt.apimanagement.models.ConnectivityStatusType + :param error: Error details of the connectivity to the resource. + :type error: str + :param last_updated: Required. The date when the resource connectivity + status was last updated. This status should be updated every 15 minutes. + If this status has not been updated, then it means that the service has + lost network connectivity to the resource, from inside the Virtual + Network.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` + as specified by the ISO 8601 standard. + :type last_updated: datetime + :param last_status_change: Required. The date when the resource + connectivity status last Changed from success to failure or vice-versa. + The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as + specified by the ISO 8601 standard. + :type last_status_change: datetime + """ + + _validation = { + 'name': {'required': True, 'min_length': 1}, + 'status': {'required': True}, + 'last_updated': {'required': True}, + 'last_status_change': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'str'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, + 'last_status_change': {'key': 'lastStatusChange', 'type': 'iso-8601'}, + } + + def __init__(self, *, name: str, status, last_updated, last_status_change, error: str=None, **kwargs) -> None: + super(ConnectivityStatusContract, self).__init__(**kwargs) + self.name = name + self.status = status + self.error = error + self.last_updated = last_updated + self.last_status_change = last_status_change + + +class DeployConfigurationParameters(Model): + """Deploy Tenant Configuration Contract. + + All required parameters must be populated in order to send to Azure. + + :param branch: Required. The name of the Git branch from which the + configuration is to be deployed to the configuration database. + :type branch: str + :param force: The value enforcing deleting subscriptions to products that + are deleted in this update. + :type force: bool + """ + + _validation = { + 'branch': {'required': True}, + } + + _attribute_map = { + 'branch': {'key': 'properties.branch', 'type': 'str'}, + 'force': {'key': 'properties.force', 'type': 'bool'}, + } + + def __init__(self, *, branch: str, force: bool=None, **kwargs) -> None: + super(DeployConfigurationParameters, self).__init__(**kwargs) + self.branch = branch + self.force = force + + +class DiagnosticContract(Resource): + """Diagnostic details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param always_log: Specifies for what type of messages sampling settings + should not apply. Possible values include: 'allErrors' + :type always_log: str or ~azure.mgmt.apimanagement.models.AlwaysLog + :param logger_id: Required. Resource Id of a target logger. + :type logger_id: str + :param sampling: Sampling settings for Diagnostic. + :type sampling: ~azure.mgmt.apimanagement.models.SamplingSettings + :param frontend: Diagnostic settings for incoming/outgoing HTTP messages + to the Gateway. + :type frontend: + ~azure.mgmt.apimanagement.models.PipelineDiagnosticSettings + :param backend: Diagnostic settings for incoming/outgoing HTTP messages to + the Backend + :type backend: ~azure.mgmt.apimanagement.models.PipelineDiagnosticSettings + :param enable_http_correlation_headers: Whether to process Correlation + Headers coming to Api Management Service. Only applicable to Application + Insights diagnostics. Default is true. + :type enable_http_correlation_headers: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'logger_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'always_log': {'key': 'properties.alwaysLog', 'type': 'str'}, + 'logger_id': {'key': 'properties.loggerId', 'type': 'str'}, + 'sampling': {'key': 'properties.sampling', 'type': 'SamplingSettings'}, + 'frontend': {'key': 'properties.frontend', 'type': 'PipelineDiagnosticSettings'}, + 'backend': {'key': 'properties.backend', 'type': 'PipelineDiagnosticSettings'}, + 'enable_http_correlation_headers': {'key': 'properties.enableHttpCorrelationHeaders', 'type': 'bool'}, + } + + def __init__(self, *, logger_id: str, always_log=None, sampling=None, frontend=None, backend=None, enable_http_correlation_headers: bool=None, **kwargs) -> None: + super(DiagnosticContract, self).__init__(**kwargs) + self.always_log = always_log + self.logger_id = logger_id + self.sampling = sampling + self.frontend = frontend + self.backend = backend + self.enable_http_correlation_headers = enable_http_correlation_headers + + +class EmailTemplateContract(Resource): + """Email Template details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param subject: Required. Subject of the Template. + :type subject: str + :param body: Required. Email Template Body. This should be a valid + XDocument + :type body: str + :param title: Title of the Template. + :type title: str + :param description: Description of the Email Template. + :type description: str + :ivar is_default: Whether the template is the default template provided by + Api Management or has been edited. + :vartype is_default: bool + :param parameters: Email Template Parameter values. + :type parameters: + list[~azure.mgmt.apimanagement.models.EmailTemplateParametersContractProperties] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'subject': {'required': True, 'max_length': 1000, 'min_length': 1}, + 'body': {'required': True, 'min_length': 1}, + 'is_default': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'subject': {'key': 'properties.subject', 'type': 'str'}, + 'body': {'key': 'properties.body', 'type': 'str'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'is_default': {'key': 'properties.isDefault', 'type': 'bool'}, + 'parameters': {'key': 'properties.parameters', 'type': '[EmailTemplateParametersContractProperties]'}, + } + + def __init__(self, *, subject: str, body: str, title: str=None, description: str=None, parameters=None, **kwargs) -> None: + super(EmailTemplateContract, self).__init__(**kwargs) + self.subject = subject + self.body = body + self.title = title + self.description = description + self.is_default = None + self.parameters = parameters + + +class EmailTemplateParametersContractProperties(Model): + """Email Template Parameter contract. + + :param name: Template parameter name. + :type name: str + :param title: Template parameter title. + :type title: str + :param description: Template parameter description. + :type description: str + """ + + _validation = { + 'name': {'max_length': 256, 'min_length': 1, 'pattern': r'^[A-Za-z0-9-._]+$'}, + 'title': {'max_length': 4096, 'min_length': 1}, + 'description': {'max_length': 256, 'min_length': 1, 'pattern': r'^[A-Za-z0-9-._]+$'}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'title': {'key': 'title', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, title: str=None, description: str=None, **kwargs) -> None: + super(EmailTemplateParametersContractProperties, self).__init__(**kwargs) + self.name = name + self.title = title + self.description = description + + +class EmailTemplateUpdateParameters(Model): + """Email Template update Parameters. + + :param subject: Subject of the Template. + :type subject: str + :param title: Title of the Template. + :type title: str + :param description: Description of the Email Template. + :type description: str + :param body: Email Template Body. This should be a valid XDocument + :type body: str + :param parameters: Email Template Parameter values. + :type parameters: + list[~azure.mgmt.apimanagement.models.EmailTemplateParametersContractProperties] + """ + + _validation = { + 'subject': {'max_length': 1000, 'min_length': 1}, + 'body': {'min_length': 1}, + } + + _attribute_map = { + 'subject': {'key': 'properties.subject', 'type': 'str'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'body': {'key': 'properties.body', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': '[EmailTemplateParametersContractProperties]'}, + } + + def __init__(self, *, subject: str=None, title: str=None, description: str=None, body: str=None, parameters=None, **kwargs) -> None: + super(EmailTemplateUpdateParameters, self).__init__(**kwargs) + self.subject = subject + self.title = title + self.description = description + self.body = body + self.parameters = parameters + + +class ErrorFieldContract(Model): + """Error Field contract. + + :param code: Property level error code. + :type code: str + :param message: Human-readable representation of property-level error. + :type message: str + :param target: Property name. + :type target: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, target: str=None, **kwargs) -> None: + super(ErrorFieldContract, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + + +class ErrorResponse(Model): + """Error Response. + + :param code: Service-defined error code. This code serves as a sub-status + for the HTTP error code specified in the response. + :type code: str + :param message: Human-readable representation of the error. + :type message: str + :param details: The list of invalid fields send in request, in case of + validation error. + :type details: list[~azure.mgmt.apimanagement.models.ErrorFieldContract] + """ + + _attribute_map = { + 'code': {'key': 'error.code', 'type': 'str'}, + 'message': {'key': 'error.message', 'type': 'str'}, + 'details': {'key': 'error.details', 'type': '[ErrorFieldContract]'}, + } + + def __init__(self, *, code: str=None, message: str=None, details=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.code = code + self.message = message + self.details = details + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class ErrorResponseBody(Model): + """Error Body contract. + + :param code: Service-defined error code. This code serves as a sub-status + for the HTTP error code specified in the response. + :type code: str + :param message: Human-readable representation of the error. + :type message: str + :param details: The list of invalid fields send in request, in case of + validation error. + :type details: list[~azure.mgmt.apimanagement.models.ErrorFieldContract] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorFieldContract]'}, + } + + def __init__(self, *, code: str=None, message: str=None, details=None, **kwargs) -> None: + super(ErrorResponseBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.details = details + + +class GenerateSsoUrlResult(Model): + """Generate SSO Url operations response details. + + :param value: Redirect Url containing the SSO URL value. + :type value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, **kwargs) -> None: + super(GenerateSsoUrlResult, self).__init__(**kwargs) + self.value = value + + +class GroupContract(Resource): + """Contract details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param display_name: Required. Group name. + :type display_name: str + :param description: Group description. Can contain HTML formatting tags. + :type description: str + :ivar built_in: true if the group is one of the three system groups + (Administrators, Developers, or Guests); otherwise false. + :vartype built_in: bool + :param group_contract_type: Group type. Possible values include: 'custom', + 'system', 'external' + :type group_contract_type: str or + ~azure.mgmt.apimanagement.models.GroupType + :param external_id: For external groups, this property contains the id of + the group from the external identity provider, e.g. for Azure Active + Directory `aad://.onmicrosoft.com/groups/`; + otherwise the value is null. + :type external_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'required': True, 'max_length': 300, 'min_length': 1}, + 'description': {'max_length': 1000}, + 'built_in': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'built_in': {'key': 'properties.builtIn', 'type': 'bool'}, + 'group_contract_type': {'key': 'properties.type', 'type': 'GroupType'}, + 'external_id': {'key': 'properties.externalId', 'type': 'str'}, + } + + def __init__(self, *, display_name: str, description: str=None, group_contract_type=None, external_id: str=None, **kwargs) -> None: + super(GroupContract, self).__init__(**kwargs) + self.display_name = display_name + self.description = description + self.built_in = None + self.group_contract_type = group_contract_type + self.external_id = external_id + + +class GroupContractProperties(Model): + """Group contract Properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param display_name: Required. Group name. + :type display_name: str + :param description: Group description. Can contain HTML formatting tags. + :type description: str + :ivar built_in: true if the group is one of the three system groups + (Administrators, Developers, or Guests); otherwise false. + :vartype built_in: bool + :param type: Group type. Possible values include: 'custom', 'system', + 'external' + :type type: str or ~azure.mgmt.apimanagement.models.GroupType + :param external_id: For external groups, this property contains the id of + the group from the external identity provider, e.g. for Azure Active + Directory `aad://.onmicrosoft.com/groups/`; + otherwise the value is null. + :type external_id: str + """ + + _validation = { + 'display_name': {'required': True, 'max_length': 300, 'min_length': 1}, + 'description': {'max_length': 1000}, + 'built_in': {'readonly': True}, + } + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'built_in': {'key': 'builtIn', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'GroupType'}, + 'external_id': {'key': 'externalId', 'type': 'str'}, + } + + def __init__(self, *, display_name: str, description: str=None, type=None, external_id: str=None, **kwargs) -> None: + super(GroupContractProperties, self).__init__(**kwargs) + self.display_name = display_name + self.description = description + self.built_in = None + self.type = type + self.external_id = external_id + + +class GroupCreateParameters(Model): + """Parameters supplied to the Create Group operation. + + All required parameters must be populated in order to send to Azure. + + :param display_name: Required. Group name. + :type display_name: str + :param description: Group description. + :type description: str + :param type: Group type. Possible values include: 'custom', 'system', + 'external' + :type type: str or ~azure.mgmt.apimanagement.models.GroupType + :param external_id: Identifier of the external groups, this property + contains the id of the group from the external identity provider, e.g. for + Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. + :type external_id: str + """ + + _validation = { + 'display_name': {'required': True, 'max_length': 300, 'min_length': 1}, + } + + _attribute_map = { + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'GroupType'}, + 'external_id': {'key': 'properties.externalId', 'type': 'str'}, + } + + def __init__(self, *, display_name: str, description: str=None, type=None, external_id: str=None, **kwargs) -> None: + super(GroupCreateParameters, self).__init__(**kwargs) + self.display_name = display_name + self.description = description + self.type = type + self.external_id = external_id + + +class GroupUpdateParameters(Model): + """Parameters supplied to the Update Group operation. + + :param display_name: Group name. + :type display_name: str + :param description: Group description. + :type description: str + :param type: Group type. Possible values include: 'custom', 'system', + 'external' + :type type: str or ~azure.mgmt.apimanagement.models.GroupType + :param external_id: Identifier of the external groups, this property + contains the id of the group from the external identity provider, e.g. for + Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. + :type external_id: str + """ + + _validation = { + 'display_name': {'max_length': 300, 'min_length': 1}, + } + + _attribute_map = { + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'GroupType'}, + 'external_id': {'key': 'properties.externalId', 'type': 'str'}, + } + + def __init__(self, *, display_name: str=None, description: str=None, type=None, external_id: str=None, **kwargs) -> None: + super(GroupUpdateParameters, self).__init__(**kwargs) + self.display_name = display_name + self.description = description + self.type = type + self.external_id = external_id + + +class HostnameConfiguration(Model): + """Custom hostname configuration. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Hostname type. Possible values include: 'Proxy', + 'Portal', 'Management', 'Scm', 'DeveloperPortal' + :type type: str or ~azure.mgmt.apimanagement.models.HostnameType + :param host_name: Required. Hostname to configure on the Api Management + service. + :type host_name: str + :param key_vault_id: Url to the KeyVault Secret containing the Ssl + Certificate. If absolute Url containing version is provided, auto-update + of ssl certificate will not work. This requires Api Management service to + be configured with MSI. The secret should be of type + *application/x-pkcs12* + :type key_vault_id: str + :param encoded_certificate: Base64 Encoded certificate. + :type encoded_certificate: str + :param certificate_password: Certificate Password. + :type certificate_password: str + :param default_ssl_binding: Specify true to setup the certificate + associated with this Hostname as the Default SSL Certificate. If a client + does not send the SNI header, then this will be the certificate that will + be challenged. The property is useful if a service has multiple custom + hostname enabled and it needs to decide on the default ssl certificate. + The setting only applied to Proxy Hostname Type. Default value: False . + :type default_ssl_binding: bool + :param negotiate_client_certificate: Specify true to always negotiate + client certificate on the hostname. Default Value is false. Default value: + False . + :type negotiate_client_certificate: bool + :param certificate: Certificate information. + :type certificate: ~azure.mgmt.apimanagement.models.CertificateInformation + """ + + _validation = { + 'type': {'required': True}, + 'host_name': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'host_name': {'key': 'hostName', 'type': 'str'}, + 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, + 'encoded_certificate': {'key': 'encodedCertificate', 'type': 'str'}, + 'certificate_password': {'key': 'certificatePassword', 'type': 'str'}, + 'default_ssl_binding': {'key': 'defaultSslBinding', 'type': 'bool'}, + 'negotiate_client_certificate': {'key': 'negotiateClientCertificate', 'type': 'bool'}, + 'certificate': {'key': 'certificate', 'type': 'CertificateInformation'}, + } + + def __init__(self, *, type, host_name: str, key_vault_id: str=None, encoded_certificate: str=None, certificate_password: str=None, default_ssl_binding: bool=False, negotiate_client_certificate: bool=False, certificate=None, **kwargs) -> None: + super(HostnameConfiguration, self).__init__(**kwargs) + self.type = type + self.host_name = host_name + self.key_vault_id = key_vault_id + self.encoded_certificate = encoded_certificate + self.certificate_password = certificate_password + self.default_ssl_binding = default_ssl_binding + self.negotiate_client_certificate = negotiate_client_certificate + self.certificate = certificate + + +class HttpMessageDiagnostic(Model): + """Http message diagnostic settings. + + :param headers: Array of HTTP Headers to log. + :type headers: list[str] + :param body: Body logging settings. + :type body: ~azure.mgmt.apimanagement.models.BodyDiagnosticSettings + """ + + _attribute_map = { + 'headers': {'key': 'headers', 'type': '[str]'}, + 'body': {'key': 'body', 'type': 'BodyDiagnosticSettings'}, + } + + def __init__(self, *, headers=None, body=None, **kwargs) -> None: + super(HttpMessageDiagnostic, self).__init__(**kwargs) + self.headers = headers + self.body = body + + +class IdentityProviderBaseParameters(Model): + """Identity Provider Base Parameter Properties. + + :param type: Identity Provider Type identifier. Possible values include: + 'facebook', 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' + :type type: str or ~azure.mgmt.apimanagement.models.IdentityProviderType + :param allowed_tenants: List of Allowed Tenants when configuring Azure + Active Directory login. + :type allowed_tenants: list[str] + :param authority: OpenID Connect discovery endpoint hostname for AAD or + AAD B2C. + :type authority: str + :param signup_policy_name: Signup Policy Name. Only applies to AAD B2C + Identity Provider. + :type signup_policy_name: str + :param signin_policy_name: Signin Policy Name. Only applies to AAD B2C + Identity Provider. + :type signin_policy_name: str + :param profile_editing_policy_name: Profile Editing Policy Name. Only + applies to AAD B2C Identity Provider. + :type profile_editing_policy_name: str + :param password_reset_policy_name: Password Reset Policy Name. Only + applies to AAD B2C Identity Provider. + :type password_reset_policy_name: str + """ + + _validation = { + 'allowed_tenants': {'max_items': 32}, + 'signup_policy_name': {'min_length': 1}, + 'signin_policy_name': {'min_length': 1}, + 'profile_editing_policy_name': {'min_length': 1}, + 'password_reset_policy_name': {'min_length': 1}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'allowed_tenants': {'key': 'allowedTenants', 'type': '[str]'}, + 'authority': {'key': 'authority', 'type': 'str'}, + 'signup_policy_name': {'key': 'signupPolicyName', 'type': 'str'}, + 'signin_policy_name': {'key': 'signinPolicyName', 'type': 'str'}, + 'profile_editing_policy_name': {'key': 'profileEditingPolicyName', 'type': 'str'}, + 'password_reset_policy_name': {'key': 'passwordResetPolicyName', 'type': 'str'}, + } + + def __init__(self, *, type=None, allowed_tenants=None, authority: str=None, signup_policy_name: str=None, signin_policy_name: str=None, profile_editing_policy_name: str=None, password_reset_policy_name: str=None, **kwargs) -> None: + super(IdentityProviderBaseParameters, self).__init__(**kwargs) + self.type = type + self.allowed_tenants = allowed_tenants + self.authority = authority + self.signup_policy_name = signup_policy_name + self.signin_policy_name = signin_policy_name + self.profile_editing_policy_name = profile_editing_policy_name + self.password_reset_policy_name = password_reset_policy_name + + +class IdentityProviderContract(Resource): + """Identity Provider details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param identity_provider_contract_type: Identity Provider Type identifier. + Possible values include: 'facebook', 'google', 'microsoft', 'twitter', + 'aad', 'aadB2C' + :type identity_provider_contract_type: str or + ~azure.mgmt.apimanagement.models.IdentityProviderType + :param allowed_tenants: List of Allowed Tenants when configuring Azure + Active Directory login. + :type allowed_tenants: list[str] + :param authority: OpenID Connect discovery endpoint hostname for AAD or + AAD B2C. + :type authority: str + :param signup_policy_name: Signup Policy Name. Only applies to AAD B2C + Identity Provider. + :type signup_policy_name: str + :param signin_policy_name: Signin Policy Name. Only applies to AAD B2C + Identity Provider. + :type signin_policy_name: str + :param profile_editing_policy_name: Profile Editing Policy Name. Only + applies to AAD B2C Identity Provider. + :type profile_editing_policy_name: str + :param password_reset_policy_name: Password Reset Policy Name. Only + applies to AAD B2C Identity Provider. + :type password_reset_policy_name: str + :param client_id: Required. Client Id of the Application in the external + Identity Provider. It is App ID for Facebook login, Client ID for Google + login, App ID for Microsoft. + :type client_id: str + :param client_secret: Required. Client secret of the Application in + external Identity Provider, used to authenticate login request. For + example, it is App Secret for Facebook login, API Key for Google login, + Public Key for Microsoft. + :type client_secret: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'allowed_tenants': {'max_items': 32}, + 'signup_policy_name': {'min_length': 1}, + 'signin_policy_name': {'min_length': 1}, + 'profile_editing_policy_name': {'min_length': 1}, + 'password_reset_policy_name': {'min_length': 1}, + 'client_id': {'required': True, 'min_length': 1}, + 'client_secret': {'required': True, 'min_length': 1}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'identity_provider_contract_type': {'key': 'properties.type', 'type': 'str'}, + 'allowed_tenants': {'key': 'properties.allowedTenants', 'type': '[str]'}, + 'authority': {'key': 'properties.authority', 'type': 'str'}, + 'signup_policy_name': {'key': 'properties.signupPolicyName', 'type': 'str'}, + 'signin_policy_name': {'key': 'properties.signinPolicyName', 'type': 'str'}, + 'profile_editing_policy_name': {'key': 'properties.profileEditingPolicyName', 'type': 'str'}, + 'password_reset_policy_name': {'key': 'properties.passwordResetPolicyName', 'type': 'str'}, + 'client_id': {'key': 'properties.clientId', 'type': 'str'}, + 'client_secret': {'key': 'properties.clientSecret', 'type': 'str'}, + } + + def __init__(self, *, client_id: str, client_secret: str, identity_provider_contract_type=None, allowed_tenants=None, authority: str=None, signup_policy_name: str=None, signin_policy_name: str=None, profile_editing_policy_name: str=None, password_reset_policy_name: str=None, **kwargs) -> None: + super(IdentityProviderContract, self).__init__(**kwargs) + self.identity_provider_contract_type = identity_provider_contract_type + self.allowed_tenants = allowed_tenants + self.authority = authority + self.signup_policy_name = signup_policy_name + self.signin_policy_name = signin_policy_name + self.profile_editing_policy_name = profile_editing_policy_name + self.password_reset_policy_name = password_reset_policy_name + self.client_id = client_id + self.client_secret = client_secret + + +class IdentityProviderUpdateParameters(Model): + """Parameters supplied to update Identity Provider. + + :param type: Identity Provider Type identifier. Possible values include: + 'facebook', 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' + :type type: str or ~azure.mgmt.apimanagement.models.IdentityProviderType + :param allowed_tenants: List of Allowed Tenants when configuring Azure + Active Directory login. + :type allowed_tenants: list[str] + :param authority: OpenID Connect discovery endpoint hostname for AAD or + AAD B2C. + :type authority: str + :param signup_policy_name: Signup Policy Name. Only applies to AAD B2C + Identity Provider. + :type signup_policy_name: str + :param signin_policy_name: Signin Policy Name. Only applies to AAD B2C + Identity Provider. + :type signin_policy_name: str + :param profile_editing_policy_name: Profile Editing Policy Name. Only + applies to AAD B2C Identity Provider. + :type profile_editing_policy_name: str + :param password_reset_policy_name: Password Reset Policy Name. Only + applies to AAD B2C Identity Provider. + :type password_reset_policy_name: str + :param client_id: Client Id of the Application in the external Identity + Provider. It is App ID for Facebook login, Client ID for Google login, App + ID for Microsoft. + :type client_id: str + :param client_secret: Client secret of the Application in external + Identity Provider, used to authenticate login request. For example, it is + App Secret for Facebook login, API Key for Google login, Public Key for + Microsoft. + :type client_secret: str + """ + + _validation = { + 'allowed_tenants': {'max_items': 32}, + 'signup_policy_name': {'min_length': 1}, + 'signin_policy_name': {'min_length': 1}, + 'profile_editing_policy_name': {'min_length': 1}, + 'password_reset_policy_name': {'min_length': 1}, + 'client_id': {'min_length': 1}, + 'client_secret': {'min_length': 1}, + } + + _attribute_map = { + 'type': {'key': 'properties.type', 'type': 'str'}, + 'allowed_tenants': {'key': 'properties.allowedTenants', 'type': '[str]'}, + 'authority': {'key': 'properties.authority', 'type': 'str'}, + 'signup_policy_name': {'key': 'properties.signupPolicyName', 'type': 'str'}, + 'signin_policy_name': {'key': 'properties.signinPolicyName', 'type': 'str'}, + 'profile_editing_policy_name': {'key': 'properties.profileEditingPolicyName', 'type': 'str'}, + 'password_reset_policy_name': {'key': 'properties.passwordResetPolicyName', 'type': 'str'}, + 'client_id': {'key': 'properties.clientId', 'type': 'str'}, + 'client_secret': {'key': 'properties.clientSecret', 'type': 'str'}, + } + + def __init__(self, *, type=None, allowed_tenants=None, authority: str=None, signup_policy_name: str=None, signin_policy_name: str=None, profile_editing_policy_name: str=None, password_reset_policy_name: str=None, client_id: str=None, client_secret: str=None, **kwargs) -> None: + super(IdentityProviderUpdateParameters, self).__init__(**kwargs) + self.type = type + self.allowed_tenants = allowed_tenants + self.authority = authority + self.signup_policy_name = signup_policy_name + self.signin_policy_name = signin_policy_name + self.profile_editing_policy_name = profile_editing_policy_name + self.password_reset_policy_name = password_reset_policy_name + self.client_id = client_id + self.client_secret = client_secret + + +class IssueAttachmentContract(Resource): + """Issue Attachment Contract details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param title: Required. Filename by which the binary data will be saved. + :type title: str + :param content_format: Required. Either 'link' if content is provided via + an HTTP link or the MIME type of the Base64-encoded binary data provided + in the 'content' property. + :type content_format: str + :param content: Required. An HTTP link or Base64-encoded binary data. + :type content: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'title': {'required': True}, + 'content_format': {'required': True}, + 'content': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'content_format': {'key': 'properties.contentFormat', 'type': 'str'}, + 'content': {'key': 'properties.content', 'type': 'str'}, + } + + def __init__(self, *, title: str, content_format: str, content: str, **kwargs) -> None: + super(IssueAttachmentContract, self).__init__(**kwargs) + self.title = title + self.content_format = content_format + self.content = content + + +class IssueCommentContract(Resource): + """Issue Comment Contract details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param text: Required. Comment text. + :type text: str + :param created_date: Date and time when the comment was created. + :type created_date: datetime + :param user_id: Required. A resource identifier for the user who left the + comment. + :type user_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'text': {'required': True}, + 'user_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'text': {'key': 'properties.text', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'user_id': {'key': 'properties.userId', 'type': 'str'}, + } + + def __init__(self, *, text: str, user_id: str, created_date=None, **kwargs) -> None: + super(IssueCommentContract, self).__init__(**kwargs) + self.text = text + self.created_date = created_date + self.user_id = user_id + + +class IssueContract(Resource): + """Issue Contract details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param created_date: Date and time when the issue was created. + :type created_date: datetime + :param state: Status of the issue. Possible values include: 'proposed', + 'open', 'removed', 'resolved', 'closed' + :type state: str or ~azure.mgmt.apimanagement.models.State + :param api_id: A resource identifier for the API the issue was created + for. + :type api_id: str + :param title: Required. The issue title. + :type title: str + :param description: Required. Text describing the issue. + :type description: str + :param user_id: Required. A resource identifier for the user created the + issue. + :type user_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'title': {'required': True}, + 'description': {'required': True}, + 'user_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'api_id': {'key': 'properties.apiId', 'type': 'str'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'user_id': {'key': 'properties.userId', 'type': 'str'}, + } + + def __init__(self, *, title: str, description: str, user_id: str, created_date=None, state=None, api_id: str=None, **kwargs) -> None: + super(IssueContract, self).__init__(**kwargs) + self.created_date = created_date + self.state = state + self.api_id = api_id + self.title = title + self.description = description + self.user_id = user_id + + +class IssueContractBaseProperties(Model): + """Issue contract Base Properties. + + :param created_date: Date and time when the issue was created. + :type created_date: datetime + :param state: Status of the issue. Possible values include: 'proposed', + 'open', 'removed', 'resolved', 'closed' + :type state: str or ~azure.mgmt.apimanagement.models.State + :param api_id: A resource identifier for the API the issue was created + for. + :type api_id: str + """ + + _attribute_map = { + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'state': {'key': 'state', 'type': 'str'}, + 'api_id': {'key': 'apiId', 'type': 'str'}, + } + + def __init__(self, *, created_date=None, state=None, api_id: str=None, **kwargs) -> None: + super(IssueContractBaseProperties, self).__init__(**kwargs) + self.created_date = created_date + self.state = state + self.api_id = api_id + + +class IssueUpdateContract(Model): + """Issue update Parameters. + + :param created_date: Date and time when the issue was created. + :type created_date: datetime + :param state: Status of the issue. Possible values include: 'proposed', + 'open', 'removed', 'resolved', 'closed' + :type state: str or ~azure.mgmt.apimanagement.models.State + :param api_id: A resource identifier for the API the issue was created + for. + :type api_id: str + :param title: The issue title. + :type title: str + :param description: Text describing the issue. + :type description: str + :param user_id: A resource identifier for the user created the issue. + :type user_id: str + """ + + _attribute_map = { + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'api_id': {'key': 'properties.apiId', 'type': 'str'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'user_id': {'key': 'properties.userId', 'type': 'str'}, + } + + def __init__(self, *, created_date=None, state=None, api_id: str=None, title: str=None, description: str=None, user_id: str=None, **kwargs) -> None: + super(IssueUpdateContract, self).__init__(**kwargs) + self.created_date = created_date + self.state = state + self.api_id = api_id + self.title = title + self.description = description + self.user_id = user_id + + +class LoggerContract(Resource): + """Logger details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param logger_type: Required. Logger type. Possible values include: + 'azureEventHub', 'applicationInsights' + :type logger_type: str or ~azure.mgmt.apimanagement.models.LoggerType + :param description: Logger description. + :type description: str + :param credentials: Required. The name and SendRule connection string of + the event hub for azureEventHub logger. + Instrumentation key for applicationInsights logger. + :type credentials: dict[str, str] + :param is_buffered: Whether records are buffered in the logger before + publishing. Default is assumed to be true. + :type is_buffered: bool + :param resource_id: Azure Resource Id of a log target (either Azure Event + Hub resource or Azure Application Insights resource). + :type resource_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'logger_type': {'required': True}, + 'description': {'max_length': 256}, + 'credentials': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'logger_type': {'key': 'properties.loggerType', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'credentials': {'key': 'properties.credentials', 'type': '{str}'}, + 'is_buffered': {'key': 'properties.isBuffered', 'type': 'bool'}, + 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, + } + + def __init__(self, *, logger_type, credentials, description: str=None, is_buffered: bool=None, resource_id: str=None, **kwargs) -> None: + super(LoggerContract, self).__init__(**kwargs) + self.logger_type = logger_type + self.description = description + self.credentials = credentials + self.is_buffered = is_buffered + self.resource_id = resource_id + + +class LoggerUpdateContract(Model): + """Logger update contract. + + :param logger_type: Logger type. Possible values include: 'azureEventHub', + 'applicationInsights' + :type logger_type: str or ~azure.mgmt.apimanagement.models.LoggerType + :param description: Logger description. + :type description: str + :param credentials: Logger credentials. + :type credentials: dict[str, str] + :param is_buffered: Whether records are buffered in the logger before + publishing. Default is assumed to be true. + :type is_buffered: bool + """ + + _attribute_map = { + 'logger_type': {'key': 'properties.loggerType', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'credentials': {'key': 'properties.credentials', 'type': '{str}'}, + 'is_buffered': {'key': 'properties.isBuffered', 'type': 'bool'}, + } + + def __init__(self, *, logger_type=None, description: str=None, credentials=None, is_buffered: bool=None, **kwargs) -> None: + super(LoggerUpdateContract, self).__init__(**kwargs) + self.logger_type = logger_type + self.description = description + self.credentials = credentials + self.is_buffered = is_buffered + + +class NetworkStatusContract(Model): + """Network Status details. + + All required parameters must be populated in order to send to Azure. + + :param dns_servers: Required. Gets the list of DNS servers IPV4 addresses. + :type dns_servers: list[str] + :param connectivity_status: Required. Gets the list of Connectivity Status + to the Resources on which the service depends upon. + :type connectivity_status: + list[~azure.mgmt.apimanagement.models.ConnectivityStatusContract] + """ + + _validation = { + 'dns_servers': {'required': True}, + 'connectivity_status': {'required': True}, + } + + _attribute_map = { + 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, + 'connectivity_status': {'key': 'connectivityStatus', 'type': '[ConnectivityStatusContract]'}, + } + + def __init__(self, *, dns_servers, connectivity_status, **kwargs) -> None: + super(NetworkStatusContract, self).__init__(**kwargs) + self.dns_servers = dns_servers + self.connectivity_status = connectivity_status + + +class NetworkStatusContractByLocation(Model): + """Network Status in the Location. + + :param location: Location of service + :type location: str + :param network_status: Network status in Location + :type network_status: + ~azure.mgmt.apimanagement.models.NetworkStatusContract + """ + + _validation = { + 'location': {'min_length': 1}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'network_status': {'key': 'networkStatus', 'type': 'NetworkStatusContract'}, + } + + def __init__(self, *, location: str=None, network_status=None, **kwargs) -> None: + super(NetworkStatusContractByLocation, self).__init__(**kwargs) + self.location = location + self.network_status = network_status + + +class NotificationContract(Resource): + """Notification details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param title: Required. Title of the Notification. + :type title: str + :param description: Description of the Notification. + :type description: str + :param recipients: Recipient Parameter values. + :type recipients: + ~azure.mgmt.apimanagement.models.RecipientsContractProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'title': {'required': True, 'max_length': 1000, 'min_length': 1}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'title': {'key': 'properties.title', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'recipients': {'key': 'properties.recipients', 'type': 'RecipientsContractProperties'}, + } + + def __init__(self, *, title: str, description: str=None, recipients=None, **kwargs) -> None: + super(NotificationContract, self).__init__(**kwargs) + self.title = title + self.description = description + self.recipients = recipients + + +class OAuth2AuthenticationSettingsContract(Model): + """API OAuth2 Authentication settings details. + + :param authorization_server_id: OAuth authorization server identifier. + :type authorization_server_id: str + :param scope: operations scope. + :type scope: str + """ + + _attribute_map = { + 'authorization_server_id': {'key': 'authorizationServerId', 'type': 'str'}, + 'scope': {'key': 'scope', 'type': 'str'}, + } + + def __init__(self, *, authorization_server_id: str=None, scope: str=None, **kwargs) -> None: + super(OAuth2AuthenticationSettingsContract, self).__init__(**kwargs) + self.authorization_server_id = authorization_server_id + self.scope = scope + + +class OpenIdAuthenticationSettingsContract(Model): + """API OAuth2 Authentication settings details. + + :param openid_provider_id: OAuth authorization server identifier. + :type openid_provider_id: str + :param bearer_token_sending_methods: How to send token to the server. + :type bearer_token_sending_methods: list[str or + ~azure.mgmt.apimanagement.models.BearerTokenSendingMethods] + """ + + _attribute_map = { + 'openid_provider_id': {'key': 'openidProviderId', 'type': 'str'}, + 'bearer_token_sending_methods': {'key': 'bearerTokenSendingMethods', 'type': '[str]'}, + } + + def __init__(self, *, openid_provider_id: str=None, bearer_token_sending_methods=None, **kwargs) -> None: + super(OpenIdAuthenticationSettingsContract, self).__init__(**kwargs) + self.openid_provider_id = openid_provider_id + self.bearer_token_sending_methods = bearer_token_sending_methods + + +class OpenidConnectProviderContract(Resource): + """OpenId Connect Provider details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param display_name: Required. User-friendly OpenID Connect Provider name. + :type display_name: str + :param description: User-friendly description of OpenID Connect Provider. + :type description: str + :param metadata_endpoint: Required. Metadata endpoint URI. + :type metadata_endpoint: str + :param client_id: Required. Client ID of developer console which is the + client application. + :type client_id: str + :param client_secret: Client Secret of developer console which is the + client application. + :type client_secret: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'required': True, 'max_length': 50}, + 'metadata_endpoint': {'required': True}, + 'client_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'metadata_endpoint': {'key': 'properties.metadataEndpoint', 'type': 'str'}, + 'client_id': {'key': 'properties.clientId', 'type': 'str'}, + 'client_secret': {'key': 'properties.clientSecret', 'type': 'str'}, + } + + def __init__(self, *, display_name: str, metadata_endpoint: str, client_id: str, description: str=None, client_secret: str=None, **kwargs) -> None: + super(OpenidConnectProviderContract, self).__init__(**kwargs) + self.display_name = display_name + self.description = description + self.metadata_endpoint = metadata_endpoint + self.client_id = client_id + self.client_secret = client_secret + + +class OpenidConnectProviderUpdateContract(Model): + """Parameters supplied to the Update OpenID Connect Provider operation. + + :param display_name: User-friendly OpenID Connect Provider name. + :type display_name: str + :param description: User-friendly description of OpenID Connect Provider. + :type description: str + :param metadata_endpoint: Metadata endpoint URI. + :type metadata_endpoint: str + :param client_id: Client ID of developer console which is the client + application. + :type client_id: str + :param client_secret: Client Secret of developer console which is the + client application. + :type client_secret: str + """ + + _validation = { + 'display_name': {'max_length': 50}, + } + + _attribute_map = { + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'metadata_endpoint': {'key': 'properties.metadataEndpoint', 'type': 'str'}, + 'client_id': {'key': 'properties.clientId', 'type': 'str'}, + 'client_secret': {'key': 'properties.clientSecret', 'type': 'str'}, + } + + def __init__(self, *, display_name: str=None, description: str=None, metadata_endpoint: str=None, client_id: str=None, client_secret: str=None, **kwargs) -> None: + super(OpenidConnectProviderUpdateContract, self).__init__(**kwargs) + self.display_name = display_name + self.description = description + self.metadata_endpoint = metadata_endpoint + self.client_id = client_id + self.client_secret = client_secret + + +class Operation(Model): + """REST API operation. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: The object that describes the operation. + :type display: ~azure.mgmt.apimanagement.models.OperationDisplay + :param origin: The operation origin. + :type origin: str + :param properties: The operation properties. + :type properties: object + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + def __init__(self, *, name: str=None, display=None, origin: str=None, properties=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin + self.properties = properties + + +class OperationContract(Resource): + """Api Operation details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param template_parameters: Collection of URL template parameters. + :type template_parameters: + list[~azure.mgmt.apimanagement.models.ParameterContract] + :param description: Description of the operation. May include HTML + formatting tags. + :type description: str + :param request: An entity containing request details. + :type request: ~azure.mgmt.apimanagement.models.RequestContract + :param responses: Array of Operation responses. + :type responses: list[~azure.mgmt.apimanagement.models.ResponseContract] + :param policies: Operation Policies + :type policies: str + :param display_name: Required. Operation Name. + :type display_name: str + :param method: Required. A Valid HTTP Operation Method. Typical Http + Methods like GET, PUT, POST but not limited by only them. + :type method: str + :param url_template: Required. Relative URL template identifying the + target resource for this operation. May include parameters. Example: + /customers/{cid}/orders/{oid}/?date={date} + :type url_template: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'max_length': 1000}, + 'display_name': {'required': True, 'max_length': 300, 'min_length': 1}, + 'method': {'required': True}, + 'url_template': {'required': True, 'max_length': 1000, 'min_length': 1}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'template_parameters': {'key': 'properties.templateParameters', 'type': '[ParameterContract]'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'request': {'key': 'properties.request', 'type': 'RequestContract'}, + 'responses': {'key': 'properties.responses', 'type': '[ResponseContract]'}, + 'policies': {'key': 'properties.policies', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'method': {'key': 'properties.method', 'type': 'str'}, + 'url_template': {'key': 'properties.urlTemplate', 'type': 'str'}, + } + + def __init__(self, *, display_name: str, method: str, url_template: str, template_parameters=None, description: str=None, request=None, responses=None, policies: str=None, **kwargs) -> None: + super(OperationContract, self).__init__(**kwargs) + self.template_parameters = template_parameters + self.description = description + self.request = request + self.responses = responses + self.policies = policies + self.display_name = display_name + self.method = method + self.url_template = url_template + + +class OperationDisplay(Model): + """The object that describes the operation. + + :param provider: Friendly name of the resource provider + :type provider: str + :param operation: Operation type: read, write, delete, listKeys/action, + etc. + :type operation: str + :param resource: Resource type on which the operation is performed. + :type resource: str + :param description: Friendly name of the operation + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, operation: str=None, resource: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.operation = operation + self.resource = resource + self.description = description + + +class OperationEntityBaseContract(Model): + """Api Operation Entity Base Contract details. + + :param template_parameters: Collection of URL template parameters. + :type template_parameters: + list[~azure.mgmt.apimanagement.models.ParameterContract] + :param description: Description of the operation. May include HTML + formatting tags. + :type description: str + :param request: An entity containing request details. + :type request: ~azure.mgmt.apimanagement.models.RequestContract + :param responses: Array of Operation responses. + :type responses: list[~azure.mgmt.apimanagement.models.ResponseContract] + :param policies: Operation Policies + :type policies: str + """ + + _validation = { + 'description': {'max_length': 1000}, + } + + _attribute_map = { + 'template_parameters': {'key': 'templateParameters', 'type': '[ParameterContract]'}, + 'description': {'key': 'description', 'type': 'str'}, + 'request': {'key': 'request', 'type': 'RequestContract'}, + 'responses': {'key': 'responses', 'type': '[ResponseContract]'}, + 'policies': {'key': 'policies', 'type': 'str'}, + } + + def __init__(self, *, template_parameters=None, description: str=None, request=None, responses=None, policies: str=None, **kwargs) -> None: + super(OperationEntityBaseContract, self).__init__(**kwargs) + self.template_parameters = template_parameters + self.description = description + self.request = request + self.responses = responses + self.policies = policies + + +class OperationResultContract(Model): + """Operation Result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: Operation result identifier. + :type id: str + :param status: Status of an async operation. Possible values include: + 'Started', 'InProgress', 'Succeeded', 'Failed' + :type status: str or ~azure.mgmt.apimanagement.models.AsyncOperationStatus + :param started: Start time of an async operation. The date conforms to the + following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 + standard. + :type started: datetime + :param updated: Last update time of an async operation. The date conforms + to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO + 8601 standard. + :type updated: datetime + :param result_info: Optional result info. + :type result_info: str + :param error: Error Body Contract + :type error: ~azure.mgmt.apimanagement.models.ErrorResponseBody + :ivar action_log: This property if only provided as part of the + TenantConfiguration_Validate operation. It contains the log the entities + which will be updated/created/deleted as part of the + TenantConfiguration_Deploy operation. + :vartype action_log: + list[~azure.mgmt.apimanagement.models.OperationResultLogItemContract] + """ + + _validation = { + 'action_log': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'AsyncOperationStatus'}, + 'started': {'key': 'started', 'type': 'iso-8601'}, + 'updated': {'key': 'updated', 'type': 'iso-8601'}, + 'result_info': {'key': 'resultInfo', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ErrorResponseBody'}, + 'action_log': {'key': 'actionLog', 'type': '[OperationResultLogItemContract]'}, + } + + def __init__(self, *, id: str=None, status=None, started=None, updated=None, result_info: str=None, error=None, **kwargs) -> None: + super(OperationResultContract, self).__init__(**kwargs) + self.id = id + self.status = status + self.started = started + self.updated = updated + self.result_info = result_info + self.error = error + self.action_log = None + + +class OperationResultLogItemContract(Model): + """Log of the entity being created, updated or deleted. + + :param object_type: The type of entity contract. + :type object_type: str + :param action: Action like create/update/delete. + :type action: str + :param object_key: Identifier of the entity being created/updated/deleted. + :type object_key: str + """ + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'str'}, + 'object_key': {'key': 'objectKey', 'type': 'str'}, + } + + def __init__(self, *, object_type: str=None, action: str=None, object_key: str=None, **kwargs) -> None: + super(OperationResultLogItemContract, self).__init__(**kwargs) + self.object_type = object_type + self.action = action + self.object_key = object_key + + +class OperationTagResourceContractProperties(Model): + """Operation Entity contract Properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: Identifier of the operation in form /operations/{operationId}. + :type id: str + :ivar name: Operation name. + :vartype name: str + :ivar api_name: Api Name. + :vartype api_name: str + :ivar api_revision: Api Revision. + :vartype api_revision: str + :ivar api_version: Api Version. + :vartype api_version: str + :ivar description: Operation Description. + :vartype description: str + :ivar method: A Valid HTTP Operation Method. Typical Http Methods like + GET, PUT, POST but not limited by only them. + :vartype method: str + :ivar url_template: Relative URL template identifying the target resource + for this operation. May include parameters. Example: + /customers/{cid}/orders/{oid}/?date={date} + :vartype url_template: str + """ + + _validation = { + 'name': {'readonly': True}, + 'api_name': {'readonly': True}, + 'api_revision': {'readonly': True}, + 'api_version': {'readonly': True}, + 'description': {'readonly': True}, + 'method': {'readonly': True}, + 'url_template': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'api_name': {'key': 'apiName', 'type': 'str'}, + 'api_revision': {'key': 'apiRevision', 'type': 'str'}, + 'api_version': {'key': 'apiVersion', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'method': {'key': 'method', 'type': 'str'}, + 'url_template': {'key': 'urlTemplate', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(OperationTagResourceContractProperties, self).__init__(**kwargs) + self.id = id + self.name = None + self.api_name = None + self.api_revision = None + self.api_version = None + self.description = None + self.method = None + self.url_template = None + + +class OperationUpdateContract(Model): + """Api Operation Update Contract details. + + :param template_parameters: Collection of URL template parameters. + :type template_parameters: + list[~azure.mgmt.apimanagement.models.ParameterContract] + :param description: Description of the operation. May include HTML + formatting tags. + :type description: str + :param request: An entity containing request details. + :type request: ~azure.mgmt.apimanagement.models.RequestContract + :param responses: Array of Operation responses. + :type responses: list[~azure.mgmt.apimanagement.models.ResponseContract] + :param policies: Operation Policies + :type policies: str + :param display_name: Operation Name. + :type display_name: str + :param method: A Valid HTTP Operation Method. Typical Http Methods like + GET, PUT, POST but not limited by only them. + :type method: str + :param url_template: Relative URL template identifying the target resource + for this operation. May include parameters. Example: + /customers/{cid}/orders/{oid}/?date={date} + :type url_template: str + """ + + _validation = { + 'description': {'max_length': 1000}, + 'display_name': {'max_length': 300, 'min_length': 1}, + 'url_template': {'max_length': 1000, 'min_length': 1}, + } + + _attribute_map = { + 'template_parameters': {'key': 'properties.templateParameters', 'type': '[ParameterContract]'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'request': {'key': 'properties.request', 'type': 'RequestContract'}, + 'responses': {'key': 'properties.responses', 'type': '[ResponseContract]'}, + 'policies': {'key': 'properties.policies', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'method': {'key': 'properties.method', 'type': 'str'}, + 'url_template': {'key': 'properties.urlTemplate', 'type': 'str'}, + } + + def __init__(self, *, template_parameters=None, description: str=None, request=None, responses=None, policies: str=None, display_name: str=None, method: str=None, url_template: str=None, **kwargs) -> None: + super(OperationUpdateContract, self).__init__(**kwargs) + self.template_parameters = template_parameters + self.description = description + self.request = request + self.responses = responses + self.policies = policies + self.display_name = display_name + self.method = method + self.url_template = url_template + + +class ParameterContract(Model): + """Operation parameters details. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Parameter name. + :type name: str + :param description: Parameter description. + :type description: str + :param type: Required. Parameter type. + :type type: str + :param default_value: Default parameter value. + :type default_value: str + :param required: Specifies whether parameter is required or not. + :type required: bool + :param values: Parameter values. + :type values: list[str] + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'required': {'key': 'required', 'type': 'bool'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, *, name: str, type: str, description: str=None, default_value: str=None, required: bool=None, values=None, **kwargs) -> None: + super(ParameterContract, self).__init__(**kwargs) + self.name = name + self.description = description + self.type = type + self.default_value = default_value + self.required = required + self.values = values + + +class PipelineDiagnosticSettings(Model): + """Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. + + :param request: Diagnostic settings for request. + :type request: ~azure.mgmt.apimanagement.models.HttpMessageDiagnostic + :param response: Diagnostic settings for response. + :type response: ~azure.mgmt.apimanagement.models.HttpMessageDiagnostic + """ + + _attribute_map = { + 'request': {'key': 'request', 'type': 'HttpMessageDiagnostic'}, + 'response': {'key': 'response', 'type': 'HttpMessageDiagnostic'}, + } + + def __init__(self, *, request=None, response=None, **kwargs) -> None: + super(PipelineDiagnosticSettings, self).__init__(**kwargs) + self.request = request + self.response = response + + +class PolicyCollection(Model): + """The response of the list policy operation. + + :param value: Policy Contract value. + :type value: list[~azure.mgmt.apimanagement.models.PolicyContract] + :param next_link: Next page link if any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PolicyContract]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value=None, next_link: str=None, **kwargs) -> None: + super(PolicyCollection, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class PolicyContract(Resource): + """Policy Contract details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param value: Required. Contents of the Policy as defined by the format. + :type value: str + :param format: Format of the policyContent. Possible values include: + 'xml', 'xml-link', 'rawxml', 'rawxml-link'. Default value: "xml" . + :type format: str or ~azure.mgmt.apimanagement.models.PolicyContentFormat + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + 'format': {'key': 'properties.format', 'type': 'str'}, + } + + def __init__(self, *, value: str, format="xml", **kwargs) -> None: + super(PolicyContract, self).__init__(**kwargs) + self.value = value + self.format = format + + +class PolicySnippetContract(Model): + """Policy snippet. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Snippet name. + :vartype name: str + :ivar content: Snippet content. + :vartype content: str + :ivar tool_tip: Snippet toolTip. + :vartype tool_tip: str + :ivar scope: Binary OR value of the Snippet scope. + :vartype scope: int + """ + + _validation = { + 'name': {'readonly': True}, + 'content': {'readonly': True}, + 'tool_tip': {'readonly': True}, + 'scope': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'content': {'key': 'content', 'type': 'str'}, + 'tool_tip': {'key': 'toolTip', 'type': 'str'}, + 'scope': {'key': 'scope', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(PolicySnippetContract, self).__init__(**kwargs) + self.name = None + self.content = None + self.tool_tip = None + self.scope = None + + +class PolicySnippetsCollection(Model): + """The response of the list policy snippets operation. + + :param value: Policy snippet value. + :type value: list[~azure.mgmt.apimanagement.models.PolicySnippetContract] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PolicySnippetContract]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(PolicySnippetsCollection, self).__init__(**kwargs) + self.value = value + + +class PortalDelegationSettings(Resource): + """Delegation settings for a developer portal. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param url: A delegation Url. + :type url: str + :param validation_key: A base64-encoded validation key to validate, that a + request is coming from Azure API Management. + :type validation_key: str + :param subscriptions: Subscriptions delegation settings. + :type subscriptions: + ~azure.mgmt.apimanagement.models.SubscriptionsDelegationSettingsProperties + :param user_registration: User registration delegation settings. + :type user_registration: + ~azure.mgmt.apimanagement.models.RegistrationDelegationSettingsProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'url': {'key': 'properties.url', 'type': 'str'}, + 'validation_key': {'key': 'properties.validationKey', 'type': 'str'}, + 'subscriptions': {'key': 'properties.subscriptions', 'type': 'SubscriptionsDelegationSettingsProperties'}, + 'user_registration': {'key': 'properties.userRegistration', 'type': 'RegistrationDelegationSettingsProperties'}, + } + + def __init__(self, *, url: str=None, validation_key: str=None, subscriptions=None, user_registration=None, **kwargs) -> None: + super(PortalDelegationSettings, self).__init__(**kwargs) + self.url = url + self.validation_key = validation_key + self.subscriptions = subscriptions + self.user_registration = user_registration + + +class PortalSigninSettings(Resource): + """Sign-In settings for the Developer Portal. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param enabled: Redirect Anonymous users to the Sign-In page. + :type enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__(self, *, enabled: bool=None, **kwargs) -> None: + super(PortalSigninSettings, self).__init__(**kwargs) + self.enabled = enabled + + +class PortalSignupSettings(Resource): + """Sign-Up settings for a developer portal. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param enabled: Allow users to sign up on a developer portal. + :type enabled: bool + :param terms_of_service: Terms of service contract properties. + :type terms_of_service: + ~azure.mgmt.apimanagement.models.TermsOfServiceProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'terms_of_service': {'key': 'properties.termsOfService', 'type': 'TermsOfServiceProperties'}, + } + + def __init__(self, *, enabled: bool=None, terms_of_service=None, **kwargs) -> None: + super(PortalSignupSettings, self).__init__(**kwargs) + self.enabled = enabled + self.terms_of_service = terms_of_service + + +class ProductContract(Resource): + """Product details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param description: Product description. May include HTML formatting tags. + :type description: str + :param terms: Product terms of use. Developers trying to subscribe to the + product will be presented and required to accept these terms before they + can complete the subscription process. + :type terms: str + :param subscription_required: Whether a product subscription is required + for accessing APIs included in this product. If true, the product is + referred to as "protected" and a valid subscription key is required for a + request to an API included in the product to succeed. If false, the + product is referred to as "open" and requests to an API included in the + product can be made without a subscription key. If property is omitted + when creating a new product it's value is assumed to be true. + :type subscription_required: bool + :param approval_required: whether subscription approval is required. If + false, new subscriptions will be approved automatically enabling + developers to call the product’s APIs immediately after subscribing. If + true, administrators must manually approve the subscription before the + developer can any of the product’s APIs. Can be present only if + subscriptionRequired property is present and has a value of false. + :type approval_required: bool + :param subscriptions_limit: Whether the number of subscriptions a user can + have to this product at the same time. Set to null or omit to allow + unlimited per user subscriptions. Can be present only if + subscriptionRequired property is present and has a value of false. + :type subscriptions_limit: int + :param state: whether product is published or not. Published products are + discoverable by users of developer portal. Non published products are + visible only to administrators. Default state of Product is notPublished. + Possible values include: 'notPublished', 'published' + :type state: str or ~azure.mgmt.apimanagement.models.ProductState + :param display_name: Required. Product name. + :type display_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'max_length': 1000, 'min_length': 1}, + 'display_name': {'required': True, 'max_length': 300, 'min_length': 1}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'terms': {'key': 'properties.terms', 'type': 'str'}, + 'subscription_required': {'key': 'properties.subscriptionRequired', 'type': 'bool'}, + 'approval_required': {'key': 'properties.approvalRequired', 'type': 'bool'}, + 'subscriptions_limit': {'key': 'properties.subscriptionsLimit', 'type': 'int'}, + 'state': {'key': 'properties.state', 'type': 'ProductState'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + } + + def __init__(self, *, display_name: str, description: str=None, terms: str=None, subscription_required: bool=None, approval_required: bool=None, subscriptions_limit: int=None, state=None, **kwargs) -> None: + super(ProductContract, self).__init__(**kwargs) + self.description = description + self.terms = terms + self.subscription_required = subscription_required + self.approval_required = approval_required + self.subscriptions_limit = subscriptions_limit + self.state = state + self.display_name = display_name + + +class ProductEntityBaseParameters(Model): + """Product Entity Base Parameters. + + :param description: Product description. May include HTML formatting tags. + :type description: str + :param terms: Product terms of use. Developers trying to subscribe to the + product will be presented and required to accept these terms before they + can complete the subscription process. + :type terms: str + :param subscription_required: Whether a product subscription is required + for accessing APIs included in this product. If true, the product is + referred to as "protected" and a valid subscription key is required for a + request to an API included in the product to succeed. If false, the + product is referred to as "open" and requests to an API included in the + product can be made without a subscription key. If property is omitted + when creating a new product it's value is assumed to be true. + :type subscription_required: bool + :param approval_required: whether subscription approval is required. If + false, new subscriptions will be approved automatically enabling + developers to call the product’s APIs immediately after subscribing. If + true, administrators must manually approve the subscription before the + developer can any of the product’s APIs. Can be present only if + subscriptionRequired property is present and has a value of false. + :type approval_required: bool + :param subscriptions_limit: Whether the number of subscriptions a user can + have to this product at the same time. Set to null or omit to allow + unlimited per user subscriptions. Can be present only if + subscriptionRequired property is present and has a value of false. + :type subscriptions_limit: int + :param state: whether product is published or not. Published products are + discoverable by users of developer portal. Non published products are + visible only to administrators. Default state of Product is notPublished. + Possible values include: 'notPublished', 'published' + :type state: str or ~azure.mgmt.apimanagement.models.ProductState + """ + + _validation = { + 'description': {'max_length': 1000, 'min_length': 1}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'terms': {'key': 'terms', 'type': 'str'}, + 'subscription_required': {'key': 'subscriptionRequired', 'type': 'bool'}, + 'approval_required': {'key': 'approvalRequired', 'type': 'bool'}, + 'subscriptions_limit': {'key': 'subscriptionsLimit', 'type': 'int'}, + 'state': {'key': 'state', 'type': 'ProductState'}, + } + + def __init__(self, *, description: str=None, terms: str=None, subscription_required: bool=None, approval_required: bool=None, subscriptions_limit: int=None, state=None, **kwargs) -> None: + super(ProductEntityBaseParameters, self).__init__(**kwargs) + self.description = description + self.terms = terms + self.subscription_required = subscription_required + self.approval_required = approval_required + self.subscriptions_limit = subscriptions_limit + self.state = state + + +class ProductTagResourceContractProperties(ProductEntityBaseParameters): + """Product profile. + + All required parameters must be populated in order to send to Azure. + + :param description: Product description. May include HTML formatting tags. + :type description: str + :param terms: Product terms of use. Developers trying to subscribe to the + product will be presented and required to accept these terms before they + can complete the subscription process. + :type terms: str + :param subscription_required: Whether a product subscription is required + for accessing APIs included in this product. If true, the product is + referred to as "protected" and a valid subscription key is required for a + request to an API included in the product to succeed. If false, the + product is referred to as "open" and requests to an API included in the + product can be made without a subscription key. If property is omitted + when creating a new product it's value is assumed to be true. + :type subscription_required: bool + :param approval_required: whether subscription approval is required. If + false, new subscriptions will be approved automatically enabling + developers to call the product’s APIs immediately after subscribing. If + true, administrators must manually approve the subscription before the + developer can any of the product’s APIs. Can be present only if + subscriptionRequired property is present and has a value of false. + :type approval_required: bool + :param subscriptions_limit: Whether the number of subscriptions a user can + have to this product at the same time. Set to null or omit to allow + unlimited per user subscriptions. Can be present only if + subscriptionRequired property is present and has a value of false. + :type subscriptions_limit: int + :param state: whether product is published or not. Published products are + discoverable by users of developer portal. Non published products are + visible only to administrators. Default state of Product is notPublished. + Possible values include: 'notPublished', 'published' + :type state: str or ~azure.mgmt.apimanagement.models.ProductState + :param id: Identifier of the product in the form of /products/{productId} + :type id: str + :param name: Required. Product name. + :type name: str + """ + + _validation = { + 'description': {'max_length': 1000, 'min_length': 1}, + 'name': {'required': True, 'max_length': 300, 'min_length': 1}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'terms': {'key': 'terms', 'type': 'str'}, + 'subscription_required': {'key': 'subscriptionRequired', 'type': 'bool'}, + 'approval_required': {'key': 'approvalRequired', 'type': 'bool'}, + 'subscriptions_limit': {'key': 'subscriptionsLimit', 'type': 'int'}, + 'state': {'key': 'state', 'type': 'ProductState'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str, description: str=None, terms: str=None, subscription_required: bool=None, approval_required: bool=None, subscriptions_limit: int=None, state=None, id: str=None, **kwargs) -> None: + super(ProductTagResourceContractProperties, self).__init__(description=description, terms=terms, subscription_required=subscription_required, approval_required=approval_required, subscriptions_limit=subscriptions_limit, state=state, **kwargs) + self.id = id + self.name = name + + +class ProductUpdateParameters(Model): + """Product Update parameters. + + :param description: Product description. May include HTML formatting tags. + :type description: str + :param terms: Product terms of use. Developers trying to subscribe to the + product will be presented and required to accept these terms before they + can complete the subscription process. + :type terms: str + :param subscription_required: Whether a product subscription is required + for accessing APIs included in this product. If true, the product is + referred to as "protected" and a valid subscription key is required for a + request to an API included in the product to succeed. If false, the + product is referred to as "open" and requests to an API included in the + product can be made without a subscription key. If property is omitted + when creating a new product it's value is assumed to be true. + :type subscription_required: bool + :param approval_required: whether subscription approval is required. If + false, new subscriptions will be approved automatically enabling + developers to call the product’s APIs immediately after subscribing. If + true, administrators must manually approve the subscription before the + developer can any of the product’s APIs. Can be present only if + subscriptionRequired property is present and has a value of false. + :type approval_required: bool + :param subscriptions_limit: Whether the number of subscriptions a user can + have to this product at the same time. Set to null or omit to allow + unlimited per user subscriptions. Can be present only if + subscriptionRequired property is present and has a value of false. + :type subscriptions_limit: int + :param state: whether product is published or not. Published products are + discoverable by users of developer portal. Non published products are + visible only to administrators. Default state of Product is notPublished. + Possible values include: 'notPublished', 'published' + :type state: str or ~azure.mgmt.apimanagement.models.ProductState + :param display_name: Product name. + :type display_name: str + """ + + _validation = { + 'description': {'max_length': 1000, 'min_length': 1}, + 'display_name': {'max_length': 300, 'min_length': 1}, + } + + _attribute_map = { + 'description': {'key': 'properties.description', 'type': 'str'}, + 'terms': {'key': 'properties.terms', 'type': 'str'}, + 'subscription_required': {'key': 'properties.subscriptionRequired', 'type': 'bool'}, + 'approval_required': {'key': 'properties.approvalRequired', 'type': 'bool'}, + 'subscriptions_limit': {'key': 'properties.subscriptionsLimit', 'type': 'int'}, + 'state': {'key': 'properties.state', 'type': 'ProductState'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + } + + def __init__(self, *, description: str=None, terms: str=None, subscription_required: bool=None, approval_required: bool=None, subscriptions_limit: int=None, state=None, display_name: str=None, **kwargs) -> None: + super(ProductUpdateParameters, self).__init__(**kwargs) + self.description = description + self.terms = terms + self.subscription_required = subscription_required + self.approval_required = approval_required + self.subscriptions_limit = subscriptions_limit + self.state = state + self.display_name = display_name + + +class PropertyContract(Resource): + """Property details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param tags: Optional tags that when provided can be used to filter the + property list. + :type tags: list[str] + :param secret: Determines whether the value is a secret and should be + encrypted or not. Default value is false. + :type secret: bool + :param display_name: Required. Unique name of Property. It may contain + only letters, digits, period, dash, and underscore characters. + :type display_name: str + :param value: Required. Value of the property. Can contain policy + expressions. It may not be empty or consist only of whitespace. + :type value: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'max_items': 32}, + 'display_name': {'required': True, 'max_length': 256, 'min_length': 1, 'pattern': r'^[A-Za-z0-9-._]+$'}, + 'value': {'required': True, 'max_length': 4096, 'min_length': 1}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'properties.tags', 'type': '[str]'}, + 'secret': {'key': 'properties.secret', 'type': 'bool'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + } + + def __init__(self, *, display_name: str, value: str, tags=None, secret: bool=None, **kwargs) -> None: + super(PropertyContract, self).__init__(**kwargs) + self.tags = tags + self.secret = secret + self.display_name = display_name + self.value = value + + +class PropertyEntityBaseParameters(Model): + """Property Entity Base Parameters set. + + :param tags: Optional tags that when provided can be used to filter the + property list. + :type tags: list[str] + :param secret: Determines whether the value is a secret and should be + encrypted or not. Default value is false. + :type secret: bool + """ + + _validation = { + 'tags': {'max_items': 32}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '[str]'}, + 'secret': {'key': 'secret', 'type': 'bool'}, + } + + def __init__(self, *, tags=None, secret: bool=None, **kwargs) -> None: + super(PropertyEntityBaseParameters, self).__init__(**kwargs) + self.tags = tags + self.secret = secret + + +class PropertyUpdateParameters(Model): + """Property update Parameters. + + :param tags: Optional tags that when provided can be used to filter the + property list. + :type tags: list[str] + :param secret: Determines whether the value is a secret and should be + encrypted or not. Default value is false. + :type secret: bool + :param display_name: Unique name of Property. It may contain only letters, + digits, period, dash, and underscore characters. + :type display_name: str + :param value: Value of the property. Can contain policy expressions. It + may not be empty or consist only of whitespace. + :type value: str + """ + + _validation = { + 'tags': {'max_items': 32}, + 'display_name': {'max_length': 256, 'min_length': 1, 'pattern': r'^[A-Za-z0-9-._]+$'}, + 'value': {'max_length': 4096, 'min_length': 1}, + } + + _attribute_map = { + 'tags': {'key': 'properties.tags', 'type': '[str]'}, + 'secret': {'key': 'properties.secret', 'type': 'bool'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + } + + def __init__(self, *, tags=None, secret: bool=None, display_name: str=None, value: str=None, **kwargs) -> None: + super(PropertyUpdateParameters, self).__init__(**kwargs) + self.tags = tags + self.secret = secret + self.display_name = display_name + self.value = value + + +class QuotaCounterCollection(Model): + """Paged Quota Counter list representation. + + :param value: Quota counter values. + :type value: list[~azure.mgmt.apimanagement.models.QuotaCounterContract] + :param count: Total record count number across all pages. + :type count: long + :param next_link: Next page link if any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[QuotaCounterContract]'}, + 'count': {'key': 'count', 'type': 'long'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value=None, count: int=None, next_link: str=None, **kwargs) -> None: + super(QuotaCounterCollection, self).__init__(**kwargs) + self.value = value + self.count = count + self.next_link = next_link + + +class QuotaCounterContract(Model): + """Quota counter details. + + All required parameters must be populated in order to send to Azure. + + :param counter_key: Required. The Key value of the Counter. Must not be + empty. + :type counter_key: str + :param period_key: Required. Identifier of the Period for which the + counter was collected. Must not be empty. + :type period_key: str + :param period_start_time: Required. The date of the start of Counter + Period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` + as specified by the ISO 8601 standard. + :type period_start_time: datetime + :param period_end_time: Required. The date of the end of Counter Period. + The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as + specified by the ISO 8601 standard. + :type period_end_time: datetime + :param value: Quota Value Properties + :type value: + ~azure.mgmt.apimanagement.models.QuotaCounterValueContractProperties + """ + + _validation = { + 'counter_key': {'required': True, 'min_length': 1}, + 'period_key': {'required': True, 'min_length': 1}, + 'period_start_time': {'required': True}, + 'period_end_time': {'required': True}, + } + + _attribute_map = { + 'counter_key': {'key': 'counterKey', 'type': 'str'}, + 'period_key': {'key': 'periodKey', 'type': 'str'}, + 'period_start_time': {'key': 'periodStartTime', 'type': 'iso-8601'}, + 'period_end_time': {'key': 'periodEndTime', 'type': 'iso-8601'}, + 'value': {'key': 'value', 'type': 'QuotaCounterValueContractProperties'}, + } + + def __init__(self, *, counter_key: str, period_key: str, period_start_time, period_end_time, value=None, **kwargs) -> None: + super(QuotaCounterContract, self).__init__(**kwargs) + self.counter_key = counter_key + self.period_key = period_key + self.period_start_time = period_start_time + self.period_end_time = period_end_time + self.value = value + + +class QuotaCounterValueContract(Model): + """Quota counter value details. + + :param calls_count: Number of times Counter was called. + :type calls_count: int + :param kb_transferred: Data Transferred in KiloBytes. + :type kb_transferred: float + """ + + _attribute_map = { + 'calls_count': {'key': 'value.callsCount', 'type': 'int'}, + 'kb_transferred': {'key': 'value.kbTransferred', 'type': 'float'}, + } + + def __init__(self, *, calls_count: int=None, kb_transferred: float=None, **kwargs) -> None: + super(QuotaCounterValueContract, self).__init__(**kwargs) + self.calls_count = calls_count + self.kb_transferred = kb_transferred + + +class QuotaCounterValueContractProperties(Model): + """Quota counter value details. + + :param calls_count: Number of times Counter was called. + :type calls_count: int + :param kb_transferred: Data Transferred in KiloBytes. + :type kb_transferred: float + """ + + _attribute_map = { + 'calls_count': {'key': 'callsCount', 'type': 'int'}, + 'kb_transferred': {'key': 'kbTransferred', 'type': 'float'}, + } + + def __init__(self, *, calls_count: int=None, kb_transferred: float=None, **kwargs) -> None: + super(QuotaCounterValueContractProperties, self).__init__(**kwargs) + self.calls_count = calls_count + self.kb_transferred = kb_transferred + + +class RecipientEmailCollection(Model): + """Paged Recipient User list representation. + + :param value: Page values. + :type value: list[~azure.mgmt.apimanagement.models.RecipientEmailContract] + :param next_link: Next page link if any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RecipientEmailContract]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value=None, next_link: str=None, **kwargs) -> None: + super(RecipientEmailCollection, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class RecipientEmailContract(Resource): + """Recipient Email details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param email: User Email subscribed to notification. + :type email: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'email': {'key': 'properties.email', 'type': 'str'}, + } + + def __init__(self, *, email: str=None, **kwargs) -> None: + super(RecipientEmailContract, self).__init__(**kwargs) + self.email = email + + +class RecipientsContractProperties(Model): + """Notification Parameter contract. + + :param emails: List of Emails subscribed for the notification. + :type emails: list[str] + :param users: List of Users subscribed for the notification. + :type users: list[str] + """ + + _attribute_map = { + 'emails': {'key': 'emails', 'type': '[str]'}, + 'users': {'key': 'users', 'type': '[str]'}, + } + + def __init__(self, *, emails=None, users=None, **kwargs) -> None: + super(RecipientsContractProperties, self).__init__(**kwargs) + self.emails = emails + self.users = users + + +class RecipientUserCollection(Model): + """Paged Recipient User list representation. + + :param value: Page values. + :type value: list[~azure.mgmt.apimanagement.models.RecipientUserContract] + :param next_link: Next page link if any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RecipientUserContract]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value=None, next_link: str=None, **kwargs) -> None: + super(RecipientUserCollection, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class RecipientUserContract(Resource): + """Recipient User details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param user_id: API Management UserId subscribed to notification. + :type user_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'user_id': {'key': 'properties.userId', 'type': 'str'}, + } + + def __init__(self, *, user_id: str=None, **kwargs) -> None: + super(RecipientUserContract, self).__init__(**kwargs) + self.user_id = user_id + + +class RegionContract(Model): + """Region profile. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Region name. + :vartype name: str + :param is_master_region: whether Region is the master region. + :type is_master_region: bool + :param is_deleted: whether Region is deleted. + :type is_deleted: bool + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'is_master_region': {'key': 'isMasterRegion', 'type': 'bool'}, + 'is_deleted': {'key': 'isDeleted', 'type': 'bool'}, + } + + def __init__(self, *, is_master_region: bool=None, is_deleted: bool=None, **kwargs) -> None: + super(RegionContract, self).__init__(**kwargs) + self.name = None + self.is_master_region = is_master_region + self.is_deleted = is_deleted + + +class RegistrationDelegationSettingsProperties(Model): + """User registration delegation settings properties. + + :param enabled: Enable or disable delegation for user registration. + :type enabled: bool + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, *, enabled: bool=None, **kwargs) -> None: + super(RegistrationDelegationSettingsProperties, self).__init__(**kwargs) + self.enabled = enabled + + +class ReportRecordContract(Model): + """Report data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param name: Name depending on report endpoint specifies product, API, + operation or developer name. + :type name: str + :param timestamp: Start of aggregation period. The date conforms to the + following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 + standard. + :type timestamp: datetime + :param interval: Length of aggregation period. Interval must be multiple + of 15 minutes and may not be zero. The value should be in ISO 8601 format + (http://en.wikipedia.org/wiki/ISO_8601#Durations). + :type interval: str + :param country: Country to which this record data is related. + :type country: str + :param region: Country region to which this record data is related. + :type region: str + :param zip: Zip code to which this record data is related. + :type zip: str + :ivar user_id: User identifier path. /users/{userId} + :vartype user_id: str + :ivar product_id: Product identifier path. /products/{productId} + :vartype product_id: str + :param api_id: API identifier path. /apis/{apiId} + :type api_id: str + :param operation_id: Operation identifier path. + /apis/{apiId}/operations/{operationId} + :type operation_id: str + :param api_region: API region identifier. + :type api_region: str + :param subscription_id: Subscription identifier path. + /subscriptions/{subscriptionId} + :type subscription_id: str + :param call_count_success: Number of successful calls. This includes calls + returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and + HttpStatusCode.TemporaryRedirect + :type call_count_success: int + :param call_count_blocked: Number of calls blocked due to invalid + credentials. This includes calls returning HttpStatusCode.Unauthorized and + HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests + :type call_count_blocked: int + :param call_count_failed: Number of calls failed due to proxy or backend + errors. This includes calls returning HttpStatusCode.BadRequest(400) and + any Code between HttpStatusCode.InternalServerError (500) and 600 + :type call_count_failed: int + :param call_count_other: Number of other calls. + :type call_count_other: int + :param call_count_total: Total number of calls. + :type call_count_total: int + :param bandwidth: Bandwidth consumed. + :type bandwidth: long + :param cache_hit_count: Number of times when content was served from cache + policy. + :type cache_hit_count: int + :param cache_miss_count: Number of times content was fetched from backend. + :type cache_miss_count: int + :param api_time_avg: Average time it took to process request. + :type api_time_avg: float + :param api_time_min: Minimum time it took to process request. + :type api_time_min: float + :param api_time_max: Maximum time it took to process request. + :type api_time_max: float + :param service_time_avg: Average time it took to process request on + backend. + :type service_time_avg: float + :param service_time_min: Minimum time it took to process request on + backend. + :type service_time_min: float + :param service_time_max: Maximum time it took to process request on + backend. + :type service_time_max: float + """ + + _validation = { + 'user_id': {'readonly': True}, + 'product_id': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'interval': {'key': 'interval', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'region': {'key': 'region', 'type': 'str'}, + 'zip': {'key': 'zip', 'type': 'str'}, + 'user_id': {'key': 'userId', 'type': 'str'}, + 'product_id': {'key': 'productId', 'type': 'str'}, + 'api_id': {'key': 'apiId', 'type': 'str'}, + 'operation_id': {'key': 'operationId', 'type': 'str'}, + 'api_region': {'key': 'apiRegion', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'call_count_success': {'key': 'callCountSuccess', 'type': 'int'}, + 'call_count_blocked': {'key': 'callCountBlocked', 'type': 'int'}, + 'call_count_failed': {'key': 'callCountFailed', 'type': 'int'}, + 'call_count_other': {'key': 'callCountOther', 'type': 'int'}, + 'call_count_total': {'key': 'callCountTotal', 'type': 'int'}, + 'bandwidth': {'key': 'bandwidth', 'type': 'long'}, + 'cache_hit_count': {'key': 'cacheHitCount', 'type': 'int'}, + 'cache_miss_count': {'key': 'cacheMissCount', 'type': 'int'}, + 'api_time_avg': {'key': 'apiTimeAvg', 'type': 'float'}, + 'api_time_min': {'key': 'apiTimeMin', 'type': 'float'}, + 'api_time_max': {'key': 'apiTimeMax', 'type': 'float'}, + 'service_time_avg': {'key': 'serviceTimeAvg', 'type': 'float'}, + 'service_time_min': {'key': 'serviceTimeMin', 'type': 'float'}, + 'service_time_max': {'key': 'serviceTimeMax', 'type': 'float'}, + } + + def __init__(self, *, name: str=None, timestamp=None, interval: str=None, country: str=None, region: str=None, zip: str=None, api_id: str=None, operation_id: str=None, api_region: str=None, subscription_id: str=None, call_count_success: int=None, call_count_blocked: int=None, call_count_failed: int=None, call_count_other: int=None, call_count_total: int=None, bandwidth: int=None, cache_hit_count: int=None, cache_miss_count: int=None, api_time_avg: float=None, api_time_min: float=None, api_time_max: float=None, service_time_avg: float=None, service_time_min: float=None, service_time_max: float=None, **kwargs) -> None: + super(ReportRecordContract, self).__init__(**kwargs) + self.name = name + self.timestamp = timestamp + self.interval = interval + self.country = country + self.region = region + self.zip = zip + self.user_id = None + self.product_id = None + self.api_id = api_id + self.operation_id = operation_id + self.api_region = api_region + self.subscription_id = subscription_id + self.call_count_success = call_count_success + self.call_count_blocked = call_count_blocked + self.call_count_failed = call_count_failed + self.call_count_other = call_count_other + self.call_count_total = call_count_total + self.bandwidth = bandwidth + self.cache_hit_count = cache_hit_count + self.cache_miss_count = cache_miss_count + self.api_time_avg = api_time_avg + self.api_time_min = api_time_min + self.api_time_max = api_time_max + self.service_time_avg = service_time_avg + self.service_time_min = service_time_min + self.service_time_max = service_time_max + + +class RepresentationContract(Model): + """Operation request/response representation details. + + All required parameters must be populated in order to send to Azure. + + :param content_type: Required. Specifies a registered or custom content + type for this representation, e.g. application/xml. + :type content_type: str + :param sample: An example of the representation. + :type sample: str + :param schema_id: Schema identifier. Applicable only if 'contentType' + value is neither 'application/x-www-form-urlencoded' nor + 'multipart/form-data'. + :type schema_id: str + :param type_name: Type name defined by the schema. Applicable only if + 'contentType' value is neither 'application/x-www-form-urlencoded' nor + 'multipart/form-data'. + :type type_name: str + :param form_parameters: Collection of form parameters. Required if + 'contentType' value is either 'application/x-www-form-urlencoded' or + 'multipart/form-data'.. + :type form_parameters: + list[~azure.mgmt.apimanagement.models.ParameterContract] + """ + + _validation = { + 'content_type': {'required': True}, + } + + _attribute_map = { + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'sample': {'key': 'sample', 'type': 'str'}, + 'schema_id': {'key': 'schemaId', 'type': 'str'}, + 'type_name': {'key': 'typeName', 'type': 'str'}, + 'form_parameters': {'key': 'formParameters', 'type': '[ParameterContract]'}, + } + + def __init__(self, *, content_type: str, sample: str=None, schema_id: str=None, type_name: str=None, form_parameters=None, **kwargs) -> None: + super(RepresentationContract, self).__init__(**kwargs) + self.content_type = content_type + self.sample = sample + self.schema_id = schema_id + self.type_name = type_name + self.form_parameters = form_parameters + + +class RequestContract(Model): + """Operation request details. + + :param description: Operation request description. + :type description: str + :param query_parameters: Collection of operation request query parameters. + :type query_parameters: + list[~azure.mgmt.apimanagement.models.ParameterContract] + :param headers: Collection of operation request headers. + :type headers: list[~azure.mgmt.apimanagement.models.ParameterContract] + :param representations: Collection of operation request representations. + :type representations: + list[~azure.mgmt.apimanagement.models.RepresentationContract] + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'query_parameters': {'key': 'queryParameters', 'type': '[ParameterContract]'}, + 'headers': {'key': 'headers', 'type': '[ParameterContract]'}, + 'representations': {'key': 'representations', 'type': '[RepresentationContract]'}, + } + + def __init__(self, *, description: str=None, query_parameters=None, headers=None, representations=None, **kwargs) -> None: + super(RequestContract, self).__init__(**kwargs) + self.description = description + self.query_parameters = query_parameters + self.headers = headers + self.representations = representations + + +class RequestReportRecordContract(Model): + """Request Report data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param api_id: API identifier path. /apis/{apiId} + :type api_id: str + :param operation_id: Operation identifier path. + /apis/{apiId}/operations/{operationId} + :type operation_id: str + :ivar product_id: Product identifier path. /products/{productId} + :vartype product_id: str + :ivar user_id: User identifier path. /users/{userId} + :vartype user_id: str + :param method: The HTTP method associated with this request.. + :type method: str + :param url: The full URL associated with this request. + :type url: str + :param ip_address: The client IP address associated with this request. + :type ip_address: str + :param backend_response_code: The HTTP status code received by the gateway + as a result of forwarding this request to the backend. + :type backend_response_code: str + :param response_code: The HTTP status code returned by the gateway. + :type response_code: int + :param response_size: The size of the response returned by the gateway. + :type response_size: int + :param timestamp: The date and time when this request was received by the + gateway in ISO 8601 format. + :type timestamp: datetime + :param cache: Specifies if response cache was involved in generating the + response. If the value is none, the cache was not used. If the value is + hit, cached response was returned. If the value is miss, the cache was + used but lookup resulted in a miss and request was fulfilled by the + backend. + :type cache: str + :param api_time: The total time it took to process this request. + :type api_time: float + :param service_time: he time it took to forward this request to the + backend and get the response back. + :type service_time: float + :param api_region: Azure region where the gateway that processed this + request is located. + :type api_region: str + :param subscription_id: Subscription identifier path. + /subscriptions/{subscriptionId} + :type subscription_id: str + :param request_id: Request Identifier. + :type request_id: str + :param request_size: The size of this request.. + :type request_size: int + """ + + _validation = { + 'product_id': {'readonly': True}, + 'user_id': {'readonly': True}, + } + + _attribute_map = { + 'api_id': {'key': 'apiId', 'type': 'str'}, + 'operation_id': {'key': 'operationId', 'type': 'str'}, + 'product_id': {'key': 'productId', 'type': 'str'}, + 'user_id': {'key': 'userId', 'type': 'str'}, + 'method': {'key': 'method', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'backend_response_code': {'key': 'backendResponseCode', 'type': 'str'}, + 'response_code': {'key': 'responseCode', 'type': 'int'}, + 'response_size': {'key': 'responseSize', 'type': 'int'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'cache': {'key': 'cache', 'type': 'str'}, + 'api_time': {'key': 'apiTime', 'type': 'float'}, + 'service_time': {'key': 'serviceTime', 'type': 'float'}, + 'api_region': {'key': 'apiRegion', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'request_size': {'key': 'requestSize', 'type': 'int'}, + } + + def __init__(self, *, api_id: str=None, operation_id: str=None, method: str=None, url: str=None, ip_address: str=None, backend_response_code: str=None, response_code: int=None, response_size: int=None, timestamp=None, cache: str=None, api_time: float=None, service_time: float=None, api_region: str=None, subscription_id: str=None, request_id: str=None, request_size: int=None, **kwargs) -> None: + super(RequestReportRecordContract, self).__init__(**kwargs) + self.api_id = api_id + self.operation_id = operation_id + self.product_id = None + self.user_id = None + self.method = method + self.url = url + self.ip_address = ip_address + self.backend_response_code = backend_response_code + self.response_code = response_code + self.response_size = response_size + self.timestamp = timestamp + self.cache = cache + self.api_time = api_time + self.service_time = service_time + self.api_region = api_region + self.subscription_id = subscription_id + self.request_id = request_id + self.request_size = request_size + + +class ResourceSku(Model): + """Describes an available API Management SKU. + + :param name: Name of the Sku. Possible values include: 'Developer', + 'Standard', 'Premium', 'Basic', 'Consumption' + :type name: str or ~azure.mgmt.apimanagement.models.SkuType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name=None, **kwargs) -> None: + super(ResourceSku, self).__init__(**kwargs) + self.name = name + + +class ResourceSkuCapacity(Model): + """Describes scaling information of a SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar minimum: The minimum capacity. + :vartype minimum: int + :ivar maximum: The maximum capacity that can be set. + :vartype maximum: int + :ivar default: The default capacity. + :vartype default: int + :ivar scale_type: The scale type applicable to the sku. Possible values + include: 'automatic', 'manual', 'none' + :vartype scale_type: str or + ~azure.mgmt.apimanagement.models.ResourceSkuCapacityScaleType + """ + + _validation = { + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'default': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'int'}, + 'maximum': {'key': 'maximum', 'type': 'int'}, + 'default': {'key': 'default', 'type': 'int'}, + 'scale_type': {'key': 'scaleType', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceSkuCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default = None + self.scale_type = None + + +class ResourceSkuResult(Model): + """Describes an available API Management service SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of resource the SKU applies to. + :vartype resource_type: str + :ivar sku: Specifies API Management SKU. + :vartype sku: ~azure.mgmt.apimanagement.models.ResourceSku + :ivar capacity: Specifies the number of API Management units. + :vartype capacity: ~azure.mgmt.apimanagement.models.ResourceSkuCapacity + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'sku': {'readonly': True}, + 'capacity': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'ResourceSku'}, + 'capacity': {'key': 'capacity', 'type': 'ResourceSkuCapacity'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceSkuResult, self).__init__(**kwargs) + self.resource_type = None + self.sku = None + self.capacity = None + + +class ResponseContract(Model): + """Operation response details. + + All required parameters must be populated in order to send to Azure. + + :param status_code: Required. Operation response HTTP status code. + :type status_code: int + :param description: Operation response description. + :type description: str + :param representations: Collection of operation response representations. + :type representations: + list[~azure.mgmt.apimanagement.models.RepresentationContract] + :param headers: Collection of operation response headers. + :type headers: list[~azure.mgmt.apimanagement.models.ParameterContract] + """ + + _validation = { + 'status_code': {'required': True}, + } + + _attribute_map = { + 'status_code': {'key': 'statusCode', 'type': 'int'}, + 'description': {'key': 'description', 'type': 'str'}, + 'representations': {'key': 'representations', 'type': '[RepresentationContract]'}, + 'headers': {'key': 'headers', 'type': '[ParameterContract]'}, + } + + def __init__(self, *, status_code: int, description: str=None, representations=None, headers=None, **kwargs) -> None: + super(ResponseContract, self).__init__(**kwargs) + self.status_code = status_code + self.description = description + self.representations = representations + self.headers = headers + + +class SamplingSettings(Model): + """Sampling settings for Diagnostic. + + :param sampling_type: Sampling type. Possible values include: 'fixed' + :type sampling_type: str or ~azure.mgmt.apimanagement.models.SamplingType + :param percentage: Rate of sampling for fixed-rate sampling. + :type percentage: float + """ + + _validation = { + 'percentage': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'sampling_type': {'key': 'samplingType', 'type': 'str'}, + 'percentage': {'key': 'percentage', 'type': 'float'}, + } + + def __init__(self, *, sampling_type=None, percentage: float=None, **kwargs) -> None: + super(SamplingSettings, self).__init__(**kwargs) + self.sampling_type = sampling_type + self.percentage = percentage + + +class SaveConfigurationParameter(Model): + """Save Tenant Configuration Contract details. + + All required parameters must be populated in order to send to Azure. + + :param branch: Required. The name of the Git branch in which to commit the + current configuration snapshot. + :type branch: str + :param force: The value if true, the current configuration database is + committed to the Git repository, even if the Git repository has newer + changes that would be overwritten. + :type force: bool + """ + + _validation = { + 'branch': {'required': True}, + } + + _attribute_map = { + 'branch': {'key': 'properties.branch', 'type': 'str'}, + 'force': {'key': 'properties.force', 'type': 'bool'}, + } + + def __init__(self, *, branch: str, force: bool=None, **kwargs) -> None: + super(SaveConfigurationParameter, self).__init__(**kwargs) + self.branch = branch + self.force = force + + +class SchemaContract(Resource): + """Schema Contract details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param content_type: Required. Must be a valid a media type used in a + Content-Type header as defined in the RFC 2616. Media type of the schema + document (e.g. application/json, application/xml).
- `Swagger` + Schema use `application/vnd.ms-azure-apim.swagger.definitions+json`
+ - `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml`
- + `OpenApi` Schema use `application/vnd.oai.openapi.components+json`
- + `WADL Schema` use `application/vnd.ms-azure-apim.wadl.grammars+xml`. + :type content_type: str + :param document: Properties of the Schema Document. + :type document: object + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'content_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'content_type': {'key': 'properties.contentType', 'type': 'str'}, + 'document': {'key': 'properties.document', 'type': 'object'}, + } + + def __init__(self, *, content_type: str, document=None, **kwargs) -> None: + super(SchemaContract, self).__init__(**kwargs) + self.content_type = content_type + self.document = document + + +class SchemaCreateOrUpdateContract(Resource): + """Schema Contract details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param content_type: Required. Must be a valid a media type used in a + Content-Type header as defined in the RFC 2616. Media type of the schema + document (e.g. application/json, application/xml).
- `Swagger` + Schema use `application/vnd.ms-azure-apim.swagger.definitions+json`
+ - `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml`
- + `OpenApi` Schema use `application/vnd.oai.openapi.components+json`
- + `WADL Schema` use `application/vnd.ms-azure-apim.wadl.grammars+xml`. + :type content_type: str + :param value: Json escaped string defining the document representing the + Schema. + :type value: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'content_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'content_type': {'key': 'properties.contentType', 'type': 'str'}, + 'value': {'key': 'properties.document.value', 'type': 'str'}, + } + + def __init__(self, *, content_type: str, value: str=None, **kwargs) -> None: + super(SchemaCreateOrUpdateContract, self).__init__(**kwargs) + self.content_type = content_type + self.value = value + + +class SubscriptionContract(Resource): + """Subscription details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param owner_id: The user resource identifier of the subscription owner. + The value is a valid relative URL in the format of /users/{userId} where + {userId} is a user identifier. + :type owner_id: str + :param scope: Required. Scope like /products/{productId} or /apis or + /apis/{apiId}. + :type scope: str + :param display_name: The name of the subscription, or null if the + subscription has no name. + :type display_name: str + :param state: Required. Subscription state. Possible states are * active – + the subscription is active, * suspended – the subscription is blocked, and + the subscriber cannot call any APIs of the product, * submitted – the + subscription request has been made by the developer, but has not yet been + approved or rejected, * rejected – the subscription request has been + denied by an administrator, * cancelled – the subscription has been + cancelled by the developer or administrator, * expired – the subscription + reached its expiration date and was deactivated. Possible values include: + 'suspended', 'active', 'expired', 'submitted', 'rejected', 'cancelled' + :type state: str or ~azure.mgmt.apimanagement.models.SubscriptionState + :ivar created_date: Subscription creation date. The date conforms to the + following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 + standard. + :vartype created_date: datetime + :param start_date: Subscription activation date. The setting is for audit + purposes only and the subscription is not automatically activated. The + subscription lifecycle can be managed by using the `state` property. The + date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified + by the ISO 8601 standard. + :type start_date: datetime + :param expiration_date: Subscription expiration date. The setting is for + audit purposes only and the subscription is not automatically expired. The + subscription lifecycle can be managed by using the `state` property. The + date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified + by the ISO 8601 standard. + :type expiration_date: datetime + :param end_date: Date when subscription was cancelled or expired. The + setting is for audit purposes only and the subscription is not + automatically cancelled. The subscription lifecycle can be managed by + using the `state` property. The date conforms to the following format: + `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + :type end_date: datetime + :param notification_date: Upcoming subscription expiration notification + date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as + specified by the ISO 8601 standard. + :type notification_date: datetime + :param primary_key: Required. Subscription primary key. + :type primary_key: str + :param secondary_key: Required. Subscription secondary key. + :type secondary_key: str + :param state_comment: Optional subscription comment added by an + administrator. + :type state_comment: str + :param allow_tracing: Determines whether tracing is enabled + :type allow_tracing: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'scope': {'required': True}, + 'display_name': {'max_length': 100, 'min_length': 0}, + 'state': {'required': True}, + 'created_date': {'readonly': True}, + 'primary_key': {'required': True, 'max_length': 256, 'min_length': 1}, + 'secondary_key': {'required': True, 'max_length': 256, 'min_length': 1}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'owner_id': {'key': 'properties.ownerId', 'type': 'str'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SubscriptionState'}, + 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, + 'start_date': {'key': 'properties.startDate', 'type': 'iso-8601'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'end_date': {'key': 'properties.endDate', 'type': 'iso-8601'}, + 'notification_date': {'key': 'properties.notificationDate', 'type': 'iso-8601'}, + 'primary_key': {'key': 'properties.primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'properties.secondaryKey', 'type': 'str'}, + 'state_comment': {'key': 'properties.stateComment', 'type': 'str'}, + 'allow_tracing': {'key': 'properties.allowTracing', 'type': 'bool'}, + } + + def __init__(self, *, scope: str, state, primary_key: str, secondary_key: str, owner_id: str=None, display_name: str=None, start_date=None, expiration_date=None, end_date=None, notification_date=None, state_comment: str=None, allow_tracing: bool=None, **kwargs) -> None: + super(SubscriptionContract, self).__init__(**kwargs) + self.owner_id = owner_id + self.scope = scope + self.display_name = display_name + self.state = state + self.created_date = None + self.start_date = start_date + self.expiration_date = expiration_date + self.end_date = end_date + self.notification_date = notification_date + self.primary_key = primary_key + self.secondary_key = secondary_key + self.state_comment = state_comment + self.allow_tracing = allow_tracing + + +class SubscriptionCreateParameters(Model): + """Subscription create details. + + All required parameters must be populated in order to send to Azure. + + :param owner_id: User (user id path) for whom subscription is being + created in form /users/{userId} + :type owner_id: str + :param scope: Required. Scope like /products/{productId} or /apis or + /apis/{apiId}. + :type scope: str + :param display_name: Required. Subscription name. + :type display_name: str + :param primary_key: Primary subscription key. If not specified during + request key will be generated automatically. + :type primary_key: str + :param secondary_key: Secondary subscription key. If not specified during + request key will be generated automatically. + :type secondary_key: str + :param state: Initial subscription state. If no value is specified, + subscription is created with Submitted state. Possible states are * active + – the subscription is active, * suspended – the subscription is blocked, + and the subscriber cannot call any APIs of the product, * submitted – the + subscription request has been made by the developer, but has not yet been + approved or rejected, * rejected – the subscription request has been + denied by an administrator, * cancelled – the subscription has been + cancelled by the developer or administrator, * expired – the subscription + reached its expiration date and was deactivated. Possible values include: + 'suspended', 'active', 'expired', 'submitted', 'rejected', 'cancelled' + :type state: str or ~azure.mgmt.apimanagement.models.SubscriptionState + :param allow_tracing: Determines whether tracing can be enabled + :type allow_tracing: bool + """ + + _validation = { + 'scope': {'required': True}, + 'display_name': {'required': True, 'max_length': 100, 'min_length': 1}, + 'primary_key': {'max_length': 256, 'min_length': 1}, + 'secondary_key': {'max_length': 256, 'min_length': 1}, + } + + _attribute_map = { + 'owner_id': {'key': 'properties.ownerId', 'type': 'str'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'primary_key': {'key': 'properties.primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'properties.secondaryKey', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SubscriptionState'}, + 'allow_tracing': {'key': 'properties.allowTracing', 'type': 'bool'}, + } + + def __init__(self, *, scope: str, display_name: str, owner_id: str=None, primary_key: str=None, secondary_key: str=None, state=None, allow_tracing: bool=None, **kwargs) -> None: + super(SubscriptionCreateParameters, self).__init__(**kwargs) + self.owner_id = owner_id + self.scope = scope + self.display_name = display_name + self.primary_key = primary_key + self.secondary_key = secondary_key + self.state = state + self.allow_tracing = allow_tracing + + +class SubscriptionKeyParameterNamesContract(Model): + """Subscription key parameter names details. + + :param header: Subscription key header name. + :type header: str + :param query: Subscription key query string parameter name. + :type query: str + """ + + _attribute_map = { + 'header': {'key': 'header', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'str'}, + } + + def __init__(self, *, header: str=None, query: str=None, **kwargs) -> None: + super(SubscriptionKeyParameterNamesContract, self).__init__(**kwargs) + self.header = header + self.query = query + + +class SubscriptionsDelegationSettingsProperties(Model): + """Subscriptions delegation settings properties. + + :param enabled: Enable or disable delegation for subscriptions. + :type enabled: bool + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, *, enabled: bool=None, **kwargs) -> None: + super(SubscriptionsDelegationSettingsProperties, self).__init__(**kwargs) + self.enabled = enabled + + +class SubscriptionUpdateParameters(Model): + """Subscription update details. + + :param owner_id: User identifier path: /users/{userId} + :type owner_id: str + :param scope: Scope like /products/{productId} or /apis or /apis/{apiId} + :type scope: str + :param expiration_date: Subscription expiration date. The setting is for + audit purposes only and the subscription is not automatically expired. The + subscription lifecycle can be managed by using the `state` property. The + date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified + by the ISO 8601 standard. + :type expiration_date: datetime + :param display_name: Subscription name. + :type display_name: str + :param primary_key: Primary subscription key. + :type primary_key: str + :param secondary_key: Secondary subscription key. + :type secondary_key: str + :param state: Subscription state. Possible states are * active – the + subscription is active, * suspended – the subscription is blocked, and the + subscriber cannot call any APIs of the product, * submitted – the + subscription request has been made by the developer, but has not yet been + approved or rejected, * rejected – the subscription request has been + denied by an administrator, * cancelled – the subscription has been + cancelled by the developer or administrator, * expired – the subscription + reached its expiration date and was deactivated. Possible values include: + 'suspended', 'active', 'expired', 'submitted', 'rejected', 'cancelled' + :type state: str or ~azure.mgmt.apimanagement.models.SubscriptionState + :param state_comment: Comments describing subscription state change by the + administrator. + :type state_comment: str + :param allow_tracing: Determines whether tracing can be enabled + :type allow_tracing: bool + """ + + _validation = { + 'primary_key': {'max_length': 256, 'min_length': 1}, + 'secondary_key': {'max_length': 256, 'min_length': 1}, + } + + _attribute_map = { + 'owner_id': {'key': 'properties.ownerId', 'type': 'str'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'primary_key': {'key': 'properties.primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'properties.secondaryKey', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'SubscriptionState'}, + 'state_comment': {'key': 'properties.stateComment', 'type': 'str'}, + 'allow_tracing': {'key': 'properties.allowTracing', 'type': 'bool'}, + } + + def __init__(self, *, owner_id: str=None, scope: str=None, expiration_date=None, display_name: str=None, primary_key: str=None, secondary_key: str=None, state=None, state_comment: str=None, allow_tracing: bool=None, **kwargs) -> None: + super(SubscriptionUpdateParameters, self).__init__(**kwargs) + self.owner_id = owner_id + self.scope = scope + self.expiration_date = expiration_date + self.display_name = display_name + self.primary_key = primary_key + self.secondary_key = secondary_key + self.state = state + self.state_comment = state_comment + self.allow_tracing = allow_tracing + + +class TagContract(Resource): + """Tag Contract details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param display_name: Required. Tag name. + :type display_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'required': True, 'max_length': 160, 'min_length': 1}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + } + + def __init__(self, *, display_name: str, **kwargs) -> None: + super(TagContract, self).__init__(**kwargs) + self.display_name = display_name + + +class TagCreateUpdateParameters(Model): + """Parameters supplied to Create/Update Tag operations. + + All required parameters must be populated in order to send to Azure. + + :param display_name: Required. Tag name. + :type display_name: str + """ + + _validation = { + 'display_name': {'required': True, 'max_length': 160, 'min_length': 1}, + } + + _attribute_map = { + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + } + + def __init__(self, *, display_name: str, **kwargs) -> None: + super(TagCreateUpdateParameters, self).__init__(**kwargs) + self.display_name = display_name + + +class TagDescriptionContract(Resource): + """Contract details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param description: Description of the Tag. + :type description: str + :param external_docs_url: Absolute URL of external resources describing + the tag. + :type external_docs_url: str + :param external_docs_description: Description of the external resources + describing the tag. + :type external_docs_description: str + :param display_name: Tag name. + :type display_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'external_docs_url': {'max_length': 2000}, + 'display_name': {'max_length': 160, 'min_length': 1}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'external_docs_url': {'key': 'properties.externalDocsUrl', 'type': 'str'}, + 'external_docs_description': {'key': 'properties.externalDocsDescription', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + } + + def __init__(self, *, description: str=None, external_docs_url: str=None, external_docs_description: str=None, display_name: str=None, **kwargs) -> None: + super(TagDescriptionContract, self).__init__(**kwargs) + self.description = description + self.external_docs_url = external_docs_url + self.external_docs_description = external_docs_description + self.display_name = display_name + + +class TagDescriptionCreateParameters(Model): + """Parameters supplied to the Create TagDescription operation. + + :param description: Description of the Tag. + :type description: str + :param external_docs_url: Absolute URL of external resources describing + the tag. + :type external_docs_url: str + :param external_docs_description: Description of the external resources + describing the tag. + :type external_docs_description: str + """ + + _validation = { + 'external_docs_url': {'max_length': 2000}, + } + + _attribute_map = { + 'description': {'key': 'properties.description', 'type': 'str'}, + 'external_docs_url': {'key': 'properties.externalDocsUrl', 'type': 'str'}, + 'external_docs_description': {'key': 'properties.externalDocsDescription', 'type': 'str'}, + } + + def __init__(self, *, description: str=None, external_docs_url: str=None, external_docs_description: str=None, **kwargs) -> None: + super(TagDescriptionCreateParameters, self).__init__(**kwargs) + self.description = description + self.external_docs_url = external_docs_url + self.external_docs_description = external_docs_description + + +class TagResourceContract(Model): + """TagResource contract properties. + + All required parameters must be populated in order to send to Azure. + + :param tag: Required. Tag associated with the resource. + :type tag: + ~azure.mgmt.apimanagement.models.TagTagResourceContractProperties + :param api: Api associated with the tag. + :type api: + ~azure.mgmt.apimanagement.models.ApiTagResourceContractProperties + :param operation: Operation associated with the tag. + :type operation: + ~azure.mgmt.apimanagement.models.OperationTagResourceContractProperties + :param product: Product associated with the tag. + :type product: + ~azure.mgmt.apimanagement.models.ProductTagResourceContractProperties + """ + + _validation = { + 'tag': {'required': True}, + } + + _attribute_map = { + 'tag': {'key': 'tag', 'type': 'TagTagResourceContractProperties'}, + 'api': {'key': 'api', 'type': 'ApiTagResourceContractProperties'}, + 'operation': {'key': 'operation', 'type': 'OperationTagResourceContractProperties'}, + 'product': {'key': 'product', 'type': 'ProductTagResourceContractProperties'}, + } + + def __init__(self, *, tag, api=None, operation=None, product=None, **kwargs) -> None: + super(TagResourceContract, self).__init__(**kwargs) + self.tag = tag + self.api = api + self.operation = operation + self.product = product + + +class TagTagResourceContractProperties(Model): + """Contract defining the Tag property in the Tag Resource Contract. + + :param id: Tag identifier + :type id: str + :param name: Tag Name + :type name: str + """ + + _validation = { + 'name': {'max_length': 160, 'min_length': 1}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: + super(TagTagResourceContractProperties, self).__init__(**kwargs) + self.id = id + self.name = name + + +class TenantConfigurationSyncStateContract(Model): + """Tenant Configuration Synchronization State. + + :param branch: The name of Git branch. + :type branch: str + :param commit_id: The latest commit Id. + :type commit_id: str + :param is_export: value indicating if last sync was save (true) or deploy + (false) operation. + :type is_export: bool + :param is_synced: value indicating if last synchronization was later than + the configuration change. + :type is_synced: bool + :param is_git_enabled: value indicating whether Git configuration access + is enabled. + :type is_git_enabled: bool + :param sync_date: The date of the latest synchronization. The date + conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by + the ISO 8601 standard. + :type sync_date: datetime + :param configuration_change_date: The date of the latest configuration + change. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` + as specified by the ISO 8601 standard. + :type configuration_change_date: datetime + """ + + _attribute_map = { + 'branch': {'key': 'branch', 'type': 'str'}, + 'commit_id': {'key': 'commitId', 'type': 'str'}, + 'is_export': {'key': 'isExport', 'type': 'bool'}, + 'is_synced': {'key': 'isSynced', 'type': 'bool'}, + 'is_git_enabled': {'key': 'isGitEnabled', 'type': 'bool'}, + 'sync_date': {'key': 'syncDate', 'type': 'iso-8601'}, + 'configuration_change_date': {'key': 'configurationChangeDate', 'type': 'iso-8601'}, + } + + def __init__(self, *, branch: str=None, commit_id: str=None, is_export: bool=None, is_synced: bool=None, is_git_enabled: bool=None, sync_date=None, configuration_change_date=None, **kwargs) -> None: + super(TenantConfigurationSyncStateContract, self).__init__(**kwargs) + self.branch = branch + self.commit_id = commit_id + self.is_export = is_export + self.is_synced = is_synced + self.is_git_enabled = is_git_enabled + self.sync_date = sync_date + self.configuration_change_date = configuration_change_date + + +class TermsOfServiceProperties(Model): + """Terms of service contract properties. + + :param text: A terms of service text. + :type text: str + :param enabled: Display terms of service during a sign-up process. + :type enabled: bool + :param consent_required: Ask user for consent to the terms of service. + :type consent_required: bool + """ + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'consent_required': {'key': 'consentRequired', 'type': 'bool'}, + } + + def __init__(self, *, text: str=None, enabled: bool=None, consent_required: bool=None, **kwargs) -> None: + super(TermsOfServiceProperties, self).__init__(**kwargs) + self.text = text + self.enabled = enabled + self.consent_required = consent_required + + +class TokenBodyParameterContract(Model): + """OAuth acquire token request body parameter (www-url-form-encoded). + + All required parameters must be populated in order to send to Azure. + + :param name: Required. body parameter name. + :type name: str + :param value: Required. body parameter value. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str, value: str, **kwargs) -> None: + super(TokenBodyParameterContract, self).__init__(**kwargs) + self.name = name + self.value = value + + +class UserContract(Resource): + """User details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param state: Account state. Specifies whether the user is active or not. + Blocked users are unable to sign into the developer portal or call any + APIs of subscribed products. Default state is Active. Possible values + include: 'active', 'blocked', 'pending', 'deleted'. Default value: + "active" . + :type state: str or ~azure.mgmt.apimanagement.models.UserState + :param note: Optional note about a user set by the administrator. + :type note: str + :param identities: Collection of user identities. + :type identities: + list[~azure.mgmt.apimanagement.models.UserIdentityContract] + :param first_name: First name. + :type first_name: str + :param last_name: Last name. + :type last_name: str + :param email: Email address. + :type email: str + :param registration_date: Date of user registration. The date conforms to + the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 + standard. + :type registration_date: datetime + :ivar groups: Collection of groups user is part of. + :vartype groups: + list[~azure.mgmt.apimanagement.models.GroupContractProperties] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'groups': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'note': {'key': 'properties.note', 'type': 'str'}, + 'identities': {'key': 'properties.identities', 'type': '[UserIdentityContract]'}, + 'first_name': {'key': 'properties.firstName', 'type': 'str'}, + 'last_name': {'key': 'properties.lastName', 'type': 'str'}, + 'email': {'key': 'properties.email', 'type': 'str'}, + 'registration_date': {'key': 'properties.registrationDate', 'type': 'iso-8601'}, + 'groups': {'key': 'properties.groups', 'type': '[GroupContractProperties]'}, + } + + def __init__(self, *, state="active", note: str=None, identities=None, first_name: str=None, last_name: str=None, email: str=None, registration_date=None, **kwargs) -> None: + super(UserContract, self).__init__(**kwargs) + self.state = state + self.note = note + self.identities = identities + self.first_name = first_name + self.last_name = last_name + self.email = email + self.registration_date = registration_date + self.groups = None + + +class UserCreateParameters(Model): + """User create details. + + All required parameters must be populated in order to send to Azure. + + :param state: Account state. Specifies whether the user is active or not. + Blocked users are unable to sign into the developer portal or call any + APIs of subscribed products. Default state is Active. Possible values + include: 'active', 'blocked', 'pending', 'deleted'. Default value: + "active" . + :type state: str or ~azure.mgmt.apimanagement.models.UserState + :param note: Optional note about a user set by the administrator. + :type note: str + :param identities: Collection of user identities. + :type identities: + list[~azure.mgmt.apimanagement.models.UserIdentityContract] + :param email: Required. Email address. Must not be empty and must be + unique within the service instance. + :type email: str + :param first_name: Required. First name. + :type first_name: str + :param last_name: Required. Last name. + :type last_name: str + :param password: User Password. If no value is provided, a default + password is generated. + :type password: str + :param confirmation: Determines the type of confirmation e-mail that will + be sent to the newly created user. Possible values include: 'signup', + 'invite' + :type confirmation: str or ~azure.mgmt.apimanagement.models.Confirmation + """ + + _validation = { + 'email': {'required': True, 'max_length': 254, 'min_length': 1}, + 'first_name': {'required': True, 'max_length': 100, 'min_length': 1}, + 'last_name': {'required': True, 'max_length': 100, 'min_length': 1}, + } + + _attribute_map = { + 'state': {'key': 'properties.state', 'type': 'str'}, + 'note': {'key': 'properties.note', 'type': 'str'}, + 'identities': {'key': 'properties.identities', 'type': '[UserIdentityContract]'}, + 'email': {'key': 'properties.email', 'type': 'str'}, + 'first_name': {'key': 'properties.firstName', 'type': 'str'}, + 'last_name': {'key': 'properties.lastName', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'confirmation': {'key': 'properties.confirmation', 'type': 'str'}, + } + + def __init__(self, *, email: str, first_name: str, last_name: str, state="active", note: str=None, identities=None, password: str=None, confirmation=None, **kwargs) -> None: + super(UserCreateParameters, self).__init__(**kwargs) + self.state = state + self.note = note + self.identities = identities + self.email = email + self.first_name = first_name + self.last_name = last_name + self.password = password + self.confirmation = confirmation + + +class UserEntityBaseParameters(Model): + """User Entity Base Parameters set. + + :param state: Account state. Specifies whether the user is active or not. + Blocked users are unable to sign into the developer portal or call any + APIs of subscribed products. Default state is Active. Possible values + include: 'active', 'blocked', 'pending', 'deleted'. Default value: + "active" . + :type state: str or ~azure.mgmt.apimanagement.models.UserState + :param note: Optional note about a user set by the administrator. + :type note: str + :param identities: Collection of user identities. + :type identities: + list[~azure.mgmt.apimanagement.models.UserIdentityContract] + """ + + _attribute_map = { + 'state': {'key': 'state', 'type': 'str'}, + 'note': {'key': 'note', 'type': 'str'}, + 'identities': {'key': 'identities', 'type': '[UserIdentityContract]'}, + } + + def __init__(self, *, state="active", note: str=None, identities=None, **kwargs) -> None: + super(UserEntityBaseParameters, self).__init__(**kwargs) + self.state = state + self.note = note + self.identities = identities + + +class UserIdentityContract(Model): + """User identity details. + + :param provider: Identity provider name. + :type provider: str + :param id: Identifier value within provider. + :type id: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, id: str=None, **kwargs) -> None: + super(UserIdentityContract, self).__init__(**kwargs) + self.provider = provider + self.id = id + + +class UserTokenParameters(Model): + """Get User Token parameters. + + All required parameters must be populated in order to send to Azure. + + :param key_type: Required. The Key to be used to generate token for user. + Possible values include: 'primary', 'secondary'. Default value: "primary" + . + :type key_type: str or ~azure.mgmt.apimanagement.models.KeyType + :param expiry: Required. The Expiry time of the Token. Maximum token + expiry time is set to 30 days. The date conforms to the following format: + `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + :type expiry: datetime + """ + + _validation = { + 'key_type': {'required': True}, + 'expiry': {'required': True}, + } + + _attribute_map = { + 'key_type': {'key': 'properties.keyType', 'type': 'KeyType'}, + 'expiry': {'key': 'properties.expiry', 'type': 'iso-8601'}, + } + + def __init__(self, *, expiry, key_type="primary", **kwargs) -> None: + super(UserTokenParameters, self).__init__(**kwargs) + self.key_type = key_type + self.expiry = expiry + + +class UserTokenResult(Model): + """Get User Token response details. + + :param value: Shared Access Authorization token for the User. + :type value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, **kwargs) -> None: + super(UserTokenResult, self).__init__(**kwargs) + self.value = value + + +class UserUpdateParameters(Model): + """User update parameters. + + :param state: Account state. Specifies whether the user is active or not. + Blocked users are unable to sign into the developer portal or call any + APIs of subscribed products. Default state is Active. Possible values + include: 'active', 'blocked', 'pending', 'deleted'. Default value: + "active" . + :type state: str or ~azure.mgmt.apimanagement.models.UserState + :param note: Optional note about a user set by the administrator. + :type note: str + :param identities: Collection of user identities. + :type identities: + list[~azure.mgmt.apimanagement.models.UserIdentityContract] + :param email: Email address. Must not be empty and must be unique within + the service instance. + :type email: str + :param password: User Password. + :type password: str + :param first_name: First name. + :type first_name: str + :param last_name: Last name. + :type last_name: str + """ + + _validation = { + 'email': {'max_length': 254, 'min_length': 1}, + 'first_name': {'max_length': 100, 'min_length': 1}, + 'last_name': {'max_length': 100, 'min_length': 1}, + } + + _attribute_map = { + 'state': {'key': 'properties.state', 'type': 'str'}, + 'note': {'key': 'properties.note', 'type': 'str'}, + 'identities': {'key': 'properties.identities', 'type': '[UserIdentityContract]'}, + 'email': {'key': 'properties.email', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'first_name': {'key': 'properties.firstName', 'type': 'str'}, + 'last_name': {'key': 'properties.lastName', 'type': 'str'}, + } + + def __init__(self, *, state="active", note: str=None, identities=None, email: str=None, password: str=None, first_name: str=None, last_name: str=None, **kwargs) -> None: + super(UserUpdateParameters, self).__init__(**kwargs) + self.state = state + self.note = note + self.identities = identities + self.email = email + self.password = password + self.first_name = first_name + self.last_name = last_name + + +class VirtualNetworkConfiguration(Model): + """Configuration of a virtual network to which API Management service is + deployed. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar vnetid: The virtual network ID. This is typically a GUID. Expect a + null GUID by default. + :vartype vnetid: str + :ivar subnetname: The name of the subnet. + :vartype subnetname: str + :param subnet_resource_id: The full resource ID of a subnet in a virtual + network to deploy the API Management service in. + :type subnet_resource_id: str + """ + + _validation = { + 'vnetid': {'readonly': True}, + 'subnetname': {'readonly': True}, + 'subnet_resource_id': {'pattern': r'^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.(ClassicNetwork|Network)/virtualNetworks/[^/]*/subnets/[^/]*$'}, + } + + _attribute_map = { + 'vnetid': {'key': 'vnetid', 'type': 'str'}, + 'subnetname': {'key': 'subnetname', 'type': 'str'}, + 'subnet_resource_id': {'key': 'subnetResourceId', 'type': 'str'}, + } + + def __init__(self, *, subnet_resource_id: str=None, **kwargs) -> None: + super(VirtualNetworkConfiguration, self).__init__(**kwargs) + self.vnetid = None + self.subnetname = None + self.subnet_resource_id = subnet_resource_id + + +class X509CertificateName(Model): + """Properties of server X509Names. + + :param name: Common Name of the Certificate. + :type name: str + :param issuer_certificate_thumbprint: Thumbprint for the Issuer of the + Certificate. + :type issuer_certificate_thumbprint: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'issuer_certificate_thumbprint': {'key': 'issuerCertificateThumbprint', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, issuer_certificate_thumbprint: str=None, **kwargs) -> None: + super(X509CertificateName, self).__init__(**kwargs) + self.name = name + self.issuer_certificate_thumbprint = issuer_certificate_thumbprint diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_paged_models.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_paged_models.py new file mode 100644 index 000000000000..00805dffaafd --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_paged_models.py @@ -0,0 +1,456 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class ApiContractPaged(Paged): + """ + A paging container for iterating over a list of :class:`ApiContract ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ApiContract]'} + } + + def __init__(self, *args, **kwargs): + + super(ApiContractPaged, self).__init__(*args, **kwargs) +class TagResourceContractPaged(Paged): + """ + A paging container for iterating over a list of :class:`TagResourceContract ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TagResourceContract]'} + } + + def __init__(self, *args, **kwargs): + + super(TagResourceContractPaged, self).__init__(*args, **kwargs) +class ApiRevisionContractPaged(Paged): + """ + A paging container for iterating over a list of :class:`ApiRevisionContract ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ApiRevisionContract]'} + } + + def __init__(self, *args, **kwargs): + + super(ApiRevisionContractPaged, self).__init__(*args, **kwargs) +class ApiReleaseContractPaged(Paged): + """ + A paging container for iterating over a list of :class:`ApiReleaseContract ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ApiReleaseContract]'} + } + + def __init__(self, *args, **kwargs): + + super(ApiReleaseContractPaged, self).__init__(*args, **kwargs) +class OperationContractPaged(Paged): + """ + A paging container for iterating over a list of :class:`OperationContract ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[OperationContract]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationContractPaged, self).__init__(*args, **kwargs) +class TagContractPaged(Paged): + """ + A paging container for iterating over a list of :class:`TagContract ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TagContract]'} + } + + def __init__(self, *args, **kwargs): + + super(TagContractPaged, self).__init__(*args, **kwargs) +class ProductContractPaged(Paged): + """ + A paging container for iterating over a list of :class:`ProductContract ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ProductContract]'} + } + + def __init__(self, *args, **kwargs): + + super(ProductContractPaged, self).__init__(*args, **kwargs) +class SchemaContractPaged(Paged): + """ + A paging container for iterating over a list of :class:`SchemaContract ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SchemaContract]'} + } + + def __init__(self, *args, **kwargs): + + super(SchemaContractPaged, self).__init__(*args, **kwargs) +class DiagnosticContractPaged(Paged): + """ + A paging container for iterating over a list of :class:`DiagnosticContract ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DiagnosticContract]'} + } + + def __init__(self, *args, **kwargs): + + super(DiagnosticContractPaged, self).__init__(*args, **kwargs) +class IssueContractPaged(Paged): + """ + A paging container for iterating over a list of :class:`IssueContract ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[IssueContract]'} + } + + def __init__(self, *args, **kwargs): + + super(IssueContractPaged, self).__init__(*args, **kwargs) +class IssueCommentContractPaged(Paged): + """ + A paging container for iterating over a list of :class:`IssueCommentContract ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[IssueCommentContract]'} + } + + def __init__(self, *args, **kwargs): + + super(IssueCommentContractPaged, self).__init__(*args, **kwargs) +class IssueAttachmentContractPaged(Paged): + """ + A paging container for iterating over a list of :class:`IssueAttachmentContract ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[IssueAttachmentContract]'} + } + + def __init__(self, *args, **kwargs): + + super(IssueAttachmentContractPaged, self).__init__(*args, **kwargs) +class TagDescriptionContractPaged(Paged): + """ + A paging container for iterating over a list of :class:`TagDescriptionContract ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TagDescriptionContract]'} + } + + def __init__(self, *args, **kwargs): + + super(TagDescriptionContractPaged, self).__init__(*args, **kwargs) +class ApiVersionSetContractPaged(Paged): + """ + A paging container for iterating over a list of :class:`ApiVersionSetContract ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ApiVersionSetContract]'} + } + + def __init__(self, *args, **kwargs): + + super(ApiVersionSetContractPaged, self).__init__(*args, **kwargs) +class AuthorizationServerContractPaged(Paged): + """ + A paging container for iterating over a list of :class:`AuthorizationServerContract ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AuthorizationServerContract]'} + } + + def __init__(self, *args, **kwargs): + + super(AuthorizationServerContractPaged, self).__init__(*args, **kwargs) +class BackendContractPaged(Paged): + """ + A paging container for iterating over a list of :class:`BackendContract ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[BackendContract]'} + } + + def __init__(self, *args, **kwargs): + + super(BackendContractPaged, self).__init__(*args, **kwargs) +class CacheContractPaged(Paged): + """ + A paging container for iterating over a list of :class:`CacheContract ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[CacheContract]'} + } + + def __init__(self, *args, **kwargs): + + super(CacheContractPaged, self).__init__(*args, **kwargs) +class CertificateContractPaged(Paged): + """ + A paging container for iterating over a list of :class:`CertificateContract ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[CertificateContract]'} + } + + def __init__(self, *args, **kwargs): + + super(CertificateContractPaged, self).__init__(*args, **kwargs) +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class ResourceSkuResultPaged(Paged): + """ + A paging container for iterating over a list of :class:`ResourceSkuResult ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ResourceSkuResult]'} + } + + def __init__(self, *args, **kwargs): + + super(ResourceSkuResultPaged, self).__init__(*args, **kwargs) +class ApiManagementServiceResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`ApiManagementServiceResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ApiManagementServiceResource]'} + } + + def __init__(self, *args, **kwargs): + + super(ApiManagementServiceResourcePaged, self).__init__(*args, **kwargs) +class EmailTemplateContractPaged(Paged): + """ + A paging container for iterating over a list of :class:`EmailTemplateContract ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[EmailTemplateContract]'} + } + + def __init__(self, *args, **kwargs): + + super(EmailTemplateContractPaged, self).__init__(*args, **kwargs) +class GroupContractPaged(Paged): + """ + A paging container for iterating over a list of :class:`GroupContract ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[GroupContract]'} + } + + def __init__(self, *args, **kwargs): + + super(GroupContractPaged, self).__init__(*args, **kwargs) +class UserContractPaged(Paged): + """ + A paging container for iterating over a list of :class:`UserContract ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[UserContract]'} + } + + def __init__(self, *args, **kwargs): + + super(UserContractPaged, self).__init__(*args, **kwargs) +class IdentityProviderContractPaged(Paged): + """ + A paging container for iterating over a list of :class:`IdentityProviderContract ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[IdentityProviderContract]'} + } + + def __init__(self, *args, **kwargs): + + super(IdentityProviderContractPaged, self).__init__(*args, **kwargs) +class LoggerContractPaged(Paged): + """ + A paging container for iterating over a list of :class:`LoggerContract ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[LoggerContract]'} + } + + def __init__(self, *args, **kwargs): + + super(LoggerContractPaged, self).__init__(*args, **kwargs) +class NotificationContractPaged(Paged): + """ + A paging container for iterating over a list of :class:`NotificationContract ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[NotificationContract]'} + } + + def __init__(self, *args, **kwargs): + + super(NotificationContractPaged, self).__init__(*args, **kwargs) +class OpenidConnectProviderContractPaged(Paged): + """ + A paging container for iterating over a list of :class:`OpenidConnectProviderContract ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[OpenidConnectProviderContract]'} + } + + def __init__(self, *args, **kwargs): + + super(OpenidConnectProviderContractPaged, self).__init__(*args, **kwargs) +class SubscriptionContractPaged(Paged): + """ + A paging container for iterating over a list of :class:`SubscriptionContract ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SubscriptionContract]'} + } + + def __init__(self, *args, **kwargs): + + super(SubscriptionContractPaged, self).__init__(*args, **kwargs) +class PropertyContractPaged(Paged): + """ + A paging container for iterating over a list of :class:`PropertyContract ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PropertyContract]'} + } + + def __init__(self, *args, **kwargs): + + super(PropertyContractPaged, self).__init__(*args, **kwargs) +class RegionContractPaged(Paged): + """ + A paging container for iterating over a list of :class:`RegionContract ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RegionContract]'} + } + + def __init__(self, *args, **kwargs): + + super(RegionContractPaged, self).__init__(*args, **kwargs) +class ReportRecordContractPaged(Paged): + """ + A paging container for iterating over a list of :class:`ReportRecordContract ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ReportRecordContract]'} + } + + def __init__(self, *args, **kwargs): + + super(ReportRecordContractPaged, self).__init__(*args, **kwargs) +class RequestReportRecordContractPaged(Paged): + """ + A paging container for iterating over a list of :class:`RequestReportRecordContract ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RequestReportRecordContract]'} + } + + def __init__(self, *args, **kwargs): + + super(RequestReportRecordContractPaged, self).__init__(*args, **kwargs) +class UserIdentityContractPaged(Paged): + """ + A paging container for iterating over a list of :class:`UserIdentityContract ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[UserIdentityContract]'} + } + + def __init__(self, *args, **kwargs): + + super(UserIdentityContractPaged, self).__init__(*args, **kwargs) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/access_information_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/access_information_contract.py deleted file mode 100644 index 702ae821078a..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/access_information_contract.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AccessInformationContract(Model): - """Tenant access information contract of the API Management service. - - :param id: Identifier. - :type id: str - :param primary_key: Primary access key. - :type primary_key: str - :param secondary_key: Secondary access key. - :type secondary_key: str - :param enabled: Determines whether direct access is enabled. - :type enabled: bool - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'primary_key': {'key': 'primaryKey', 'type': 'str'}, - 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AccessInformationContract, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.primary_key = kwargs.get('primary_key', None) - self.secondary_key = kwargs.get('secondary_key', None) - self.enabled = kwargs.get('enabled', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/access_information_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/access_information_contract_py3.py deleted file mode 100644 index 6d184b50f02f..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/access_information_contract_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AccessInformationContract(Model): - """Tenant access information contract of the API Management service. - - :param id: Identifier. - :type id: str - :param primary_key: Primary access key. - :type primary_key: str - :param secondary_key: Secondary access key. - :type secondary_key: str - :param enabled: Determines whether direct access is enabled. - :type enabled: bool - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'primary_key': {'key': 'primaryKey', 'type': 'str'}, - 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - } - - def __init__(self, *, id: str=None, primary_key: str=None, secondary_key: str=None, enabled: bool=None, **kwargs) -> None: - super(AccessInformationContract, self).__init__(**kwargs) - self.id = id - self.primary_key = primary_key - self.secondary_key = secondary_key - self.enabled = enabled diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/access_information_update_parameters.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/access_information_update_parameters.py deleted file mode 100644 index 89d3de07c5ae..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/access_information_update_parameters.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AccessInformationUpdateParameters(Model): - """Tenant access information update parameters. - - :param enabled: Determines whether direct access is enabled. - :type enabled: bool - """ - - _attribute_map = { - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AccessInformationUpdateParameters, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/access_information_update_parameters_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/access_information_update_parameters_py3.py deleted file mode 100644 index de481d924392..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/access_information_update_parameters_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AccessInformationUpdateParameters(Model): - """Tenant access information update parameters. - - :param enabled: Determines whether direct access is enabled. - :type enabled: bool - """ - - _attribute_map = { - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - } - - def __init__(self, *, enabled: bool=None, **kwargs) -> None: - super(AccessInformationUpdateParameters, self).__init__(**kwargs) - self.enabled = enabled diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/additional_location.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/additional_location.py deleted file mode 100644 index 430ac1bf55d6..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/additional_location.py +++ /dev/null @@ -1,71 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AdditionalLocation(Model): - """Description of an additional API Management resource location. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param location: Required. The location name of the additional region - among Azure Data center regions. - :type location: str - :param sku: Required. SKU properties of the API Management service. - :type sku: - ~azure.mgmt.apimanagement.models.ApiManagementServiceSkuProperties - :ivar public_ip_addresses: Public Static Load Balanced IP addresses of the - API Management service in the additional location. Available only for - Basic, Standard and Premium SKU. - :vartype public_ip_addresses: list[str] - :ivar private_ip_addresses: Private Static Load Balanced IP addresses of - the API Management service which is deployed in an Internal Virtual - Network in a particular additional location. Available only for Basic, - Standard and Premium SKU. - :vartype private_ip_addresses: list[str] - :param virtual_network_configuration: Virtual network configuration for - the location. - :type virtual_network_configuration: - ~azure.mgmt.apimanagement.models.VirtualNetworkConfiguration - :ivar gateway_regional_url: Gateway URL of the API Management service in - the Region. - :vartype gateway_regional_url: str - """ - - _validation = { - 'location': {'required': True}, - 'sku': {'required': True}, - 'public_ip_addresses': {'readonly': True}, - 'private_ip_addresses': {'readonly': True}, - 'gateway_regional_url': {'readonly': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'ApiManagementServiceSkuProperties'}, - 'public_ip_addresses': {'key': 'publicIPAddresses', 'type': '[str]'}, - 'private_ip_addresses': {'key': 'privateIPAddresses', 'type': '[str]'}, - 'virtual_network_configuration': {'key': 'virtualNetworkConfiguration', 'type': 'VirtualNetworkConfiguration'}, - 'gateway_regional_url': {'key': 'gatewayRegionalUrl', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AdditionalLocation, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.sku = kwargs.get('sku', None) - self.public_ip_addresses = None - self.private_ip_addresses = None - self.virtual_network_configuration = kwargs.get('virtual_network_configuration', None) - self.gateway_regional_url = None diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/additional_location_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/additional_location_py3.py deleted file mode 100644 index 8f03d06fa71c..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/additional_location_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AdditionalLocation(Model): - """Description of an additional API Management resource location. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param location: Required. The location name of the additional region - among Azure Data center regions. - :type location: str - :param sku: Required. SKU properties of the API Management service. - :type sku: - ~azure.mgmt.apimanagement.models.ApiManagementServiceSkuProperties - :ivar public_ip_addresses: Public Static Load Balanced IP addresses of the - API Management service in the additional location. Available only for - Basic, Standard and Premium SKU. - :vartype public_ip_addresses: list[str] - :ivar private_ip_addresses: Private Static Load Balanced IP addresses of - the API Management service which is deployed in an Internal Virtual - Network in a particular additional location. Available only for Basic, - Standard and Premium SKU. - :vartype private_ip_addresses: list[str] - :param virtual_network_configuration: Virtual network configuration for - the location. - :type virtual_network_configuration: - ~azure.mgmt.apimanagement.models.VirtualNetworkConfiguration - :ivar gateway_regional_url: Gateway URL of the API Management service in - the Region. - :vartype gateway_regional_url: str - """ - - _validation = { - 'location': {'required': True}, - 'sku': {'required': True}, - 'public_ip_addresses': {'readonly': True}, - 'private_ip_addresses': {'readonly': True}, - 'gateway_regional_url': {'readonly': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'ApiManagementServiceSkuProperties'}, - 'public_ip_addresses': {'key': 'publicIPAddresses', 'type': '[str]'}, - 'private_ip_addresses': {'key': 'privateIPAddresses', 'type': '[str]'}, - 'virtual_network_configuration': {'key': 'virtualNetworkConfiguration', 'type': 'VirtualNetworkConfiguration'}, - 'gateway_regional_url': {'key': 'gatewayRegionalUrl', 'type': 'str'}, - } - - def __init__(self, *, location: str, sku, virtual_network_configuration=None, **kwargs) -> None: - super(AdditionalLocation, self).__init__(**kwargs) - self.location = location - self.sku = sku - self.public_ip_addresses = None - self.private_ip_addresses = None - self.virtual_network_configuration = virtual_network_configuration - self.gateway_regional_url = None diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_contract.py deleted file mode 100644 index 8323712967c1..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_contract.py +++ /dev/null @@ -1,139 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ApiContract(Resource): - """Api details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param description: Description of the API. May include HTML formatting - tags. - :type description: str - :param authentication_settings: Collection of authentication settings - included into this API. - :type authentication_settings: - ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract - :param subscription_key_parameter_names: Protocols over which API is made - available. - :type subscription_key_parameter_names: - ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :param api_type: Type of API. Possible values include: 'http', 'soap' - :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :param api_revision: Describes the Revision of the Api. If no value is - provided, default revision 1 is created - :type api_revision: str - :param api_version: Indicates the Version identifier of the API if the API - is versioned - :type api_version: str - :param is_current: Indicates if API revision is current api revision. - :type is_current: bool - :ivar is_online: Indicates if API revision is accessible via the gateway. - :vartype is_online: bool - :param api_revision_description: Description of the Api Revision. - :type api_revision_description: str - :param api_version_description: Description of the Api Version. - :type api_version_description: str - :param api_version_set_id: A resource identifier for the related - ApiVersionSet. - :type api_version_set_id: str - :param subscription_required: Specifies whether an API or Product - subscription is required for accessing the API. - :type subscription_required: bool - :param source_api_id: API identifier of the source API. - :type source_api_id: str - :param display_name: API name. Must be 1 to 300 characters long. - :type display_name: str - :param service_url: Absolute URL of the backend service implementing this - API. Cannot be more than 2000 characters long. - :type service_url: str - :param path: Required. Relative URL uniquely identifying this API and all - of its resource paths within the API Management service instance. It is - appended to the API endpoint base URL specified during the service - instance creation to form a public URL for this API. - :type path: str - :param protocols: Describes on which protocols the operations in this API - can be invoked. - :type protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] - :param api_version_set: Version set details - :type api_version_set: - ~azure.mgmt.apimanagement.models.ApiVersionSetContractDetails - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'api_revision': {'max_length': 100, 'min_length': 1}, - 'api_version': {'max_length': 100}, - 'is_online': {'readonly': True}, - 'api_revision_description': {'max_length': 256}, - 'api_version_description': {'max_length': 256}, - 'display_name': {'max_length': 300, 'min_length': 1}, - 'service_url': {'max_length': 2000, 'min_length': 0}, - 'path': {'required': True, 'max_length': 400, 'min_length': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'authentication_settings': {'key': 'properties.authenticationSettings', 'type': 'AuthenticationSettingsContract'}, - 'subscription_key_parameter_names': {'key': 'properties.subscriptionKeyParameterNames', 'type': 'SubscriptionKeyParameterNamesContract'}, - 'api_type': {'key': 'properties.type', 'type': 'str'}, - 'api_revision': {'key': 'properties.apiRevision', 'type': 'str'}, - 'api_version': {'key': 'properties.apiVersion', 'type': 'str'}, - 'is_current': {'key': 'properties.isCurrent', 'type': 'bool'}, - 'is_online': {'key': 'properties.isOnline', 'type': 'bool'}, - 'api_revision_description': {'key': 'properties.apiRevisionDescription', 'type': 'str'}, - 'api_version_description': {'key': 'properties.apiVersionDescription', 'type': 'str'}, - 'api_version_set_id': {'key': 'properties.apiVersionSetId', 'type': 'str'}, - 'subscription_required': {'key': 'properties.subscriptionRequired', 'type': 'bool'}, - 'source_api_id': {'key': 'properties.sourceApiId', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'service_url': {'key': 'properties.serviceUrl', 'type': 'str'}, - 'path': {'key': 'properties.path', 'type': 'str'}, - 'protocols': {'key': 'properties.protocols', 'type': '[Protocol]'}, - 'api_version_set': {'key': 'properties.apiVersionSet', 'type': 'ApiVersionSetContractDetails'}, - } - - def __init__(self, **kwargs): - super(ApiContract, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.authentication_settings = kwargs.get('authentication_settings', None) - self.subscription_key_parameter_names = kwargs.get('subscription_key_parameter_names', None) - self.api_type = kwargs.get('api_type', None) - self.api_revision = kwargs.get('api_revision', None) - self.api_version = kwargs.get('api_version', None) - self.is_current = kwargs.get('is_current', None) - self.is_online = None - self.api_revision_description = kwargs.get('api_revision_description', None) - self.api_version_description = kwargs.get('api_version_description', None) - self.api_version_set_id = kwargs.get('api_version_set_id', None) - self.subscription_required = kwargs.get('subscription_required', None) - self.source_api_id = kwargs.get('source_api_id', None) - self.display_name = kwargs.get('display_name', None) - self.service_url = kwargs.get('service_url', None) - self.path = kwargs.get('path', None) - self.protocols = kwargs.get('protocols', None) - self.api_version_set = kwargs.get('api_version_set', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_contract_paged.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_contract_paged.py deleted file mode 100644 index 35e5c717faa9..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_contract_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ApiContractPaged(Paged): - """ - A paging container for iterating over a list of :class:`ApiContract ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ApiContract]'} - } - - def __init__(self, *args, **kwargs): - - super(ApiContractPaged, self).__init__(*args, **kwargs) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_contract_properties.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_contract_properties.py deleted file mode 100644 index eb5407d260bc..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_contract_properties.py +++ /dev/null @@ -1,115 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .api_entity_base_contract import ApiEntityBaseContract - - -class ApiContractProperties(ApiEntityBaseContract): - """Api Entity Properties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param description: Description of the API. May include HTML formatting - tags. - :type description: str - :param authentication_settings: Collection of authentication settings - included into this API. - :type authentication_settings: - ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract - :param subscription_key_parameter_names: Protocols over which API is made - available. - :type subscription_key_parameter_names: - ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :param api_type: Type of API. Possible values include: 'http', 'soap' - :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :param api_revision: Describes the Revision of the Api. If no value is - provided, default revision 1 is created - :type api_revision: str - :param api_version: Indicates the Version identifier of the API if the API - is versioned - :type api_version: str - :param is_current: Indicates if API revision is current api revision. - :type is_current: bool - :ivar is_online: Indicates if API revision is accessible via the gateway. - :vartype is_online: bool - :param api_revision_description: Description of the Api Revision. - :type api_revision_description: str - :param api_version_description: Description of the Api Version. - :type api_version_description: str - :param api_version_set_id: A resource identifier for the related - ApiVersionSet. - :type api_version_set_id: str - :param subscription_required: Specifies whether an API or Product - subscription is required for accessing the API. - :type subscription_required: bool - :param source_api_id: API identifier of the source API. - :type source_api_id: str - :param display_name: API name. Must be 1 to 300 characters long. - :type display_name: str - :param service_url: Absolute URL of the backend service implementing this - API. Cannot be more than 2000 characters long. - :type service_url: str - :param path: Required. Relative URL uniquely identifying this API and all - of its resource paths within the API Management service instance. It is - appended to the API endpoint base URL specified during the service - instance creation to form a public URL for this API. - :type path: str - :param protocols: Describes on which protocols the operations in this API - can be invoked. - :type protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] - :param api_version_set: Version set details - :type api_version_set: - ~azure.mgmt.apimanagement.models.ApiVersionSetContractDetails - """ - - _validation = { - 'api_revision': {'max_length': 100, 'min_length': 1}, - 'api_version': {'max_length': 100}, - 'is_online': {'readonly': True}, - 'api_revision_description': {'max_length': 256}, - 'api_version_description': {'max_length': 256}, - 'display_name': {'max_length': 300, 'min_length': 1}, - 'service_url': {'max_length': 2000, 'min_length': 0}, - 'path': {'required': True, 'max_length': 400, 'min_length': 0}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'authentication_settings': {'key': 'authenticationSettings', 'type': 'AuthenticationSettingsContract'}, - 'subscription_key_parameter_names': {'key': 'subscriptionKeyParameterNames', 'type': 'SubscriptionKeyParameterNamesContract'}, - 'api_type': {'key': 'type', 'type': 'str'}, - 'api_revision': {'key': 'apiRevision', 'type': 'str'}, - 'api_version': {'key': 'apiVersion', 'type': 'str'}, - 'is_current': {'key': 'isCurrent', 'type': 'bool'}, - 'is_online': {'key': 'isOnline', 'type': 'bool'}, - 'api_revision_description': {'key': 'apiRevisionDescription', 'type': 'str'}, - 'api_version_description': {'key': 'apiVersionDescription', 'type': 'str'}, - 'api_version_set_id': {'key': 'apiVersionSetId', 'type': 'str'}, - 'subscription_required': {'key': 'subscriptionRequired', 'type': 'bool'}, - 'source_api_id': {'key': 'sourceApiId', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'service_url': {'key': 'serviceUrl', 'type': 'str'}, - 'path': {'key': 'path', 'type': 'str'}, - 'protocols': {'key': 'protocols', 'type': '[Protocol]'}, - 'api_version_set': {'key': 'apiVersionSet', 'type': 'ApiVersionSetContractDetails'}, - } - - def __init__(self, **kwargs): - super(ApiContractProperties, self).__init__(**kwargs) - self.source_api_id = kwargs.get('source_api_id', None) - self.display_name = kwargs.get('display_name', None) - self.service_url = kwargs.get('service_url', None) - self.path = kwargs.get('path', None) - self.protocols = kwargs.get('protocols', None) - self.api_version_set = kwargs.get('api_version_set', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_contract_properties_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_contract_properties_py3.py deleted file mode 100644 index 5349453ac542..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_contract_properties_py3.py +++ /dev/null @@ -1,115 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .api_entity_base_contract_py3 import ApiEntityBaseContract - - -class ApiContractProperties(ApiEntityBaseContract): - """Api Entity Properties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param description: Description of the API. May include HTML formatting - tags. - :type description: str - :param authentication_settings: Collection of authentication settings - included into this API. - :type authentication_settings: - ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract - :param subscription_key_parameter_names: Protocols over which API is made - available. - :type subscription_key_parameter_names: - ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :param api_type: Type of API. Possible values include: 'http', 'soap' - :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :param api_revision: Describes the Revision of the Api. If no value is - provided, default revision 1 is created - :type api_revision: str - :param api_version: Indicates the Version identifier of the API if the API - is versioned - :type api_version: str - :param is_current: Indicates if API revision is current api revision. - :type is_current: bool - :ivar is_online: Indicates if API revision is accessible via the gateway. - :vartype is_online: bool - :param api_revision_description: Description of the Api Revision. - :type api_revision_description: str - :param api_version_description: Description of the Api Version. - :type api_version_description: str - :param api_version_set_id: A resource identifier for the related - ApiVersionSet. - :type api_version_set_id: str - :param subscription_required: Specifies whether an API or Product - subscription is required for accessing the API. - :type subscription_required: bool - :param source_api_id: API identifier of the source API. - :type source_api_id: str - :param display_name: API name. Must be 1 to 300 characters long. - :type display_name: str - :param service_url: Absolute URL of the backend service implementing this - API. Cannot be more than 2000 characters long. - :type service_url: str - :param path: Required. Relative URL uniquely identifying this API and all - of its resource paths within the API Management service instance. It is - appended to the API endpoint base URL specified during the service - instance creation to form a public URL for this API. - :type path: str - :param protocols: Describes on which protocols the operations in this API - can be invoked. - :type protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] - :param api_version_set: Version set details - :type api_version_set: - ~azure.mgmt.apimanagement.models.ApiVersionSetContractDetails - """ - - _validation = { - 'api_revision': {'max_length': 100, 'min_length': 1}, - 'api_version': {'max_length': 100}, - 'is_online': {'readonly': True}, - 'api_revision_description': {'max_length': 256}, - 'api_version_description': {'max_length': 256}, - 'display_name': {'max_length': 300, 'min_length': 1}, - 'service_url': {'max_length': 2000, 'min_length': 0}, - 'path': {'required': True, 'max_length': 400, 'min_length': 0}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'authentication_settings': {'key': 'authenticationSettings', 'type': 'AuthenticationSettingsContract'}, - 'subscription_key_parameter_names': {'key': 'subscriptionKeyParameterNames', 'type': 'SubscriptionKeyParameterNamesContract'}, - 'api_type': {'key': 'type', 'type': 'str'}, - 'api_revision': {'key': 'apiRevision', 'type': 'str'}, - 'api_version': {'key': 'apiVersion', 'type': 'str'}, - 'is_current': {'key': 'isCurrent', 'type': 'bool'}, - 'is_online': {'key': 'isOnline', 'type': 'bool'}, - 'api_revision_description': {'key': 'apiRevisionDescription', 'type': 'str'}, - 'api_version_description': {'key': 'apiVersionDescription', 'type': 'str'}, - 'api_version_set_id': {'key': 'apiVersionSetId', 'type': 'str'}, - 'subscription_required': {'key': 'subscriptionRequired', 'type': 'bool'}, - 'source_api_id': {'key': 'sourceApiId', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'service_url': {'key': 'serviceUrl', 'type': 'str'}, - 'path': {'key': 'path', 'type': 'str'}, - 'protocols': {'key': 'protocols', 'type': '[Protocol]'}, - 'api_version_set': {'key': 'apiVersionSet', 'type': 'ApiVersionSetContractDetails'}, - } - - def __init__(self, *, path: str, description: str=None, authentication_settings=None, subscription_key_parameter_names=None, api_type=None, api_revision: str=None, api_version: str=None, is_current: bool=None, api_revision_description: str=None, api_version_description: str=None, api_version_set_id: str=None, subscription_required: bool=None, source_api_id: str=None, display_name: str=None, service_url: str=None, protocols=None, api_version_set=None, **kwargs) -> None: - super(ApiContractProperties, self).__init__(description=description, authentication_settings=authentication_settings, subscription_key_parameter_names=subscription_key_parameter_names, api_type=api_type, api_revision=api_revision, api_version=api_version, is_current=is_current, api_revision_description=api_revision_description, api_version_description=api_version_description, api_version_set_id=api_version_set_id, subscription_required=subscription_required, **kwargs) - self.source_api_id = source_api_id - self.display_name = display_name - self.service_url = service_url - self.path = path - self.protocols = protocols - self.api_version_set = api_version_set diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_contract_py3.py deleted file mode 100644 index 561df1ff8548..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_contract_py3.py +++ /dev/null @@ -1,139 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ApiContract(Resource): - """Api details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param description: Description of the API. May include HTML formatting - tags. - :type description: str - :param authentication_settings: Collection of authentication settings - included into this API. - :type authentication_settings: - ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract - :param subscription_key_parameter_names: Protocols over which API is made - available. - :type subscription_key_parameter_names: - ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :param api_type: Type of API. Possible values include: 'http', 'soap' - :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :param api_revision: Describes the Revision of the Api. If no value is - provided, default revision 1 is created - :type api_revision: str - :param api_version: Indicates the Version identifier of the API if the API - is versioned - :type api_version: str - :param is_current: Indicates if API revision is current api revision. - :type is_current: bool - :ivar is_online: Indicates if API revision is accessible via the gateway. - :vartype is_online: bool - :param api_revision_description: Description of the Api Revision. - :type api_revision_description: str - :param api_version_description: Description of the Api Version. - :type api_version_description: str - :param api_version_set_id: A resource identifier for the related - ApiVersionSet. - :type api_version_set_id: str - :param subscription_required: Specifies whether an API or Product - subscription is required for accessing the API. - :type subscription_required: bool - :param source_api_id: API identifier of the source API. - :type source_api_id: str - :param display_name: API name. Must be 1 to 300 characters long. - :type display_name: str - :param service_url: Absolute URL of the backend service implementing this - API. Cannot be more than 2000 characters long. - :type service_url: str - :param path: Required. Relative URL uniquely identifying this API and all - of its resource paths within the API Management service instance. It is - appended to the API endpoint base URL specified during the service - instance creation to form a public URL for this API. - :type path: str - :param protocols: Describes on which protocols the operations in this API - can be invoked. - :type protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] - :param api_version_set: Version set details - :type api_version_set: - ~azure.mgmt.apimanagement.models.ApiVersionSetContractDetails - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'api_revision': {'max_length': 100, 'min_length': 1}, - 'api_version': {'max_length': 100}, - 'is_online': {'readonly': True}, - 'api_revision_description': {'max_length': 256}, - 'api_version_description': {'max_length': 256}, - 'display_name': {'max_length': 300, 'min_length': 1}, - 'service_url': {'max_length': 2000, 'min_length': 0}, - 'path': {'required': True, 'max_length': 400, 'min_length': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'authentication_settings': {'key': 'properties.authenticationSettings', 'type': 'AuthenticationSettingsContract'}, - 'subscription_key_parameter_names': {'key': 'properties.subscriptionKeyParameterNames', 'type': 'SubscriptionKeyParameterNamesContract'}, - 'api_type': {'key': 'properties.type', 'type': 'str'}, - 'api_revision': {'key': 'properties.apiRevision', 'type': 'str'}, - 'api_version': {'key': 'properties.apiVersion', 'type': 'str'}, - 'is_current': {'key': 'properties.isCurrent', 'type': 'bool'}, - 'is_online': {'key': 'properties.isOnline', 'type': 'bool'}, - 'api_revision_description': {'key': 'properties.apiRevisionDescription', 'type': 'str'}, - 'api_version_description': {'key': 'properties.apiVersionDescription', 'type': 'str'}, - 'api_version_set_id': {'key': 'properties.apiVersionSetId', 'type': 'str'}, - 'subscription_required': {'key': 'properties.subscriptionRequired', 'type': 'bool'}, - 'source_api_id': {'key': 'properties.sourceApiId', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'service_url': {'key': 'properties.serviceUrl', 'type': 'str'}, - 'path': {'key': 'properties.path', 'type': 'str'}, - 'protocols': {'key': 'properties.protocols', 'type': '[Protocol]'}, - 'api_version_set': {'key': 'properties.apiVersionSet', 'type': 'ApiVersionSetContractDetails'}, - } - - def __init__(self, *, path: str, description: str=None, authentication_settings=None, subscription_key_parameter_names=None, api_type=None, api_revision: str=None, api_version: str=None, is_current: bool=None, api_revision_description: str=None, api_version_description: str=None, api_version_set_id: str=None, subscription_required: bool=None, source_api_id: str=None, display_name: str=None, service_url: str=None, protocols=None, api_version_set=None, **kwargs) -> None: - super(ApiContract, self).__init__(**kwargs) - self.description = description - self.authentication_settings = authentication_settings - self.subscription_key_parameter_names = subscription_key_parameter_names - self.api_type = api_type - self.api_revision = api_revision - self.api_version = api_version - self.is_current = is_current - self.is_online = None - self.api_revision_description = api_revision_description - self.api_version_description = api_version_description - self.api_version_set_id = api_version_set_id - self.subscription_required = subscription_required - self.source_api_id = source_api_id - self.display_name = display_name - self.service_url = service_url - self.path = path - self.protocols = protocols - self.api_version_set = api_version_set diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_create_or_update_parameter.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_create_or_update_parameter.py deleted file mode 100644 index bd9f1969a5ab..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_create_or_update_parameter.py +++ /dev/null @@ -1,151 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiCreateOrUpdateParameter(Model): - """API Create or Update Parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param description: Description of the API. May include HTML formatting - tags. - :type description: str - :param authentication_settings: Collection of authentication settings - included into this API. - :type authentication_settings: - ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract - :param subscription_key_parameter_names: Protocols over which API is made - available. - :type subscription_key_parameter_names: - ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :param api_type: Type of API. Possible values include: 'http', 'soap' - :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :param api_revision: Describes the Revision of the Api. If no value is - provided, default revision 1 is created - :type api_revision: str - :param api_version: Indicates the Version identifier of the API if the API - is versioned - :type api_version: str - :param is_current: Indicates if API revision is current api revision. - :type is_current: bool - :ivar is_online: Indicates if API revision is accessible via the gateway. - :vartype is_online: bool - :param api_revision_description: Description of the Api Revision. - :type api_revision_description: str - :param api_version_description: Description of the Api Version. - :type api_version_description: str - :param api_version_set_id: A resource identifier for the related - ApiVersionSet. - :type api_version_set_id: str - :param subscription_required: Specifies whether an API or Product - subscription is required for accessing the API. - :type subscription_required: bool - :param source_api_id: API identifier of the source API. - :type source_api_id: str - :param display_name: API name. Must be 1 to 300 characters long. - :type display_name: str - :param service_url: Absolute URL of the backend service implementing this - API. Cannot be more than 2000 characters long. - :type service_url: str - :param path: Required. Relative URL uniquely identifying this API and all - of its resource paths within the API Management service instance. It is - appended to the API endpoint base URL specified during the service - instance creation to form a public URL for this API. - :type path: str - :param protocols: Describes on which protocols the operations in this API - can be invoked. - :type protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] - :param api_version_set: Version set details - :type api_version_set: - ~azure.mgmt.apimanagement.models.ApiVersionSetContractDetails - :param value: Content value when Importing an API. - :type value: str - :param format: Format of the Content in which the API is getting imported. - Possible values include: 'wadl-xml', 'wadl-link-json', 'swagger-json', - 'swagger-link-json', 'wsdl', 'wsdl-link', 'openapi', 'openapi+json', - 'openapi-link' - :type format: str or ~azure.mgmt.apimanagement.models.ContentFormat - :param wsdl_selector: Criteria to limit import of WSDL to a subset of the - document. - :type wsdl_selector: - ~azure.mgmt.apimanagement.models.ApiCreateOrUpdatePropertiesWsdlSelector - :param soap_api_type: Type of Api to create. - * `http` creates a SOAP to REST API - * `soap` creates a SOAP pass-through API. Possible values include: - 'SoapToRest', 'SoapPassThrough' - :type soap_api_type: str or ~azure.mgmt.apimanagement.models.SoapApiType - """ - - _validation = { - 'api_revision': {'max_length': 100, 'min_length': 1}, - 'api_version': {'max_length': 100}, - 'is_online': {'readonly': True}, - 'api_revision_description': {'max_length': 256}, - 'api_version_description': {'max_length': 256}, - 'display_name': {'max_length': 300, 'min_length': 1}, - 'service_url': {'max_length': 2000, 'min_length': 0}, - 'path': {'required': True, 'max_length': 400, 'min_length': 0}, - } - - _attribute_map = { - 'description': {'key': 'properties.description', 'type': 'str'}, - 'authentication_settings': {'key': 'properties.authenticationSettings', 'type': 'AuthenticationSettingsContract'}, - 'subscription_key_parameter_names': {'key': 'properties.subscriptionKeyParameterNames', 'type': 'SubscriptionKeyParameterNamesContract'}, - 'api_type': {'key': 'properties.type', 'type': 'str'}, - 'api_revision': {'key': 'properties.apiRevision', 'type': 'str'}, - 'api_version': {'key': 'properties.apiVersion', 'type': 'str'}, - 'is_current': {'key': 'properties.isCurrent', 'type': 'bool'}, - 'is_online': {'key': 'properties.isOnline', 'type': 'bool'}, - 'api_revision_description': {'key': 'properties.apiRevisionDescription', 'type': 'str'}, - 'api_version_description': {'key': 'properties.apiVersionDescription', 'type': 'str'}, - 'api_version_set_id': {'key': 'properties.apiVersionSetId', 'type': 'str'}, - 'subscription_required': {'key': 'properties.subscriptionRequired', 'type': 'bool'}, - 'source_api_id': {'key': 'properties.sourceApiId', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'service_url': {'key': 'properties.serviceUrl', 'type': 'str'}, - 'path': {'key': 'properties.path', 'type': 'str'}, - 'protocols': {'key': 'properties.protocols', 'type': '[Protocol]'}, - 'api_version_set': {'key': 'properties.apiVersionSet', 'type': 'ApiVersionSetContractDetails'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - 'format': {'key': 'properties.format', 'type': 'str'}, - 'wsdl_selector': {'key': 'properties.wsdlSelector', 'type': 'ApiCreateOrUpdatePropertiesWsdlSelector'}, - 'soap_api_type': {'key': 'properties.apiType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiCreateOrUpdateParameter, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.authentication_settings = kwargs.get('authentication_settings', None) - self.subscription_key_parameter_names = kwargs.get('subscription_key_parameter_names', None) - self.api_type = kwargs.get('api_type', None) - self.api_revision = kwargs.get('api_revision', None) - self.api_version = kwargs.get('api_version', None) - self.is_current = kwargs.get('is_current', None) - self.is_online = None - self.api_revision_description = kwargs.get('api_revision_description', None) - self.api_version_description = kwargs.get('api_version_description', None) - self.api_version_set_id = kwargs.get('api_version_set_id', None) - self.subscription_required = kwargs.get('subscription_required', None) - self.source_api_id = kwargs.get('source_api_id', None) - self.display_name = kwargs.get('display_name', None) - self.service_url = kwargs.get('service_url', None) - self.path = kwargs.get('path', None) - self.protocols = kwargs.get('protocols', None) - self.api_version_set = kwargs.get('api_version_set', None) - self.value = kwargs.get('value', None) - self.format = kwargs.get('format', None) - self.wsdl_selector = kwargs.get('wsdl_selector', None) - self.soap_api_type = kwargs.get('soap_api_type', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_create_or_update_parameter_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_create_or_update_parameter_py3.py deleted file mode 100644 index a9a326b69906..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_create_or_update_parameter_py3.py +++ /dev/null @@ -1,151 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiCreateOrUpdateParameter(Model): - """API Create or Update Parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param description: Description of the API. May include HTML formatting - tags. - :type description: str - :param authentication_settings: Collection of authentication settings - included into this API. - :type authentication_settings: - ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract - :param subscription_key_parameter_names: Protocols over which API is made - available. - :type subscription_key_parameter_names: - ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :param api_type: Type of API. Possible values include: 'http', 'soap' - :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :param api_revision: Describes the Revision of the Api. If no value is - provided, default revision 1 is created - :type api_revision: str - :param api_version: Indicates the Version identifier of the API if the API - is versioned - :type api_version: str - :param is_current: Indicates if API revision is current api revision. - :type is_current: bool - :ivar is_online: Indicates if API revision is accessible via the gateway. - :vartype is_online: bool - :param api_revision_description: Description of the Api Revision. - :type api_revision_description: str - :param api_version_description: Description of the Api Version. - :type api_version_description: str - :param api_version_set_id: A resource identifier for the related - ApiVersionSet. - :type api_version_set_id: str - :param subscription_required: Specifies whether an API or Product - subscription is required for accessing the API. - :type subscription_required: bool - :param source_api_id: API identifier of the source API. - :type source_api_id: str - :param display_name: API name. Must be 1 to 300 characters long. - :type display_name: str - :param service_url: Absolute URL of the backend service implementing this - API. Cannot be more than 2000 characters long. - :type service_url: str - :param path: Required. Relative URL uniquely identifying this API and all - of its resource paths within the API Management service instance. It is - appended to the API endpoint base URL specified during the service - instance creation to form a public URL for this API. - :type path: str - :param protocols: Describes on which protocols the operations in this API - can be invoked. - :type protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] - :param api_version_set: Version set details - :type api_version_set: - ~azure.mgmt.apimanagement.models.ApiVersionSetContractDetails - :param value: Content value when Importing an API. - :type value: str - :param format: Format of the Content in which the API is getting imported. - Possible values include: 'wadl-xml', 'wadl-link-json', 'swagger-json', - 'swagger-link-json', 'wsdl', 'wsdl-link', 'openapi', 'openapi+json', - 'openapi-link' - :type format: str or ~azure.mgmt.apimanagement.models.ContentFormat - :param wsdl_selector: Criteria to limit import of WSDL to a subset of the - document. - :type wsdl_selector: - ~azure.mgmt.apimanagement.models.ApiCreateOrUpdatePropertiesWsdlSelector - :param soap_api_type: Type of Api to create. - * `http` creates a SOAP to REST API - * `soap` creates a SOAP pass-through API. Possible values include: - 'SoapToRest', 'SoapPassThrough' - :type soap_api_type: str or ~azure.mgmt.apimanagement.models.SoapApiType - """ - - _validation = { - 'api_revision': {'max_length': 100, 'min_length': 1}, - 'api_version': {'max_length': 100}, - 'is_online': {'readonly': True}, - 'api_revision_description': {'max_length': 256}, - 'api_version_description': {'max_length': 256}, - 'display_name': {'max_length': 300, 'min_length': 1}, - 'service_url': {'max_length': 2000, 'min_length': 0}, - 'path': {'required': True, 'max_length': 400, 'min_length': 0}, - } - - _attribute_map = { - 'description': {'key': 'properties.description', 'type': 'str'}, - 'authentication_settings': {'key': 'properties.authenticationSettings', 'type': 'AuthenticationSettingsContract'}, - 'subscription_key_parameter_names': {'key': 'properties.subscriptionKeyParameterNames', 'type': 'SubscriptionKeyParameterNamesContract'}, - 'api_type': {'key': 'properties.type', 'type': 'str'}, - 'api_revision': {'key': 'properties.apiRevision', 'type': 'str'}, - 'api_version': {'key': 'properties.apiVersion', 'type': 'str'}, - 'is_current': {'key': 'properties.isCurrent', 'type': 'bool'}, - 'is_online': {'key': 'properties.isOnline', 'type': 'bool'}, - 'api_revision_description': {'key': 'properties.apiRevisionDescription', 'type': 'str'}, - 'api_version_description': {'key': 'properties.apiVersionDescription', 'type': 'str'}, - 'api_version_set_id': {'key': 'properties.apiVersionSetId', 'type': 'str'}, - 'subscription_required': {'key': 'properties.subscriptionRequired', 'type': 'bool'}, - 'source_api_id': {'key': 'properties.sourceApiId', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'service_url': {'key': 'properties.serviceUrl', 'type': 'str'}, - 'path': {'key': 'properties.path', 'type': 'str'}, - 'protocols': {'key': 'properties.protocols', 'type': '[Protocol]'}, - 'api_version_set': {'key': 'properties.apiVersionSet', 'type': 'ApiVersionSetContractDetails'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - 'format': {'key': 'properties.format', 'type': 'str'}, - 'wsdl_selector': {'key': 'properties.wsdlSelector', 'type': 'ApiCreateOrUpdatePropertiesWsdlSelector'}, - 'soap_api_type': {'key': 'properties.apiType', 'type': 'str'}, - } - - def __init__(self, *, path: str, description: str=None, authentication_settings=None, subscription_key_parameter_names=None, api_type=None, api_revision: str=None, api_version: str=None, is_current: bool=None, api_revision_description: str=None, api_version_description: str=None, api_version_set_id: str=None, subscription_required: bool=None, source_api_id: str=None, display_name: str=None, service_url: str=None, protocols=None, api_version_set=None, value: str=None, format=None, wsdl_selector=None, soap_api_type=None, **kwargs) -> None: - super(ApiCreateOrUpdateParameter, self).__init__(**kwargs) - self.description = description - self.authentication_settings = authentication_settings - self.subscription_key_parameter_names = subscription_key_parameter_names - self.api_type = api_type - self.api_revision = api_revision - self.api_version = api_version - self.is_current = is_current - self.is_online = None - self.api_revision_description = api_revision_description - self.api_version_description = api_version_description - self.api_version_set_id = api_version_set_id - self.subscription_required = subscription_required - self.source_api_id = source_api_id - self.display_name = display_name - self.service_url = service_url - self.path = path - self.protocols = protocols - self.api_version_set = api_version_set - self.value = value - self.format = format - self.wsdl_selector = wsdl_selector - self.soap_api_type = soap_api_type diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_create_or_update_properties_wsdl_selector.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_create_or_update_properties_wsdl_selector.py deleted file mode 100644 index f94026f29f08..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_create_or_update_properties_wsdl_selector.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiCreateOrUpdatePropertiesWsdlSelector(Model): - """Criteria to limit import of WSDL to a subset of the document. - - :param wsdl_service_name: Name of service to import from WSDL - :type wsdl_service_name: str - :param wsdl_endpoint_name: Name of endpoint(port) to import from WSDL - :type wsdl_endpoint_name: str - """ - - _attribute_map = { - 'wsdl_service_name': {'key': 'wsdlServiceName', 'type': 'str'}, - 'wsdl_endpoint_name': {'key': 'wsdlEndpointName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiCreateOrUpdatePropertiesWsdlSelector, self).__init__(**kwargs) - self.wsdl_service_name = kwargs.get('wsdl_service_name', None) - self.wsdl_endpoint_name = kwargs.get('wsdl_endpoint_name', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_create_or_update_properties_wsdl_selector_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_create_or_update_properties_wsdl_selector_py3.py deleted file mode 100644 index cd7249f0e0ba..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_create_or_update_properties_wsdl_selector_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiCreateOrUpdatePropertiesWsdlSelector(Model): - """Criteria to limit import of WSDL to a subset of the document. - - :param wsdl_service_name: Name of service to import from WSDL - :type wsdl_service_name: str - :param wsdl_endpoint_name: Name of endpoint(port) to import from WSDL - :type wsdl_endpoint_name: str - """ - - _attribute_map = { - 'wsdl_service_name': {'key': 'wsdlServiceName', 'type': 'str'}, - 'wsdl_endpoint_name': {'key': 'wsdlEndpointName', 'type': 'str'}, - } - - def __init__(self, *, wsdl_service_name: str=None, wsdl_endpoint_name: str=None, **kwargs) -> None: - super(ApiCreateOrUpdatePropertiesWsdlSelector, self).__init__(**kwargs) - self.wsdl_service_name = wsdl_service_name - self.wsdl_endpoint_name = wsdl_endpoint_name diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_entity_base_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_entity_base_contract.py deleted file mode 100644 index 502a877256df..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_entity_base_contract.py +++ /dev/null @@ -1,92 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiEntityBaseContract(Model): - """API base contract details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param description: Description of the API. May include HTML formatting - tags. - :type description: str - :param authentication_settings: Collection of authentication settings - included into this API. - :type authentication_settings: - ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract - :param subscription_key_parameter_names: Protocols over which API is made - available. - :type subscription_key_parameter_names: - ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :param api_type: Type of API. Possible values include: 'http', 'soap' - :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :param api_revision: Describes the Revision of the Api. If no value is - provided, default revision 1 is created - :type api_revision: str - :param api_version: Indicates the Version identifier of the API if the API - is versioned - :type api_version: str - :param is_current: Indicates if API revision is current api revision. - :type is_current: bool - :ivar is_online: Indicates if API revision is accessible via the gateway. - :vartype is_online: bool - :param api_revision_description: Description of the Api Revision. - :type api_revision_description: str - :param api_version_description: Description of the Api Version. - :type api_version_description: str - :param api_version_set_id: A resource identifier for the related - ApiVersionSet. - :type api_version_set_id: str - :param subscription_required: Specifies whether an API or Product - subscription is required for accessing the API. - :type subscription_required: bool - """ - - _validation = { - 'api_revision': {'max_length': 100, 'min_length': 1}, - 'api_version': {'max_length': 100}, - 'is_online': {'readonly': True}, - 'api_revision_description': {'max_length': 256}, - 'api_version_description': {'max_length': 256}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'authentication_settings': {'key': 'authenticationSettings', 'type': 'AuthenticationSettingsContract'}, - 'subscription_key_parameter_names': {'key': 'subscriptionKeyParameterNames', 'type': 'SubscriptionKeyParameterNamesContract'}, - 'api_type': {'key': 'type', 'type': 'str'}, - 'api_revision': {'key': 'apiRevision', 'type': 'str'}, - 'api_version': {'key': 'apiVersion', 'type': 'str'}, - 'is_current': {'key': 'isCurrent', 'type': 'bool'}, - 'is_online': {'key': 'isOnline', 'type': 'bool'}, - 'api_revision_description': {'key': 'apiRevisionDescription', 'type': 'str'}, - 'api_version_description': {'key': 'apiVersionDescription', 'type': 'str'}, - 'api_version_set_id': {'key': 'apiVersionSetId', 'type': 'str'}, - 'subscription_required': {'key': 'subscriptionRequired', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ApiEntityBaseContract, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.authentication_settings = kwargs.get('authentication_settings', None) - self.subscription_key_parameter_names = kwargs.get('subscription_key_parameter_names', None) - self.api_type = kwargs.get('api_type', None) - self.api_revision = kwargs.get('api_revision', None) - self.api_version = kwargs.get('api_version', None) - self.is_current = kwargs.get('is_current', None) - self.is_online = None - self.api_revision_description = kwargs.get('api_revision_description', None) - self.api_version_description = kwargs.get('api_version_description', None) - self.api_version_set_id = kwargs.get('api_version_set_id', None) - self.subscription_required = kwargs.get('subscription_required', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_entity_base_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_entity_base_contract_py3.py deleted file mode 100644 index d64875b6de90..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_entity_base_contract_py3.py +++ /dev/null @@ -1,92 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiEntityBaseContract(Model): - """API base contract details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param description: Description of the API. May include HTML formatting - tags. - :type description: str - :param authentication_settings: Collection of authentication settings - included into this API. - :type authentication_settings: - ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract - :param subscription_key_parameter_names: Protocols over which API is made - available. - :type subscription_key_parameter_names: - ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :param api_type: Type of API. Possible values include: 'http', 'soap' - :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :param api_revision: Describes the Revision of the Api. If no value is - provided, default revision 1 is created - :type api_revision: str - :param api_version: Indicates the Version identifier of the API if the API - is versioned - :type api_version: str - :param is_current: Indicates if API revision is current api revision. - :type is_current: bool - :ivar is_online: Indicates if API revision is accessible via the gateway. - :vartype is_online: bool - :param api_revision_description: Description of the Api Revision. - :type api_revision_description: str - :param api_version_description: Description of the Api Version. - :type api_version_description: str - :param api_version_set_id: A resource identifier for the related - ApiVersionSet. - :type api_version_set_id: str - :param subscription_required: Specifies whether an API or Product - subscription is required for accessing the API. - :type subscription_required: bool - """ - - _validation = { - 'api_revision': {'max_length': 100, 'min_length': 1}, - 'api_version': {'max_length': 100}, - 'is_online': {'readonly': True}, - 'api_revision_description': {'max_length': 256}, - 'api_version_description': {'max_length': 256}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'authentication_settings': {'key': 'authenticationSettings', 'type': 'AuthenticationSettingsContract'}, - 'subscription_key_parameter_names': {'key': 'subscriptionKeyParameterNames', 'type': 'SubscriptionKeyParameterNamesContract'}, - 'api_type': {'key': 'type', 'type': 'str'}, - 'api_revision': {'key': 'apiRevision', 'type': 'str'}, - 'api_version': {'key': 'apiVersion', 'type': 'str'}, - 'is_current': {'key': 'isCurrent', 'type': 'bool'}, - 'is_online': {'key': 'isOnline', 'type': 'bool'}, - 'api_revision_description': {'key': 'apiRevisionDescription', 'type': 'str'}, - 'api_version_description': {'key': 'apiVersionDescription', 'type': 'str'}, - 'api_version_set_id': {'key': 'apiVersionSetId', 'type': 'str'}, - 'subscription_required': {'key': 'subscriptionRequired', 'type': 'bool'}, - } - - def __init__(self, *, description: str=None, authentication_settings=None, subscription_key_parameter_names=None, api_type=None, api_revision: str=None, api_version: str=None, is_current: bool=None, api_revision_description: str=None, api_version_description: str=None, api_version_set_id: str=None, subscription_required: bool=None, **kwargs) -> None: - super(ApiEntityBaseContract, self).__init__(**kwargs) - self.description = description - self.authentication_settings = authentication_settings - self.subscription_key_parameter_names = subscription_key_parameter_names - self.api_type = api_type - self.api_revision = api_revision - self.api_version = api_version - self.is_current = is_current - self.is_online = None - self.api_revision_description = api_revision_description - self.api_version_description = api_version_description - self.api_version_set_id = api_version_set_id - self.subscription_required = subscription_required diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_export_result.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_export_result.py deleted file mode 100644 index 46f85d9a27af..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_export_result.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiExportResult(Model): - """API Export result. - - :param id: ResourceId of the API which was exported. - :type id: str - :param export_result_format: Format in which the Api Details are exported - to the Storage Blob with Sas Key valid for 5 minutes. Possible values - include: 'Swagger', 'Wsdl', 'Wadl', 'OpenApi' - :type export_result_format: str or - ~azure.mgmt.apimanagement.models.ExportResultFormat - :param value: The object defining the schema of the exported Api Detail - :type value: ~azure.mgmt.apimanagement.models.ApiExportResultValue - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'export_result_format': {'key': 'format', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'ApiExportResultValue'}, - } - - def __init__(self, **kwargs): - super(ApiExportResult, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.export_result_format = kwargs.get('export_result_format', None) - self.value = kwargs.get('value', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_export_result_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_export_result_py3.py deleted file mode 100644 index ac710fddacbd..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_export_result_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiExportResult(Model): - """API Export result. - - :param id: ResourceId of the API which was exported. - :type id: str - :param export_result_format: Format in which the Api Details are exported - to the Storage Blob with Sas Key valid for 5 minutes. Possible values - include: 'Swagger', 'Wsdl', 'Wadl', 'OpenApi' - :type export_result_format: str or - ~azure.mgmt.apimanagement.models.ExportResultFormat - :param value: The object defining the schema of the exported Api Detail - :type value: ~azure.mgmt.apimanagement.models.ApiExportResultValue - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'export_result_format': {'key': 'format', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'ApiExportResultValue'}, - } - - def __init__(self, *, id: str=None, export_result_format=None, value=None, **kwargs) -> None: - super(ApiExportResult, self).__init__(**kwargs) - self.id = id - self.export_result_format = export_result_format - self.value = value diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_export_result_value.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_export_result_value.py deleted file mode 100644 index e0554a63b849..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_export_result_value.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiExportResultValue(Model): - """The object defining the schema of the exported Api Detail. - - :param link: Link to the Storage Blob containing the result of the export - operation. The Blob Uri is only valid for 5 minutes. - :type link: str - """ - - _attribute_map = { - 'link': {'key': 'link', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiExportResultValue, self).__init__(**kwargs) - self.link = kwargs.get('link', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_export_result_value_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_export_result_value_py3.py deleted file mode 100644 index 521bd611cb33..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_export_result_value_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiExportResultValue(Model): - """The object defining the schema of the exported Api Detail. - - :param link: Link to the Storage Blob containing the result of the export - operation. The Blob Uri is only valid for 5 minutes. - :type link: str - """ - - _attribute_map = { - 'link': {'key': 'link', 'type': 'str'}, - } - - def __init__(self, *, link: str=None, **kwargs) -> None: - super(ApiExportResultValue, self).__init__(**kwargs) - self.link = link diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_apply_network_configuration_parameters.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_apply_network_configuration_parameters.py deleted file mode 100644 index 7de08f790795..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_apply_network_configuration_parameters.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiManagementServiceApplyNetworkConfigurationParameters(Model): - """Parameter supplied to the Apply Network configuration operation. - - :param location: Location of the Api Management service to update for a - multi-region service. For a service deployed in a single region, this - parameter is not required. - :type location: str - """ - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiManagementServiceApplyNetworkConfigurationParameters, self).__init__(**kwargs) - self.location = kwargs.get('location', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_apply_network_configuration_parameters_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_apply_network_configuration_parameters_py3.py deleted file mode 100644 index 315f5e2859ca..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_apply_network_configuration_parameters_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiManagementServiceApplyNetworkConfigurationParameters(Model): - """Parameter supplied to the Apply Network configuration operation. - - :param location: Location of the Api Management service to update for a - multi-region service. For a service deployed in a single region, this - parameter is not required. - :type location: str - """ - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, **kwargs) -> None: - super(ApiManagementServiceApplyNetworkConfigurationParameters, self).__init__(**kwargs) - self.location = location diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_backup_restore_parameters.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_backup_restore_parameters.py deleted file mode 100644 index 9cde1269f3f7..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_backup_restore_parameters.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiManagementServiceBackupRestoreParameters(Model): - """Parameters supplied to the Backup/Restore of an API Management service - operation. - - All required parameters must be populated in order to send to Azure. - - :param storage_account: Required. Azure Cloud Storage account (used to - place/retrieve the backup) name. - :type storage_account: str - :param access_key: Required. Azure Cloud Storage account (used to - place/retrieve the backup) access key. - :type access_key: str - :param container_name: Required. Azure Cloud Storage blob container name - used to place/retrieve the backup. - :type container_name: str - :param backup_name: Required. The name of the backup file to create. - :type backup_name: str - """ - - _validation = { - 'storage_account': {'required': True}, - 'access_key': {'required': True}, - 'container_name': {'required': True}, - 'backup_name': {'required': True}, - } - - _attribute_map = { - 'storage_account': {'key': 'storageAccount', 'type': 'str'}, - 'access_key': {'key': 'accessKey', 'type': 'str'}, - 'container_name': {'key': 'containerName', 'type': 'str'}, - 'backup_name': {'key': 'backupName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiManagementServiceBackupRestoreParameters, self).__init__(**kwargs) - self.storage_account = kwargs.get('storage_account', None) - self.access_key = kwargs.get('access_key', None) - self.container_name = kwargs.get('container_name', None) - self.backup_name = kwargs.get('backup_name', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_backup_restore_parameters_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_backup_restore_parameters_py3.py deleted file mode 100644 index e6cba95e6129..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_backup_restore_parameters_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiManagementServiceBackupRestoreParameters(Model): - """Parameters supplied to the Backup/Restore of an API Management service - operation. - - All required parameters must be populated in order to send to Azure. - - :param storage_account: Required. Azure Cloud Storage account (used to - place/retrieve the backup) name. - :type storage_account: str - :param access_key: Required. Azure Cloud Storage account (used to - place/retrieve the backup) access key. - :type access_key: str - :param container_name: Required. Azure Cloud Storage blob container name - used to place/retrieve the backup. - :type container_name: str - :param backup_name: Required. The name of the backup file to create. - :type backup_name: str - """ - - _validation = { - 'storage_account': {'required': True}, - 'access_key': {'required': True}, - 'container_name': {'required': True}, - 'backup_name': {'required': True}, - } - - _attribute_map = { - 'storage_account': {'key': 'storageAccount', 'type': 'str'}, - 'access_key': {'key': 'accessKey', 'type': 'str'}, - 'container_name': {'key': 'containerName', 'type': 'str'}, - 'backup_name': {'key': 'backupName', 'type': 'str'}, - } - - def __init__(self, *, storage_account: str, access_key: str, container_name: str, backup_name: str, **kwargs) -> None: - super(ApiManagementServiceBackupRestoreParameters, self).__init__(**kwargs) - self.storage_account = storage_account - self.access_key = access_key - self.container_name = container_name - self.backup_name = backup_name diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_base_properties.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_base_properties.py deleted file mode 100644 index 7cf72fd0ab20..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_base_properties.py +++ /dev/null @@ -1,157 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiManagementServiceBaseProperties(Model): - """Base Properties of an API Management service resource description. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param notification_sender_email: Email address from which the - notification will be sent. - :type notification_sender_email: str - :ivar provisioning_state: The current provisioning state of the API - Management service which can be one of the following: - Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. - :vartype provisioning_state: str - :ivar target_provisioning_state: The provisioning state of the API - Management service, which is targeted by the long running operation - started on the service. - :vartype target_provisioning_state: str - :ivar created_at_utc: Creation UTC date of the API Management service.The - date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified - by the ISO 8601 standard. - :vartype created_at_utc: datetime - :ivar gateway_url: Gateway URL of the API Management service. - :vartype gateway_url: str - :ivar gateway_regional_url: Gateway URL of the API Management service in - the Default Region. - :vartype gateway_regional_url: str - :ivar portal_url: Publisher portal endpoint Url of the API Management - service. - :vartype portal_url: str - :ivar management_api_url: Management API endpoint URL of the API - Management service. - :vartype management_api_url: str - :ivar scm_url: SCM endpoint URL of the API Management service. - :vartype scm_url: str - :param hostname_configurations: Custom hostname configuration of the API - Management service. - :type hostname_configurations: - list[~azure.mgmt.apimanagement.models.HostnameConfiguration] - :ivar public_ip_addresses: Public Static Load Balanced IP addresses of the - API Management service in Primary region. Available only for Basic, - Standard and Premium SKU. - :vartype public_ip_addresses: list[str] - :ivar private_ip_addresses: Private Static Load Balanced IP addresses of - the API Management service in Primary region which is deployed in an - Internal Virtual Network. Available only for Basic, Standard and Premium - SKU. - :vartype private_ip_addresses: list[str] - :param virtual_network_configuration: Virtual network configuration of the - API Management service. - :type virtual_network_configuration: - ~azure.mgmt.apimanagement.models.VirtualNetworkConfiguration - :param additional_locations: Additional datacenter locations of the API - Management service. - :type additional_locations: - list[~azure.mgmt.apimanagement.models.AdditionalLocation] - :param custom_properties: Custom properties of the API Management service. - Setting - `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` - will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 - and 1.2). Setting - `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` - can be used to disable just TLS 1.1 and setting - `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` - can be used to disable TLS 1.0 on an API Management service. - :type custom_properties: dict[str, str] - :param certificates: List of Certificates that need to be installed in the - API Management service. Max supported certificates that can be installed - is 10. - :type certificates: - list[~azure.mgmt.apimanagement.models.CertificateConfiguration] - :param enable_client_certificate: Property only meant to be used for - Consumption SKU Service. This enforces a client certificate to be - presented on each request to the gateway. This also enables the ability to - authenticate the certificate in the policy on the gateway. Default value: - False . - :type enable_client_certificate: bool - :param virtual_network_type: The type of VPN in which API Management - service needs to be configured in. None (Default Value) means the API - Management service is not part of any Virtual Network, External means the - API Management deployment is set up inside a Virtual Network having an - Internet Facing Endpoint, and Internal means that API Management - deployment is setup inside a Virtual Network having an Intranet Facing - Endpoint only. Possible values include: 'None', 'External', 'Internal'. - Default value: "None" . - :type virtual_network_type: str or - ~azure.mgmt.apimanagement.models.VirtualNetworkType - """ - - _validation = { - 'notification_sender_email': {'max_length': 100}, - 'provisioning_state': {'readonly': True}, - 'target_provisioning_state': {'readonly': True}, - 'created_at_utc': {'readonly': True}, - 'gateway_url': {'readonly': True}, - 'gateway_regional_url': {'readonly': True}, - 'portal_url': {'readonly': True}, - 'management_api_url': {'readonly': True}, - 'scm_url': {'readonly': True}, - 'public_ip_addresses': {'readonly': True}, - 'private_ip_addresses': {'readonly': True}, - } - - _attribute_map = { - 'notification_sender_email': {'key': 'notificationSenderEmail', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'target_provisioning_state': {'key': 'targetProvisioningState', 'type': 'str'}, - 'created_at_utc': {'key': 'createdAtUtc', 'type': 'iso-8601'}, - 'gateway_url': {'key': 'gatewayUrl', 'type': 'str'}, - 'gateway_regional_url': {'key': 'gatewayRegionalUrl', 'type': 'str'}, - 'portal_url': {'key': 'portalUrl', 'type': 'str'}, - 'management_api_url': {'key': 'managementApiUrl', 'type': 'str'}, - 'scm_url': {'key': 'scmUrl', 'type': 'str'}, - 'hostname_configurations': {'key': 'hostnameConfigurations', 'type': '[HostnameConfiguration]'}, - 'public_ip_addresses': {'key': 'publicIPAddresses', 'type': '[str]'}, - 'private_ip_addresses': {'key': 'privateIPAddresses', 'type': '[str]'}, - 'virtual_network_configuration': {'key': 'virtualNetworkConfiguration', 'type': 'VirtualNetworkConfiguration'}, - 'additional_locations': {'key': 'additionalLocations', 'type': '[AdditionalLocation]'}, - 'custom_properties': {'key': 'customProperties', 'type': '{str}'}, - 'certificates': {'key': 'certificates', 'type': '[CertificateConfiguration]'}, - 'enable_client_certificate': {'key': 'enableClientCertificate', 'type': 'bool'}, - 'virtual_network_type': {'key': 'virtualNetworkType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiManagementServiceBaseProperties, self).__init__(**kwargs) - self.notification_sender_email = kwargs.get('notification_sender_email', None) - self.provisioning_state = None - self.target_provisioning_state = None - self.created_at_utc = None - self.gateway_url = None - self.gateway_regional_url = None - self.portal_url = None - self.management_api_url = None - self.scm_url = None - self.hostname_configurations = kwargs.get('hostname_configurations', None) - self.public_ip_addresses = None - self.private_ip_addresses = None - self.virtual_network_configuration = kwargs.get('virtual_network_configuration', None) - self.additional_locations = kwargs.get('additional_locations', None) - self.custom_properties = kwargs.get('custom_properties', None) - self.certificates = kwargs.get('certificates', None) - self.enable_client_certificate = kwargs.get('enable_client_certificate', False) - self.virtual_network_type = kwargs.get('virtual_network_type', "None") diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_base_properties_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_base_properties_py3.py deleted file mode 100644 index cadc56f88b6b..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_base_properties_py3.py +++ /dev/null @@ -1,157 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiManagementServiceBaseProperties(Model): - """Base Properties of an API Management service resource description. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param notification_sender_email: Email address from which the - notification will be sent. - :type notification_sender_email: str - :ivar provisioning_state: The current provisioning state of the API - Management service which can be one of the following: - Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. - :vartype provisioning_state: str - :ivar target_provisioning_state: The provisioning state of the API - Management service, which is targeted by the long running operation - started on the service. - :vartype target_provisioning_state: str - :ivar created_at_utc: Creation UTC date of the API Management service.The - date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified - by the ISO 8601 standard. - :vartype created_at_utc: datetime - :ivar gateway_url: Gateway URL of the API Management service. - :vartype gateway_url: str - :ivar gateway_regional_url: Gateway URL of the API Management service in - the Default Region. - :vartype gateway_regional_url: str - :ivar portal_url: Publisher portal endpoint Url of the API Management - service. - :vartype portal_url: str - :ivar management_api_url: Management API endpoint URL of the API - Management service. - :vartype management_api_url: str - :ivar scm_url: SCM endpoint URL of the API Management service. - :vartype scm_url: str - :param hostname_configurations: Custom hostname configuration of the API - Management service. - :type hostname_configurations: - list[~azure.mgmt.apimanagement.models.HostnameConfiguration] - :ivar public_ip_addresses: Public Static Load Balanced IP addresses of the - API Management service in Primary region. Available only for Basic, - Standard and Premium SKU. - :vartype public_ip_addresses: list[str] - :ivar private_ip_addresses: Private Static Load Balanced IP addresses of - the API Management service in Primary region which is deployed in an - Internal Virtual Network. Available only for Basic, Standard and Premium - SKU. - :vartype private_ip_addresses: list[str] - :param virtual_network_configuration: Virtual network configuration of the - API Management service. - :type virtual_network_configuration: - ~azure.mgmt.apimanagement.models.VirtualNetworkConfiguration - :param additional_locations: Additional datacenter locations of the API - Management service. - :type additional_locations: - list[~azure.mgmt.apimanagement.models.AdditionalLocation] - :param custom_properties: Custom properties of the API Management service. - Setting - `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` - will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 - and 1.2). Setting - `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` - can be used to disable just TLS 1.1 and setting - `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` - can be used to disable TLS 1.0 on an API Management service. - :type custom_properties: dict[str, str] - :param certificates: List of Certificates that need to be installed in the - API Management service. Max supported certificates that can be installed - is 10. - :type certificates: - list[~azure.mgmt.apimanagement.models.CertificateConfiguration] - :param enable_client_certificate: Property only meant to be used for - Consumption SKU Service. This enforces a client certificate to be - presented on each request to the gateway. This also enables the ability to - authenticate the certificate in the policy on the gateway. Default value: - False . - :type enable_client_certificate: bool - :param virtual_network_type: The type of VPN in which API Management - service needs to be configured in. None (Default Value) means the API - Management service is not part of any Virtual Network, External means the - API Management deployment is set up inside a Virtual Network having an - Internet Facing Endpoint, and Internal means that API Management - deployment is setup inside a Virtual Network having an Intranet Facing - Endpoint only. Possible values include: 'None', 'External', 'Internal'. - Default value: "None" . - :type virtual_network_type: str or - ~azure.mgmt.apimanagement.models.VirtualNetworkType - """ - - _validation = { - 'notification_sender_email': {'max_length': 100}, - 'provisioning_state': {'readonly': True}, - 'target_provisioning_state': {'readonly': True}, - 'created_at_utc': {'readonly': True}, - 'gateway_url': {'readonly': True}, - 'gateway_regional_url': {'readonly': True}, - 'portal_url': {'readonly': True}, - 'management_api_url': {'readonly': True}, - 'scm_url': {'readonly': True}, - 'public_ip_addresses': {'readonly': True}, - 'private_ip_addresses': {'readonly': True}, - } - - _attribute_map = { - 'notification_sender_email': {'key': 'notificationSenderEmail', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'target_provisioning_state': {'key': 'targetProvisioningState', 'type': 'str'}, - 'created_at_utc': {'key': 'createdAtUtc', 'type': 'iso-8601'}, - 'gateway_url': {'key': 'gatewayUrl', 'type': 'str'}, - 'gateway_regional_url': {'key': 'gatewayRegionalUrl', 'type': 'str'}, - 'portal_url': {'key': 'portalUrl', 'type': 'str'}, - 'management_api_url': {'key': 'managementApiUrl', 'type': 'str'}, - 'scm_url': {'key': 'scmUrl', 'type': 'str'}, - 'hostname_configurations': {'key': 'hostnameConfigurations', 'type': '[HostnameConfiguration]'}, - 'public_ip_addresses': {'key': 'publicIPAddresses', 'type': '[str]'}, - 'private_ip_addresses': {'key': 'privateIPAddresses', 'type': '[str]'}, - 'virtual_network_configuration': {'key': 'virtualNetworkConfiguration', 'type': 'VirtualNetworkConfiguration'}, - 'additional_locations': {'key': 'additionalLocations', 'type': '[AdditionalLocation]'}, - 'custom_properties': {'key': 'customProperties', 'type': '{str}'}, - 'certificates': {'key': 'certificates', 'type': '[CertificateConfiguration]'}, - 'enable_client_certificate': {'key': 'enableClientCertificate', 'type': 'bool'}, - 'virtual_network_type': {'key': 'virtualNetworkType', 'type': 'str'}, - } - - def __init__(self, *, notification_sender_email: str=None, hostname_configurations=None, virtual_network_configuration=None, additional_locations=None, custom_properties=None, certificates=None, enable_client_certificate: bool=False, virtual_network_type="None", **kwargs) -> None: - super(ApiManagementServiceBaseProperties, self).__init__(**kwargs) - self.notification_sender_email = notification_sender_email - self.provisioning_state = None - self.target_provisioning_state = None - self.created_at_utc = None - self.gateway_url = None - self.gateway_regional_url = None - self.portal_url = None - self.management_api_url = None - self.scm_url = None - self.hostname_configurations = hostname_configurations - self.public_ip_addresses = None - self.private_ip_addresses = None - self.virtual_network_configuration = virtual_network_configuration - self.additional_locations = additional_locations - self.custom_properties = custom_properties - self.certificates = certificates - self.enable_client_certificate = enable_client_certificate - self.virtual_network_type = virtual_network_type diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_check_name_availability_parameters.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_check_name_availability_parameters.py deleted file mode 100644 index 621a58f23110..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_check_name_availability_parameters.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiManagementServiceCheckNameAvailabilityParameters(Model): - """Parameters supplied to the CheckNameAvailability operation. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name to check for availability. - :type name: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiManagementServiceCheckNameAvailabilityParameters, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_check_name_availability_parameters_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_check_name_availability_parameters_py3.py deleted file mode 100644 index 8025048f1cb7..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_check_name_availability_parameters_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiManagementServiceCheckNameAvailabilityParameters(Model): - """Parameters supplied to the CheckNameAvailability operation. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name to check for availability. - :type name: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name: str, **kwargs) -> None: - super(ApiManagementServiceCheckNameAvailabilityParameters, self).__init__(**kwargs) - self.name = name diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_get_sso_token_result.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_get_sso_token_result.py deleted file mode 100644 index 34e758843486..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_get_sso_token_result.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiManagementServiceGetSsoTokenResult(Model): - """The response of the GetSsoToken operation. - - :param redirect_uri: Redirect URL to the Publisher Portal containing the - SSO token. - :type redirect_uri: str - """ - - _attribute_map = { - 'redirect_uri': {'key': 'redirectUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiManagementServiceGetSsoTokenResult, self).__init__(**kwargs) - self.redirect_uri = kwargs.get('redirect_uri', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_get_sso_token_result_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_get_sso_token_result_py3.py deleted file mode 100644 index 607491621d49..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_get_sso_token_result_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiManagementServiceGetSsoTokenResult(Model): - """The response of the GetSsoToken operation. - - :param redirect_uri: Redirect URL to the Publisher Portal containing the - SSO token. - :type redirect_uri: str - """ - - _attribute_map = { - 'redirect_uri': {'key': 'redirectUri', 'type': 'str'}, - } - - def __init__(self, *, redirect_uri: str=None, **kwargs) -> None: - super(ApiManagementServiceGetSsoTokenResult, self).__init__(**kwargs) - self.redirect_uri = redirect_uri diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_identity.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_identity.py deleted file mode 100644 index 784c8854358d..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_identity.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiManagementServiceIdentity(Model): - """Identity properties of the Api Management service resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. The identity type. Currently the only supported type - is 'SystemAssigned'. Default value: "SystemAssigned" . - :vartype type: str - :ivar principal_id: The principal id of the identity. - :vartype principal_id: str - :ivar tenant_id: The client tenant id of the identity. - :vartype tenant_id: str - """ - - _validation = { - 'type': {'required': True, 'constant': True}, - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - } - - type = "SystemAssigned" - - def __init__(self, **kwargs): - super(ApiManagementServiceIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_identity_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_identity_py3.py deleted file mode 100644 index 2ef5954875ef..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_identity_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiManagementServiceIdentity(Model): - """Identity properties of the Api Management service resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. The identity type. Currently the only supported type - is 'SystemAssigned'. Default value: "SystemAssigned" . - :vartype type: str - :ivar principal_id: The principal id of the identity. - :vartype principal_id: str - :ivar tenant_id: The client tenant id of the identity. - :vartype tenant_id: str - """ - - _validation = { - 'type': {'required': True, 'constant': True}, - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - } - - type = "SystemAssigned" - - def __init__(self, **kwargs) -> None: - super(ApiManagementServiceIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_name_availability_result.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_name_availability_result.py deleted file mode 100644 index dd5eda6bdb95..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_name_availability_result.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiManagementServiceNameAvailabilityResult(Model): - """Response of the CheckNameAvailability operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name_available: True if the name is available and can be used to - create a new API Management service; otherwise false. - :vartype name_available: bool - :ivar message: If reason == invalid, provide the user with the reason why - the given name is invalid, and provide the resource naming requirements so - that the user can select a valid name. If reason == AlreadyExists, explain - that is already in use, and direct them to select a - different name. - :vartype message: str - :param reason: Invalid indicates the name provided does not match the - resource provider’s naming requirements (incorrect length, unsupported - characters, etc.) AlreadyExists indicates that the name is already in use - and is therefore unavailable. Possible values include: 'Valid', 'Invalid', - 'AlreadyExists' - :type reason: str or - ~azure.mgmt.apimanagement.models.NameAvailabilityReason - """ - - _validation = { - 'name_available': {'readonly': True}, - 'message': {'readonly': True}, - } - - _attribute_map = { - 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'message': {'key': 'message', 'type': 'str'}, - 'reason': {'key': 'reason', 'type': 'NameAvailabilityReason'}, - } - - def __init__(self, **kwargs): - super(ApiManagementServiceNameAvailabilityResult, self).__init__(**kwargs) - self.name_available = None - self.message = None - self.reason = kwargs.get('reason', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_name_availability_result_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_name_availability_result_py3.py deleted file mode 100644 index 3bae91346b47..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_name_availability_result_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiManagementServiceNameAvailabilityResult(Model): - """Response of the CheckNameAvailability operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name_available: True if the name is available and can be used to - create a new API Management service; otherwise false. - :vartype name_available: bool - :ivar message: If reason == invalid, provide the user with the reason why - the given name is invalid, and provide the resource naming requirements so - that the user can select a valid name. If reason == AlreadyExists, explain - that is already in use, and direct them to select a - different name. - :vartype message: str - :param reason: Invalid indicates the name provided does not match the - resource provider’s naming requirements (incorrect length, unsupported - characters, etc.) AlreadyExists indicates that the name is already in use - and is therefore unavailable. Possible values include: 'Valid', 'Invalid', - 'AlreadyExists' - :type reason: str or - ~azure.mgmt.apimanagement.models.NameAvailabilityReason - """ - - _validation = { - 'name_available': {'readonly': True}, - 'message': {'readonly': True}, - } - - _attribute_map = { - 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'message': {'key': 'message', 'type': 'str'}, - 'reason': {'key': 'reason', 'type': 'NameAvailabilityReason'}, - } - - def __init__(self, *, reason=None, **kwargs) -> None: - super(ApiManagementServiceNameAvailabilityResult, self).__init__(**kwargs) - self.name_available = None - self.message = None - self.reason = reason diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_resource.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_resource.py deleted file mode 100644 index 23867d44ffdf..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_resource.py +++ /dev/null @@ -1,206 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .apim_resource import ApimResource - - -class ApiManagementServiceResource(ApimResource): - """A single API Management service resource in List or Get response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource is set to - Microsoft.ApiManagement. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param notification_sender_email: Email address from which the - notification will be sent. - :type notification_sender_email: str - :ivar provisioning_state: The current provisioning state of the API - Management service which can be one of the following: - Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. - :vartype provisioning_state: str - :ivar target_provisioning_state: The provisioning state of the API - Management service, which is targeted by the long running operation - started on the service. - :vartype target_provisioning_state: str - :ivar created_at_utc: Creation UTC date of the API Management service.The - date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified - by the ISO 8601 standard. - :vartype created_at_utc: datetime - :ivar gateway_url: Gateway URL of the API Management service. - :vartype gateway_url: str - :ivar gateway_regional_url: Gateway URL of the API Management service in - the Default Region. - :vartype gateway_regional_url: str - :ivar portal_url: Publisher portal endpoint Url of the API Management - service. - :vartype portal_url: str - :ivar management_api_url: Management API endpoint URL of the API - Management service. - :vartype management_api_url: str - :ivar scm_url: SCM endpoint URL of the API Management service. - :vartype scm_url: str - :param hostname_configurations: Custom hostname configuration of the API - Management service. - :type hostname_configurations: - list[~azure.mgmt.apimanagement.models.HostnameConfiguration] - :ivar public_ip_addresses: Public Static Load Balanced IP addresses of the - API Management service in Primary region. Available only for Basic, - Standard and Premium SKU. - :vartype public_ip_addresses: list[str] - :ivar private_ip_addresses: Private Static Load Balanced IP addresses of - the API Management service in Primary region which is deployed in an - Internal Virtual Network. Available only for Basic, Standard and Premium - SKU. - :vartype private_ip_addresses: list[str] - :param virtual_network_configuration: Virtual network configuration of the - API Management service. - :type virtual_network_configuration: - ~azure.mgmt.apimanagement.models.VirtualNetworkConfiguration - :param additional_locations: Additional datacenter locations of the API - Management service. - :type additional_locations: - list[~azure.mgmt.apimanagement.models.AdditionalLocation] - :param custom_properties: Custom properties of the API Management service. - Setting - `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` - will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 - and 1.2). Setting - `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` - can be used to disable just TLS 1.1 and setting - `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` - can be used to disable TLS 1.0 on an API Management service. - :type custom_properties: dict[str, str] - :param certificates: List of Certificates that need to be installed in the - API Management service. Max supported certificates that can be installed - is 10. - :type certificates: - list[~azure.mgmt.apimanagement.models.CertificateConfiguration] - :param enable_client_certificate: Property only meant to be used for - Consumption SKU Service. This enforces a client certificate to be - presented on each request to the gateway. This also enables the ability to - authenticate the certificate in the policy on the gateway. Default value: - False . - :type enable_client_certificate: bool - :param virtual_network_type: The type of VPN in which API Management - service needs to be configured in. None (Default Value) means the API - Management service is not part of any Virtual Network, External means the - API Management deployment is set up inside a Virtual Network having an - Internet Facing Endpoint, and Internal means that API Management - deployment is setup inside a Virtual Network having an Intranet Facing - Endpoint only. Possible values include: 'None', 'External', 'Internal'. - Default value: "None" . - :type virtual_network_type: str or - ~azure.mgmt.apimanagement.models.VirtualNetworkType - :param publisher_email: Required. Publisher email. - :type publisher_email: str - :param publisher_name: Required. Publisher name. - :type publisher_name: str - :param sku: Required. SKU properties of the API Management service. - :type sku: - ~azure.mgmt.apimanagement.models.ApiManagementServiceSkuProperties - :param identity: Managed service identity of the Api Management service. - :type identity: - ~azure.mgmt.apimanagement.models.ApiManagementServiceIdentity - :param location: Required. Resource location. - :type location: str - :ivar etag: ETag of the resource. - :vartype etag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'notification_sender_email': {'max_length': 100}, - 'provisioning_state': {'readonly': True}, - 'target_provisioning_state': {'readonly': True}, - 'created_at_utc': {'readonly': True}, - 'gateway_url': {'readonly': True}, - 'gateway_regional_url': {'readonly': True}, - 'portal_url': {'readonly': True}, - 'management_api_url': {'readonly': True}, - 'scm_url': {'readonly': True}, - 'public_ip_addresses': {'readonly': True}, - 'private_ip_addresses': {'readonly': True}, - 'publisher_email': {'required': True, 'max_length': 100}, - 'publisher_name': {'required': True, 'max_length': 100}, - 'sku': {'required': True}, - 'location': {'required': True}, - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'notification_sender_email': {'key': 'properties.notificationSenderEmail', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'target_provisioning_state': {'key': 'properties.targetProvisioningState', 'type': 'str'}, - 'created_at_utc': {'key': 'properties.createdAtUtc', 'type': 'iso-8601'}, - 'gateway_url': {'key': 'properties.gatewayUrl', 'type': 'str'}, - 'gateway_regional_url': {'key': 'properties.gatewayRegionalUrl', 'type': 'str'}, - 'portal_url': {'key': 'properties.portalUrl', 'type': 'str'}, - 'management_api_url': {'key': 'properties.managementApiUrl', 'type': 'str'}, - 'scm_url': {'key': 'properties.scmUrl', 'type': 'str'}, - 'hostname_configurations': {'key': 'properties.hostnameConfigurations', 'type': '[HostnameConfiguration]'}, - 'public_ip_addresses': {'key': 'properties.publicIPAddresses', 'type': '[str]'}, - 'private_ip_addresses': {'key': 'properties.privateIPAddresses', 'type': '[str]'}, - 'virtual_network_configuration': {'key': 'properties.virtualNetworkConfiguration', 'type': 'VirtualNetworkConfiguration'}, - 'additional_locations': {'key': 'properties.additionalLocations', 'type': '[AdditionalLocation]'}, - 'custom_properties': {'key': 'properties.customProperties', 'type': '{str}'}, - 'certificates': {'key': 'properties.certificates', 'type': '[CertificateConfiguration]'}, - 'enable_client_certificate': {'key': 'properties.enableClientCertificate', 'type': 'bool'}, - 'virtual_network_type': {'key': 'properties.virtualNetworkType', 'type': 'str'}, - 'publisher_email': {'key': 'properties.publisherEmail', 'type': 'str'}, - 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'ApiManagementServiceSkuProperties'}, - 'identity': {'key': 'identity', 'type': 'ApiManagementServiceIdentity'}, - 'location': {'key': 'location', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiManagementServiceResource, self).__init__(**kwargs) - self.notification_sender_email = kwargs.get('notification_sender_email', None) - self.provisioning_state = None - self.target_provisioning_state = None - self.created_at_utc = None - self.gateway_url = None - self.gateway_regional_url = None - self.portal_url = None - self.management_api_url = None - self.scm_url = None - self.hostname_configurations = kwargs.get('hostname_configurations', None) - self.public_ip_addresses = None - self.private_ip_addresses = None - self.virtual_network_configuration = kwargs.get('virtual_network_configuration', None) - self.additional_locations = kwargs.get('additional_locations', None) - self.custom_properties = kwargs.get('custom_properties', None) - self.certificates = kwargs.get('certificates', None) - self.enable_client_certificate = kwargs.get('enable_client_certificate', False) - self.virtual_network_type = kwargs.get('virtual_network_type', "None") - self.publisher_email = kwargs.get('publisher_email', None) - self.publisher_name = kwargs.get('publisher_name', None) - self.sku = kwargs.get('sku', None) - self.identity = kwargs.get('identity', None) - self.location = kwargs.get('location', None) - self.etag = None diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_resource_paged.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_resource_paged.py deleted file mode 100644 index 3f5ff2743b15..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_resource_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ApiManagementServiceResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`ApiManagementServiceResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ApiManagementServiceResource]'} - } - - def __init__(self, *args, **kwargs): - - super(ApiManagementServiceResourcePaged, self).__init__(*args, **kwargs) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_resource_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_resource_py3.py deleted file mode 100644 index 8e2213108bd0..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_resource_py3.py +++ /dev/null @@ -1,206 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .apim_resource_py3 import ApimResource - - -class ApiManagementServiceResource(ApimResource): - """A single API Management service resource in List or Get response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource is set to - Microsoft.ApiManagement. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param notification_sender_email: Email address from which the - notification will be sent. - :type notification_sender_email: str - :ivar provisioning_state: The current provisioning state of the API - Management service which can be one of the following: - Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. - :vartype provisioning_state: str - :ivar target_provisioning_state: The provisioning state of the API - Management service, which is targeted by the long running operation - started on the service. - :vartype target_provisioning_state: str - :ivar created_at_utc: Creation UTC date of the API Management service.The - date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified - by the ISO 8601 standard. - :vartype created_at_utc: datetime - :ivar gateway_url: Gateway URL of the API Management service. - :vartype gateway_url: str - :ivar gateway_regional_url: Gateway URL of the API Management service in - the Default Region. - :vartype gateway_regional_url: str - :ivar portal_url: Publisher portal endpoint Url of the API Management - service. - :vartype portal_url: str - :ivar management_api_url: Management API endpoint URL of the API - Management service. - :vartype management_api_url: str - :ivar scm_url: SCM endpoint URL of the API Management service. - :vartype scm_url: str - :param hostname_configurations: Custom hostname configuration of the API - Management service. - :type hostname_configurations: - list[~azure.mgmt.apimanagement.models.HostnameConfiguration] - :ivar public_ip_addresses: Public Static Load Balanced IP addresses of the - API Management service in Primary region. Available only for Basic, - Standard and Premium SKU. - :vartype public_ip_addresses: list[str] - :ivar private_ip_addresses: Private Static Load Balanced IP addresses of - the API Management service in Primary region which is deployed in an - Internal Virtual Network. Available only for Basic, Standard and Premium - SKU. - :vartype private_ip_addresses: list[str] - :param virtual_network_configuration: Virtual network configuration of the - API Management service. - :type virtual_network_configuration: - ~azure.mgmt.apimanagement.models.VirtualNetworkConfiguration - :param additional_locations: Additional datacenter locations of the API - Management service. - :type additional_locations: - list[~azure.mgmt.apimanagement.models.AdditionalLocation] - :param custom_properties: Custom properties of the API Management service. - Setting - `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` - will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 - and 1.2). Setting - `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` - can be used to disable just TLS 1.1 and setting - `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` - can be used to disable TLS 1.0 on an API Management service. - :type custom_properties: dict[str, str] - :param certificates: List of Certificates that need to be installed in the - API Management service. Max supported certificates that can be installed - is 10. - :type certificates: - list[~azure.mgmt.apimanagement.models.CertificateConfiguration] - :param enable_client_certificate: Property only meant to be used for - Consumption SKU Service. This enforces a client certificate to be - presented on each request to the gateway. This also enables the ability to - authenticate the certificate in the policy on the gateway. Default value: - False . - :type enable_client_certificate: bool - :param virtual_network_type: The type of VPN in which API Management - service needs to be configured in. None (Default Value) means the API - Management service is not part of any Virtual Network, External means the - API Management deployment is set up inside a Virtual Network having an - Internet Facing Endpoint, and Internal means that API Management - deployment is setup inside a Virtual Network having an Intranet Facing - Endpoint only. Possible values include: 'None', 'External', 'Internal'. - Default value: "None" . - :type virtual_network_type: str or - ~azure.mgmt.apimanagement.models.VirtualNetworkType - :param publisher_email: Required. Publisher email. - :type publisher_email: str - :param publisher_name: Required. Publisher name. - :type publisher_name: str - :param sku: Required. SKU properties of the API Management service. - :type sku: - ~azure.mgmt.apimanagement.models.ApiManagementServiceSkuProperties - :param identity: Managed service identity of the Api Management service. - :type identity: - ~azure.mgmt.apimanagement.models.ApiManagementServiceIdentity - :param location: Required. Resource location. - :type location: str - :ivar etag: ETag of the resource. - :vartype etag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'notification_sender_email': {'max_length': 100}, - 'provisioning_state': {'readonly': True}, - 'target_provisioning_state': {'readonly': True}, - 'created_at_utc': {'readonly': True}, - 'gateway_url': {'readonly': True}, - 'gateway_regional_url': {'readonly': True}, - 'portal_url': {'readonly': True}, - 'management_api_url': {'readonly': True}, - 'scm_url': {'readonly': True}, - 'public_ip_addresses': {'readonly': True}, - 'private_ip_addresses': {'readonly': True}, - 'publisher_email': {'required': True, 'max_length': 100}, - 'publisher_name': {'required': True, 'max_length': 100}, - 'sku': {'required': True}, - 'location': {'required': True}, - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'notification_sender_email': {'key': 'properties.notificationSenderEmail', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'target_provisioning_state': {'key': 'properties.targetProvisioningState', 'type': 'str'}, - 'created_at_utc': {'key': 'properties.createdAtUtc', 'type': 'iso-8601'}, - 'gateway_url': {'key': 'properties.gatewayUrl', 'type': 'str'}, - 'gateway_regional_url': {'key': 'properties.gatewayRegionalUrl', 'type': 'str'}, - 'portal_url': {'key': 'properties.portalUrl', 'type': 'str'}, - 'management_api_url': {'key': 'properties.managementApiUrl', 'type': 'str'}, - 'scm_url': {'key': 'properties.scmUrl', 'type': 'str'}, - 'hostname_configurations': {'key': 'properties.hostnameConfigurations', 'type': '[HostnameConfiguration]'}, - 'public_ip_addresses': {'key': 'properties.publicIPAddresses', 'type': '[str]'}, - 'private_ip_addresses': {'key': 'properties.privateIPAddresses', 'type': '[str]'}, - 'virtual_network_configuration': {'key': 'properties.virtualNetworkConfiguration', 'type': 'VirtualNetworkConfiguration'}, - 'additional_locations': {'key': 'properties.additionalLocations', 'type': '[AdditionalLocation]'}, - 'custom_properties': {'key': 'properties.customProperties', 'type': '{str}'}, - 'certificates': {'key': 'properties.certificates', 'type': '[CertificateConfiguration]'}, - 'enable_client_certificate': {'key': 'properties.enableClientCertificate', 'type': 'bool'}, - 'virtual_network_type': {'key': 'properties.virtualNetworkType', 'type': 'str'}, - 'publisher_email': {'key': 'properties.publisherEmail', 'type': 'str'}, - 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'ApiManagementServiceSkuProperties'}, - 'identity': {'key': 'identity', 'type': 'ApiManagementServiceIdentity'}, - 'location': {'key': 'location', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - } - - def __init__(self, *, publisher_email: str, publisher_name: str, sku, location: str, tags=None, notification_sender_email: str=None, hostname_configurations=None, virtual_network_configuration=None, additional_locations=None, custom_properties=None, certificates=None, enable_client_certificate: bool=False, virtual_network_type="None", identity=None, **kwargs) -> None: - super(ApiManagementServiceResource, self).__init__(tags=tags, **kwargs) - self.notification_sender_email = notification_sender_email - self.provisioning_state = None - self.target_provisioning_state = None - self.created_at_utc = None - self.gateway_url = None - self.gateway_regional_url = None - self.portal_url = None - self.management_api_url = None - self.scm_url = None - self.hostname_configurations = hostname_configurations - self.public_ip_addresses = None - self.private_ip_addresses = None - self.virtual_network_configuration = virtual_network_configuration - self.additional_locations = additional_locations - self.custom_properties = custom_properties - self.certificates = certificates - self.enable_client_certificate = enable_client_certificate - self.virtual_network_type = virtual_network_type - self.publisher_email = publisher_email - self.publisher_name = publisher_name - self.sku = sku - self.identity = identity - self.location = location - self.etag = None diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_sku_properties.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_sku_properties.py deleted file mode 100644 index 1ccc258b22e6..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_sku_properties.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiManagementServiceSkuProperties(Model): - """API Management service resource SKU properties. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the Sku. Possible values include: - 'Developer', 'Standard', 'Premium', 'Basic', 'Consumption' - :type name: str or ~azure.mgmt.apimanagement.models.SkuType - :param capacity: Capacity of the SKU (number of deployed units of the - SKU). - :type capacity: int - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ApiManagementServiceSkuProperties, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.capacity = kwargs.get('capacity', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_sku_properties_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_sku_properties_py3.py deleted file mode 100644 index d9a425f3986f..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_sku_properties_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiManagementServiceSkuProperties(Model): - """API Management service resource SKU properties. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the Sku. Possible values include: - 'Developer', 'Standard', 'Premium', 'Basic', 'Consumption' - :type name: str or ~azure.mgmt.apimanagement.models.SkuType - :param capacity: Capacity of the SKU (number of deployed units of the - SKU). - :type capacity: int - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__(self, *, name, capacity: int=None, **kwargs) -> None: - super(ApiManagementServiceSkuProperties, self).__init__(**kwargs) - self.name = name - self.capacity = capacity diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_update_parameters.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_update_parameters.py deleted file mode 100644 index aca59f821f77..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_update_parameters.py +++ /dev/null @@ -1,198 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .apim_resource import ApimResource - - -class ApiManagementServiceUpdateParameters(ApimResource): - """Parameter supplied to Update Api Management Service. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource is set to - Microsoft.ApiManagement. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param notification_sender_email: Email address from which the - notification will be sent. - :type notification_sender_email: str - :ivar provisioning_state: The current provisioning state of the API - Management service which can be one of the following: - Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. - :vartype provisioning_state: str - :ivar target_provisioning_state: The provisioning state of the API - Management service, which is targeted by the long running operation - started on the service. - :vartype target_provisioning_state: str - :ivar created_at_utc: Creation UTC date of the API Management service.The - date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified - by the ISO 8601 standard. - :vartype created_at_utc: datetime - :ivar gateway_url: Gateway URL of the API Management service. - :vartype gateway_url: str - :ivar gateway_regional_url: Gateway URL of the API Management service in - the Default Region. - :vartype gateway_regional_url: str - :ivar portal_url: Publisher portal endpoint Url of the API Management - service. - :vartype portal_url: str - :ivar management_api_url: Management API endpoint URL of the API - Management service. - :vartype management_api_url: str - :ivar scm_url: SCM endpoint URL of the API Management service. - :vartype scm_url: str - :param hostname_configurations: Custom hostname configuration of the API - Management service. - :type hostname_configurations: - list[~azure.mgmt.apimanagement.models.HostnameConfiguration] - :ivar public_ip_addresses: Public Static Load Balanced IP addresses of the - API Management service in Primary region. Available only for Basic, - Standard and Premium SKU. - :vartype public_ip_addresses: list[str] - :ivar private_ip_addresses: Private Static Load Balanced IP addresses of - the API Management service in Primary region which is deployed in an - Internal Virtual Network. Available only for Basic, Standard and Premium - SKU. - :vartype private_ip_addresses: list[str] - :param virtual_network_configuration: Virtual network configuration of the - API Management service. - :type virtual_network_configuration: - ~azure.mgmt.apimanagement.models.VirtualNetworkConfiguration - :param additional_locations: Additional datacenter locations of the API - Management service. - :type additional_locations: - list[~azure.mgmt.apimanagement.models.AdditionalLocation] - :param custom_properties: Custom properties of the API Management service. - Setting - `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` - will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 - and 1.2). Setting - `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` - can be used to disable just TLS 1.1 and setting - `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` - can be used to disable TLS 1.0 on an API Management service. - :type custom_properties: dict[str, str] - :param certificates: List of Certificates that need to be installed in the - API Management service. Max supported certificates that can be installed - is 10. - :type certificates: - list[~azure.mgmt.apimanagement.models.CertificateConfiguration] - :param enable_client_certificate: Property only meant to be used for - Consumption SKU Service. This enforces a client certificate to be - presented on each request to the gateway. This also enables the ability to - authenticate the certificate in the policy on the gateway. Default value: - False . - :type enable_client_certificate: bool - :param virtual_network_type: The type of VPN in which API Management - service needs to be configured in. None (Default Value) means the API - Management service is not part of any Virtual Network, External means the - API Management deployment is set up inside a Virtual Network having an - Internet Facing Endpoint, and Internal means that API Management - deployment is setup inside a Virtual Network having an Intranet Facing - Endpoint only. Possible values include: 'None', 'External', 'Internal'. - Default value: "None" . - :type virtual_network_type: str or - ~azure.mgmt.apimanagement.models.VirtualNetworkType - :param publisher_email: Publisher email. - :type publisher_email: str - :param publisher_name: Publisher name. - :type publisher_name: str - :param sku: SKU properties of the API Management service. - :type sku: - ~azure.mgmt.apimanagement.models.ApiManagementServiceSkuProperties - :param identity: Managed service identity of the Api Management service. - :type identity: - ~azure.mgmt.apimanagement.models.ApiManagementServiceIdentity - :ivar etag: ETag of the resource. - :vartype etag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'notification_sender_email': {'max_length': 100}, - 'provisioning_state': {'readonly': True}, - 'target_provisioning_state': {'readonly': True}, - 'created_at_utc': {'readonly': True}, - 'gateway_url': {'readonly': True}, - 'gateway_regional_url': {'readonly': True}, - 'portal_url': {'readonly': True}, - 'management_api_url': {'readonly': True}, - 'scm_url': {'readonly': True}, - 'public_ip_addresses': {'readonly': True}, - 'private_ip_addresses': {'readonly': True}, - 'publisher_email': {'max_length': 100}, - 'publisher_name': {'max_length': 100}, - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'notification_sender_email': {'key': 'properties.notificationSenderEmail', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'target_provisioning_state': {'key': 'properties.targetProvisioningState', 'type': 'str'}, - 'created_at_utc': {'key': 'properties.createdAtUtc', 'type': 'iso-8601'}, - 'gateway_url': {'key': 'properties.gatewayUrl', 'type': 'str'}, - 'gateway_regional_url': {'key': 'properties.gatewayRegionalUrl', 'type': 'str'}, - 'portal_url': {'key': 'properties.portalUrl', 'type': 'str'}, - 'management_api_url': {'key': 'properties.managementApiUrl', 'type': 'str'}, - 'scm_url': {'key': 'properties.scmUrl', 'type': 'str'}, - 'hostname_configurations': {'key': 'properties.hostnameConfigurations', 'type': '[HostnameConfiguration]'}, - 'public_ip_addresses': {'key': 'properties.publicIPAddresses', 'type': '[str]'}, - 'private_ip_addresses': {'key': 'properties.privateIPAddresses', 'type': '[str]'}, - 'virtual_network_configuration': {'key': 'properties.virtualNetworkConfiguration', 'type': 'VirtualNetworkConfiguration'}, - 'additional_locations': {'key': 'properties.additionalLocations', 'type': '[AdditionalLocation]'}, - 'custom_properties': {'key': 'properties.customProperties', 'type': '{str}'}, - 'certificates': {'key': 'properties.certificates', 'type': '[CertificateConfiguration]'}, - 'enable_client_certificate': {'key': 'properties.enableClientCertificate', 'type': 'bool'}, - 'virtual_network_type': {'key': 'properties.virtualNetworkType', 'type': 'str'}, - 'publisher_email': {'key': 'properties.publisherEmail', 'type': 'str'}, - 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'ApiManagementServiceSkuProperties'}, - 'identity': {'key': 'identity', 'type': 'ApiManagementServiceIdentity'}, - 'etag': {'key': 'etag', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiManagementServiceUpdateParameters, self).__init__(**kwargs) - self.notification_sender_email = kwargs.get('notification_sender_email', None) - self.provisioning_state = None - self.target_provisioning_state = None - self.created_at_utc = None - self.gateway_url = None - self.gateway_regional_url = None - self.portal_url = None - self.management_api_url = None - self.scm_url = None - self.hostname_configurations = kwargs.get('hostname_configurations', None) - self.public_ip_addresses = None - self.private_ip_addresses = None - self.virtual_network_configuration = kwargs.get('virtual_network_configuration', None) - self.additional_locations = kwargs.get('additional_locations', None) - self.custom_properties = kwargs.get('custom_properties', None) - self.certificates = kwargs.get('certificates', None) - self.enable_client_certificate = kwargs.get('enable_client_certificate', False) - self.virtual_network_type = kwargs.get('virtual_network_type', "None") - self.publisher_email = kwargs.get('publisher_email', None) - self.publisher_name = kwargs.get('publisher_name', None) - self.sku = kwargs.get('sku', None) - self.identity = kwargs.get('identity', None) - self.etag = None diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_update_parameters_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_update_parameters_py3.py deleted file mode 100644 index 76a51b033344..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_management_service_update_parameters_py3.py +++ /dev/null @@ -1,198 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .apim_resource_py3 import ApimResource - - -class ApiManagementServiceUpdateParameters(ApimResource): - """Parameter supplied to Update Api Management Service. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource is set to - Microsoft.ApiManagement. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param notification_sender_email: Email address from which the - notification will be sent. - :type notification_sender_email: str - :ivar provisioning_state: The current provisioning state of the API - Management service which can be one of the following: - Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. - :vartype provisioning_state: str - :ivar target_provisioning_state: The provisioning state of the API - Management service, which is targeted by the long running operation - started on the service. - :vartype target_provisioning_state: str - :ivar created_at_utc: Creation UTC date of the API Management service.The - date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified - by the ISO 8601 standard. - :vartype created_at_utc: datetime - :ivar gateway_url: Gateway URL of the API Management service. - :vartype gateway_url: str - :ivar gateway_regional_url: Gateway URL of the API Management service in - the Default Region. - :vartype gateway_regional_url: str - :ivar portal_url: Publisher portal endpoint Url of the API Management - service. - :vartype portal_url: str - :ivar management_api_url: Management API endpoint URL of the API - Management service. - :vartype management_api_url: str - :ivar scm_url: SCM endpoint URL of the API Management service. - :vartype scm_url: str - :param hostname_configurations: Custom hostname configuration of the API - Management service. - :type hostname_configurations: - list[~azure.mgmt.apimanagement.models.HostnameConfiguration] - :ivar public_ip_addresses: Public Static Load Balanced IP addresses of the - API Management service in Primary region. Available only for Basic, - Standard and Premium SKU. - :vartype public_ip_addresses: list[str] - :ivar private_ip_addresses: Private Static Load Balanced IP addresses of - the API Management service in Primary region which is deployed in an - Internal Virtual Network. Available only for Basic, Standard and Premium - SKU. - :vartype private_ip_addresses: list[str] - :param virtual_network_configuration: Virtual network configuration of the - API Management service. - :type virtual_network_configuration: - ~azure.mgmt.apimanagement.models.VirtualNetworkConfiguration - :param additional_locations: Additional datacenter locations of the API - Management service. - :type additional_locations: - list[~azure.mgmt.apimanagement.models.AdditionalLocation] - :param custom_properties: Custom properties of the API Management service. - Setting - `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` - will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 - and 1.2). Setting - `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` - can be used to disable just TLS 1.1 and setting - `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` - can be used to disable TLS 1.0 on an API Management service. - :type custom_properties: dict[str, str] - :param certificates: List of Certificates that need to be installed in the - API Management service. Max supported certificates that can be installed - is 10. - :type certificates: - list[~azure.mgmt.apimanagement.models.CertificateConfiguration] - :param enable_client_certificate: Property only meant to be used for - Consumption SKU Service. This enforces a client certificate to be - presented on each request to the gateway. This also enables the ability to - authenticate the certificate in the policy on the gateway. Default value: - False . - :type enable_client_certificate: bool - :param virtual_network_type: The type of VPN in which API Management - service needs to be configured in. None (Default Value) means the API - Management service is not part of any Virtual Network, External means the - API Management deployment is set up inside a Virtual Network having an - Internet Facing Endpoint, and Internal means that API Management - deployment is setup inside a Virtual Network having an Intranet Facing - Endpoint only. Possible values include: 'None', 'External', 'Internal'. - Default value: "None" . - :type virtual_network_type: str or - ~azure.mgmt.apimanagement.models.VirtualNetworkType - :param publisher_email: Publisher email. - :type publisher_email: str - :param publisher_name: Publisher name. - :type publisher_name: str - :param sku: SKU properties of the API Management service. - :type sku: - ~azure.mgmt.apimanagement.models.ApiManagementServiceSkuProperties - :param identity: Managed service identity of the Api Management service. - :type identity: - ~azure.mgmt.apimanagement.models.ApiManagementServiceIdentity - :ivar etag: ETag of the resource. - :vartype etag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'notification_sender_email': {'max_length': 100}, - 'provisioning_state': {'readonly': True}, - 'target_provisioning_state': {'readonly': True}, - 'created_at_utc': {'readonly': True}, - 'gateway_url': {'readonly': True}, - 'gateway_regional_url': {'readonly': True}, - 'portal_url': {'readonly': True}, - 'management_api_url': {'readonly': True}, - 'scm_url': {'readonly': True}, - 'public_ip_addresses': {'readonly': True}, - 'private_ip_addresses': {'readonly': True}, - 'publisher_email': {'max_length': 100}, - 'publisher_name': {'max_length': 100}, - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'notification_sender_email': {'key': 'properties.notificationSenderEmail', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'target_provisioning_state': {'key': 'properties.targetProvisioningState', 'type': 'str'}, - 'created_at_utc': {'key': 'properties.createdAtUtc', 'type': 'iso-8601'}, - 'gateway_url': {'key': 'properties.gatewayUrl', 'type': 'str'}, - 'gateway_regional_url': {'key': 'properties.gatewayRegionalUrl', 'type': 'str'}, - 'portal_url': {'key': 'properties.portalUrl', 'type': 'str'}, - 'management_api_url': {'key': 'properties.managementApiUrl', 'type': 'str'}, - 'scm_url': {'key': 'properties.scmUrl', 'type': 'str'}, - 'hostname_configurations': {'key': 'properties.hostnameConfigurations', 'type': '[HostnameConfiguration]'}, - 'public_ip_addresses': {'key': 'properties.publicIPAddresses', 'type': '[str]'}, - 'private_ip_addresses': {'key': 'properties.privateIPAddresses', 'type': '[str]'}, - 'virtual_network_configuration': {'key': 'properties.virtualNetworkConfiguration', 'type': 'VirtualNetworkConfiguration'}, - 'additional_locations': {'key': 'properties.additionalLocations', 'type': '[AdditionalLocation]'}, - 'custom_properties': {'key': 'properties.customProperties', 'type': '{str}'}, - 'certificates': {'key': 'properties.certificates', 'type': '[CertificateConfiguration]'}, - 'enable_client_certificate': {'key': 'properties.enableClientCertificate', 'type': 'bool'}, - 'virtual_network_type': {'key': 'properties.virtualNetworkType', 'type': 'str'}, - 'publisher_email': {'key': 'properties.publisherEmail', 'type': 'str'}, - 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'ApiManagementServiceSkuProperties'}, - 'identity': {'key': 'identity', 'type': 'ApiManagementServiceIdentity'}, - 'etag': {'key': 'etag', 'type': 'str'}, - } - - def __init__(self, *, tags=None, notification_sender_email: str=None, hostname_configurations=None, virtual_network_configuration=None, additional_locations=None, custom_properties=None, certificates=None, enable_client_certificate: bool=False, virtual_network_type="None", publisher_email: str=None, publisher_name: str=None, sku=None, identity=None, **kwargs) -> None: - super(ApiManagementServiceUpdateParameters, self).__init__(tags=tags, **kwargs) - self.notification_sender_email = notification_sender_email - self.provisioning_state = None - self.target_provisioning_state = None - self.created_at_utc = None - self.gateway_url = None - self.gateway_regional_url = None - self.portal_url = None - self.management_api_url = None - self.scm_url = None - self.hostname_configurations = hostname_configurations - self.public_ip_addresses = None - self.private_ip_addresses = None - self.virtual_network_configuration = virtual_network_configuration - self.additional_locations = additional_locations - self.custom_properties = custom_properties - self.certificates = certificates - self.enable_client_certificate = enable_client_certificate - self.virtual_network_type = virtual_network_type - self.publisher_email = publisher_email - self.publisher_name = publisher_name - self.sku = sku - self.identity = identity - self.etag = None diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_release_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_release_contract.py deleted file mode 100644 index 4e04b6c68964..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_release_contract.py +++ /dev/null @@ -1,62 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ApiReleaseContract(Resource): - """ApiRelease details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param api_id: Identifier of the API the release belongs to. - :type api_id: str - :ivar created_date_time: The time the API was released. The date conforms - to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 - standard. - :vartype created_date_time: datetime - :ivar updated_date_time: The time the API release was updated. - :vartype updated_date_time: datetime - :param notes: Release Notes - :type notes: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date_time': {'readonly': True}, - 'updated_date_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'api_id': {'key': 'properties.apiId', 'type': 'str'}, - 'created_date_time': {'key': 'properties.createdDateTime', 'type': 'iso-8601'}, - 'updated_date_time': {'key': 'properties.updatedDateTime', 'type': 'iso-8601'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiReleaseContract, self).__init__(**kwargs) - self.api_id = kwargs.get('api_id', None) - self.created_date_time = None - self.updated_date_time = None - self.notes = kwargs.get('notes', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_release_contract_paged.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_release_contract_paged.py deleted file mode 100644 index f95ad2334f66..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_release_contract_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ApiReleaseContractPaged(Paged): - """ - A paging container for iterating over a list of :class:`ApiReleaseContract ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ApiReleaseContract]'} - } - - def __init__(self, *args, **kwargs): - - super(ApiReleaseContractPaged, self).__init__(*args, **kwargs) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_release_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_release_contract_py3.py deleted file mode 100644 index 8792997dfc41..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_release_contract_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ApiReleaseContract(Resource): - """ApiRelease details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param api_id: Identifier of the API the release belongs to. - :type api_id: str - :ivar created_date_time: The time the API was released. The date conforms - to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 - standard. - :vartype created_date_time: datetime - :ivar updated_date_time: The time the API release was updated. - :vartype updated_date_time: datetime - :param notes: Release Notes - :type notes: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_date_time': {'readonly': True}, - 'updated_date_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'api_id': {'key': 'properties.apiId', 'type': 'str'}, - 'created_date_time': {'key': 'properties.createdDateTime', 'type': 'iso-8601'}, - 'updated_date_time': {'key': 'properties.updatedDateTime', 'type': 'iso-8601'}, - 'notes': {'key': 'properties.notes', 'type': 'str'}, - } - - def __init__(self, *, api_id: str=None, notes: str=None, **kwargs) -> None: - super(ApiReleaseContract, self).__init__(**kwargs) - self.api_id = api_id - self.created_date_time = None - self.updated_date_time = None - self.notes = notes diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_revision_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_revision_contract.py deleted file mode 100644 index 8ee1788c315a..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_revision_contract.py +++ /dev/null @@ -1,74 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiRevisionContract(Model): - """Summary of revision metadata. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar api_id: Identifier of the API Revision. - :vartype api_id: str - :ivar api_revision: Revision number of API. - :vartype api_revision: str - :ivar created_date_time: The time the API Revision was created. The date - conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the - ISO 8601 standard. - :vartype created_date_time: datetime - :ivar updated_date_time: The time the API Revision were updated. The date - conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the - ISO 8601 standard. - :vartype updated_date_time: datetime - :ivar description: Description of the API Revision. - :vartype description: str - :ivar private_url: Gateway URL for accessing the non-current API Revision. - :vartype private_url: str - :ivar is_online: Indicates if API revision is the current api revision. - :vartype is_online: bool - :ivar is_current: Indicates if API revision is accessible via the gateway. - :vartype is_current: bool - """ - - _validation = { - 'api_id': {'readonly': True}, - 'api_revision': {'readonly': True, 'max_length': 100, 'min_length': 1}, - 'created_date_time': {'readonly': True}, - 'updated_date_time': {'readonly': True}, - 'description': {'readonly': True, 'max_length': 256}, - 'private_url': {'readonly': True}, - 'is_online': {'readonly': True}, - 'is_current': {'readonly': True}, - } - - _attribute_map = { - 'api_id': {'key': 'apiId', 'type': 'str'}, - 'api_revision': {'key': 'apiRevision', 'type': 'str'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'updated_date_time': {'key': 'updatedDateTime', 'type': 'iso-8601'}, - 'description': {'key': 'description', 'type': 'str'}, - 'private_url': {'key': 'privateUrl', 'type': 'str'}, - 'is_online': {'key': 'isOnline', 'type': 'bool'}, - 'is_current': {'key': 'isCurrent', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ApiRevisionContract, self).__init__(**kwargs) - self.api_id = None - self.api_revision = None - self.created_date_time = None - self.updated_date_time = None - self.description = None - self.private_url = None - self.is_online = None - self.is_current = None diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_revision_contract_paged.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_revision_contract_paged.py deleted file mode 100644 index 1cc0fe483079..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_revision_contract_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ApiRevisionContractPaged(Paged): - """ - A paging container for iterating over a list of :class:`ApiRevisionContract ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ApiRevisionContract]'} - } - - def __init__(self, *args, **kwargs): - - super(ApiRevisionContractPaged, self).__init__(*args, **kwargs) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_revision_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_revision_contract_py3.py deleted file mode 100644 index a3b4f9892094..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_revision_contract_py3.py +++ /dev/null @@ -1,74 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiRevisionContract(Model): - """Summary of revision metadata. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar api_id: Identifier of the API Revision. - :vartype api_id: str - :ivar api_revision: Revision number of API. - :vartype api_revision: str - :ivar created_date_time: The time the API Revision was created. The date - conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the - ISO 8601 standard. - :vartype created_date_time: datetime - :ivar updated_date_time: The time the API Revision were updated. The date - conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the - ISO 8601 standard. - :vartype updated_date_time: datetime - :ivar description: Description of the API Revision. - :vartype description: str - :ivar private_url: Gateway URL for accessing the non-current API Revision. - :vartype private_url: str - :ivar is_online: Indicates if API revision is the current api revision. - :vartype is_online: bool - :ivar is_current: Indicates if API revision is accessible via the gateway. - :vartype is_current: bool - """ - - _validation = { - 'api_id': {'readonly': True}, - 'api_revision': {'readonly': True, 'max_length': 100, 'min_length': 1}, - 'created_date_time': {'readonly': True}, - 'updated_date_time': {'readonly': True}, - 'description': {'readonly': True, 'max_length': 256}, - 'private_url': {'readonly': True}, - 'is_online': {'readonly': True}, - 'is_current': {'readonly': True}, - } - - _attribute_map = { - 'api_id': {'key': 'apiId', 'type': 'str'}, - 'api_revision': {'key': 'apiRevision', 'type': 'str'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'updated_date_time': {'key': 'updatedDateTime', 'type': 'iso-8601'}, - 'description': {'key': 'description', 'type': 'str'}, - 'private_url': {'key': 'privateUrl', 'type': 'str'}, - 'is_online': {'key': 'isOnline', 'type': 'bool'}, - 'is_current': {'key': 'isCurrent', 'type': 'bool'}, - } - - def __init__(self, **kwargs) -> None: - super(ApiRevisionContract, self).__init__(**kwargs) - self.api_id = None - self.api_revision = None - self.created_date_time = None - self.updated_date_time = None - self.description = None - self.private_url = None - self.is_online = None - self.is_current = None diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_revision_info_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_revision_info_contract.py deleted file mode 100644 index f134492b1db3..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_revision_info_contract.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiRevisionInfoContract(Model): - """Object used to create an API Revision or Version based on an existing API - Revision. - - :param source_api_id: Resource identifier of API to be used to create the - revision from. - :type source_api_id: str - :param api_version_name: Version identifier for the new API Version. - :type api_version_name: str - :param api_revision_description: Description of new API Revision. - :type api_revision_description: str - :param api_version_set: Version set details - :type api_version_set: - ~azure.mgmt.apimanagement.models.ApiVersionSetContractDetails - """ - - _validation = { - 'api_version_name': {'max_length': 100}, - 'api_revision_description': {'max_length': 256}, - } - - _attribute_map = { - 'source_api_id': {'key': 'sourceApiId', 'type': 'str'}, - 'api_version_name': {'key': 'apiVersionName', 'type': 'str'}, - 'api_revision_description': {'key': 'apiRevisionDescription', 'type': 'str'}, - 'api_version_set': {'key': 'apiVersionSet', 'type': 'ApiVersionSetContractDetails'}, - } - - def __init__(self, **kwargs): - super(ApiRevisionInfoContract, self).__init__(**kwargs) - self.source_api_id = kwargs.get('source_api_id', None) - self.api_version_name = kwargs.get('api_version_name', None) - self.api_revision_description = kwargs.get('api_revision_description', None) - self.api_version_set = kwargs.get('api_version_set', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_revision_info_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_revision_info_contract_py3.py deleted file mode 100644 index 7f2ccaed2b0e..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_revision_info_contract_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiRevisionInfoContract(Model): - """Object used to create an API Revision or Version based on an existing API - Revision. - - :param source_api_id: Resource identifier of API to be used to create the - revision from. - :type source_api_id: str - :param api_version_name: Version identifier for the new API Version. - :type api_version_name: str - :param api_revision_description: Description of new API Revision. - :type api_revision_description: str - :param api_version_set: Version set details - :type api_version_set: - ~azure.mgmt.apimanagement.models.ApiVersionSetContractDetails - """ - - _validation = { - 'api_version_name': {'max_length': 100}, - 'api_revision_description': {'max_length': 256}, - } - - _attribute_map = { - 'source_api_id': {'key': 'sourceApiId', 'type': 'str'}, - 'api_version_name': {'key': 'apiVersionName', 'type': 'str'}, - 'api_revision_description': {'key': 'apiRevisionDescription', 'type': 'str'}, - 'api_version_set': {'key': 'apiVersionSet', 'type': 'ApiVersionSetContractDetails'}, - } - - def __init__(self, *, source_api_id: str=None, api_version_name: str=None, api_revision_description: str=None, api_version_set=None, **kwargs) -> None: - super(ApiRevisionInfoContract, self).__init__(**kwargs) - self.source_api_id = source_api_id - self.api_version_name = api_version_name - self.api_revision_description = api_revision_description - self.api_version_set = api_version_set diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_tag_resource_contract_properties.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_tag_resource_contract_properties.py deleted file mode 100644 index ea0e43b2d27b..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_tag_resource_contract_properties.py +++ /dev/null @@ -1,108 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .api_entity_base_contract import ApiEntityBaseContract - - -class ApiTagResourceContractProperties(ApiEntityBaseContract): - """API contract properties for the Tag Resources. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param description: Description of the API. May include HTML formatting - tags. - :type description: str - :param authentication_settings: Collection of authentication settings - included into this API. - :type authentication_settings: - ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract - :param subscription_key_parameter_names: Protocols over which API is made - available. - :type subscription_key_parameter_names: - ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :param api_type: Type of API. Possible values include: 'http', 'soap' - :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :param api_revision: Describes the Revision of the Api. If no value is - provided, default revision 1 is created - :type api_revision: str - :param api_version: Indicates the Version identifier of the API if the API - is versioned - :type api_version: str - :param is_current: Indicates if API revision is current api revision. - :type is_current: bool - :ivar is_online: Indicates if API revision is accessible via the gateway. - :vartype is_online: bool - :param api_revision_description: Description of the Api Revision. - :type api_revision_description: str - :param api_version_description: Description of the Api Version. - :type api_version_description: str - :param api_version_set_id: A resource identifier for the related - ApiVersionSet. - :type api_version_set_id: str - :param subscription_required: Specifies whether an API or Product - subscription is required for accessing the API. - :type subscription_required: bool - :param id: API identifier in the form /apis/{apiId}. - :type id: str - :param name: API name. - :type name: str - :param service_url: Absolute URL of the backend service implementing this - API. - :type service_url: str - :param path: Relative URL uniquely identifying this API and all of its - resource paths within the API Management service instance. It is appended - to the API endpoint base URL specified during the service instance - creation to form a public URL for this API. - :type path: str - :param protocols: Describes on which protocols the operations in this API - can be invoked. - :type protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] - """ - - _validation = { - 'api_revision': {'max_length': 100, 'min_length': 1}, - 'api_version': {'max_length': 100}, - 'is_online': {'readonly': True}, - 'api_revision_description': {'max_length': 256}, - 'api_version_description': {'max_length': 256}, - 'name': {'max_length': 300, 'min_length': 1}, - 'service_url': {'max_length': 2000, 'min_length': 1}, - 'path': {'max_length': 400, 'min_length': 0}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'authentication_settings': {'key': 'authenticationSettings', 'type': 'AuthenticationSettingsContract'}, - 'subscription_key_parameter_names': {'key': 'subscriptionKeyParameterNames', 'type': 'SubscriptionKeyParameterNamesContract'}, - 'api_type': {'key': 'type', 'type': 'str'}, - 'api_revision': {'key': 'apiRevision', 'type': 'str'}, - 'api_version': {'key': 'apiVersion', 'type': 'str'}, - 'is_current': {'key': 'isCurrent', 'type': 'bool'}, - 'is_online': {'key': 'isOnline', 'type': 'bool'}, - 'api_revision_description': {'key': 'apiRevisionDescription', 'type': 'str'}, - 'api_version_description': {'key': 'apiVersionDescription', 'type': 'str'}, - 'api_version_set_id': {'key': 'apiVersionSetId', 'type': 'str'}, - 'subscription_required': {'key': 'subscriptionRequired', 'type': 'bool'}, - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'service_url': {'key': 'serviceUrl', 'type': 'str'}, - 'path': {'key': 'path', 'type': 'str'}, - 'protocols': {'key': 'protocols', 'type': '[Protocol]'}, - } - - def __init__(self, **kwargs): - super(ApiTagResourceContractProperties, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) - self.service_url = kwargs.get('service_url', None) - self.path = kwargs.get('path', None) - self.protocols = kwargs.get('protocols', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_tag_resource_contract_properties_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_tag_resource_contract_properties_py3.py deleted file mode 100644 index 67cc11942a42..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_tag_resource_contract_properties_py3.py +++ /dev/null @@ -1,108 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .api_entity_base_contract_py3 import ApiEntityBaseContract - - -class ApiTagResourceContractProperties(ApiEntityBaseContract): - """API contract properties for the Tag Resources. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param description: Description of the API. May include HTML formatting - tags. - :type description: str - :param authentication_settings: Collection of authentication settings - included into this API. - :type authentication_settings: - ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract - :param subscription_key_parameter_names: Protocols over which API is made - available. - :type subscription_key_parameter_names: - ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :param api_type: Type of API. Possible values include: 'http', 'soap' - :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :param api_revision: Describes the Revision of the Api. If no value is - provided, default revision 1 is created - :type api_revision: str - :param api_version: Indicates the Version identifier of the API if the API - is versioned - :type api_version: str - :param is_current: Indicates if API revision is current api revision. - :type is_current: bool - :ivar is_online: Indicates if API revision is accessible via the gateway. - :vartype is_online: bool - :param api_revision_description: Description of the Api Revision. - :type api_revision_description: str - :param api_version_description: Description of the Api Version. - :type api_version_description: str - :param api_version_set_id: A resource identifier for the related - ApiVersionSet. - :type api_version_set_id: str - :param subscription_required: Specifies whether an API or Product - subscription is required for accessing the API. - :type subscription_required: bool - :param id: API identifier in the form /apis/{apiId}. - :type id: str - :param name: API name. - :type name: str - :param service_url: Absolute URL of the backend service implementing this - API. - :type service_url: str - :param path: Relative URL uniquely identifying this API and all of its - resource paths within the API Management service instance. It is appended - to the API endpoint base URL specified during the service instance - creation to form a public URL for this API. - :type path: str - :param protocols: Describes on which protocols the operations in this API - can be invoked. - :type protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] - """ - - _validation = { - 'api_revision': {'max_length': 100, 'min_length': 1}, - 'api_version': {'max_length': 100}, - 'is_online': {'readonly': True}, - 'api_revision_description': {'max_length': 256}, - 'api_version_description': {'max_length': 256}, - 'name': {'max_length': 300, 'min_length': 1}, - 'service_url': {'max_length': 2000, 'min_length': 1}, - 'path': {'max_length': 400, 'min_length': 0}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'authentication_settings': {'key': 'authenticationSettings', 'type': 'AuthenticationSettingsContract'}, - 'subscription_key_parameter_names': {'key': 'subscriptionKeyParameterNames', 'type': 'SubscriptionKeyParameterNamesContract'}, - 'api_type': {'key': 'type', 'type': 'str'}, - 'api_revision': {'key': 'apiRevision', 'type': 'str'}, - 'api_version': {'key': 'apiVersion', 'type': 'str'}, - 'is_current': {'key': 'isCurrent', 'type': 'bool'}, - 'is_online': {'key': 'isOnline', 'type': 'bool'}, - 'api_revision_description': {'key': 'apiRevisionDescription', 'type': 'str'}, - 'api_version_description': {'key': 'apiVersionDescription', 'type': 'str'}, - 'api_version_set_id': {'key': 'apiVersionSetId', 'type': 'str'}, - 'subscription_required': {'key': 'subscriptionRequired', 'type': 'bool'}, - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'service_url': {'key': 'serviceUrl', 'type': 'str'}, - 'path': {'key': 'path', 'type': 'str'}, - 'protocols': {'key': 'protocols', 'type': '[Protocol]'}, - } - - def __init__(self, *, description: str=None, authentication_settings=None, subscription_key_parameter_names=None, api_type=None, api_revision: str=None, api_version: str=None, is_current: bool=None, api_revision_description: str=None, api_version_description: str=None, api_version_set_id: str=None, subscription_required: bool=None, id: str=None, name: str=None, service_url: str=None, path: str=None, protocols=None, **kwargs) -> None: - super(ApiTagResourceContractProperties, self).__init__(description=description, authentication_settings=authentication_settings, subscription_key_parameter_names=subscription_key_parameter_names, api_type=api_type, api_revision=api_revision, api_version=api_version, is_current=is_current, api_revision_description=api_revision_description, api_version_description=api_version_description, api_version_set_id=api_version_set_id, subscription_required=subscription_required, **kwargs) - self.id = id - self.name = name - self.service_url = service_url - self.path = path - self.protocols = protocols diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_update_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_update_contract.py deleted file mode 100644 index 16538edb5451..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_update_contract.py +++ /dev/null @@ -1,116 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiUpdateContract(Model): - """API update contract details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param description: Description of the API. May include HTML formatting - tags. - :type description: str - :param authentication_settings: Collection of authentication settings - included into this API. - :type authentication_settings: - ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract - :param subscription_key_parameter_names: Protocols over which API is made - available. - :type subscription_key_parameter_names: - ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :param api_type: Type of API. Possible values include: 'http', 'soap' - :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :param api_revision: Describes the Revision of the Api. If no value is - provided, default revision 1 is created - :type api_revision: str - :param api_version: Indicates the Version identifier of the API if the API - is versioned - :type api_version: str - :param is_current: Indicates if API revision is current api revision. - :type is_current: bool - :ivar is_online: Indicates if API revision is accessible via the gateway. - :vartype is_online: bool - :param api_revision_description: Description of the Api Revision. - :type api_revision_description: str - :param api_version_description: Description of the Api Version. - :type api_version_description: str - :param api_version_set_id: A resource identifier for the related - ApiVersionSet. - :type api_version_set_id: str - :param subscription_required: Specifies whether an API or Product - subscription is required for accessing the API. - :type subscription_required: bool - :param display_name: API name. - :type display_name: str - :param service_url: Absolute URL of the backend service implementing this - API. - :type service_url: str - :param path: Relative URL uniquely identifying this API and all of its - resource paths within the API Management service instance. It is appended - to the API endpoint base URL specified during the service instance - creation to form a public URL for this API. - :type path: str - :param protocols: Describes on which protocols the operations in this API - can be invoked. - :type protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] - """ - - _validation = { - 'api_revision': {'max_length': 100, 'min_length': 1}, - 'api_version': {'max_length': 100}, - 'is_online': {'readonly': True}, - 'api_revision_description': {'max_length': 256}, - 'api_version_description': {'max_length': 256}, - 'display_name': {'max_length': 300, 'min_length': 1}, - 'service_url': {'max_length': 2000, 'min_length': 1}, - 'path': {'max_length': 400, 'min_length': 0}, - } - - _attribute_map = { - 'description': {'key': 'properties.description', 'type': 'str'}, - 'authentication_settings': {'key': 'properties.authenticationSettings', 'type': 'AuthenticationSettingsContract'}, - 'subscription_key_parameter_names': {'key': 'properties.subscriptionKeyParameterNames', 'type': 'SubscriptionKeyParameterNamesContract'}, - 'api_type': {'key': 'properties.type', 'type': 'str'}, - 'api_revision': {'key': 'properties.apiRevision', 'type': 'str'}, - 'api_version': {'key': 'properties.apiVersion', 'type': 'str'}, - 'is_current': {'key': 'properties.isCurrent', 'type': 'bool'}, - 'is_online': {'key': 'properties.isOnline', 'type': 'bool'}, - 'api_revision_description': {'key': 'properties.apiRevisionDescription', 'type': 'str'}, - 'api_version_description': {'key': 'properties.apiVersionDescription', 'type': 'str'}, - 'api_version_set_id': {'key': 'properties.apiVersionSetId', 'type': 'str'}, - 'subscription_required': {'key': 'properties.subscriptionRequired', 'type': 'bool'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'service_url': {'key': 'properties.serviceUrl', 'type': 'str'}, - 'path': {'key': 'properties.path', 'type': 'str'}, - 'protocols': {'key': 'properties.protocols', 'type': '[Protocol]'}, - } - - def __init__(self, **kwargs): - super(ApiUpdateContract, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.authentication_settings = kwargs.get('authentication_settings', None) - self.subscription_key_parameter_names = kwargs.get('subscription_key_parameter_names', None) - self.api_type = kwargs.get('api_type', None) - self.api_revision = kwargs.get('api_revision', None) - self.api_version = kwargs.get('api_version', None) - self.is_current = kwargs.get('is_current', None) - self.is_online = None - self.api_revision_description = kwargs.get('api_revision_description', None) - self.api_version_description = kwargs.get('api_version_description', None) - self.api_version_set_id = kwargs.get('api_version_set_id', None) - self.subscription_required = kwargs.get('subscription_required', None) - self.display_name = kwargs.get('display_name', None) - self.service_url = kwargs.get('service_url', None) - self.path = kwargs.get('path', None) - self.protocols = kwargs.get('protocols', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_update_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_update_contract_py3.py deleted file mode 100644 index c9c8736900a7..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_update_contract_py3.py +++ /dev/null @@ -1,116 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiUpdateContract(Model): - """API update contract details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param description: Description of the API. May include HTML formatting - tags. - :type description: str - :param authentication_settings: Collection of authentication settings - included into this API. - :type authentication_settings: - ~azure.mgmt.apimanagement.models.AuthenticationSettingsContract - :param subscription_key_parameter_names: Protocols over which API is made - available. - :type subscription_key_parameter_names: - ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :param api_type: Type of API. Possible values include: 'http', 'soap' - :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :param api_revision: Describes the Revision of the Api. If no value is - provided, default revision 1 is created - :type api_revision: str - :param api_version: Indicates the Version identifier of the API if the API - is versioned - :type api_version: str - :param is_current: Indicates if API revision is current api revision. - :type is_current: bool - :ivar is_online: Indicates if API revision is accessible via the gateway. - :vartype is_online: bool - :param api_revision_description: Description of the Api Revision. - :type api_revision_description: str - :param api_version_description: Description of the Api Version. - :type api_version_description: str - :param api_version_set_id: A resource identifier for the related - ApiVersionSet. - :type api_version_set_id: str - :param subscription_required: Specifies whether an API or Product - subscription is required for accessing the API. - :type subscription_required: bool - :param display_name: API name. - :type display_name: str - :param service_url: Absolute URL of the backend service implementing this - API. - :type service_url: str - :param path: Relative URL uniquely identifying this API and all of its - resource paths within the API Management service instance. It is appended - to the API endpoint base URL specified during the service instance - creation to form a public URL for this API. - :type path: str - :param protocols: Describes on which protocols the operations in this API - can be invoked. - :type protocols: list[str or ~azure.mgmt.apimanagement.models.Protocol] - """ - - _validation = { - 'api_revision': {'max_length': 100, 'min_length': 1}, - 'api_version': {'max_length': 100}, - 'is_online': {'readonly': True}, - 'api_revision_description': {'max_length': 256}, - 'api_version_description': {'max_length': 256}, - 'display_name': {'max_length': 300, 'min_length': 1}, - 'service_url': {'max_length': 2000, 'min_length': 1}, - 'path': {'max_length': 400, 'min_length': 0}, - } - - _attribute_map = { - 'description': {'key': 'properties.description', 'type': 'str'}, - 'authentication_settings': {'key': 'properties.authenticationSettings', 'type': 'AuthenticationSettingsContract'}, - 'subscription_key_parameter_names': {'key': 'properties.subscriptionKeyParameterNames', 'type': 'SubscriptionKeyParameterNamesContract'}, - 'api_type': {'key': 'properties.type', 'type': 'str'}, - 'api_revision': {'key': 'properties.apiRevision', 'type': 'str'}, - 'api_version': {'key': 'properties.apiVersion', 'type': 'str'}, - 'is_current': {'key': 'properties.isCurrent', 'type': 'bool'}, - 'is_online': {'key': 'properties.isOnline', 'type': 'bool'}, - 'api_revision_description': {'key': 'properties.apiRevisionDescription', 'type': 'str'}, - 'api_version_description': {'key': 'properties.apiVersionDescription', 'type': 'str'}, - 'api_version_set_id': {'key': 'properties.apiVersionSetId', 'type': 'str'}, - 'subscription_required': {'key': 'properties.subscriptionRequired', 'type': 'bool'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'service_url': {'key': 'properties.serviceUrl', 'type': 'str'}, - 'path': {'key': 'properties.path', 'type': 'str'}, - 'protocols': {'key': 'properties.protocols', 'type': '[Protocol]'}, - } - - def __init__(self, *, description: str=None, authentication_settings=None, subscription_key_parameter_names=None, api_type=None, api_revision: str=None, api_version: str=None, is_current: bool=None, api_revision_description: str=None, api_version_description: str=None, api_version_set_id: str=None, subscription_required: bool=None, display_name: str=None, service_url: str=None, path: str=None, protocols=None, **kwargs) -> None: - super(ApiUpdateContract, self).__init__(**kwargs) - self.description = description - self.authentication_settings = authentication_settings - self.subscription_key_parameter_names = subscription_key_parameter_names - self.api_type = api_type - self.api_revision = api_revision - self.api_version = api_version - self.is_current = is_current - self.is_online = None - self.api_revision_description = api_revision_description - self.api_version_description = api_version_description - self.api_version_set_id = api_version_set_id - self.subscription_required = subscription_required - self.display_name = display_name - self.service_url = service_url - self.path = path - self.protocols = protocols diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_version_set_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_version_set_contract.py deleted file mode 100644 index 841221ab5ca4..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_version_set_contract.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ApiVersionSetContract(Resource): - """Api Version Set Contract details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param description: Description of API Version Set. - :type description: str - :param version_query_name: Name of query parameter that indicates the API - Version if versioningScheme is set to `query`. - :type version_query_name: str - :param version_header_name: Name of HTTP header parameter that indicates - the API Version if versioningScheme is set to `header`. - :type version_header_name: str - :param display_name: Required. Name of API Version Set - :type display_name: str - :param versioning_scheme: Required. An value that determines where the API - Version identifer will be located in a HTTP request. Possible values - include: 'Segment', 'Query', 'Header' - :type versioning_scheme: str or - ~azure.mgmt.apimanagement.models.VersioningScheme - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'version_query_name': {'max_length': 100, 'min_length': 1}, - 'version_header_name': {'max_length': 100, 'min_length': 1}, - 'display_name': {'required': True, 'max_length': 100, 'min_length': 1}, - 'versioning_scheme': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'version_query_name': {'key': 'properties.versionQueryName', 'type': 'str'}, - 'version_header_name': {'key': 'properties.versionHeaderName', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'versioning_scheme': {'key': 'properties.versioningScheme', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiVersionSetContract, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.version_query_name = kwargs.get('version_query_name', None) - self.version_header_name = kwargs.get('version_header_name', None) - self.display_name = kwargs.get('display_name', None) - self.versioning_scheme = kwargs.get('versioning_scheme', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_version_set_contract_details.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_version_set_contract_details.py deleted file mode 100644 index ca3eb9e811e4..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_version_set_contract_details.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiVersionSetContractDetails(Model): - """An API Version Set contains the common configuration for a set of API - Versions relating . - - :param id: Identifier for existing API Version Set. Omit this value to - create a new Version Set. - :type id: str - :param name: The display Name of the API Version Set. - :type name: str - :param description: Description of API Version Set. - :type description: str - :param versioning_scheme: An value that determines where the API Version - identifer will be located in a HTTP request. Possible values include: - 'Segment', 'Query', 'Header' - :type versioning_scheme: str or ~azure.mgmt.apimanagement.models.enum - :param version_query_name: Name of query parameter that indicates the API - Version if versioningScheme is set to `query`. - :type version_query_name: str - :param version_header_name: Name of HTTP header parameter that indicates - the API Version if versioningScheme is set to `header`. - :type version_header_name: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'versioning_scheme': {'key': 'versioningScheme', 'type': 'str'}, - 'version_query_name': {'key': 'versionQueryName', 'type': 'str'}, - 'version_header_name': {'key': 'versionHeaderName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiVersionSetContractDetails, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) - self.description = kwargs.get('description', None) - self.versioning_scheme = kwargs.get('versioning_scheme', None) - self.version_query_name = kwargs.get('version_query_name', None) - self.version_header_name = kwargs.get('version_header_name', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_version_set_contract_details_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_version_set_contract_details_py3.py deleted file mode 100644 index 9a340f5d4be8..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_version_set_contract_details_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiVersionSetContractDetails(Model): - """An API Version Set contains the common configuration for a set of API - Versions relating . - - :param id: Identifier for existing API Version Set. Omit this value to - create a new Version Set. - :type id: str - :param name: The display Name of the API Version Set. - :type name: str - :param description: Description of API Version Set. - :type description: str - :param versioning_scheme: An value that determines where the API Version - identifer will be located in a HTTP request. Possible values include: - 'Segment', 'Query', 'Header' - :type versioning_scheme: str or ~azure.mgmt.apimanagement.models.enum - :param version_query_name: Name of query parameter that indicates the API - Version if versioningScheme is set to `query`. - :type version_query_name: str - :param version_header_name: Name of HTTP header parameter that indicates - the API Version if versioningScheme is set to `header`. - :type version_header_name: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'versioning_scheme': {'key': 'versioningScheme', 'type': 'str'}, - 'version_query_name': {'key': 'versionQueryName', 'type': 'str'}, - 'version_header_name': {'key': 'versionHeaderName', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, name: str=None, description: str=None, versioning_scheme=None, version_query_name: str=None, version_header_name: str=None, **kwargs) -> None: - super(ApiVersionSetContractDetails, self).__init__(**kwargs) - self.id = id - self.name = name - self.description = description - self.versioning_scheme = versioning_scheme - self.version_query_name = version_query_name - self.version_header_name = version_header_name diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_version_set_contract_paged.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_version_set_contract_paged.py deleted file mode 100644 index cfe10ae6a136..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_version_set_contract_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ApiVersionSetContractPaged(Paged): - """ - A paging container for iterating over a list of :class:`ApiVersionSetContract ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ApiVersionSetContract]'} - } - - def __init__(self, *args, **kwargs): - - super(ApiVersionSetContractPaged, self).__init__(*args, **kwargs) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_version_set_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_version_set_contract_py3.py deleted file mode 100644 index 151e5bec6bf8..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_version_set_contract_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ApiVersionSetContract(Resource): - """Api Version Set Contract details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param description: Description of API Version Set. - :type description: str - :param version_query_name: Name of query parameter that indicates the API - Version if versioningScheme is set to `query`. - :type version_query_name: str - :param version_header_name: Name of HTTP header parameter that indicates - the API Version if versioningScheme is set to `header`. - :type version_header_name: str - :param display_name: Required. Name of API Version Set - :type display_name: str - :param versioning_scheme: Required. An value that determines where the API - Version identifer will be located in a HTTP request. Possible values - include: 'Segment', 'Query', 'Header' - :type versioning_scheme: str or - ~azure.mgmt.apimanagement.models.VersioningScheme - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'version_query_name': {'max_length': 100, 'min_length': 1}, - 'version_header_name': {'max_length': 100, 'min_length': 1}, - 'display_name': {'required': True, 'max_length': 100, 'min_length': 1}, - 'versioning_scheme': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'version_query_name': {'key': 'properties.versionQueryName', 'type': 'str'}, - 'version_header_name': {'key': 'properties.versionHeaderName', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'versioning_scheme': {'key': 'properties.versioningScheme', 'type': 'str'}, - } - - def __init__(self, *, display_name: str, versioning_scheme, description: str=None, version_query_name: str=None, version_header_name: str=None, **kwargs) -> None: - super(ApiVersionSetContract, self).__init__(**kwargs) - self.description = description - self.version_query_name = version_query_name - self.version_header_name = version_header_name - self.display_name = display_name - self.versioning_scheme = versioning_scheme diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_version_set_entity_base.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_version_set_entity_base.py deleted file mode 100644 index c939168cc5e8..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_version_set_entity_base.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiVersionSetEntityBase(Model): - """Api Version set base parameters. - - :param description: Description of API Version Set. - :type description: str - :param version_query_name: Name of query parameter that indicates the API - Version if versioningScheme is set to `query`. - :type version_query_name: str - :param version_header_name: Name of HTTP header parameter that indicates - the API Version if versioningScheme is set to `header`. - :type version_header_name: str - """ - - _validation = { - 'version_query_name': {'max_length': 100, 'min_length': 1}, - 'version_header_name': {'max_length': 100, 'min_length': 1}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'version_query_name': {'key': 'versionQueryName', 'type': 'str'}, - 'version_header_name': {'key': 'versionHeaderName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiVersionSetEntityBase, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.version_query_name = kwargs.get('version_query_name', None) - self.version_header_name = kwargs.get('version_header_name', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_version_set_entity_base_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_version_set_entity_base_py3.py deleted file mode 100644 index 83ff82631423..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_version_set_entity_base_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiVersionSetEntityBase(Model): - """Api Version set base parameters. - - :param description: Description of API Version Set. - :type description: str - :param version_query_name: Name of query parameter that indicates the API - Version if versioningScheme is set to `query`. - :type version_query_name: str - :param version_header_name: Name of HTTP header parameter that indicates - the API Version if versioningScheme is set to `header`. - :type version_header_name: str - """ - - _validation = { - 'version_query_name': {'max_length': 100, 'min_length': 1}, - 'version_header_name': {'max_length': 100, 'min_length': 1}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'version_query_name': {'key': 'versionQueryName', 'type': 'str'}, - 'version_header_name': {'key': 'versionHeaderName', 'type': 'str'}, - } - - def __init__(self, *, description: str=None, version_query_name: str=None, version_header_name: str=None, **kwargs) -> None: - super(ApiVersionSetEntityBase, self).__init__(**kwargs) - self.description = description - self.version_query_name = version_query_name - self.version_header_name = version_header_name diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_version_set_update_parameters.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_version_set_update_parameters.py deleted file mode 100644 index 0132a009a6e9..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_version_set_update_parameters.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiVersionSetUpdateParameters(Model): - """Parameters to update or create an Api Version Set Contract. - - :param description: Description of API Version Set. - :type description: str - :param version_query_name: Name of query parameter that indicates the API - Version if versioningScheme is set to `query`. - :type version_query_name: str - :param version_header_name: Name of HTTP header parameter that indicates - the API Version if versioningScheme is set to `header`. - :type version_header_name: str - :param display_name: Name of API Version Set - :type display_name: str - :param versioning_scheme: An value that determines where the API Version - identifer will be located in a HTTP request. Possible values include: - 'Segment', 'Query', 'Header' - :type versioning_scheme: str or - ~azure.mgmt.apimanagement.models.VersioningScheme - """ - - _validation = { - 'version_query_name': {'max_length': 100, 'min_length': 1}, - 'version_header_name': {'max_length': 100, 'min_length': 1}, - 'display_name': {'max_length': 100, 'min_length': 1}, - } - - _attribute_map = { - 'description': {'key': 'properties.description', 'type': 'str'}, - 'version_query_name': {'key': 'properties.versionQueryName', 'type': 'str'}, - 'version_header_name': {'key': 'properties.versionHeaderName', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'versioning_scheme': {'key': 'properties.versioningScheme', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApiVersionSetUpdateParameters, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.version_query_name = kwargs.get('version_query_name', None) - self.version_header_name = kwargs.get('version_header_name', None) - self.display_name = kwargs.get('display_name', None) - self.versioning_scheme = kwargs.get('versioning_scheme', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_version_set_update_parameters_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_version_set_update_parameters_py3.py deleted file mode 100644 index 1a8cce08c012..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/api_version_set_update_parameters_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApiVersionSetUpdateParameters(Model): - """Parameters to update or create an Api Version Set Contract. - - :param description: Description of API Version Set. - :type description: str - :param version_query_name: Name of query parameter that indicates the API - Version if versioningScheme is set to `query`. - :type version_query_name: str - :param version_header_name: Name of HTTP header parameter that indicates - the API Version if versioningScheme is set to `header`. - :type version_header_name: str - :param display_name: Name of API Version Set - :type display_name: str - :param versioning_scheme: An value that determines where the API Version - identifer will be located in a HTTP request. Possible values include: - 'Segment', 'Query', 'Header' - :type versioning_scheme: str or - ~azure.mgmt.apimanagement.models.VersioningScheme - """ - - _validation = { - 'version_query_name': {'max_length': 100, 'min_length': 1}, - 'version_header_name': {'max_length': 100, 'min_length': 1}, - 'display_name': {'max_length': 100, 'min_length': 1}, - } - - _attribute_map = { - 'description': {'key': 'properties.description', 'type': 'str'}, - 'version_query_name': {'key': 'properties.versionQueryName', 'type': 'str'}, - 'version_header_name': {'key': 'properties.versionHeaderName', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'versioning_scheme': {'key': 'properties.versioningScheme', 'type': 'str'}, - } - - def __init__(self, *, description: str=None, version_query_name: str=None, version_header_name: str=None, display_name: str=None, versioning_scheme=None, **kwargs) -> None: - super(ApiVersionSetUpdateParameters, self).__init__(**kwargs) - self.description = description - self.version_query_name = version_query_name - self.version_header_name = version_header_name - self.display_name = display_name - self.versioning_scheme = versioning_scheme diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/apim_resource.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/apim_resource.py deleted file mode 100644 index 5812e245eb0d..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/apim_resource.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApimResource(Model): - """The Resource definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource is set to - Microsoft.ApiManagement. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ApimResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.tags = kwargs.get('tags', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/apim_resource_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/apim_resource_py3.py deleted file mode 100644 index b63a2a6ed74c..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/apim_resource_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApimResource(Model): - """The Resource definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource is set to - Microsoft.ApiManagement. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(ApimResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.tags = tags diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/authentication_settings_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/authentication_settings_contract.py deleted file mode 100644 index b4eaf5654446..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/authentication_settings_contract.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AuthenticationSettingsContract(Model): - """API Authentication Settings. - - :param o_auth2: OAuth2 Authentication settings - :type o_auth2: - ~azure.mgmt.apimanagement.models.OAuth2AuthenticationSettingsContract - :param openid: OpenID Connect Authentication Settings - :type openid: - ~azure.mgmt.apimanagement.models.OpenIdAuthenticationSettingsContract - :param subscription_key_required: Specifies whether subscription key is - required during call to this API, true - API is included into closed - products only, false - API is included into open products alone, null - - there is a mix of products. - :type subscription_key_required: bool - """ - - _attribute_map = { - 'o_auth2': {'key': 'oAuth2', 'type': 'OAuth2AuthenticationSettingsContract'}, - 'openid': {'key': 'openid', 'type': 'OpenIdAuthenticationSettingsContract'}, - 'subscription_key_required': {'key': 'subscriptionKeyRequired', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AuthenticationSettingsContract, self).__init__(**kwargs) - self.o_auth2 = kwargs.get('o_auth2', None) - self.openid = kwargs.get('openid', None) - self.subscription_key_required = kwargs.get('subscription_key_required', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/authentication_settings_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/authentication_settings_contract_py3.py deleted file mode 100644 index 725dc936e94f..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/authentication_settings_contract_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AuthenticationSettingsContract(Model): - """API Authentication Settings. - - :param o_auth2: OAuth2 Authentication settings - :type o_auth2: - ~azure.mgmt.apimanagement.models.OAuth2AuthenticationSettingsContract - :param openid: OpenID Connect Authentication Settings - :type openid: - ~azure.mgmt.apimanagement.models.OpenIdAuthenticationSettingsContract - :param subscription_key_required: Specifies whether subscription key is - required during call to this API, true - API is included into closed - products only, false - API is included into open products alone, null - - there is a mix of products. - :type subscription_key_required: bool - """ - - _attribute_map = { - 'o_auth2': {'key': 'oAuth2', 'type': 'OAuth2AuthenticationSettingsContract'}, - 'openid': {'key': 'openid', 'type': 'OpenIdAuthenticationSettingsContract'}, - 'subscription_key_required': {'key': 'subscriptionKeyRequired', 'type': 'bool'}, - } - - def __init__(self, *, o_auth2=None, openid=None, subscription_key_required: bool=None, **kwargs) -> None: - super(AuthenticationSettingsContract, self).__init__(**kwargs) - self.o_auth2 = o_auth2 - self.openid = openid - self.subscription_key_required = subscription_key_required diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/authorization_server_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/authorization_server_contract.py deleted file mode 100644 index 9a50d1d1ee37..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/authorization_server_contract.py +++ /dev/null @@ -1,142 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class AuthorizationServerContract(Resource): - """External OAuth authorization server settings. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param description: Description of the authorization server. Can contain - HTML formatting tags. - :type description: str - :param authorization_methods: HTTP verbs supported by the authorization - endpoint. GET must be always present. POST is optional. - :type authorization_methods: list[str or - ~azure.mgmt.apimanagement.models.AuthorizationMethod] - :param client_authentication_method: Method of authentication supported by - the token endpoint of this authorization server. Possible values are Basic - and/or Body. When Body is specified, client credentials and other - parameters are passed within the request body in the - application/x-www-form-urlencoded format. - :type client_authentication_method: list[str or - ~azure.mgmt.apimanagement.models.ClientAuthenticationMethod] - :param token_body_parameters: Additional parameters required by the token - endpoint of this authorization server represented as an array of JSON - objects with name and value string properties, i.e. {"name" : "name - value", "value": "a value"}. - :type token_body_parameters: - list[~azure.mgmt.apimanagement.models.TokenBodyParameterContract] - :param token_endpoint: OAuth token endpoint. Contains absolute URI to - entity being referenced. - :type token_endpoint: str - :param support_state: If true, authorization server will include state - parameter from the authorization request to its response. Client may use - state parameter to raise protocol security. - :type support_state: bool - :param default_scope: Access token scope that is going to be requested by - default. Can be overridden at the API level. Should be provided in the - form of a string containing space-delimited values. - :type default_scope: str - :param bearer_token_sending_methods: Specifies the mechanism by which - access token is passed to the API. - :type bearer_token_sending_methods: list[str or - ~azure.mgmt.apimanagement.models.BearerTokenSendingMethod] - :param client_secret: Client or app secret registered with this - authorization server. - :type client_secret: str - :param resource_owner_username: Can be optionally specified when resource - owner password grant type is supported by this authorization server. - Default resource owner username. - :type resource_owner_username: str - :param resource_owner_password: Can be optionally specified when resource - owner password grant type is supported by this authorization server. - Default resource owner password. - :type resource_owner_password: str - :param display_name: Required. User-friendly authorization server name. - :type display_name: str - :param client_registration_endpoint: Required. Optional reference to a - page where client or app registration for this authorization server is - performed. Contains absolute URL to entity being referenced. - :type client_registration_endpoint: str - :param authorization_endpoint: Required. OAuth authorization endpoint. See - http://tools.ietf.org/html/rfc6749#section-3.2. - :type authorization_endpoint: str - :param grant_types: Required. Form of an authorization grant, which the - client uses to request the access token. - :type grant_types: list[str or ~azure.mgmt.apimanagement.models.GrantType] - :param client_id: Required. Client or app id registered with this - authorization server. - :type client_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'display_name': {'required': True, 'max_length': 50, 'min_length': 1}, - 'client_registration_endpoint': {'required': True}, - 'authorization_endpoint': {'required': True}, - 'grant_types': {'required': True}, - 'client_id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'authorization_methods': {'key': 'properties.authorizationMethods', 'type': '[AuthorizationMethod]'}, - 'client_authentication_method': {'key': 'properties.clientAuthenticationMethod', 'type': '[str]'}, - 'token_body_parameters': {'key': 'properties.tokenBodyParameters', 'type': '[TokenBodyParameterContract]'}, - 'token_endpoint': {'key': 'properties.tokenEndpoint', 'type': 'str'}, - 'support_state': {'key': 'properties.supportState', 'type': 'bool'}, - 'default_scope': {'key': 'properties.defaultScope', 'type': 'str'}, - 'bearer_token_sending_methods': {'key': 'properties.bearerTokenSendingMethods', 'type': '[str]'}, - 'client_secret': {'key': 'properties.clientSecret', 'type': 'str'}, - 'resource_owner_username': {'key': 'properties.resourceOwnerUsername', 'type': 'str'}, - 'resource_owner_password': {'key': 'properties.resourceOwnerPassword', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'client_registration_endpoint': {'key': 'properties.clientRegistrationEndpoint', 'type': 'str'}, - 'authorization_endpoint': {'key': 'properties.authorizationEndpoint', 'type': 'str'}, - 'grant_types': {'key': 'properties.grantTypes', 'type': '[str]'}, - 'client_id': {'key': 'properties.clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AuthorizationServerContract, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.authorization_methods = kwargs.get('authorization_methods', None) - self.client_authentication_method = kwargs.get('client_authentication_method', None) - self.token_body_parameters = kwargs.get('token_body_parameters', None) - self.token_endpoint = kwargs.get('token_endpoint', None) - self.support_state = kwargs.get('support_state', None) - self.default_scope = kwargs.get('default_scope', None) - self.bearer_token_sending_methods = kwargs.get('bearer_token_sending_methods', None) - self.client_secret = kwargs.get('client_secret', None) - self.resource_owner_username = kwargs.get('resource_owner_username', None) - self.resource_owner_password = kwargs.get('resource_owner_password', None) - self.display_name = kwargs.get('display_name', None) - self.client_registration_endpoint = kwargs.get('client_registration_endpoint', None) - self.authorization_endpoint = kwargs.get('authorization_endpoint', None) - self.grant_types = kwargs.get('grant_types', None) - self.client_id = kwargs.get('client_id', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/authorization_server_contract_base_properties.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/authorization_server_contract_base_properties.py deleted file mode 100644 index 4b5b27bab20c..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/authorization_server_contract_base_properties.py +++ /dev/null @@ -1,92 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AuthorizationServerContractBaseProperties(Model): - """External OAuth authorization server Update settings contract. - - :param description: Description of the authorization server. Can contain - HTML formatting tags. - :type description: str - :param authorization_methods: HTTP verbs supported by the authorization - endpoint. GET must be always present. POST is optional. - :type authorization_methods: list[str or - ~azure.mgmt.apimanagement.models.AuthorizationMethod] - :param client_authentication_method: Method of authentication supported by - the token endpoint of this authorization server. Possible values are Basic - and/or Body. When Body is specified, client credentials and other - parameters are passed within the request body in the - application/x-www-form-urlencoded format. - :type client_authentication_method: list[str or - ~azure.mgmt.apimanagement.models.ClientAuthenticationMethod] - :param token_body_parameters: Additional parameters required by the token - endpoint of this authorization server represented as an array of JSON - objects with name and value string properties, i.e. {"name" : "name - value", "value": "a value"}. - :type token_body_parameters: - list[~azure.mgmt.apimanagement.models.TokenBodyParameterContract] - :param token_endpoint: OAuth token endpoint. Contains absolute URI to - entity being referenced. - :type token_endpoint: str - :param support_state: If true, authorization server will include state - parameter from the authorization request to its response. Client may use - state parameter to raise protocol security. - :type support_state: bool - :param default_scope: Access token scope that is going to be requested by - default. Can be overridden at the API level. Should be provided in the - form of a string containing space-delimited values. - :type default_scope: str - :param bearer_token_sending_methods: Specifies the mechanism by which - access token is passed to the API. - :type bearer_token_sending_methods: list[str or - ~azure.mgmt.apimanagement.models.BearerTokenSendingMethod] - :param client_secret: Client or app secret registered with this - authorization server. - :type client_secret: str - :param resource_owner_username: Can be optionally specified when resource - owner password grant type is supported by this authorization server. - Default resource owner username. - :type resource_owner_username: str - :param resource_owner_password: Can be optionally specified when resource - owner password grant type is supported by this authorization server. - Default resource owner password. - :type resource_owner_password: str - """ - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'authorization_methods': {'key': 'authorizationMethods', 'type': '[AuthorizationMethod]'}, - 'client_authentication_method': {'key': 'clientAuthenticationMethod', 'type': '[str]'}, - 'token_body_parameters': {'key': 'tokenBodyParameters', 'type': '[TokenBodyParameterContract]'}, - 'token_endpoint': {'key': 'tokenEndpoint', 'type': 'str'}, - 'support_state': {'key': 'supportState', 'type': 'bool'}, - 'default_scope': {'key': 'defaultScope', 'type': 'str'}, - 'bearer_token_sending_methods': {'key': 'bearerTokenSendingMethods', 'type': '[str]'}, - 'client_secret': {'key': 'clientSecret', 'type': 'str'}, - 'resource_owner_username': {'key': 'resourceOwnerUsername', 'type': 'str'}, - 'resource_owner_password': {'key': 'resourceOwnerPassword', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AuthorizationServerContractBaseProperties, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.authorization_methods = kwargs.get('authorization_methods', None) - self.client_authentication_method = kwargs.get('client_authentication_method', None) - self.token_body_parameters = kwargs.get('token_body_parameters', None) - self.token_endpoint = kwargs.get('token_endpoint', None) - self.support_state = kwargs.get('support_state', None) - self.default_scope = kwargs.get('default_scope', None) - self.bearer_token_sending_methods = kwargs.get('bearer_token_sending_methods', None) - self.client_secret = kwargs.get('client_secret', None) - self.resource_owner_username = kwargs.get('resource_owner_username', None) - self.resource_owner_password = kwargs.get('resource_owner_password', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/authorization_server_contract_base_properties_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/authorization_server_contract_base_properties_py3.py deleted file mode 100644 index 3d18e7cd3695..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/authorization_server_contract_base_properties_py3.py +++ /dev/null @@ -1,92 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AuthorizationServerContractBaseProperties(Model): - """External OAuth authorization server Update settings contract. - - :param description: Description of the authorization server. Can contain - HTML formatting tags. - :type description: str - :param authorization_methods: HTTP verbs supported by the authorization - endpoint. GET must be always present. POST is optional. - :type authorization_methods: list[str or - ~azure.mgmt.apimanagement.models.AuthorizationMethod] - :param client_authentication_method: Method of authentication supported by - the token endpoint of this authorization server. Possible values are Basic - and/or Body. When Body is specified, client credentials and other - parameters are passed within the request body in the - application/x-www-form-urlencoded format. - :type client_authentication_method: list[str or - ~azure.mgmt.apimanagement.models.ClientAuthenticationMethod] - :param token_body_parameters: Additional parameters required by the token - endpoint of this authorization server represented as an array of JSON - objects with name and value string properties, i.e. {"name" : "name - value", "value": "a value"}. - :type token_body_parameters: - list[~azure.mgmt.apimanagement.models.TokenBodyParameterContract] - :param token_endpoint: OAuth token endpoint. Contains absolute URI to - entity being referenced. - :type token_endpoint: str - :param support_state: If true, authorization server will include state - parameter from the authorization request to its response. Client may use - state parameter to raise protocol security. - :type support_state: bool - :param default_scope: Access token scope that is going to be requested by - default. Can be overridden at the API level. Should be provided in the - form of a string containing space-delimited values. - :type default_scope: str - :param bearer_token_sending_methods: Specifies the mechanism by which - access token is passed to the API. - :type bearer_token_sending_methods: list[str or - ~azure.mgmt.apimanagement.models.BearerTokenSendingMethod] - :param client_secret: Client or app secret registered with this - authorization server. - :type client_secret: str - :param resource_owner_username: Can be optionally specified when resource - owner password grant type is supported by this authorization server. - Default resource owner username. - :type resource_owner_username: str - :param resource_owner_password: Can be optionally specified when resource - owner password grant type is supported by this authorization server. - Default resource owner password. - :type resource_owner_password: str - """ - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'authorization_methods': {'key': 'authorizationMethods', 'type': '[AuthorizationMethod]'}, - 'client_authentication_method': {'key': 'clientAuthenticationMethod', 'type': '[str]'}, - 'token_body_parameters': {'key': 'tokenBodyParameters', 'type': '[TokenBodyParameterContract]'}, - 'token_endpoint': {'key': 'tokenEndpoint', 'type': 'str'}, - 'support_state': {'key': 'supportState', 'type': 'bool'}, - 'default_scope': {'key': 'defaultScope', 'type': 'str'}, - 'bearer_token_sending_methods': {'key': 'bearerTokenSendingMethods', 'type': '[str]'}, - 'client_secret': {'key': 'clientSecret', 'type': 'str'}, - 'resource_owner_username': {'key': 'resourceOwnerUsername', 'type': 'str'}, - 'resource_owner_password': {'key': 'resourceOwnerPassword', 'type': 'str'}, - } - - def __init__(self, *, description: str=None, authorization_methods=None, client_authentication_method=None, token_body_parameters=None, token_endpoint: str=None, support_state: bool=None, default_scope: str=None, bearer_token_sending_methods=None, client_secret: str=None, resource_owner_username: str=None, resource_owner_password: str=None, **kwargs) -> None: - super(AuthorizationServerContractBaseProperties, self).__init__(**kwargs) - self.description = description - self.authorization_methods = authorization_methods - self.client_authentication_method = client_authentication_method - self.token_body_parameters = token_body_parameters - self.token_endpoint = token_endpoint - self.support_state = support_state - self.default_scope = default_scope - self.bearer_token_sending_methods = bearer_token_sending_methods - self.client_secret = client_secret - self.resource_owner_username = resource_owner_username - self.resource_owner_password = resource_owner_password diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/authorization_server_contract_paged.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/authorization_server_contract_paged.py deleted file mode 100644 index 471b4f0192d5..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/authorization_server_contract_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class AuthorizationServerContractPaged(Paged): - """ - A paging container for iterating over a list of :class:`AuthorizationServerContract ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AuthorizationServerContract]'} - } - - def __init__(self, *args, **kwargs): - - super(AuthorizationServerContractPaged, self).__init__(*args, **kwargs) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/authorization_server_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/authorization_server_contract_py3.py deleted file mode 100644 index a8ccc68ee9ca..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/authorization_server_contract_py3.py +++ /dev/null @@ -1,142 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class AuthorizationServerContract(Resource): - """External OAuth authorization server settings. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param description: Description of the authorization server. Can contain - HTML formatting tags. - :type description: str - :param authorization_methods: HTTP verbs supported by the authorization - endpoint. GET must be always present. POST is optional. - :type authorization_methods: list[str or - ~azure.mgmt.apimanagement.models.AuthorizationMethod] - :param client_authentication_method: Method of authentication supported by - the token endpoint of this authorization server. Possible values are Basic - and/or Body. When Body is specified, client credentials and other - parameters are passed within the request body in the - application/x-www-form-urlencoded format. - :type client_authentication_method: list[str or - ~azure.mgmt.apimanagement.models.ClientAuthenticationMethod] - :param token_body_parameters: Additional parameters required by the token - endpoint of this authorization server represented as an array of JSON - objects with name and value string properties, i.e. {"name" : "name - value", "value": "a value"}. - :type token_body_parameters: - list[~azure.mgmt.apimanagement.models.TokenBodyParameterContract] - :param token_endpoint: OAuth token endpoint. Contains absolute URI to - entity being referenced. - :type token_endpoint: str - :param support_state: If true, authorization server will include state - parameter from the authorization request to its response. Client may use - state parameter to raise protocol security. - :type support_state: bool - :param default_scope: Access token scope that is going to be requested by - default. Can be overridden at the API level. Should be provided in the - form of a string containing space-delimited values. - :type default_scope: str - :param bearer_token_sending_methods: Specifies the mechanism by which - access token is passed to the API. - :type bearer_token_sending_methods: list[str or - ~azure.mgmt.apimanagement.models.BearerTokenSendingMethod] - :param client_secret: Client or app secret registered with this - authorization server. - :type client_secret: str - :param resource_owner_username: Can be optionally specified when resource - owner password grant type is supported by this authorization server. - Default resource owner username. - :type resource_owner_username: str - :param resource_owner_password: Can be optionally specified when resource - owner password grant type is supported by this authorization server. - Default resource owner password. - :type resource_owner_password: str - :param display_name: Required. User-friendly authorization server name. - :type display_name: str - :param client_registration_endpoint: Required. Optional reference to a - page where client or app registration for this authorization server is - performed. Contains absolute URL to entity being referenced. - :type client_registration_endpoint: str - :param authorization_endpoint: Required. OAuth authorization endpoint. See - http://tools.ietf.org/html/rfc6749#section-3.2. - :type authorization_endpoint: str - :param grant_types: Required. Form of an authorization grant, which the - client uses to request the access token. - :type grant_types: list[str or ~azure.mgmt.apimanagement.models.GrantType] - :param client_id: Required. Client or app id registered with this - authorization server. - :type client_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'display_name': {'required': True, 'max_length': 50, 'min_length': 1}, - 'client_registration_endpoint': {'required': True}, - 'authorization_endpoint': {'required': True}, - 'grant_types': {'required': True}, - 'client_id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'authorization_methods': {'key': 'properties.authorizationMethods', 'type': '[AuthorizationMethod]'}, - 'client_authentication_method': {'key': 'properties.clientAuthenticationMethod', 'type': '[str]'}, - 'token_body_parameters': {'key': 'properties.tokenBodyParameters', 'type': '[TokenBodyParameterContract]'}, - 'token_endpoint': {'key': 'properties.tokenEndpoint', 'type': 'str'}, - 'support_state': {'key': 'properties.supportState', 'type': 'bool'}, - 'default_scope': {'key': 'properties.defaultScope', 'type': 'str'}, - 'bearer_token_sending_methods': {'key': 'properties.bearerTokenSendingMethods', 'type': '[str]'}, - 'client_secret': {'key': 'properties.clientSecret', 'type': 'str'}, - 'resource_owner_username': {'key': 'properties.resourceOwnerUsername', 'type': 'str'}, - 'resource_owner_password': {'key': 'properties.resourceOwnerPassword', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'client_registration_endpoint': {'key': 'properties.clientRegistrationEndpoint', 'type': 'str'}, - 'authorization_endpoint': {'key': 'properties.authorizationEndpoint', 'type': 'str'}, - 'grant_types': {'key': 'properties.grantTypes', 'type': '[str]'}, - 'client_id': {'key': 'properties.clientId', 'type': 'str'}, - } - - def __init__(self, *, display_name: str, client_registration_endpoint: str, authorization_endpoint: str, grant_types, client_id: str, description: str=None, authorization_methods=None, client_authentication_method=None, token_body_parameters=None, token_endpoint: str=None, support_state: bool=None, default_scope: str=None, bearer_token_sending_methods=None, client_secret: str=None, resource_owner_username: str=None, resource_owner_password: str=None, **kwargs) -> None: - super(AuthorizationServerContract, self).__init__(**kwargs) - self.description = description - self.authorization_methods = authorization_methods - self.client_authentication_method = client_authentication_method - self.token_body_parameters = token_body_parameters - self.token_endpoint = token_endpoint - self.support_state = support_state - self.default_scope = default_scope - self.bearer_token_sending_methods = bearer_token_sending_methods - self.client_secret = client_secret - self.resource_owner_username = resource_owner_username - self.resource_owner_password = resource_owner_password - self.display_name = display_name - self.client_registration_endpoint = client_registration_endpoint - self.authorization_endpoint = authorization_endpoint - self.grant_types = grant_types - self.client_id = client_id diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/authorization_server_update_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/authorization_server_update_contract.py deleted file mode 100644 index 0e7b3a542afe..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/authorization_server_update_contract.py +++ /dev/null @@ -1,136 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class AuthorizationServerUpdateContract(Resource): - """External OAuth authorization server settings. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param description: Description of the authorization server. Can contain - HTML formatting tags. - :type description: str - :param authorization_methods: HTTP verbs supported by the authorization - endpoint. GET must be always present. POST is optional. - :type authorization_methods: list[str or - ~azure.mgmt.apimanagement.models.AuthorizationMethod] - :param client_authentication_method: Method of authentication supported by - the token endpoint of this authorization server. Possible values are Basic - and/or Body. When Body is specified, client credentials and other - parameters are passed within the request body in the - application/x-www-form-urlencoded format. - :type client_authentication_method: list[str or - ~azure.mgmt.apimanagement.models.ClientAuthenticationMethod] - :param token_body_parameters: Additional parameters required by the token - endpoint of this authorization server represented as an array of JSON - objects with name and value string properties, i.e. {"name" : "name - value", "value": "a value"}. - :type token_body_parameters: - list[~azure.mgmt.apimanagement.models.TokenBodyParameterContract] - :param token_endpoint: OAuth token endpoint. Contains absolute URI to - entity being referenced. - :type token_endpoint: str - :param support_state: If true, authorization server will include state - parameter from the authorization request to its response. Client may use - state parameter to raise protocol security. - :type support_state: bool - :param default_scope: Access token scope that is going to be requested by - default. Can be overridden at the API level. Should be provided in the - form of a string containing space-delimited values. - :type default_scope: str - :param bearer_token_sending_methods: Specifies the mechanism by which - access token is passed to the API. - :type bearer_token_sending_methods: list[str or - ~azure.mgmt.apimanagement.models.BearerTokenSendingMethod] - :param client_secret: Client or app secret registered with this - authorization server. - :type client_secret: str - :param resource_owner_username: Can be optionally specified when resource - owner password grant type is supported by this authorization server. - Default resource owner username. - :type resource_owner_username: str - :param resource_owner_password: Can be optionally specified when resource - owner password grant type is supported by this authorization server. - Default resource owner password. - :type resource_owner_password: str - :param display_name: User-friendly authorization server name. - :type display_name: str - :param client_registration_endpoint: Optional reference to a page where - client or app registration for this authorization server is performed. - Contains absolute URL to entity being referenced. - :type client_registration_endpoint: str - :param authorization_endpoint: OAuth authorization endpoint. See - http://tools.ietf.org/html/rfc6749#section-3.2. - :type authorization_endpoint: str - :param grant_types: Form of an authorization grant, which the client uses - to request the access token. - :type grant_types: list[str or ~azure.mgmt.apimanagement.models.GrantType] - :param client_id: Client or app id registered with this authorization - server. - :type client_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'display_name': {'max_length': 50, 'min_length': 1}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'authorization_methods': {'key': 'properties.authorizationMethods', 'type': '[AuthorizationMethod]'}, - 'client_authentication_method': {'key': 'properties.clientAuthenticationMethod', 'type': '[str]'}, - 'token_body_parameters': {'key': 'properties.tokenBodyParameters', 'type': '[TokenBodyParameterContract]'}, - 'token_endpoint': {'key': 'properties.tokenEndpoint', 'type': 'str'}, - 'support_state': {'key': 'properties.supportState', 'type': 'bool'}, - 'default_scope': {'key': 'properties.defaultScope', 'type': 'str'}, - 'bearer_token_sending_methods': {'key': 'properties.bearerTokenSendingMethods', 'type': '[str]'}, - 'client_secret': {'key': 'properties.clientSecret', 'type': 'str'}, - 'resource_owner_username': {'key': 'properties.resourceOwnerUsername', 'type': 'str'}, - 'resource_owner_password': {'key': 'properties.resourceOwnerPassword', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'client_registration_endpoint': {'key': 'properties.clientRegistrationEndpoint', 'type': 'str'}, - 'authorization_endpoint': {'key': 'properties.authorizationEndpoint', 'type': 'str'}, - 'grant_types': {'key': 'properties.grantTypes', 'type': '[str]'}, - 'client_id': {'key': 'properties.clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AuthorizationServerUpdateContract, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.authorization_methods = kwargs.get('authorization_methods', None) - self.client_authentication_method = kwargs.get('client_authentication_method', None) - self.token_body_parameters = kwargs.get('token_body_parameters', None) - self.token_endpoint = kwargs.get('token_endpoint', None) - self.support_state = kwargs.get('support_state', None) - self.default_scope = kwargs.get('default_scope', None) - self.bearer_token_sending_methods = kwargs.get('bearer_token_sending_methods', None) - self.client_secret = kwargs.get('client_secret', None) - self.resource_owner_username = kwargs.get('resource_owner_username', None) - self.resource_owner_password = kwargs.get('resource_owner_password', None) - self.display_name = kwargs.get('display_name', None) - self.client_registration_endpoint = kwargs.get('client_registration_endpoint', None) - self.authorization_endpoint = kwargs.get('authorization_endpoint', None) - self.grant_types = kwargs.get('grant_types', None) - self.client_id = kwargs.get('client_id', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/authorization_server_update_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/authorization_server_update_contract_py3.py deleted file mode 100644 index d6b6e2357000..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/authorization_server_update_contract_py3.py +++ /dev/null @@ -1,136 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class AuthorizationServerUpdateContract(Resource): - """External OAuth authorization server settings. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param description: Description of the authorization server. Can contain - HTML formatting tags. - :type description: str - :param authorization_methods: HTTP verbs supported by the authorization - endpoint. GET must be always present. POST is optional. - :type authorization_methods: list[str or - ~azure.mgmt.apimanagement.models.AuthorizationMethod] - :param client_authentication_method: Method of authentication supported by - the token endpoint of this authorization server. Possible values are Basic - and/or Body. When Body is specified, client credentials and other - parameters are passed within the request body in the - application/x-www-form-urlencoded format. - :type client_authentication_method: list[str or - ~azure.mgmt.apimanagement.models.ClientAuthenticationMethod] - :param token_body_parameters: Additional parameters required by the token - endpoint of this authorization server represented as an array of JSON - objects with name and value string properties, i.e. {"name" : "name - value", "value": "a value"}. - :type token_body_parameters: - list[~azure.mgmt.apimanagement.models.TokenBodyParameterContract] - :param token_endpoint: OAuth token endpoint. Contains absolute URI to - entity being referenced. - :type token_endpoint: str - :param support_state: If true, authorization server will include state - parameter from the authorization request to its response. Client may use - state parameter to raise protocol security. - :type support_state: bool - :param default_scope: Access token scope that is going to be requested by - default. Can be overridden at the API level. Should be provided in the - form of a string containing space-delimited values. - :type default_scope: str - :param bearer_token_sending_methods: Specifies the mechanism by which - access token is passed to the API. - :type bearer_token_sending_methods: list[str or - ~azure.mgmt.apimanagement.models.BearerTokenSendingMethod] - :param client_secret: Client or app secret registered with this - authorization server. - :type client_secret: str - :param resource_owner_username: Can be optionally specified when resource - owner password grant type is supported by this authorization server. - Default resource owner username. - :type resource_owner_username: str - :param resource_owner_password: Can be optionally specified when resource - owner password grant type is supported by this authorization server. - Default resource owner password. - :type resource_owner_password: str - :param display_name: User-friendly authorization server name. - :type display_name: str - :param client_registration_endpoint: Optional reference to a page where - client or app registration for this authorization server is performed. - Contains absolute URL to entity being referenced. - :type client_registration_endpoint: str - :param authorization_endpoint: OAuth authorization endpoint. See - http://tools.ietf.org/html/rfc6749#section-3.2. - :type authorization_endpoint: str - :param grant_types: Form of an authorization grant, which the client uses - to request the access token. - :type grant_types: list[str or ~azure.mgmt.apimanagement.models.GrantType] - :param client_id: Client or app id registered with this authorization - server. - :type client_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'display_name': {'max_length': 50, 'min_length': 1}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'authorization_methods': {'key': 'properties.authorizationMethods', 'type': '[AuthorizationMethod]'}, - 'client_authentication_method': {'key': 'properties.clientAuthenticationMethod', 'type': '[str]'}, - 'token_body_parameters': {'key': 'properties.tokenBodyParameters', 'type': '[TokenBodyParameterContract]'}, - 'token_endpoint': {'key': 'properties.tokenEndpoint', 'type': 'str'}, - 'support_state': {'key': 'properties.supportState', 'type': 'bool'}, - 'default_scope': {'key': 'properties.defaultScope', 'type': 'str'}, - 'bearer_token_sending_methods': {'key': 'properties.bearerTokenSendingMethods', 'type': '[str]'}, - 'client_secret': {'key': 'properties.clientSecret', 'type': 'str'}, - 'resource_owner_username': {'key': 'properties.resourceOwnerUsername', 'type': 'str'}, - 'resource_owner_password': {'key': 'properties.resourceOwnerPassword', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'client_registration_endpoint': {'key': 'properties.clientRegistrationEndpoint', 'type': 'str'}, - 'authorization_endpoint': {'key': 'properties.authorizationEndpoint', 'type': 'str'}, - 'grant_types': {'key': 'properties.grantTypes', 'type': '[str]'}, - 'client_id': {'key': 'properties.clientId', 'type': 'str'}, - } - - def __init__(self, *, description: str=None, authorization_methods=None, client_authentication_method=None, token_body_parameters=None, token_endpoint: str=None, support_state: bool=None, default_scope: str=None, bearer_token_sending_methods=None, client_secret: str=None, resource_owner_username: str=None, resource_owner_password: str=None, display_name: str=None, client_registration_endpoint: str=None, authorization_endpoint: str=None, grant_types=None, client_id: str=None, **kwargs) -> None: - super(AuthorizationServerUpdateContract, self).__init__(**kwargs) - self.description = description - self.authorization_methods = authorization_methods - self.client_authentication_method = client_authentication_method - self.token_body_parameters = token_body_parameters - self.token_endpoint = token_endpoint - self.support_state = support_state - self.default_scope = default_scope - self.bearer_token_sending_methods = bearer_token_sending_methods - self.client_secret = client_secret - self.resource_owner_username = resource_owner_username - self.resource_owner_password = resource_owner_password - self.display_name = display_name - self.client_registration_endpoint = client_registration_endpoint - self.authorization_endpoint = authorization_endpoint - self.grant_types = grant_types - self.client_id = client_id diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_authorization_header_credentials.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_authorization_header_credentials.py deleted file mode 100644 index f579daecff01..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_authorization_header_credentials.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BackendAuthorizationHeaderCredentials(Model): - """Authorization header information. - - All required parameters must be populated in order to send to Azure. - - :param scheme: Required. Authentication Scheme name. - :type scheme: str - :param parameter: Required. Authentication Parameter value. - :type parameter: str - """ - - _validation = { - 'scheme': {'required': True, 'max_length': 100, 'min_length': 1}, - 'parameter': {'required': True, 'max_length': 300, 'min_length': 1}, - } - - _attribute_map = { - 'scheme': {'key': 'scheme', 'type': 'str'}, - 'parameter': {'key': 'parameter', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(BackendAuthorizationHeaderCredentials, self).__init__(**kwargs) - self.scheme = kwargs.get('scheme', None) - self.parameter = kwargs.get('parameter', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_authorization_header_credentials_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_authorization_header_credentials_py3.py deleted file mode 100644 index 9118b95378b7..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_authorization_header_credentials_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BackendAuthorizationHeaderCredentials(Model): - """Authorization header information. - - All required parameters must be populated in order to send to Azure. - - :param scheme: Required. Authentication Scheme name. - :type scheme: str - :param parameter: Required. Authentication Parameter value. - :type parameter: str - """ - - _validation = { - 'scheme': {'required': True, 'max_length': 100, 'min_length': 1}, - 'parameter': {'required': True, 'max_length': 300, 'min_length': 1}, - } - - _attribute_map = { - 'scheme': {'key': 'scheme', 'type': 'str'}, - 'parameter': {'key': 'parameter', 'type': 'str'}, - } - - def __init__(self, *, scheme: str, parameter: str, **kwargs) -> None: - super(BackendAuthorizationHeaderCredentials, self).__init__(**kwargs) - self.scheme = scheme - self.parameter = parameter diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_base_parameters.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_base_parameters.py deleted file mode 100644 index 8a1440dc943b..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_base_parameters.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BackendBaseParameters(Model): - """Backend entity base Parameter set. - - :param title: Backend Title. - :type title: str - :param description: Backend Description. - :type description: str - :param resource_id: Management Uri of the Resource in External System. - This url can be the Arm Resource Id of Logic Apps, Function Apps or Api - Apps. - :type resource_id: str - :param properties: Backend Properties contract - :type properties: ~azure.mgmt.apimanagement.models.BackendProperties - :param credentials: Backend Credentials Contract Properties - :type credentials: - ~azure.mgmt.apimanagement.models.BackendCredentialsContract - :param proxy: Backend Proxy Contract Properties - :type proxy: ~azure.mgmt.apimanagement.models.BackendProxyContract - :param tls: Backend TLS Properties - :type tls: ~azure.mgmt.apimanagement.models.BackendTlsProperties - """ - - _validation = { - 'title': {'max_length': 300, 'min_length': 1}, - 'description': {'max_length': 2000, 'min_length': 1}, - 'resource_id': {'max_length': 2000, 'min_length': 1}, - } - - _attribute_map = { - 'title': {'key': 'title', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'BackendProperties'}, - 'credentials': {'key': 'credentials', 'type': 'BackendCredentialsContract'}, - 'proxy': {'key': 'proxy', 'type': 'BackendProxyContract'}, - 'tls': {'key': 'tls', 'type': 'BackendTlsProperties'}, - } - - def __init__(self, **kwargs): - super(BackendBaseParameters, self).__init__(**kwargs) - self.title = kwargs.get('title', None) - self.description = kwargs.get('description', None) - self.resource_id = kwargs.get('resource_id', None) - self.properties = kwargs.get('properties', None) - self.credentials = kwargs.get('credentials', None) - self.proxy = kwargs.get('proxy', None) - self.tls = kwargs.get('tls', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_base_parameters_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_base_parameters_py3.py deleted file mode 100644 index 87c0a199bd72..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_base_parameters_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BackendBaseParameters(Model): - """Backend entity base Parameter set. - - :param title: Backend Title. - :type title: str - :param description: Backend Description. - :type description: str - :param resource_id: Management Uri of the Resource in External System. - This url can be the Arm Resource Id of Logic Apps, Function Apps or Api - Apps. - :type resource_id: str - :param properties: Backend Properties contract - :type properties: ~azure.mgmt.apimanagement.models.BackendProperties - :param credentials: Backend Credentials Contract Properties - :type credentials: - ~azure.mgmt.apimanagement.models.BackendCredentialsContract - :param proxy: Backend Proxy Contract Properties - :type proxy: ~azure.mgmt.apimanagement.models.BackendProxyContract - :param tls: Backend TLS Properties - :type tls: ~azure.mgmt.apimanagement.models.BackendTlsProperties - """ - - _validation = { - 'title': {'max_length': 300, 'min_length': 1}, - 'description': {'max_length': 2000, 'min_length': 1}, - 'resource_id': {'max_length': 2000, 'min_length': 1}, - } - - _attribute_map = { - 'title': {'key': 'title', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'BackendProperties'}, - 'credentials': {'key': 'credentials', 'type': 'BackendCredentialsContract'}, - 'proxy': {'key': 'proxy', 'type': 'BackendProxyContract'}, - 'tls': {'key': 'tls', 'type': 'BackendTlsProperties'}, - } - - def __init__(self, *, title: str=None, description: str=None, resource_id: str=None, properties=None, credentials=None, proxy=None, tls=None, **kwargs) -> None: - super(BackendBaseParameters, self).__init__(**kwargs) - self.title = title - self.description = description - self.resource_id = resource_id - self.properties = properties - self.credentials = credentials - self.proxy = proxy - self.tls = tls diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_contract.py deleted file mode 100644 index 568362361d49..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_contract.py +++ /dev/null @@ -1,89 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class BackendContract(Resource): - """Backend details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param title: Backend Title. - :type title: str - :param description: Backend Description. - :type description: str - :param resource_id: Management Uri of the Resource in External System. - This url can be the Arm Resource Id of Logic Apps, Function Apps or Api - Apps. - :type resource_id: str - :param properties: Backend Properties contract - :type properties: ~azure.mgmt.apimanagement.models.BackendProperties - :param credentials: Backend Credentials Contract Properties - :type credentials: - ~azure.mgmt.apimanagement.models.BackendCredentialsContract - :param proxy: Backend Proxy Contract Properties - :type proxy: ~azure.mgmt.apimanagement.models.BackendProxyContract - :param tls: Backend TLS Properties - :type tls: ~azure.mgmt.apimanagement.models.BackendTlsProperties - :param url: Required. Runtime Url of the Backend. - :type url: str - :param protocol: Required. Backend communication protocol. Possible values - include: 'http', 'soap' - :type protocol: str or ~azure.mgmt.apimanagement.models.BackendProtocol - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'title': {'max_length': 300, 'min_length': 1}, - 'description': {'max_length': 2000, 'min_length': 1}, - 'resource_id': {'max_length': 2000, 'min_length': 1}, - 'url': {'required': True, 'max_length': 2000, 'min_length': 1}, - 'protocol': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'title': {'key': 'properties.title', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, - 'properties': {'key': 'properties.properties', 'type': 'BackendProperties'}, - 'credentials': {'key': 'properties.credentials', 'type': 'BackendCredentialsContract'}, - 'proxy': {'key': 'properties.proxy', 'type': 'BackendProxyContract'}, - 'tls': {'key': 'properties.tls', 'type': 'BackendTlsProperties'}, - 'url': {'key': 'properties.url', 'type': 'str'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(BackendContract, self).__init__(**kwargs) - self.title = kwargs.get('title', None) - self.description = kwargs.get('description', None) - self.resource_id = kwargs.get('resource_id', None) - self.properties = kwargs.get('properties', None) - self.credentials = kwargs.get('credentials', None) - self.proxy = kwargs.get('proxy', None) - self.tls = kwargs.get('tls', None) - self.url = kwargs.get('url', None) - self.protocol = kwargs.get('protocol', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_contract_paged.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_contract_paged.py deleted file mode 100644 index d79a224281a2..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_contract_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class BackendContractPaged(Paged): - """ - A paging container for iterating over a list of :class:`BackendContract ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[BackendContract]'} - } - - def __init__(self, *args, **kwargs): - - super(BackendContractPaged, self).__init__(*args, **kwargs) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_contract_py3.py deleted file mode 100644 index bb2138c77a9e..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_contract_py3.py +++ /dev/null @@ -1,89 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class BackendContract(Resource): - """Backend details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param title: Backend Title. - :type title: str - :param description: Backend Description. - :type description: str - :param resource_id: Management Uri of the Resource in External System. - This url can be the Arm Resource Id of Logic Apps, Function Apps or Api - Apps. - :type resource_id: str - :param properties: Backend Properties contract - :type properties: ~azure.mgmt.apimanagement.models.BackendProperties - :param credentials: Backend Credentials Contract Properties - :type credentials: - ~azure.mgmt.apimanagement.models.BackendCredentialsContract - :param proxy: Backend Proxy Contract Properties - :type proxy: ~azure.mgmt.apimanagement.models.BackendProxyContract - :param tls: Backend TLS Properties - :type tls: ~azure.mgmt.apimanagement.models.BackendTlsProperties - :param url: Required. Runtime Url of the Backend. - :type url: str - :param protocol: Required. Backend communication protocol. Possible values - include: 'http', 'soap' - :type protocol: str or ~azure.mgmt.apimanagement.models.BackendProtocol - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'title': {'max_length': 300, 'min_length': 1}, - 'description': {'max_length': 2000, 'min_length': 1}, - 'resource_id': {'max_length': 2000, 'min_length': 1}, - 'url': {'required': True, 'max_length': 2000, 'min_length': 1}, - 'protocol': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'title': {'key': 'properties.title', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, - 'properties': {'key': 'properties.properties', 'type': 'BackendProperties'}, - 'credentials': {'key': 'properties.credentials', 'type': 'BackendCredentialsContract'}, - 'proxy': {'key': 'properties.proxy', 'type': 'BackendProxyContract'}, - 'tls': {'key': 'properties.tls', 'type': 'BackendTlsProperties'}, - 'url': {'key': 'properties.url', 'type': 'str'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - } - - def __init__(self, *, url: str, protocol, title: str=None, description: str=None, resource_id: str=None, properties=None, credentials=None, proxy=None, tls=None, **kwargs) -> None: - super(BackendContract, self).__init__(**kwargs) - self.title = title - self.description = description - self.resource_id = resource_id - self.properties = properties - self.credentials = credentials - self.proxy = proxy - self.tls = tls - self.url = url - self.protocol = protocol diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_credentials_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_credentials_contract.py deleted file mode 100644 index 5a260a612603..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_credentials_contract.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BackendCredentialsContract(Model): - """Details of the Credentials used to connect to Backend. - - :param certificate: List of Client Certificate Thumbprint. - :type certificate: list[str] - :param query: Query Parameter description. - :type query: dict[str, list[str]] - :param header: Header Parameter description. - :type header: dict[str, list[str]] - :param authorization: Authorization header authentication - :type authorization: - ~azure.mgmt.apimanagement.models.BackendAuthorizationHeaderCredentials - """ - - _validation = { - 'certificate': {'max_items': 32}, - } - - _attribute_map = { - 'certificate': {'key': 'certificate', 'type': '[str]'}, - 'query': {'key': 'query', 'type': '{[str]}'}, - 'header': {'key': 'header', 'type': '{[str]}'}, - 'authorization': {'key': 'authorization', 'type': 'BackendAuthorizationHeaderCredentials'}, - } - - def __init__(self, **kwargs): - super(BackendCredentialsContract, self).__init__(**kwargs) - self.certificate = kwargs.get('certificate', None) - self.query = kwargs.get('query', None) - self.header = kwargs.get('header', None) - self.authorization = kwargs.get('authorization', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_credentials_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_credentials_contract_py3.py deleted file mode 100644 index 437317e64592..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_credentials_contract_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BackendCredentialsContract(Model): - """Details of the Credentials used to connect to Backend. - - :param certificate: List of Client Certificate Thumbprint. - :type certificate: list[str] - :param query: Query Parameter description. - :type query: dict[str, list[str]] - :param header: Header Parameter description. - :type header: dict[str, list[str]] - :param authorization: Authorization header authentication - :type authorization: - ~azure.mgmt.apimanagement.models.BackendAuthorizationHeaderCredentials - """ - - _validation = { - 'certificate': {'max_items': 32}, - } - - _attribute_map = { - 'certificate': {'key': 'certificate', 'type': '[str]'}, - 'query': {'key': 'query', 'type': '{[str]}'}, - 'header': {'key': 'header', 'type': '{[str]}'}, - 'authorization': {'key': 'authorization', 'type': 'BackendAuthorizationHeaderCredentials'}, - } - - def __init__(self, *, certificate=None, query=None, header=None, authorization=None, **kwargs) -> None: - super(BackendCredentialsContract, self).__init__(**kwargs) - self.certificate = certificate - self.query = query - self.header = header - self.authorization = authorization diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_properties.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_properties.py deleted file mode 100644 index 6772b9235485..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_properties.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BackendProperties(Model): - """Properties specific to the Backend Type. - - :param service_fabric_cluster: Backend Service Fabric Cluster Properties - :type service_fabric_cluster: - ~azure.mgmt.apimanagement.models.BackendServiceFabricClusterProperties - """ - - _attribute_map = { - 'service_fabric_cluster': {'key': 'serviceFabricCluster', 'type': 'BackendServiceFabricClusterProperties'}, - } - - def __init__(self, **kwargs): - super(BackendProperties, self).__init__(**kwargs) - self.service_fabric_cluster = kwargs.get('service_fabric_cluster', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_properties_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_properties_py3.py deleted file mode 100644 index b84cc3f57d84..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_properties_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BackendProperties(Model): - """Properties specific to the Backend Type. - - :param service_fabric_cluster: Backend Service Fabric Cluster Properties - :type service_fabric_cluster: - ~azure.mgmt.apimanagement.models.BackendServiceFabricClusterProperties - """ - - _attribute_map = { - 'service_fabric_cluster': {'key': 'serviceFabricCluster', 'type': 'BackendServiceFabricClusterProperties'}, - } - - def __init__(self, *, service_fabric_cluster=None, **kwargs) -> None: - super(BackendProperties, self).__init__(**kwargs) - self.service_fabric_cluster = service_fabric_cluster diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_proxy_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_proxy_contract.py deleted file mode 100644 index d47cd57bbd1c..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_proxy_contract.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BackendProxyContract(Model): - """Details of the Backend WebProxy Server to use in the Request to Backend. - - All required parameters must be populated in order to send to Azure. - - :param url: Required. WebProxy Server AbsoluteUri property which includes - the entire URI stored in the Uri instance, including all fragments and - query strings. - :type url: str - :param username: Username to connect to the WebProxy server - :type username: str - :param password: Password to connect to the WebProxy Server - :type password: str - """ - - _validation = { - 'url': {'required': True, 'max_length': 2000, 'min_length': 1}, - } - - _attribute_map = { - 'url': {'key': 'url', 'type': 'str'}, - 'username': {'key': 'username', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(BackendProxyContract, self).__init__(**kwargs) - self.url = kwargs.get('url', None) - self.username = kwargs.get('username', None) - self.password = kwargs.get('password', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_proxy_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_proxy_contract_py3.py deleted file mode 100644 index faee560245f7..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_proxy_contract_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BackendProxyContract(Model): - """Details of the Backend WebProxy Server to use in the Request to Backend. - - All required parameters must be populated in order to send to Azure. - - :param url: Required. WebProxy Server AbsoluteUri property which includes - the entire URI stored in the Uri instance, including all fragments and - query strings. - :type url: str - :param username: Username to connect to the WebProxy server - :type username: str - :param password: Password to connect to the WebProxy Server - :type password: str - """ - - _validation = { - 'url': {'required': True, 'max_length': 2000, 'min_length': 1}, - } - - _attribute_map = { - 'url': {'key': 'url', 'type': 'str'}, - 'username': {'key': 'username', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, - } - - def __init__(self, *, url: str, username: str=None, password: str=None, **kwargs) -> None: - super(BackendProxyContract, self).__init__(**kwargs) - self.url = url - self.username = username - self.password = password diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_reconnect_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_reconnect_contract.py deleted file mode 100644 index 3ca83471ba8d..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_reconnect_contract.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class BackendReconnectContract(Resource): - """Reconnect request parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param after: Duration in ISO8601 format after which reconnect will be - initiated. Minimum duration of the Reconnect is PT2M. - :type after: timedelta - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'after': {'key': 'properties.after', 'type': 'duration'}, - } - - def __init__(self, **kwargs): - super(BackendReconnectContract, self).__init__(**kwargs) - self.after = kwargs.get('after', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_reconnect_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_reconnect_contract_py3.py deleted file mode 100644 index 5e193014df50..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_reconnect_contract_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class BackendReconnectContract(Resource): - """Reconnect request parameters. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param after: Duration in ISO8601 format after which reconnect will be - initiated. Minimum duration of the Reconnect is PT2M. - :type after: timedelta - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'after': {'key': 'properties.after', 'type': 'duration'}, - } - - def __init__(self, *, after=None, **kwargs) -> None: - super(BackendReconnectContract, self).__init__(**kwargs) - self.after = after diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_service_fabric_cluster_properties.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_service_fabric_cluster_properties.py deleted file mode 100644 index cd558fcef895..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_service_fabric_cluster_properties.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BackendServiceFabricClusterProperties(Model): - """Properties of the Service Fabric Type Backend. - - All required parameters must be populated in order to send to Azure. - - :param client_certificatethumbprint: Required. The client certificate - thumbprint for the management endpoint. - :type client_certificatethumbprint: str - :param max_partition_resolution_retries: Maximum number of retries while - attempting resolve the partition. - :type max_partition_resolution_retries: int - :param management_endpoints: Required. The cluster management endpoint. - :type management_endpoints: list[str] - :param server_certificate_thumbprints: Thumbprints of certificates cluster - management service uses for tls communication - :type server_certificate_thumbprints: list[str] - :param server_x509_names: Server X509 Certificate Names Collection - :type server_x509_names: - list[~azure.mgmt.apimanagement.models.X509CertificateName] - """ - - _validation = { - 'client_certificatethumbprint': {'required': True}, - 'management_endpoints': {'required': True}, - } - - _attribute_map = { - 'client_certificatethumbprint': {'key': 'clientCertificatethumbprint', 'type': 'str'}, - 'max_partition_resolution_retries': {'key': 'maxPartitionResolutionRetries', 'type': 'int'}, - 'management_endpoints': {'key': 'managementEndpoints', 'type': '[str]'}, - 'server_certificate_thumbprints': {'key': 'serverCertificateThumbprints', 'type': '[str]'}, - 'server_x509_names': {'key': 'serverX509Names', 'type': '[X509CertificateName]'}, - } - - def __init__(self, **kwargs): - super(BackendServiceFabricClusterProperties, self).__init__(**kwargs) - self.client_certificatethumbprint = kwargs.get('client_certificatethumbprint', None) - self.max_partition_resolution_retries = kwargs.get('max_partition_resolution_retries', None) - self.management_endpoints = kwargs.get('management_endpoints', None) - self.server_certificate_thumbprints = kwargs.get('server_certificate_thumbprints', None) - self.server_x509_names = kwargs.get('server_x509_names', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_service_fabric_cluster_properties_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_service_fabric_cluster_properties_py3.py deleted file mode 100644 index 7a405ec352b2..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_service_fabric_cluster_properties_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BackendServiceFabricClusterProperties(Model): - """Properties of the Service Fabric Type Backend. - - All required parameters must be populated in order to send to Azure. - - :param client_certificatethumbprint: Required. The client certificate - thumbprint for the management endpoint. - :type client_certificatethumbprint: str - :param max_partition_resolution_retries: Maximum number of retries while - attempting resolve the partition. - :type max_partition_resolution_retries: int - :param management_endpoints: Required. The cluster management endpoint. - :type management_endpoints: list[str] - :param server_certificate_thumbprints: Thumbprints of certificates cluster - management service uses for tls communication - :type server_certificate_thumbprints: list[str] - :param server_x509_names: Server X509 Certificate Names Collection - :type server_x509_names: - list[~azure.mgmt.apimanagement.models.X509CertificateName] - """ - - _validation = { - 'client_certificatethumbprint': {'required': True}, - 'management_endpoints': {'required': True}, - } - - _attribute_map = { - 'client_certificatethumbprint': {'key': 'clientCertificatethumbprint', 'type': 'str'}, - 'max_partition_resolution_retries': {'key': 'maxPartitionResolutionRetries', 'type': 'int'}, - 'management_endpoints': {'key': 'managementEndpoints', 'type': '[str]'}, - 'server_certificate_thumbprints': {'key': 'serverCertificateThumbprints', 'type': '[str]'}, - 'server_x509_names': {'key': 'serverX509Names', 'type': '[X509CertificateName]'}, - } - - def __init__(self, *, client_certificatethumbprint: str, management_endpoints, max_partition_resolution_retries: int=None, server_certificate_thumbprints=None, server_x509_names=None, **kwargs) -> None: - super(BackendServiceFabricClusterProperties, self).__init__(**kwargs) - self.client_certificatethumbprint = client_certificatethumbprint - self.max_partition_resolution_retries = max_partition_resolution_retries - self.management_endpoints = management_endpoints - self.server_certificate_thumbprints = server_certificate_thumbprints - self.server_x509_names = server_x509_names diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_tls_properties.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_tls_properties.py deleted file mode 100644 index 8524bf76f66f..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_tls_properties.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BackendTlsProperties(Model): - """Properties controlling TLS Certificate Validation. - - :param validate_certificate_chain: Flag indicating whether SSL certificate - chain validation should be done when using self-signed certificates for - this backend host. Default value: True . - :type validate_certificate_chain: bool - :param validate_certificate_name: Flag indicating whether SSL certificate - name validation should be done when using self-signed certificates for - this backend host. Default value: True . - :type validate_certificate_name: bool - """ - - _attribute_map = { - 'validate_certificate_chain': {'key': 'validateCertificateChain', 'type': 'bool'}, - 'validate_certificate_name': {'key': 'validateCertificateName', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(BackendTlsProperties, self).__init__(**kwargs) - self.validate_certificate_chain = kwargs.get('validate_certificate_chain', True) - self.validate_certificate_name = kwargs.get('validate_certificate_name', True) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_tls_properties_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_tls_properties_py3.py deleted file mode 100644 index a9596d94041e..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_tls_properties_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BackendTlsProperties(Model): - """Properties controlling TLS Certificate Validation. - - :param validate_certificate_chain: Flag indicating whether SSL certificate - chain validation should be done when using self-signed certificates for - this backend host. Default value: True . - :type validate_certificate_chain: bool - :param validate_certificate_name: Flag indicating whether SSL certificate - name validation should be done when using self-signed certificates for - this backend host. Default value: True . - :type validate_certificate_name: bool - """ - - _attribute_map = { - 'validate_certificate_chain': {'key': 'validateCertificateChain', 'type': 'bool'}, - 'validate_certificate_name': {'key': 'validateCertificateName', 'type': 'bool'}, - } - - def __init__(self, *, validate_certificate_chain: bool=True, validate_certificate_name: bool=True, **kwargs) -> None: - super(BackendTlsProperties, self).__init__(**kwargs) - self.validate_certificate_chain = validate_certificate_chain - self.validate_certificate_name = validate_certificate_name diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_update_parameters.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_update_parameters.py deleted file mode 100644 index a74bfecb8a4a..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_update_parameters.py +++ /dev/null @@ -1,71 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BackendUpdateParameters(Model): - """Backend update parameters. - - :param title: Backend Title. - :type title: str - :param description: Backend Description. - :type description: str - :param resource_id: Management Uri of the Resource in External System. - This url can be the Arm Resource Id of Logic Apps, Function Apps or Api - Apps. - :type resource_id: str - :param properties: Backend Properties contract - :type properties: ~azure.mgmt.apimanagement.models.BackendProperties - :param credentials: Backend Credentials Contract Properties - :type credentials: - ~azure.mgmt.apimanagement.models.BackendCredentialsContract - :param proxy: Backend Proxy Contract Properties - :type proxy: ~azure.mgmt.apimanagement.models.BackendProxyContract - :param tls: Backend TLS Properties - :type tls: ~azure.mgmt.apimanagement.models.BackendTlsProperties - :param url: Runtime Url of the Backend. - :type url: str - :param protocol: Backend communication protocol. Possible values include: - 'http', 'soap' - :type protocol: str or ~azure.mgmt.apimanagement.models.BackendProtocol - """ - - _validation = { - 'title': {'max_length': 300, 'min_length': 1}, - 'description': {'max_length': 2000, 'min_length': 1}, - 'resource_id': {'max_length': 2000, 'min_length': 1}, - 'url': {'max_length': 2000, 'min_length': 1}, - } - - _attribute_map = { - 'title': {'key': 'properties.title', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, - 'properties': {'key': 'properties.properties', 'type': 'BackendProperties'}, - 'credentials': {'key': 'properties.credentials', 'type': 'BackendCredentialsContract'}, - 'proxy': {'key': 'properties.proxy', 'type': 'BackendProxyContract'}, - 'tls': {'key': 'properties.tls', 'type': 'BackendTlsProperties'}, - 'url': {'key': 'properties.url', 'type': 'str'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(BackendUpdateParameters, self).__init__(**kwargs) - self.title = kwargs.get('title', None) - self.description = kwargs.get('description', None) - self.resource_id = kwargs.get('resource_id', None) - self.properties = kwargs.get('properties', None) - self.credentials = kwargs.get('credentials', None) - self.proxy = kwargs.get('proxy', None) - self.tls = kwargs.get('tls', None) - self.url = kwargs.get('url', None) - self.protocol = kwargs.get('protocol', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_update_parameters_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_update_parameters_py3.py deleted file mode 100644 index a83a9a55586c..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_update_parameters_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BackendUpdateParameters(Model): - """Backend update parameters. - - :param title: Backend Title. - :type title: str - :param description: Backend Description. - :type description: str - :param resource_id: Management Uri of the Resource in External System. - This url can be the Arm Resource Id of Logic Apps, Function Apps or Api - Apps. - :type resource_id: str - :param properties: Backend Properties contract - :type properties: ~azure.mgmt.apimanagement.models.BackendProperties - :param credentials: Backend Credentials Contract Properties - :type credentials: - ~azure.mgmt.apimanagement.models.BackendCredentialsContract - :param proxy: Backend Proxy Contract Properties - :type proxy: ~azure.mgmt.apimanagement.models.BackendProxyContract - :param tls: Backend TLS Properties - :type tls: ~azure.mgmt.apimanagement.models.BackendTlsProperties - :param url: Runtime Url of the Backend. - :type url: str - :param protocol: Backend communication protocol. Possible values include: - 'http', 'soap' - :type protocol: str or ~azure.mgmt.apimanagement.models.BackendProtocol - """ - - _validation = { - 'title': {'max_length': 300, 'min_length': 1}, - 'description': {'max_length': 2000, 'min_length': 1}, - 'resource_id': {'max_length': 2000, 'min_length': 1}, - 'url': {'max_length': 2000, 'min_length': 1}, - } - - _attribute_map = { - 'title': {'key': 'properties.title', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, - 'properties': {'key': 'properties.properties', 'type': 'BackendProperties'}, - 'credentials': {'key': 'properties.credentials', 'type': 'BackendCredentialsContract'}, - 'proxy': {'key': 'properties.proxy', 'type': 'BackendProxyContract'}, - 'tls': {'key': 'properties.tls', 'type': 'BackendTlsProperties'}, - 'url': {'key': 'properties.url', 'type': 'str'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - } - - def __init__(self, *, title: str=None, description: str=None, resource_id: str=None, properties=None, credentials=None, proxy=None, tls=None, url: str=None, protocol=None, **kwargs) -> None: - super(BackendUpdateParameters, self).__init__(**kwargs) - self.title = title - self.description = description - self.resource_id = resource_id - self.properties = properties - self.credentials = credentials - self.proxy = proxy - self.tls = tls - self.url = url - self.protocol = protocol diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/body_diagnostic_settings.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/body_diagnostic_settings.py deleted file mode 100644 index b0f9021fbada..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/body_diagnostic_settings.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BodyDiagnosticSettings(Model): - """Body logging settings. - - :param bytes: Number of request body bytes to log. - :type bytes: int - """ - - _validation = { - 'bytes': {'maximum': 8192}, - } - - _attribute_map = { - 'bytes': {'key': 'bytes', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(BodyDiagnosticSettings, self).__init__(**kwargs) - self.bytes = kwargs.get('bytes', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/body_diagnostic_settings_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/body_diagnostic_settings_py3.py deleted file mode 100644 index 4192e4a3dc58..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/body_diagnostic_settings_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BodyDiagnosticSettings(Model): - """Body logging settings. - - :param bytes: Number of request body bytes to log. - :type bytes: int - """ - - _validation = { - 'bytes': {'maximum': 8192}, - } - - _attribute_map = { - 'bytes': {'key': 'bytes', 'type': 'int'}, - } - - def __init__(self, *, bytes: int=None, **kwargs) -> None: - super(BodyDiagnosticSettings, self).__init__(**kwargs) - self.bytes = bytes diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/cache_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/cache_contract.py deleted file mode 100644 index ea1874f4606c..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/cache_contract.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class CacheContract(Resource): - """Cache details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param description: Cache description - :type description: str - :param connection_string: Required. Runtime connection string to cache - :type connection_string: str - :param resource_id: Original uri of entity in external system cache points - to - :type resource_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'description': {'max_length': 2000}, - 'connection_string': {'required': True, 'max_length': 300}, - 'resource_id': {'max_length': 2000}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'connection_string': {'key': 'properties.connectionString', 'type': 'str'}, - 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CacheContract, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.connection_string = kwargs.get('connection_string', None) - self.resource_id = kwargs.get('resource_id', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/cache_contract_paged.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/cache_contract_paged.py deleted file mode 100644 index 13b6af191d44..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/cache_contract_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class CacheContractPaged(Paged): - """ - A paging container for iterating over a list of :class:`CacheContract ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CacheContract]'} - } - - def __init__(self, *args, **kwargs): - - super(CacheContractPaged, self).__init__(*args, **kwargs) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/cache_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/cache_contract_py3.py deleted file mode 100644 index 646e00c0e511..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/cache_contract_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class CacheContract(Resource): - """Cache details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param description: Cache description - :type description: str - :param connection_string: Required. Runtime connection string to cache - :type connection_string: str - :param resource_id: Original uri of entity in external system cache points - to - :type resource_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'description': {'max_length': 2000}, - 'connection_string': {'required': True, 'max_length': 300}, - 'resource_id': {'max_length': 2000}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'connection_string': {'key': 'properties.connectionString', 'type': 'str'}, - 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, - } - - def __init__(self, *, connection_string: str, description: str=None, resource_id: str=None, **kwargs) -> None: - super(CacheContract, self).__init__(**kwargs) - self.description = description - self.connection_string = connection_string - self.resource_id = resource_id diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/cache_update_parameters.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/cache_update_parameters.py deleted file mode 100644 index 541a426dd833..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/cache_update_parameters.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CacheUpdateParameters(Model): - """Cache update details. - - :param description: Cache description - :type description: str - :param connection_string: Runtime connection string to cache - :type connection_string: str - :param resource_id: Original uri of entity in external system cache points - to - :type resource_id: str - """ - - _validation = { - 'description': {'max_length': 2000}, - 'connection_string': {'max_length': 300}, - 'resource_id': {'max_length': 2000}, - } - - _attribute_map = { - 'description': {'key': 'properties.description', 'type': 'str'}, - 'connection_string': {'key': 'properties.connectionString', 'type': 'str'}, - 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CacheUpdateParameters, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.connection_string = kwargs.get('connection_string', None) - self.resource_id = kwargs.get('resource_id', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/cache_update_parameters_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/cache_update_parameters_py3.py deleted file mode 100644 index 88a8f3d42bce..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/cache_update_parameters_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CacheUpdateParameters(Model): - """Cache update details. - - :param description: Cache description - :type description: str - :param connection_string: Runtime connection string to cache - :type connection_string: str - :param resource_id: Original uri of entity in external system cache points - to - :type resource_id: str - """ - - _validation = { - 'description': {'max_length': 2000}, - 'connection_string': {'max_length': 300}, - 'resource_id': {'max_length': 2000}, - } - - _attribute_map = { - 'description': {'key': 'properties.description', 'type': 'str'}, - 'connection_string': {'key': 'properties.connectionString', 'type': 'str'}, - 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, - } - - def __init__(self, *, description: str=None, connection_string: str=None, resource_id: str=None, **kwargs) -> None: - super(CacheUpdateParameters, self).__init__(**kwargs) - self.description = description - self.connection_string = connection_string - self.resource_id = resource_id diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/certificate_configuration.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/certificate_configuration.py deleted file mode 100644 index 82f9e6d8f4ef..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/certificate_configuration.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CertificateConfiguration(Model): - """Certificate configuration which consist of non-trusted intermediates and - root certificates. - - All required parameters must be populated in order to send to Azure. - - :param encoded_certificate: Base64 Encoded certificate. - :type encoded_certificate: str - :param certificate_password: Certificate Password. - :type certificate_password: str - :param store_name: Required. The - System.Security.Cryptography.x509certificates.StoreName certificate store - location. Only Root and CertificateAuthority are valid locations. Possible - values include: 'CertificateAuthority', 'Root' - :type store_name: str or ~azure.mgmt.apimanagement.models.enum - :param certificate: Certificate information. - :type certificate: ~azure.mgmt.apimanagement.models.CertificateInformation - """ - - _validation = { - 'store_name': {'required': True}, - } - - _attribute_map = { - 'encoded_certificate': {'key': 'encodedCertificate', 'type': 'str'}, - 'certificate_password': {'key': 'certificatePassword', 'type': 'str'}, - 'store_name': {'key': 'storeName', 'type': 'str'}, - 'certificate': {'key': 'certificate', 'type': 'CertificateInformation'}, - } - - def __init__(self, **kwargs): - super(CertificateConfiguration, self).__init__(**kwargs) - self.encoded_certificate = kwargs.get('encoded_certificate', None) - self.certificate_password = kwargs.get('certificate_password', None) - self.store_name = kwargs.get('store_name', None) - self.certificate = kwargs.get('certificate', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/certificate_configuration_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/certificate_configuration_py3.py deleted file mode 100644 index f15c5709a513..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/certificate_configuration_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CertificateConfiguration(Model): - """Certificate configuration which consist of non-trusted intermediates and - root certificates. - - All required parameters must be populated in order to send to Azure. - - :param encoded_certificate: Base64 Encoded certificate. - :type encoded_certificate: str - :param certificate_password: Certificate Password. - :type certificate_password: str - :param store_name: Required. The - System.Security.Cryptography.x509certificates.StoreName certificate store - location. Only Root and CertificateAuthority are valid locations. Possible - values include: 'CertificateAuthority', 'Root' - :type store_name: str or ~azure.mgmt.apimanagement.models.enum - :param certificate: Certificate information. - :type certificate: ~azure.mgmt.apimanagement.models.CertificateInformation - """ - - _validation = { - 'store_name': {'required': True}, - } - - _attribute_map = { - 'encoded_certificate': {'key': 'encodedCertificate', 'type': 'str'}, - 'certificate_password': {'key': 'certificatePassword', 'type': 'str'}, - 'store_name': {'key': 'storeName', 'type': 'str'}, - 'certificate': {'key': 'certificate', 'type': 'CertificateInformation'}, - } - - def __init__(self, *, store_name, encoded_certificate: str=None, certificate_password: str=None, certificate=None, **kwargs) -> None: - super(CertificateConfiguration, self).__init__(**kwargs) - self.encoded_certificate = encoded_certificate - self.certificate_password = certificate_password - self.store_name = store_name - self.certificate = certificate diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/certificate_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/certificate_contract.py deleted file mode 100644 index af06bb20cf95..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/certificate_contract.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class CertificateContract(Resource): - """Certificate details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param subject: Required. Subject attribute of the certificate. - :type subject: str - :param thumbprint: Required. Thumbprint of the certificate. - :type thumbprint: str - :param expiration_date: Required. Expiration date of the certificate. The - date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified - by the ISO 8601 standard. - :type expiration_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'subject': {'required': True}, - 'thumbprint': {'required': True}, - 'expiration_date': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'subject': {'key': 'properties.subject', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(CertificateContract, self).__init__(**kwargs) - self.subject = kwargs.get('subject', None) - self.thumbprint = kwargs.get('thumbprint', None) - self.expiration_date = kwargs.get('expiration_date', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/certificate_contract_paged.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/certificate_contract_paged.py deleted file mode 100644 index e2d7255ecfa6..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/certificate_contract_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class CertificateContractPaged(Paged): - """ - A paging container for iterating over a list of :class:`CertificateContract ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CertificateContract]'} - } - - def __init__(self, *args, **kwargs): - - super(CertificateContractPaged, self).__init__(*args, **kwargs) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/certificate_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/certificate_contract_py3.py deleted file mode 100644 index 464100179414..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/certificate_contract_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class CertificateContract(Resource): - """Certificate details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param subject: Required. Subject attribute of the certificate. - :type subject: str - :param thumbprint: Required. Thumbprint of the certificate. - :type thumbprint: str - :param expiration_date: Required. Expiration date of the certificate. The - date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified - by the ISO 8601 standard. - :type expiration_date: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'subject': {'required': True}, - 'thumbprint': {'required': True}, - 'expiration_date': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'subject': {'key': 'properties.subject', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - } - - def __init__(self, *, subject: str, thumbprint: str, expiration_date, **kwargs) -> None: - super(CertificateContract, self).__init__(**kwargs) - self.subject = subject - self.thumbprint = thumbprint - self.expiration_date = expiration_date diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/certificate_create_or_update_parameters.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/certificate_create_or_update_parameters.py deleted file mode 100644 index 6b195ea702a7..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/certificate_create_or_update_parameters.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CertificateCreateOrUpdateParameters(Model): - """Certificate create or update details. - - All required parameters must be populated in order to send to Azure. - - :param data: Required. Base 64 encoded certificate using the - application/x-pkcs12 representation. - :type data: str - :param password: Required. Password for the Certificate - :type password: str - """ - - _validation = { - 'data': {'required': True}, - 'password': {'required': True}, - } - - _attribute_map = { - 'data': {'key': 'properties.data', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CertificateCreateOrUpdateParameters, self).__init__(**kwargs) - self.data = kwargs.get('data', None) - self.password = kwargs.get('password', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/certificate_create_or_update_parameters_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/certificate_create_or_update_parameters_py3.py deleted file mode 100644 index 0a14fa8710ae..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/certificate_create_or_update_parameters_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CertificateCreateOrUpdateParameters(Model): - """Certificate create or update details. - - All required parameters must be populated in order to send to Azure. - - :param data: Required. Base 64 encoded certificate using the - application/x-pkcs12 representation. - :type data: str - :param password: Required. Password for the Certificate - :type password: str - """ - - _validation = { - 'data': {'required': True}, - 'password': {'required': True}, - } - - _attribute_map = { - 'data': {'key': 'properties.data', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - } - - def __init__(self, *, data: str, password: str, **kwargs) -> None: - super(CertificateCreateOrUpdateParameters, self).__init__(**kwargs) - self.data = data - self.password = password diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/certificate_information.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/certificate_information.py deleted file mode 100644 index d66883195efe..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/certificate_information.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CertificateInformation(Model): - """SSL certificate information. - - All required parameters must be populated in order to send to Azure. - - :param expiry: Required. Expiration date of the certificate. The date - conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by - the ISO 8601 standard. - :type expiry: datetime - :param thumbprint: Required. Thumbprint of the certificate. - :type thumbprint: str - :param subject: Required. Subject of the certificate. - :type subject: str - """ - - _validation = { - 'expiry': {'required': True}, - 'thumbprint': {'required': True}, - 'subject': {'required': True}, - } - - _attribute_map = { - 'expiry': {'key': 'expiry', 'type': 'iso-8601'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, - 'subject': {'key': 'subject', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CertificateInformation, self).__init__(**kwargs) - self.expiry = kwargs.get('expiry', None) - self.thumbprint = kwargs.get('thumbprint', None) - self.subject = kwargs.get('subject', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/certificate_information_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/certificate_information_py3.py deleted file mode 100644 index a14d9b1d7756..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/certificate_information_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CertificateInformation(Model): - """SSL certificate information. - - All required parameters must be populated in order to send to Azure. - - :param expiry: Required. Expiration date of the certificate. The date - conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by - the ISO 8601 standard. - :type expiry: datetime - :param thumbprint: Required. Thumbprint of the certificate. - :type thumbprint: str - :param subject: Required. Subject of the certificate. - :type subject: str - """ - - _validation = { - 'expiry': {'required': True}, - 'thumbprint': {'required': True}, - 'subject': {'required': True}, - } - - _attribute_map = { - 'expiry': {'key': 'expiry', 'type': 'iso-8601'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, - 'subject': {'key': 'subject', 'type': 'str'}, - } - - def __init__(self, *, expiry, thumbprint: str, subject: str, **kwargs) -> None: - super(CertificateInformation, self).__init__(**kwargs) - self.expiry = expiry - self.thumbprint = thumbprint - self.subject = subject diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/connectivity_status_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/connectivity_status_contract.py deleted file mode 100644 index 58737990e11f..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/connectivity_status_contract.py +++ /dev/null @@ -1,65 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ConnectivityStatusContract(Model): - """Details about connectivity to a resource. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The hostname of the resource which the service - depends on. This can be the database, storage or any other azure resource - on which the service depends upon. - :type name: str - :param status: Required. Resource Connectivity Status Type identifier. - Possible values include: 'initializing', 'success', 'failure' - :type status: str or - ~azure.mgmt.apimanagement.models.ConnectivityStatusType - :param error: Error details of the connectivity to the resource. - :type error: str - :param last_updated: Required. The date when the resource connectivity - status was last updated. This status should be updated every 15 minutes. - If this status has not been updated, then it means that the service has - lost network connectivity to the resource, from inside the Virtual - Network.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` - as specified by the ISO 8601 standard. - :type last_updated: datetime - :param last_status_change: Required. The date when the resource - connectivity status last Changed from success to failure or vice-versa. - The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as - specified by the ISO 8601 standard. - :type last_status_change: datetime - """ - - _validation = { - 'name': {'required': True, 'min_length': 1}, - 'status': {'required': True}, - 'last_updated': {'required': True}, - 'last_status_change': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'str'}, - 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, - 'last_status_change': {'key': 'lastStatusChange', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ConnectivityStatusContract, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.status = kwargs.get('status', None) - self.error = kwargs.get('error', None) - self.last_updated = kwargs.get('last_updated', None) - self.last_status_change = kwargs.get('last_status_change', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/connectivity_status_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/connectivity_status_contract_py3.py deleted file mode 100644 index 4ff86d73dda1..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/connectivity_status_contract_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ConnectivityStatusContract(Model): - """Details about connectivity to a resource. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The hostname of the resource which the service - depends on. This can be the database, storage or any other azure resource - on which the service depends upon. - :type name: str - :param status: Required. Resource Connectivity Status Type identifier. - Possible values include: 'initializing', 'success', 'failure' - :type status: str or - ~azure.mgmt.apimanagement.models.ConnectivityStatusType - :param error: Error details of the connectivity to the resource. - :type error: str - :param last_updated: Required. The date when the resource connectivity - status was last updated. This status should be updated every 15 minutes. - If this status has not been updated, then it means that the service has - lost network connectivity to the resource, from inside the Virtual - Network.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` - as specified by the ISO 8601 standard. - :type last_updated: datetime - :param last_status_change: Required. The date when the resource - connectivity status last Changed from success to failure or vice-versa. - The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as - specified by the ISO 8601 standard. - :type last_status_change: datetime - """ - - _validation = { - 'name': {'required': True, 'min_length': 1}, - 'status': {'required': True}, - 'last_updated': {'required': True}, - 'last_status_change': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'str'}, - 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, - 'last_status_change': {'key': 'lastStatusChange', 'type': 'iso-8601'}, - } - - def __init__(self, *, name: str, status, last_updated, last_status_change, error: str=None, **kwargs) -> None: - super(ConnectivityStatusContract, self).__init__(**kwargs) - self.name = name - self.status = status - self.error = error - self.last_updated = last_updated - self.last_status_change = last_status_change diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/deploy_configuration_parameters.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/deploy_configuration_parameters.py deleted file mode 100644 index 3e3e7db3f36f..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/deploy_configuration_parameters.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeployConfigurationParameters(Model): - """Deploy Tenant Configuration Contract. - - All required parameters must be populated in order to send to Azure. - - :param branch: Required. The name of the Git branch from which the - configuration is to be deployed to the configuration database. - :type branch: str - :param force: The value enforcing deleting subscriptions to products that - are deleted in this update. - :type force: bool - """ - - _validation = { - 'branch': {'required': True}, - } - - _attribute_map = { - 'branch': {'key': 'properties.branch', 'type': 'str'}, - 'force': {'key': 'properties.force', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(DeployConfigurationParameters, self).__init__(**kwargs) - self.branch = kwargs.get('branch', None) - self.force = kwargs.get('force', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/deploy_configuration_parameters_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/deploy_configuration_parameters_py3.py deleted file mode 100644 index f7bf03929d4d..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/deploy_configuration_parameters_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeployConfigurationParameters(Model): - """Deploy Tenant Configuration Contract. - - All required parameters must be populated in order to send to Azure. - - :param branch: Required. The name of the Git branch from which the - configuration is to be deployed to the configuration database. - :type branch: str - :param force: The value enforcing deleting subscriptions to products that - are deleted in this update. - :type force: bool - """ - - _validation = { - 'branch': {'required': True}, - } - - _attribute_map = { - 'branch': {'key': 'properties.branch', 'type': 'str'}, - 'force': {'key': 'properties.force', 'type': 'bool'}, - } - - def __init__(self, *, branch: str, force: bool=None, **kwargs) -> None: - super(DeployConfigurationParameters, self).__init__(**kwargs) - self.branch = branch - self.force = force diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/diagnostic_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/diagnostic_contract.py deleted file mode 100644 index 041dd6002e6a..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/diagnostic_contract.py +++ /dev/null @@ -1,75 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class DiagnosticContract(Resource): - """Diagnostic details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param always_log: Specifies for what type of messages sampling settings - should not apply. Possible values include: 'allErrors' - :type always_log: str or ~azure.mgmt.apimanagement.models.AlwaysLog - :param logger_id: Required. Resource Id of a target logger. - :type logger_id: str - :param sampling: Sampling settings for Diagnostic. - :type sampling: ~azure.mgmt.apimanagement.models.SamplingSettings - :param frontend: Diagnostic settings for incoming/outgoing HTTP messages - to the Gateway. - :type frontend: - ~azure.mgmt.apimanagement.models.PipelineDiagnosticSettings - :param backend: Diagnostic settings for incoming/outgoing HTTP messages to - the Backend - :type backend: ~azure.mgmt.apimanagement.models.PipelineDiagnosticSettings - :param enable_http_correlation_headers: Whether to process Correlation - Headers coming to Api Management Service. Only applicable to Application - Insights diagnostics. Default is true. - :type enable_http_correlation_headers: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'logger_id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'always_log': {'key': 'properties.alwaysLog', 'type': 'str'}, - 'logger_id': {'key': 'properties.loggerId', 'type': 'str'}, - 'sampling': {'key': 'properties.sampling', 'type': 'SamplingSettings'}, - 'frontend': {'key': 'properties.frontend', 'type': 'PipelineDiagnosticSettings'}, - 'backend': {'key': 'properties.backend', 'type': 'PipelineDiagnosticSettings'}, - 'enable_http_correlation_headers': {'key': 'properties.enableHttpCorrelationHeaders', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(DiagnosticContract, self).__init__(**kwargs) - self.always_log = kwargs.get('always_log', None) - self.logger_id = kwargs.get('logger_id', None) - self.sampling = kwargs.get('sampling', None) - self.frontend = kwargs.get('frontend', None) - self.backend = kwargs.get('backend', None) - self.enable_http_correlation_headers = kwargs.get('enable_http_correlation_headers', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/diagnostic_contract_paged.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/diagnostic_contract_paged.py deleted file mode 100644 index ea142d87269f..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/diagnostic_contract_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DiagnosticContractPaged(Paged): - """ - A paging container for iterating over a list of :class:`DiagnosticContract ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DiagnosticContract]'} - } - - def __init__(self, *args, **kwargs): - - super(DiagnosticContractPaged, self).__init__(*args, **kwargs) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/diagnostic_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/diagnostic_contract_py3.py deleted file mode 100644 index b76b868476c7..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/diagnostic_contract_py3.py +++ /dev/null @@ -1,75 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class DiagnosticContract(Resource): - """Diagnostic details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param always_log: Specifies for what type of messages sampling settings - should not apply. Possible values include: 'allErrors' - :type always_log: str or ~azure.mgmt.apimanagement.models.AlwaysLog - :param logger_id: Required. Resource Id of a target logger. - :type logger_id: str - :param sampling: Sampling settings for Diagnostic. - :type sampling: ~azure.mgmt.apimanagement.models.SamplingSettings - :param frontend: Diagnostic settings for incoming/outgoing HTTP messages - to the Gateway. - :type frontend: - ~azure.mgmt.apimanagement.models.PipelineDiagnosticSettings - :param backend: Diagnostic settings for incoming/outgoing HTTP messages to - the Backend - :type backend: ~azure.mgmt.apimanagement.models.PipelineDiagnosticSettings - :param enable_http_correlation_headers: Whether to process Correlation - Headers coming to Api Management Service. Only applicable to Application - Insights diagnostics. Default is true. - :type enable_http_correlation_headers: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'logger_id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'always_log': {'key': 'properties.alwaysLog', 'type': 'str'}, - 'logger_id': {'key': 'properties.loggerId', 'type': 'str'}, - 'sampling': {'key': 'properties.sampling', 'type': 'SamplingSettings'}, - 'frontend': {'key': 'properties.frontend', 'type': 'PipelineDiagnosticSettings'}, - 'backend': {'key': 'properties.backend', 'type': 'PipelineDiagnosticSettings'}, - 'enable_http_correlation_headers': {'key': 'properties.enableHttpCorrelationHeaders', 'type': 'bool'}, - } - - def __init__(self, *, logger_id: str, always_log=None, sampling=None, frontend=None, backend=None, enable_http_correlation_headers: bool=None, **kwargs) -> None: - super(DiagnosticContract, self).__init__(**kwargs) - self.always_log = always_log - self.logger_id = logger_id - self.sampling = sampling - self.frontend = frontend - self.backend = backend - self.enable_http_correlation_headers = enable_http_correlation_headers diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/email_template_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/email_template_contract.py deleted file mode 100644 index c23ba2c72909..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/email_template_contract.py +++ /dev/null @@ -1,74 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class EmailTemplateContract(Resource): - """Email Template details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param subject: Required. Subject of the Template. - :type subject: str - :param body: Required. Email Template Body. This should be a valid - XDocument - :type body: str - :param title: Title of the Template. - :type title: str - :param description: Description of the Email Template. - :type description: str - :ivar is_default: Whether the template is the default template provided by - Api Management or has been edited. - :vartype is_default: bool - :param parameters: Email Template Parameter values. - :type parameters: - list[~azure.mgmt.apimanagement.models.EmailTemplateParametersContractProperties] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'subject': {'required': True, 'max_length': 1000, 'min_length': 1}, - 'body': {'required': True, 'min_length': 1}, - 'is_default': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'subject': {'key': 'properties.subject', 'type': 'str'}, - 'body': {'key': 'properties.body', 'type': 'str'}, - 'title': {'key': 'properties.title', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'is_default': {'key': 'properties.isDefault', 'type': 'bool'}, - 'parameters': {'key': 'properties.parameters', 'type': '[EmailTemplateParametersContractProperties]'}, - } - - def __init__(self, **kwargs): - super(EmailTemplateContract, self).__init__(**kwargs) - self.subject = kwargs.get('subject', None) - self.body = kwargs.get('body', None) - self.title = kwargs.get('title', None) - self.description = kwargs.get('description', None) - self.is_default = None - self.parameters = kwargs.get('parameters', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/email_template_contract_paged.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/email_template_contract_paged.py deleted file mode 100644 index 9f137e41d6a8..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/email_template_contract_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class EmailTemplateContractPaged(Paged): - """ - A paging container for iterating over a list of :class:`EmailTemplateContract ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[EmailTemplateContract]'} - } - - def __init__(self, *args, **kwargs): - - super(EmailTemplateContractPaged, self).__init__(*args, **kwargs) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/email_template_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/email_template_contract_py3.py deleted file mode 100644 index 3d3fcd217589..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/email_template_contract_py3.py +++ /dev/null @@ -1,74 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class EmailTemplateContract(Resource): - """Email Template details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param subject: Required. Subject of the Template. - :type subject: str - :param body: Required. Email Template Body. This should be a valid - XDocument - :type body: str - :param title: Title of the Template. - :type title: str - :param description: Description of the Email Template. - :type description: str - :ivar is_default: Whether the template is the default template provided by - Api Management or has been edited. - :vartype is_default: bool - :param parameters: Email Template Parameter values. - :type parameters: - list[~azure.mgmt.apimanagement.models.EmailTemplateParametersContractProperties] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'subject': {'required': True, 'max_length': 1000, 'min_length': 1}, - 'body': {'required': True, 'min_length': 1}, - 'is_default': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'subject': {'key': 'properties.subject', 'type': 'str'}, - 'body': {'key': 'properties.body', 'type': 'str'}, - 'title': {'key': 'properties.title', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'is_default': {'key': 'properties.isDefault', 'type': 'bool'}, - 'parameters': {'key': 'properties.parameters', 'type': '[EmailTemplateParametersContractProperties]'}, - } - - def __init__(self, *, subject: str, body: str, title: str=None, description: str=None, parameters=None, **kwargs) -> None: - super(EmailTemplateContract, self).__init__(**kwargs) - self.subject = subject - self.body = body - self.title = title - self.description = description - self.is_default = None - self.parameters = parameters diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/email_template_parameters_contract_properties.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/email_template_parameters_contract_properties.py deleted file mode 100644 index 060b64257a7a..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/email_template_parameters_contract_properties.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EmailTemplateParametersContractProperties(Model): - """Email Template Parameter contract. - - :param name: Template parameter name. - :type name: str - :param title: Template parameter title. - :type title: str - :param description: Template parameter description. - :type description: str - """ - - _validation = { - 'name': {'max_length': 256, 'min_length': 1, 'pattern': r'^[A-Za-z0-9-._]+$'}, - 'title': {'max_length': 4096, 'min_length': 1}, - 'description': {'max_length': 256, 'min_length': 1, 'pattern': r'^[A-Za-z0-9-._]+$'}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'title': {'key': 'title', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EmailTemplateParametersContractProperties, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.title = kwargs.get('title', None) - self.description = kwargs.get('description', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/email_template_parameters_contract_properties_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/email_template_parameters_contract_properties_py3.py deleted file mode 100644 index 58cce1c0df98..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/email_template_parameters_contract_properties_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EmailTemplateParametersContractProperties(Model): - """Email Template Parameter contract. - - :param name: Template parameter name. - :type name: str - :param title: Template parameter title. - :type title: str - :param description: Template parameter description. - :type description: str - """ - - _validation = { - 'name': {'max_length': 256, 'min_length': 1, 'pattern': r'^[A-Za-z0-9-._]+$'}, - 'title': {'max_length': 4096, 'min_length': 1}, - 'description': {'max_length': 256, 'min_length': 1, 'pattern': r'^[A-Za-z0-9-._]+$'}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'title': {'key': 'title', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, title: str=None, description: str=None, **kwargs) -> None: - super(EmailTemplateParametersContractProperties, self).__init__(**kwargs) - self.name = name - self.title = title - self.description = description diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/email_template_update_parameters.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/email_template_update_parameters.py deleted file mode 100644 index f7a7e5c3b452..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/email_template_update_parameters.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EmailTemplateUpdateParameters(Model): - """Email Template update Parameters. - - :param subject: Subject of the Template. - :type subject: str - :param title: Title of the Template. - :type title: str - :param description: Description of the Email Template. - :type description: str - :param body: Email Template Body. This should be a valid XDocument - :type body: str - :param parameters: Email Template Parameter values. - :type parameters: - list[~azure.mgmt.apimanagement.models.EmailTemplateParametersContractProperties] - """ - - _validation = { - 'subject': {'max_length': 1000, 'min_length': 1}, - 'body': {'min_length': 1}, - } - - _attribute_map = { - 'subject': {'key': 'properties.subject', 'type': 'str'}, - 'title': {'key': 'properties.title', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'body': {'key': 'properties.body', 'type': 'str'}, - 'parameters': {'key': 'properties.parameters', 'type': '[EmailTemplateParametersContractProperties]'}, - } - - def __init__(self, **kwargs): - super(EmailTemplateUpdateParameters, self).__init__(**kwargs) - self.subject = kwargs.get('subject', None) - self.title = kwargs.get('title', None) - self.description = kwargs.get('description', None) - self.body = kwargs.get('body', None) - self.parameters = kwargs.get('parameters', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/email_template_update_parameters_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/email_template_update_parameters_py3.py deleted file mode 100644 index 1907e0c59b21..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/email_template_update_parameters_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EmailTemplateUpdateParameters(Model): - """Email Template update Parameters. - - :param subject: Subject of the Template. - :type subject: str - :param title: Title of the Template. - :type title: str - :param description: Description of the Email Template. - :type description: str - :param body: Email Template Body. This should be a valid XDocument - :type body: str - :param parameters: Email Template Parameter values. - :type parameters: - list[~azure.mgmt.apimanagement.models.EmailTemplateParametersContractProperties] - """ - - _validation = { - 'subject': {'max_length': 1000, 'min_length': 1}, - 'body': {'min_length': 1}, - } - - _attribute_map = { - 'subject': {'key': 'properties.subject', 'type': 'str'}, - 'title': {'key': 'properties.title', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'body': {'key': 'properties.body', 'type': 'str'}, - 'parameters': {'key': 'properties.parameters', 'type': '[EmailTemplateParametersContractProperties]'}, - } - - def __init__(self, *, subject: str=None, title: str=None, description: str=None, body: str=None, parameters=None, **kwargs) -> None: - super(EmailTemplateUpdateParameters, self).__init__(**kwargs) - self.subject = subject - self.title = title - self.description = description - self.body = body - self.parameters = parameters diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/error_field_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/error_field_contract.py deleted file mode 100644 index f376b6292b73..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/error_field_contract.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ErrorFieldContract(Model): - """Error Field contract. - - :param code: Property level error code. - :type code: str - :param message: Human-readable representation of property-level error. - :type message: str - :param target: Property name. - :type target: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ErrorFieldContract, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.target = kwargs.get('target', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/error_field_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/error_field_contract_py3.py deleted file mode 100644 index f5c5e28d94d8..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/error_field_contract_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ErrorFieldContract(Model): - """Error Field contract. - - :param code: Property level error code. - :type code: str - :param message: Human-readable representation of property-level error. - :type message: str - :param target: Property name. - :type target: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, message: str=None, target: str=None, **kwargs) -> None: - super(ErrorFieldContract, self).__init__(**kwargs) - self.code = code - self.message = message - self.target = target diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/error_response.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/error_response.py deleted file mode 100644 index cd6591f007db..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/error_response.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class ErrorResponse(Model): - """Error Response. - - :param code: Service-defined error code. This code serves as a sub-status - for the HTTP error code specified in the response. - :type code: str - :param message: Human-readable representation of the error. - :type message: str - :param details: The list of invalid fields send in request, in case of - validation error. - :type details: list[~azure.mgmt.apimanagement.models.ErrorFieldContract] - """ - - _attribute_map = { - 'code': {'key': 'error.code', 'type': 'str'}, - 'message': {'key': 'error.message', 'type': 'str'}, - 'details': {'key': 'error.details', 'type': '[ErrorFieldContract]'}, - } - - def __init__(self, **kwargs): - super(ErrorResponse, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.details = kwargs.get('details', None) - - -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/error_response_body.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/error_response_body.py deleted file mode 100644 index 80fd246c2f30..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/error_response_body.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ErrorResponseBody(Model): - """Error Body contract. - - :param code: Service-defined error code. This code serves as a sub-status - for the HTTP error code specified in the response. - :type code: str - :param message: Human-readable representation of the error. - :type message: str - :param details: The list of invalid fields send in request, in case of - validation error. - :type details: list[~azure.mgmt.apimanagement.models.ErrorFieldContract] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorFieldContract]'}, - } - - def __init__(self, **kwargs): - super(ErrorResponseBody, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.details = kwargs.get('details', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/error_response_body_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/error_response_body_py3.py deleted file mode 100644 index 1c8dedf4ed1b..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/error_response_body_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ErrorResponseBody(Model): - """Error Body contract. - - :param code: Service-defined error code. This code serves as a sub-status - for the HTTP error code specified in the response. - :type code: str - :param message: Human-readable representation of the error. - :type message: str - :param details: The list of invalid fields send in request, in case of - validation error. - :type details: list[~azure.mgmt.apimanagement.models.ErrorFieldContract] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorFieldContract]'}, - } - - def __init__(self, *, code: str=None, message: str=None, details=None, **kwargs) -> None: - super(ErrorResponseBody, self).__init__(**kwargs) - self.code = code - self.message = message - self.details = details diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/error_response_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/error_response_py3.py deleted file mode 100644 index 682261f414ec..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/error_response_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class ErrorResponse(Model): - """Error Response. - - :param code: Service-defined error code. This code serves as a sub-status - for the HTTP error code specified in the response. - :type code: str - :param message: Human-readable representation of the error. - :type message: str - :param details: The list of invalid fields send in request, in case of - validation error. - :type details: list[~azure.mgmt.apimanagement.models.ErrorFieldContract] - """ - - _attribute_map = { - 'code': {'key': 'error.code', 'type': 'str'}, - 'message': {'key': 'error.message', 'type': 'str'}, - 'details': {'key': 'error.details', 'type': '[ErrorFieldContract]'}, - } - - def __init__(self, *, code: str=None, message: str=None, details=None, **kwargs) -> None: - super(ErrorResponse, self).__init__(**kwargs) - self.code = code - self.message = message - self.details = details - - -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/generate_sso_url_result.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/generate_sso_url_result.py deleted file mode 100644 index 39df1288be36..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/generate_sso_url_result.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GenerateSsoUrlResult(Model): - """Generate SSO Url operations response details. - - :param value: Redirect Url containing the SSO URL value. - :type value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GenerateSsoUrlResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/generate_sso_url_result_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/generate_sso_url_result_py3.py deleted file mode 100644 index bc5404c9c47f..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/generate_sso_url_result_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GenerateSsoUrlResult(Model): - """Generate SSO Url operations response details. - - :param value: Redirect Url containing the SSO URL value. - :type value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, value: str=None, **kwargs) -> None: - super(GenerateSsoUrlResult, self).__init__(**kwargs) - self.value = value diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_contract.py deleted file mode 100644 index 89aad685c1e5..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_contract.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class GroupContract(Resource): - """Contract details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param display_name: Required. Group name. - :type display_name: str - :param description: Group description. Can contain HTML formatting tags. - :type description: str - :ivar built_in: true if the group is one of the three system groups - (Administrators, Developers, or Guests); otherwise false. - :vartype built_in: bool - :param group_contract_type: Group type. Possible values include: 'custom', - 'system', 'external' - :type group_contract_type: str or - ~azure.mgmt.apimanagement.models.GroupType - :param external_id: For external groups, this property contains the id of - the group from the external identity provider, e.g. for Azure Active - Directory `aad://.onmicrosoft.com/groups/`; - otherwise the value is null. - :type external_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'display_name': {'required': True, 'max_length': 300, 'min_length': 1}, - 'description': {'max_length': 1000}, - 'built_in': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'built_in': {'key': 'properties.builtIn', 'type': 'bool'}, - 'group_contract_type': {'key': 'properties.type', 'type': 'GroupType'}, - 'external_id': {'key': 'properties.externalId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GroupContract, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - self.description = kwargs.get('description', None) - self.built_in = None - self.group_contract_type = kwargs.get('group_contract_type', None) - self.external_id = kwargs.get('external_id', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_contract_paged.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_contract_paged.py deleted file mode 100644 index 04133d76cef6..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_contract_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class GroupContractPaged(Paged): - """ - A paging container for iterating over a list of :class:`GroupContract ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[GroupContract]'} - } - - def __init__(self, *args, **kwargs): - - super(GroupContractPaged, self).__init__(*args, **kwargs) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_contract_properties.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_contract_properties.py deleted file mode 100644 index a6cda94f8805..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_contract_properties.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GroupContractProperties(Model): - """Group contract Properties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param display_name: Required. Group name. - :type display_name: str - :param description: Group description. Can contain HTML formatting tags. - :type description: str - :ivar built_in: true if the group is one of the three system groups - (Administrators, Developers, or Guests); otherwise false. - :vartype built_in: bool - :param type: Group type. Possible values include: 'custom', 'system', - 'external' - :type type: str or ~azure.mgmt.apimanagement.models.GroupType - :param external_id: For external groups, this property contains the id of - the group from the external identity provider, e.g. for Azure Active - Directory `aad://.onmicrosoft.com/groups/`; - otherwise the value is null. - :type external_id: str - """ - - _validation = { - 'display_name': {'required': True, 'max_length': 300, 'min_length': 1}, - 'description': {'max_length': 1000}, - 'built_in': {'readonly': True}, - } - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'built_in': {'key': 'builtIn', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'GroupType'}, - 'external_id': {'key': 'externalId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GroupContractProperties, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - self.description = kwargs.get('description', None) - self.built_in = None - self.type = kwargs.get('type', None) - self.external_id = kwargs.get('external_id', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_contract_properties_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_contract_properties_py3.py deleted file mode 100644 index ab604b4e419b..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_contract_properties_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GroupContractProperties(Model): - """Group contract Properties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param display_name: Required. Group name. - :type display_name: str - :param description: Group description. Can contain HTML formatting tags. - :type description: str - :ivar built_in: true if the group is one of the three system groups - (Administrators, Developers, or Guests); otherwise false. - :vartype built_in: bool - :param type: Group type. Possible values include: 'custom', 'system', - 'external' - :type type: str or ~azure.mgmt.apimanagement.models.GroupType - :param external_id: For external groups, this property contains the id of - the group from the external identity provider, e.g. for Azure Active - Directory `aad://.onmicrosoft.com/groups/`; - otherwise the value is null. - :type external_id: str - """ - - _validation = { - 'display_name': {'required': True, 'max_length': 300, 'min_length': 1}, - 'description': {'max_length': 1000}, - 'built_in': {'readonly': True}, - } - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'built_in': {'key': 'builtIn', 'type': 'bool'}, - 'type': {'key': 'type', 'type': 'GroupType'}, - 'external_id': {'key': 'externalId', 'type': 'str'}, - } - - def __init__(self, *, display_name: str, description: str=None, type=None, external_id: str=None, **kwargs) -> None: - super(GroupContractProperties, self).__init__(**kwargs) - self.display_name = display_name - self.description = description - self.built_in = None - self.type = type - self.external_id = external_id diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_contract_py3.py deleted file mode 100644 index 5b2c78fbc9f4..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_contract_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class GroupContract(Resource): - """Contract details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param display_name: Required. Group name. - :type display_name: str - :param description: Group description. Can contain HTML formatting tags. - :type description: str - :ivar built_in: true if the group is one of the three system groups - (Administrators, Developers, or Guests); otherwise false. - :vartype built_in: bool - :param group_contract_type: Group type. Possible values include: 'custom', - 'system', 'external' - :type group_contract_type: str or - ~azure.mgmt.apimanagement.models.GroupType - :param external_id: For external groups, this property contains the id of - the group from the external identity provider, e.g. for Azure Active - Directory `aad://.onmicrosoft.com/groups/`; - otherwise the value is null. - :type external_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'display_name': {'required': True, 'max_length': 300, 'min_length': 1}, - 'description': {'max_length': 1000}, - 'built_in': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'built_in': {'key': 'properties.builtIn', 'type': 'bool'}, - 'group_contract_type': {'key': 'properties.type', 'type': 'GroupType'}, - 'external_id': {'key': 'properties.externalId', 'type': 'str'}, - } - - def __init__(self, *, display_name: str, description: str=None, group_contract_type=None, external_id: str=None, **kwargs) -> None: - super(GroupContract, self).__init__(**kwargs) - self.display_name = display_name - self.description = description - self.built_in = None - self.group_contract_type = group_contract_type - self.external_id = external_id diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_create_parameters.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_create_parameters.py deleted file mode 100644 index eeb0f54e9854..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_create_parameters.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GroupCreateParameters(Model): - """Parameters supplied to the Create Group operation. - - All required parameters must be populated in order to send to Azure. - - :param display_name: Required. Group name. - :type display_name: str - :param description: Group description. - :type description: str - :param type: Group type. Possible values include: 'custom', 'system', - 'external' - :type type: str or ~azure.mgmt.apimanagement.models.GroupType - :param external_id: Identifier of the external groups, this property - contains the id of the group from the external identity provider, e.g. for - Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. - :type external_id: str - """ - - _validation = { - 'display_name': {'required': True, 'max_length': 300, 'min_length': 1}, - } - - _attribute_map = { - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'GroupType'}, - 'external_id': {'key': 'properties.externalId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GroupCreateParameters, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - self.description = kwargs.get('description', None) - self.type = kwargs.get('type', None) - self.external_id = kwargs.get('external_id', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_create_parameters_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_create_parameters_py3.py deleted file mode 100644 index 5f6f2d22763d..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_create_parameters_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GroupCreateParameters(Model): - """Parameters supplied to the Create Group operation. - - All required parameters must be populated in order to send to Azure. - - :param display_name: Required. Group name. - :type display_name: str - :param description: Group description. - :type description: str - :param type: Group type. Possible values include: 'custom', 'system', - 'external' - :type type: str or ~azure.mgmt.apimanagement.models.GroupType - :param external_id: Identifier of the external groups, this property - contains the id of the group from the external identity provider, e.g. for - Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. - :type external_id: str - """ - - _validation = { - 'display_name': {'required': True, 'max_length': 300, 'min_length': 1}, - } - - _attribute_map = { - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'GroupType'}, - 'external_id': {'key': 'properties.externalId', 'type': 'str'}, - } - - def __init__(self, *, display_name: str, description: str=None, type=None, external_id: str=None, **kwargs) -> None: - super(GroupCreateParameters, self).__init__(**kwargs) - self.display_name = display_name - self.description = description - self.type = type - self.external_id = external_id diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_update_parameters.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_update_parameters.py deleted file mode 100644 index 34cb6c6a3b7d..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_update_parameters.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GroupUpdateParameters(Model): - """Parameters supplied to the Update Group operation. - - :param display_name: Group name. - :type display_name: str - :param description: Group description. - :type description: str - :param type: Group type. Possible values include: 'custom', 'system', - 'external' - :type type: str or ~azure.mgmt.apimanagement.models.GroupType - :param external_id: Identifier of the external groups, this property - contains the id of the group from the external identity provider, e.g. for - Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. - :type external_id: str - """ - - _validation = { - 'display_name': {'max_length': 300, 'min_length': 1}, - } - - _attribute_map = { - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'GroupType'}, - 'external_id': {'key': 'properties.externalId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GroupUpdateParameters, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - self.description = kwargs.get('description', None) - self.type = kwargs.get('type', None) - self.external_id = kwargs.get('external_id', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_update_parameters_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_update_parameters_py3.py deleted file mode 100644 index 16aee8d02966..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/group_update_parameters_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GroupUpdateParameters(Model): - """Parameters supplied to the Update Group operation. - - :param display_name: Group name. - :type display_name: str - :param description: Group description. - :type description: str - :param type: Group type. Possible values include: 'custom', 'system', - 'external' - :type type: str or ~azure.mgmt.apimanagement.models.GroupType - :param external_id: Identifier of the external groups, this property - contains the id of the group from the external identity provider, e.g. for - Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. - :type external_id: str - """ - - _validation = { - 'display_name': {'max_length': 300, 'min_length': 1}, - } - - _attribute_map = { - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'GroupType'}, - 'external_id': {'key': 'properties.externalId', 'type': 'str'}, - } - - def __init__(self, *, display_name: str=None, description: str=None, type=None, external_id: str=None, **kwargs) -> None: - super(GroupUpdateParameters, self).__init__(**kwargs) - self.display_name = display_name - self.description = description - self.type = type - self.external_id = external_id diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/hostname_configuration.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/hostname_configuration.py deleted file mode 100644 index 0c0dcfc232bb..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/hostname_configuration.py +++ /dev/null @@ -1,76 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HostnameConfiguration(Model): - """Custom hostname configuration. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Hostname type. Possible values include: 'Proxy', - 'Portal', 'Management', 'Scm', 'DeveloperPortal' - :type type: str or ~azure.mgmt.apimanagement.models.HostnameType - :param host_name: Required. Hostname to configure on the Api Management - service. - :type host_name: str - :param key_vault_id: Url to the KeyVault Secret containing the Ssl - Certificate. If absolute Url containing version is provided, auto-update - of ssl certificate will not work. This requires Api Management service to - be configured with MSI. The secret should be of type - *application/x-pkcs12* - :type key_vault_id: str - :param encoded_certificate: Base64 Encoded certificate. - :type encoded_certificate: str - :param certificate_password: Certificate Password. - :type certificate_password: str - :param default_ssl_binding: Specify true to setup the certificate - associated with this Hostname as the Default SSL Certificate. If a client - does not send the SNI header, then this will be the certificate that will - be challenged. The property is useful if a service has multiple custom - hostname enabled and it needs to decide on the default ssl certificate. - The setting only applied to Proxy Hostname Type. Default value: False . - :type default_ssl_binding: bool - :param negotiate_client_certificate: Specify true to always negotiate - client certificate on the hostname. Default Value is false. Default value: - False . - :type negotiate_client_certificate: bool - :param certificate: Certificate information. - :type certificate: ~azure.mgmt.apimanagement.models.CertificateInformation - """ - - _validation = { - 'type': {'required': True}, - 'host_name': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'host_name': {'key': 'hostName', 'type': 'str'}, - 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, - 'encoded_certificate': {'key': 'encodedCertificate', 'type': 'str'}, - 'certificate_password': {'key': 'certificatePassword', 'type': 'str'}, - 'default_ssl_binding': {'key': 'defaultSslBinding', 'type': 'bool'}, - 'negotiate_client_certificate': {'key': 'negotiateClientCertificate', 'type': 'bool'}, - 'certificate': {'key': 'certificate', 'type': 'CertificateInformation'}, - } - - def __init__(self, **kwargs): - super(HostnameConfiguration, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.host_name = kwargs.get('host_name', None) - self.key_vault_id = kwargs.get('key_vault_id', None) - self.encoded_certificate = kwargs.get('encoded_certificate', None) - self.certificate_password = kwargs.get('certificate_password', None) - self.default_ssl_binding = kwargs.get('default_ssl_binding', False) - self.negotiate_client_certificate = kwargs.get('negotiate_client_certificate', False) - self.certificate = kwargs.get('certificate', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/hostname_configuration_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/hostname_configuration_py3.py deleted file mode 100644 index 8770649147a2..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/hostname_configuration_py3.py +++ /dev/null @@ -1,76 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HostnameConfiguration(Model): - """Custom hostname configuration. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Hostname type. Possible values include: 'Proxy', - 'Portal', 'Management', 'Scm', 'DeveloperPortal' - :type type: str or ~azure.mgmt.apimanagement.models.HostnameType - :param host_name: Required. Hostname to configure on the Api Management - service. - :type host_name: str - :param key_vault_id: Url to the KeyVault Secret containing the Ssl - Certificate. If absolute Url containing version is provided, auto-update - of ssl certificate will not work. This requires Api Management service to - be configured with MSI. The secret should be of type - *application/x-pkcs12* - :type key_vault_id: str - :param encoded_certificate: Base64 Encoded certificate. - :type encoded_certificate: str - :param certificate_password: Certificate Password. - :type certificate_password: str - :param default_ssl_binding: Specify true to setup the certificate - associated with this Hostname as the Default SSL Certificate. If a client - does not send the SNI header, then this will be the certificate that will - be challenged. The property is useful if a service has multiple custom - hostname enabled and it needs to decide on the default ssl certificate. - The setting only applied to Proxy Hostname Type. Default value: False . - :type default_ssl_binding: bool - :param negotiate_client_certificate: Specify true to always negotiate - client certificate on the hostname. Default Value is false. Default value: - False . - :type negotiate_client_certificate: bool - :param certificate: Certificate information. - :type certificate: ~azure.mgmt.apimanagement.models.CertificateInformation - """ - - _validation = { - 'type': {'required': True}, - 'host_name': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'host_name': {'key': 'hostName', 'type': 'str'}, - 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, - 'encoded_certificate': {'key': 'encodedCertificate', 'type': 'str'}, - 'certificate_password': {'key': 'certificatePassword', 'type': 'str'}, - 'default_ssl_binding': {'key': 'defaultSslBinding', 'type': 'bool'}, - 'negotiate_client_certificate': {'key': 'negotiateClientCertificate', 'type': 'bool'}, - 'certificate': {'key': 'certificate', 'type': 'CertificateInformation'}, - } - - def __init__(self, *, type, host_name: str, key_vault_id: str=None, encoded_certificate: str=None, certificate_password: str=None, default_ssl_binding: bool=False, negotiate_client_certificate: bool=False, certificate=None, **kwargs) -> None: - super(HostnameConfiguration, self).__init__(**kwargs) - self.type = type - self.host_name = host_name - self.key_vault_id = key_vault_id - self.encoded_certificate = encoded_certificate - self.certificate_password = certificate_password - self.default_ssl_binding = default_ssl_binding - self.negotiate_client_certificate = negotiate_client_certificate - self.certificate = certificate diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/http_message_diagnostic.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/http_message_diagnostic.py deleted file mode 100644 index 2c2651f31bb8..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/http_message_diagnostic.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HttpMessageDiagnostic(Model): - """Http message diagnostic settings. - - :param headers: Array of HTTP Headers to log. - :type headers: list[str] - :param body: Body logging settings. - :type body: ~azure.mgmt.apimanagement.models.BodyDiagnosticSettings - """ - - _attribute_map = { - 'headers': {'key': 'headers', 'type': '[str]'}, - 'body': {'key': 'body', 'type': 'BodyDiagnosticSettings'}, - } - - def __init__(self, **kwargs): - super(HttpMessageDiagnostic, self).__init__(**kwargs) - self.headers = kwargs.get('headers', None) - self.body = kwargs.get('body', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/http_message_diagnostic_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/http_message_diagnostic_py3.py deleted file mode 100644 index 28171eee4cd7..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/http_message_diagnostic_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HttpMessageDiagnostic(Model): - """Http message diagnostic settings. - - :param headers: Array of HTTP Headers to log. - :type headers: list[str] - :param body: Body logging settings. - :type body: ~azure.mgmt.apimanagement.models.BodyDiagnosticSettings - """ - - _attribute_map = { - 'headers': {'key': 'headers', 'type': '[str]'}, - 'body': {'key': 'body', 'type': 'BodyDiagnosticSettings'}, - } - - def __init__(self, *, headers=None, body=None, **kwargs) -> None: - super(HttpMessageDiagnostic, self).__init__(**kwargs) - self.headers = headers - self.body = body diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_base_parameters.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_base_parameters.py deleted file mode 100644 index 0db06fcfcf1e..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_base_parameters.py +++ /dev/null @@ -1,67 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IdentityProviderBaseParameters(Model): - """Identity Provider Base Parameter Properties. - - :param type: Identity Provider Type identifier. Possible values include: - 'facebook', 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' - :type type: str or ~azure.mgmt.apimanagement.models.IdentityProviderType - :param allowed_tenants: List of Allowed Tenants when configuring Azure - Active Directory login. - :type allowed_tenants: list[str] - :param authority: OpenID Connect discovery endpoint hostname for AAD or - AAD B2C. - :type authority: str - :param signup_policy_name: Signup Policy Name. Only applies to AAD B2C - Identity Provider. - :type signup_policy_name: str - :param signin_policy_name: Signin Policy Name. Only applies to AAD B2C - Identity Provider. - :type signin_policy_name: str - :param profile_editing_policy_name: Profile Editing Policy Name. Only - applies to AAD B2C Identity Provider. - :type profile_editing_policy_name: str - :param password_reset_policy_name: Password Reset Policy Name. Only - applies to AAD B2C Identity Provider. - :type password_reset_policy_name: str - """ - - _validation = { - 'allowed_tenants': {'max_items': 32}, - 'signup_policy_name': {'min_length': 1}, - 'signin_policy_name': {'min_length': 1}, - 'profile_editing_policy_name': {'min_length': 1}, - 'password_reset_policy_name': {'min_length': 1}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'allowed_tenants': {'key': 'allowedTenants', 'type': '[str]'}, - 'authority': {'key': 'authority', 'type': 'str'}, - 'signup_policy_name': {'key': 'signupPolicyName', 'type': 'str'}, - 'signin_policy_name': {'key': 'signinPolicyName', 'type': 'str'}, - 'profile_editing_policy_name': {'key': 'profileEditingPolicyName', 'type': 'str'}, - 'password_reset_policy_name': {'key': 'passwordResetPolicyName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IdentityProviderBaseParameters, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.allowed_tenants = kwargs.get('allowed_tenants', None) - self.authority = kwargs.get('authority', None) - self.signup_policy_name = kwargs.get('signup_policy_name', None) - self.signin_policy_name = kwargs.get('signin_policy_name', None) - self.profile_editing_policy_name = kwargs.get('profile_editing_policy_name', None) - self.password_reset_policy_name = kwargs.get('password_reset_policy_name', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_base_parameters_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_base_parameters_py3.py deleted file mode 100644 index e29979994684..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_base_parameters_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IdentityProviderBaseParameters(Model): - """Identity Provider Base Parameter Properties. - - :param type: Identity Provider Type identifier. Possible values include: - 'facebook', 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' - :type type: str or ~azure.mgmt.apimanagement.models.IdentityProviderType - :param allowed_tenants: List of Allowed Tenants when configuring Azure - Active Directory login. - :type allowed_tenants: list[str] - :param authority: OpenID Connect discovery endpoint hostname for AAD or - AAD B2C. - :type authority: str - :param signup_policy_name: Signup Policy Name. Only applies to AAD B2C - Identity Provider. - :type signup_policy_name: str - :param signin_policy_name: Signin Policy Name. Only applies to AAD B2C - Identity Provider. - :type signin_policy_name: str - :param profile_editing_policy_name: Profile Editing Policy Name. Only - applies to AAD B2C Identity Provider. - :type profile_editing_policy_name: str - :param password_reset_policy_name: Password Reset Policy Name. Only - applies to AAD B2C Identity Provider. - :type password_reset_policy_name: str - """ - - _validation = { - 'allowed_tenants': {'max_items': 32}, - 'signup_policy_name': {'min_length': 1}, - 'signin_policy_name': {'min_length': 1}, - 'profile_editing_policy_name': {'min_length': 1}, - 'password_reset_policy_name': {'min_length': 1}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'allowed_tenants': {'key': 'allowedTenants', 'type': '[str]'}, - 'authority': {'key': 'authority', 'type': 'str'}, - 'signup_policy_name': {'key': 'signupPolicyName', 'type': 'str'}, - 'signin_policy_name': {'key': 'signinPolicyName', 'type': 'str'}, - 'profile_editing_policy_name': {'key': 'profileEditingPolicyName', 'type': 'str'}, - 'password_reset_policy_name': {'key': 'passwordResetPolicyName', 'type': 'str'}, - } - - def __init__(self, *, type=None, allowed_tenants=None, authority: str=None, signup_policy_name: str=None, signin_policy_name: str=None, profile_editing_policy_name: str=None, password_reset_policy_name: str=None, **kwargs) -> None: - super(IdentityProviderBaseParameters, self).__init__(**kwargs) - self.type = type - self.allowed_tenants = allowed_tenants - self.authority = authority - self.signup_policy_name = signup_policy_name - self.signin_policy_name = signin_policy_name - self.profile_editing_policy_name = profile_editing_policy_name - self.password_reset_policy_name = password_reset_policy_name diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_contract.py deleted file mode 100644 index 6acc2feb7d52..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_contract.py +++ /dev/null @@ -1,101 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class IdentityProviderContract(Resource): - """Identity Provider details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param identity_provider_contract_type: Identity Provider Type identifier. - Possible values include: 'facebook', 'google', 'microsoft', 'twitter', - 'aad', 'aadB2C' - :type identity_provider_contract_type: str or - ~azure.mgmt.apimanagement.models.IdentityProviderType - :param allowed_tenants: List of Allowed Tenants when configuring Azure - Active Directory login. - :type allowed_tenants: list[str] - :param authority: OpenID Connect discovery endpoint hostname for AAD or - AAD B2C. - :type authority: str - :param signup_policy_name: Signup Policy Name. Only applies to AAD B2C - Identity Provider. - :type signup_policy_name: str - :param signin_policy_name: Signin Policy Name. Only applies to AAD B2C - Identity Provider. - :type signin_policy_name: str - :param profile_editing_policy_name: Profile Editing Policy Name. Only - applies to AAD B2C Identity Provider. - :type profile_editing_policy_name: str - :param password_reset_policy_name: Password Reset Policy Name. Only - applies to AAD B2C Identity Provider. - :type password_reset_policy_name: str - :param client_id: Required. Client Id of the Application in the external - Identity Provider. It is App ID for Facebook login, Client ID for Google - login, App ID for Microsoft. - :type client_id: str - :param client_secret: Required. Client secret of the Application in - external Identity Provider, used to authenticate login request. For - example, it is App Secret for Facebook login, API Key for Google login, - Public Key for Microsoft. - :type client_secret: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'allowed_tenants': {'max_items': 32}, - 'signup_policy_name': {'min_length': 1}, - 'signin_policy_name': {'min_length': 1}, - 'profile_editing_policy_name': {'min_length': 1}, - 'password_reset_policy_name': {'min_length': 1}, - 'client_id': {'required': True, 'min_length': 1}, - 'client_secret': {'required': True, 'min_length': 1}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'identity_provider_contract_type': {'key': 'properties.type', 'type': 'str'}, - 'allowed_tenants': {'key': 'properties.allowedTenants', 'type': '[str]'}, - 'authority': {'key': 'properties.authority', 'type': 'str'}, - 'signup_policy_name': {'key': 'properties.signupPolicyName', 'type': 'str'}, - 'signin_policy_name': {'key': 'properties.signinPolicyName', 'type': 'str'}, - 'profile_editing_policy_name': {'key': 'properties.profileEditingPolicyName', 'type': 'str'}, - 'password_reset_policy_name': {'key': 'properties.passwordResetPolicyName', 'type': 'str'}, - 'client_id': {'key': 'properties.clientId', 'type': 'str'}, - 'client_secret': {'key': 'properties.clientSecret', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IdentityProviderContract, self).__init__(**kwargs) - self.identity_provider_contract_type = kwargs.get('identity_provider_contract_type', None) - self.allowed_tenants = kwargs.get('allowed_tenants', None) - self.authority = kwargs.get('authority', None) - self.signup_policy_name = kwargs.get('signup_policy_name', None) - self.signin_policy_name = kwargs.get('signin_policy_name', None) - self.profile_editing_policy_name = kwargs.get('profile_editing_policy_name', None) - self.password_reset_policy_name = kwargs.get('password_reset_policy_name', None) - self.client_id = kwargs.get('client_id', None) - self.client_secret = kwargs.get('client_secret', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_contract_paged.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_contract_paged.py deleted file mode 100644 index 4c47b9094fc3..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_contract_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class IdentityProviderContractPaged(Paged): - """ - A paging container for iterating over a list of :class:`IdentityProviderContract ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[IdentityProviderContract]'} - } - - def __init__(self, *args, **kwargs): - - super(IdentityProviderContractPaged, self).__init__(*args, **kwargs) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_contract_py3.py deleted file mode 100644 index d27cad4a2691..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_contract_py3.py +++ /dev/null @@ -1,101 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class IdentityProviderContract(Resource): - """Identity Provider details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param identity_provider_contract_type: Identity Provider Type identifier. - Possible values include: 'facebook', 'google', 'microsoft', 'twitter', - 'aad', 'aadB2C' - :type identity_provider_contract_type: str or - ~azure.mgmt.apimanagement.models.IdentityProviderType - :param allowed_tenants: List of Allowed Tenants when configuring Azure - Active Directory login. - :type allowed_tenants: list[str] - :param authority: OpenID Connect discovery endpoint hostname for AAD or - AAD B2C. - :type authority: str - :param signup_policy_name: Signup Policy Name. Only applies to AAD B2C - Identity Provider. - :type signup_policy_name: str - :param signin_policy_name: Signin Policy Name. Only applies to AAD B2C - Identity Provider. - :type signin_policy_name: str - :param profile_editing_policy_name: Profile Editing Policy Name. Only - applies to AAD B2C Identity Provider. - :type profile_editing_policy_name: str - :param password_reset_policy_name: Password Reset Policy Name. Only - applies to AAD B2C Identity Provider. - :type password_reset_policy_name: str - :param client_id: Required. Client Id of the Application in the external - Identity Provider. It is App ID for Facebook login, Client ID for Google - login, App ID for Microsoft. - :type client_id: str - :param client_secret: Required. Client secret of the Application in - external Identity Provider, used to authenticate login request. For - example, it is App Secret for Facebook login, API Key for Google login, - Public Key for Microsoft. - :type client_secret: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'allowed_tenants': {'max_items': 32}, - 'signup_policy_name': {'min_length': 1}, - 'signin_policy_name': {'min_length': 1}, - 'profile_editing_policy_name': {'min_length': 1}, - 'password_reset_policy_name': {'min_length': 1}, - 'client_id': {'required': True, 'min_length': 1}, - 'client_secret': {'required': True, 'min_length': 1}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'identity_provider_contract_type': {'key': 'properties.type', 'type': 'str'}, - 'allowed_tenants': {'key': 'properties.allowedTenants', 'type': '[str]'}, - 'authority': {'key': 'properties.authority', 'type': 'str'}, - 'signup_policy_name': {'key': 'properties.signupPolicyName', 'type': 'str'}, - 'signin_policy_name': {'key': 'properties.signinPolicyName', 'type': 'str'}, - 'profile_editing_policy_name': {'key': 'properties.profileEditingPolicyName', 'type': 'str'}, - 'password_reset_policy_name': {'key': 'properties.passwordResetPolicyName', 'type': 'str'}, - 'client_id': {'key': 'properties.clientId', 'type': 'str'}, - 'client_secret': {'key': 'properties.clientSecret', 'type': 'str'}, - } - - def __init__(self, *, client_id: str, client_secret: str, identity_provider_contract_type=None, allowed_tenants=None, authority: str=None, signup_policy_name: str=None, signin_policy_name: str=None, profile_editing_policy_name: str=None, password_reset_policy_name: str=None, **kwargs) -> None: - super(IdentityProviderContract, self).__init__(**kwargs) - self.identity_provider_contract_type = identity_provider_contract_type - self.allowed_tenants = allowed_tenants - self.authority = authority - self.signup_policy_name = signup_policy_name - self.signin_policy_name = signin_policy_name - self.profile_editing_policy_name = profile_editing_policy_name - self.password_reset_policy_name = password_reset_policy_name - self.client_id = client_id - self.client_secret = client_secret diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_update_parameters.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_update_parameters.py deleted file mode 100644 index ef23abf0a398..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_update_parameters.py +++ /dev/null @@ -1,82 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IdentityProviderUpdateParameters(Model): - """Parameters supplied to update Identity Provider. - - :param type: Identity Provider Type identifier. Possible values include: - 'facebook', 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' - :type type: str or ~azure.mgmt.apimanagement.models.IdentityProviderType - :param allowed_tenants: List of Allowed Tenants when configuring Azure - Active Directory login. - :type allowed_tenants: list[str] - :param authority: OpenID Connect discovery endpoint hostname for AAD or - AAD B2C. - :type authority: str - :param signup_policy_name: Signup Policy Name. Only applies to AAD B2C - Identity Provider. - :type signup_policy_name: str - :param signin_policy_name: Signin Policy Name. Only applies to AAD B2C - Identity Provider. - :type signin_policy_name: str - :param profile_editing_policy_name: Profile Editing Policy Name. Only - applies to AAD B2C Identity Provider. - :type profile_editing_policy_name: str - :param password_reset_policy_name: Password Reset Policy Name. Only - applies to AAD B2C Identity Provider. - :type password_reset_policy_name: str - :param client_id: Client Id of the Application in the external Identity - Provider. It is App ID for Facebook login, Client ID for Google login, App - ID for Microsoft. - :type client_id: str - :param client_secret: Client secret of the Application in external - Identity Provider, used to authenticate login request. For example, it is - App Secret for Facebook login, API Key for Google login, Public Key for - Microsoft. - :type client_secret: str - """ - - _validation = { - 'allowed_tenants': {'max_items': 32}, - 'signup_policy_name': {'min_length': 1}, - 'signin_policy_name': {'min_length': 1}, - 'profile_editing_policy_name': {'min_length': 1}, - 'password_reset_policy_name': {'min_length': 1}, - 'client_id': {'min_length': 1}, - 'client_secret': {'min_length': 1}, - } - - _attribute_map = { - 'type': {'key': 'properties.type', 'type': 'str'}, - 'allowed_tenants': {'key': 'properties.allowedTenants', 'type': '[str]'}, - 'authority': {'key': 'properties.authority', 'type': 'str'}, - 'signup_policy_name': {'key': 'properties.signupPolicyName', 'type': 'str'}, - 'signin_policy_name': {'key': 'properties.signinPolicyName', 'type': 'str'}, - 'profile_editing_policy_name': {'key': 'properties.profileEditingPolicyName', 'type': 'str'}, - 'password_reset_policy_name': {'key': 'properties.passwordResetPolicyName', 'type': 'str'}, - 'client_id': {'key': 'properties.clientId', 'type': 'str'}, - 'client_secret': {'key': 'properties.clientSecret', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IdentityProviderUpdateParameters, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.allowed_tenants = kwargs.get('allowed_tenants', None) - self.authority = kwargs.get('authority', None) - self.signup_policy_name = kwargs.get('signup_policy_name', None) - self.signin_policy_name = kwargs.get('signin_policy_name', None) - self.profile_editing_policy_name = kwargs.get('profile_editing_policy_name', None) - self.password_reset_policy_name = kwargs.get('password_reset_policy_name', None) - self.client_id = kwargs.get('client_id', None) - self.client_secret = kwargs.get('client_secret', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_update_parameters_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_update_parameters_py3.py deleted file mode 100644 index 2cad5892a326..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/identity_provider_update_parameters_py3.py +++ /dev/null @@ -1,82 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IdentityProviderUpdateParameters(Model): - """Parameters supplied to update Identity Provider. - - :param type: Identity Provider Type identifier. Possible values include: - 'facebook', 'google', 'microsoft', 'twitter', 'aad', 'aadB2C' - :type type: str or ~azure.mgmt.apimanagement.models.IdentityProviderType - :param allowed_tenants: List of Allowed Tenants when configuring Azure - Active Directory login. - :type allowed_tenants: list[str] - :param authority: OpenID Connect discovery endpoint hostname for AAD or - AAD B2C. - :type authority: str - :param signup_policy_name: Signup Policy Name. Only applies to AAD B2C - Identity Provider. - :type signup_policy_name: str - :param signin_policy_name: Signin Policy Name. Only applies to AAD B2C - Identity Provider. - :type signin_policy_name: str - :param profile_editing_policy_name: Profile Editing Policy Name. Only - applies to AAD B2C Identity Provider. - :type profile_editing_policy_name: str - :param password_reset_policy_name: Password Reset Policy Name. Only - applies to AAD B2C Identity Provider. - :type password_reset_policy_name: str - :param client_id: Client Id of the Application in the external Identity - Provider. It is App ID for Facebook login, Client ID for Google login, App - ID for Microsoft. - :type client_id: str - :param client_secret: Client secret of the Application in external - Identity Provider, used to authenticate login request. For example, it is - App Secret for Facebook login, API Key for Google login, Public Key for - Microsoft. - :type client_secret: str - """ - - _validation = { - 'allowed_tenants': {'max_items': 32}, - 'signup_policy_name': {'min_length': 1}, - 'signin_policy_name': {'min_length': 1}, - 'profile_editing_policy_name': {'min_length': 1}, - 'password_reset_policy_name': {'min_length': 1}, - 'client_id': {'min_length': 1}, - 'client_secret': {'min_length': 1}, - } - - _attribute_map = { - 'type': {'key': 'properties.type', 'type': 'str'}, - 'allowed_tenants': {'key': 'properties.allowedTenants', 'type': '[str]'}, - 'authority': {'key': 'properties.authority', 'type': 'str'}, - 'signup_policy_name': {'key': 'properties.signupPolicyName', 'type': 'str'}, - 'signin_policy_name': {'key': 'properties.signinPolicyName', 'type': 'str'}, - 'profile_editing_policy_name': {'key': 'properties.profileEditingPolicyName', 'type': 'str'}, - 'password_reset_policy_name': {'key': 'properties.passwordResetPolicyName', 'type': 'str'}, - 'client_id': {'key': 'properties.clientId', 'type': 'str'}, - 'client_secret': {'key': 'properties.clientSecret', 'type': 'str'}, - } - - def __init__(self, *, type=None, allowed_tenants=None, authority: str=None, signup_policy_name: str=None, signin_policy_name: str=None, profile_editing_policy_name: str=None, password_reset_policy_name: str=None, client_id: str=None, client_secret: str=None, **kwargs) -> None: - super(IdentityProviderUpdateParameters, self).__init__(**kwargs) - self.type = type - self.allowed_tenants = allowed_tenants - self.authority = authority - self.signup_policy_name = signup_policy_name - self.signin_policy_name = signin_policy_name - self.profile_editing_policy_name = profile_editing_policy_name - self.password_reset_policy_name = password_reset_policy_name - self.client_id = client_id - self.client_secret = client_secret diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_attachment_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_attachment_contract.py deleted file mode 100644 index 3b45cdf7a4a3..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_attachment_contract.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class IssueAttachmentContract(Resource): - """Issue Attachment Contract details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param title: Required. Filename by which the binary data will be saved. - :type title: str - :param content_format: Required. Either 'link' if content is provided via - an HTTP link or the MIME type of the Base64-encoded binary data provided - in the 'content' property. - :type content_format: str - :param content: Required. An HTTP link or Base64-encoded binary data. - :type content: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'title': {'required': True}, - 'content_format': {'required': True}, - 'content': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'title': {'key': 'properties.title', 'type': 'str'}, - 'content_format': {'key': 'properties.contentFormat', 'type': 'str'}, - 'content': {'key': 'properties.content', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IssueAttachmentContract, self).__init__(**kwargs) - self.title = kwargs.get('title', None) - self.content_format = kwargs.get('content_format', None) - self.content = kwargs.get('content', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_attachment_contract_paged.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_attachment_contract_paged.py deleted file mode 100644 index 31f08fe12743..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_attachment_contract_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class IssueAttachmentContractPaged(Paged): - """ - A paging container for iterating over a list of :class:`IssueAttachmentContract ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[IssueAttachmentContract]'} - } - - def __init__(self, *args, **kwargs): - - super(IssueAttachmentContractPaged, self).__init__(*args, **kwargs) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_attachment_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_attachment_contract_py3.py deleted file mode 100644 index 6eda14e9e009..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_attachment_contract_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class IssueAttachmentContract(Resource): - """Issue Attachment Contract details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param title: Required. Filename by which the binary data will be saved. - :type title: str - :param content_format: Required. Either 'link' if content is provided via - an HTTP link or the MIME type of the Base64-encoded binary data provided - in the 'content' property. - :type content_format: str - :param content: Required. An HTTP link or Base64-encoded binary data. - :type content: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'title': {'required': True}, - 'content_format': {'required': True}, - 'content': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'title': {'key': 'properties.title', 'type': 'str'}, - 'content_format': {'key': 'properties.contentFormat', 'type': 'str'}, - 'content': {'key': 'properties.content', 'type': 'str'}, - } - - def __init__(self, *, title: str, content_format: str, content: str, **kwargs) -> None: - super(IssueAttachmentContract, self).__init__(**kwargs) - self.title = title - self.content_format = content_format - self.content = content diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_comment_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_comment_contract.py deleted file mode 100644 index edcad5812c6e..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_comment_contract.py +++ /dev/null @@ -1,59 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class IssueCommentContract(Resource): - """Issue Comment Contract details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param text: Required. Comment text. - :type text: str - :param created_date: Date and time when the comment was created. - :type created_date: datetime - :param user_id: Required. A resource identifier for the user who left the - comment. - :type user_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'text': {'required': True}, - 'user_id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'text': {'key': 'properties.text', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'user_id': {'key': 'properties.userId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IssueCommentContract, self).__init__(**kwargs) - self.text = kwargs.get('text', None) - self.created_date = kwargs.get('created_date', None) - self.user_id = kwargs.get('user_id', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_comment_contract_paged.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_comment_contract_paged.py deleted file mode 100644 index 4dc920095266..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_comment_contract_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class IssueCommentContractPaged(Paged): - """ - A paging container for iterating over a list of :class:`IssueCommentContract ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[IssueCommentContract]'} - } - - def __init__(self, *args, **kwargs): - - super(IssueCommentContractPaged, self).__init__(*args, **kwargs) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_comment_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_comment_contract_py3.py deleted file mode 100644 index 06b355047a92..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_comment_contract_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class IssueCommentContract(Resource): - """Issue Comment Contract details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param text: Required. Comment text. - :type text: str - :param created_date: Date and time when the comment was created. - :type created_date: datetime - :param user_id: Required. A resource identifier for the user who left the - comment. - :type user_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'text': {'required': True}, - 'user_id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'text': {'key': 'properties.text', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'user_id': {'key': 'properties.userId', 'type': 'str'}, - } - - def __init__(self, *, text: str, user_id: str, created_date=None, **kwargs) -> None: - super(IssueCommentContract, self).__init__(**kwargs) - self.text = text - self.created_date = created_date - self.user_id = user_id diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_contract.py deleted file mode 100644 index 7e9a0bb26e16..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_contract.py +++ /dev/null @@ -1,74 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class IssueContract(Resource): - """Issue Contract details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param created_date: Date and time when the issue was created. - :type created_date: datetime - :param state: Status of the issue. Possible values include: 'proposed', - 'open', 'removed', 'resolved', 'closed' - :type state: str or ~azure.mgmt.apimanagement.models.State - :param api_id: A resource identifier for the API the issue was created - for. - :type api_id: str - :param title: Required. The issue title. - :type title: str - :param description: Required. Text describing the issue. - :type description: str - :param user_id: Required. A resource identifier for the user created the - issue. - :type user_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'title': {'required': True}, - 'description': {'required': True}, - 'user_id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'api_id': {'key': 'properties.apiId', 'type': 'str'}, - 'title': {'key': 'properties.title', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'user_id': {'key': 'properties.userId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IssueContract, self).__init__(**kwargs) - self.created_date = kwargs.get('created_date', None) - self.state = kwargs.get('state', None) - self.api_id = kwargs.get('api_id', None) - self.title = kwargs.get('title', None) - self.description = kwargs.get('description', None) - self.user_id = kwargs.get('user_id', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_contract_base_properties.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_contract_base_properties.py deleted file mode 100644 index 8bf825f0f0de..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_contract_base_properties.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IssueContractBaseProperties(Model): - """Issue contract Base Properties. - - :param created_date: Date and time when the issue was created. - :type created_date: datetime - :param state: Status of the issue. Possible values include: 'proposed', - 'open', 'removed', 'resolved', 'closed' - :type state: str or ~azure.mgmt.apimanagement.models.State - :param api_id: A resource identifier for the API the issue was created - for. - :type api_id: str - """ - - _attribute_map = { - 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, - 'state': {'key': 'state', 'type': 'str'}, - 'api_id': {'key': 'apiId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IssueContractBaseProperties, self).__init__(**kwargs) - self.created_date = kwargs.get('created_date', None) - self.state = kwargs.get('state', None) - self.api_id = kwargs.get('api_id', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_contract_base_properties_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_contract_base_properties_py3.py deleted file mode 100644 index 30126d7f0845..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_contract_base_properties_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IssueContractBaseProperties(Model): - """Issue contract Base Properties. - - :param created_date: Date and time when the issue was created. - :type created_date: datetime - :param state: Status of the issue. Possible values include: 'proposed', - 'open', 'removed', 'resolved', 'closed' - :type state: str or ~azure.mgmt.apimanagement.models.State - :param api_id: A resource identifier for the API the issue was created - for. - :type api_id: str - """ - - _attribute_map = { - 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, - 'state': {'key': 'state', 'type': 'str'}, - 'api_id': {'key': 'apiId', 'type': 'str'}, - } - - def __init__(self, *, created_date=None, state=None, api_id: str=None, **kwargs) -> None: - super(IssueContractBaseProperties, self).__init__(**kwargs) - self.created_date = created_date - self.state = state - self.api_id = api_id diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_contract_paged.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_contract_paged.py deleted file mode 100644 index fd9375bcab14..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_contract_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class IssueContractPaged(Paged): - """ - A paging container for iterating over a list of :class:`IssueContract ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[IssueContract]'} - } - - def __init__(self, *args, **kwargs): - - super(IssueContractPaged, self).__init__(*args, **kwargs) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_contract_py3.py deleted file mode 100644 index f635214f5b15..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_contract_py3.py +++ /dev/null @@ -1,74 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class IssueContract(Resource): - """Issue Contract details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param created_date: Date and time when the issue was created. - :type created_date: datetime - :param state: Status of the issue. Possible values include: 'proposed', - 'open', 'removed', 'resolved', 'closed' - :type state: str or ~azure.mgmt.apimanagement.models.State - :param api_id: A resource identifier for the API the issue was created - for. - :type api_id: str - :param title: Required. The issue title. - :type title: str - :param description: Required. Text describing the issue. - :type description: str - :param user_id: Required. A resource identifier for the user created the - issue. - :type user_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'title': {'required': True}, - 'description': {'required': True}, - 'user_id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'api_id': {'key': 'properties.apiId', 'type': 'str'}, - 'title': {'key': 'properties.title', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'user_id': {'key': 'properties.userId', 'type': 'str'}, - } - - def __init__(self, *, title: str, description: str, user_id: str, created_date=None, state=None, api_id: str=None, **kwargs) -> None: - super(IssueContract, self).__init__(**kwargs) - self.created_date = created_date - self.state = state - self.api_id = api_id - self.title = title - self.description = description - self.user_id = user_id diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_update_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_update_contract.py deleted file mode 100644 index cd0c09f71fe8..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_update_contract.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IssueUpdateContract(Model): - """Issue update Parameters. - - :param created_date: Date and time when the issue was created. - :type created_date: datetime - :param state: Status of the issue. Possible values include: 'proposed', - 'open', 'removed', 'resolved', 'closed' - :type state: str or ~azure.mgmt.apimanagement.models.State - :param api_id: A resource identifier for the API the issue was created - for. - :type api_id: str - :param title: The issue title. - :type title: str - :param description: Text describing the issue. - :type description: str - :param user_id: A resource identifier for the user created the issue. - :type user_id: str - """ - - _attribute_map = { - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'api_id': {'key': 'properties.apiId', 'type': 'str'}, - 'title': {'key': 'properties.title', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'user_id': {'key': 'properties.userId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IssueUpdateContract, self).__init__(**kwargs) - self.created_date = kwargs.get('created_date', None) - self.state = kwargs.get('state', None) - self.api_id = kwargs.get('api_id', None) - self.title = kwargs.get('title', None) - self.description = kwargs.get('description', None) - self.user_id = kwargs.get('user_id', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_update_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_update_contract_py3.py deleted file mode 100644 index adaf82829d94..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/issue_update_contract_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IssueUpdateContract(Model): - """Issue update Parameters. - - :param created_date: Date and time when the issue was created. - :type created_date: datetime - :param state: Status of the issue. Possible values include: 'proposed', - 'open', 'removed', 'resolved', 'closed' - :type state: str or ~azure.mgmt.apimanagement.models.State - :param api_id: A resource identifier for the API the issue was created - for. - :type api_id: str - :param title: The issue title. - :type title: str - :param description: Text describing the issue. - :type description: str - :param user_id: A resource identifier for the user created the issue. - :type user_id: str - """ - - _attribute_map = { - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'api_id': {'key': 'properties.apiId', 'type': 'str'}, - 'title': {'key': 'properties.title', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'user_id': {'key': 'properties.userId', 'type': 'str'}, - } - - def __init__(self, *, created_date=None, state=None, api_id: str=None, title: str=None, description: str=None, user_id: str=None, **kwargs) -> None: - super(IssueUpdateContract, self).__init__(**kwargs) - self.created_date = created_date - self.state = state - self.api_id = api_id - self.title = title - self.description = description - self.user_id = user_id diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/logger_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/logger_contract.py deleted file mode 100644 index 16213cac73bb..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/logger_contract.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class LoggerContract(Resource): - """Logger details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param logger_type: Required. Logger type. Possible values include: - 'azureEventHub', 'applicationInsights' - :type logger_type: str or ~azure.mgmt.apimanagement.models.LoggerType - :param description: Logger description. - :type description: str - :param credentials: Required. The name and SendRule connection string of - the event hub for azureEventHub logger. - Instrumentation key for applicationInsights logger. - :type credentials: dict[str, str] - :param is_buffered: Whether records are buffered in the logger before - publishing. Default is assumed to be true. - :type is_buffered: bool - :param resource_id: Azure Resource Id of a log target (either Azure Event - Hub resource or Azure Application Insights resource). - :type resource_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'logger_type': {'required': True}, - 'description': {'max_length': 256}, - 'credentials': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'logger_type': {'key': 'properties.loggerType', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'credentials': {'key': 'properties.credentials', 'type': '{str}'}, - 'is_buffered': {'key': 'properties.isBuffered', 'type': 'bool'}, - 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LoggerContract, self).__init__(**kwargs) - self.logger_type = kwargs.get('logger_type', None) - self.description = kwargs.get('description', None) - self.credentials = kwargs.get('credentials', None) - self.is_buffered = kwargs.get('is_buffered', None) - self.resource_id = kwargs.get('resource_id', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/logger_contract_paged.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/logger_contract_paged.py deleted file mode 100644 index e43659aa7736..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/logger_contract_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class LoggerContractPaged(Paged): - """ - A paging container for iterating over a list of :class:`LoggerContract ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[LoggerContract]'} - } - - def __init__(self, *args, **kwargs): - - super(LoggerContractPaged, self).__init__(*args, **kwargs) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/logger_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/logger_contract_py3.py deleted file mode 100644 index 59ceb33e5ea3..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/logger_contract_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class LoggerContract(Resource): - """Logger details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param logger_type: Required. Logger type. Possible values include: - 'azureEventHub', 'applicationInsights' - :type logger_type: str or ~azure.mgmt.apimanagement.models.LoggerType - :param description: Logger description. - :type description: str - :param credentials: Required. The name and SendRule connection string of - the event hub for azureEventHub logger. - Instrumentation key for applicationInsights logger. - :type credentials: dict[str, str] - :param is_buffered: Whether records are buffered in the logger before - publishing. Default is assumed to be true. - :type is_buffered: bool - :param resource_id: Azure Resource Id of a log target (either Azure Event - Hub resource or Azure Application Insights resource). - :type resource_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'logger_type': {'required': True}, - 'description': {'max_length': 256}, - 'credentials': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'logger_type': {'key': 'properties.loggerType', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'credentials': {'key': 'properties.credentials', 'type': '{str}'}, - 'is_buffered': {'key': 'properties.isBuffered', 'type': 'bool'}, - 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, - } - - def __init__(self, *, logger_type, credentials, description: str=None, is_buffered: bool=None, resource_id: str=None, **kwargs) -> None: - super(LoggerContract, self).__init__(**kwargs) - self.logger_type = logger_type - self.description = description - self.credentials = credentials - self.is_buffered = is_buffered - self.resource_id = resource_id diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/logger_update_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/logger_update_contract.py deleted file mode 100644 index addfa18e243f..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/logger_update_contract.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LoggerUpdateContract(Model): - """Logger update contract. - - :param logger_type: Logger type. Possible values include: 'azureEventHub', - 'applicationInsights' - :type logger_type: str or ~azure.mgmt.apimanagement.models.LoggerType - :param description: Logger description. - :type description: str - :param credentials: Logger credentials. - :type credentials: dict[str, str] - :param is_buffered: Whether records are buffered in the logger before - publishing. Default is assumed to be true. - :type is_buffered: bool - """ - - _attribute_map = { - 'logger_type': {'key': 'properties.loggerType', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'credentials': {'key': 'properties.credentials', 'type': '{str}'}, - 'is_buffered': {'key': 'properties.isBuffered', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(LoggerUpdateContract, self).__init__(**kwargs) - self.logger_type = kwargs.get('logger_type', None) - self.description = kwargs.get('description', None) - self.credentials = kwargs.get('credentials', None) - self.is_buffered = kwargs.get('is_buffered', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/logger_update_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/logger_update_contract_py3.py deleted file mode 100644 index c87234102e67..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/logger_update_contract_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LoggerUpdateContract(Model): - """Logger update contract. - - :param logger_type: Logger type. Possible values include: 'azureEventHub', - 'applicationInsights' - :type logger_type: str or ~azure.mgmt.apimanagement.models.LoggerType - :param description: Logger description. - :type description: str - :param credentials: Logger credentials. - :type credentials: dict[str, str] - :param is_buffered: Whether records are buffered in the logger before - publishing. Default is assumed to be true. - :type is_buffered: bool - """ - - _attribute_map = { - 'logger_type': {'key': 'properties.loggerType', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'credentials': {'key': 'properties.credentials', 'type': '{str}'}, - 'is_buffered': {'key': 'properties.isBuffered', 'type': 'bool'}, - } - - def __init__(self, *, logger_type=None, description: str=None, credentials=None, is_buffered: bool=None, **kwargs) -> None: - super(LoggerUpdateContract, self).__init__(**kwargs) - self.logger_type = logger_type - self.description = description - self.credentials = credentials - self.is_buffered = is_buffered diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/network_status_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/network_status_contract.py deleted file mode 100644 index 93d8cadb8452..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/network_status_contract.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkStatusContract(Model): - """Network Status details. - - All required parameters must be populated in order to send to Azure. - - :param dns_servers: Required. Gets the list of DNS servers IPV4 addresses. - :type dns_servers: list[str] - :param connectivity_status: Required. Gets the list of Connectivity Status - to the Resources on which the service depends upon. - :type connectivity_status: - list[~azure.mgmt.apimanagement.models.ConnectivityStatusContract] - """ - - _validation = { - 'dns_servers': {'required': True}, - 'connectivity_status': {'required': True}, - } - - _attribute_map = { - 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, - 'connectivity_status': {'key': 'connectivityStatus', 'type': '[ConnectivityStatusContract]'}, - } - - def __init__(self, **kwargs): - super(NetworkStatusContract, self).__init__(**kwargs) - self.dns_servers = kwargs.get('dns_servers', None) - self.connectivity_status = kwargs.get('connectivity_status', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/network_status_contract_by_location.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/network_status_contract_by_location.py deleted file mode 100644 index d7268e2806dc..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/network_status_contract_by_location.py +++ /dev/null @@ -1,37 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkStatusContractByLocation(Model): - """Network Status in the Location. - - :param location: Location of service - :type location: str - :param network_status: Network status in Location - :type network_status: - ~azure.mgmt.apimanagement.models.NetworkStatusContract - """ - - _validation = { - 'location': {'min_length': 1}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'network_status': {'key': 'networkStatus', 'type': 'NetworkStatusContract'}, - } - - def __init__(self, **kwargs): - super(NetworkStatusContractByLocation, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.network_status = kwargs.get('network_status', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/network_status_contract_by_location_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/network_status_contract_by_location_py3.py deleted file mode 100644 index 8179a33cc8bb..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/network_status_contract_by_location_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkStatusContractByLocation(Model): - """Network Status in the Location. - - :param location: Location of service - :type location: str - :param network_status: Network status in Location - :type network_status: - ~azure.mgmt.apimanagement.models.NetworkStatusContract - """ - - _validation = { - 'location': {'min_length': 1}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'network_status': {'key': 'networkStatus', 'type': 'NetworkStatusContract'}, - } - - def __init__(self, *, location: str=None, network_status=None, **kwargs) -> None: - super(NetworkStatusContractByLocation, self).__init__(**kwargs) - self.location = location - self.network_status = network_status diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/network_status_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/network_status_contract_py3.py deleted file mode 100644 index 42847b9bee85..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/network_status_contract_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkStatusContract(Model): - """Network Status details. - - All required parameters must be populated in order to send to Azure. - - :param dns_servers: Required. Gets the list of DNS servers IPV4 addresses. - :type dns_servers: list[str] - :param connectivity_status: Required. Gets the list of Connectivity Status - to the Resources on which the service depends upon. - :type connectivity_status: - list[~azure.mgmt.apimanagement.models.ConnectivityStatusContract] - """ - - _validation = { - 'dns_servers': {'required': True}, - 'connectivity_status': {'required': True}, - } - - _attribute_map = { - 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, - 'connectivity_status': {'key': 'connectivityStatus', 'type': '[ConnectivityStatusContract]'}, - } - - def __init__(self, *, dns_servers, connectivity_status, **kwargs) -> None: - super(NetworkStatusContract, self).__init__(**kwargs) - self.dns_servers = dns_servers - self.connectivity_status = connectivity_status diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/notification_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/notification_contract.py deleted file mode 100644 index 0a61e503deae..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/notification_contract.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class NotificationContract(Resource): - """Notification details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param title: Required. Title of the Notification. - :type title: str - :param description: Description of the Notification. - :type description: str - :param recipients: Recipient Parameter values. - :type recipients: - ~azure.mgmt.apimanagement.models.RecipientsContractProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'title': {'required': True, 'max_length': 1000, 'min_length': 1}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'title': {'key': 'properties.title', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'recipients': {'key': 'properties.recipients', 'type': 'RecipientsContractProperties'}, - } - - def __init__(self, **kwargs): - super(NotificationContract, self).__init__(**kwargs) - self.title = kwargs.get('title', None) - self.description = kwargs.get('description', None) - self.recipients = kwargs.get('recipients', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/notification_contract_paged.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/notification_contract_paged.py deleted file mode 100644 index be23f722f720..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/notification_contract_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class NotificationContractPaged(Paged): - """ - A paging container for iterating over a list of :class:`NotificationContract ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[NotificationContract]'} - } - - def __init__(self, *args, **kwargs): - - super(NotificationContractPaged, self).__init__(*args, **kwargs) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/notification_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/notification_contract_py3.py deleted file mode 100644 index bcc72b618ddf..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/notification_contract_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class NotificationContract(Resource): - """Notification details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param title: Required. Title of the Notification. - :type title: str - :param description: Description of the Notification. - :type description: str - :param recipients: Recipient Parameter values. - :type recipients: - ~azure.mgmt.apimanagement.models.RecipientsContractProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'title': {'required': True, 'max_length': 1000, 'min_length': 1}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'title': {'key': 'properties.title', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'recipients': {'key': 'properties.recipients', 'type': 'RecipientsContractProperties'}, - } - - def __init__(self, *, title: str, description: str=None, recipients=None, **kwargs) -> None: - super(NotificationContract, self).__init__(**kwargs) - self.title = title - self.description = description - self.recipients = recipients diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/oauth2_authentication_settings_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/oauth2_authentication_settings_contract.py deleted file mode 100644 index ed8482767874..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/oauth2_authentication_settings_contract.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OAuth2AuthenticationSettingsContract(Model): - """API OAuth2 Authentication settings details. - - :param authorization_server_id: OAuth authorization server identifier. - :type authorization_server_id: str - :param scope: operations scope. - :type scope: str - """ - - _attribute_map = { - 'authorization_server_id': {'key': 'authorizationServerId', 'type': 'str'}, - 'scope': {'key': 'scope', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OAuth2AuthenticationSettingsContract, self).__init__(**kwargs) - self.authorization_server_id = kwargs.get('authorization_server_id', None) - self.scope = kwargs.get('scope', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/oauth2_authentication_settings_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/oauth2_authentication_settings_contract_py3.py deleted file mode 100644 index f0a1eac4ca71..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/oauth2_authentication_settings_contract_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OAuth2AuthenticationSettingsContract(Model): - """API OAuth2 Authentication settings details. - - :param authorization_server_id: OAuth authorization server identifier. - :type authorization_server_id: str - :param scope: operations scope. - :type scope: str - """ - - _attribute_map = { - 'authorization_server_id': {'key': 'authorizationServerId', 'type': 'str'}, - 'scope': {'key': 'scope', 'type': 'str'}, - } - - def __init__(self, *, authorization_server_id: str=None, scope: str=None, **kwargs) -> None: - super(OAuth2AuthenticationSettingsContract, self).__init__(**kwargs) - self.authorization_server_id = authorization_server_id - self.scope = scope diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/open_id_authentication_settings_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/open_id_authentication_settings_contract.py deleted file mode 100644 index 4e5470794460..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/open_id_authentication_settings_contract.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OpenIdAuthenticationSettingsContract(Model): - """API OAuth2 Authentication settings details. - - :param openid_provider_id: OAuth authorization server identifier. - :type openid_provider_id: str - :param bearer_token_sending_methods: How to send token to the server. - :type bearer_token_sending_methods: list[str or - ~azure.mgmt.apimanagement.models.BearerTokenSendingMethods] - """ - - _attribute_map = { - 'openid_provider_id': {'key': 'openidProviderId', 'type': 'str'}, - 'bearer_token_sending_methods': {'key': 'bearerTokenSendingMethods', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(OpenIdAuthenticationSettingsContract, self).__init__(**kwargs) - self.openid_provider_id = kwargs.get('openid_provider_id', None) - self.bearer_token_sending_methods = kwargs.get('bearer_token_sending_methods', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/open_id_authentication_settings_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/open_id_authentication_settings_contract_py3.py deleted file mode 100644 index 112a077b9833..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/open_id_authentication_settings_contract_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OpenIdAuthenticationSettingsContract(Model): - """API OAuth2 Authentication settings details. - - :param openid_provider_id: OAuth authorization server identifier. - :type openid_provider_id: str - :param bearer_token_sending_methods: How to send token to the server. - :type bearer_token_sending_methods: list[str or - ~azure.mgmt.apimanagement.models.BearerTokenSendingMethods] - """ - - _attribute_map = { - 'openid_provider_id': {'key': 'openidProviderId', 'type': 'str'}, - 'bearer_token_sending_methods': {'key': 'bearerTokenSendingMethods', 'type': '[str]'}, - } - - def __init__(self, *, openid_provider_id: str=None, bearer_token_sending_methods=None, **kwargs) -> None: - super(OpenIdAuthenticationSettingsContract, self).__init__(**kwargs) - self.openid_provider_id = openid_provider_id - self.bearer_token_sending_methods = bearer_token_sending_methods diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/openid_connect_provider_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/openid_connect_provider_contract.py deleted file mode 100644 index 0ac98bb10f48..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/openid_connect_provider_contract.py +++ /dev/null @@ -1,69 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class OpenidConnectProviderContract(Resource): - """OpenId Connect Provider details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param display_name: Required. User-friendly OpenID Connect Provider name. - :type display_name: str - :param description: User-friendly description of OpenID Connect Provider. - :type description: str - :param metadata_endpoint: Required. Metadata endpoint URI. - :type metadata_endpoint: str - :param client_id: Required. Client ID of developer console which is the - client application. - :type client_id: str - :param client_secret: Client Secret of developer console which is the - client application. - :type client_secret: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'display_name': {'required': True, 'max_length': 50}, - 'metadata_endpoint': {'required': True}, - 'client_id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'metadata_endpoint': {'key': 'properties.metadataEndpoint', 'type': 'str'}, - 'client_id': {'key': 'properties.clientId', 'type': 'str'}, - 'client_secret': {'key': 'properties.clientSecret', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OpenidConnectProviderContract, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - self.description = kwargs.get('description', None) - self.metadata_endpoint = kwargs.get('metadata_endpoint', None) - self.client_id = kwargs.get('client_id', None) - self.client_secret = kwargs.get('client_secret', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/openid_connect_provider_contract_paged.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/openid_connect_provider_contract_paged.py deleted file mode 100644 index ade0ae119282..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/openid_connect_provider_contract_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OpenidConnectProviderContractPaged(Paged): - """ - A paging container for iterating over a list of :class:`OpenidConnectProviderContract ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OpenidConnectProviderContract]'} - } - - def __init__(self, *args, **kwargs): - - super(OpenidConnectProviderContractPaged, self).__init__(*args, **kwargs) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/openid_connect_provider_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/openid_connect_provider_contract_py3.py deleted file mode 100644 index cbbc85bde124..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/openid_connect_provider_contract_py3.py +++ /dev/null @@ -1,69 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class OpenidConnectProviderContract(Resource): - """OpenId Connect Provider details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param display_name: Required. User-friendly OpenID Connect Provider name. - :type display_name: str - :param description: User-friendly description of OpenID Connect Provider. - :type description: str - :param metadata_endpoint: Required. Metadata endpoint URI. - :type metadata_endpoint: str - :param client_id: Required. Client ID of developer console which is the - client application. - :type client_id: str - :param client_secret: Client Secret of developer console which is the - client application. - :type client_secret: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'display_name': {'required': True, 'max_length': 50}, - 'metadata_endpoint': {'required': True}, - 'client_id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'metadata_endpoint': {'key': 'properties.metadataEndpoint', 'type': 'str'}, - 'client_id': {'key': 'properties.clientId', 'type': 'str'}, - 'client_secret': {'key': 'properties.clientSecret', 'type': 'str'}, - } - - def __init__(self, *, display_name: str, metadata_endpoint: str, client_id: str, description: str=None, client_secret: str=None, **kwargs) -> None: - super(OpenidConnectProviderContract, self).__init__(**kwargs) - self.display_name = display_name - self.description = description - self.metadata_endpoint = metadata_endpoint - self.client_id = client_id - self.client_secret = client_secret diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/openid_connect_provider_update_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/openid_connect_provider_update_contract.py deleted file mode 100644 index ff37d87ccedd..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/openid_connect_provider_update_contract.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OpenidConnectProviderUpdateContract(Model): - """Parameters supplied to the Update OpenID Connect Provider operation. - - :param display_name: User-friendly OpenID Connect Provider name. - :type display_name: str - :param description: User-friendly description of OpenID Connect Provider. - :type description: str - :param metadata_endpoint: Metadata endpoint URI. - :type metadata_endpoint: str - :param client_id: Client ID of developer console which is the client - application. - :type client_id: str - :param client_secret: Client Secret of developer console which is the - client application. - :type client_secret: str - """ - - _validation = { - 'display_name': {'max_length': 50}, - } - - _attribute_map = { - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'metadata_endpoint': {'key': 'properties.metadataEndpoint', 'type': 'str'}, - 'client_id': {'key': 'properties.clientId', 'type': 'str'}, - 'client_secret': {'key': 'properties.clientSecret', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OpenidConnectProviderUpdateContract, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - self.description = kwargs.get('description', None) - self.metadata_endpoint = kwargs.get('metadata_endpoint', None) - self.client_id = kwargs.get('client_id', None) - self.client_secret = kwargs.get('client_secret', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/openid_connect_provider_update_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/openid_connect_provider_update_contract_py3.py deleted file mode 100644 index 0acdde07011a..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/openid_connect_provider_update_contract_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OpenidConnectProviderUpdateContract(Model): - """Parameters supplied to the Update OpenID Connect Provider operation. - - :param display_name: User-friendly OpenID Connect Provider name. - :type display_name: str - :param description: User-friendly description of OpenID Connect Provider. - :type description: str - :param metadata_endpoint: Metadata endpoint URI. - :type metadata_endpoint: str - :param client_id: Client ID of developer console which is the client - application. - :type client_id: str - :param client_secret: Client Secret of developer console which is the - client application. - :type client_secret: str - """ - - _validation = { - 'display_name': {'max_length': 50}, - } - - _attribute_map = { - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'metadata_endpoint': {'key': 'properties.metadataEndpoint', 'type': 'str'}, - 'client_id': {'key': 'properties.clientId', 'type': 'str'}, - 'client_secret': {'key': 'properties.clientSecret', 'type': 'str'}, - } - - def __init__(self, *, display_name: str=None, description: str=None, metadata_endpoint: str=None, client_id: str=None, client_secret: str=None, **kwargs) -> None: - super(OpenidConnectProviderUpdateContract, self).__init__(**kwargs) - self.display_name = display_name - self.description = description - self.metadata_endpoint = metadata_endpoint - self.client_id = client_id - self.client_secret = client_secret diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation.py deleted file mode 100644 index 9b403bad2fcf..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """REST API operation. - - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param display: The object that describes the operation. - :type display: ~azure.mgmt.apimanagement.models.OperationDisplay - :param origin: The operation origin. - :type origin: str - :param properties: The operation properties. - :type properties: object - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) - self.origin = kwargs.get('origin', None) - self.properties = kwargs.get('properties', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_contract.py deleted file mode 100644 index cf9b5b4a3ff0..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_contract.py +++ /dev/null @@ -1,85 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class OperationContract(Resource): - """Api Operation details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param template_parameters: Collection of URL template parameters. - :type template_parameters: - list[~azure.mgmt.apimanagement.models.ParameterContract] - :param description: Description of the operation. May include HTML - formatting tags. - :type description: str - :param request: An entity containing request details. - :type request: ~azure.mgmt.apimanagement.models.RequestContract - :param responses: Array of Operation responses. - :type responses: list[~azure.mgmt.apimanagement.models.ResponseContract] - :param policies: Operation Policies - :type policies: str - :param display_name: Required. Operation Name. - :type display_name: str - :param method: Required. A Valid HTTP Operation Method. Typical Http - Methods like GET, PUT, POST but not limited by only them. - :type method: str - :param url_template: Required. Relative URL template identifying the - target resource for this operation. May include parameters. Example: - /customers/{cid}/orders/{oid}/?date={date} - :type url_template: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'description': {'max_length': 1000}, - 'display_name': {'required': True, 'max_length': 300, 'min_length': 1}, - 'method': {'required': True}, - 'url_template': {'required': True, 'max_length': 1000, 'min_length': 1}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'template_parameters': {'key': 'properties.templateParameters', 'type': '[ParameterContract]'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'request': {'key': 'properties.request', 'type': 'RequestContract'}, - 'responses': {'key': 'properties.responses', 'type': '[ResponseContract]'}, - 'policies': {'key': 'properties.policies', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'method': {'key': 'properties.method', 'type': 'str'}, - 'url_template': {'key': 'properties.urlTemplate', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationContract, self).__init__(**kwargs) - self.template_parameters = kwargs.get('template_parameters', None) - self.description = kwargs.get('description', None) - self.request = kwargs.get('request', None) - self.responses = kwargs.get('responses', None) - self.policies = kwargs.get('policies', None) - self.display_name = kwargs.get('display_name', None) - self.method = kwargs.get('method', None) - self.url_template = kwargs.get('url_template', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_contract_paged.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_contract_paged.py deleted file mode 100644 index d26188bf9f3b..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_contract_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationContractPaged(Paged): - """ - A paging container for iterating over a list of :class:`OperationContract ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[OperationContract]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationContractPaged, self).__init__(*args, **kwargs) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_contract_py3.py deleted file mode 100644 index 197b2f410f8d..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_contract_py3.py +++ /dev/null @@ -1,85 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class OperationContract(Resource): - """Api Operation details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param template_parameters: Collection of URL template parameters. - :type template_parameters: - list[~azure.mgmt.apimanagement.models.ParameterContract] - :param description: Description of the operation. May include HTML - formatting tags. - :type description: str - :param request: An entity containing request details. - :type request: ~azure.mgmt.apimanagement.models.RequestContract - :param responses: Array of Operation responses. - :type responses: list[~azure.mgmt.apimanagement.models.ResponseContract] - :param policies: Operation Policies - :type policies: str - :param display_name: Required. Operation Name. - :type display_name: str - :param method: Required. A Valid HTTP Operation Method. Typical Http - Methods like GET, PUT, POST but not limited by only them. - :type method: str - :param url_template: Required. Relative URL template identifying the - target resource for this operation. May include parameters. Example: - /customers/{cid}/orders/{oid}/?date={date} - :type url_template: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'description': {'max_length': 1000}, - 'display_name': {'required': True, 'max_length': 300, 'min_length': 1}, - 'method': {'required': True}, - 'url_template': {'required': True, 'max_length': 1000, 'min_length': 1}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'template_parameters': {'key': 'properties.templateParameters', 'type': '[ParameterContract]'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'request': {'key': 'properties.request', 'type': 'RequestContract'}, - 'responses': {'key': 'properties.responses', 'type': '[ResponseContract]'}, - 'policies': {'key': 'properties.policies', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'method': {'key': 'properties.method', 'type': 'str'}, - 'url_template': {'key': 'properties.urlTemplate', 'type': 'str'}, - } - - def __init__(self, *, display_name: str, method: str, url_template: str, template_parameters=None, description: str=None, request=None, responses=None, policies: str=None, **kwargs) -> None: - super(OperationContract, self).__init__(**kwargs) - self.template_parameters = template_parameters - self.description = description - self.request = request - self.responses = responses - self.policies = policies - self.display_name = display_name - self.method = method - self.url_template = url_template diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_display.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_display.py deleted file mode 100644 index d0fde0c4a0b9..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_display.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """The object that describes the operation. - - :param provider: Friendly name of the resource provider - :type provider: str - :param operation: Operation type: read, write, delete, listKeys/action, - etc. - :type operation: str - :param resource: Resource type on which the operation is performed. - :type resource: str - :param description: Friendly name of the operation - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.operation = kwargs.get('operation', None) - self.resource = kwargs.get('resource', None) - self.description = kwargs.get('description', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_display_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_display_py3.py deleted file mode 100644 index 37858ea03adb..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_display_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """The object that describes the operation. - - :param provider: Friendly name of the resource provider - :type provider: str - :param operation: Operation type: read, write, delete, listKeys/action, - etc. - :type operation: str - :param resource: Resource type on which the operation is performed. - :type resource: str - :param description: Friendly name of the operation - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, provider: str=None, operation: str=None, resource: str=None, description: str=None, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.operation = operation - self.resource = resource - self.description = description diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_entity_base_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_entity_base_contract.py deleted file mode 100644 index bc0a8f41ace2..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_entity_base_contract.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationEntityBaseContract(Model): - """Api Operation Entity Base Contract details. - - :param template_parameters: Collection of URL template parameters. - :type template_parameters: - list[~azure.mgmt.apimanagement.models.ParameterContract] - :param description: Description of the operation. May include HTML - formatting tags. - :type description: str - :param request: An entity containing request details. - :type request: ~azure.mgmt.apimanagement.models.RequestContract - :param responses: Array of Operation responses. - :type responses: list[~azure.mgmt.apimanagement.models.ResponseContract] - :param policies: Operation Policies - :type policies: str - """ - - _validation = { - 'description': {'max_length': 1000}, - } - - _attribute_map = { - 'template_parameters': {'key': 'templateParameters', 'type': '[ParameterContract]'}, - 'description': {'key': 'description', 'type': 'str'}, - 'request': {'key': 'request', 'type': 'RequestContract'}, - 'responses': {'key': 'responses', 'type': '[ResponseContract]'}, - 'policies': {'key': 'policies', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationEntityBaseContract, self).__init__(**kwargs) - self.template_parameters = kwargs.get('template_parameters', None) - self.description = kwargs.get('description', None) - self.request = kwargs.get('request', None) - self.responses = kwargs.get('responses', None) - self.policies = kwargs.get('policies', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_entity_base_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_entity_base_contract_py3.py deleted file mode 100644 index 62d409a210db..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_entity_base_contract_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationEntityBaseContract(Model): - """Api Operation Entity Base Contract details. - - :param template_parameters: Collection of URL template parameters. - :type template_parameters: - list[~azure.mgmt.apimanagement.models.ParameterContract] - :param description: Description of the operation. May include HTML - formatting tags. - :type description: str - :param request: An entity containing request details. - :type request: ~azure.mgmt.apimanagement.models.RequestContract - :param responses: Array of Operation responses. - :type responses: list[~azure.mgmt.apimanagement.models.ResponseContract] - :param policies: Operation Policies - :type policies: str - """ - - _validation = { - 'description': {'max_length': 1000}, - } - - _attribute_map = { - 'template_parameters': {'key': 'templateParameters', 'type': '[ParameterContract]'}, - 'description': {'key': 'description', 'type': 'str'}, - 'request': {'key': 'request', 'type': 'RequestContract'}, - 'responses': {'key': 'responses', 'type': '[ResponseContract]'}, - 'policies': {'key': 'policies', 'type': 'str'}, - } - - def __init__(self, *, template_parameters=None, description: str=None, request=None, responses=None, policies: str=None, **kwargs) -> None: - super(OperationEntityBaseContract, self).__init__(**kwargs) - self.template_parameters = template_parameters - self.description = description - self.request = request - self.responses = responses - self.policies = policies diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_paged.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_paged.py deleted file mode 100644 index 950b8acd7466..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_py3.py deleted file mode 100644 index eb38d162365a..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """REST API operation. - - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param display: The object that describes the operation. - :type display: ~azure.mgmt.apimanagement.models.OperationDisplay - :param origin: The operation origin. - :type origin: str - :param properties: The operation properties. - :type properties: object - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'object'}, - } - - def __init__(self, *, name: str=None, display=None, origin: str=None, properties=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = name - self.display = display - self.origin = origin - self.properties = properties diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_result_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_result_contract.py deleted file mode 100644 index 736344faab29..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_result_contract.py +++ /dev/null @@ -1,68 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationResultContract(Model): - """Operation Result. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: Operation result identifier. - :type id: str - :param status: Status of an async operation. Possible values include: - 'Started', 'InProgress', 'Succeeded', 'Failed' - :type status: str or ~azure.mgmt.apimanagement.models.AsyncOperationStatus - :param started: Start time of an async operation. The date conforms to the - following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 - standard. - :type started: datetime - :param updated: Last update time of an async operation. The date conforms - to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO - 8601 standard. - :type updated: datetime - :param result_info: Optional result info. - :type result_info: str - :param error: Error Body Contract - :type error: ~azure.mgmt.apimanagement.models.ErrorResponseBody - :ivar action_log: This property if only provided as part of the - TenantConfiguration_Validate operation. It contains the log the entities - which will be updated/created/deleted as part of the - TenantConfiguration_Deploy operation. - :vartype action_log: - list[~azure.mgmt.apimanagement.models.OperationResultLogItemContract] - """ - - _validation = { - 'action_log': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'AsyncOperationStatus'}, - 'started': {'key': 'started', 'type': 'iso-8601'}, - 'updated': {'key': 'updated', 'type': 'iso-8601'}, - 'result_info': {'key': 'resultInfo', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'ErrorResponseBody'}, - 'action_log': {'key': 'actionLog', 'type': '[OperationResultLogItemContract]'}, - } - - def __init__(self, **kwargs): - super(OperationResultContract, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.status = kwargs.get('status', None) - self.started = kwargs.get('started', None) - self.updated = kwargs.get('updated', None) - self.result_info = kwargs.get('result_info', None) - self.error = kwargs.get('error', None) - self.action_log = None diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_result_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_result_contract_py3.py deleted file mode 100644 index 0694c535ae2b..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_result_contract_py3.py +++ /dev/null @@ -1,68 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationResultContract(Model): - """Operation Result. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: Operation result identifier. - :type id: str - :param status: Status of an async operation. Possible values include: - 'Started', 'InProgress', 'Succeeded', 'Failed' - :type status: str or ~azure.mgmt.apimanagement.models.AsyncOperationStatus - :param started: Start time of an async operation. The date conforms to the - following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 - standard. - :type started: datetime - :param updated: Last update time of an async operation. The date conforms - to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO - 8601 standard. - :type updated: datetime - :param result_info: Optional result info. - :type result_info: str - :param error: Error Body Contract - :type error: ~azure.mgmt.apimanagement.models.ErrorResponseBody - :ivar action_log: This property if only provided as part of the - TenantConfiguration_Validate operation. It contains the log the entities - which will be updated/created/deleted as part of the - TenantConfiguration_Deploy operation. - :vartype action_log: - list[~azure.mgmt.apimanagement.models.OperationResultLogItemContract] - """ - - _validation = { - 'action_log': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'AsyncOperationStatus'}, - 'started': {'key': 'started', 'type': 'iso-8601'}, - 'updated': {'key': 'updated', 'type': 'iso-8601'}, - 'result_info': {'key': 'resultInfo', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'ErrorResponseBody'}, - 'action_log': {'key': 'actionLog', 'type': '[OperationResultLogItemContract]'}, - } - - def __init__(self, *, id: str=None, status=None, started=None, updated=None, result_info: str=None, error=None, **kwargs) -> None: - super(OperationResultContract, self).__init__(**kwargs) - self.id = id - self.status = status - self.started = started - self.updated = updated - self.result_info = result_info - self.error = error - self.action_log = None diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_result_log_item_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_result_log_item_contract.py deleted file mode 100644 index 7c6f2c63c7c0..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_result_log_item_contract.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationResultLogItemContract(Model): - """Log of the entity being created, updated or deleted. - - :param object_type: The type of entity contract. - :type object_type: str - :param action: Action like create/update/delete. - :type action: str - :param object_key: Identifier of the entity being created/updated/deleted. - :type object_key: str - """ - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'action': {'key': 'action', 'type': 'str'}, - 'object_key': {'key': 'objectKey', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationResultLogItemContract, self).__init__(**kwargs) - self.object_type = kwargs.get('object_type', None) - self.action = kwargs.get('action', None) - self.object_key = kwargs.get('object_key', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_result_log_item_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_result_log_item_contract_py3.py deleted file mode 100644 index e89f3615cae4..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_result_log_item_contract_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationResultLogItemContract(Model): - """Log of the entity being created, updated or deleted. - - :param object_type: The type of entity contract. - :type object_type: str - :param action: Action like create/update/delete. - :type action: str - :param object_key: Identifier of the entity being created/updated/deleted. - :type object_key: str - """ - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'action': {'key': 'action', 'type': 'str'}, - 'object_key': {'key': 'objectKey', 'type': 'str'}, - } - - def __init__(self, *, object_type: str=None, action: str=None, object_key: str=None, **kwargs) -> None: - super(OperationResultLogItemContract, self).__init__(**kwargs) - self.object_type = object_type - self.action = action - self.object_key = object_key diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_tag_resource_contract_properties.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_tag_resource_contract_properties.py deleted file mode 100644 index c8d6e0a6d9f1..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_tag_resource_contract_properties.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationTagResourceContractProperties(Model): - """Operation Entity contract Properties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: Identifier of the operation in form /operations/{operationId}. - :type id: str - :ivar name: Operation name. - :vartype name: str - :ivar api_name: Api Name. - :vartype api_name: str - :ivar api_revision: Api Revision. - :vartype api_revision: str - :ivar api_version: Api Version. - :vartype api_version: str - :ivar description: Operation Description. - :vartype description: str - :ivar method: A Valid HTTP Operation Method. Typical Http Methods like - GET, PUT, POST but not limited by only them. - :vartype method: str - :ivar url_template: Relative URL template identifying the target resource - for this operation. May include parameters. Example: - /customers/{cid}/orders/{oid}/?date={date} - :vartype url_template: str - """ - - _validation = { - 'name': {'readonly': True}, - 'api_name': {'readonly': True}, - 'api_revision': {'readonly': True}, - 'api_version': {'readonly': True}, - 'description': {'readonly': True}, - 'method': {'readonly': True}, - 'url_template': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'api_name': {'key': 'apiName', 'type': 'str'}, - 'api_revision': {'key': 'apiRevision', 'type': 'str'}, - 'api_version': {'key': 'apiVersion', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'method': {'key': 'method', 'type': 'str'}, - 'url_template': {'key': 'urlTemplate', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationTagResourceContractProperties, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = None - self.api_name = None - self.api_revision = None - self.api_version = None - self.description = None - self.method = None - self.url_template = None diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_tag_resource_contract_properties_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_tag_resource_contract_properties_py3.py deleted file mode 100644 index 8ec9c0cb0f3b..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_tag_resource_contract_properties_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationTagResourceContractProperties(Model): - """Operation Entity contract Properties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: Identifier of the operation in form /operations/{operationId}. - :type id: str - :ivar name: Operation name. - :vartype name: str - :ivar api_name: Api Name. - :vartype api_name: str - :ivar api_revision: Api Revision. - :vartype api_revision: str - :ivar api_version: Api Version. - :vartype api_version: str - :ivar description: Operation Description. - :vartype description: str - :ivar method: A Valid HTTP Operation Method. Typical Http Methods like - GET, PUT, POST but not limited by only them. - :vartype method: str - :ivar url_template: Relative URL template identifying the target resource - for this operation. May include parameters. Example: - /customers/{cid}/orders/{oid}/?date={date} - :vartype url_template: str - """ - - _validation = { - 'name': {'readonly': True}, - 'api_name': {'readonly': True}, - 'api_revision': {'readonly': True}, - 'api_version': {'readonly': True}, - 'description': {'readonly': True}, - 'method': {'readonly': True}, - 'url_template': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'api_name': {'key': 'apiName', 'type': 'str'}, - 'api_revision': {'key': 'apiRevision', 'type': 'str'}, - 'api_version': {'key': 'apiVersion', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'method': {'key': 'method', 'type': 'str'}, - 'url_template': {'key': 'urlTemplate', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(OperationTagResourceContractProperties, self).__init__(**kwargs) - self.id = id - self.name = None - self.api_name = None - self.api_revision = None - self.api_version = None - self.description = None - self.method = None - self.url_template = None diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_update_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_update_contract.py deleted file mode 100644 index b4b17f1dab95..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_update_contract.py +++ /dev/null @@ -1,67 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationUpdateContract(Model): - """Api Operation Update Contract details. - - :param template_parameters: Collection of URL template parameters. - :type template_parameters: - list[~azure.mgmt.apimanagement.models.ParameterContract] - :param description: Description of the operation. May include HTML - formatting tags. - :type description: str - :param request: An entity containing request details. - :type request: ~azure.mgmt.apimanagement.models.RequestContract - :param responses: Array of Operation responses. - :type responses: list[~azure.mgmt.apimanagement.models.ResponseContract] - :param policies: Operation Policies - :type policies: str - :param display_name: Operation Name. - :type display_name: str - :param method: A Valid HTTP Operation Method. Typical Http Methods like - GET, PUT, POST but not limited by only them. - :type method: str - :param url_template: Relative URL template identifying the target resource - for this operation. May include parameters. Example: - /customers/{cid}/orders/{oid}/?date={date} - :type url_template: str - """ - - _validation = { - 'description': {'max_length': 1000}, - 'display_name': {'max_length': 300, 'min_length': 1}, - 'url_template': {'max_length': 1000, 'min_length': 1}, - } - - _attribute_map = { - 'template_parameters': {'key': 'properties.templateParameters', 'type': '[ParameterContract]'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'request': {'key': 'properties.request', 'type': 'RequestContract'}, - 'responses': {'key': 'properties.responses', 'type': '[ResponseContract]'}, - 'policies': {'key': 'properties.policies', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'method': {'key': 'properties.method', 'type': 'str'}, - 'url_template': {'key': 'properties.urlTemplate', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationUpdateContract, self).__init__(**kwargs) - self.template_parameters = kwargs.get('template_parameters', None) - self.description = kwargs.get('description', None) - self.request = kwargs.get('request', None) - self.responses = kwargs.get('responses', None) - self.policies = kwargs.get('policies', None) - self.display_name = kwargs.get('display_name', None) - self.method = kwargs.get('method', None) - self.url_template = kwargs.get('url_template', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_update_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_update_contract_py3.py deleted file mode 100644 index ad070cb9c980..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_update_contract_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationUpdateContract(Model): - """Api Operation Update Contract details. - - :param template_parameters: Collection of URL template parameters. - :type template_parameters: - list[~azure.mgmt.apimanagement.models.ParameterContract] - :param description: Description of the operation. May include HTML - formatting tags. - :type description: str - :param request: An entity containing request details. - :type request: ~azure.mgmt.apimanagement.models.RequestContract - :param responses: Array of Operation responses. - :type responses: list[~azure.mgmt.apimanagement.models.ResponseContract] - :param policies: Operation Policies - :type policies: str - :param display_name: Operation Name. - :type display_name: str - :param method: A Valid HTTP Operation Method. Typical Http Methods like - GET, PUT, POST but not limited by only them. - :type method: str - :param url_template: Relative URL template identifying the target resource - for this operation. May include parameters. Example: - /customers/{cid}/orders/{oid}/?date={date} - :type url_template: str - """ - - _validation = { - 'description': {'max_length': 1000}, - 'display_name': {'max_length': 300, 'min_length': 1}, - 'url_template': {'max_length': 1000, 'min_length': 1}, - } - - _attribute_map = { - 'template_parameters': {'key': 'properties.templateParameters', 'type': '[ParameterContract]'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'request': {'key': 'properties.request', 'type': 'RequestContract'}, - 'responses': {'key': 'properties.responses', 'type': '[ResponseContract]'}, - 'policies': {'key': 'properties.policies', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'method': {'key': 'properties.method', 'type': 'str'}, - 'url_template': {'key': 'properties.urlTemplate', 'type': 'str'}, - } - - def __init__(self, *, template_parameters=None, description: str=None, request=None, responses=None, policies: str=None, display_name: str=None, method: str=None, url_template: str=None, **kwargs) -> None: - super(OperationUpdateContract, self).__init__(**kwargs) - self.template_parameters = template_parameters - self.description = description - self.request = request - self.responses = responses - self.policies = policies - self.display_name = display_name - self.method = method - self.url_template = url_template diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/parameter_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/parameter_contract.py deleted file mode 100644 index 147a96efdf68..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/parameter_contract.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ParameterContract(Model): - """Operation parameters details. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Parameter name. - :type name: str - :param description: Parameter description. - :type description: str - :param type: Required. Parameter type. - :type type: str - :param default_value: Default parameter value. - :type default_value: str - :param required: Specifies whether parameter is required or not. - :type required: bool - :param values: Parameter values. - :type values: list[str] - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'default_value': {'key': 'defaultValue', 'type': 'str'}, - 'required': {'key': 'required', 'type': 'bool'}, - 'values': {'key': 'values', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ParameterContract, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.description = kwargs.get('description', None) - self.type = kwargs.get('type', None) - self.default_value = kwargs.get('default_value', None) - self.required = kwargs.get('required', None) - self.values = kwargs.get('values', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/parameter_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/parameter_contract_py3.py deleted file mode 100644 index 5f6ea4a0e91b..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/parameter_contract_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ParameterContract(Model): - """Operation parameters details. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Parameter name. - :type name: str - :param description: Parameter description. - :type description: str - :param type: Required. Parameter type. - :type type: str - :param default_value: Default parameter value. - :type default_value: str - :param required: Specifies whether parameter is required or not. - :type required: bool - :param values: Parameter values. - :type values: list[str] - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'default_value': {'key': 'defaultValue', 'type': 'str'}, - 'required': {'key': 'required', 'type': 'bool'}, - 'values': {'key': 'values', 'type': '[str]'}, - } - - def __init__(self, *, name: str, type: str, description: str=None, default_value: str=None, required: bool=None, values=None, **kwargs) -> None: - super(ParameterContract, self).__init__(**kwargs) - self.name = name - self.description = description - self.type = type - self.default_value = default_value - self.required = required - self.values = values diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/pipeline_diagnostic_settings.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/pipeline_diagnostic_settings.py deleted file mode 100644 index 0089215e3802..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/pipeline_diagnostic_settings.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PipelineDiagnosticSettings(Model): - """Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. - - :param request: Diagnostic settings for request. - :type request: ~azure.mgmt.apimanagement.models.HttpMessageDiagnostic - :param response: Diagnostic settings for response. - :type response: ~azure.mgmt.apimanagement.models.HttpMessageDiagnostic - """ - - _attribute_map = { - 'request': {'key': 'request', 'type': 'HttpMessageDiagnostic'}, - 'response': {'key': 'response', 'type': 'HttpMessageDiagnostic'}, - } - - def __init__(self, **kwargs): - super(PipelineDiagnosticSettings, self).__init__(**kwargs) - self.request = kwargs.get('request', None) - self.response = kwargs.get('response', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/pipeline_diagnostic_settings_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/pipeline_diagnostic_settings_py3.py deleted file mode 100644 index ba30e8468d35..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/pipeline_diagnostic_settings_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PipelineDiagnosticSettings(Model): - """Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. - - :param request: Diagnostic settings for request. - :type request: ~azure.mgmt.apimanagement.models.HttpMessageDiagnostic - :param response: Diagnostic settings for response. - :type response: ~azure.mgmt.apimanagement.models.HttpMessageDiagnostic - """ - - _attribute_map = { - 'request': {'key': 'request', 'type': 'HttpMessageDiagnostic'}, - 'response': {'key': 'response', 'type': 'HttpMessageDiagnostic'}, - } - - def __init__(self, *, request=None, response=None, **kwargs) -> None: - super(PipelineDiagnosticSettings, self).__init__(**kwargs) - self.request = request - self.response = response diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/policy_collection.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/policy_collection.py deleted file mode 100644 index 4e983e14003b..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/policy_collection.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicyCollection(Model): - """The response of the list policy operation. - - :param value: Policy Contract value. - :type value: list[~azure.mgmt.apimanagement.models.PolicyContract] - :param next_link: Next page link if any. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PolicyContract]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PolicyCollection, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/policy_collection_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/policy_collection_py3.py deleted file mode 100644 index c48d44838266..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/policy_collection_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicyCollection(Model): - """The response of the list policy operation. - - :param value: Policy Contract value. - :type value: list[~azure.mgmt.apimanagement.models.PolicyContract] - :param next_link: Next page link if any. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PolicyContract]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, *, value=None, next_link: str=None, **kwargs) -> None: - super(PolicyCollection, self).__init__(**kwargs) - self.value = value - self.next_link = next_link diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/policy_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/policy_contract.py deleted file mode 100644 index 313c69931b1c..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/policy_contract.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class PolicyContract(Resource): - """Policy Contract details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param value: Required. Contents of the Policy as defined by the format. - :type value: str - :param format: Format of the policyContent. Possible values include: - 'xml', 'xml-link', 'rawxml', 'rawxml-link'. Default value: "xml" . - :type format: str or ~azure.mgmt.apimanagement.models.PolicyContentFormat - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - 'format': {'key': 'properties.format', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PolicyContract, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.format = kwargs.get('format', "xml") diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/policy_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/policy_contract_py3.py deleted file mode 100644 index 34ff1900dac8..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/policy_contract_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class PolicyContract(Resource): - """Policy Contract details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param value: Required. Contents of the Policy as defined by the format. - :type value: str - :param format: Format of the policyContent. Possible values include: - 'xml', 'xml-link', 'rawxml', 'rawxml-link'. Default value: "xml" . - :type format: str or ~azure.mgmt.apimanagement.models.PolicyContentFormat - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - 'format': {'key': 'properties.format', 'type': 'str'}, - } - - def __init__(self, *, value: str, format="xml", **kwargs) -> None: - super(PolicyContract, self).__init__(**kwargs) - self.value = value - self.format = format diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/policy_snippet_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/policy_snippet_contract.py deleted file mode 100644 index e9317d9566c6..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/policy_snippet_contract.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicySnippetContract(Model): - """Policy snippet. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Snippet name. - :vartype name: str - :ivar content: Snippet content. - :vartype content: str - :ivar tool_tip: Snippet toolTip. - :vartype tool_tip: str - :ivar scope: Binary OR value of the Snippet scope. - :vartype scope: int - """ - - _validation = { - 'name': {'readonly': True}, - 'content': {'readonly': True}, - 'tool_tip': {'readonly': True}, - 'scope': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'content': {'key': 'content', 'type': 'str'}, - 'tool_tip': {'key': 'toolTip', 'type': 'str'}, - 'scope': {'key': 'scope', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(PolicySnippetContract, self).__init__(**kwargs) - self.name = None - self.content = None - self.tool_tip = None - self.scope = None diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/policy_snippet_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/policy_snippet_contract_py3.py deleted file mode 100644 index 8bc7494b939f..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/policy_snippet_contract_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicySnippetContract(Model): - """Policy snippet. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Snippet name. - :vartype name: str - :ivar content: Snippet content. - :vartype content: str - :ivar tool_tip: Snippet toolTip. - :vartype tool_tip: str - :ivar scope: Binary OR value of the Snippet scope. - :vartype scope: int - """ - - _validation = { - 'name': {'readonly': True}, - 'content': {'readonly': True}, - 'tool_tip': {'readonly': True}, - 'scope': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'content': {'key': 'content', 'type': 'str'}, - 'tool_tip': {'key': 'toolTip', 'type': 'str'}, - 'scope': {'key': 'scope', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(PolicySnippetContract, self).__init__(**kwargs) - self.name = None - self.content = None - self.tool_tip = None - self.scope = None diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/policy_snippets_collection.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/policy_snippets_collection.py deleted file mode 100644 index 84129684df80..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/policy_snippets_collection.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicySnippetsCollection(Model): - """The response of the list policy snippets operation. - - :param value: Policy snippet value. - :type value: list[~azure.mgmt.apimanagement.models.PolicySnippetContract] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PolicySnippetContract]'}, - } - - def __init__(self, **kwargs): - super(PolicySnippetsCollection, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/policy_snippets_collection_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/policy_snippets_collection_py3.py deleted file mode 100644 index 0744acea8038..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/policy_snippets_collection_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolicySnippetsCollection(Model): - """The response of the list policy snippets operation. - - :param value: Policy snippet value. - :type value: list[~azure.mgmt.apimanagement.models.PolicySnippetContract] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PolicySnippetContract]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(PolicySnippetsCollection, self).__init__(**kwargs) - self.value = value diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/portal_delegation_settings.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/portal_delegation_settings.py deleted file mode 100644 index 12afb1d73450..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/portal_delegation_settings.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class PortalDelegationSettings(Resource): - """Delegation settings for a developer portal. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param url: A delegation Url. - :type url: str - :param validation_key: A base64-encoded validation key to validate, that a - request is coming from Azure API Management. - :type validation_key: str - :param subscriptions: Subscriptions delegation settings. - :type subscriptions: - ~azure.mgmt.apimanagement.models.SubscriptionsDelegationSettingsProperties - :param user_registration: User registration delegation settings. - :type user_registration: - ~azure.mgmt.apimanagement.models.RegistrationDelegationSettingsProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'url': {'key': 'properties.url', 'type': 'str'}, - 'validation_key': {'key': 'properties.validationKey', 'type': 'str'}, - 'subscriptions': {'key': 'properties.subscriptions', 'type': 'SubscriptionsDelegationSettingsProperties'}, - 'user_registration': {'key': 'properties.userRegistration', 'type': 'RegistrationDelegationSettingsProperties'}, - } - - def __init__(self, **kwargs): - super(PortalDelegationSettings, self).__init__(**kwargs) - self.url = kwargs.get('url', None) - self.validation_key = kwargs.get('validation_key', None) - self.subscriptions = kwargs.get('subscriptions', None) - self.user_registration = kwargs.get('user_registration', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/portal_delegation_settings_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/portal_delegation_settings_py3.py deleted file mode 100644 index 3aa96ae6ff5a..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/portal_delegation_settings_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class PortalDelegationSettings(Resource): - """Delegation settings for a developer portal. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param url: A delegation Url. - :type url: str - :param validation_key: A base64-encoded validation key to validate, that a - request is coming from Azure API Management. - :type validation_key: str - :param subscriptions: Subscriptions delegation settings. - :type subscriptions: - ~azure.mgmt.apimanagement.models.SubscriptionsDelegationSettingsProperties - :param user_registration: User registration delegation settings. - :type user_registration: - ~azure.mgmt.apimanagement.models.RegistrationDelegationSettingsProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'url': {'key': 'properties.url', 'type': 'str'}, - 'validation_key': {'key': 'properties.validationKey', 'type': 'str'}, - 'subscriptions': {'key': 'properties.subscriptions', 'type': 'SubscriptionsDelegationSettingsProperties'}, - 'user_registration': {'key': 'properties.userRegistration', 'type': 'RegistrationDelegationSettingsProperties'}, - } - - def __init__(self, *, url: str=None, validation_key: str=None, subscriptions=None, user_registration=None, **kwargs) -> None: - super(PortalDelegationSettings, self).__init__(**kwargs) - self.url = url - self.validation_key = validation_key - self.subscriptions = subscriptions - self.user_registration = user_registration diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/portal_signin_settings.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/portal_signin_settings.py deleted file mode 100644 index b8f376395a0e..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/portal_signin_settings.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class PortalSigninSettings(Resource): - """Sign-In settings for the Developer Portal. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param enabled: Redirect Anonymous users to the Sign-In page. - :type enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(PortalSigninSettings, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/portal_signin_settings_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/portal_signin_settings_py3.py deleted file mode 100644 index 5f7a08a5a7f9..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/portal_signin_settings_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class PortalSigninSettings(Resource): - """Sign-In settings for the Developer Portal. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param enabled: Redirect Anonymous users to the Sign-In page. - :type enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - } - - def __init__(self, *, enabled: bool=None, **kwargs) -> None: - super(PortalSigninSettings, self).__init__(**kwargs) - self.enabled = enabled diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/portal_signup_settings.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/portal_signup_settings.py deleted file mode 100644 index ed58574923bd..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/portal_signup_settings.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class PortalSignupSettings(Resource): - """Sign-Up settings for a developer portal. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param enabled: Allow users to sign up on a developer portal. - :type enabled: bool - :param terms_of_service: Terms of service contract properties. - :type terms_of_service: - ~azure.mgmt.apimanagement.models.TermsOfServiceProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'terms_of_service': {'key': 'properties.termsOfService', 'type': 'TermsOfServiceProperties'}, - } - - def __init__(self, **kwargs): - super(PortalSignupSettings, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.terms_of_service = kwargs.get('terms_of_service', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/portal_signup_settings_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/portal_signup_settings_py3.py deleted file mode 100644 index 46eb461e53ff..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/portal_signup_settings_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class PortalSignupSettings(Resource): - """Sign-Up settings for a developer portal. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param enabled: Allow users to sign up on a developer portal. - :type enabled: bool - :param terms_of_service: Terms of service contract properties. - :type terms_of_service: - ~azure.mgmt.apimanagement.models.TermsOfServiceProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'terms_of_service': {'key': 'properties.termsOfService', 'type': 'TermsOfServiceProperties'}, - } - - def __init__(self, *, enabled: bool=None, terms_of_service=None, **kwargs) -> None: - super(PortalSignupSettings, self).__init__(**kwargs) - self.enabled = enabled - self.terms_of_service = terms_of_service diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_contract.py deleted file mode 100644 index c25ec9bde595..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_contract.py +++ /dev/null @@ -1,93 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ProductContract(Resource): - """Product details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param description: Product description. May include HTML formatting tags. - :type description: str - :param terms: Product terms of use. Developers trying to subscribe to the - product will be presented and required to accept these terms before they - can complete the subscription process. - :type terms: str - :param subscription_required: Whether a product subscription is required - for accessing APIs included in this product. If true, the product is - referred to as "protected" and a valid subscription key is required for a - request to an API included in the product to succeed. If false, the - product is referred to as "open" and requests to an API included in the - product can be made without a subscription key. If property is omitted - when creating a new product it's value is assumed to be true. - :type subscription_required: bool - :param approval_required: whether subscription approval is required. If - false, new subscriptions will be approved automatically enabling - developers to call the product’s APIs immediately after subscribing. If - true, administrators must manually approve the subscription before the - developer can any of the product’s APIs. Can be present only if - subscriptionRequired property is present and has a value of false. - :type approval_required: bool - :param subscriptions_limit: Whether the number of subscriptions a user can - have to this product at the same time. Set to null or omit to allow - unlimited per user subscriptions. Can be present only if - subscriptionRequired property is present and has a value of false. - :type subscriptions_limit: int - :param state: whether product is published or not. Published products are - discoverable by users of developer portal. Non published products are - visible only to administrators. Default state of Product is notPublished. - Possible values include: 'notPublished', 'published' - :type state: str or ~azure.mgmt.apimanagement.models.ProductState - :param display_name: Required. Product name. - :type display_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'description': {'max_length': 1000, 'min_length': 1}, - 'display_name': {'required': True, 'max_length': 300, 'min_length': 1}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'terms': {'key': 'properties.terms', 'type': 'str'}, - 'subscription_required': {'key': 'properties.subscriptionRequired', 'type': 'bool'}, - 'approval_required': {'key': 'properties.approvalRequired', 'type': 'bool'}, - 'subscriptions_limit': {'key': 'properties.subscriptionsLimit', 'type': 'int'}, - 'state': {'key': 'properties.state', 'type': 'ProductState'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ProductContract, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.terms = kwargs.get('terms', None) - self.subscription_required = kwargs.get('subscription_required', None) - self.approval_required = kwargs.get('approval_required', None) - self.subscriptions_limit = kwargs.get('subscriptions_limit', None) - self.state = kwargs.get('state', None) - self.display_name = kwargs.get('display_name', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_contract_paged.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_contract_paged.py deleted file mode 100644 index ed575a6564cb..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_contract_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ProductContractPaged(Paged): - """ - A paging container for iterating over a list of :class:`ProductContract ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ProductContract]'} - } - - def __init__(self, *args, **kwargs): - - super(ProductContractPaged, self).__init__(*args, **kwargs) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_contract_py3.py deleted file mode 100644 index 2183cdb4de8a..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_contract_py3.py +++ /dev/null @@ -1,93 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ProductContract(Resource): - """Product details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param description: Product description. May include HTML formatting tags. - :type description: str - :param terms: Product terms of use. Developers trying to subscribe to the - product will be presented and required to accept these terms before they - can complete the subscription process. - :type terms: str - :param subscription_required: Whether a product subscription is required - for accessing APIs included in this product. If true, the product is - referred to as "protected" and a valid subscription key is required for a - request to an API included in the product to succeed. If false, the - product is referred to as "open" and requests to an API included in the - product can be made without a subscription key. If property is omitted - when creating a new product it's value is assumed to be true. - :type subscription_required: bool - :param approval_required: whether subscription approval is required. If - false, new subscriptions will be approved automatically enabling - developers to call the product’s APIs immediately after subscribing. If - true, administrators must manually approve the subscription before the - developer can any of the product’s APIs. Can be present only if - subscriptionRequired property is present and has a value of false. - :type approval_required: bool - :param subscriptions_limit: Whether the number of subscriptions a user can - have to this product at the same time. Set to null or omit to allow - unlimited per user subscriptions. Can be present only if - subscriptionRequired property is present and has a value of false. - :type subscriptions_limit: int - :param state: whether product is published or not. Published products are - discoverable by users of developer portal. Non published products are - visible only to administrators. Default state of Product is notPublished. - Possible values include: 'notPublished', 'published' - :type state: str or ~azure.mgmt.apimanagement.models.ProductState - :param display_name: Required. Product name. - :type display_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'description': {'max_length': 1000, 'min_length': 1}, - 'display_name': {'required': True, 'max_length': 300, 'min_length': 1}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'terms': {'key': 'properties.terms', 'type': 'str'}, - 'subscription_required': {'key': 'properties.subscriptionRequired', 'type': 'bool'}, - 'approval_required': {'key': 'properties.approvalRequired', 'type': 'bool'}, - 'subscriptions_limit': {'key': 'properties.subscriptionsLimit', 'type': 'int'}, - 'state': {'key': 'properties.state', 'type': 'ProductState'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - } - - def __init__(self, *, display_name: str, description: str=None, terms: str=None, subscription_required: bool=None, approval_required: bool=None, subscriptions_limit: int=None, state=None, **kwargs) -> None: - super(ProductContract, self).__init__(**kwargs) - self.description = description - self.terms = terms - self.subscription_required = subscription_required - self.approval_required = approval_required - self.subscriptions_limit = subscriptions_limit - self.state = state - self.display_name = display_name diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_entity_base_parameters.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_entity_base_parameters.py deleted file mode 100644 index 4e1f97bc6694..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_entity_base_parameters.py +++ /dev/null @@ -1,71 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ProductEntityBaseParameters(Model): - """Product Entity Base Parameters. - - :param description: Product description. May include HTML formatting tags. - :type description: str - :param terms: Product terms of use. Developers trying to subscribe to the - product will be presented and required to accept these terms before they - can complete the subscription process. - :type terms: str - :param subscription_required: Whether a product subscription is required - for accessing APIs included in this product. If true, the product is - referred to as "protected" and a valid subscription key is required for a - request to an API included in the product to succeed. If false, the - product is referred to as "open" and requests to an API included in the - product can be made without a subscription key. If property is omitted - when creating a new product it's value is assumed to be true. - :type subscription_required: bool - :param approval_required: whether subscription approval is required. If - false, new subscriptions will be approved automatically enabling - developers to call the product’s APIs immediately after subscribing. If - true, administrators must manually approve the subscription before the - developer can any of the product’s APIs. Can be present only if - subscriptionRequired property is present and has a value of false. - :type approval_required: bool - :param subscriptions_limit: Whether the number of subscriptions a user can - have to this product at the same time. Set to null or omit to allow - unlimited per user subscriptions. Can be present only if - subscriptionRequired property is present and has a value of false. - :type subscriptions_limit: int - :param state: whether product is published or not. Published products are - discoverable by users of developer portal. Non published products are - visible only to administrators. Default state of Product is notPublished. - Possible values include: 'notPublished', 'published' - :type state: str or ~azure.mgmt.apimanagement.models.ProductState - """ - - _validation = { - 'description': {'max_length': 1000, 'min_length': 1}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'terms': {'key': 'terms', 'type': 'str'}, - 'subscription_required': {'key': 'subscriptionRequired', 'type': 'bool'}, - 'approval_required': {'key': 'approvalRequired', 'type': 'bool'}, - 'subscriptions_limit': {'key': 'subscriptionsLimit', 'type': 'int'}, - 'state': {'key': 'state', 'type': 'ProductState'}, - } - - def __init__(self, **kwargs): - super(ProductEntityBaseParameters, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.terms = kwargs.get('terms', None) - self.subscription_required = kwargs.get('subscription_required', None) - self.approval_required = kwargs.get('approval_required', None) - self.subscriptions_limit = kwargs.get('subscriptions_limit', None) - self.state = kwargs.get('state', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_entity_base_parameters_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_entity_base_parameters_py3.py deleted file mode 100644 index 5574461683ea..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_entity_base_parameters_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ProductEntityBaseParameters(Model): - """Product Entity Base Parameters. - - :param description: Product description. May include HTML formatting tags. - :type description: str - :param terms: Product terms of use. Developers trying to subscribe to the - product will be presented and required to accept these terms before they - can complete the subscription process. - :type terms: str - :param subscription_required: Whether a product subscription is required - for accessing APIs included in this product. If true, the product is - referred to as "protected" and a valid subscription key is required for a - request to an API included in the product to succeed. If false, the - product is referred to as "open" and requests to an API included in the - product can be made without a subscription key. If property is omitted - when creating a new product it's value is assumed to be true. - :type subscription_required: bool - :param approval_required: whether subscription approval is required. If - false, new subscriptions will be approved automatically enabling - developers to call the product’s APIs immediately after subscribing. If - true, administrators must manually approve the subscription before the - developer can any of the product’s APIs. Can be present only if - subscriptionRequired property is present and has a value of false. - :type approval_required: bool - :param subscriptions_limit: Whether the number of subscriptions a user can - have to this product at the same time. Set to null or omit to allow - unlimited per user subscriptions. Can be present only if - subscriptionRequired property is present and has a value of false. - :type subscriptions_limit: int - :param state: whether product is published or not. Published products are - discoverable by users of developer portal. Non published products are - visible only to administrators. Default state of Product is notPublished. - Possible values include: 'notPublished', 'published' - :type state: str or ~azure.mgmt.apimanagement.models.ProductState - """ - - _validation = { - 'description': {'max_length': 1000, 'min_length': 1}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'terms': {'key': 'terms', 'type': 'str'}, - 'subscription_required': {'key': 'subscriptionRequired', 'type': 'bool'}, - 'approval_required': {'key': 'approvalRequired', 'type': 'bool'}, - 'subscriptions_limit': {'key': 'subscriptionsLimit', 'type': 'int'}, - 'state': {'key': 'state', 'type': 'ProductState'}, - } - - def __init__(self, *, description: str=None, terms: str=None, subscription_required: bool=None, approval_required: bool=None, subscriptions_limit: int=None, state=None, **kwargs) -> None: - super(ProductEntityBaseParameters, self).__init__(**kwargs) - self.description = description - self.terms = terms - self.subscription_required = subscription_required - self.approval_required = approval_required - self.subscriptions_limit = subscriptions_limit - self.state = state diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_tag_resource_contract_properties.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_tag_resource_contract_properties.py deleted file mode 100644 index 0b32a2c9df40..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_tag_resource_contract_properties.py +++ /dev/null @@ -1,76 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .product_entity_base_parameters import ProductEntityBaseParameters - - -class ProductTagResourceContractProperties(ProductEntityBaseParameters): - """Product profile. - - All required parameters must be populated in order to send to Azure. - - :param description: Product description. May include HTML formatting tags. - :type description: str - :param terms: Product terms of use. Developers trying to subscribe to the - product will be presented and required to accept these terms before they - can complete the subscription process. - :type terms: str - :param subscription_required: Whether a product subscription is required - for accessing APIs included in this product. If true, the product is - referred to as "protected" and a valid subscription key is required for a - request to an API included in the product to succeed. If false, the - product is referred to as "open" and requests to an API included in the - product can be made without a subscription key. If property is omitted - when creating a new product it's value is assumed to be true. - :type subscription_required: bool - :param approval_required: whether subscription approval is required. If - false, new subscriptions will be approved automatically enabling - developers to call the product’s APIs immediately after subscribing. If - true, administrators must manually approve the subscription before the - developer can any of the product’s APIs. Can be present only if - subscriptionRequired property is present and has a value of false. - :type approval_required: bool - :param subscriptions_limit: Whether the number of subscriptions a user can - have to this product at the same time. Set to null or omit to allow - unlimited per user subscriptions. Can be present only if - subscriptionRequired property is present and has a value of false. - :type subscriptions_limit: int - :param state: whether product is published or not. Published products are - discoverable by users of developer portal. Non published products are - visible only to administrators. Default state of Product is notPublished. - Possible values include: 'notPublished', 'published' - :type state: str or ~azure.mgmt.apimanagement.models.ProductState - :param id: Identifier of the product in the form of /products/{productId} - :type id: str - :param name: Required. Product name. - :type name: str - """ - - _validation = { - 'description': {'max_length': 1000, 'min_length': 1}, - 'name': {'required': True, 'max_length': 300, 'min_length': 1}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'terms': {'key': 'terms', 'type': 'str'}, - 'subscription_required': {'key': 'subscriptionRequired', 'type': 'bool'}, - 'approval_required': {'key': 'approvalRequired', 'type': 'bool'}, - 'subscriptions_limit': {'key': 'subscriptionsLimit', 'type': 'int'}, - 'state': {'key': 'state', 'type': 'ProductState'}, - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ProductTagResourceContractProperties, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_tag_resource_contract_properties_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_tag_resource_contract_properties_py3.py deleted file mode 100644 index ecb7fef20809..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_tag_resource_contract_properties_py3.py +++ /dev/null @@ -1,76 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .product_entity_base_parameters_py3 import ProductEntityBaseParameters - - -class ProductTagResourceContractProperties(ProductEntityBaseParameters): - """Product profile. - - All required parameters must be populated in order to send to Azure. - - :param description: Product description. May include HTML formatting tags. - :type description: str - :param terms: Product terms of use. Developers trying to subscribe to the - product will be presented and required to accept these terms before they - can complete the subscription process. - :type terms: str - :param subscription_required: Whether a product subscription is required - for accessing APIs included in this product. If true, the product is - referred to as "protected" and a valid subscription key is required for a - request to an API included in the product to succeed. If false, the - product is referred to as "open" and requests to an API included in the - product can be made without a subscription key. If property is omitted - when creating a new product it's value is assumed to be true. - :type subscription_required: bool - :param approval_required: whether subscription approval is required. If - false, new subscriptions will be approved automatically enabling - developers to call the product’s APIs immediately after subscribing. If - true, administrators must manually approve the subscription before the - developer can any of the product’s APIs. Can be present only if - subscriptionRequired property is present and has a value of false. - :type approval_required: bool - :param subscriptions_limit: Whether the number of subscriptions a user can - have to this product at the same time. Set to null or omit to allow - unlimited per user subscriptions. Can be present only if - subscriptionRequired property is present and has a value of false. - :type subscriptions_limit: int - :param state: whether product is published or not. Published products are - discoverable by users of developer portal. Non published products are - visible only to administrators. Default state of Product is notPublished. - Possible values include: 'notPublished', 'published' - :type state: str or ~azure.mgmt.apimanagement.models.ProductState - :param id: Identifier of the product in the form of /products/{productId} - :type id: str - :param name: Required. Product name. - :type name: str - """ - - _validation = { - 'description': {'max_length': 1000, 'min_length': 1}, - 'name': {'required': True, 'max_length': 300, 'min_length': 1}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'terms': {'key': 'terms', 'type': 'str'}, - 'subscription_required': {'key': 'subscriptionRequired', 'type': 'bool'}, - 'approval_required': {'key': 'approvalRequired', 'type': 'bool'}, - 'subscriptions_limit': {'key': 'subscriptionsLimit', 'type': 'int'}, - 'state': {'key': 'state', 'type': 'ProductState'}, - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name: str, description: str=None, terms: str=None, subscription_required: bool=None, approval_required: bool=None, subscriptions_limit: int=None, state=None, id: str=None, **kwargs) -> None: - super(ProductTagResourceContractProperties, self).__init__(description=description, terms=terms, subscription_required=subscription_required, approval_required=approval_required, subscriptions_limit=subscriptions_limit, state=state, **kwargs) - self.id = id - self.name = name diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_update_parameters.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_update_parameters.py deleted file mode 100644 index ce8e0d73d728..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_update_parameters.py +++ /dev/null @@ -1,76 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ProductUpdateParameters(Model): - """Product Update parameters. - - :param description: Product description. May include HTML formatting tags. - :type description: str - :param terms: Product terms of use. Developers trying to subscribe to the - product will be presented and required to accept these terms before they - can complete the subscription process. - :type terms: str - :param subscription_required: Whether a product subscription is required - for accessing APIs included in this product. If true, the product is - referred to as "protected" and a valid subscription key is required for a - request to an API included in the product to succeed. If false, the - product is referred to as "open" and requests to an API included in the - product can be made without a subscription key. If property is omitted - when creating a new product it's value is assumed to be true. - :type subscription_required: bool - :param approval_required: whether subscription approval is required. If - false, new subscriptions will be approved automatically enabling - developers to call the product’s APIs immediately after subscribing. If - true, administrators must manually approve the subscription before the - developer can any of the product’s APIs. Can be present only if - subscriptionRequired property is present and has a value of false. - :type approval_required: bool - :param subscriptions_limit: Whether the number of subscriptions a user can - have to this product at the same time. Set to null or omit to allow - unlimited per user subscriptions. Can be present only if - subscriptionRequired property is present and has a value of false. - :type subscriptions_limit: int - :param state: whether product is published or not. Published products are - discoverable by users of developer portal. Non published products are - visible only to administrators. Default state of Product is notPublished. - Possible values include: 'notPublished', 'published' - :type state: str or ~azure.mgmt.apimanagement.models.ProductState - :param display_name: Product name. - :type display_name: str - """ - - _validation = { - 'description': {'max_length': 1000, 'min_length': 1}, - 'display_name': {'max_length': 300, 'min_length': 1}, - } - - _attribute_map = { - 'description': {'key': 'properties.description', 'type': 'str'}, - 'terms': {'key': 'properties.terms', 'type': 'str'}, - 'subscription_required': {'key': 'properties.subscriptionRequired', 'type': 'bool'}, - 'approval_required': {'key': 'properties.approvalRequired', 'type': 'bool'}, - 'subscriptions_limit': {'key': 'properties.subscriptionsLimit', 'type': 'int'}, - 'state': {'key': 'properties.state', 'type': 'ProductState'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ProductUpdateParameters, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.terms = kwargs.get('terms', None) - self.subscription_required = kwargs.get('subscription_required', None) - self.approval_required = kwargs.get('approval_required', None) - self.subscriptions_limit = kwargs.get('subscriptions_limit', None) - self.state = kwargs.get('state', None) - self.display_name = kwargs.get('display_name', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_update_parameters_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_update_parameters_py3.py deleted file mode 100644 index 9154962e697d..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/product_update_parameters_py3.py +++ /dev/null @@ -1,76 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ProductUpdateParameters(Model): - """Product Update parameters. - - :param description: Product description. May include HTML formatting tags. - :type description: str - :param terms: Product terms of use. Developers trying to subscribe to the - product will be presented and required to accept these terms before they - can complete the subscription process. - :type terms: str - :param subscription_required: Whether a product subscription is required - for accessing APIs included in this product. If true, the product is - referred to as "protected" and a valid subscription key is required for a - request to an API included in the product to succeed. If false, the - product is referred to as "open" and requests to an API included in the - product can be made without a subscription key. If property is omitted - when creating a new product it's value is assumed to be true. - :type subscription_required: bool - :param approval_required: whether subscription approval is required. If - false, new subscriptions will be approved automatically enabling - developers to call the product’s APIs immediately after subscribing. If - true, administrators must manually approve the subscription before the - developer can any of the product’s APIs. Can be present only if - subscriptionRequired property is present and has a value of false. - :type approval_required: bool - :param subscriptions_limit: Whether the number of subscriptions a user can - have to this product at the same time. Set to null or omit to allow - unlimited per user subscriptions. Can be present only if - subscriptionRequired property is present and has a value of false. - :type subscriptions_limit: int - :param state: whether product is published or not. Published products are - discoverable by users of developer portal. Non published products are - visible only to administrators. Default state of Product is notPublished. - Possible values include: 'notPublished', 'published' - :type state: str or ~azure.mgmt.apimanagement.models.ProductState - :param display_name: Product name. - :type display_name: str - """ - - _validation = { - 'description': {'max_length': 1000, 'min_length': 1}, - 'display_name': {'max_length': 300, 'min_length': 1}, - } - - _attribute_map = { - 'description': {'key': 'properties.description', 'type': 'str'}, - 'terms': {'key': 'properties.terms', 'type': 'str'}, - 'subscription_required': {'key': 'properties.subscriptionRequired', 'type': 'bool'}, - 'approval_required': {'key': 'properties.approvalRequired', 'type': 'bool'}, - 'subscriptions_limit': {'key': 'properties.subscriptionsLimit', 'type': 'int'}, - 'state': {'key': 'properties.state', 'type': 'ProductState'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - } - - def __init__(self, *, description: str=None, terms: str=None, subscription_required: bool=None, approval_required: bool=None, subscriptions_limit: int=None, state=None, display_name: str=None, **kwargs) -> None: - super(ProductUpdateParameters, self).__init__(**kwargs) - self.description = description - self.terms = terms - self.subscription_required = subscription_required - self.approval_required = approval_required - self.subscriptions_limit = subscriptions_limit - self.state = state - self.display_name = display_name diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/property_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/property_contract.py deleted file mode 100644 index aed61008da89..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/property_contract.py +++ /dev/null @@ -1,67 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class PropertyContract(Resource): - """Property details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param tags: Optional tags that when provided can be used to filter the - property list. - :type tags: list[str] - :param secret: Determines whether the value is a secret and should be - encrypted or not. Default value is false. - :type secret: bool - :param display_name: Required. Unique name of Property. It may contain - only letters, digits, period, dash, and underscore characters. - :type display_name: str - :param value: Required. Value of the property. Can contain policy - expressions. It may not be empty or consist only of whitespace. - :type value: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'max_items': 32}, - 'display_name': {'required': True, 'max_length': 256, 'min_length': 1, 'pattern': r'^[A-Za-z0-9-._]+$'}, - 'value': {'required': True, 'max_length': 4096, 'min_length': 1}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'properties.tags', 'type': '[str]'}, - 'secret': {'key': 'properties.secret', 'type': 'bool'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PropertyContract, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.secret = kwargs.get('secret', None) - self.display_name = kwargs.get('display_name', None) - self.value = kwargs.get('value', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/property_contract_paged.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/property_contract_paged.py deleted file mode 100644 index da50c40cf02a..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/property_contract_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class PropertyContractPaged(Paged): - """ - A paging container for iterating over a list of :class:`PropertyContract ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PropertyContract]'} - } - - def __init__(self, *args, **kwargs): - - super(PropertyContractPaged, self).__init__(*args, **kwargs) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/property_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/property_contract_py3.py deleted file mode 100644 index 36a779b263c2..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/property_contract_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class PropertyContract(Resource): - """Property details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param tags: Optional tags that when provided can be used to filter the - property list. - :type tags: list[str] - :param secret: Determines whether the value is a secret and should be - encrypted or not. Default value is false. - :type secret: bool - :param display_name: Required. Unique name of Property. It may contain - only letters, digits, period, dash, and underscore characters. - :type display_name: str - :param value: Required. Value of the property. Can contain policy - expressions. It may not be empty or consist only of whitespace. - :type value: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'max_items': 32}, - 'display_name': {'required': True, 'max_length': 256, 'min_length': 1, 'pattern': r'^[A-Za-z0-9-._]+$'}, - 'value': {'required': True, 'max_length': 4096, 'min_length': 1}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'properties.tags', 'type': '[str]'}, - 'secret': {'key': 'properties.secret', 'type': 'bool'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - } - - def __init__(self, *, display_name: str, value: str, tags=None, secret: bool=None, **kwargs) -> None: - super(PropertyContract, self).__init__(**kwargs) - self.tags = tags - self.secret = secret - self.display_name = display_name - self.value = value diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/property_entity_base_parameters.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/property_entity_base_parameters.py deleted file mode 100644 index 7666d3463f19..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/property_entity_base_parameters.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PropertyEntityBaseParameters(Model): - """Property Entity Base Parameters set. - - :param tags: Optional tags that when provided can be used to filter the - property list. - :type tags: list[str] - :param secret: Determines whether the value is a secret and should be - encrypted or not. Default value is false. - :type secret: bool - """ - - _validation = { - 'tags': {'max_items': 32}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '[str]'}, - 'secret': {'key': 'secret', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(PropertyEntityBaseParameters, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.secret = kwargs.get('secret', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/property_entity_base_parameters_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/property_entity_base_parameters_py3.py deleted file mode 100644 index e01077848439..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/property_entity_base_parameters_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PropertyEntityBaseParameters(Model): - """Property Entity Base Parameters set. - - :param tags: Optional tags that when provided can be used to filter the - property list. - :type tags: list[str] - :param secret: Determines whether the value is a secret and should be - encrypted or not. Default value is false. - :type secret: bool - """ - - _validation = { - 'tags': {'max_items': 32}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '[str]'}, - 'secret': {'key': 'secret', 'type': 'bool'}, - } - - def __init__(self, *, tags=None, secret: bool=None, **kwargs) -> None: - super(PropertyEntityBaseParameters, self).__init__(**kwargs) - self.tags = tags - self.secret = secret diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/property_update_parameters.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/property_update_parameters.py deleted file mode 100644 index 5a21c08aa09e..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/property_update_parameters.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PropertyUpdateParameters(Model): - """Property update Parameters. - - :param tags: Optional tags that when provided can be used to filter the - property list. - :type tags: list[str] - :param secret: Determines whether the value is a secret and should be - encrypted or not. Default value is false. - :type secret: bool - :param display_name: Unique name of Property. It may contain only letters, - digits, period, dash, and underscore characters. - :type display_name: str - :param value: Value of the property. Can contain policy expressions. It - may not be empty or consist only of whitespace. - :type value: str - """ - - _validation = { - 'tags': {'max_items': 32}, - 'display_name': {'max_length': 256, 'min_length': 1, 'pattern': r'^[A-Za-z0-9-._]+$'}, - 'value': {'max_length': 4096, 'min_length': 1}, - } - - _attribute_map = { - 'tags': {'key': 'properties.tags', 'type': '[str]'}, - 'secret': {'key': 'properties.secret', 'type': 'bool'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PropertyUpdateParameters, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.secret = kwargs.get('secret', None) - self.display_name = kwargs.get('display_name', None) - self.value = kwargs.get('value', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/property_update_parameters_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/property_update_parameters_py3.py deleted file mode 100644 index 18a8e255b6c4..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/property_update_parameters_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PropertyUpdateParameters(Model): - """Property update Parameters. - - :param tags: Optional tags that when provided can be used to filter the - property list. - :type tags: list[str] - :param secret: Determines whether the value is a secret and should be - encrypted or not. Default value is false. - :type secret: bool - :param display_name: Unique name of Property. It may contain only letters, - digits, period, dash, and underscore characters. - :type display_name: str - :param value: Value of the property. Can contain policy expressions. It - may not be empty or consist only of whitespace. - :type value: str - """ - - _validation = { - 'tags': {'max_items': 32}, - 'display_name': {'max_length': 256, 'min_length': 1, 'pattern': r'^[A-Za-z0-9-._]+$'}, - 'value': {'max_length': 4096, 'min_length': 1}, - } - - _attribute_map = { - 'tags': {'key': 'properties.tags', 'type': '[str]'}, - 'secret': {'key': 'properties.secret', 'type': 'bool'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - } - - def __init__(self, *, tags=None, secret: bool=None, display_name: str=None, value: str=None, **kwargs) -> None: - super(PropertyUpdateParameters, self).__init__(**kwargs) - self.tags = tags - self.secret = secret - self.display_name = display_name - self.value = value diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/quota_counter_collection.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/quota_counter_collection.py deleted file mode 100644 index 6785ba44e42a..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/quota_counter_collection.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QuotaCounterCollection(Model): - """Paged Quota Counter list representation. - - :param value: Quota counter values. - :type value: list[~azure.mgmt.apimanagement.models.QuotaCounterContract] - :param count: Total record count number across all pages. - :type count: long - :param next_link: Next page link if any. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[QuotaCounterContract]'}, - 'count': {'key': 'count', 'type': 'long'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(QuotaCounterCollection, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.count = kwargs.get('count', None) - self.next_link = kwargs.get('next_link', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/quota_counter_collection_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/quota_counter_collection_py3.py deleted file mode 100644 index 498623ce8b55..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/quota_counter_collection_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QuotaCounterCollection(Model): - """Paged Quota Counter list representation. - - :param value: Quota counter values. - :type value: list[~azure.mgmt.apimanagement.models.QuotaCounterContract] - :param count: Total record count number across all pages. - :type count: long - :param next_link: Next page link if any. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[QuotaCounterContract]'}, - 'count': {'key': 'count', 'type': 'long'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, *, value=None, count: int=None, next_link: str=None, **kwargs) -> None: - super(QuotaCounterCollection, self).__init__(**kwargs) - self.value = value - self.count = count - self.next_link = next_link diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/quota_counter_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/quota_counter_contract.py deleted file mode 100644 index ce05718d13f9..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/quota_counter_contract.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QuotaCounterContract(Model): - """Quota counter details. - - All required parameters must be populated in order to send to Azure. - - :param counter_key: Required. The Key value of the Counter. Must not be - empty. - :type counter_key: str - :param period_key: Required. Identifier of the Period for which the - counter was collected. Must not be empty. - :type period_key: str - :param period_start_time: Required. The date of the start of Counter - Period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` - as specified by the ISO 8601 standard. - :type period_start_time: datetime - :param period_end_time: Required. The date of the end of Counter Period. - The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as - specified by the ISO 8601 standard. - :type period_end_time: datetime - :param value: Quota Value Properties - :type value: - ~azure.mgmt.apimanagement.models.QuotaCounterValueContractProperties - """ - - _validation = { - 'counter_key': {'required': True, 'min_length': 1}, - 'period_key': {'required': True, 'min_length': 1}, - 'period_start_time': {'required': True}, - 'period_end_time': {'required': True}, - } - - _attribute_map = { - 'counter_key': {'key': 'counterKey', 'type': 'str'}, - 'period_key': {'key': 'periodKey', 'type': 'str'}, - 'period_start_time': {'key': 'periodStartTime', 'type': 'iso-8601'}, - 'period_end_time': {'key': 'periodEndTime', 'type': 'iso-8601'}, - 'value': {'key': 'value', 'type': 'QuotaCounterValueContractProperties'}, - } - - def __init__(self, **kwargs): - super(QuotaCounterContract, self).__init__(**kwargs) - self.counter_key = kwargs.get('counter_key', None) - self.period_key = kwargs.get('period_key', None) - self.period_start_time = kwargs.get('period_start_time', None) - self.period_end_time = kwargs.get('period_end_time', None) - self.value = kwargs.get('value', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/quota_counter_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/quota_counter_contract_py3.py deleted file mode 100644 index d3469173ad8b..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/quota_counter_contract_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QuotaCounterContract(Model): - """Quota counter details. - - All required parameters must be populated in order to send to Azure. - - :param counter_key: Required. The Key value of the Counter. Must not be - empty. - :type counter_key: str - :param period_key: Required. Identifier of the Period for which the - counter was collected. Must not be empty. - :type period_key: str - :param period_start_time: Required. The date of the start of Counter - Period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` - as specified by the ISO 8601 standard. - :type period_start_time: datetime - :param period_end_time: Required. The date of the end of Counter Period. - The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as - specified by the ISO 8601 standard. - :type period_end_time: datetime - :param value: Quota Value Properties - :type value: - ~azure.mgmt.apimanagement.models.QuotaCounterValueContractProperties - """ - - _validation = { - 'counter_key': {'required': True, 'min_length': 1}, - 'period_key': {'required': True, 'min_length': 1}, - 'period_start_time': {'required': True}, - 'period_end_time': {'required': True}, - } - - _attribute_map = { - 'counter_key': {'key': 'counterKey', 'type': 'str'}, - 'period_key': {'key': 'periodKey', 'type': 'str'}, - 'period_start_time': {'key': 'periodStartTime', 'type': 'iso-8601'}, - 'period_end_time': {'key': 'periodEndTime', 'type': 'iso-8601'}, - 'value': {'key': 'value', 'type': 'QuotaCounterValueContractProperties'}, - } - - def __init__(self, *, counter_key: str, period_key: str, period_start_time, period_end_time, value=None, **kwargs) -> None: - super(QuotaCounterContract, self).__init__(**kwargs) - self.counter_key = counter_key - self.period_key = period_key - self.period_start_time = period_start_time - self.period_end_time = period_end_time - self.value = value diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/quota_counter_value_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/quota_counter_value_contract.py deleted file mode 100644 index b09ad9d57dba..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/quota_counter_value_contract.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QuotaCounterValueContract(Model): - """Quota counter value details. - - :param calls_count: Number of times Counter was called. - :type calls_count: int - :param kb_transferred: Data Transferred in KiloBytes. - :type kb_transferred: float - """ - - _attribute_map = { - 'calls_count': {'key': 'value.callsCount', 'type': 'int'}, - 'kb_transferred': {'key': 'value.kbTransferred', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(QuotaCounterValueContract, self).__init__(**kwargs) - self.calls_count = kwargs.get('calls_count', None) - self.kb_transferred = kwargs.get('kb_transferred', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/quota_counter_value_contract_properties.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/quota_counter_value_contract_properties.py deleted file mode 100644 index f3109571e5a2..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/quota_counter_value_contract_properties.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QuotaCounterValueContractProperties(Model): - """Quota counter value details. - - :param calls_count: Number of times Counter was called. - :type calls_count: int - :param kb_transferred: Data Transferred in KiloBytes. - :type kb_transferred: float - """ - - _attribute_map = { - 'calls_count': {'key': 'callsCount', 'type': 'int'}, - 'kb_transferred': {'key': 'kbTransferred', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(QuotaCounterValueContractProperties, self).__init__(**kwargs) - self.calls_count = kwargs.get('calls_count', None) - self.kb_transferred = kwargs.get('kb_transferred', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/quota_counter_value_contract_properties_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/quota_counter_value_contract_properties_py3.py deleted file mode 100644 index d425c680cab8..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/quota_counter_value_contract_properties_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QuotaCounterValueContractProperties(Model): - """Quota counter value details. - - :param calls_count: Number of times Counter was called. - :type calls_count: int - :param kb_transferred: Data Transferred in KiloBytes. - :type kb_transferred: float - """ - - _attribute_map = { - 'calls_count': {'key': 'callsCount', 'type': 'int'}, - 'kb_transferred': {'key': 'kbTransferred', 'type': 'float'}, - } - - def __init__(self, *, calls_count: int=None, kb_transferred: float=None, **kwargs) -> None: - super(QuotaCounterValueContractProperties, self).__init__(**kwargs) - self.calls_count = calls_count - self.kb_transferred = kb_transferred diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/quota_counter_value_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/quota_counter_value_contract_py3.py deleted file mode 100644 index 2a2d0b9216e9..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/quota_counter_value_contract_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QuotaCounterValueContract(Model): - """Quota counter value details. - - :param calls_count: Number of times Counter was called. - :type calls_count: int - :param kb_transferred: Data Transferred in KiloBytes. - :type kb_transferred: float - """ - - _attribute_map = { - 'calls_count': {'key': 'value.callsCount', 'type': 'int'}, - 'kb_transferred': {'key': 'value.kbTransferred', 'type': 'float'}, - } - - def __init__(self, *, calls_count: int=None, kb_transferred: float=None, **kwargs) -> None: - super(QuotaCounterValueContract, self).__init__(**kwargs) - self.calls_count = calls_count - self.kb_transferred = kb_transferred diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/recipient_email_collection.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/recipient_email_collection.py deleted file mode 100644 index e56dbf2f3a19..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/recipient_email_collection.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RecipientEmailCollection(Model): - """Paged Recipient User list representation. - - :param value: Page values. - :type value: list[~azure.mgmt.apimanagement.models.RecipientEmailContract] - :param next_link: Next page link if any. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[RecipientEmailContract]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RecipientEmailCollection, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/recipient_email_collection_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/recipient_email_collection_py3.py deleted file mode 100644 index 20592d1ac7ce..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/recipient_email_collection_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RecipientEmailCollection(Model): - """Paged Recipient User list representation. - - :param value: Page values. - :type value: list[~azure.mgmt.apimanagement.models.RecipientEmailContract] - :param next_link: Next page link if any. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[RecipientEmailContract]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, *, value=None, next_link: str=None, **kwargs) -> None: - super(RecipientEmailCollection, self).__init__(**kwargs) - self.value = value - self.next_link = next_link diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/recipient_email_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/recipient_email_contract.py deleted file mode 100644 index 862e3f09c0f1..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/recipient_email_contract.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class RecipientEmailContract(Resource): - """Recipient Email details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param email: User Email subscribed to notification. - :type email: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'email': {'key': 'properties.email', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RecipientEmailContract, self).__init__(**kwargs) - self.email = kwargs.get('email', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/recipient_email_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/recipient_email_contract_py3.py deleted file mode 100644 index 175381652c07..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/recipient_email_contract_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class RecipientEmailContract(Resource): - """Recipient Email details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param email: User Email subscribed to notification. - :type email: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'email': {'key': 'properties.email', 'type': 'str'}, - } - - def __init__(self, *, email: str=None, **kwargs) -> None: - super(RecipientEmailContract, self).__init__(**kwargs) - self.email = email diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/recipient_user_collection.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/recipient_user_collection.py deleted file mode 100644 index 8555f416e541..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/recipient_user_collection.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RecipientUserCollection(Model): - """Paged Recipient User list representation. - - :param value: Page values. - :type value: list[~azure.mgmt.apimanagement.models.RecipientUserContract] - :param next_link: Next page link if any. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[RecipientUserContract]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RecipientUserCollection, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/recipient_user_collection_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/recipient_user_collection_py3.py deleted file mode 100644 index 1efa3a09c093..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/recipient_user_collection_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RecipientUserCollection(Model): - """Paged Recipient User list representation. - - :param value: Page values. - :type value: list[~azure.mgmt.apimanagement.models.RecipientUserContract] - :param next_link: Next page link if any. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[RecipientUserContract]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, *, value=None, next_link: str=None, **kwargs) -> None: - super(RecipientUserCollection, self).__init__(**kwargs) - self.value = value - self.next_link = next_link diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/recipient_user_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/recipient_user_contract.py deleted file mode 100644 index d357cd431be5..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/recipient_user_contract.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class RecipientUserContract(Resource): - """Recipient User details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param user_id: API Management UserId subscribed to notification. - :type user_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'user_id': {'key': 'properties.userId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RecipientUserContract, self).__init__(**kwargs) - self.user_id = kwargs.get('user_id', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/recipient_user_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/recipient_user_contract_py3.py deleted file mode 100644 index a3112c65a24d..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/recipient_user_contract_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class RecipientUserContract(Resource): - """Recipient User details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param user_id: API Management UserId subscribed to notification. - :type user_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'user_id': {'key': 'properties.userId', 'type': 'str'}, - } - - def __init__(self, *, user_id: str=None, **kwargs) -> None: - super(RecipientUserContract, self).__init__(**kwargs) - self.user_id = user_id diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/recipients_contract_properties.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/recipients_contract_properties.py deleted file mode 100644 index ec3457181ae8..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/recipients_contract_properties.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RecipientsContractProperties(Model): - """Notification Parameter contract. - - :param emails: List of Emails subscribed for the notification. - :type emails: list[str] - :param users: List of Users subscribed for the notification. - :type users: list[str] - """ - - _attribute_map = { - 'emails': {'key': 'emails', 'type': '[str]'}, - 'users': {'key': 'users', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(RecipientsContractProperties, self).__init__(**kwargs) - self.emails = kwargs.get('emails', None) - self.users = kwargs.get('users', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/recipients_contract_properties_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/recipients_contract_properties_py3.py deleted file mode 100644 index 4ee05780273d..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/recipients_contract_properties_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RecipientsContractProperties(Model): - """Notification Parameter contract. - - :param emails: List of Emails subscribed for the notification. - :type emails: list[str] - :param users: List of Users subscribed for the notification. - :type users: list[str] - """ - - _attribute_map = { - 'emails': {'key': 'emails', 'type': '[str]'}, - 'users': {'key': 'users', 'type': '[str]'}, - } - - def __init__(self, *, emails=None, users=None, **kwargs) -> None: - super(RecipientsContractProperties, self).__init__(**kwargs) - self.emails = emails - self.users = users diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/region_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/region_contract.py deleted file mode 100644 index b45ef72db4c0..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/region_contract.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RegionContract(Model): - """Region profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Region name. - :vartype name: str - :param is_master_region: whether Region is the master region. - :type is_master_region: bool - :param is_deleted: whether Region is deleted. - :type is_deleted: bool - """ - - _validation = { - 'name': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'is_master_region': {'key': 'isMasterRegion', 'type': 'bool'}, - 'is_deleted': {'key': 'isDeleted', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(RegionContract, self).__init__(**kwargs) - self.name = None - self.is_master_region = kwargs.get('is_master_region', None) - self.is_deleted = kwargs.get('is_deleted', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/region_contract_paged.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/region_contract_paged.py deleted file mode 100644 index d2d31024ffdd..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/region_contract_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RegionContractPaged(Paged): - """ - A paging container for iterating over a list of :class:`RegionContract ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RegionContract]'} - } - - def __init__(self, *args, **kwargs): - - super(RegionContractPaged, self).__init__(*args, **kwargs) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/region_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/region_contract_py3.py deleted file mode 100644 index 6818fd3baca6..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/region_contract_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RegionContract(Model): - """Region profile. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Region name. - :vartype name: str - :param is_master_region: whether Region is the master region. - :type is_master_region: bool - :param is_deleted: whether Region is deleted. - :type is_deleted: bool - """ - - _validation = { - 'name': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'is_master_region': {'key': 'isMasterRegion', 'type': 'bool'}, - 'is_deleted': {'key': 'isDeleted', 'type': 'bool'}, - } - - def __init__(self, *, is_master_region: bool=None, is_deleted: bool=None, **kwargs) -> None: - super(RegionContract, self).__init__(**kwargs) - self.name = None - self.is_master_region = is_master_region - self.is_deleted = is_deleted diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/registration_delegation_settings_properties.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/registration_delegation_settings_properties.py deleted file mode 100644 index d104cb341470..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/registration_delegation_settings_properties.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RegistrationDelegationSettingsProperties(Model): - """User registration delegation settings properties. - - :param enabled: Enable or disable delegation for user registration. - :type enabled: bool - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(RegistrationDelegationSettingsProperties, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/registration_delegation_settings_properties_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/registration_delegation_settings_properties_py3.py deleted file mode 100644 index 26b410a0720b..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/registration_delegation_settings_properties_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RegistrationDelegationSettingsProperties(Model): - """User registration delegation settings properties. - - :param enabled: Enable or disable delegation for user registration. - :type enabled: bool - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - } - - def __init__(self, *, enabled: bool=None, **kwargs) -> None: - super(RegistrationDelegationSettingsProperties, self).__init__(**kwargs) - self.enabled = enabled diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/report_record_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/report_record_contract.py deleted file mode 100644 index 21d19e4184e0..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/report_record_contract.py +++ /dev/null @@ -1,153 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReportRecordContract(Model): - """Report data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param name: Name depending on report endpoint specifies product, API, - operation or developer name. - :type name: str - :param timestamp: Start of aggregation period. The date conforms to the - following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 - standard. - :type timestamp: datetime - :param interval: Length of aggregation period. Interval must be multiple - of 15 minutes and may not be zero. The value should be in ISO 8601 format - (http://en.wikipedia.org/wiki/ISO_8601#Durations). - :type interval: str - :param country: Country to which this record data is related. - :type country: str - :param region: Country region to which this record data is related. - :type region: str - :param zip: Zip code to which this record data is related. - :type zip: str - :ivar user_id: User identifier path. /users/{userId} - :vartype user_id: str - :ivar product_id: Product identifier path. /products/{productId} - :vartype product_id: str - :param api_id: API identifier path. /apis/{apiId} - :type api_id: str - :param operation_id: Operation identifier path. - /apis/{apiId}/operations/{operationId} - :type operation_id: str - :param api_region: API region identifier. - :type api_region: str - :param subscription_id: Subscription identifier path. - /subscriptions/{subscriptionId} - :type subscription_id: str - :param call_count_success: Number of successful calls. This includes calls - returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and - HttpStatusCode.TemporaryRedirect - :type call_count_success: int - :param call_count_blocked: Number of calls blocked due to invalid - credentials. This includes calls returning HttpStatusCode.Unauthorized and - HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests - :type call_count_blocked: int - :param call_count_failed: Number of calls failed due to proxy or backend - errors. This includes calls returning HttpStatusCode.BadRequest(400) and - any Code between HttpStatusCode.InternalServerError (500) and 600 - :type call_count_failed: int - :param call_count_other: Number of other calls. - :type call_count_other: int - :param call_count_total: Total number of calls. - :type call_count_total: int - :param bandwidth: Bandwidth consumed. - :type bandwidth: long - :param cache_hit_count: Number of times when content was served from cache - policy. - :type cache_hit_count: int - :param cache_miss_count: Number of times content was fetched from backend. - :type cache_miss_count: int - :param api_time_avg: Average time it took to process request. - :type api_time_avg: float - :param api_time_min: Minimum time it took to process request. - :type api_time_min: float - :param api_time_max: Maximum time it took to process request. - :type api_time_max: float - :param service_time_avg: Average time it took to process request on - backend. - :type service_time_avg: float - :param service_time_min: Minimum time it took to process request on - backend. - :type service_time_min: float - :param service_time_max: Maximum time it took to process request on - backend. - :type service_time_max: float - """ - - _validation = { - 'user_id': {'readonly': True}, - 'product_id': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'interval': {'key': 'interval', 'type': 'str'}, - 'country': {'key': 'country', 'type': 'str'}, - 'region': {'key': 'region', 'type': 'str'}, - 'zip': {'key': 'zip', 'type': 'str'}, - 'user_id': {'key': 'userId', 'type': 'str'}, - 'product_id': {'key': 'productId', 'type': 'str'}, - 'api_id': {'key': 'apiId', 'type': 'str'}, - 'operation_id': {'key': 'operationId', 'type': 'str'}, - 'api_region': {'key': 'apiRegion', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'call_count_success': {'key': 'callCountSuccess', 'type': 'int'}, - 'call_count_blocked': {'key': 'callCountBlocked', 'type': 'int'}, - 'call_count_failed': {'key': 'callCountFailed', 'type': 'int'}, - 'call_count_other': {'key': 'callCountOther', 'type': 'int'}, - 'call_count_total': {'key': 'callCountTotal', 'type': 'int'}, - 'bandwidth': {'key': 'bandwidth', 'type': 'long'}, - 'cache_hit_count': {'key': 'cacheHitCount', 'type': 'int'}, - 'cache_miss_count': {'key': 'cacheMissCount', 'type': 'int'}, - 'api_time_avg': {'key': 'apiTimeAvg', 'type': 'float'}, - 'api_time_min': {'key': 'apiTimeMin', 'type': 'float'}, - 'api_time_max': {'key': 'apiTimeMax', 'type': 'float'}, - 'service_time_avg': {'key': 'serviceTimeAvg', 'type': 'float'}, - 'service_time_min': {'key': 'serviceTimeMin', 'type': 'float'}, - 'service_time_max': {'key': 'serviceTimeMax', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(ReportRecordContract, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.timestamp = kwargs.get('timestamp', None) - self.interval = kwargs.get('interval', None) - self.country = kwargs.get('country', None) - self.region = kwargs.get('region', None) - self.zip = kwargs.get('zip', None) - self.user_id = None - self.product_id = None - self.api_id = kwargs.get('api_id', None) - self.operation_id = kwargs.get('operation_id', None) - self.api_region = kwargs.get('api_region', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.call_count_success = kwargs.get('call_count_success', None) - self.call_count_blocked = kwargs.get('call_count_blocked', None) - self.call_count_failed = kwargs.get('call_count_failed', None) - self.call_count_other = kwargs.get('call_count_other', None) - self.call_count_total = kwargs.get('call_count_total', None) - self.bandwidth = kwargs.get('bandwidth', None) - self.cache_hit_count = kwargs.get('cache_hit_count', None) - self.cache_miss_count = kwargs.get('cache_miss_count', None) - self.api_time_avg = kwargs.get('api_time_avg', None) - self.api_time_min = kwargs.get('api_time_min', None) - self.api_time_max = kwargs.get('api_time_max', None) - self.service_time_avg = kwargs.get('service_time_avg', None) - self.service_time_min = kwargs.get('service_time_min', None) - self.service_time_max = kwargs.get('service_time_max', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/report_record_contract_paged.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/report_record_contract_paged.py deleted file mode 100644 index 94a23d6b3fd8..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/report_record_contract_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ReportRecordContractPaged(Paged): - """ - A paging container for iterating over a list of :class:`ReportRecordContract ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ReportRecordContract]'} - } - - def __init__(self, *args, **kwargs): - - super(ReportRecordContractPaged, self).__init__(*args, **kwargs) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/report_record_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/report_record_contract_py3.py deleted file mode 100644 index 465870d5fc01..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/report_record_contract_py3.py +++ /dev/null @@ -1,153 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReportRecordContract(Model): - """Report data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param name: Name depending on report endpoint specifies product, API, - operation or developer name. - :type name: str - :param timestamp: Start of aggregation period. The date conforms to the - following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 - standard. - :type timestamp: datetime - :param interval: Length of aggregation period. Interval must be multiple - of 15 minutes and may not be zero. The value should be in ISO 8601 format - (http://en.wikipedia.org/wiki/ISO_8601#Durations). - :type interval: str - :param country: Country to which this record data is related. - :type country: str - :param region: Country region to which this record data is related. - :type region: str - :param zip: Zip code to which this record data is related. - :type zip: str - :ivar user_id: User identifier path. /users/{userId} - :vartype user_id: str - :ivar product_id: Product identifier path. /products/{productId} - :vartype product_id: str - :param api_id: API identifier path. /apis/{apiId} - :type api_id: str - :param operation_id: Operation identifier path. - /apis/{apiId}/operations/{operationId} - :type operation_id: str - :param api_region: API region identifier. - :type api_region: str - :param subscription_id: Subscription identifier path. - /subscriptions/{subscriptionId} - :type subscription_id: str - :param call_count_success: Number of successful calls. This includes calls - returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and - HttpStatusCode.TemporaryRedirect - :type call_count_success: int - :param call_count_blocked: Number of calls blocked due to invalid - credentials. This includes calls returning HttpStatusCode.Unauthorized and - HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests - :type call_count_blocked: int - :param call_count_failed: Number of calls failed due to proxy or backend - errors. This includes calls returning HttpStatusCode.BadRequest(400) and - any Code between HttpStatusCode.InternalServerError (500) and 600 - :type call_count_failed: int - :param call_count_other: Number of other calls. - :type call_count_other: int - :param call_count_total: Total number of calls. - :type call_count_total: int - :param bandwidth: Bandwidth consumed. - :type bandwidth: long - :param cache_hit_count: Number of times when content was served from cache - policy. - :type cache_hit_count: int - :param cache_miss_count: Number of times content was fetched from backend. - :type cache_miss_count: int - :param api_time_avg: Average time it took to process request. - :type api_time_avg: float - :param api_time_min: Minimum time it took to process request. - :type api_time_min: float - :param api_time_max: Maximum time it took to process request. - :type api_time_max: float - :param service_time_avg: Average time it took to process request on - backend. - :type service_time_avg: float - :param service_time_min: Minimum time it took to process request on - backend. - :type service_time_min: float - :param service_time_max: Maximum time it took to process request on - backend. - :type service_time_max: float - """ - - _validation = { - 'user_id': {'readonly': True}, - 'product_id': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'interval': {'key': 'interval', 'type': 'str'}, - 'country': {'key': 'country', 'type': 'str'}, - 'region': {'key': 'region', 'type': 'str'}, - 'zip': {'key': 'zip', 'type': 'str'}, - 'user_id': {'key': 'userId', 'type': 'str'}, - 'product_id': {'key': 'productId', 'type': 'str'}, - 'api_id': {'key': 'apiId', 'type': 'str'}, - 'operation_id': {'key': 'operationId', 'type': 'str'}, - 'api_region': {'key': 'apiRegion', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'call_count_success': {'key': 'callCountSuccess', 'type': 'int'}, - 'call_count_blocked': {'key': 'callCountBlocked', 'type': 'int'}, - 'call_count_failed': {'key': 'callCountFailed', 'type': 'int'}, - 'call_count_other': {'key': 'callCountOther', 'type': 'int'}, - 'call_count_total': {'key': 'callCountTotal', 'type': 'int'}, - 'bandwidth': {'key': 'bandwidth', 'type': 'long'}, - 'cache_hit_count': {'key': 'cacheHitCount', 'type': 'int'}, - 'cache_miss_count': {'key': 'cacheMissCount', 'type': 'int'}, - 'api_time_avg': {'key': 'apiTimeAvg', 'type': 'float'}, - 'api_time_min': {'key': 'apiTimeMin', 'type': 'float'}, - 'api_time_max': {'key': 'apiTimeMax', 'type': 'float'}, - 'service_time_avg': {'key': 'serviceTimeAvg', 'type': 'float'}, - 'service_time_min': {'key': 'serviceTimeMin', 'type': 'float'}, - 'service_time_max': {'key': 'serviceTimeMax', 'type': 'float'}, - } - - def __init__(self, *, name: str=None, timestamp=None, interval: str=None, country: str=None, region: str=None, zip: str=None, api_id: str=None, operation_id: str=None, api_region: str=None, subscription_id: str=None, call_count_success: int=None, call_count_blocked: int=None, call_count_failed: int=None, call_count_other: int=None, call_count_total: int=None, bandwidth: int=None, cache_hit_count: int=None, cache_miss_count: int=None, api_time_avg: float=None, api_time_min: float=None, api_time_max: float=None, service_time_avg: float=None, service_time_min: float=None, service_time_max: float=None, **kwargs) -> None: - super(ReportRecordContract, self).__init__(**kwargs) - self.name = name - self.timestamp = timestamp - self.interval = interval - self.country = country - self.region = region - self.zip = zip - self.user_id = None - self.product_id = None - self.api_id = api_id - self.operation_id = operation_id - self.api_region = api_region - self.subscription_id = subscription_id - self.call_count_success = call_count_success - self.call_count_blocked = call_count_blocked - self.call_count_failed = call_count_failed - self.call_count_other = call_count_other - self.call_count_total = call_count_total - self.bandwidth = bandwidth - self.cache_hit_count = cache_hit_count - self.cache_miss_count = cache_miss_count - self.api_time_avg = api_time_avg - self.api_time_min = api_time_min - self.api_time_max = api_time_max - self.service_time_avg = service_time_avg - self.service_time_min = service_time_min - self.service_time_max = service_time_max diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/representation_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/representation_contract.py deleted file mode 100644 index 3bdfe5e8581e..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/representation_contract.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RepresentationContract(Model): - """Operation request/response representation details. - - All required parameters must be populated in order to send to Azure. - - :param content_type: Required. Specifies a registered or custom content - type for this representation, e.g. application/xml. - :type content_type: str - :param sample: An example of the representation. - :type sample: str - :param schema_id: Schema identifier. Applicable only if 'contentType' - value is neither 'application/x-www-form-urlencoded' nor - 'multipart/form-data'. - :type schema_id: str - :param type_name: Type name defined by the schema. Applicable only if - 'contentType' value is neither 'application/x-www-form-urlencoded' nor - 'multipart/form-data'. - :type type_name: str - :param form_parameters: Collection of form parameters. Required if - 'contentType' value is either 'application/x-www-form-urlencoded' or - 'multipart/form-data'.. - :type form_parameters: - list[~azure.mgmt.apimanagement.models.ParameterContract] - """ - - _validation = { - 'content_type': {'required': True}, - } - - _attribute_map = { - 'content_type': {'key': 'contentType', 'type': 'str'}, - 'sample': {'key': 'sample', 'type': 'str'}, - 'schema_id': {'key': 'schemaId', 'type': 'str'}, - 'type_name': {'key': 'typeName', 'type': 'str'}, - 'form_parameters': {'key': 'formParameters', 'type': '[ParameterContract]'}, - } - - def __init__(self, **kwargs): - super(RepresentationContract, self).__init__(**kwargs) - self.content_type = kwargs.get('content_type', None) - self.sample = kwargs.get('sample', None) - self.schema_id = kwargs.get('schema_id', None) - self.type_name = kwargs.get('type_name', None) - self.form_parameters = kwargs.get('form_parameters', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/representation_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/representation_contract_py3.py deleted file mode 100644 index 2dc5be839fe4..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/representation_contract_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RepresentationContract(Model): - """Operation request/response representation details. - - All required parameters must be populated in order to send to Azure. - - :param content_type: Required. Specifies a registered or custom content - type for this representation, e.g. application/xml. - :type content_type: str - :param sample: An example of the representation. - :type sample: str - :param schema_id: Schema identifier. Applicable only if 'contentType' - value is neither 'application/x-www-form-urlencoded' nor - 'multipart/form-data'. - :type schema_id: str - :param type_name: Type name defined by the schema. Applicable only if - 'contentType' value is neither 'application/x-www-form-urlencoded' nor - 'multipart/form-data'. - :type type_name: str - :param form_parameters: Collection of form parameters. Required if - 'contentType' value is either 'application/x-www-form-urlencoded' or - 'multipart/form-data'.. - :type form_parameters: - list[~azure.mgmt.apimanagement.models.ParameterContract] - """ - - _validation = { - 'content_type': {'required': True}, - } - - _attribute_map = { - 'content_type': {'key': 'contentType', 'type': 'str'}, - 'sample': {'key': 'sample', 'type': 'str'}, - 'schema_id': {'key': 'schemaId', 'type': 'str'}, - 'type_name': {'key': 'typeName', 'type': 'str'}, - 'form_parameters': {'key': 'formParameters', 'type': '[ParameterContract]'}, - } - - def __init__(self, *, content_type: str, sample: str=None, schema_id: str=None, type_name: str=None, form_parameters=None, **kwargs) -> None: - super(RepresentationContract, self).__init__(**kwargs) - self.content_type = content_type - self.sample = sample - self.schema_id = schema_id - self.type_name = type_name - self.form_parameters = form_parameters diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/request_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/request_contract.py deleted file mode 100644 index c576288d0328..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/request_contract.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RequestContract(Model): - """Operation request details. - - :param description: Operation request description. - :type description: str - :param query_parameters: Collection of operation request query parameters. - :type query_parameters: - list[~azure.mgmt.apimanagement.models.ParameterContract] - :param headers: Collection of operation request headers. - :type headers: list[~azure.mgmt.apimanagement.models.ParameterContract] - :param representations: Collection of operation request representations. - :type representations: - list[~azure.mgmt.apimanagement.models.RepresentationContract] - """ - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'query_parameters': {'key': 'queryParameters', 'type': '[ParameterContract]'}, - 'headers': {'key': 'headers', 'type': '[ParameterContract]'}, - 'representations': {'key': 'representations', 'type': '[RepresentationContract]'}, - } - - def __init__(self, **kwargs): - super(RequestContract, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.query_parameters = kwargs.get('query_parameters', None) - self.headers = kwargs.get('headers', None) - self.representations = kwargs.get('representations', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/request_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/request_contract_py3.py deleted file mode 100644 index b2d8810a7be0..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/request_contract_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RequestContract(Model): - """Operation request details. - - :param description: Operation request description. - :type description: str - :param query_parameters: Collection of operation request query parameters. - :type query_parameters: - list[~azure.mgmt.apimanagement.models.ParameterContract] - :param headers: Collection of operation request headers. - :type headers: list[~azure.mgmt.apimanagement.models.ParameterContract] - :param representations: Collection of operation request representations. - :type representations: - list[~azure.mgmt.apimanagement.models.RepresentationContract] - """ - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'query_parameters': {'key': 'queryParameters', 'type': '[ParameterContract]'}, - 'headers': {'key': 'headers', 'type': '[ParameterContract]'}, - 'representations': {'key': 'representations', 'type': '[RepresentationContract]'}, - } - - def __init__(self, *, description: str=None, query_parameters=None, headers=None, representations=None, **kwargs) -> None: - super(RequestContract, self).__init__(**kwargs) - self.description = description - self.query_parameters = query_parameters - self.headers = headers - self.representations = representations diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/request_report_record_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/request_report_record_contract.py deleted file mode 100644 index b63a4c377d97..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/request_report_record_contract.py +++ /dev/null @@ -1,114 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RequestReportRecordContract(Model): - """Request Report data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param api_id: API identifier path. /apis/{apiId} - :type api_id: str - :param operation_id: Operation identifier path. - /apis/{apiId}/operations/{operationId} - :type operation_id: str - :ivar product_id: Product identifier path. /products/{productId} - :vartype product_id: str - :ivar user_id: User identifier path. /users/{userId} - :vartype user_id: str - :param method: The HTTP method associated with this request.. - :type method: str - :param url: The full URL associated with this request. - :type url: str - :param ip_address: The client IP address associated with this request. - :type ip_address: str - :param backend_response_code: The HTTP status code received by the gateway - as a result of forwarding this request to the backend. - :type backend_response_code: str - :param response_code: The HTTP status code returned by the gateway. - :type response_code: int - :param response_size: The size of the response returned by the gateway. - :type response_size: int - :param timestamp: The date and time when this request was received by the - gateway in ISO 8601 format. - :type timestamp: datetime - :param cache: Specifies if response cache was involved in generating the - response. If the value is none, the cache was not used. If the value is - hit, cached response was returned. If the value is miss, the cache was - used but lookup resulted in a miss and request was fulfilled by the - backend. - :type cache: str - :param api_time: The total time it took to process this request. - :type api_time: float - :param service_time: he time it took to forward this request to the - backend and get the response back. - :type service_time: float - :param api_region: Azure region where the gateway that processed this - request is located. - :type api_region: str - :param subscription_id: Subscription identifier path. - /subscriptions/{subscriptionId} - :type subscription_id: str - :param request_id: Request Identifier. - :type request_id: str - :param request_size: The size of this request.. - :type request_size: int - """ - - _validation = { - 'product_id': {'readonly': True}, - 'user_id': {'readonly': True}, - } - - _attribute_map = { - 'api_id': {'key': 'apiId', 'type': 'str'}, - 'operation_id': {'key': 'operationId', 'type': 'str'}, - 'product_id': {'key': 'productId', 'type': 'str'}, - 'user_id': {'key': 'userId', 'type': 'str'}, - 'method': {'key': 'method', 'type': 'str'}, - 'url': {'key': 'url', 'type': 'str'}, - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - 'backend_response_code': {'key': 'backendResponseCode', 'type': 'str'}, - 'response_code': {'key': 'responseCode', 'type': 'int'}, - 'response_size': {'key': 'responseSize', 'type': 'int'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'cache': {'key': 'cache', 'type': 'str'}, - 'api_time': {'key': 'apiTime', 'type': 'float'}, - 'service_time': {'key': 'serviceTime', 'type': 'float'}, - 'api_region': {'key': 'apiRegion', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'request_id': {'key': 'requestId', 'type': 'str'}, - 'request_size': {'key': 'requestSize', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(RequestReportRecordContract, self).__init__(**kwargs) - self.api_id = kwargs.get('api_id', None) - self.operation_id = kwargs.get('operation_id', None) - self.product_id = None - self.user_id = None - self.method = kwargs.get('method', None) - self.url = kwargs.get('url', None) - self.ip_address = kwargs.get('ip_address', None) - self.backend_response_code = kwargs.get('backend_response_code', None) - self.response_code = kwargs.get('response_code', None) - self.response_size = kwargs.get('response_size', None) - self.timestamp = kwargs.get('timestamp', None) - self.cache = kwargs.get('cache', None) - self.api_time = kwargs.get('api_time', None) - self.service_time = kwargs.get('service_time', None) - self.api_region = kwargs.get('api_region', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.request_id = kwargs.get('request_id', None) - self.request_size = kwargs.get('request_size', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/request_report_record_contract_paged.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/request_report_record_contract_paged.py deleted file mode 100644 index f5cc659ead9e..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/request_report_record_contract_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RequestReportRecordContractPaged(Paged): - """ - A paging container for iterating over a list of :class:`RequestReportRecordContract ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RequestReportRecordContract]'} - } - - def __init__(self, *args, **kwargs): - - super(RequestReportRecordContractPaged, self).__init__(*args, **kwargs) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/request_report_record_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/request_report_record_contract_py3.py deleted file mode 100644 index c1c1e53646d2..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/request_report_record_contract_py3.py +++ /dev/null @@ -1,114 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RequestReportRecordContract(Model): - """Request Report data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param api_id: API identifier path. /apis/{apiId} - :type api_id: str - :param operation_id: Operation identifier path. - /apis/{apiId}/operations/{operationId} - :type operation_id: str - :ivar product_id: Product identifier path. /products/{productId} - :vartype product_id: str - :ivar user_id: User identifier path. /users/{userId} - :vartype user_id: str - :param method: The HTTP method associated with this request.. - :type method: str - :param url: The full URL associated with this request. - :type url: str - :param ip_address: The client IP address associated with this request. - :type ip_address: str - :param backend_response_code: The HTTP status code received by the gateway - as a result of forwarding this request to the backend. - :type backend_response_code: str - :param response_code: The HTTP status code returned by the gateway. - :type response_code: int - :param response_size: The size of the response returned by the gateway. - :type response_size: int - :param timestamp: The date and time when this request was received by the - gateway in ISO 8601 format. - :type timestamp: datetime - :param cache: Specifies if response cache was involved in generating the - response. If the value is none, the cache was not used. If the value is - hit, cached response was returned. If the value is miss, the cache was - used but lookup resulted in a miss and request was fulfilled by the - backend. - :type cache: str - :param api_time: The total time it took to process this request. - :type api_time: float - :param service_time: he time it took to forward this request to the - backend and get the response back. - :type service_time: float - :param api_region: Azure region where the gateway that processed this - request is located. - :type api_region: str - :param subscription_id: Subscription identifier path. - /subscriptions/{subscriptionId} - :type subscription_id: str - :param request_id: Request Identifier. - :type request_id: str - :param request_size: The size of this request.. - :type request_size: int - """ - - _validation = { - 'product_id': {'readonly': True}, - 'user_id': {'readonly': True}, - } - - _attribute_map = { - 'api_id': {'key': 'apiId', 'type': 'str'}, - 'operation_id': {'key': 'operationId', 'type': 'str'}, - 'product_id': {'key': 'productId', 'type': 'str'}, - 'user_id': {'key': 'userId', 'type': 'str'}, - 'method': {'key': 'method', 'type': 'str'}, - 'url': {'key': 'url', 'type': 'str'}, - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - 'backend_response_code': {'key': 'backendResponseCode', 'type': 'str'}, - 'response_code': {'key': 'responseCode', 'type': 'int'}, - 'response_size': {'key': 'responseSize', 'type': 'int'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'cache': {'key': 'cache', 'type': 'str'}, - 'api_time': {'key': 'apiTime', 'type': 'float'}, - 'service_time': {'key': 'serviceTime', 'type': 'float'}, - 'api_region': {'key': 'apiRegion', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'request_id': {'key': 'requestId', 'type': 'str'}, - 'request_size': {'key': 'requestSize', 'type': 'int'}, - } - - def __init__(self, *, api_id: str=None, operation_id: str=None, method: str=None, url: str=None, ip_address: str=None, backend_response_code: str=None, response_code: int=None, response_size: int=None, timestamp=None, cache: str=None, api_time: float=None, service_time: float=None, api_region: str=None, subscription_id: str=None, request_id: str=None, request_size: int=None, **kwargs) -> None: - super(RequestReportRecordContract, self).__init__(**kwargs) - self.api_id = api_id - self.operation_id = operation_id - self.product_id = None - self.user_id = None - self.method = method - self.url = url - self.ip_address = ip_address - self.backend_response_code = backend_response_code - self.response_code = response_code - self.response_size = response_size - self.timestamp = timestamp - self.cache = cache - self.api_time = api_time - self.service_time = service_time - self.api_region = api_region - self.subscription_id = subscription_id - self.request_id = request_id - self.request_size = request_size diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource.py deleted file mode 100644 index 228f9a4bad1a..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_py3.py deleted file mode 100644 index d847e3f57d60..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_sku.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_sku.py deleted file mode 100644 index c130ac57f637..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_sku.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSku(Model): - """Describes an available API Management SKU. - - :param name: Name of the Sku. Possible values include: 'Developer', - 'Standard', 'Premium', 'Basic', 'Consumption' - :type name: str or ~azure.mgmt.apimanagement.models.SkuType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceSku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_sku_capacity.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_sku_capacity.py deleted file mode 100644 index 54109ac235b1..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_sku_capacity.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSkuCapacity(Model): - """Describes scaling information of a SKU. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar minimum: The minimum capacity. - :vartype minimum: int - :ivar maximum: The maximum capacity that can be set. - :vartype maximum: int - :ivar default: The default capacity. - :vartype default: int - :ivar scale_type: The scale type applicable to the sku. Possible values - include: 'automatic', 'manual', 'none' - :vartype scale_type: str or - ~azure.mgmt.apimanagement.models.ResourceSkuCapacityScaleType - """ - - _validation = { - 'minimum': {'readonly': True}, - 'maximum': {'readonly': True}, - 'default': {'readonly': True}, - 'scale_type': {'readonly': True}, - } - - _attribute_map = { - 'minimum': {'key': 'minimum', 'type': 'int'}, - 'maximum': {'key': 'maximum', 'type': 'int'}, - 'default': {'key': 'default', 'type': 'int'}, - 'scale_type': {'key': 'scaleType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceSkuCapacity, self).__init__(**kwargs) - self.minimum = None - self.maximum = None - self.default = None - self.scale_type = None diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_sku_capacity_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_sku_capacity_py3.py deleted file mode 100644 index 27d799babc94..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_sku_capacity_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSkuCapacity(Model): - """Describes scaling information of a SKU. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar minimum: The minimum capacity. - :vartype minimum: int - :ivar maximum: The maximum capacity that can be set. - :vartype maximum: int - :ivar default: The default capacity. - :vartype default: int - :ivar scale_type: The scale type applicable to the sku. Possible values - include: 'automatic', 'manual', 'none' - :vartype scale_type: str or - ~azure.mgmt.apimanagement.models.ResourceSkuCapacityScaleType - """ - - _validation = { - 'minimum': {'readonly': True}, - 'maximum': {'readonly': True}, - 'default': {'readonly': True}, - 'scale_type': {'readonly': True}, - } - - _attribute_map = { - 'minimum': {'key': 'minimum', 'type': 'int'}, - 'maximum': {'key': 'maximum', 'type': 'int'}, - 'default': {'key': 'default', 'type': 'int'}, - 'scale_type': {'key': 'scaleType', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ResourceSkuCapacity, self).__init__(**kwargs) - self.minimum = None - self.maximum = None - self.default = None - self.scale_type = None diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_sku_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_sku_py3.py deleted file mode 100644 index 7e30812cefcd..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_sku_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSku(Model): - """Describes an available API Management SKU. - - :param name: Name of the Sku. Possible values include: 'Developer', - 'Standard', 'Premium', 'Basic', 'Consumption' - :type name: str or ~azure.mgmt.apimanagement.models.SkuType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name=None, **kwargs) -> None: - super(ResourceSku, self).__init__(**kwargs) - self.name = name diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_sku_result.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_sku_result.py deleted file mode 100644 index 7457c7bd9d0f..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_sku_result.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSkuResult(Model): - """Describes an available API Management service SKU. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_type: The type of resource the SKU applies to. - :vartype resource_type: str - :ivar sku: Specifies API Management SKU. - :vartype sku: ~azure.mgmt.apimanagement.models.ResourceSku - :ivar capacity: Specifies the number of API Management units. - :vartype capacity: ~azure.mgmt.apimanagement.models.ResourceSkuCapacity - """ - - _validation = { - 'resource_type': {'readonly': True}, - 'sku': {'readonly': True}, - 'capacity': {'readonly': True}, - } - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'ResourceSku'}, - 'capacity': {'key': 'capacity', 'type': 'ResourceSkuCapacity'}, - } - - def __init__(self, **kwargs): - super(ResourceSkuResult, self).__init__(**kwargs) - self.resource_type = None - self.sku = None - self.capacity = None diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_sku_result_paged.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_sku_result_paged.py deleted file mode 100644 index 1a888249f3d9..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_sku_result_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ResourceSkuResultPaged(Paged): - """ - A paging container for iterating over a list of :class:`ResourceSkuResult ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ResourceSkuResult]'} - } - - def __init__(self, *args, **kwargs): - - super(ResourceSkuResultPaged, self).__init__(*args, **kwargs) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_sku_result_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_sku_result_py3.py deleted file mode 100644 index 2a35b75ee655..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/resource_sku_result_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSkuResult(Model): - """Describes an available API Management service SKU. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_type: The type of resource the SKU applies to. - :vartype resource_type: str - :ivar sku: Specifies API Management SKU. - :vartype sku: ~azure.mgmt.apimanagement.models.ResourceSku - :ivar capacity: Specifies the number of API Management units. - :vartype capacity: ~azure.mgmt.apimanagement.models.ResourceSkuCapacity - """ - - _validation = { - 'resource_type': {'readonly': True}, - 'sku': {'readonly': True}, - 'capacity': {'readonly': True}, - } - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'ResourceSku'}, - 'capacity': {'key': 'capacity', 'type': 'ResourceSkuCapacity'}, - } - - def __init__(self, **kwargs) -> None: - super(ResourceSkuResult, self).__init__(**kwargs) - self.resource_type = None - self.sku = None - self.capacity = None diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/response_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/response_contract.py deleted file mode 100644 index 511adab1f030..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/response_contract.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResponseContract(Model): - """Operation response details. - - All required parameters must be populated in order to send to Azure. - - :param status_code: Required. Operation response HTTP status code. - :type status_code: int - :param description: Operation response description. - :type description: str - :param representations: Collection of operation response representations. - :type representations: - list[~azure.mgmt.apimanagement.models.RepresentationContract] - :param headers: Collection of operation response headers. - :type headers: list[~azure.mgmt.apimanagement.models.ParameterContract] - """ - - _validation = { - 'status_code': {'required': True}, - } - - _attribute_map = { - 'status_code': {'key': 'statusCode', 'type': 'int'}, - 'description': {'key': 'description', 'type': 'str'}, - 'representations': {'key': 'representations', 'type': '[RepresentationContract]'}, - 'headers': {'key': 'headers', 'type': '[ParameterContract]'}, - } - - def __init__(self, **kwargs): - super(ResponseContract, self).__init__(**kwargs) - self.status_code = kwargs.get('status_code', None) - self.description = kwargs.get('description', None) - self.representations = kwargs.get('representations', None) - self.headers = kwargs.get('headers', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/response_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/response_contract_py3.py deleted file mode 100644 index e2101f5e2c26..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/response_contract_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResponseContract(Model): - """Operation response details. - - All required parameters must be populated in order to send to Azure. - - :param status_code: Required. Operation response HTTP status code. - :type status_code: int - :param description: Operation response description. - :type description: str - :param representations: Collection of operation response representations. - :type representations: - list[~azure.mgmt.apimanagement.models.RepresentationContract] - :param headers: Collection of operation response headers. - :type headers: list[~azure.mgmt.apimanagement.models.ParameterContract] - """ - - _validation = { - 'status_code': {'required': True}, - } - - _attribute_map = { - 'status_code': {'key': 'statusCode', 'type': 'int'}, - 'description': {'key': 'description', 'type': 'str'}, - 'representations': {'key': 'representations', 'type': '[RepresentationContract]'}, - 'headers': {'key': 'headers', 'type': '[ParameterContract]'}, - } - - def __init__(self, *, status_code: int, description: str=None, representations=None, headers=None, **kwargs) -> None: - super(ResponseContract, self).__init__(**kwargs) - self.status_code = status_code - self.description = description - self.representations = representations - self.headers = headers diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/sampling_settings.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/sampling_settings.py deleted file mode 100644 index c773f5b593b1..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/sampling_settings.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SamplingSettings(Model): - """Sampling settings for Diagnostic. - - :param sampling_type: Sampling type. Possible values include: 'fixed' - :type sampling_type: str or ~azure.mgmt.apimanagement.models.SamplingType - :param percentage: Rate of sampling for fixed-rate sampling. - :type percentage: float - """ - - _validation = { - 'percentage': {'maximum': 100, 'minimum': 0}, - } - - _attribute_map = { - 'sampling_type': {'key': 'samplingType', 'type': 'str'}, - 'percentage': {'key': 'percentage', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(SamplingSettings, self).__init__(**kwargs) - self.sampling_type = kwargs.get('sampling_type', None) - self.percentage = kwargs.get('percentage', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/sampling_settings_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/sampling_settings_py3.py deleted file mode 100644 index 544dbda52a7f..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/sampling_settings_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SamplingSettings(Model): - """Sampling settings for Diagnostic. - - :param sampling_type: Sampling type. Possible values include: 'fixed' - :type sampling_type: str or ~azure.mgmt.apimanagement.models.SamplingType - :param percentage: Rate of sampling for fixed-rate sampling. - :type percentage: float - """ - - _validation = { - 'percentage': {'maximum': 100, 'minimum': 0}, - } - - _attribute_map = { - 'sampling_type': {'key': 'samplingType', 'type': 'str'}, - 'percentage': {'key': 'percentage', 'type': 'float'}, - } - - def __init__(self, *, sampling_type=None, percentage: float=None, **kwargs) -> None: - super(SamplingSettings, self).__init__(**kwargs) - self.sampling_type = sampling_type - self.percentage = percentage diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/save_configuration_parameter.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/save_configuration_parameter.py deleted file mode 100644 index 0350003491c4..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/save_configuration_parameter.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SaveConfigurationParameter(Model): - """Save Tenant Configuration Contract details. - - All required parameters must be populated in order to send to Azure. - - :param branch: Required. The name of the Git branch in which to commit the - current configuration snapshot. - :type branch: str - :param force: The value if true, the current configuration database is - committed to the Git repository, even if the Git repository has newer - changes that would be overwritten. - :type force: bool - """ - - _validation = { - 'branch': {'required': True}, - } - - _attribute_map = { - 'branch': {'key': 'properties.branch', 'type': 'str'}, - 'force': {'key': 'properties.force', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(SaveConfigurationParameter, self).__init__(**kwargs) - self.branch = kwargs.get('branch', None) - self.force = kwargs.get('force', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/save_configuration_parameter_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/save_configuration_parameter_py3.py deleted file mode 100644 index fb5acd418212..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/save_configuration_parameter_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SaveConfigurationParameter(Model): - """Save Tenant Configuration Contract details. - - All required parameters must be populated in order to send to Azure. - - :param branch: Required. The name of the Git branch in which to commit the - current configuration snapshot. - :type branch: str - :param force: The value if true, the current configuration database is - committed to the Git repository, even if the Git repository has newer - changes that would be overwritten. - :type force: bool - """ - - _validation = { - 'branch': {'required': True}, - } - - _attribute_map = { - 'branch': {'key': 'properties.branch', 'type': 'str'}, - 'force': {'key': 'properties.force', 'type': 'bool'}, - } - - def __init__(self, *, branch: str, force: bool=None, **kwargs) -> None: - super(SaveConfigurationParameter, self).__init__(**kwargs) - self.branch = branch - self.force = force diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/schema_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/schema_contract.py deleted file mode 100644 index 03ea8798496d..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/schema_contract.py +++ /dev/null @@ -1,59 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class SchemaContract(Resource): - """Schema Contract details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param content_type: Required. Must be a valid a media type used in a - Content-Type header as defined in the RFC 2616. Media type of the schema - document (e.g. application/json, application/xml).
- `Swagger` - Schema use `application/vnd.ms-azure-apim.swagger.definitions+json`
- - `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml`
- - `OpenApi` Schema use `application/vnd.oai.openapi.components+json`
- - `WADL Schema` use `application/vnd.ms-azure-apim.wadl.grammars+xml`. - :type content_type: str - :param document: Properties of the Schema Document. - :type document: object - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'content_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'content_type': {'key': 'properties.contentType', 'type': 'str'}, - 'document': {'key': 'properties.document', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(SchemaContract, self).__init__(**kwargs) - self.content_type = kwargs.get('content_type', None) - self.document = kwargs.get('document', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/schema_contract_paged.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/schema_contract_paged.py deleted file mode 100644 index 7c89d8c021ee..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/schema_contract_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SchemaContractPaged(Paged): - """ - A paging container for iterating over a list of :class:`SchemaContract ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SchemaContract]'} - } - - def __init__(self, *args, **kwargs): - - super(SchemaContractPaged, self).__init__(*args, **kwargs) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/schema_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/schema_contract_py3.py deleted file mode 100644 index bde8934130e2..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/schema_contract_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class SchemaContract(Resource): - """Schema Contract details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param content_type: Required. Must be a valid a media type used in a - Content-Type header as defined in the RFC 2616. Media type of the schema - document (e.g. application/json, application/xml).
- `Swagger` - Schema use `application/vnd.ms-azure-apim.swagger.definitions+json`
- - `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml`
- - `OpenApi` Schema use `application/vnd.oai.openapi.components+json`
- - `WADL Schema` use `application/vnd.ms-azure-apim.wadl.grammars+xml`. - :type content_type: str - :param document: Properties of the Schema Document. - :type document: object - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'content_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'content_type': {'key': 'properties.contentType', 'type': 'str'}, - 'document': {'key': 'properties.document', 'type': 'object'}, - } - - def __init__(self, *, content_type: str, document=None, **kwargs) -> None: - super(SchemaContract, self).__init__(**kwargs) - self.content_type = content_type - self.document = document diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/schema_create_or_update_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/schema_create_or_update_contract.py deleted file mode 100644 index c22e78058a1e..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/schema_create_or_update_contract.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class SchemaCreateOrUpdateContract(Resource): - """Schema Contract details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param content_type: Required. Must be a valid a media type used in a - Content-Type header as defined in the RFC 2616. Media type of the schema - document (e.g. application/json, application/xml).
- `Swagger` - Schema use `application/vnd.ms-azure-apim.swagger.definitions+json`
- - `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml`
- - `OpenApi` Schema use `application/vnd.oai.openapi.components+json`
- - `WADL Schema` use `application/vnd.ms-azure-apim.wadl.grammars+xml`. - :type content_type: str - :param value: Json escaped string defining the document representing the - Schema. - :type value: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'content_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'content_type': {'key': 'properties.contentType', 'type': 'str'}, - 'value': {'key': 'properties.document.value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SchemaCreateOrUpdateContract, self).__init__(**kwargs) - self.content_type = kwargs.get('content_type', None) - self.value = kwargs.get('value', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/schema_create_or_update_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/schema_create_or_update_contract_py3.py deleted file mode 100644 index 75aa161af9b8..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/schema_create_or_update_contract_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class SchemaCreateOrUpdateContract(Resource): - """Schema Contract details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param content_type: Required. Must be a valid a media type used in a - Content-Type header as defined in the RFC 2616. Media type of the schema - document (e.g. application/json, application/xml).
- `Swagger` - Schema use `application/vnd.ms-azure-apim.swagger.definitions+json`
- - `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml`
- - `OpenApi` Schema use `application/vnd.oai.openapi.components+json`
- - `WADL Schema` use `application/vnd.ms-azure-apim.wadl.grammars+xml`. - :type content_type: str - :param value: Json escaped string defining the document representing the - Schema. - :type value: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'content_type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'content_type': {'key': 'properties.contentType', 'type': 'str'}, - 'value': {'key': 'properties.document.value', 'type': 'str'}, - } - - def __init__(self, *, content_type: str, value: str=None, **kwargs) -> None: - super(SchemaCreateOrUpdateContract, self).__init__(**kwargs) - self.content_type = content_type - self.value = value diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_contract.py deleted file mode 100644 index 98d716699780..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_contract.py +++ /dev/null @@ -1,131 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class SubscriptionContract(Resource): - """Subscription details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param owner_id: The user resource identifier of the subscription owner. - The value is a valid relative URL in the format of /users/{userId} where - {userId} is a user identifier. - :type owner_id: str - :param scope: Required. Scope like /products/{productId} or /apis or - /apis/{apiId}. - :type scope: str - :param display_name: The name of the subscription, or null if the - subscription has no name. - :type display_name: str - :param state: Required. Subscription state. Possible states are * active – - the subscription is active, * suspended – the subscription is blocked, and - the subscriber cannot call any APIs of the product, * submitted – the - subscription request has been made by the developer, but has not yet been - approved or rejected, * rejected – the subscription request has been - denied by an administrator, * cancelled – the subscription has been - cancelled by the developer or administrator, * expired – the subscription - reached its expiration date and was deactivated. Possible values include: - 'suspended', 'active', 'expired', 'submitted', 'rejected', 'cancelled' - :type state: str or ~azure.mgmt.apimanagement.models.SubscriptionState - :ivar created_date: Subscription creation date. The date conforms to the - following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 - standard. - :vartype created_date: datetime - :param start_date: Subscription activation date. The setting is for audit - purposes only and the subscription is not automatically activated. The - subscription lifecycle can be managed by using the `state` property. The - date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified - by the ISO 8601 standard. - :type start_date: datetime - :param expiration_date: Subscription expiration date. The setting is for - audit purposes only and the subscription is not automatically expired. The - subscription lifecycle can be managed by using the `state` property. The - date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified - by the ISO 8601 standard. - :type expiration_date: datetime - :param end_date: Date when subscription was cancelled or expired. The - setting is for audit purposes only and the subscription is not - automatically cancelled. The subscription lifecycle can be managed by - using the `state` property. The date conforms to the following format: - `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - :type end_date: datetime - :param notification_date: Upcoming subscription expiration notification - date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as - specified by the ISO 8601 standard. - :type notification_date: datetime - :param primary_key: Required. Subscription primary key. - :type primary_key: str - :param secondary_key: Required. Subscription secondary key. - :type secondary_key: str - :param state_comment: Optional subscription comment added by an - administrator. - :type state_comment: str - :param allow_tracing: Determines whether tracing is enabled - :type allow_tracing: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'scope': {'required': True}, - 'display_name': {'max_length': 100, 'min_length': 0}, - 'state': {'required': True}, - 'created_date': {'readonly': True}, - 'primary_key': {'required': True, 'max_length': 256, 'min_length': 1}, - 'secondary_key': {'required': True, 'max_length': 256, 'min_length': 1}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'owner_id': {'key': 'properties.ownerId', 'type': 'str'}, - 'scope': {'key': 'properties.scope', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SubscriptionState'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'start_date': {'key': 'properties.startDate', 'type': 'iso-8601'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'end_date': {'key': 'properties.endDate', 'type': 'iso-8601'}, - 'notification_date': {'key': 'properties.notificationDate', 'type': 'iso-8601'}, - 'primary_key': {'key': 'properties.primaryKey', 'type': 'str'}, - 'secondary_key': {'key': 'properties.secondaryKey', 'type': 'str'}, - 'state_comment': {'key': 'properties.stateComment', 'type': 'str'}, - 'allow_tracing': {'key': 'properties.allowTracing', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(SubscriptionContract, self).__init__(**kwargs) - self.owner_id = kwargs.get('owner_id', None) - self.scope = kwargs.get('scope', None) - self.display_name = kwargs.get('display_name', None) - self.state = kwargs.get('state', None) - self.created_date = None - self.start_date = kwargs.get('start_date', None) - self.expiration_date = kwargs.get('expiration_date', None) - self.end_date = kwargs.get('end_date', None) - self.notification_date = kwargs.get('notification_date', None) - self.primary_key = kwargs.get('primary_key', None) - self.secondary_key = kwargs.get('secondary_key', None) - self.state_comment = kwargs.get('state_comment', None) - self.allow_tracing = kwargs.get('allow_tracing', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_contract_paged.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_contract_paged.py deleted file mode 100644 index b781048674f1..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_contract_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SubscriptionContractPaged(Paged): - """ - A paging container for iterating over a list of :class:`SubscriptionContract ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SubscriptionContract]'} - } - - def __init__(self, *args, **kwargs): - - super(SubscriptionContractPaged, self).__init__(*args, **kwargs) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_contract_py3.py deleted file mode 100644 index 3735162a4c76..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_contract_py3.py +++ /dev/null @@ -1,131 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class SubscriptionContract(Resource): - """Subscription details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param owner_id: The user resource identifier of the subscription owner. - The value is a valid relative URL in the format of /users/{userId} where - {userId} is a user identifier. - :type owner_id: str - :param scope: Required. Scope like /products/{productId} or /apis or - /apis/{apiId}. - :type scope: str - :param display_name: The name of the subscription, or null if the - subscription has no name. - :type display_name: str - :param state: Required. Subscription state. Possible states are * active – - the subscription is active, * suspended – the subscription is blocked, and - the subscriber cannot call any APIs of the product, * submitted – the - subscription request has been made by the developer, but has not yet been - approved or rejected, * rejected – the subscription request has been - denied by an administrator, * cancelled – the subscription has been - cancelled by the developer or administrator, * expired – the subscription - reached its expiration date and was deactivated. Possible values include: - 'suspended', 'active', 'expired', 'submitted', 'rejected', 'cancelled' - :type state: str or ~azure.mgmt.apimanagement.models.SubscriptionState - :ivar created_date: Subscription creation date. The date conforms to the - following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 - standard. - :vartype created_date: datetime - :param start_date: Subscription activation date. The setting is for audit - purposes only and the subscription is not automatically activated. The - subscription lifecycle can be managed by using the `state` property. The - date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified - by the ISO 8601 standard. - :type start_date: datetime - :param expiration_date: Subscription expiration date. The setting is for - audit purposes only and the subscription is not automatically expired. The - subscription lifecycle can be managed by using the `state` property. The - date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified - by the ISO 8601 standard. - :type expiration_date: datetime - :param end_date: Date when subscription was cancelled or expired. The - setting is for audit purposes only and the subscription is not - automatically cancelled. The subscription lifecycle can be managed by - using the `state` property. The date conforms to the following format: - `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - :type end_date: datetime - :param notification_date: Upcoming subscription expiration notification - date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as - specified by the ISO 8601 standard. - :type notification_date: datetime - :param primary_key: Required. Subscription primary key. - :type primary_key: str - :param secondary_key: Required. Subscription secondary key. - :type secondary_key: str - :param state_comment: Optional subscription comment added by an - administrator. - :type state_comment: str - :param allow_tracing: Determines whether tracing is enabled - :type allow_tracing: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'scope': {'required': True}, - 'display_name': {'max_length': 100, 'min_length': 0}, - 'state': {'required': True}, - 'created_date': {'readonly': True}, - 'primary_key': {'required': True, 'max_length': 256, 'min_length': 1}, - 'secondary_key': {'required': True, 'max_length': 256, 'min_length': 1}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'owner_id': {'key': 'properties.ownerId', 'type': 'str'}, - 'scope': {'key': 'properties.scope', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SubscriptionState'}, - 'created_date': {'key': 'properties.createdDate', 'type': 'iso-8601'}, - 'start_date': {'key': 'properties.startDate', 'type': 'iso-8601'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'end_date': {'key': 'properties.endDate', 'type': 'iso-8601'}, - 'notification_date': {'key': 'properties.notificationDate', 'type': 'iso-8601'}, - 'primary_key': {'key': 'properties.primaryKey', 'type': 'str'}, - 'secondary_key': {'key': 'properties.secondaryKey', 'type': 'str'}, - 'state_comment': {'key': 'properties.stateComment', 'type': 'str'}, - 'allow_tracing': {'key': 'properties.allowTracing', 'type': 'bool'}, - } - - def __init__(self, *, scope: str, state, primary_key: str, secondary_key: str, owner_id: str=None, display_name: str=None, start_date=None, expiration_date=None, end_date=None, notification_date=None, state_comment: str=None, allow_tracing: bool=None, **kwargs) -> None: - super(SubscriptionContract, self).__init__(**kwargs) - self.owner_id = owner_id - self.scope = scope - self.display_name = display_name - self.state = state - self.created_date = None - self.start_date = start_date - self.expiration_date = expiration_date - self.end_date = end_date - self.notification_date = notification_date - self.primary_key = primary_key - self.secondary_key = secondary_key - self.state_comment = state_comment - self.allow_tracing = allow_tracing diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_create_parameters.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_create_parameters.py deleted file mode 100644 index 9d5789c6a4a4..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_create_parameters.py +++ /dev/null @@ -1,74 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubscriptionCreateParameters(Model): - """Subscription create details. - - All required parameters must be populated in order to send to Azure. - - :param owner_id: User (user id path) for whom subscription is being - created in form /users/{userId} - :type owner_id: str - :param scope: Required. Scope like /products/{productId} or /apis or - /apis/{apiId}. - :type scope: str - :param display_name: Required. Subscription name. - :type display_name: str - :param primary_key: Primary subscription key. If not specified during - request key will be generated automatically. - :type primary_key: str - :param secondary_key: Secondary subscription key. If not specified during - request key will be generated automatically. - :type secondary_key: str - :param state: Initial subscription state. If no value is specified, - subscription is created with Submitted state. Possible states are * active - – the subscription is active, * suspended – the subscription is blocked, - and the subscriber cannot call any APIs of the product, * submitted – the - subscription request has been made by the developer, but has not yet been - approved or rejected, * rejected – the subscription request has been - denied by an administrator, * cancelled – the subscription has been - cancelled by the developer or administrator, * expired – the subscription - reached its expiration date and was deactivated. Possible values include: - 'suspended', 'active', 'expired', 'submitted', 'rejected', 'cancelled' - :type state: str or ~azure.mgmt.apimanagement.models.SubscriptionState - :param allow_tracing: Determines whether tracing can be enabled - :type allow_tracing: bool - """ - - _validation = { - 'scope': {'required': True}, - 'display_name': {'required': True, 'max_length': 100, 'min_length': 1}, - 'primary_key': {'max_length': 256, 'min_length': 1}, - 'secondary_key': {'max_length': 256, 'min_length': 1}, - } - - _attribute_map = { - 'owner_id': {'key': 'properties.ownerId', 'type': 'str'}, - 'scope': {'key': 'properties.scope', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'primary_key': {'key': 'properties.primaryKey', 'type': 'str'}, - 'secondary_key': {'key': 'properties.secondaryKey', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SubscriptionState'}, - 'allow_tracing': {'key': 'properties.allowTracing', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(SubscriptionCreateParameters, self).__init__(**kwargs) - self.owner_id = kwargs.get('owner_id', None) - self.scope = kwargs.get('scope', None) - self.display_name = kwargs.get('display_name', None) - self.primary_key = kwargs.get('primary_key', None) - self.secondary_key = kwargs.get('secondary_key', None) - self.state = kwargs.get('state', None) - self.allow_tracing = kwargs.get('allow_tracing', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_create_parameters_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_create_parameters_py3.py deleted file mode 100644 index 10eac288ec91..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_create_parameters_py3.py +++ /dev/null @@ -1,74 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubscriptionCreateParameters(Model): - """Subscription create details. - - All required parameters must be populated in order to send to Azure. - - :param owner_id: User (user id path) for whom subscription is being - created in form /users/{userId} - :type owner_id: str - :param scope: Required. Scope like /products/{productId} or /apis or - /apis/{apiId}. - :type scope: str - :param display_name: Required. Subscription name. - :type display_name: str - :param primary_key: Primary subscription key. If not specified during - request key will be generated automatically. - :type primary_key: str - :param secondary_key: Secondary subscription key. If not specified during - request key will be generated automatically. - :type secondary_key: str - :param state: Initial subscription state. If no value is specified, - subscription is created with Submitted state. Possible states are * active - – the subscription is active, * suspended – the subscription is blocked, - and the subscriber cannot call any APIs of the product, * submitted – the - subscription request has been made by the developer, but has not yet been - approved or rejected, * rejected – the subscription request has been - denied by an administrator, * cancelled – the subscription has been - cancelled by the developer or administrator, * expired – the subscription - reached its expiration date and was deactivated. Possible values include: - 'suspended', 'active', 'expired', 'submitted', 'rejected', 'cancelled' - :type state: str or ~azure.mgmt.apimanagement.models.SubscriptionState - :param allow_tracing: Determines whether tracing can be enabled - :type allow_tracing: bool - """ - - _validation = { - 'scope': {'required': True}, - 'display_name': {'required': True, 'max_length': 100, 'min_length': 1}, - 'primary_key': {'max_length': 256, 'min_length': 1}, - 'secondary_key': {'max_length': 256, 'min_length': 1}, - } - - _attribute_map = { - 'owner_id': {'key': 'properties.ownerId', 'type': 'str'}, - 'scope': {'key': 'properties.scope', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'primary_key': {'key': 'properties.primaryKey', 'type': 'str'}, - 'secondary_key': {'key': 'properties.secondaryKey', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SubscriptionState'}, - 'allow_tracing': {'key': 'properties.allowTracing', 'type': 'bool'}, - } - - def __init__(self, *, scope: str, display_name: str, owner_id: str=None, primary_key: str=None, secondary_key: str=None, state=None, allow_tracing: bool=None, **kwargs) -> None: - super(SubscriptionCreateParameters, self).__init__(**kwargs) - self.owner_id = owner_id - self.scope = scope - self.display_name = display_name - self.primary_key = primary_key - self.secondary_key = secondary_key - self.state = state - self.allow_tracing = allow_tracing diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_key_parameter_names_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_key_parameter_names_contract.py deleted file mode 100644 index f211ba47878c..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_key_parameter_names_contract.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubscriptionKeyParameterNamesContract(Model): - """Subscription key parameter names details. - - :param header: Subscription key header name. - :type header: str - :param query: Subscription key query string parameter name. - :type query: str - """ - - _attribute_map = { - 'header': {'key': 'header', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubscriptionKeyParameterNamesContract, self).__init__(**kwargs) - self.header = kwargs.get('header', None) - self.query = kwargs.get('query', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_key_parameter_names_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_key_parameter_names_contract_py3.py deleted file mode 100644 index b1163f189a3f..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_key_parameter_names_contract_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubscriptionKeyParameterNamesContract(Model): - """Subscription key parameter names details. - - :param header: Subscription key header name. - :type header: str - :param query: Subscription key query string parameter name. - :type query: str - """ - - _attribute_map = { - 'header': {'key': 'header', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'str'}, - } - - def __init__(self, *, header: str=None, query: str=None, **kwargs) -> None: - super(SubscriptionKeyParameterNamesContract, self).__init__(**kwargs) - self.header = header - self.query = query diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_update_parameters.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_update_parameters.py deleted file mode 100644 index c17af927f3ad..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_update_parameters.py +++ /dev/null @@ -1,78 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubscriptionUpdateParameters(Model): - """Subscription update details. - - :param owner_id: User identifier path: /users/{userId} - :type owner_id: str - :param scope: Scope like /products/{productId} or /apis or /apis/{apiId} - :type scope: str - :param expiration_date: Subscription expiration date. The setting is for - audit purposes only and the subscription is not automatically expired. The - subscription lifecycle can be managed by using the `state` property. The - date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified - by the ISO 8601 standard. - :type expiration_date: datetime - :param display_name: Subscription name. - :type display_name: str - :param primary_key: Primary subscription key. - :type primary_key: str - :param secondary_key: Secondary subscription key. - :type secondary_key: str - :param state: Subscription state. Possible states are * active – the - subscription is active, * suspended – the subscription is blocked, and the - subscriber cannot call any APIs of the product, * submitted – the - subscription request has been made by the developer, but has not yet been - approved or rejected, * rejected – the subscription request has been - denied by an administrator, * cancelled – the subscription has been - cancelled by the developer or administrator, * expired – the subscription - reached its expiration date and was deactivated. Possible values include: - 'suspended', 'active', 'expired', 'submitted', 'rejected', 'cancelled' - :type state: str or ~azure.mgmt.apimanagement.models.SubscriptionState - :param state_comment: Comments describing subscription state change by the - administrator. - :type state_comment: str - :param allow_tracing: Determines whether tracing can be enabled - :type allow_tracing: bool - """ - - _validation = { - 'primary_key': {'max_length': 256, 'min_length': 1}, - 'secondary_key': {'max_length': 256, 'min_length': 1}, - } - - _attribute_map = { - 'owner_id': {'key': 'properties.ownerId', 'type': 'str'}, - 'scope': {'key': 'properties.scope', 'type': 'str'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'primary_key': {'key': 'properties.primaryKey', 'type': 'str'}, - 'secondary_key': {'key': 'properties.secondaryKey', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SubscriptionState'}, - 'state_comment': {'key': 'properties.stateComment', 'type': 'str'}, - 'allow_tracing': {'key': 'properties.allowTracing', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(SubscriptionUpdateParameters, self).__init__(**kwargs) - self.owner_id = kwargs.get('owner_id', None) - self.scope = kwargs.get('scope', None) - self.expiration_date = kwargs.get('expiration_date', None) - self.display_name = kwargs.get('display_name', None) - self.primary_key = kwargs.get('primary_key', None) - self.secondary_key = kwargs.get('secondary_key', None) - self.state = kwargs.get('state', None) - self.state_comment = kwargs.get('state_comment', None) - self.allow_tracing = kwargs.get('allow_tracing', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_update_parameters_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_update_parameters_py3.py deleted file mode 100644 index 18e1dd2f5df8..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscription_update_parameters_py3.py +++ /dev/null @@ -1,78 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubscriptionUpdateParameters(Model): - """Subscription update details. - - :param owner_id: User identifier path: /users/{userId} - :type owner_id: str - :param scope: Scope like /products/{productId} or /apis or /apis/{apiId} - :type scope: str - :param expiration_date: Subscription expiration date. The setting is for - audit purposes only and the subscription is not automatically expired. The - subscription lifecycle can be managed by using the `state` property. The - date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified - by the ISO 8601 standard. - :type expiration_date: datetime - :param display_name: Subscription name. - :type display_name: str - :param primary_key: Primary subscription key. - :type primary_key: str - :param secondary_key: Secondary subscription key. - :type secondary_key: str - :param state: Subscription state. Possible states are * active – the - subscription is active, * suspended – the subscription is blocked, and the - subscriber cannot call any APIs of the product, * submitted – the - subscription request has been made by the developer, but has not yet been - approved or rejected, * rejected – the subscription request has been - denied by an administrator, * cancelled – the subscription has been - cancelled by the developer or administrator, * expired – the subscription - reached its expiration date and was deactivated. Possible values include: - 'suspended', 'active', 'expired', 'submitted', 'rejected', 'cancelled' - :type state: str or ~azure.mgmt.apimanagement.models.SubscriptionState - :param state_comment: Comments describing subscription state change by the - administrator. - :type state_comment: str - :param allow_tracing: Determines whether tracing can be enabled - :type allow_tracing: bool - """ - - _validation = { - 'primary_key': {'max_length': 256, 'min_length': 1}, - 'secondary_key': {'max_length': 256, 'min_length': 1}, - } - - _attribute_map = { - 'owner_id': {'key': 'properties.ownerId', 'type': 'str'}, - 'scope': {'key': 'properties.scope', 'type': 'str'}, - 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'primary_key': {'key': 'properties.primaryKey', 'type': 'str'}, - 'secondary_key': {'key': 'properties.secondaryKey', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'SubscriptionState'}, - 'state_comment': {'key': 'properties.stateComment', 'type': 'str'}, - 'allow_tracing': {'key': 'properties.allowTracing', 'type': 'bool'}, - } - - def __init__(self, *, owner_id: str=None, scope: str=None, expiration_date=None, display_name: str=None, primary_key: str=None, secondary_key: str=None, state=None, state_comment: str=None, allow_tracing: bool=None, **kwargs) -> None: - super(SubscriptionUpdateParameters, self).__init__(**kwargs) - self.owner_id = owner_id - self.scope = scope - self.expiration_date = expiration_date - self.display_name = display_name - self.primary_key = primary_key - self.secondary_key = secondary_key - self.state = state - self.state_comment = state_comment - self.allow_tracing = allow_tracing diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscriptions_delegation_settings_properties.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscriptions_delegation_settings_properties.py deleted file mode 100644 index 82beeab1135d..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscriptions_delegation_settings_properties.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubscriptionsDelegationSettingsProperties(Model): - """Subscriptions delegation settings properties. - - :param enabled: Enable or disable delegation for subscriptions. - :type enabled: bool - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(SubscriptionsDelegationSettingsProperties, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscriptions_delegation_settings_properties_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscriptions_delegation_settings_properties_py3.py deleted file mode 100644 index 61fab5253a59..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/subscriptions_delegation_settings_properties_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubscriptionsDelegationSettingsProperties(Model): - """Subscriptions delegation settings properties. - - :param enabled: Enable or disable delegation for subscriptions. - :type enabled: bool - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - } - - def __init__(self, *, enabled: bool=None, **kwargs) -> None: - super(SubscriptionsDelegationSettingsProperties, self).__init__(**kwargs) - self.enabled = enabled diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_contract.py deleted file mode 100644 index d0b129412cf1..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_contract.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class TagContract(Resource): - """Tag Contract details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param display_name: Required. Tag name. - :type display_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'display_name': {'required': True, 'max_length': 160, 'min_length': 1}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TagContract, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_contract_paged.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_contract_paged.py deleted file mode 100644 index 48974c2715cf..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_contract_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class TagContractPaged(Paged): - """ - A paging container for iterating over a list of :class:`TagContract ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[TagContract]'} - } - - def __init__(self, *args, **kwargs): - - super(TagContractPaged, self).__init__(*args, **kwargs) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_contract_py3.py deleted file mode 100644 index 175c0410c173..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_contract_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class TagContract(Resource): - """Tag Contract details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param display_name: Required. Tag name. - :type display_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'display_name': {'required': True, 'max_length': 160, 'min_length': 1}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - } - - def __init__(self, *, display_name: str, **kwargs) -> None: - super(TagContract, self).__init__(**kwargs) - self.display_name = display_name diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_create_update_parameters.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_create_update_parameters.py deleted file mode 100644 index c133f3ffbf39..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_create_update_parameters.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TagCreateUpdateParameters(Model): - """Parameters supplied to Create/Update Tag operations. - - All required parameters must be populated in order to send to Azure. - - :param display_name: Required. Tag name. - :type display_name: str - """ - - _validation = { - 'display_name': {'required': True, 'max_length': 160, 'min_length': 1}, - } - - _attribute_map = { - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TagCreateUpdateParameters, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_create_update_parameters_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_create_update_parameters_py3.py deleted file mode 100644 index e7a08d2fb302..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_create_update_parameters_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TagCreateUpdateParameters(Model): - """Parameters supplied to Create/Update Tag operations. - - All required parameters must be populated in order to send to Azure. - - :param display_name: Required. Tag name. - :type display_name: str - """ - - _validation = { - 'display_name': {'required': True, 'max_length': 160, 'min_length': 1}, - } - - _attribute_map = { - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - } - - def __init__(self, *, display_name: str, **kwargs) -> None: - super(TagCreateUpdateParameters, self).__init__(**kwargs) - self.display_name = display_name diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_description_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_description_contract.py deleted file mode 100644 index 26e272617407..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_description_contract.py +++ /dev/null @@ -1,62 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class TagDescriptionContract(Resource): - """Contract details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param description: Description of the Tag. - :type description: str - :param external_docs_url: Absolute URL of external resources describing - the tag. - :type external_docs_url: str - :param external_docs_description: Description of the external resources - describing the tag. - :type external_docs_description: str - :param display_name: Tag name. - :type display_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'external_docs_url': {'max_length': 2000}, - 'display_name': {'max_length': 160, 'min_length': 1}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'external_docs_url': {'key': 'properties.externalDocsUrl', 'type': 'str'}, - 'external_docs_description': {'key': 'properties.externalDocsDescription', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TagDescriptionContract, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.external_docs_url = kwargs.get('external_docs_url', None) - self.external_docs_description = kwargs.get('external_docs_description', None) - self.display_name = kwargs.get('display_name', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_description_contract_paged.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_description_contract_paged.py deleted file mode 100644 index 3867d66bf905..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_description_contract_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class TagDescriptionContractPaged(Paged): - """ - A paging container for iterating over a list of :class:`TagDescriptionContract ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[TagDescriptionContract]'} - } - - def __init__(self, *args, **kwargs): - - super(TagDescriptionContractPaged, self).__init__(*args, **kwargs) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_description_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_description_contract_py3.py deleted file mode 100644 index 4ae8bda6437a..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_description_contract_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class TagDescriptionContract(Resource): - """Contract details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param description: Description of the Tag. - :type description: str - :param external_docs_url: Absolute URL of external resources describing - the tag. - :type external_docs_url: str - :param external_docs_description: Description of the external resources - describing the tag. - :type external_docs_description: str - :param display_name: Tag name. - :type display_name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'external_docs_url': {'max_length': 2000}, - 'display_name': {'max_length': 160, 'min_length': 1}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'external_docs_url': {'key': 'properties.externalDocsUrl', 'type': 'str'}, - 'external_docs_description': {'key': 'properties.externalDocsDescription', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - } - - def __init__(self, *, description: str=None, external_docs_url: str=None, external_docs_description: str=None, display_name: str=None, **kwargs) -> None: - super(TagDescriptionContract, self).__init__(**kwargs) - self.description = description - self.external_docs_url = external_docs_url - self.external_docs_description = external_docs_description - self.display_name = display_name diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_description_create_parameters.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_description_create_parameters.py deleted file mode 100644 index 15842608702c..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_description_create_parameters.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TagDescriptionCreateParameters(Model): - """Parameters supplied to the Create TagDescription operation. - - :param description: Description of the Tag. - :type description: str - :param external_docs_url: Absolute URL of external resources describing - the tag. - :type external_docs_url: str - :param external_docs_description: Description of the external resources - describing the tag. - :type external_docs_description: str - """ - - _validation = { - 'external_docs_url': {'max_length': 2000}, - } - - _attribute_map = { - 'description': {'key': 'properties.description', 'type': 'str'}, - 'external_docs_url': {'key': 'properties.externalDocsUrl', 'type': 'str'}, - 'external_docs_description': {'key': 'properties.externalDocsDescription', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TagDescriptionCreateParameters, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.external_docs_url = kwargs.get('external_docs_url', None) - self.external_docs_description = kwargs.get('external_docs_description', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_description_create_parameters_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_description_create_parameters_py3.py deleted file mode 100644 index dd5a8b4ad441..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_description_create_parameters_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TagDescriptionCreateParameters(Model): - """Parameters supplied to the Create TagDescription operation. - - :param description: Description of the Tag. - :type description: str - :param external_docs_url: Absolute URL of external resources describing - the tag. - :type external_docs_url: str - :param external_docs_description: Description of the external resources - describing the tag. - :type external_docs_description: str - """ - - _validation = { - 'external_docs_url': {'max_length': 2000}, - } - - _attribute_map = { - 'description': {'key': 'properties.description', 'type': 'str'}, - 'external_docs_url': {'key': 'properties.externalDocsUrl', 'type': 'str'}, - 'external_docs_description': {'key': 'properties.externalDocsDescription', 'type': 'str'}, - } - - def __init__(self, *, description: str=None, external_docs_url: str=None, external_docs_description: str=None, **kwargs) -> None: - super(TagDescriptionCreateParameters, self).__init__(**kwargs) - self.description = description - self.external_docs_url = external_docs_url - self.external_docs_description = external_docs_description diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_resource_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_resource_contract.py deleted file mode 100644 index 594a0780d833..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_resource_contract.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TagResourceContract(Model): - """TagResource contract properties. - - All required parameters must be populated in order to send to Azure. - - :param tag: Required. Tag associated with the resource. - :type tag: - ~azure.mgmt.apimanagement.models.TagTagResourceContractProperties - :param api: Api associated with the tag. - :type api: - ~azure.mgmt.apimanagement.models.ApiTagResourceContractProperties - :param operation: Operation associated with the tag. - :type operation: - ~azure.mgmt.apimanagement.models.OperationTagResourceContractProperties - :param product: Product associated with the tag. - :type product: - ~azure.mgmt.apimanagement.models.ProductTagResourceContractProperties - """ - - _validation = { - 'tag': {'required': True}, - } - - _attribute_map = { - 'tag': {'key': 'tag', 'type': 'TagTagResourceContractProperties'}, - 'api': {'key': 'api', 'type': 'ApiTagResourceContractProperties'}, - 'operation': {'key': 'operation', 'type': 'OperationTagResourceContractProperties'}, - 'product': {'key': 'product', 'type': 'ProductTagResourceContractProperties'}, - } - - def __init__(self, **kwargs): - super(TagResourceContract, self).__init__(**kwargs) - self.tag = kwargs.get('tag', None) - self.api = kwargs.get('api', None) - self.operation = kwargs.get('operation', None) - self.product = kwargs.get('product', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_resource_contract_paged.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_resource_contract_paged.py deleted file mode 100644 index c64d82f24e7c..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_resource_contract_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class TagResourceContractPaged(Paged): - """ - A paging container for iterating over a list of :class:`TagResourceContract ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[TagResourceContract]'} - } - - def __init__(self, *args, **kwargs): - - super(TagResourceContractPaged, self).__init__(*args, **kwargs) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_resource_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_resource_contract_py3.py deleted file mode 100644 index 1377128c02d7..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_resource_contract_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TagResourceContract(Model): - """TagResource contract properties. - - All required parameters must be populated in order to send to Azure. - - :param tag: Required. Tag associated with the resource. - :type tag: - ~azure.mgmt.apimanagement.models.TagTagResourceContractProperties - :param api: Api associated with the tag. - :type api: - ~azure.mgmt.apimanagement.models.ApiTagResourceContractProperties - :param operation: Operation associated with the tag. - :type operation: - ~azure.mgmt.apimanagement.models.OperationTagResourceContractProperties - :param product: Product associated with the tag. - :type product: - ~azure.mgmt.apimanagement.models.ProductTagResourceContractProperties - """ - - _validation = { - 'tag': {'required': True}, - } - - _attribute_map = { - 'tag': {'key': 'tag', 'type': 'TagTagResourceContractProperties'}, - 'api': {'key': 'api', 'type': 'ApiTagResourceContractProperties'}, - 'operation': {'key': 'operation', 'type': 'OperationTagResourceContractProperties'}, - 'product': {'key': 'product', 'type': 'ProductTagResourceContractProperties'}, - } - - def __init__(self, *, tag, api=None, operation=None, product=None, **kwargs) -> None: - super(TagResourceContract, self).__init__(**kwargs) - self.tag = tag - self.api = api - self.operation = operation - self.product = product diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_tag_resource_contract_properties.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_tag_resource_contract_properties.py deleted file mode 100644 index 54330625ad6d..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_tag_resource_contract_properties.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TagTagResourceContractProperties(Model): - """Contract defining the Tag property in the Tag Resource Contract. - - :param id: Tag identifier - :type id: str - :param name: Tag Name - :type name: str - """ - - _validation = { - 'name': {'max_length': 160, 'min_length': 1}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TagTagResourceContractProperties, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_tag_resource_contract_properties_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_tag_resource_contract_properties_py3.py deleted file mode 100644 index 48f937aa9e52..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tag_tag_resource_contract_properties_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TagTagResourceContractProperties(Model): - """Contract defining the Tag property in the Tag Resource Contract. - - :param id: Tag identifier - :type id: str - :param name: Tag Name - :type name: str - """ - - _validation = { - 'name': {'max_length': 160, 'min_length': 1}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: - super(TagTagResourceContractProperties, self).__init__(**kwargs) - self.id = id - self.name = name diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tenant_configuration_sync_state_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tenant_configuration_sync_state_contract.py deleted file mode 100644 index 8b5d7e2d4c46..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tenant_configuration_sync_state_contract.py +++ /dev/null @@ -1,59 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TenantConfigurationSyncStateContract(Model): - """Tenant Configuration Synchronization State. - - :param branch: The name of Git branch. - :type branch: str - :param commit_id: The latest commit Id. - :type commit_id: str - :param is_export: value indicating if last sync was save (true) or deploy - (false) operation. - :type is_export: bool - :param is_synced: value indicating if last synchronization was later than - the configuration change. - :type is_synced: bool - :param is_git_enabled: value indicating whether Git configuration access - is enabled. - :type is_git_enabled: bool - :param sync_date: The date of the latest synchronization. The date - conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by - the ISO 8601 standard. - :type sync_date: datetime - :param configuration_change_date: The date of the latest configuration - change. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` - as specified by the ISO 8601 standard. - :type configuration_change_date: datetime - """ - - _attribute_map = { - 'branch': {'key': 'branch', 'type': 'str'}, - 'commit_id': {'key': 'commitId', 'type': 'str'}, - 'is_export': {'key': 'isExport', 'type': 'bool'}, - 'is_synced': {'key': 'isSynced', 'type': 'bool'}, - 'is_git_enabled': {'key': 'isGitEnabled', 'type': 'bool'}, - 'sync_date': {'key': 'syncDate', 'type': 'iso-8601'}, - 'configuration_change_date': {'key': 'configurationChangeDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(TenantConfigurationSyncStateContract, self).__init__(**kwargs) - self.branch = kwargs.get('branch', None) - self.commit_id = kwargs.get('commit_id', None) - self.is_export = kwargs.get('is_export', None) - self.is_synced = kwargs.get('is_synced', None) - self.is_git_enabled = kwargs.get('is_git_enabled', None) - self.sync_date = kwargs.get('sync_date', None) - self.configuration_change_date = kwargs.get('configuration_change_date', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tenant_configuration_sync_state_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tenant_configuration_sync_state_contract_py3.py deleted file mode 100644 index 7b9c9e8d2c40..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/tenant_configuration_sync_state_contract_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TenantConfigurationSyncStateContract(Model): - """Tenant Configuration Synchronization State. - - :param branch: The name of Git branch. - :type branch: str - :param commit_id: The latest commit Id. - :type commit_id: str - :param is_export: value indicating if last sync was save (true) or deploy - (false) operation. - :type is_export: bool - :param is_synced: value indicating if last synchronization was later than - the configuration change. - :type is_synced: bool - :param is_git_enabled: value indicating whether Git configuration access - is enabled. - :type is_git_enabled: bool - :param sync_date: The date of the latest synchronization. The date - conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by - the ISO 8601 standard. - :type sync_date: datetime - :param configuration_change_date: The date of the latest configuration - change. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` - as specified by the ISO 8601 standard. - :type configuration_change_date: datetime - """ - - _attribute_map = { - 'branch': {'key': 'branch', 'type': 'str'}, - 'commit_id': {'key': 'commitId', 'type': 'str'}, - 'is_export': {'key': 'isExport', 'type': 'bool'}, - 'is_synced': {'key': 'isSynced', 'type': 'bool'}, - 'is_git_enabled': {'key': 'isGitEnabled', 'type': 'bool'}, - 'sync_date': {'key': 'syncDate', 'type': 'iso-8601'}, - 'configuration_change_date': {'key': 'configurationChangeDate', 'type': 'iso-8601'}, - } - - def __init__(self, *, branch: str=None, commit_id: str=None, is_export: bool=None, is_synced: bool=None, is_git_enabled: bool=None, sync_date=None, configuration_change_date=None, **kwargs) -> None: - super(TenantConfigurationSyncStateContract, self).__init__(**kwargs) - self.branch = branch - self.commit_id = commit_id - self.is_export = is_export - self.is_synced = is_synced - self.is_git_enabled = is_git_enabled - self.sync_date = sync_date - self.configuration_change_date = configuration_change_date diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/terms_of_service_properties.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/terms_of_service_properties.py deleted file mode 100644 index 8967b154c12c..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/terms_of_service_properties.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TermsOfServiceProperties(Model): - """Terms of service contract properties. - - :param text: A terms of service text. - :type text: str - :param enabled: Display terms of service during a sign-up process. - :type enabled: bool - :param consent_required: Ask user for consent to the terms of service. - :type consent_required: bool - """ - - _attribute_map = { - 'text': {'key': 'text', 'type': 'str'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'consent_required': {'key': 'consentRequired', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(TermsOfServiceProperties, self).__init__(**kwargs) - self.text = kwargs.get('text', None) - self.enabled = kwargs.get('enabled', None) - self.consent_required = kwargs.get('consent_required', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/terms_of_service_properties_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/terms_of_service_properties_py3.py deleted file mode 100644 index 12ba02c648fa..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/terms_of_service_properties_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TermsOfServiceProperties(Model): - """Terms of service contract properties. - - :param text: A terms of service text. - :type text: str - :param enabled: Display terms of service during a sign-up process. - :type enabled: bool - :param consent_required: Ask user for consent to the terms of service. - :type consent_required: bool - """ - - _attribute_map = { - 'text': {'key': 'text', 'type': 'str'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'consent_required': {'key': 'consentRequired', 'type': 'bool'}, - } - - def __init__(self, *, text: str=None, enabled: bool=None, consent_required: bool=None, **kwargs) -> None: - super(TermsOfServiceProperties, self).__init__(**kwargs) - self.text = text - self.enabled = enabled - self.consent_required = consent_required diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/token_body_parameter_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/token_body_parameter_contract.py deleted file mode 100644 index 605ff1d0d585..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/token_body_parameter_contract.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TokenBodyParameterContract(Model): - """OAuth acquire token request body parameter (www-url-form-encoded). - - All required parameters must be populated in order to send to Azure. - - :param name: Required. body parameter name. - :type name: str - :param value: Required. body parameter value. - :type value: str - """ - - _validation = { - 'name': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TokenBodyParameterContract, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/token_body_parameter_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/token_body_parameter_contract_py3.py deleted file mode 100644 index 737fc6853009..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/token_body_parameter_contract_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TokenBodyParameterContract(Model): - """OAuth acquire token request body parameter (www-url-form-encoded). - - All required parameters must be populated in order to send to Azure. - - :param name: Required. body parameter name. - :type name: str - :param value: Required. body parameter value. - :type value: str - """ - - _validation = { - 'name': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str, value: str, **kwargs) -> None: - super(TokenBodyParameterContract, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_contract.py deleted file mode 100644 index b36d4717e4d4..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_contract.py +++ /dev/null @@ -1,83 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class UserContract(Resource): - """User details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param state: Account state. Specifies whether the user is active or not. - Blocked users are unable to sign into the developer portal or call any - APIs of subscribed products. Default state is Active. Possible values - include: 'active', 'blocked', 'pending', 'deleted'. Default value: - "active" . - :type state: str or ~azure.mgmt.apimanagement.models.UserState - :param note: Optional note about a user set by the administrator. - :type note: str - :param identities: Collection of user identities. - :type identities: - list[~azure.mgmt.apimanagement.models.UserIdentityContract] - :param first_name: First name. - :type first_name: str - :param last_name: Last name. - :type last_name: str - :param email: Email address. - :type email: str - :param registration_date: Date of user registration. The date conforms to - the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 - standard. - :type registration_date: datetime - :ivar groups: Collection of groups user is part of. - :vartype groups: - list[~azure.mgmt.apimanagement.models.GroupContractProperties] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'groups': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'note': {'key': 'properties.note', 'type': 'str'}, - 'identities': {'key': 'properties.identities', 'type': '[UserIdentityContract]'}, - 'first_name': {'key': 'properties.firstName', 'type': 'str'}, - 'last_name': {'key': 'properties.lastName', 'type': 'str'}, - 'email': {'key': 'properties.email', 'type': 'str'}, - 'registration_date': {'key': 'properties.registrationDate', 'type': 'iso-8601'}, - 'groups': {'key': 'properties.groups', 'type': '[GroupContractProperties]'}, - } - - def __init__(self, **kwargs): - super(UserContract, self).__init__(**kwargs) - self.state = kwargs.get('state', "active") - self.note = kwargs.get('note', None) - self.identities = kwargs.get('identities', None) - self.first_name = kwargs.get('first_name', None) - self.last_name = kwargs.get('last_name', None) - self.email = kwargs.get('email', None) - self.registration_date = kwargs.get('registration_date', None) - self.groups = None diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_contract_paged.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_contract_paged.py deleted file mode 100644 index a31093562e22..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_contract_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class UserContractPaged(Paged): - """ - A paging container for iterating over a list of :class:`UserContract ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[UserContract]'} - } - - def __init__(self, *args, **kwargs): - - super(UserContractPaged, self).__init__(*args, **kwargs) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_contract_py3.py deleted file mode 100644 index 3c2d23be38af..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_contract_py3.py +++ /dev/null @@ -1,83 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class UserContract(Resource): - """User details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type for API Management resource. - :vartype type: str - :param state: Account state. Specifies whether the user is active or not. - Blocked users are unable to sign into the developer portal or call any - APIs of subscribed products. Default state is Active. Possible values - include: 'active', 'blocked', 'pending', 'deleted'. Default value: - "active" . - :type state: str or ~azure.mgmt.apimanagement.models.UserState - :param note: Optional note about a user set by the administrator. - :type note: str - :param identities: Collection of user identities. - :type identities: - list[~azure.mgmt.apimanagement.models.UserIdentityContract] - :param first_name: First name. - :type first_name: str - :param last_name: Last name. - :type last_name: str - :param email: Email address. - :type email: str - :param registration_date: Date of user registration. The date conforms to - the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 - standard. - :type registration_date: datetime - :ivar groups: Collection of groups user is part of. - :vartype groups: - list[~azure.mgmt.apimanagement.models.GroupContractProperties] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'groups': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'note': {'key': 'properties.note', 'type': 'str'}, - 'identities': {'key': 'properties.identities', 'type': '[UserIdentityContract]'}, - 'first_name': {'key': 'properties.firstName', 'type': 'str'}, - 'last_name': {'key': 'properties.lastName', 'type': 'str'}, - 'email': {'key': 'properties.email', 'type': 'str'}, - 'registration_date': {'key': 'properties.registrationDate', 'type': 'iso-8601'}, - 'groups': {'key': 'properties.groups', 'type': '[GroupContractProperties]'}, - } - - def __init__(self, *, state="active", note: str=None, identities=None, first_name: str=None, last_name: str=None, email: str=None, registration_date=None, **kwargs) -> None: - super(UserContract, self).__init__(**kwargs) - self.state = state - self.note = note - self.identities = identities - self.first_name = first_name - self.last_name = last_name - self.email = email - self.registration_date = registration_date - self.groups = None diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_create_parameters.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_create_parameters.py deleted file mode 100644 index c2a08c3fd236..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_create_parameters.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserCreateParameters(Model): - """User create details. - - All required parameters must be populated in order to send to Azure. - - :param state: Account state. Specifies whether the user is active or not. - Blocked users are unable to sign into the developer portal or call any - APIs of subscribed products. Default state is Active. Possible values - include: 'active', 'blocked', 'pending', 'deleted'. Default value: - "active" . - :type state: str or ~azure.mgmt.apimanagement.models.UserState - :param note: Optional note about a user set by the administrator. - :type note: str - :param identities: Collection of user identities. - :type identities: - list[~azure.mgmt.apimanagement.models.UserIdentityContract] - :param email: Required. Email address. Must not be empty and must be - unique within the service instance. - :type email: str - :param first_name: Required. First name. - :type first_name: str - :param last_name: Required. Last name. - :type last_name: str - :param password: User Password. If no value is provided, a default - password is generated. - :type password: str - :param confirmation: Determines the type of confirmation e-mail that will - be sent to the newly created user. Possible values include: 'signup', - 'invite' - :type confirmation: str or ~azure.mgmt.apimanagement.models.Confirmation - """ - - _validation = { - 'email': {'required': True, 'max_length': 254, 'min_length': 1}, - 'first_name': {'required': True, 'max_length': 100, 'min_length': 1}, - 'last_name': {'required': True, 'max_length': 100, 'min_length': 1}, - } - - _attribute_map = { - 'state': {'key': 'properties.state', 'type': 'str'}, - 'note': {'key': 'properties.note', 'type': 'str'}, - 'identities': {'key': 'properties.identities', 'type': '[UserIdentityContract]'}, - 'email': {'key': 'properties.email', 'type': 'str'}, - 'first_name': {'key': 'properties.firstName', 'type': 'str'}, - 'last_name': {'key': 'properties.lastName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'confirmation': {'key': 'properties.confirmation', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserCreateParameters, self).__init__(**kwargs) - self.state = kwargs.get('state', "active") - self.note = kwargs.get('note', None) - self.identities = kwargs.get('identities', None) - self.email = kwargs.get('email', None) - self.first_name = kwargs.get('first_name', None) - self.last_name = kwargs.get('last_name', None) - self.password = kwargs.get('password', None) - self.confirmation = kwargs.get('confirmation', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_create_parameters_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_create_parameters_py3.py deleted file mode 100644 index 240440728fdb..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_create_parameters_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserCreateParameters(Model): - """User create details. - - All required parameters must be populated in order to send to Azure. - - :param state: Account state. Specifies whether the user is active or not. - Blocked users are unable to sign into the developer portal or call any - APIs of subscribed products. Default state is Active. Possible values - include: 'active', 'blocked', 'pending', 'deleted'. Default value: - "active" . - :type state: str or ~azure.mgmt.apimanagement.models.UserState - :param note: Optional note about a user set by the administrator. - :type note: str - :param identities: Collection of user identities. - :type identities: - list[~azure.mgmt.apimanagement.models.UserIdentityContract] - :param email: Required. Email address. Must not be empty and must be - unique within the service instance. - :type email: str - :param first_name: Required. First name. - :type first_name: str - :param last_name: Required. Last name. - :type last_name: str - :param password: User Password. If no value is provided, a default - password is generated. - :type password: str - :param confirmation: Determines the type of confirmation e-mail that will - be sent to the newly created user. Possible values include: 'signup', - 'invite' - :type confirmation: str or ~azure.mgmt.apimanagement.models.Confirmation - """ - - _validation = { - 'email': {'required': True, 'max_length': 254, 'min_length': 1}, - 'first_name': {'required': True, 'max_length': 100, 'min_length': 1}, - 'last_name': {'required': True, 'max_length': 100, 'min_length': 1}, - } - - _attribute_map = { - 'state': {'key': 'properties.state', 'type': 'str'}, - 'note': {'key': 'properties.note', 'type': 'str'}, - 'identities': {'key': 'properties.identities', 'type': '[UserIdentityContract]'}, - 'email': {'key': 'properties.email', 'type': 'str'}, - 'first_name': {'key': 'properties.firstName', 'type': 'str'}, - 'last_name': {'key': 'properties.lastName', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'confirmation': {'key': 'properties.confirmation', 'type': 'str'}, - } - - def __init__(self, *, email: str, first_name: str, last_name: str, state="active", note: str=None, identities=None, password: str=None, confirmation=None, **kwargs) -> None: - super(UserCreateParameters, self).__init__(**kwargs) - self.state = state - self.note = note - self.identities = identities - self.email = email - self.first_name = first_name - self.last_name = last_name - self.password = password - self.confirmation = confirmation diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_entity_base_parameters.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_entity_base_parameters.py deleted file mode 100644 index f190379aa298..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_entity_base_parameters.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserEntityBaseParameters(Model): - """User Entity Base Parameters set. - - :param state: Account state. Specifies whether the user is active or not. - Blocked users are unable to sign into the developer portal or call any - APIs of subscribed products. Default state is Active. Possible values - include: 'active', 'blocked', 'pending', 'deleted'. Default value: - "active" . - :type state: str or ~azure.mgmt.apimanagement.models.UserState - :param note: Optional note about a user set by the administrator. - :type note: str - :param identities: Collection of user identities. - :type identities: - list[~azure.mgmt.apimanagement.models.UserIdentityContract] - """ - - _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, - 'note': {'key': 'note', 'type': 'str'}, - 'identities': {'key': 'identities', 'type': '[UserIdentityContract]'}, - } - - def __init__(self, **kwargs): - super(UserEntityBaseParameters, self).__init__(**kwargs) - self.state = kwargs.get('state', "active") - self.note = kwargs.get('note', None) - self.identities = kwargs.get('identities', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_entity_base_parameters_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_entity_base_parameters_py3.py deleted file mode 100644 index cd8a291e9a3a..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_entity_base_parameters_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserEntityBaseParameters(Model): - """User Entity Base Parameters set. - - :param state: Account state. Specifies whether the user is active or not. - Blocked users are unable to sign into the developer portal or call any - APIs of subscribed products. Default state is Active. Possible values - include: 'active', 'blocked', 'pending', 'deleted'. Default value: - "active" . - :type state: str or ~azure.mgmt.apimanagement.models.UserState - :param note: Optional note about a user set by the administrator. - :type note: str - :param identities: Collection of user identities. - :type identities: - list[~azure.mgmt.apimanagement.models.UserIdentityContract] - """ - - _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, - 'note': {'key': 'note', 'type': 'str'}, - 'identities': {'key': 'identities', 'type': '[UserIdentityContract]'}, - } - - def __init__(self, *, state="active", note: str=None, identities=None, **kwargs) -> None: - super(UserEntityBaseParameters, self).__init__(**kwargs) - self.state = state - self.note = note - self.identities = identities diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_identity_contract.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_identity_contract.py deleted file mode 100644 index 1e0bd1a8ac33..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_identity_contract.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserIdentityContract(Model): - """User identity details. - - :param provider: Identity provider name. - :type provider: str - :param id: Identifier value within provider. - :type id: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserIdentityContract, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.id = kwargs.get('id', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_identity_contract_paged.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_identity_contract_paged.py deleted file mode 100644 index f1f4040a5e7b..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_identity_contract_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class UserIdentityContractPaged(Paged): - """ - A paging container for iterating over a list of :class:`UserIdentityContract ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[UserIdentityContract]'} - } - - def __init__(self, *args, **kwargs): - - super(UserIdentityContractPaged, self).__init__(*args, **kwargs) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_identity_contract_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_identity_contract_py3.py deleted file mode 100644 index 880bf2e0336a..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_identity_contract_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserIdentityContract(Model): - """User identity details. - - :param provider: Identity provider name. - :type provider: str - :param id: Identifier value within provider. - :type id: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, provider: str=None, id: str=None, **kwargs) -> None: - super(UserIdentityContract, self).__init__(**kwargs) - self.provider = provider - self.id = id diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_token_parameters.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_token_parameters.py deleted file mode 100644 index e8092006538f..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_token_parameters.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserTokenParameters(Model): - """Get User Token parameters. - - All required parameters must be populated in order to send to Azure. - - :param key_type: Required. The Key to be used to generate token for user. - Possible values include: 'primary', 'secondary'. Default value: "primary" - . - :type key_type: str or ~azure.mgmt.apimanagement.models.KeyType - :param expiry: Required. The Expiry time of the Token. Maximum token - expiry time is set to 30 days. The date conforms to the following format: - `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - :type expiry: datetime - """ - - _validation = { - 'key_type': {'required': True}, - 'expiry': {'required': True}, - } - - _attribute_map = { - 'key_type': {'key': 'properties.keyType', 'type': 'KeyType'}, - 'expiry': {'key': 'properties.expiry', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(UserTokenParameters, self).__init__(**kwargs) - self.key_type = kwargs.get('key_type', "primary") - self.expiry = kwargs.get('expiry', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_token_parameters_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_token_parameters_py3.py deleted file mode 100644 index d0aecd5b2174..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_token_parameters_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserTokenParameters(Model): - """Get User Token parameters. - - All required parameters must be populated in order to send to Azure. - - :param key_type: Required. The Key to be used to generate token for user. - Possible values include: 'primary', 'secondary'. Default value: "primary" - . - :type key_type: str or ~azure.mgmt.apimanagement.models.KeyType - :param expiry: Required. The Expiry time of the Token. Maximum token - expiry time is set to 30 days. The date conforms to the following format: - `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - :type expiry: datetime - """ - - _validation = { - 'key_type': {'required': True}, - 'expiry': {'required': True}, - } - - _attribute_map = { - 'key_type': {'key': 'properties.keyType', 'type': 'KeyType'}, - 'expiry': {'key': 'properties.expiry', 'type': 'iso-8601'}, - } - - def __init__(self, *, expiry, key_type="primary", **kwargs) -> None: - super(UserTokenParameters, self).__init__(**kwargs) - self.key_type = key_type - self.expiry = expiry diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_token_result.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_token_result.py deleted file mode 100644 index d124715b1855..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_token_result.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserTokenResult(Model): - """Get User Token response details. - - :param value: Shared Access Authorization token for the User. - :type value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserTokenResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_token_result_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_token_result_py3.py deleted file mode 100644 index 466feaef0a44..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_token_result_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserTokenResult(Model): - """Get User Token response details. - - :param value: Shared Access Authorization token for the User. - :type value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, value: str=None, **kwargs) -> None: - super(UserTokenResult, self).__init__(**kwargs) - self.value = value diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_update_parameters.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_update_parameters.py deleted file mode 100644 index 2adc28870a0f..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_update_parameters.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserUpdateParameters(Model): - """User update parameters. - - :param state: Account state. Specifies whether the user is active or not. - Blocked users are unable to sign into the developer portal or call any - APIs of subscribed products. Default state is Active. Possible values - include: 'active', 'blocked', 'pending', 'deleted'. Default value: - "active" . - :type state: str or ~azure.mgmt.apimanagement.models.UserState - :param note: Optional note about a user set by the administrator. - :type note: str - :param identities: Collection of user identities. - :type identities: - list[~azure.mgmt.apimanagement.models.UserIdentityContract] - :param email: Email address. Must not be empty and must be unique within - the service instance. - :type email: str - :param password: User Password. - :type password: str - :param first_name: First name. - :type first_name: str - :param last_name: Last name. - :type last_name: str - """ - - _validation = { - 'email': {'max_length': 254, 'min_length': 1}, - 'first_name': {'max_length': 100, 'min_length': 1}, - 'last_name': {'max_length': 100, 'min_length': 1}, - } - - _attribute_map = { - 'state': {'key': 'properties.state', 'type': 'str'}, - 'note': {'key': 'properties.note', 'type': 'str'}, - 'identities': {'key': 'properties.identities', 'type': '[UserIdentityContract]'}, - 'email': {'key': 'properties.email', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'first_name': {'key': 'properties.firstName', 'type': 'str'}, - 'last_name': {'key': 'properties.lastName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserUpdateParameters, self).__init__(**kwargs) - self.state = kwargs.get('state', "active") - self.note = kwargs.get('note', None) - self.identities = kwargs.get('identities', None) - self.email = kwargs.get('email', None) - self.password = kwargs.get('password', None) - self.first_name = kwargs.get('first_name', None) - self.last_name = kwargs.get('last_name', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_update_parameters_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_update_parameters_py3.py deleted file mode 100644 index 8208852bdcb2..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/user_update_parameters_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserUpdateParameters(Model): - """User update parameters. - - :param state: Account state. Specifies whether the user is active or not. - Blocked users are unable to sign into the developer portal or call any - APIs of subscribed products. Default state is Active. Possible values - include: 'active', 'blocked', 'pending', 'deleted'. Default value: - "active" . - :type state: str or ~azure.mgmt.apimanagement.models.UserState - :param note: Optional note about a user set by the administrator. - :type note: str - :param identities: Collection of user identities. - :type identities: - list[~azure.mgmt.apimanagement.models.UserIdentityContract] - :param email: Email address. Must not be empty and must be unique within - the service instance. - :type email: str - :param password: User Password. - :type password: str - :param first_name: First name. - :type first_name: str - :param last_name: Last name. - :type last_name: str - """ - - _validation = { - 'email': {'max_length': 254, 'min_length': 1}, - 'first_name': {'max_length': 100, 'min_length': 1}, - 'last_name': {'max_length': 100, 'min_length': 1}, - } - - _attribute_map = { - 'state': {'key': 'properties.state', 'type': 'str'}, - 'note': {'key': 'properties.note', 'type': 'str'}, - 'identities': {'key': 'properties.identities', 'type': '[UserIdentityContract]'}, - 'email': {'key': 'properties.email', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'first_name': {'key': 'properties.firstName', 'type': 'str'}, - 'last_name': {'key': 'properties.lastName', 'type': 'str'}, - } - - def __init__(self, *, state="active", note: str=None, identities=None, email: str=None, password: str=None, first_name: str=None, last_name: str=None, **kwargs) -> None: - super(UserUpdateParameters, self).__init__(**kwargs) - self.state = state - self.note = note - self.identities = identities - self.email = email - self.password = password - self.first_name = first_name - self.last_name = last_name diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/virtual_network_configuration.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/virtual_network_configuration.py deleted file mode 100644 index 2bc74d949399..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/virtual_network_configuration.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualNetworkConfiguration(Model): - """Configuration of a virtual network to which API Management service is - deployed. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar vnetid: The virtual network ID. This is typically a GUID. Expect a - null GUID by default. - :vartype vnetid: str - :ivar subnetname: The name of the subnet. - :vartype subnetname: str - :param subnet_resource_id: The full resource ID of a subnet in a virtual - network to deploy the API Management service in. - :type subnet_resource_id: str - """ - - _validation = { - 'vnetid': {'readonly': True}, - 'subnetname': {'readonly': True}, - 'subnet_resource_id': {'pattern': r'^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.(ClassicNetwork|Network)/virtualNetworks/[^/]*/subnets/[^/]*$'}, - } - - _attribute_map = { - 'vnetid': {'key': 'vnetid', 'type': 'str'}, - 'subnetname': {'key': 'subnetname', 'type': 'str'}, - 'subnet_resource_id': {'key': 'subnetResourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VirtualNetworkConfiguration, self).__init__(**kwargs) - self.vnetid = None - self.subnetname = None - self.subnet_resource_id = kwargs.get('subnet_resource_id', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/virtual_network_configuration_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/virtual_network_configuration_py3.py deleted file mode 100644 index 1cfd6c15d5a9..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/virtual_network_configuration_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VirtualNetworkConfiguration(Model): - """Configuration of a virtual network to which API Management service is - deployed. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar vnetid: The virtual network ID. This is typically a GUID. Expect a - null GUID by default. - :vartype vnetid: str - :ivar subnetname: The name of the subnet. - :vartype subnetname: str - :param subnet_resource_id: The full resource ID of a subnet in a virtual - network to deploy the API Management service in. - :type subnet_resource_id: str - """ - - _validation = { - 'vnetid': {'readonly': True}, - 'subnetname': {'readonly': True}, - 'subnet_resource_id': {'pattern': r'^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.(ClassicNetwork|Network)/virtualNetworks/[^/]*/subnets/[^/]*$'}, - } - - _attribute_map = { - 'vnetid': {'key': 'vnetid', 'type': 'str'}, - 'subnetname': {'key': 'subnetname', 'type': 'str'}, - 'subnet_resource_id': {'key': 'subnetResourceId', 'type': 'str'}, - } - - def __init__(self, *, subnet_resource_id: str=None, **kwargs) -> None: - super(VirtualNetworkConfiguration, self).__init__(**kwargs) - self.vnetid = None - self.subnetname = None - self.subnet_resource_id = subnet_resource_id diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/x509_certificate_name.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/x509_certificate_name.py deleted file mode 100644 index 625c689ce7d2..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/x509_certificate_name.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class X509CertificateName(Model): - """Properties of server X509Names. - - :param name: Common Name of the Certificate. - :type name: str - :param issuer_certificate_thumbprint: Thumbprint for the Issuer of the - Certificate. - :type issuer_certificate_thumbprint: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'issuer_certificate_thumbprint': {'key': 'issuerCertificateThumbprint', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(X509CertificateName, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.issuer_certificate_thumbprint = kwargs.get('issuer_certificate_thumbprint', None) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/x509_certificate_name_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/x509_certificate_name_py3.py deleted file mode 100644 index 6a0e571d3296..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/x509_certificate_name_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class X509CertificateName(Model): - """Properties of server X509Names. - - :param name: Common Name of the Certificate. - :type name: str - :param issuer_certificate_thumbprint: Thumbprint for the Issuer of the - Certificate. - :type issuer_certificate_thumbprint: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'issuer_certificate_thumbprint': {'key': 'issuerCertificateThumbprint', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, issuer_certificate_thumbprint: str=None, **kwargs) -> None: - super(X509CertificateName, self).__init__(**kwargs) - self.name = name - self.issuer_certificate_thumbprint = issuer_certificate_thumbprint diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/__init__.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/__init__.py index 1e1aeda77f92..9f118416b588 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/__init__.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/__init__.py @@ -9,67 +9,67 @@ # regenerated. # -------------------------------------------------------------------------- -from .api_operations import ApiOperations -from .api_revision_operations import ApiRevisionOperations -from .api_release_operations import ApiReleaseOperations -from .api_operation_operations import ApiOperationOperations -from .api_operation_policy_operations import ApiOperationPolicyOperations -from .tag_operations import TagOperations -from .api_product_operations import ApiProductOperations -from .api_policy_operations import ApiPolicyOperations -from .api_schema_operations import ApiSchemaOperations -from .api_diagnostic_operations import ApiDiagnosticOperations -from .api_issue_operations import ApiIssueOperations -from .api_issue_comment_operations import ApiIssueCommentOperations -from .api_issue_attachment_operations import ApiIssueAttachmentOperations -from .api_tag_description_operations import ApiTagDescriptionOperations -from .operation_operations import OperationOperations -from .api_version_set_operations import ApiVersionSetOperations -from .authorization_server_operations import AuthorizationServerOperations -from .backend_operations import BackendOperations -from .cache_operations import CacheOperations -from .certificate_operations import CertificateOperations -from .api_management_operations import ApiManagementOperations -from .api_management_service_skus_operations import ApiManagementServiceSkusOperations -from .api_management_service_operations import ApiManagementServiceOperations -from .diagnostic_operations import DiagnosticOperations -from .email_template_operations import EmailTemplateOperations -from .group_operations import GroupOperations -from .group_user_operations import GroupUserOperations -from .identity_provider_operations import IdentityProviderOperations -from .issue_operations import IssueOperations -from .logger_operations import LoggerOperations -from .network_status_operations import NetworkStatusOperations -from .notification_operations import NotificationOperations -from .notification_recipient_user_operations import NotificationRecipientUserOperations -from .notification_recipient_email_operations import NotificationRecipientEmailOperations -from .open_id_connect_provider_operations import OpenIdConnectProviderOperations -from .policy_operations import PolicyOperations -from .policy_snippet_operations import PolicySnippetOperations -from .sign_in_settings_operations import SignInSettingsOperations -from .sign_up_settings_operations import SignUpSettingsOperations -from .delegation_settings_operations import DelegationSettingsOperations -from .product_operations import ProductOperations -from .product_api_operations import ProductApiOperations -from .product_group_operations import ProductGroupOperations -from .product_subscriptions_operations import ProductSubscriptionsOperations -from .product_policy_operations import ProductPolicyOperations -from .property_operations import PropertyOperations -from .quota_by_counter_keys_operations import QuotaByCounterKeysOperations -from .quota_by_period_keys_operations import QuotaByPeriodKeysOperations -from .region_operations import RegionOperations -from .reports_operations import ReportsOperations -from .subscription_operations import SubscriptionOperations -from .tag_resource_operations import TagResourceOperations -from .tenant_access_operations import TenantAccessOperations -from .tenant_access_git_operations import TenantAccessGitOperations -from .tenant_configuration_operations import TenantConfigurationOperations -from .user_operations import UserOperations -from .user_group_operations import UserGroupOperations -from .user_subscription_operations import UserSubscriptionOperations -from .user_identities_operations import UserIdentitiesOperations -from .user_confirmation_password_operations import UserConfirmationPasswordOperations -from .api_export_operations import ApiExportOperations +from ._api_operations import ApiOperations +from ._api_revision_operations import ApiRevisionOperations +from ._api_release_operations import ApiReleaseOperations +from ._api_operation_operations import ApiOperationOperations +from ._api_operation_policy_operations import ApiOperationPolicyOperations +from ._tag_operations import TagOperations +from ._api_product_operations import ApiProductOperations +from ._api_policy_operations import ApiPolicyOperations +from ._api_schema_operations import ApiSchemaOperations +from ._api_diagnostic_operations import ApiDiagnosticOperations +from ._api_issue_operations import ApiIssueOperations +from ._api_issue_comment_operations import ApiIssueCommentOperations +from ._api_issue_attachment_operations import ApiIssueAttachmentOperations +from ._api_tag_description_operations import ApiTagDescriptionOperations +from ._operation_operations import OperationOperations +from ._api_version_set_operations import ApiVersionSetOperations +from ._authorization_server_operations import AuthorizationServerOperations +from ._backend_operations import BackendOperations +from ._cache_operations import CacheOperations +from ._certificate_operations import CertificateOperations +from ._api_management_operations import ApiManagementOperations +from ._api_management_service_skus_operations import ApiManagementServiceSkusOperations +from ._api_management_service_operations import ApiManagementServiceOperations +from ._diagnostic_operations import DiagnosticOperations +from ._email_template_operations import EmailTemplateOperations +from ._group_operations import GroupOperations +from ._group_user_operations import GroupUserOperations +from ._identity_provider_operations import IdentityProviderOperations +from ._issue_operations import IssueOperations +from ._logger_operations import LoggerOperations +from ._network_status_operations import NetworkStatusOperations +from ._notification_operations import NotificationOperations +from ._notification_recipient_user_operations import NotificationRecipientUserOperations +from ._notification_recipient_email_operations import NotificationRecipientEmailOperations +from ._open_id_connect_provider_operations import OpenIdConnectProviderOperations +from ._policy_operations import PolicyOperations +from ._policy_snippet_operations import PolicySnippetOperations +from ._sign_in_settings_operations import SignInSettingsOperations +from ._sign_up_settings_operations import SignUpSettingsOperations +from ._delegation_settings_operations import DelegationSettingsOperations +from ._product_operations import ProductOperations +from ._product_api_operations import ProductApiOperations +from ._product_group_operations import ProductGroupOperations +from ._product_subscriptions_operations import ProductSubscriptionsOperations +from ._product_policy_operations import ProductPolicyOperations +from ._property_operations import PropertyOperations +from ._quota_by_counter_keys_operations import QuotaByCounterKeysOperations +from ._quota_by_period_keys_operations import QuotaByPeriodKeysOperations +from ._region_operations import RegionOperations +from ._reports_operations import ReportsOperations +from ._subscription_operations import SubscriptionOperations +from ._tag_resource_operations import TagResourceOperations +from ._tenant_access_operations import TenantAccessOperations +from ._tenant_access_git_operations import TenantAccessGitOperations +from ._tenant_configuration_operations import TenantConfigurationOperations +from ._user_operations import UserOperations +from ._user_group_operations import UserGroupOperations +from ._user_subscription_operations import UserSubscriptionOperations +from ._user_identities_operations import UserIdentitiesOperations +from ._user_confirmation_password_operations import UserConfirmationPasswordOperations +from ._api_export_operations import ApiExportOperations __all__ = [ 'ApiOperations', diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_diagnostic_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_diagnostic_operations.py new file mode 100644 index 000000000000..3c2cfc95048d --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_diagnostic_operations.py @@ -0,0 +1,494 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ApiDiagnosticOperations(object): + """ApiDiagnosticOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_by_service( + self, resource_group_name, service_name, api_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + """Lists all diagnostics of an API. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API + Management service instance. + :type api_id: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + name | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DiagnosticContract + :rtype: + ~azure.mgmt.apimanagement.models.DiagnosticContractPaged[~azure.mgmt.apimanagement.models.DiagnosticContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_service.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DiagnosticContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics'} + + def get_entity_tag( + self, resource_group_name, service_name, api_id, diagnostic_id, custom_headers=None, raw=False, **operation_config): + """Gets the entity state (Etag) version of the Diagnostic for an API + specified by its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API + Management service instance. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the + current API Management service instance. + :type diagnostic_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_tag.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1), + 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'ETag': 'str', + }) + return client_raw_response + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}'} + + def get( + self, resource_group_name, service_name, api_id, diagnostic_id, custom_headers=None, raw=False, **operation_config): + """Gets the details of the Diagnostic for an API specified by its + identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API + Management service instance. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the + current API Management service instance. + :type diagnostic_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1), + 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}'} + + def create_or_update( + self, resource_group_name, service_name, api_id, diagnostic_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): + """Creates a new Diagnostic for an API or updates an existing one. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API + Management service instance. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the + current API Management service instance. + :type diagnostic_id: str + :param parameters: Create parameters. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract + :param if_match: ETag of the Entity. Not required when creating an + entity, but required when updating an entity. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1), + 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'DiagnosticContract') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticContract', response) + header_dict = { + 'ETag': 'str', + } + if response.status_code == 201: + deserialized = self._deserialize('DiagnosticContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}'} + + def update( + self, resource_group_name, service_name, api_id, diagnostic_id, parameters, if_match, custom_headers=None, raw=False, **operation_config): + """Updates the details of the Diagnostic for an API specified by its + identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API + Management service instance. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the + current API Management service instance. + :type diagnostic_id: str + :param parameters: Diagnostic Update parameters. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1), + 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'DiagnosticContract') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}'} + + def delete( + self, resource_group_name, service_name, api_id, diagnostic_id, if_match, custom_headers=None, raw=False, **operation_config): + """Deletes the specified Diagnostic from an API. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API + Management service instance. + :type api_id: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the + current API Management service instance. + :type diagnostic_id: str + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1), + 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_export_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_export_operations.py new file mode 100644 index 000000000000..d240c7b2bafa --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_export_operations.py @@ -0,0 +1,113 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ApiExportOperations(object): + """ApiExportOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar export: Query parameter required to export the API details. Constant value: "true". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.export = "true" + self.api_version = "2019-01-01" + + self.config = config + + def get( + self, resource_group_name, service_name, api_id, format, custom_headers=None, raw=False, **operation_config): + """Gets the details of the API specified by its identifier in the format + specified to the Storage Blob with SAS Key valid for 5 minutes. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param format: Format in which to export the Api Details to the + Storage Blob with Sas Key valid for 5 minutes. Possible values + include: 'Swagger', 'Wsdl', 'Wadl', 'Openapi' + :type format: str or ~azure.mgmt.apimanagement.models.ExportFormat + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApiExportResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.ApiExportResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['format'] = self._serialize.query("format", format, 'str') + query_parameters['export'] = self._serialize.query("self.export", self.export, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApiExportResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_attachment_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_attachment_operations.py new file mode 100644 index 000000000000..d91eccf3ff88 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_attachment_operations.py @@ -0,0 +1,445 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ApiIssueAttachmentOperations(object): + """ApiIssueAttachmentOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_by_service( + self, resource_group_name, service_name, api_id, issue_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + """Lists all attachments for the Issue associated with the specified API. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API + Management service instance. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API + Management service instance. + :type issue_id: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + name | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt + | substringof, contains, startswith, endswith |
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of IssueAttachmentContract + :rtype: + ~azure.mgmt.apimanagement.models.IssueAttachmentContractPaged[~azure.mgmt.apimanagement.models.IssueAttachmentContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_service.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1), + 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IssueAttachmentContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments'} + + def get_entity_tag( + self, resource_group_name, service_name, api_id, issue_id, attachment_id, custom_headers=None, raw=False, **operation_config): + """Gets the entity state (Etag) version of the issue Attachment for an API + specified by its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API + Management service instance. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API + Management service instance. + :type issue_id: str + :param attachment_id: Attachment identifier within an Issue. Must be + unique in the current Issue. + :type attachment_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_tag.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1), + 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'attachmentId': self._serialize.url("attachment_id", attachment_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'ETag': 'str', + }) + return client_raw_response + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}'} + + def get( + self, resource_group_name, service_name, api_id, issue_id, attachment_id, custom_headers=None, raw=False, **operation_config): + """Gets the details of the issue Attachment for an API specified by its + identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API + Management service instance. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API + Management service instance. + :type issue_id: str + :param attachment_id: Attachment identifier within an Issue. Must be + unique in the current Issue. + :type attachment_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IssueAttachmentContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.IssueAttachmentContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1), + 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'attachmentId': self._serialize.url("attachment_id", attachment_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IssueAttachmentContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}'} + + def create_or_update( + self, resource_group_name, service_name, api_id, issue_id, attachment_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): + """Creates a new Attachment for the Issue in an API or updates an existing + one. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API + Management service instance. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API + Management service instance. + :type issue_id: str + :param attachment_id: Attachment identifier within an Issue. Must be + unique in the current Issue. + :type attachment_id: str + :param parameters: Create parameters. + :type parameters: + ~azure.mgmt.apimanagement.models.IssueAttachmentContract + :param if_match: ETag of the Entity. Not required when creating an + entity, but required when updating an entity. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IssueAttachmentContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.IssueAttachmentContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1), + 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'attachmentId': self._serialize.url("attachment_id", attachment_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'IssueAttachmentContract') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IssueAttachmentContract', response) + header_dict = { + 'ETag': 'str', + } + if response.status_code == 201: + deserialized = self._deserialize('IssueAttachmentContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}'} + + def delete( + self, resource_group_name, service_name, api_id, issue_id, attachment_id, if_match, custom_headers=None, raw=False, **operation_config): + """Deletes the specified comment from an Issue. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API + Management service instance. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API + Management service instance. + :type issue_id: str + :param attachment_id: Attachment identifier within an Issue. Must be + unique in the current Issue. + :type attachment_id: str + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1), + 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'attachmentId': self._serialize.url("attachment_id", attachment_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_comment_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_comment_operations.py new file mode 100644 index 000000000000..037628b26452 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_comment_operations.py @@ -0,0 +1,445 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ApiIssueCommentOperations(object): + """ApiIssueCommentOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_by_service( + self, resource_group_name, service_name, api_id, issue_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + """Lists all comments for the Issue associated with the specified API. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API + Management service instance. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API + Management service instance. + :type issue_id: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + name | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt + | substringof, contains, startswith, endswith |
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of IssueCommentContract + :rtype: + ~azure.mgmt.apimanagement.models.IssueCommentContractPaged[~azure.mgmt.apimanagement.models.IssueCommentContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_service.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1), + 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IssueCommentContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments'} + + def get_entity_tag( + self, resource_group_name, service_name, api_id, issue_id, comment_id, custom_headers=None, raw=False, **operation_config): + """Gets the entity state (Etag) version of the issue Comment for an API + specified by its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API + Management service instance. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API + Management service instance. + :type issue_id: str + :param comment_id: Comment identifier within an Issue. Must be unique + in the current Issue. + :type comment_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_tag.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1), + 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'commentId': self._serialize.url("comment_id", comment_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'ETag': 'str', + }) + return client_raw_response + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}'} + + def get( + self, resource_group_name, service_name, api_id, issue_id, comment_id, custom_headers=None, raw=False, **operation_config): + """Gets the details of the issue Comment for an API specified by its + identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API + Management service instance. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API + Management service instance. + :type issue_id: str + :param comment_id: Comment identifier within an Issue. Must be unique + in the current Issue. + :type comment_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IssueCommentContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.IssueCommentContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1), + 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'commentId': self._serialize.url("comment_id", comment_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IssueCommentContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}'} + + def create_or_update( + self, resource_group_name, service_name, api_id, issue_id, comment_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): + """Creates a new Comment for the Issue in an API or updates an existing + one. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API + Management service instance. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API + Management service instance. + :type issue_id: str + :param comment_id: Comment identifier within an Issue. Must be unique + in the current Issue. + :type comment_id: str + :param parameters: Create parameters. + :type parameters: + ~azure.mgmt.apimanagement.models.IssueCommentContract + :param if_match: ETag of the Entity. Not required when creating an + entity, but required when updating an entity. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IssueCommentContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.IssueCommentContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1), + 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'commentId': self._serialize.url("comment_id", comment_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'IssueCommentContract') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IssueCommentContract', response) + header_dict = { + 'ETag': 'str', + } + if response.status_code == 201: + deserialized = self._deserialize('IssueCommentContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}'} + + def delete( + self, resource_group_name, service_name, api_id, issue_id, comment_id, if_match, custom_headers=None, raw=False, **operation_config): + """Deletes the specified comment from an Issue. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API + Management service instance. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API + Management service instance. + :type issue_id: str + :param comment_id: Comment identifier within an Issue. Must be unique + in the current Issue. + :type comment_id: str + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1), + 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'commentId': self._serialize.url("comment_id", comment_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_operations.py new file mode 100644 index 000000000000..eb8f749ac8af --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_operations.py @@ -0,0 +1,502 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ApiIssueOperations(object): + """ApiIssueOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_by_service( + self, resource_group_name, service_name, api_id, filter=None, expand_comments_attachments=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + """Lists all issues associated with the specified API. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API + Management service instance. + :type api_id: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + name | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt + | substringof, contains, startswith, endswith |
| state | filter + | eq | |
+ :type filter: str + :param expand_comments_attachments: Expand the comment attachments. + :type expand_comments_attachments: bool + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of IssueContract + :rtype: + ~azure.mgmt.apimanagement.models.IssueContractPaged[~azure.mgmt.apimanagement.models.IssueContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_service.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if expand_comments_attachments is not None: + query_parameters['expandCommentsAttachments'] = self._serialize.query("expand_comments_attachments", expand_comments_attachments, 'bool') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IssueContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues'} + + def get_entity_tag( + self, resource_group_name, service_name, api_id, issue_id, custom_headers=None, raw=False, **operation_config): + """Gets the entity state (Etag) version of the Issue for an API specified + by its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API + Management service instance. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API + Management service instance. + :type issue_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_tag.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1), + 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'ETag': 'str', + }) + return client_raw_response + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}'} + + def get( + self, resource_group_name, service_name, api_id, issue_id, expand_comments_attachments=None, custom_headers=None, raw=False, **operation_config): + """Gets the details of the Issue for an API specified by its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API + Management service instance. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API + Management service instance. + :type issue_id: str + :param expand_comments_attachments: Expand the comment attachments. + :type expand_comments_attachments: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IssueContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.IssueContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1), + 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand_comments_attachments is not None: + query_parameters['expandCommentsAttachments'] = self._serialize.query("expand_comments_attachments", expand_comments_attachments, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IssueContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}'} + + def create_or_update( + self, resource_group_name, service_name, api_id, issue_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): + """Creates a new Issue for an API or updates an existing one. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API + Management service instance. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API + Management service instance. + :type issue_id: str + :param parameters: Create parameters. + :type parameters: ~azure.mgmt.apimanagement.models.IssueContract + :param if_match: ETag of the Entity. Not required when creating an + entity, but required when updating an entity. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IssueContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.IssueContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1), + 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'IssueContract') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IssueContract', response) + header_dict = { + 'ETag': 'str', + } + if response.status_code == 201: + deserialized = self._deserialize('IssueContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}'} + + def update( + self, resource_group_name, service_name, api_id, issue_id, parameters, if_match, custom_headers=None, raw=False, **operation_config): + """Updates an existing issue for an API. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API + Management service instance. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API + Management service instance. + :type issue_id: str + :param parameters: Update parameters. + :type parameters: ~azure.mgmt.apimanagement.models.IssueUpdateContract + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1), + 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'IssueUpdateContract') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}'} + + def delete( + self, resource_group_name, service_name, api_id, issue_id, if_match, custom_headers=None, raw=False, **operation_config): + """Deletes the specified Issue from an API. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API + Management service instance. + :type api_id: str + :param issue_id: Issue identifier. Must be unique in the current API + Management service instance. + :type issue_id: str + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1), + 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_operations.py new file mode 100644 index 000000000000..e8c4fc91eb9c --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_operations.py @@ -0,0 +1,103 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ApiManagementOperations(object): + """ApiManagementOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the available REST API operations of the + Microsoft.ApiManagement provider. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Operation + :rtype: + ~azure.mgmt.apimanagement.models.OperationPaged[~azure.mgmt.apimanagement.models.Operation] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.ApiManagement/operations'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_operations.py new file mode 100644 index 000000000000..58a04b8dd007 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_operations.py @@ -0,0 +1,992 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class ApiManagementServiceOperations(object): + """ApiManagementServiceOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + + def _restore_initial( + self, resource_group_name, service_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ApiManagementServiceBackupRestoreParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ApiManagementServiceResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def restore( + self, resource_group_name, service_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Restores a backup of an API Management service created using the + ApiManagementService_Backup operation on the current service. This is a + long running operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param parameters: Parameters supplied to the Restore API Management + service from backup operation. + :type parameters: + ~azure.mgmt.apimanagement.models.ApiManagementServiceBackupRestoreParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + ApiManagementServiceResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.apimanagement.models.ApiManagementServiceResource]] + :raises: :class:`CloudError` + """ + raw_result = self._restore_initial( + resource_group_name=resource_group_name, + service_name=service_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ApiManagementServiceResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/restore'} + + + def _backup_initial( + self, resource_group_name, service_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.backup.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ApiManagementServiceBackupRestoreParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ApiManagementServiceResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def backup( + self, resource_group_name, service_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates a backup of the API Management service to the given Azure + Storage Account. This is long running operation and could take several + minutes to complete. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param parameters: Parameters supplied to the + ApiManagementService_Backup operation. + :type parameters: + ~azure.mgmt.apimanagement.models.ApiManagementServiceBackupRestoreParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + ApiManagementServiceResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.apimanagement.models.ApiManagementServiceResource]] + :raises: :class:`CloudError` + """ + raw_result = self._backup_initial( + resource_group_name=resource_group_name, + service_name=service_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ApiManagementServiceResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backup'} + + + def _create_or_update_initial( + self, resource_group_name, service_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ApiManagementServiceResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ApiManagementServiceResource', response) + if response.status_code == 201: + deserialized = self._deserialize('ApiManagementServiceResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, service_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates an API Management service. This is long running + operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API + Management service operation. + :type parameters: + ~azure.mgmt.apimanagement.models.ApiManagementServiceResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + ApiManagementServiceResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.apimanagement.models.ApiManagementServiceResource]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ApiManagementServiceResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}'} + + + def _update_initial( + self, resource_group_name, service_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ApiManagementServiceUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ApiManagementServiceResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, service_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates an existing API Management service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param parameters: Parameters supplied to the CreateOrUpdate API + Management service operation. + :type parameters: + ~azure.mgmt.apimanagement.models.ApiManagementServiceUpdateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + ApiManagementServiceResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.apimanagement.models.ApiManagementServiceResource]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ApiManagementServiceResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}'} + + def get( + self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): + """Gets an API Management service resource description. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApiManagementServiceResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.ApiManagementServiceResource + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApiManagementServiceResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}'} + + + def _delete_initial( + self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 202: + deserialized = self._deserialize('ApiManagementServiceResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete( + self, resource_group_name, service_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes an existing API Management service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + ApiManagementServiceResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.apimanagement.models.ApiManagementServiceResource]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + service_name=service_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ApiManagementServiceResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """List all API Management services within a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ApiManagementServiceResource + :rtype: + ~azure.mgmt.apimanagement.models.ApiManagementServiceResourcePaged[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ApiManagementServiceResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all API Management services within an Azure subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ApiManagementServiceResource + :rtype: + ~azure.mgmt.apimanagement.models.ApiManagementServiceResourcePaged[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ApiManagementServiceResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/service'} + + def get_sso_token( + self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): + """Gets the Single-Sign-On token for the API Management Service which is + valid for 5 Minutes. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApiManagementServiceGetSsoTokenResult or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.apimanagement.models.ApiManagementServiceGetSsoTokenResult + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_sso_token.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApiManagementServiceGetSsoTokenResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_sso_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/getssotoken'} + + def check_name_availability( + self, name, custom_headers=None, raw=False, **operation_config): + """Checks availability and correctness of a name for an API Management + service. + + :param name: The name to check for availability. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApiManagementServiceNameAvailabilityResult or + ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.apimanagement.models.ApiManagementServiceNameAvailabilityResult + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.ApiManagementServiceCheckNameAvailabilityParameters(name=name) + + # Construct URL + url = self.check_name_availability.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ApiManagementServiceCheckNameAvailabilityParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApiManagementServiceNameAvailabilityResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/checkNameAvailability'} + + + def _apply_network_configuration_updates_initial( + self, resource_group_name, service_name, location=None, custom_headers=None, raw=False, **operation_config): + parameters = None + if location is not None: + parameters = models.ApiManagementServiceApplyNetworkConfigurationParameters(location=location) + + # Construct URL + url = self.apply_network_configuration_updates.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if parameters is not None: + body_content = self._serialize.body(parameters, 'ApiManagementServiceApplyNetworkConfigurationParameters') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ApiManagementServiceResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def apply_network_configuration_updates( + self, resource_group_name, service_name, location=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates the Microsoft.ApiManagement resource running in the Virtual + network to pick the updated network settings. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param location: Location of the Api Management service to update for + a multi-region service. For a service deployed in a single region, + this parameter is not required. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + ApiManagementServiceResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.apimanagement.models.ApiManagementServiceResource]] + :raises: :class:`CloudError` + """ + raw_result = self._apply_network_configuration_updates_initial( + resource_group_name=resource_group_name, + service_name=service_name, + location=location, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ApiManagementServiceResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + apply_network_configuration_updates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/applynetworkconfigurationupdates'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_skus_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_skus_operations.py new file mode 100644 index 000000000000..72fdf30857eb --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_skus_operations.py @@ -0,0 +1,114 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ApiManagementServiceSkusOperations(object): + """ApiManagementServiceSkusOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_available_service_skus( + self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): + """Gets available SKUs for API Management service. + + Gets all available SKU for a given API Management service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceSkuResult + :rtype: + ~azure.mgmt.apimanagement.models.ResourceSkuResultPaged[~azure.mgmt.apimanagement.models.ResourceSkuResult] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_available_service_skus.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceSkuResultPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_available_service_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/skus'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_operations.py new file mode 100644 index 000000000000..cb0eae71004d --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_operations.py @@ -0,0 +1,510 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ApiOperationOperations(object): + """ApiOperationOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_by_api( + self, resource_group_name, service_name, api_id, filter=None, top=None, skip=None, tags=None, custom_headers=None, raw=False, **operation_config): + """Lists a collection of the operations for the specified API. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + name | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| displayName | filter | ge, le, eq, ne, + gt, lt | substringof, contains, startswith, endswith |
| method | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| description | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
| urlTemplate | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param tags: Include tags in the response. + :type tags: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of OperationContract + :rtype: + ~azure.mgmt.apimanagement.models.OperationContractPaged[~azure.mgmt.apimanagement.models.OperationContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_api.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if tags is not None: + query_parameters['tags'] = self._serialize.query("tags", tags, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.OperationContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_api.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations'} + + def get_entity_tag( + self, resource_group_name, service_name, api_id, operation_id, custom_headers=None, raw=False, **operation_config): + """Gets the entity state (Etag) version of the API operation specified by + its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be + unique in the current API Management service instance. + :type operation_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_tag.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'ETag': 'str', + }) + return client_raw_response + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}'} + + def get( + self, resource_group_name, service_name, api_id, operation_id, custom_headers=None, raw=False, **operation_config): + """Gets the details of the API Operation specified by its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be + unique in the current API Management service instance. + :type operation_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.OperationContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}'} + + def create_or_update( + self, resource_group_name, service_name, api_id, operation_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): + """Creates a new operation in the API or updates an existing one. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be + unique in the current API Management service instance. + :type operation_id: str + :param parameters: Create parameters. + :type parameters: ~azure.mgmt.apimanagement.models.OperationContract + :param if_match: ETag of the Entity. Not required when creating an + entity, but required when updating an entity. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.OperationContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'OperationContract') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationContract', response) + header_dict = { + 'ETag': 'str', + } + if response.status_code == 201: + deserialized = self._deserialize('OperationContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}'} + + def update( + self, resource_group_name, service_name, api_id, operation_id, parameters, if_match, custom_headers=None, raw=False, **operation_config): + """Updates the details of the operation in the API specified by its + identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be + unique in the current API Management service instance. + :type operation_id: str + :param parameters: API Operation Update parameters. + :type parameters: + ~azure.mgmt.apimanagement.models.OperationUpdateContract + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'OperationUpdateContract') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}'} + + def delete( + self, resource_group_name, service_name, api_id, operation_id, if_match, custom_headers=None, raw=False, **operation_config): + """Deletes the specified operation in the API. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be + unique in the current API Management service instance. + :type operation_id: str + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_policy_operations.py new file mode 100644 index 000000000000..0ac74ea0faaf --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_policy_operations.py @@ -0,0 +1,421 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ApiOperationPolicyOperations(object): + """ApiOperationPolicyOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + :ivar policy_id: The identifier of the Policy. Constant value: "policy". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + self.policy_id = "policy" + + self.config = config + + def list_by_operation( + self, resource_group_name, service_name, api_id, operation_id, custom_headers=None, raw=False, **operation_config): + """Get the list of policy configuration at the API Operation level. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be + unique in the current API Management service instance. + :type operation_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PolicyCollection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.PolicyCollection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_by_operation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PolicyCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_by_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies'} + + def get_entity_tag( + self, resource_group_name, service_name, api_id, operation_id, custom_headers=None, raw=False, **operation_config): + """Gets the entity state (Etag) version of the API operation policy + specified by its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be + unique in the current API Management service instance. + :type operation_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_tag.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1), + 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'ETag': 'str', + }) + return client_raw_response + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}'} + + def get( + self, resource_group_name, service_name, api_id, operation_id, format="xml", custom_headers=None, raw=False, **operation_config): + """Get the policy configuration at the API Operation level. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be + unique in the current API Management service instance. + :type operation_id: str + :param format: Policy Export Format. Possible values include: 'xml', + 'rawxml' + :type format: str or + ~azure.mgmt.apimanagement.models.PolicyExportFormat + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PolicyContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1), + 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if format is not None: + query_parameters['format'] = self._serialize.query("format", format, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PolicyContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}'} + + def create_or_update( + self, resource_group_name, service_name, api_id, operation_id, value, if_match=None, format="xml", custom_headers=None, raw=False, **operation_config): + """Creates or updates policy configuration for the API Operation level. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be + unique in the current API Management service instance. + :type operation_id: str + :param value: Contents of the Policy as defined by the format. + :type value: str + :param if_match: ETag of the Entity. Not required when creating an + entity, but required when updating an entity. + :type if_match: str + :param format: Format of the policyContent. Possible values include: + 'xml', 'xml-link', 'rawxml', 'rawxml-link' + :type format: str or + ~azure.mgmt.apimanagement.models.PolicyContentFormat + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PolicyContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + parameters = models.PolicyContract(value=value, format=format) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1), + 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'PolicyContract') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PolicyContract', response) + header_dict = { + 'ETag': 'str', + } + if response.status_code == 201: + deserialized = self._deserialize('PolicyContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}'} + + def delete( + self, resource_group_name, service_name, api_id, operation_id, if_match, custom_headers=None, raw=False, **operation_config): + """Deletes the policy configuration at the Api Operation. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be + unique in the current API Management service instance. + :type operation_id: str + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1), + 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operations.py new file mode 100644 index 000000000000..da4bffdd9f85 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operations.py @@ -0,0 +1,637 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class ApiOperations(object): + """ApiOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_by_service( + self, resource_group_name, service_name, filter=None, top=None, skip=None, tags=None, expand_api_version_set=None, custom_headers=None, raw=False, **operation_config): + """Lists all APIs of the API Management service instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + name | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| displayName | filter | ge, le, eq, ne, + gt, lt | substringof, contains, startswith, endswith |
| + description | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, + gt, lt | substringof, contains, startswith, endswith |
| path | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param tags: Include tags in the response. + :type tags: str + :param expand_api_version_set: Include full ApiVersionSet resource in + response + :type expand_api_version_set: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ApiContract + :rtype: + ~azure.mgmt.apimanagement.models.ApiContractPaged[~azure.mgmt.apimanagement.models.ApiContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_service.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if tags is not None: + query_parameters['tags'] = self._serialize.query("tags", tags, 'str') + if expand_api_version_set is not None: + query_parameters['expandApiVersionSet'] = self._serialize.query("expand_api_version_set", expand_api_version_set, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ApiContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis'} + + def get_entity_tag( + self, resource_group_name, service_name, api_id, custom_headers=None, raw=False, **operation_config): + """Gets the entity state (Etag) version of the API specified by its + identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_tag.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'ETag': 'str', + }) + return client_raw_response + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}'} + + def get( + self, resource_group_name, service_name, api_id, custom_headers=None, raw=False, **operation_config): + """Gets the details of the API specified by its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApiContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.ApiContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApiContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}'} + + + def _create_or_update_initial( + self, resource_group_name, service_name, api_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ApiCreateOrUpdateParameter') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + header_dict = {} + + if response.status_code == 200: + deserialized = self._deserialize('ApiContract', response) + header_dict = { + 'ETag': 'str', + } + if response.status_code == 201: + deserialized = self._deserialize('ApiContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, service_name, api_id, parameters, if_match=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates new or updates existing specified API of the API Management + service instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param parameters: Create or update parameters. + :type parameters: + ~azure.mgmt.apimanagement.models.ApiCreateOrUpdateParameter + :param if_match: ETag of the Entity. Not required when creating an + entity, but required when updating an entity. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns ApiContract or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.apimanagement.models.ApiContract] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.apimanagement.models.ApiContract]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + api_id=api_id, + parameters=parameters, + if_match=if_match, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + header_dict = { + 'ETag': 'str', + } + deserialized = self._deserialize('ApiContract', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}'} + + def update( + self, resource_group_name, service_name, api_id, parameters, if_match, custom_headers=None, raw=False, **operation_config): + """Updates the specified API of the API Management service instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param parameters: API Update Contract parameters. + :type parameters: ~azure.mgmt.apimanagement.models.ApiUpdateContract + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ApiUpdateContract') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}'} + + def delete( + self, resource_group_name, service_name, api_id, if_match, delete_revisions=None, custom_headers=None, raw=False, **operation_config): + """Deletes the specified API of the API Management service instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param delete_revisions: Delete all revisions of the Api. + :type delete_revisions: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if delete_revisions is not None: + query_parameters['deleteRevisions'] = self._serialize.query("delete_revisions", delete_revisions, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}'} + + def list_by_tags( + self, resource_group_name, service_name, filter=None, top=None, skip=None, include_not_tagged_apis=None, custom_headers=None, raw=False, **operation_config): + """Lists a collection of apis associated with tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param filter: | Field | Supported operators | Supported + functions | + |-------------|------------------------|-----------------------------------| + |name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith| + |displayName | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith| + |apiRevision | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith| + |path | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith| + |description | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith| + |serviceUrl | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith| + |isCurrent | eq | | + :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param include_not_tagged_apis: Include not tagged APIs. + :type include_not_tagged_apis: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TagResourceContract + :rtype: + ~azure.mgmt.apimanagement.models.TagResourceContractPaged[~azure.mgmt.apimanagement.models.TagResourceContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_tags.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if include_not_tagged_apis is not None: + query_parameters['includeNotTaggedApis'] = self._serialize.query("include_not_tagged_apis", include_not_tagged_apis, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TagResourceContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apisByTags'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_policy_operations.py new file mode 100644 index 000000000000..02d839136b3d --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_policy_operations.py @@ -0,0 +1,401 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ApiPolicyOperations(object): + """ApiPolicyOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + :ivar policy_id: The identifier of the Policy. Constant value: "policy". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + self.policy_id = "policy" + + self.config = config + + def list_by_api( + self, resource_group_name, service_name, api_id, custom_headers=None, raw=False, **operation_config): + """Get the policy configuration at the API level. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PolicyCollection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.PolicyCollection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_by_api.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PolicyCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_by_api.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies'} + + def get_entity_tag( + self, resource_group_name, service_name, api_id, custom_headers=None, raw=False, **operation_config): + """Gets the entity state (Etag) version of the API policy specified by its + identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_tag.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'ETag': 'str', + }) + return client_raw_response + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}'} + + def get( + self, resource_group_name, service_name, api_id, format="xml", custom_headers=None, raw=False, **operation_config): + """Get the policy configuration at the API level. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param format: Policy Export Format. Possible values include: 'xml', + 'rawxml' + :type format: str or + ~azure.mgmt.apimanagement.models.PolicyExportFormat + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PolicyContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if format is not None: + query_parameters['format'] = self._serialize.query("format", format, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PolicyContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}'} + + def create_or_update( + self, resource_group_name, service_name, api_id, value, if_match=None, format="xml", custom_headers=None, raw=False, **operation_config): + """Creates or updates policy configuration for the API. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param value: Contents of the Policy as defined by the format. + :type value: str + :param if_match: ETag of the Entity. Not required when creating an + entity, but required when updating an entity. + :type if_match: str + :param format: Format of the policyContent. Possible values include: + 'xml', 'xml-link', 'rawxml', 'rawxml-link' + :type format: str or + ~azure.mgmt.apimanagement.models.PolicyContentFormat + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PolicyContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + parameters = models.PolicyContract(value=value, format=format) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'PolicyContract') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PolicyContract', response) + header_dict = { + 'ETag': 'str', + } + if response.status_code == 201: + deserialized = self._deserialize('PolicyContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}'} + + def delete( + self, resource_group_name, service_name, api_id, if_match, custom_headers=None, raw=False, **operation_config): + """Deletes the policy configuration at the Api. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_product_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_product_operations.py new file mode 100644 index 000000000000..a0c402c227d6 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_product_operations.py @@ -0,0 +1,130 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ApiProductOperations(object): + """ApiProductOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_by_apis( + self, resource_group_name, service_name, api_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + """Lists all Products, which the API is part of. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API + Management service instance. + :type api_id: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProductContract + :rtype: + ~azure.mgmt.apimanagement.models.ProductContractPaged[~azure.mgmt.apimanagement.models.ProductContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_apis.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProductContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_apis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/products'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_release_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_release_operations.py new file mode 100644 index 000000000000..56c830fbd849 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_release_operations.py @@ -0,0 +1,503 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ApiReleaseOperations(object): + """ApiReleaseOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_by_service( + self, resource_group_name, service_name, api_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + """Lists all releases of an API. An API release is created when making an + API Revision current. Releases are also used to rollback to previous + revisions. Results will be paged and can be constrained by the $top and + $skip parameters. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API + Management service instance. + :type api_id: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + notes | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ApiReleaseContract + :rtype: + ~azure.mgmt.apimanagement.models.ApiReleaseContractPaged[~azure.mgmt.apimanagement.models.ApiReleaseContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_service.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ApiReleaseContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases'} + + def get_entity_tag( + self, resource_group_name, service_name, api_id, release_id, custom_headers=None, raw=False, **operation_config): + """Returns the etag of an API release. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API + Management service instance. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in + the current API Management service instance. + :type release_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_tag.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1), + 'releaseId': self._serialize.url("release_id", release_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'ETag': 'str', + }) + return client_raw_response + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}'} + + def get( + self, resource_group_name, service_name, api_id, release_id, custom_headers=None, raw=False, **operation_config): + """Returns the details of an API release. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API + Management service instance. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in + the current API Management service instance. + :type release_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApiReleaseContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1), + 'releaseId': self._serialize.url("release_id", release_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApiReleaseContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}'} + + def create_or_update( + self, resource_group_name, service_name, api_id, release_id, if_match=None, api_id1=None, notes=None, custom_headers=None, raw=False, **operation_config): + """Creates a new Release for the API. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API + Management service instance. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in + the current API Management service instance. + :type release_id: str + :param if_match: ETag of the Entity. Not required when creating an + entity, but required when updating an entity. + :type if_match: str + :param api_id1: Identifier of the API the release belongs to. + :type api_id1: str + :param notes: Release Notes + :type notes: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApiReleaseContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + parameters = models.ApiReleaseContract(api_id=api_id1, notes=notes) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1), + 'releaseId': self._serialize.url("release_id", release_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ApiReleaseContract') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApiReleaseContract', response) + header_dict = { + 'ETag': 'str', + } + if response.status_code == 201: + deserialized = self._deserialize('ApiReleaseContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}'} + + def update( + self, resource_group_name, service_name, api_id, release_id, if_match, api_id1=None, notes=None, custom_headers=None, raw=False, **operation_config): + """Updates the details of the release of the API specified by its + identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API + Management service instance. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in + the current API Management service instance. + :type release_id: str + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param api_id1: Identifier of the API the release belongs to. + :type api_id1: str + :param notes: Release Notes + :type notes: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + parameters = models.ApiReleaseContract(api_id=api_id1, notes=notes) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1), + 'releaseId': self._serialize.url("release_id", release_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ApiReleaseContract') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}'} + + def delete( + self, resource_group_name, service_name, api_id, release_id, if_match, custom_headers=None, raw=False, **operation_config): + """Deletes the specified release in the API. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API + Management service instance. + :type api_id: str + :param release_id: Release identifier within an API. Must be unique in + the current API Management service instance. + :type release_id: str + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1), + 'releaseId': self._serialize.url("release_id", release_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_revision_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_revision_operations.py new file mode 100644 index 000000000000..c301aef6e18a --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_revision_operations.py @@ -0,0 +1,130 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ApiRevisionOperations(object): + """ApiRevisionOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_by_service( + self, resource_group_name, service_name, api_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + """Lists all revisions of an API. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API identifier. Must be unique in the current API + Management service instance. + :type api_id: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ApiRevisionContract + :rtype: + ~azure.mgmt.apimanagement.models.ApiRevisionContractPaged[~azure.mgmt.apimanagement.models.ApiRevisionContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_service.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ApiRevisionContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/revisions'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_schema_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_schema_operations.py new file mode 100644 index 000000000000..932bc7a90f80 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_schema_operations.py @@ -0,0 +1,444 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ApiSchemaOperations(object): + """ApiSchemaOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_by_api( + self, resource_group_name, service_name, api_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + """Get the schema configuration at the API level. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + contentType | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SchemaContract + :rtype: + ~azure.mgmt.apimanagement.models.SchemaContractPaged[~azure.mgmt.apimanagement.models.SchemaContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_api.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SchemaContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_api.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas'} + + def get_entity_tag( + self, resource_group_name, service_name, api_id, schema_id, custom_headers=None, raw=False, **operation_config): + """Gets the entity state (Etag) version of the schema specified by its + identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param schema_id: Schema identifier within an API. Must be unique in + the current API Management service instance. + :type schema_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_tag.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'schemaId': self._serialize.url("schema_id", schema_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'ETag': 'str', + }) + return client_raw_response + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}'} + + def get( + self, resource_group_name, service_name, api_id, schema_id, custom_headers=None, raw=False, **operation_config): + """Get the schema configuration at the API level. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param schema_id: Schema identifier within an API. Must be unique in + the current API Management service instance. + :type schema_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SchemaContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.SchemaContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'schemaId': self._serialize.url("schema_id", schema_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SchemaContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}'} + + def create_or_update( + self, resource_group_name, service_name, api_id, schema_id, content_type, if_match=None, value=None, custom_headers=None, raw=False, **operation_config): + """Creates or updates schema configuration for the API. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param schema_id: Schema identifier within an API. Must be unique in + the current API Management service instance. + :type schema_id: str + :param content_type: Must be a valid a media type used in a + Content-Type header as defined in the RFC 2616. Media type of the + schema document (e.g. application/json, application/xml).
- + `Swagger` Schema use + `application/vnd.ms-azure-apim.swagger.definitions+json`
- + `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml`
- + `OpenApi` Schema use `application/vnd.oai.openapi.components+json` +
- `WADL Schema` use + `application/vnd.ms-azure-apim.wadl.grammars+xml`. + :type content_type: str + :param if_match: ETag of the Entity. Not required when creating an + entity, but required when updating an entity. + :type if_match: str + :param value: Json escaped string defining the document representing + the Schema. + :type value: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SchemaContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.SchemaContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + parameters = models.SchemaCreateOrUpdateContract(content_type=content_type, value=value) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'schemaId': self._serialize.url("schema_id", schema_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'SchemaCreateOrUpdateContract') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SchemaContract', response) + header_dict = { + 'ETag': 'str', + } + if response.status_code == 201: + deserialized = self._deserialize('SchemaContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}'} + + def delete( + self, resource_group_name, service_name, api_id, schema_id, if_match, force=None, custom_headers=None, raw=False, **operation_config): + """Deletes the schema configuration at the Api. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param schema_id: Schema identifier within an API. Must be unique in + the current API Management service instance. + :type schema_id: str + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param force: If true removes all references to the schema before + deleting it. + :type force: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'schemaId': self._serialize.url("schema_id", schema_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if force is not None: + query_parameters['force'] = self._serialize.query("force", force, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_tag_description_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_tag_description_operations.py new file mode 100644 index 000000000000..3f4a3c91c998 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_tag_description_operations.py @@ -0,0 +1,429 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ApiTagDescriptionOperations(object): + """ApiTagDescriptionOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_by_service( + self, resource_group_name, service_name, api_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + """Lists all Tags descriptions in scope of API. Model similar to swagger - + tagDescription is defined on API level but tag may be assigned to the + Operations. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TagDescriptionContract + :rtype: + ~azure.mgmt.apimanagement.models.TagDescriptionContractPaged[~azure.mgmt.apimanagement.models.TagDescriptionContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_service.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TagDescriptionContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions'} + + def get_entity_tag( + self, resource_group_name, service_name, api_id, tag_id, custom_headers=None, raw=False, **operation_config): + """Gets the entity state version of the tag specified by its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param tag_id: Tag identifier. Must be unique in the current API + Management service instance. + :type tag_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_tag.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'ETag': 'str', + }) + return client_raw_response + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagId}'} + + def get( + self, resource_group_name, service_name, api_id, tag_id, custom_headers=None, raw=False, **operation_config): + """Get Tag description in scope of API. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param tag_id: Tag identifier. Must be unique in the current API + Management service instance. + :type tag_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TagDescriptionContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.TagDescriptionContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TagDescriptionContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagId}'} + + def create_or_update( + self, resource_group_name, service_name, api_id, tag_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): + """Create/Update tag description in scope of the Api. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param tag_id: Tag identifier. Must be unique in the current API + Management service instance. + :type tag_id: str + :param parameters: Create parameters. + :type parameters: + ~azure.mgmt.apimanagement.models.TagDescriptionCreateParameters + :param if_match: ETag of the Entity. Not required when creating an + entity, but required when updating an entity. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TagDescriptionContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.TagDescriptionContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'TagDescriptionCreateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TagDescriptionContract', response) + header_dict = { + 'ETag': 'str', + } + if response.status_code == 201: + deserialized = self._deserialize('TagDescriptionContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagId}'} + + def delete( + self, resource_group_name, service_name, api_id, tag_id, if_match, custom_headers=None, raw=False, **operation_config): + """Delete tag description for the Api. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param tag_id: Tag identifier. Must be unique in the current API + Management service instance. + :type tag_id: str + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_version_set_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_version_set_operations.py new file mode 100644 index 000000000000..139720b4daeb --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_version_set_operations.py @@ -0,0 +1,469 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ApiVersionSetOperations(object): + """ApiVersionSetOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_by_service( + self, resource_group_name, service_name, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + """Lists a collection of API Version Sets in the specified service + instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ApiVersionSetContract + :rtype: + ~azure.mgmt.apimanagement.models.ApiVersionSetContractPaged[~azure.mgmt.apimanagement.models.ApiVersionSetContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_service.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ApiVersionSetContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets'} + + def get_entity_tag( + self, resource_group_name, service_name, version_set_id, custom_headers=None, raw=False, **operation_config): + """Gets the entity state (Etag) version of the Api Version Set specified + by its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param version_set_id: Api Version Set identifier. Must be unique in + the current API Management service instance. + :type version_set_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_tag.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'versionSetId': self._serialize.url("version_set_id", version_set_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'ETag': 'str', + }) + return client_raw_response + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}'} + + def get( + self, resource_group_name, service_name, version_set_id, custom_headers=None, raw=False, **operation_config): + """Gets the details of the Api Version Set specified by its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param version_set_id: Api Version Set identifier. Must be unique in + the current API Management service instance. + :type version_set_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApiVersionSetContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'versionSetId': self._serialize.url("version_set_id", version_set_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApiVersionSetContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}'} + + def create_or_update( + self, resource_group_name, service_name, version_set_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): + """Creates or Updates a Api Version Set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param version_set_id: Api Version Set identifier. Must be unique in + the current API Management service instance. + :type version_set_id: str + :param parameters: Create or update parameters. + :type parameters: + ~azure.mgmt.apimanagement.models.ApiVersionSetContract + :param if_match: ETag of the Entity. Not required when creating an + entity, but required when updating an entity. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApiVersionSetContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'versionSetId': self._serialize.url("version_set_id", version_set_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ApiVersionSetContract') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApiVersionSetContract', response) + header_dict = { + 'ETag': 'str', + } + if response.status_code == 201: + deserialized = self._deserialize('ApiVersionSetContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}'} + + def update( + self, resource_group_name, service_name, version_set_id, parameters, if_match, custom_headers=None, raw=False, **operation_config): + """Updates the details of the Api VersionSet specified by its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param version_set_id: Api Version Set identifier. Must be unique in + the current API Management service instance. + :type version_set_id: str + :param parameters: Update parameters. + :type parameters: + ~azure.mgmt.apimanagement.models.ApiVersionSetUpdateParameters + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'versionSetId': self._serialize.url("version_set_id", version_set_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ApiVersionSetUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}'} + + def delete( + self, resource_group_name, service_name, version_set_id, if_match, custom_headers=None, raw=False, **operation_config): + """Deletes specific Api Version Set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param version_set_id: Api Version Set identifier. Must be unique in + the current API Management service instance. + :type version_set_id: str + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'versionSetId': self._serialize.url("version_set_id", version_set_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_server_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_server_operations.py new file mode 100644 index 000000000000..3c0041895ac3 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_server_operations.py @@ -0,0 +1,470 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class AuthorizationServerOperations(object): + """AuthorizationServerOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_by_service( + self, resource_group_name, service_name, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + """Lists a collection of authorization servers defined within a service + instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + name | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| displayName | filter | ge, le, eq, ne, + gt, lt | substringof, contains, startswith, endswith |
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AuthorizationServerContract + :rtype: + ~azure.mgmt.apimanagement.models.AuthorizationServerContractPaged[~azure.mgmt.apimanagement.models.AuthorizationServerContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_service.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AuthorizationServerContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers'} + + def get_entity_tag( + self, resource_group_name, service_name, authsid, custom_headers=None, raw=False, **operation_config): + """Gets the entity state (Etag) version of the authorizationServer + specified by its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param authsid: Identifier of the authorization server. + :type authsid: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_tag.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'authsid': self._serialize.url("authsid", authsid, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'ETag': 'str', + }) + return client_raw_response + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}'} + + def get( + self, resource_group_name, service_name, authsid, custom_headers=None, raw=False, **operation_config): + """Gets the details of the authorization server specified by its + identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param authsid: Identifier of the authorization server. + :type authsid: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AuthorizationServerContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerContract + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'authsid': self._serialize.url("authsid", authsid, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AuthorizationServerContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}'} + + def create_or_update( + self, resource_group_name, service_name, authsid, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): + """Creates new authorization server or updates an existing authorization + server. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param authsid: Identifier of the authorization server. + :type authsid: str + :param parameters: Create or update parameters. + :type parameters: + ~azure.mgmt.apimanagement.models.AuthorizationServerContract + :param if_match: ETag of the Entity. Not required when creating an + entity, but required when updating an entity. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AuthorizationServerContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerContract + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'authsid': self._serialize.url("authsid", authsid, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'AuthorizationServerContract') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AuthorizationServerContract', response) + header_dict = { + 'ETag': 'str', + } + if response.status_code == 201: + deserialized = self._deserialize('AuthorizationServerContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}'} + + def update( + self, resource_group_name, service_name, authsid, parameters, if_match, custom_headers=None, raw=False, **operation_config): + """Updates the details of the authorization server specified by its + identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param authsid: Identifier of the authorization server. + :type authsid: str + :param parameters: OAuth2 Server settings Update parameters. + :type parameters: + ~azure.mgmt.apimanagement.models.AuthorizationServerUpdateContract + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'authsid': self._serialize.url("authsid", authsid, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'AuthorizationServerUpdateContract') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}'} + + def delete( + self, resource_group_name, service_name, authsid, if_match, custom_headers=None, raw=False, **operation_config): + """Deletes specific authorization server instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param authsid: Identifier of the authorization server. + :type authsid: str + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'authsid': self._serialize.url("authsid", authsid, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_backend_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_backend_operations.py new file mode 100644 index 000000000000..f18e4263cccb --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_backend_operations.py @@ -0,0 +1,544 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class BackendOperations(object): + """BackendOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_by_service( + self, resource_group_name, service_name, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + """Lists a collection of backends in the specified service instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + name | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| title | filter | ge, le, eq, ne, gt, lt + | substringof, contains, startswith, endswith |
| url | filter | + ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | +
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of BackendContract + :rtype: + ~azure.mgmt.apimanagement.models.BackendContractPaged[~azure.mgmt.apimanagement.models.BackendContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_service.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.BackendContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends'} + + def get_entity_tag( + self, resource_group_name, service_name, backend_id, custom_headers=None, raw=False, **operation_config): + """Gets the entity state (Etag) version of the backend specified by its + identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param backend_id: Identifier of the Backend entity. Must be unique in + the current API Management service instance. + :type backend_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_tag.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'backendId': self._serialize.url("backend_id", backend_id, 'str', max_length=80, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'ETag': 'str', + }) + return client_raw_response + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}'} + + def get( + self, resource_group_name, service_name, backend_id, custom_headers=None, raw=False, **operation_config): + """Gets the details of the backend specified by its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param backend_id: Identifier of the Backend entity. Must be unique in + the current API Management service instance. + :type backend_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackendContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.BackendContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'backendId': self._serialize.url("backend_id", backend_id, 'str', max_length=80, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackendContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}'} + + def create_or_update( + self, resource_group_name, service_name, backend_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): + """Creates or Updates a backend. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param backend_id: Identifier of the Backend entity. Must be unique in + the current API Management service instance. + :type backend_id: str + :param parameters: Create parameters. + :type parameters: ~azure.mgmt.apimanagement.models.BackendContract + :param if_match: ETag of the Entity. Not required when creating an + entity, but required when updating an entity. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackendContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.BackendContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'backendId': self._serialize.url("backend_id", backend_id, 'str', max_length=80, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'BackendContract') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackendContract', response) + header_dict = { + 'ETag': 'str', + } + if response.status_code == 201: + deserialized = self._deserialize('BackendContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}'} + + def update( + self, resource_group_name, service_name, backend_id, parameters, if_match, custom_headers=None, raw=False, **operation_config): + """Updates an existing backend. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param backend_id: Identifier of the Backend entity. Must be unique in + the current API Management service instance. + :type backend_id: str + :param parameters: Update parameters. + :type parameters: + ~azure.mgmt.apimanagement.models.BackendUpdateParameters + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'backendId': self._serialize.url("backend_id", backend_id, 'str', max_length=80, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'BackendUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}'} + + def delete( + self, resource_group_name, service_name, backend_id, if_match, custom_headers=None, raw=False, **operation_config): + """Deletes the specified backend. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param backend_id: Identifier of the Backend entity. Must be unique in + the current API Management service instance. + :type backend_id: str + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'backendId': self._serialize.url("backend_id", backend_id, 'str', max_length=80, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}'} + + def reconnect( + self, resource_group_name, service_name, backend_id, after=None, custom_headers=None, raw=False, **operation_config): + """Notifies the APIM proxy to create a new connection to the backend after + the specified timeout. If no timeout was specified, timeout of 2 + minutes is used. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param backend_id: Identifier of the Backend entity. Must be unique in + the current API Management service instance. + :type backend_id: str + :param after: Duration in ISO8601 format after which reconnect will be + initiated. Minimum duration of the Reconnect is PT2M. + :type after: timedelta + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + parameters = None + if after is not None: + parameters = models.BackendReconnectContract(after=after) + + # Construct URL + url = self.reconnect.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'backendId': self._serialize.url("backend_id", backend_id, 'str', max_length=80, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if parameters is not None: + body_content = self._serialize.body(parameters, 'BackendReconnectContract') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reconnect.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}/reconnect'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_cache_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_cache_operations.py new file mode 100644 index 000000000000..e32cd2b8dd23 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_cache_operations.py @@ -0,0 +1,463 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class CacheOperations(object): + """CacheOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_by_service( + self, resource_group_name, service_name, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + """Lists a collection of all external Caches in the specified service + instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CacheContract + :rtype: + ~azure.mgmt.apimanagement.models.CacheContractPaged[~azure.mgmt.apimanagement.models.CacheContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_service.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CacheContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches'} + + def get_entity_tag( + self, resource_group_name, service_name, cache_id, custom_headers=None, raw=False, **operation_config): + """Gets the entity state (Etag) version of the Cache specified by its + identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param cache_id: Identifier of the Cache entity. Cache identifier + (should be either 'default' or valid Azure region identifier). + :type cache_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_tag.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'cacheId': self._serialize.url("cache_id", cache_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'ETag': 'str', + }) + return client_raw_response + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}'} + + def get( + self, resource_group_name, service_name, cache_id, custom_headers=None, raw=False, **operation_config): + """Gets the details of the Cache specified by its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param cache_id: Identifier of the Cache entity. Cache identifier + (should be either 'default' or valid Azure region identifier). + :type cache_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CacheContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.CacheContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'cacheId': self._serialize.url("cache_id", cache_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CacheContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}'} + + def create_or_update( + self, resource_group_name, service_name, cache_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): + """Creates or updates an External Cache to be used in Api Management + instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param cache_id: Identifier of the Cache entity. Cache identifier + (should be either 'default' or valid Azure region identifier). + :type cache_id: str + :param parameters: Create or Update parameters. + :type parameters: ~azure.mgmt.apimanagement.models.CacheContract + :param if_match: ETag of the Entity. Not required when creating an + entity, but required when updating an entity. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CacheContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.CacheContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'cacheId': self._serialize.url("cache_id", cache_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'CacheContract') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CacheContract', response) + header_dict = { + 'ETag': 'str', + } + if response.status_code == 201: + deserialized = self._deserialize('CacheContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}'} + + def update( + self, resource_group_name, service_name, cache_id, parameters, if_match, custom_headers=None, raw=False, **operation_config): + """Updates the details of the cache specified by its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param cache_id: Identifier of the Cache entity. Cache identifier + (should be either 'default' or valid Azure region identifier). + :type cache_id: str + :param parameters: Update parameters. + :type parameters: + ~azure.mgmt.apimanagement.models.CacheUpdateParameters + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'cacheId': self._serialize.url("cache_id", cache_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'CacheUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}'} + + def delete( + self, resource_group_name, service_name, cache_id, if_match, custom_headers=None, raw=False, **operation_config): + """Deletes specific Cache. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param cache_id: Identifier of the Cache entity. Cache identifier + (should be either 'default' or valid Azure region identifier). + :type cache_id: str + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'cacheId': self._serialize.url("cache_id", cache_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_certificate_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_certificate_operations.py new file mode 100644 index 000000000000..719a0913296a --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_certificate_operations.py @@ -0,0 +1,412 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class CertificateOperations(object): + """CertificateOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_by_service( + self, resource_group_name, service_name, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + """Lists a collection of all certificates in the specified service + instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + name | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| subject | filter | ge, le, eq, ne, gt, + lt | substringof, contains, startswith, endswith |
| thumbprint | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| expirationDate | filter | ge, le, eq, ne, gt, lt | + |
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CertificateContract + :rtype: + ~azure.mgmt.apimanagement.models.CertificateContractPaged[~azure.mgmt.apimanagement.models.CertificateContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_service.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CertificateContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates'} + + def get_entity_tag( + self, resource_group_name, service_name, certificate_id, custom_headers=None, raw=False, **operation_config): + """Gets the entity state (Etag) version of the certificate specified by + its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param certificate_id: Identifier of the certificate entity. Must be + unique in the current API Management service instance. + :type certificate_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_tag.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'certificateId': self._serialize.url("certificate_id", certificate_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'ETag': 'str', + }) + return client_raw_response + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}'} + + def get( + self, resource_group_name, service_name, certificate_id, custom_headers=None, raw=False, **operation_config): + """Gets the details of the certificate specified by its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param certificate_id: Identifier of the certificate entity. Must be + unique in the current API Management service instance. + :type certificate_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CertificateContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.CertificateContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'certificateId': self._serialize.url("certificate_id", certificate_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CertificateContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}'} + + def create_or_update( + self, resource_group_name, service_name, certificate_id, data, password, if_match=None, custom_headers=None, raw=False, **operation_config): + """Creates or updates the certificate being used for authentication with + the backend. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param certificate_id: Identifier of the certificate entity. Must be + unique in the current API Management service instance. + :type certificate_id: str + :param data: Base 64 encoded certificate using the + application/x-pkcs12 representation. + :type data: str + :param password: Password for the Certificate + :type password: str + :param if_match: ETag of the Entity. Not required when creating an + entity, but required when updating an entity. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CertificateContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.CertificateContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + parameters = models.CertificateCreateOrUpdateParameters(data=data, password=password) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'certificateId': self._serialize.url("certificate_id", certificate_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'CertificateCreateOrUpdateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CertificateContract', response) + header_dict = { + 'ETag': 'str', + } + if response.status_code == 201: + deserialized = self._deserialize('CertificateContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}'} + + def delete( + self, resource_group_name, service_name, certificate_id, if_match, custom_headers=None, raw=False, **operation_config): + """Deletes specific certificate. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param certificate_id: Identifier of the certificate entity. Must be + unique in the current API Management service instance. + :type certificate_id: str + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'certificateId': self._serialize.url("certificate_id", certificate_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_delegation_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_delegation_settings_operations.py new file mode 100644 index 000000000000..78845af4b0e1 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_delegation_settings_operations.py @@ -0,0 +1,295 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class DelegationSettingsOperations(object): + """DelegationSettingsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def get_entity_tag( + self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): + """Gets the entity state (Etag) version of the DelegationSettings. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_tag.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'ETag': 'str', + }) + return client_raw_response + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation'} + + def get( + self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): + """Get Delegation Settings for the Portal. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PortalDelegationSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.PortalDelegationSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PortalDelegationSettings', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation'} + + def update( + self, resource_group_name, service_name, parameters, if_match, custom_headers=None, raw=False, **operation_config): + """Update Delegation settings. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param parameters: Update Delegation settings. + :type parameters: + ~azure.mgmt.apimanagement.models.PortalDelegationSettings + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'PortalDelegationSettings') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation'} + + def create_or_update( + self, resource_group_name, service_name, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): + """Create or Update Delegation settings. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param parameters: Create or update parameters. + :type parameters: + ~azure.mgmt.apimanagement.models.PortalDelegationSettings + :param if_match: ETag of the Entity. Not required when creating an + entity, but required when updating an entity. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PortalDelegationSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.PortalDelegationSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'PortalDelegationSettings') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PortalDelegationSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_diagnostic_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_diagnostic_operations.py new file mode 100644 index 000000000000..abf7de6be5d9 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_diagnostic_operations.py @@ -0,0 +1,468 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class DiagnosticOperations(object): + """DiagnosticOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_by_service( + self, resource_group_name, service_name, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + """Lists all diagnostics of the API Management service instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + name | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DiagnosticContract + :rtype: + ~azure.mgmt.apimanagement.models.DiagnosticContractPaged[~azure.mgmt.apimanagement.models.DiagnosticContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_service.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DiagnosticContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics'} + + def get_entity_tag( + self, resource_group_name, service_name, diagnostic_id, custom_headers=None, raw=False, **operation_config): + """Gets the entity state (Etag) version of the Diagnostic specified by its + identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the + current API Management service instance. + :type diagnostic_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_tag.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'ETag': 'str', + }) + return client_raw_response + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}'} + + def get( + self, resource_group_name, service_name, diagnostic_id, custom_headers=None, raw=False, **operation_config): + """Gets the details of the Diagnostic specified by its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the + current API Management service instance. + :type diagnostic_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}'} + + def create_or_update( + self, resource_group_name, service_name, diagnostic_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): + """Creates a new Diagnostic or updates an existing one. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the + current API Management service instance. + :type diagnostic_id: str + :param parameters: Create parameters. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract + :param if_match: ETag of the Entity. Not required when creating an + entity, but required when updating an entity. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'DiagnosticContract') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiagnosticContract', response) + header_dict = { + 'ETag': 'str', + } + if response.status_code == 201: + deserialized = self._deserialize('DiagnosticContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}'} + + def update( + self, resource_group_name, service_name, diagnostic_id, parameters, if_match, custom_headers=None, raw=False, **operation_config): + """Updates the details of the Diagnostic specified by its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the + current API Management service instance. + :type diagnostic_id: str + :param parameters: Diagnostic Update parameters. + :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'DiagnosticContract') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}'} + + def delete( + self, resource_group_name, service_name, diagnostic_id, if_match, custom_headers=None, raw=False, **operation_config): + """Deletes the specified Diagnostic. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param diagnostic_id: Diagnostic identifier. Must be unique in the + current API Management service instance. + :type diagnostic_id: str + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_email_template_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_email_template_operations.py new file mode 100644 index 000000000000..5b36078fad59 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_email_template_operations.py @@ -0,0 +1,518 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class EmailTemplateOperations(object): + """EmailTemplateOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_by_service( + self, resource_group_name, service_name, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + """Lists a collection of properties defined within a service instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + name | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of EmailTemplateContract + :rtype: + ~azure.mgmt.apimanagement.models.EmailTemplateContractPaged[~azure.mgmt.apimanagement.models.EmailTemplateContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_service.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.EmailTemplateContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates'} + + def get_entity_tag( + self, resource_group_name, service_name, template_name, custom_headers=None, raw=False, **operation_config): + """Gets the entity state (Etag) version of the email template specified by + its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param template_name: Email Template Name Identifier. Possible values + include: 'applicationApprovedNotificationMessage', + 'accountClosedDeveloper', + 'quotaLimitApproachingDeveloperNotificationMessage', + 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', + 'inviteUserNotificationMessage', 'newCommentNotificationMessage', + 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', + 'purchaseDeveloperNotificationMessage', + 'passwordResetIdentityDefault', + 'passwordResetByAdminNotificationMessage', + 'rejectDeveloperNotificationMessage', + 'requestDeveloperNotificationMessage' + :type template_name: str or + ~azure.mgmt.apimanagement.models.TemplateName + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_tag.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'templateName': self._serialize.url("template_name", template_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'ETag': 'str', + }) + return client_raw_response + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}'} + + def get( + self, resource_group_name, service_name, template_name, custom_headers=None, raw=False, **operation_config): + """Gets the details of the email template specified by its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param template_name: Email Template Name Identifier. Possible values + include: 'applicationApprovedNotificationMessage', + 'accountClosedDeveloper', + 'quotaLimitApproachingDeveloperNotificationMessage', + 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', + 'inviteUserNotificationMessage', 'newCommentNotificationMessage', + 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', + 'purchaseDeveloperNotificationMessage', + 'passwordResetIdentityDefault', + 'passwordResetByAdminNotificationMessage', + 'rejectDeveloperNotificationMessage', + 'requestDeveloperNotificationMessage' + :type template_name: str or + ~azure.mgmt.apimanagement.models.TemplateName + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: EmailTemplateContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.EmailTemplateContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'templateName': self._serialize.url("template_name", template_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('EmailTemplateContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}'} + + def create_or_update( + self, resource_group_name, service_name, template_name, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): + """Updates an Email Template. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param template_name: Email Template Name Identifier. Possible values + include: 'applicationApprovedNotificationMessage', + 'accountClosedDeveloper', + 'quotaLimitApproachingDeveloperNotificationMessage', + 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', + 'inviteUserNotificationMessage', 'newCommentNotificationMessage', + 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', + 'purchaseDeveloperNotificationMessage', + 'passwordResetIdentityDefault', + 'passwordResetByAdminNotificationMessage', + 'rejectDeveloperNotificationMessage', + 'requestDeveloperNotificationMessage' + :type template_name: str or + ~azure.mgmt.apimanagement.models.TemplateName + :param parameters: Email Template update parameters. + :type parameters: + ~azure.mgmt.apimanagement.models.EmailTemplateUpdateParameters + :param if_match: ETag of the Entity. Not required when creating an + entity, but required when updating an entity. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: EmailTemplateContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.EmailTemplateContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'templateName': self._serialize.url("template_name", template_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'EmailTemplateUpdateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('EmailTemplateContract', response) + if response.status_code == 201: + deserialized = self._deserialize('EmailTemplateContract', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}'} + + def update( + self, resource_group_name, service_name, template_name, parameters, if_match, custom_headers=None, raw=False, **operation_config): + """Updates the specific Email Template. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param template_name: Email Template Name Identifier. Possible values + include: 'applicationApprovedNotificationMessage', + 'accountClosedDeveloper', + 'quotaLimitApproachingDeveloperNotificationMessage', + 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', + 'inviteUserNotificationMessage', 'newCommentNotificationMessage', + 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', + 'purchaseDeveloperNotificationMessage', + 'passwordResetIdentityDefault', + 'passwordResetByAdminNotificationMessage', + 'rejectDeveloperNotificationMessage', + 'requestDeveloperNotificationMessage' + :type template_name: str or + ~azure.mgmt.apimanagement.models.TemplateName + :param parameters: Update parameters. + :type parameters: + ~azure.mgmt.apimanagement.models.EmailTemplateUpdateParameters + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'templateName': self._serialize.url("template_name", template_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'EmailTemplateUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}'} + + def delete( + self, resource_group_name, service_name, template_name, if_match, custom_headers=None, raw=False, **operation_config): + """Reset the Email Template to default template provided by the API + Management service instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param template_name: Email Template Name Identifier. Possible values + include: 'applicationApprovedNotificationMessage', + 'accountClosedDeveloper', + 'quotaLimitApproachingDeveloperNotificationMessage', + 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', + 'inviteUserNotificationMessage', 'newCommentNotificationMessage', + 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', + 'purchaseDeveloperNotificationMessage', + 'passwordResetIdentityDefault', + 'passwordResetByAdminNotificationMessage', + 'rejectDeveloperNotificationMessage', + 'requestDeveloperNotificationMessage' + :type template_name: str or + ~azure.mgmt.apimanagement.models.TemplateName + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'templateName': self._serialize.url("template_name", template_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_operations.py new file mode 100644 index 000000000000..557744edd99a --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_operations.py @@ -0,0 +1,473 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class GroupOperations(object): + """GroupOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_by_service( + self, resource_group_name, service_name, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + """Lists a collection of groups defined within a service instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + name | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| displayName | filter | ge, le, eq, ne, + gt, lt | substringof, contains, startswith, endswith |
| + description | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| aadObjectId | filter | eq | |
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of GroupContract + :rtype: + ~azure.mgmt.apimanagement.models.GroupContractPaged[~azure.mgmt.apimanagement.models.GroupContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_service.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.GroupContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups'} + + def get_entity_tag( + self, resource_group_name, service_name, group_id, custom_headers=None, raw=False, **operation_config): + """Gets the entity state (Etag) version of the group specified by its + identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param group_id: Group identifier. Must be unique in the current API + Management service instance. + :type group_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_tag.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=256, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'ETag': 'str', + }) + return client_raw_response + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}'} + + def get( + self, resource_group_name, service_name, group_id, custom_headers=None, raw=False, **operation_config): + """Gets the details of the group specified by its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param group_id: Group identifier. Must be unique in the current API + Management service instance. + :type group_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: GroupContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.GroupContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=256, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('GroupContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}'} + + def create_or_update( + self, resource_group_name, service_name, group_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): + """Creates or Updates a group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param group_id: Group identifier. Must be unique in the current API + Management service instance. + :type group_id: str + :param parameters: Create parameters. + :type parameters: + ~azure.mgmt.apimanagement.models.GroupCreateParameters + :param if_match: ETag of the Entity. Not required when creating an + entity, but required when updating an entity. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: GroupContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.GroupContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=256, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'GroupCreateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('GroupContract', response) + header_dict = { + 'ETag': 'str', + } + if response.status_code == 201: + deserialized = self._deserialize('GroupContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}'} + + def update( + self, resource_group_name, service_name, group_id, parameters, if_match, custom_headers=None, raw=False, **operation_config): + """Updates the details of the group specified by its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param group_id: Group identifier. Must be unique in the current API + Management service instance. + :type group_id: str + :param parameters: Update parameters. + :type parameters: + ~azure.mgmt.apimanagement.models.GroupUpdateParameters + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=256, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'GroupUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}'} + + def delete( + self, resource_group_name, service_name, group_id, if_match, custom_headers=None, raw=False, **operation_config): + """Deletes specific group of the API Management service instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param group_id: Group identifier. Must be unique in the current API + Management service instance. + :type group_id: str + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=256, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_user_operations.py new file mode 100644 index 000000000000..734b79798a35 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_user_operations.py @@ -0,0 +1,330 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class GroupUserOperations(object): + """GroupUserOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list( + self, resource_group_name, service_name, group_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + """Lists a collection of user entities associated with the group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param group_id: Group identifier. Must be unique in the current API + Management service instance. + :type group_id: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + name | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| firstName | filter | ge, le, eq, ne, gt, + lt | substringof, contains, startswith, endswith |
| lastName | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| email | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
| registrationDate + | filter | ge, le, eq, ne, gt, lt | |
| note | filter | ge, + le, eq, ne, gt, lt | substringof, contains, startswith, endswith | +
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of UserContract + :rtype: + ~azure.mgmt.apimanagement.models.UserContractPaged[~azure.mgmt.apimanagement.models.UserContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=256, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UserContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users'} + + def check_entity_exists( + self, resource_group_name, service_name, group_id, user_id, custom_headers=None, raw=False, **operation_config): + """Checks that user entity specified by identifier is associated with the + group entity. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param group_id: Group identifier. Must be unique in the current API + Management service instance. + :type group_id: str + :param user_id: User identifier. Must be unique in the current API + Management service instance. + :type user_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: bool or ClientRawResponse if raw=true + :rtype: bool or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.check_entity_exists.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=256, min_length=1), + 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = (response.status_code == 204) + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + return deserialized + check_entity_exists.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}'} + + def create( + self, resource_group_name, service_name, group_id, user_id, custom_headers=None, raw=False, **operation_config): + """Add existing user to existing group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param group_id: Group identifier. Must be unique in the current API + Management service instance. + :type group_id: str + :param user_id: User identifier. Must be unique in the current API + Management service instance. + :type user_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: UserContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.UserContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=256, min_length=1), + 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('UserContract', response) + if response.status_code == 201: + deserialized = self._deserialize('UserContract', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}'} + + def delete( + self, resource_group_name, service_name, group_id, user_id, custom_headers=None, raw=False, **operation_config): + """Remove existing user from existing group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param group_id: Group identifier. Must be unique in the current API + Management service instance. + :type group_id: str + :param user_id: User identifier. Must be unique in the current API + Management service instance. + :type user_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=256, min_length=1), + 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_identity_provider_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_identity_provider_operations.py new file mode 100644 index 000000000000..e2a0302259c6 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_identity_provider_operations.py @@ -0,0 +1,466 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class IdentityProviderOperations(object): + """IdentityProviderOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_by_service( + self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): + """Lists a collection of Identity Provider configured in the specified + service instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of IdentityProviderContract + :rtype: + ~azure.mgmt.apimanagement.models.IdentityProviderContractPaged[~azure.mgmt.apimanagement.models.IdentityProviderContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_service.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IdentityProviderContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders'} + + def get_entity_tag( + self, resource_group_name, service_name, identity_provider_name, custom_headers=None, raw=False, **operation_config): + """Gets the entity state (Etag) version of the identityProvider specified + by its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param identity_provider_name: Identity Provider Type identifier. + Possible values include: 'facebook', 'google', 'microsoft', 'twitter', + 'aad', 'aadB2C' + :type identity_provider_name: str or + ~azure.mgmt.apimanagement.models.IdentityProviderType + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_tag.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'identityProviderName': self._serialize.url("identity_provider_name", identity_provider_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'ETag': 'str', + }) + return client_raw_response + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}'} + + def get( + self, resource_group_name, service_name, identity_provider_name, custom_headers=None, raw=False, **operation_config): + """Gets the configuration details of the identity Provider configured in + specified service instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param identity_provider_name: Identity Provider Type identifier. + Possible values include: 'facebook', 'google', 'microsoft', 'twitter', + 'aad', 'aadB2C' + :type identity_provider_name: str or + ~azure.mgmt.apimanagement.models.IdentityProviderType + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IdentityProviderContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.IdentityProviderContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'identityProviderName': self._serialize.url("identity_provider_name", identity_provider_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IdentityProviderContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}'} + + def create_or_update( + self, resource_group_name, service_name, identity_provider_name, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): + """Creates or Updates the IdentityProvider configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param identity_provider_name: Identity Provider Type identifier. + Possible values include: 'facebook', 'google', 'microsoft', 'twitter', + 'aad', 'aadB2C' + :type identity_provider_name: str or + ~azure.mgmt.apimanagement.models.IdentityProviderType + :param parameters: Create parameters. + :type parameters: + ~azure.mgmt.apimanagement.models.IdentityProviderContract + :param if_match: ETag of the Entity. Not required when creating an + entity, but required when updating an entity. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IdentityProviderContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.IdentityProviderContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'identityProviderName': self._serialize.url("identity_provider_name", identity_provider_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'IdentityProviderContract') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IdentityProviderContract', response) + header_dict = { + 'ETag': 'str', + } + if response.status_code == 201: + deserialized = self._deserialize('IdentityProviderContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}'} + + def update( + self, resource_group_name, service_name, identity_provider_name, parameters, if_match, custom_headers=None, raw=False, **operation_config): + """Updates an existing IdentityProvider configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param identity_provider_name: Identity Provider Type identifier. + Possible values include: 'facebook', 'google', 'microsoft', 'twitter', + 'aad', 'aadB2C' + :type identity_provider_name: str or + ~azure.mgmt.apimanagement.models.IdentityProviderType + :param parameters: Update parameters. + :type parameters: + ~azure.mgmt.apimanagement.models.IdentityProviderUpdateParameters + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'identityProviderName': self._serialize.url("identity_provider_name", identity_provider_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'IdentityProviderUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}'} + + def delete( + self, resource_group_name, service_name, identity_provider_name, if_match, custom_headers=None, raw=False, **operation_config): + """Deletes the specified identity provider configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param identity_provider_name: Identity Provider Type identifier. + Possible values include: 'facebook', 'google', 'microsoft', 'twitter', + 'aad', 'aadB2C' + :type identity_provider_name: str or + ~azure.mgmt.apimanagement.models.IdentityProviderType + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'identityProviderName': self._serialize.url("identity_provider_name", identity_provider_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_issue_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_issue_operations.py new file mode 100644 index 000000000000..65350283fe72 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_issue_operations.py @@ -0,0 +1,201 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class IssueOperations(object): + """IssueOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_by_service( + self, resource_group_name, service_name, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + """Lists a collection of issues in the specified service instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + name | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| apiId | filter | ge, le, eq, ne, gt, lt + | substringof, contains, startswith, endswith |
| title | filter + | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith + |
| description | filter | ge, le, eq, ne, gt, lt | substringof, + contains, startswith, endswith |
| authorName | filter | ge, le, + eq, ne, gt, lt | substringof, contains, startswith, endswith |
| + state | filter | eq | |
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of IssueContract + :rtype: + ~azure.mgmt.apimanagement.models.IssueContractPaged[~azure.mgmt.apimanagement.models.IssueContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_service.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IssueContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/issues'} + + def get( + self, resource_group_name, service_name, issue_id, custom_headers=None, raw=False, **operation_config): + """Gets API Management issue details. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param issue_id: Issue identifier. Must be unique in the current API + Management service instance. + :type issue_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IssueContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.IssueContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IssueContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/issues/{issueId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_logger_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_logger_operations.py new file mode 100644 index 000000000000..f5de4f16ee91 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_logger_operations.py @@ -0,0 +1,476 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class LoggerOperations(object): + """LoggerOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_by_service( + self, resource_group_name, service_name, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + """Lists a collection of loggers in the specified service instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + name | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| description | filter | ge, le, eq, ne, + gt, lt | substringof, contains, startswith, endswith |
| + loggerType | filter | eq | |
| resourceId | filter | ge, le, + eq, ne, gt, lt | substringof, contains, startswith, endswith |
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of LoggerContract + :rtype: + ~azure.mgmt.apimanagement.models.LoggerContractPaged[~azure.mgmt.apimanagement.models.LoggerContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_service.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.LoggerContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers'} + + def get_entity_tag( + self, resource_group_name, service_name, logger_id, custom_headers=None, raw=False, **operation_config): + """Gets the entity state (Etag) version of the logger specified by its + identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param logger_id: Logger identifier. Must be unique in the API + Management service instance. + :type logger_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_tag.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'loggerId': self._serialize.url("logger_id", logger_id, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'ETag': 'str', + }) + return client_raw_response + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}'} + + def get( + self, resource_group_name, service_name, logger_id, custom_headers=None, raw=False, **operation_config): + """Gets the details of the logger specified by its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param logger_id: Logger identifier. Must be unique in the API + Management service instance. + :type logger_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: LoggerContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.LoggerContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'loggerId': self._serialize.url("logger_id", logger_id, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('LoggerContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}'} + + def create_or_update( + self, resource_group_name, service_name, logger_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): + """Creates or Updates a logger. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param logger_id: Logger identifier. Must be unique in the API + Management service instance. + :type logger_id: str + :param parameters: Create parameters. + :type parameters: ~azure.mgmt.apimanagement.models.LoggerContract + :param if_match: ETag of the Entity. Not required when creating an + entity, but required when updating an entity. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: LoggerContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.LoggerContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'loggerId': self._serialize.url("logger_id", logger_id, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'LoggerContract') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('LoggerContract', response) + header_dict = { + 'ETag': 'str', + } + if response.status_code == 201: + deserialized = self._deserialize('LoggerContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}'} + + def update( + self, resource_group_name, service_name, logger_id, parameters, if_match, custom_headers=None, raw=False, **operation_config): + """Updates an existing logger. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param logger_id: Logger identifier. Must be unique in the API + Management service instance. + :type logger_id: str + :param parameters: Update parameters. + :type parameters: + ~azure.mgmt.apimanagement.models.LoggerUpdateContract + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'loggerId': self._serialize.url("logger_id", logger_id, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'LoggerUpdateContract') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}'} + + def delete( + self, resource_group_name, service_name, logger_id, if_match, force=None, custom_headers=None, raw=False, **operation_config): + """Deletes the specified logger. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param logger_id: Logger identifier. Must be unique in the API + Management service instance. + :type logger_id: str + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param force: Force deletion even if diagnostic is attached. + :type force: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'loggerId': self._serialize.url("logger_id", logger_id, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if force is not None: + query_parameters['force'] = self._serialize.query("force", force, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_network_status_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_network_status_operations.py new file mode 100644 index 000000000000..1cac079ac4d1 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_network_status_operations.py @@ -0,0 +1,169 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class NetworkStatusOperations(object): + """NetworkStatusOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_by_service( + self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): + """Gets the Connectivity Status to the external resources on which the Api + Management service depends from inside the Cloud Service. This also + returns the DNS Servers as visible to the CloudService. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.apimanagement.models.NetworkStatusContractByLocation] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_by_service.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[NetworkStatusContractByLocation]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/networkstatus'} + + def list_by_location( + self, resource_group_name, service_name, location_name, custom_headers=None, raw=False, **operation_config): + """Gets the Connectivity Status to the external resources on which the Api + Management service depends from inside the Cloud Service. This also + returns the DNS Servers as visible to the CloudService. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param location_name: Location in which the API Management service is + deployed. This is one of the Azure Regions like West US, East US, + South Central US. + :type location_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: NetworkStatusContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.NetworkStatusContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_by_location.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'locationName': self._serialize.url("location_name", location_name, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('NetworkStatusContract', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/locations/{locationName}/networkstatus'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_operations.py new file mode 100644 index 000000000000..735eeaeeade6 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_operations.py @@ -0,0 +1,261 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class NotificationOperations(object): + """NotificationOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_by_service( + self, resource_group_name, service_name, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + """Lists a collection of properties defined within a service instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of NotificationContract + :rtype: + ~azure.mgmt.apimanagement.models.NotificationContractPaged[~azure.mgmt.apimanagement.models.NotificationContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_service.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.NotificationContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications'} + + def get( + self, resource_group_name, service_name, notification_name, custom_headers=None, raw=False, **operation_config): + """Gets the details of the Notification specified by its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param notification_name: Notification Name Identifier. Possible + values include: 'RequestPublisherNotificationMessage', + 'PurchasePublisherNotificationMessage', + 'NewApplicationNotificationMessage', 'BCC', + 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + 'QuotaLimitApproachingPublisherNotificationMessage' + :type notification_name: str or + ~azure.mgmt.apimanagement.models.NotificationName + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: NotificationContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.NotificationContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'notificationName': self._serialize.url("notification_name", notification_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('NotificationContract', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}'} + + def create_or_update( + self, resource_group_name, service_name, notification_name, if_match=None, custom_headers=None, raw=False, **operation_config): + """Create or Update API Management publisher notification. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param notification_name: Notification Name Identifier. Possible + values include: 'RequestPublisherNotificationMessage', + 'PurchasePublisherNotificationMessage', + 'NewApplicationNotificationMessage', 'BCC', + 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + 'QuotaLimitApproachingPublisherNotificationMessage' + :type notification_name: str or + ~azure.mgmt.apimanagement.models.NotificationName + :param if_match: ETag of the Entity. Not required when creating an + entity, but required when updating an entity. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: NotificationContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.NotificationContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'notificationName': self._serialize.url("notification_name", notification_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('NotificationContract', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_email_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_email_operations.py new file mode 100644 index 000000000000..ae8b4128ec51 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_email_operations.py @@ -0,0 +1,314 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class NotificationRecipientEmailOperations(object): + """NotificationRecipientEmailOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_by_notification( + self, resource_group_name, service_name, notification_name, custom_headers=None, raw=False, **operation_config): + """Gets the list of the Notification Recipient Emails subscribed to a + notification. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param notification_name: Notification Name Identifier. Possible + values include: 'RequestPublisherNotificationMessage', + 'PurchasePublisherNotificationMessage', + 'NewApplicationNotificationMessage', 'BCC', + 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + 'QuotaLimitApproachingPublisherNotificationMessage' + :type notification_name: str or + ~azure.mgmt.apimanagement.models.NotificationName + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RecipientEmailCollection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.RecipientEmailCollection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_by_notification.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'notificationName': self._serialize.url("notification_name", notification_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RecipientEmailCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_by_notification.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails'} + + def check_entity_exists( + self, resource_group_name, service_name, notification_name, email, custom_headers=None, raw=False, **operation_config): + """Determine if Notification Recipient Email subscribed to the + notification. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param notification_name: Notification Name Identifier. Possible + values include: 'RequestPublisherNotificationMessage', + 'PurchasePublisherNotificationMessage', + 'NewApplicationNotificationMessage', 'BCC', + 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + 'QuotaLimitApproachingPublisherNotificationMessage' + :type notification_name: str or + ~azure.mgmt.apimanagement.models.NotificationName + :param email: Email identifier. + :type email: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: bool or ClientRawResponse if raw=true + :rtype: bool or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.check_entity_exists.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'notificationName': self._serialize.url("notification_name", notification_name, 'str'), + 'email': self._serialize.url("email", email, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = (response.status_code == 204) + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + return deserialized + check_entity_exists.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}'} + + def create_or_update( + self, resource_group_name, service_name, notification_name, email, custom_headers=None, raw=False, **operation_config): + """Adds the Email address to the list of Recipients for the Notification. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param notification_name: Notification Name Identifier. Possible + values include: 'RequestPublisherNotificationMessage', + 'PurchasePublisherNotificationMessage', + 'NewApplicationNotificationMessage', 'BCC', + 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + 'QuotaLimitApproachingPublisherNotificationMessage' + :type notification_name: str or + ~azure.mgmt.apimanagement.models.NotificationName + :param email: Email identifier. + :type email: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RecipientEmailContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.RecipientEmailContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'notificationName': self._serialize.url("notification_name", notification_name, 'str'), + 'email': self._serialize.url("email", email, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RecipientEmailContract', response) + if response.status_code == 201: + deserialized = self._deserialize('RecipientEmailContract', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}'} + + def delete( + self, resource_group_name, service_name, notification_name, email, custom_headers=None, raw=False, **operation_config): + """Removes the email from the list of Notification. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param notification_name: Notification Name Identifier. Possible + values include: 'RequestPublisherNotificationMessage', + 'PurchasePublisherNotificationMessage', + 'NewApplicationNotificationMessage', 'BCC', + 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + 'QuotaLimitApproachingPublisherNotificationMessage' + :type notification_name: str or + ~azure.mgmt.apimanagement.models.NotificationName + :param email: Email identifier. + :type email: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'notificationName': self._serialize.url("notification_name", notification_name, 'str'), + 'email': self._serialize.url("email", email, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_user_operations.py new file mode 100644 index 000000000000..4025993400e9 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_user_operations.py @@ -0,0 +1,318 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class NotificationRecipientUserOperations(object): + """NotificationRecipientUserOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_by_notification( + self, resource_group_name, service_name, notification_name, custom_headers=None, raw=False, **operation_config): + """Gets the list of the Notification Recipient User subscribed to the + notification. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param notification_name: Notification Name Identifier. Possible + values include: 'RequestPublisherNotificationMessage', + 'PurchasePublisherNotificationMessage', + 'NewApplicationNotificationMessage', 'BCC', + 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + 'QuotaLimitApproachingPublisherNotificationMessage' + :type notification_name: str or + ~azure.mgmt.apimanagement.models.NotificationName + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RecipientUserCollection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.RecipientUserCollection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_by_notification.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'notificationName': self._serialize.url("notification_name", notification_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RecipientUserCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_by_notification.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers'} + + def check_entity_exists( + self, resource_group_name, service_name, notification_name, user_id, custom_headers=None, raw=False, **operation_config): + """Determine if the Notification Recipient User is subscribed to the + notification. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param notification_name: Notification Name Identifier. Possible + values include: 'RequestPublisherNotificationMessage', + 'PurchasePublisherNotificationMessage', + 'NewApplicationNotificationMessage', 'BCC', + 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + 'QuotaLimitApproachingPublisherNotificationMessage' + :type notification_name: str or + ~azure.mgmt.apimanagement.models.NotificationName + :param user_id: User identifier. Must be unique in the current API + Management service instance. + :type user_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: bool or ClientRawResponse if raw=true + :rtype: bool or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.check_entity_exists.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'notificationName': self._serialize.url("notification_name", notification_name, 'str'), + 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204, 404]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = (response.status_code == 204) + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + return deserialized + check_entity_exists.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}'} + + def create_or_update( + self, resource_group_name, service_name, notification_name, user_id, custom_headers=None, raw=False, **operation_config): + """Adds the API Management User to the list of Recipients for the + Notification. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param notification_name: Notification Name Identifier. Possible + values include: 'RequestPublisherNotificationMessage', + 'PurchasePublisherNotificationMessage', + 'NewApplicationNotificationMessage', 'BCC', + 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + 'QuotaLimitApproachingPublisherNotificationMessage' + :type notification_name: str or + ~azure.mgmt.apimanagement.models.NotificationName + :param user_id: User identifier. Must be unique in the current API + Management service instance. + :type user_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RecipientUserContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.RecipientUserContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'notificationName': self._serialize.url("notification_name", notification_name, 'str'), + 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RecipientUserContract', response) + if response.status_code == 201: + deserialized = self._deserialize('RecipientUserContract', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}'} + + def delete( + self, resource_group_name, service_name, notification_name, user_id, custom_headers=None, raw=False, **operation_config): + """Removes the API Management user from the list of Notification. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param notification_name: Notification Name Identifier. Possible + values include: 'RequestPublisherNotificationMessage', + 'PurchasePublisherNotificationMessage', + 'NewApplicationNotificationMessage', 'BCC', + 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', + 'QuotaLimitApproachingPublisherNotificationMessage' + :type notification_name: str or + ~azure.mgmt.apimanagement.models.NotificationName + :param user_id: User identifier. Must be unique in the current API + Management service instance. + :type user_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'notificationName': self._serialize.url("notification_name", notification_name, 'str'), + 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_open_id_connect_provider_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_open_id_connect_provider_operations.py new file mode 100644 index 000000000000..29ee30d20771 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_open_id_connect_provider_operations.py @@ -0,0 +1,469 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class OpenIdConnectProviderOperations(object): + """OpenIdConnectProviderOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_by_service( + self, resource_group_name, service_name, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + """Lists of all the OpenId Connect Providers. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + name | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| displayName | filter | ge, le, eq, ne, + gt, lt | substringof, contains, startswith, endswith |
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of OpenidConnectProviderContract + :rtype: + ~azure.mgmt.apimanagement.models.OpenidConnectProviderContractPaged[~azure.mgmt.apimanagement.models.OpenidConnectProviderContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_service.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.OpenidConnectProviderContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders'} + + def get_entity_tag( + self, resource_group_name, service_name, opid, custom_headers=None, raw=False, **operation_config): + """Gets the entity state (Etag) version of the openIdConnectProvider + specified by its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param opid: Identifier of the OpenID Connect Provider. + :type opid: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_tag.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'opid': self._serialize.url("opid", opid, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'ETag': 'str', + }) + return client_raw_response + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}'} + + def get( + self, resource_group_name, service_name, opid, custom_headers=None, raw=False, **operation_config): + """Gets specific OpenID Connect Provider. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param opid: Identifier of the OpenID Connect Provider. + :type opid: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OpenidConnectProviderContract or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'opid': self._serialize.url("opid", opid, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OpenidConnectProviderContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}'} + + def create_or_update( + self, resource_group_name, service_name, opid, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): + """Creates or updates the OpenID Connect Provider. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param opid: Identifier of the OpenID Connect Provider. + :type opid: str + :param parameters: Create parameters. + :type parameters: + ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract + :param if_match: ETag of the Entity. Not required when creating an + entity, but required when updating an entity. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OpenidConnectProviderContract or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'opid': self._serialize.url("opid", opid, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'OpenidConnectProviderContract') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OpenidConnectProviderContract', response) + header_dict = { + 'ETag': 'str', + } + if response.status_code == 201: + deserialized = self._deserialize('OpenidConnectProviderContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}'} + + def update( + self, resource_group_name, service_name, opid, parameters, if_match, custom_headers=None, raw=False, **operation_config): + """Updates the specific OpenID Connect Provider. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param opid: Identifier of the OpenID Connect Provider. + :type opid: str + :param parameters: Update parameters. + :type parameters: + ~azure.mgmt.apimanagement.models.OpenidConnectProviderUpdateContract + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'opid': self._serialize.url("opid", opid, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'OpenidConnectProviderUpdateContract') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}'} + + def delete( + self, resource_group_name, service_name, opid, if_match, custom_headers=None, raw=False, **operation_config): + """Deletes specific OpenID Connect Provider of the API Management service + instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param opid: Identifier of the OpenID Connect Provider. + :type opid: str + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'opid': self._serialize.url("opid", opid, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operation_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operation_operations.py new file mode 100644 index 000000000000..7d16b2e4771c --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operation_operations.py @@ -0,0 +1,144 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class OperationOperations(object): + """OperationOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_by_tags( + self, resource_group_name, service_name, api_id, filter=None, top=None, skip=None, include_not_tagged_operations=None, custom_headers=None, raw=False, **operation_config): + """Lists a collection of operations associated with tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + name | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| displayName | filter | ge, le, eq, ne, + gt, lt | substringof, contains, startswith, endswith |
| apiName + | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| description | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
| method | filter | + ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | +
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, + contains, startswith, endswith |
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param include_not_tagged_operations: Include not tagged Operations. + :type include_not_tagged_operations: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TagResourceContract + :rtype: + ~azure.mgmt.apimanagement.models.TagResourceContractPaged[~azure.mgmt.apimanagement.models.TagResourceContract] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_tags.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if include_not_tagged_operations is not None: + query_parameters['includeNotTaggedOperations'] = self._serialize.query("include_not_tagged_operations", include_not_tagged_operations, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TagResourceContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operationsByTags'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_operations.py new file mode 100644 index 000000000000..42dd957545a3 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_operations.py @@ -0,0 +1,377 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class PolicyOperations(object): + """PolicyOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + :ivar policy_id: The identifier of the Policy. Constant value: "policy". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + self.policy_id = "policy" + + self.config = config + + def list_by_service( + self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): + """Lists all the Global Policy definitions of the Api Management service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PolicyCollection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.PolicyCollection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_by_service.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PolicyCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies'} + + def get_entity_tag( + self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): + """Gets the entity state (Etag) version of the Global policy definition in + the Api Management service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_tag.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'ETag': 'str', + }) + return client_raw_response + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}'} + + def get( + self, resource_group_name, service_name, format="xml", custom_headers=None, raw=False, **operation_config): + """Get the Global policy definition of the Api Management service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param format: Policy Export Format. Possible values include: 'xml', + 'rawxml' + :type format: str or + ~azure.mgmt.apimanagement.models.PolicyExportFormat + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PolicyContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if format is not None: + query_parameters['format'] = self._serialize.query("format", format, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PolicyContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}'} + + def create_or_update( + self, resource_group_name, service_name, value, if_match=None, format="xml", custom_headers=None, raw=False, **operation_config): + """Creates or updates the global policy configuration of the Api + Management service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param value: Contents of the Policy as defined by the format. + :type value: str + :param if_match: ETag of the Entity. Not required when creating an + entity, but required when updating an entity. + :type if_match: str + :param format: Format of the policyContent. Possible values include: + 'xml', 'xml-link', 'rawxml', 'rawxml-link' + :type format: str or + ~azure.mgmt.apimanagement.models.PolicyContentFormat + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PolicyContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + parameters = models.PolicyContract(value=value, format=format) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'PolicyContract') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PolicyContract', response) + header_dict = { + 'ETag': 'str', + } + if response.status_code == 201: + deserialized = self._deserialize('PolicyContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}'} + + def delete( + self, resource_group_name, service_name, if_match, custom_headers=None, raw=False, **operation_config): + """Deletes the global policy configuration of the Api Management Service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_snippet_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_snippet_operations.py new file mode 100644 index 000000000000..adf1f7f516c3 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_snippet_operations.py @@ -0,0 +1,105 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class PolicySnippetOperations(object): + """PolicySnippetOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_by_service( + self, resource_group_name, service_name, scope=None, custom_headers=None, raw=False, **operation_config): + """Lists all policy snippets. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param scope: Policy scope. Possible values include: 'Tenant', + 'Product', 'Api', 'Operation', 'All' + :type scope: str or + ~azure.mgmt.apimanagement.models.PolicyScopeContract + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PolicySnippetsCollection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.PolicySnippetsCollection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_by_service.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if scope is not None: + query_parameters['scope'] = self._serialize.query("scope", scope, 'PolicyScopeContract') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PolicySnippetsCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policySnippets'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_api_operations.py new file mode 100644 index 000000000000..a11b29139241 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_api_operations.py @@ -0,0 +1,330 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ProductApiOperations(object): + """ProductApiOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_by_product( + self, resource_group_name, service_name, product_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + """Lists a collection of the APIs associated with a product. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current + API Management service instance. + :type product_id: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + name | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| displayName | filter | ge, le, eq, ne, + gt, lt | substringof, contains, startswith, endswith |
| + description | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, + gt, lt | substringof, contains, startswith, endswith |
| path | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ApiContract + :rtype: + ~azure.mgmt.apimanagement.models.ApiContractPaged[~azure.mgmt.apimanagement.models.ApiContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_product.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ApiContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_product.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis'} + + def check_entity_exists( + self, resource_group_name, service_name, product_id, api_id, custom_headers=None, raw=False, **operation_config): + """Checks that API entity specified by identifier is associated with the + Product entity. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current + API Management service instance. + :type product_id: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.check_entity_exists.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + check_entity_exists.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}'} + + def create_or_update( + self, resource_group_name, service_name, product_id, api_id, custom_headers=None, raw=False, **operation_config): + """Adds an API to the specified product. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current + API Management service instance. + :type product_id: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApiContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.ApiContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApiContract', response) + if response.status_code == 201: + deserialized = self._deserialize('ApiContract', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}'} + + def delete( + self, resource_group_name, service_name, product_id, api_id, custom_headers=None, raw=False, **operation_config): + """Deletes the specified API from the specified product. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current + API Management service instance. + :type product_id: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_group_operations.py new file mode 100644 index 000000000000..78ff21de2430 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_group_operations.py @@ -0,0 +1,324 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ProductGroupOperations(object): + """ProductGroupOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_by_product( + self, resource_group_name, service_name, product_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + """Lists the collection of developer groups associated with the specified + product. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current + API Management service instance. + :type product_id: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + name | filter | ge, le, eq, ne, gt, lt | |
| displayName | + filter | eq, ne | |
| description | filter | eq, ne | | +
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of GroupContract + :rtype: + ~azure.mgmt.apimanagement.models.GroupContractPaged[~azure.mgmt.apimanagement.models.GroupContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_product.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.GroupContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_product.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups'} + + def check_entity_exists( + self, resource_group_name, service_name, product_id, group_id, custom_headers=None, raw=False, **operation_config): + """Checks that Group entity specified by identifier is associated with the + Product entity. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current + API Management service instance. + :type product_id: str + :param group_id: Group identifier. Must be unique in the current API + Management service instance. + :type group_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.check_entity_exists.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1), + 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=256, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + check_entity_exists.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}'} + + def create_or_update( + self, resource_group_name, service_name, product_id, group_id, custom_headers=None, raw=False, **operation_config): + """Adds the association between the specified developer group with the + specified product. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current + API Management service instance. + :type product_id: str + :param group_id: Group identifier. Must be unique in the current API + Management service instance. + :type group_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: GroupContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.GroupContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1), + 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=256, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('GroupContract', response) + if response.status_code == 201: + deserialized = self._deserialize('GroupContract', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}'} + + def delete( + self, resource_group_name, service_name, product_id, group_id, custom_headers=None, raw=False, **operation_config): + """Deletes the association between the specified group and product. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current + API Management service instance. + :type product_id: str + :param group_id: Group identifier. Must be unique in the current API + Management service instance. + :type group_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1), + 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=256, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_operations.py new file mode 100644 index 000000000000..706c502e12c6 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_operations.py @@ -0,0 +1,584 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ProductOperations(object): + """ProductOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_by_service( + self, resource_group_name, service_name, filter=None, top=None, skip=None, expand_groups=None, tags=None, custom_headers=None, raw=False, **operation_config): + """Lists a collection of products in the specified service instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + name | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| displayName | filter | ge, le, eq, ne, + gt, lt | substringof, contains, startswith, endswith |
| + description | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| terms | filter | ge, le, eq, ne, gt, lt + | substringof, contains, startswith, endswith |
| state | filter + | eq | |
| groups | expand | | |
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param expand_groups: When set to true, the response contains an array + of groups that have visibility to the product. The default is false. + :type expand_groups: bool + :param tags: Products which are part of a specific tag. + :type tags: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProductContract + :rtype: + ~azure.mgmt.apimanagement.models.ProductContractPaged[~azure.mgmt.apimanagement.models.ProductContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_service.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if expand_groups is not None: + query_parameters['expandGroups'] = self._serialize.query("expand_groups", expand_groups, 'bool') + if tags is not None: + query_parameters['tags'] = self._serialize.query("tags", tags, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProductContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products'} + + def get_entity_tag( + self, resource_group_name, service_name, product_id, custom_headers=None, raw=False, **operation_config): + """Gets the entity state (Etag) version of the product specified by its + identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current + API Management service instance. + :type product_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_tag.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'ETag': 'str', + }) + return client_raw_response + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}'} + + def get( + self, resource_group_name, service_name, product_id, custom_headers=None, raw=False, **operation_config): + """Gets the details of the product specified by its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current + API Management service instance. + :type product_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProductContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.ProductContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProductContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}'} + + def create_or_update( + self, resource_group_name, service_name, product_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): + """Creates or Updates a product. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current + API Management service instance. + :type product_id: str + :param parameters: Create or update parameters. + :type parameters: ~azure.mgmt.apimanagement.models.ProductContract + :param if_match: ETag of the Entity. Not required when creating an + entity, but required when updating an entity. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProductContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.ProductContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ProductContract') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProductContract', response) + header_dict = { + 'ETag': 'str', + } + if response.status_code == 201: + deserialized = self._deserialize('ProductContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}'} + + def update( + self, resource_group_name, service_name, product_id, parameters, if_match, custom_headers=None, raw=False, **operation_config): + """Update existing product details. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current + API Management service instance. + :type product_id: str + :param parameters: Update parameters. + :type parameters: + ~azure.mgmt.apimanagement.models.ProductUpdateParameters + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ProductUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}'} + + def delete( + self, resource_group_name, service_name, product_id, if_match, delete_subscriptions=None, custom_headers=None, raw=False, **operation_config): + """Delete product. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current + API Management service instance. + :type product_id: str + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param delete_subscriptions: Delete existing subscriptions associated + with the product or not. + :type delete_subscriptions: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if delete_subscriptions is not None: + query_parameters['deleteSubscriptions'] = self._serialize.query("delete_subscriptions", delete_subscriptions, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}'} + + def list_by_tags( + self, resource_group_name, service_name, filter=None, top=None, skip=None, include_not_tagged_products=None, custom_headers=None, raw=False, **operation_config): + """Lists a collection of products associated with tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + name | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| displayName | filter | ge, le, eq, ne, + gt, lt | substringof, contains, startswith, endswith |
| + description | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| terms | filter | ge, le, eq, ne, gt, lt + | substringof, contains, startswith, endswith |
| state | filter + | eq | substringof, contains, startswith, endswith |
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param include_not_tagged_products: Include not tagged Products. + :type include_not_tagged_products: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TagResourceContract + :rtype: + ~azure.mgmt.apimanagement.models.TagResourceContractPaged[~azure.mgmt.apimanagement.models.TagResourceContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_tags.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if include_not_tagged_products is not None: + query_parameters['includeNotTaggedProducts'] = self._serialize.query("include_not_tagged_products", include_not_tagged_products, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TagResourceContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/productsByTags'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_policy_operations.py new file mode 100644 index 000000000000..1526295c1310 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_policy_operations.py @@ -0,0 +1,395 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ProductPolicyOperations(object): + """ProductPolicyOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + :ivar policy_id: The identifier of the Policy. Constant value: "policy". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + self.policy_id = "policy" + + self.config = config + + def list_by_product( + self, resource_group_name, service_name, product_id, custom_headers=None, raw=False, **operation_config): + """Get the policy configuration at the Product level. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current + API Management service instance. + :type product_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PolicyCollection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.PolicyCollection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_by_product.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PolicyCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_by_product.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies'} + + def get_entity_tag( + self, resource_group_name, service_name, product_id, custom_headers=None, raw=False, **operation_config): + """Get the ETag of the policy configuration at the Product level. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current + API Management service instance. + :type product_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_tag.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1), + 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'ETag': 'str', + }) + return client_raw_response + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}'} + + def get( + self, resource_group_name, service_name, product_id, format="xml", custom_headers=None, raw=False, **operation_config): + """Get the policy configuration at the Product level. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current + API Management service instance. + :type product_id: str + :param format: Policy Export Format. Possible values include: 'xml', + 'rawxml' + :type format: str or + ~azure.mgmt.apimanagement.models.PolicyExportFormat + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PolicyContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1), + 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if format is not None: + query_parameters['format'] = self._serialize.query("format", format, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PolicyContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}'} + + def create_or_update( + self, resource_group_name, service_name, product_id, value, if_match=None, format="xml", custom_headers=None, raw=False, **operation_config): + """Creates or updates policy configuration for the Product. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current + API Management service instance. + :type product_id: str + :param value: Contents of the Policy as defined by the format. + :type value: str + :param if_match: ETag of the Entity. Not required when creating an + entity, but required when updating an entity. + :type if_match: str + :param format: Format of the policyContent. Possible values include: + 'xml', 'xml-link', 'rawxml', 'rawxml-link' + :type format: str or + ~azure.mgmt.apimanagement.models.PolicyContentFormat + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PolicyContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.PolicyContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + parameters = models.PolicyContract(value=value, format=format) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1), + 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'PolicyContract') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PolicyContract', response) + header_dict = { + 'ETag': 'str', + } + if response.status_code == 201: + deserialized = self._deserialize('PolicyContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}'} + + def delete( + self, resource_group_name, service_name, product_id, if_match, custom_headers=None, raw=False, **operation_config): + """Deletes the policy configuration at the Product. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current + API Management service instance. + :type product_id: str + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1), + 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_subscriptions_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_subscriptions_operations.py new file mode 100644 index 000000000000..8ac6a433dd89 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_subscriptions_operations.py @@ -0,0 +1,140 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ProductSubscriptionsOperations(object): + """ProductSubscriptionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list( + self, resource_group_name, service_name, product_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + """Lists the collection of subscriptions to the specified product. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current + API Management service instance. + :type product_id: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + name | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| displayName | filter | ge, le, eq, ne, + gt, lt | substringof, contains, startswith, endswith |
| + stateComment | filter | ge, le, eq, ne, gt, lt | substringof, + contains, startswith, endswith |
| ownerId | filter | ge, le, eq, + ne, gt, lt | substringof, contains, startswith, endswith |
| + scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt + | substringof, contains, startswith, endswith |
| productId | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| state | filter | eq | |
| user | expand | + | |
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SubscriptionContract + :rtype: + ~azure.mgmt.apimanagement.models.SubscriptionContractPaged[~azure.mgmt.apimanagement.models.SubscriptionContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SubscriptionContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/subscriptions'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_property_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_property_operations.py new file mode 100644 index 000000000000..9951a247bae2 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_property_operations.py @@ -0,0 +1,465 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class PropertyOperations(object): + """PropertyOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_by_service( + self, resource_group_name, service_name, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + """Lists a collection of properties defined within a service instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + tags | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith, any, all |
| displayName | filter | ge, le, + eq, ne, gt, lt | substringof, contains, startswith, endswith |
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PropertyContract + :rtype: + ~azure.mgmt.apimanagement.models.PropertyContractPaged[~azure.mgmt.apimanagement.models.PropertyContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_service.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PropertyContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/properties'} + + def get_entity_tag( + self, resource_group_name, service_name, prop_id, custom_headers=None, raw=False, **operation_config): + """Gets the entity state (Etag) version of the property specified by its + identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param prop_id: Identifier of the property. + :type prop_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_tag.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'propId': self._serialize.url("prop_id", prop_id, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'ETag': 'str', + }) + return client_raw_response + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/properties/{propId}'} + + def get( + self, resource_group_name, service_name, prop_id, custom_headers=None, raw=False, **operation_config): + """Gets the details of the property specified by its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param prop_id: Identifier of the property. + :type prop_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PropertyContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.PropertyContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'propId': self._serialize.url("prop_id", prop_id, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PropertyContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/properties/{propId}'} + + def create_or_update( + self, resource_group_name, service_name, prop_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): + """Creates or updates a property. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param prop_id: Identifier of the property. + :type prop_id: str + :param parameters: Create parameters. + :type parameters: ~azure.mgmt.apimanagement.models.PropertyContract + :param if_match: ETag of the Entity. Not required when creating an + entity, but required when updating an entity. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PropertyContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.PropertyContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'propId': self._serialize.url("prop_id", prop_id, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'PropertyContract') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PropertyContract', response) + header_dict = { + 'ETag': 'str', + } + if response.status_code == 201: + deserialized = self._deserialize('PropertyContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/properties/{propId}'} + + def update( + self, resource_group_name, service_name, prop_id, parameters, if_match, custom_headers=None, raw=False, **operation_config): + """Updates the specific property. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param prop_id: Identifier of the property. + :type prop_id: str + :param parameters: Update parameters. + :type parameters: + ~azure.mgmt.apimanagement.models.PropertyUpdateParameters + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'propId': self._serialize.url("prop_id", prop_id, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'PropertyUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/properties/{propId}'} + + def delete( + self, resource_group_name, service_name, prop_id, if_match, custom_headers=None, raw=False, **operation_config): + """Deletes specific property from the API Management service instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param prop_id: Identifier of the property. + :type prop_id: str + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'propId': self._serialize.url("prop_id", prop_id, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/properties/{propId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_counter_keys_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_counter_keys_operations.py new file mode 100644 index 000000000000..d2defb8524f6 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_counter_keys_operations.py @@ -0,0 +1,181 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class QuotaByCounterKeysOperations(object): + """QuotaByCounterKeysOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_by_service( + self, resource_group_name, service_name, quota_counter_key, custom_headers=None, raw=False, **operation_config): + """Lists a collection of current quota counter periods associated with the + counter-key configured in the policy on the specified service instance. + The api does not support paging yet. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param quota_counter_key: Quota counter key identifier.This is the + result of expression defined in counter-key attribute of the + quota-by-key policy.For Example, if you specify counter-key="boo" in + the policy, then it’s accessible by "boo" counter key. But if it’s + defined as counter-key="@("b"+"a")" then it will be accessible by "ba" + key + :type quota_counter_key: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: QuotaCounterCollection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterCollection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_by_service.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'quotaCounterKey': self._serialize.url("quota_counter_key", quota_counter_key, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('QuotaCounterCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}'} + + def update( + self, resource_group_name, service_name, quota_counter_key, calls_count=None, kb_transferred=None, custom_headers=None, raw=False, **operation_config): + """Updates all the quota counter values specified with the existing quota + counter key to a value in the specified service instance. This should + be used for reset of the quota counter values. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param quota_counter_key: Quota counter key identifier.This is the + result of expression defined in counter-key attribute of the + quota-by-key policy.For Example, if you specify counter-key="boo" in + the policy, then it’s accessible by "boo" counter key. But if it’s + defined as counter-key="@("b"+"a")" then it will be accessible by "ba" + key + :type quota_counter_key: str + :param calls_count: Number of times Counter was called. + :type calls_count: int + :param kb_transferred: Data Transferred in KiloBytes. + :type kb_transferred: float + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + parameters = models.QuotaCounterValueContractProperties(calls_count=calls_count, kb_transferred=kb_transferred) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'quotaCounterKey': self._serialize.url("quota_counter_key", quota_counter_key, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'QuotaCounterValueContractProperties') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_period_keys_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_period_keys_operations.py new file mode 100644 index 000000000000..4384b269637b --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_period_keys_operations.py @@ -0,0 +1,185 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class QuotaByPeriodKeysOperations(object): + """QuotaByPeriodKeysOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def get( + self, resource_group_name, service_name, quota_counter_key, quota_period_key, custom_headers=None, raw=False, **operation_config): + """Gets the value of the quota counter associated with the counter-key in + the policy for the specific period in service instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param quota_counter_key: Quota counter key identifier.This is the + result of expression defined in counter-key attribute of the + quota-by-key policy.For Example, if you specify counter-key="boo" in + the policy, then it’s accessible by "boo" counter key. But if it’s + defined as counter-key="@("b"+"a")" then it will be accessible by "ba" + key + :type quota_counter_key: str + :param quota_period_key: Quota period key identifier. + :type quota_period_key: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: QuotaCounterContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'quotaCounterKey': self._serialize.url("quota_counter_key", quota_counter_key, 'str'), + 'quotaPeriodKey': self._serialize.url("quota_period_key", quota_period_key, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('QuotaCounterContract', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}'} + + def update( + self, resource_group_name, service_name, quota_counter_key, quota_period_key, calls_count=None, kb_transferred=None, custom_headers=None, raw=False, **operation_config): + """Updates an existing quota counter value in the specified service + instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param quota_counter_key: Quota counter key identifier.This is the + result of expression defined in counter-key attribute of the + quota-by-key policy.For Example, if you specify counter-key="boo" in + the policy, then it’s accessible by "boo" counter key. But if it’s + defined as counter-key="@("b"+"a")" then it will be accessible by "ba" + key + :type quota_counter_key: str + :param quota_period_key: Quota period key identifier. + :type quota_period_key: str + :param calls_count: Number of times Counter was called. + :type calls_count: int + :param kb_transferred: Data Transferred in KiloBytes. + :type kb_transferred: float + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + parameters = models.QuotaCounterValueContractProperties(calls_count=calls_count, kb_transferred=kb_transferred) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'quotaCounterKey': self._serialize.url("quota_counter_key", quota_counter_key, 'str'), + 'quotaPeriodKey': self._serialize.url("quota_period_key", quota_period_key, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'QuotaCounterValueContractProperties') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_region_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_region_operations.py new file mode 100644 index 000000000000..8fcf531354b6 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_region_operations.py @@ -0,0 +1,110 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class RegionOperations(object): + """RegionOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_by_service( + self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): + """Lists all azure regions in which the service exists. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of RegionContract + :rtype: + ~azure.mgmt.apimanagement.models.RegionContractPaged[~azure.mgmt.apimanagement.models.RegionContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_service.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RegionContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/regions'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_reports_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_reports_operations.py new file mode 100644 index 000000000000..6190f32da109 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_reports_operations.py @@ -0,0 +1,842 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ReportsOperations(object): + """ReportsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_by_api( + self, resource_group_name, service_name, filter, top=None, skip=None, orderby=None, custom_headers=None, raw=False, **operation_config): + """Lists report records by API. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param filter: The filter to apply on the operation. + :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param orderby: OData order by query option. + :type orderby: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ReportRecordContract + :rtype: + ~azure.mgmt.apimanagement.models.ReportRecordContractPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_api.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ReportRecordContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_api.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byApi'} + + def list_by_user( + self, resource_group_name, service_name, filter, top=None, skip=None, orderby=None, custom_headers=None, raw=False, **operation_config): + """Lists report records by User. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + timestamp | filter | ge, le | |
| displayName | select, + orderBy | | |
| userId | select, filter | eq | | +
| apiRegion | filter | eq | |
| productId | filter | eq + | |
| subscriptionId | filter | eq | |
| apiId | + filter | eq | |
| operationId | filter | eq | |
| + callCountSuccess | select, orderBy | | |
| + callCountBlocked | select, orderBy | | |
| + callCountFailed | select, orderBy | | |
| callCountOther + | select, orderBy | | |
| callCountTotal | select, + orderBy | | |
| bandwidth | select, orderBy | | | +
| cacheHitsCount | select | | |
| cacheMissCount | + select | | |
| apiTimeAvg | select, orderBy | | | +
| apiTimeMin | select | | |
| apiTimeMax | select | + | |
| serviceTimeAvg | select | | |
| + serviceTimeMin | select | | |
| serviceTimeMax | select | + | |
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param orderby: OData order by query option. + :type orderby: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ReportRecordContract + :rtype: + ~azure.mgmt.apimanagement.models.ReportRecordContractPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_user.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ReportRecordContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byUser'} + + def list_by_operation( + self, resource_group_name, service_name, filter, top=None, skip=None, orderby=None, custom_headers=None, raw=False, **operation_config): + """Lists report records by API Operations. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + timestamp | filter | ge, le | |
| displayName | select, + orderBy | | |
| apiRegion | filter | eq | |
| + userId | filter | eq | |
| productId | filter | eq | | +
| subscriptionId | filter | eq | |
| apiId | filter | eq + | |
| operationId | select, filter | eq | |
| + callCountSuccess | select, orderBy | | |
| + callCountBlocked | select, orderBy | | |
| + callCountFailed | select, orderBy | | |
| callCountOther + | select, orderBy | | |
| callCountTotal | select, + orderBy | | |
| bandwidth | select, orderBy | | | +
| cacheHitsCount | select | | |
| cacheMissCount | + select | | |
| apiTimeAvg | select, orderBy | | | +
| apiTimeMin | select | | |
| apiTimeMax | select | + | |
| serviceTimeAvg | select | | |
| + serviceTimeMin | select | | |
| serviceTimeMax | select | + | |
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param orderby: OData order by query option. + :type orderby: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ReportRecordContract + :rtype: + ~azure.mgmt.apimanagement.models.ReportRecordContractPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_operation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ReportRecordContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byOperation'} + + def list_by_product( + self, resource_group_name, service_name, filter, top=None, skip=None, orderby=None, custom_headers=None, raw=False, **operation_config): + """Lists report records by Product. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + timestamp | filter | ge, le | |
| displayName | select, + orderBy | | |
| apiRegion | filter | eq | |
| + userId | filter | eq | |
| productId | select, filter | eq | + |
| subscriptionId | filter | eq | |
| callCountSuccess + | select, orderBy | | |
| callCountBlocked | select, + orderBy | | |
| callCountFailed | select, orderBy | | + |
| callCountOther | select, orderBy | | |
| + callCountTotal | select, orderBy | | |
| bandwidth | + select, orderBy | | |
| cacheHitsCount | select | | + |
| cacheMissCount | select | | |
| apiTimeAvg | + select, orderBy | | |
| apiTimeMin | select | | | +
| apiTimeMax | select | | |
| serviceTimeAvg | + select | | |
| serviceTimeMin | select | | | +
| serviceTimeMax | select | | |
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param orderby: OData order by query option. + :type orderby: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ReportRecordContract + :rtype: + ~azure.mgmt.apimanagement.models.ReportRecordContractPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_product.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ReportRecordContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_product.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byProduct'} + + def list_by_geo( + self, resource_group_name, service_name, filter, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + """Lists report records by geography. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + timestamp | filter | ge, le | |
| country | select | | + |
| region | select | | |
| zip | select | | + |
| apiRegion | filter | eq | |
| userId | filter | eq | + |
| productId | filter | eq | |
| subscriptionId | + filter | eq | |
| apiId | filter | eq | |
| + operationId | filter | eq | |
| callCountSuccess | select | + | |
| callCountBlocked | select | | |
| + callCountFailed | select | | |
| callCountOther | select + | | |
| bandwidth | select, orderBy | | |
| + cacheHitsCount | select | | |
| cacheMissCount | select | + | |
| apiTimeAvg | select | | |
| apiTimeMin | + select | | |
| apiTimeMax | select | | |
| + serviceTimeAvg | select | | |
| serviceTimeMin | select | + | |
| serviceTimeMax | select | | |
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ReportRecordContract + :rtype: + ~azure.mgmt.apimanagement.models.ReportRecordContractPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_geo.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ReportRecordContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_geo.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byGeo'} + + def list_by_subscription( + self, resource_group_name, service_name, filter, top=None, skip=None, orderby=None, custom_headers=None, raw=False, **operation_config): + """Lists report records by subscription. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + timestamp | filter | ge, le | |
| displayName | select, + orderBy | | |
| apiRegion | filter | eq | |
| + userId | select, filter | eq | |
| productId | select, filter + | eq | |
| subscriptionId | select, filter | eq | | +
| callCountSuccess | select, orderBy | | |
| + callCountBlocked | select, orderBy | | |
| + callCountFailed | select, orderBy | | |
| callCountOther + | select, orderBy | | |
| callCountTotal | select, + orderBy | | |
| bandwidth | select, orderBy | | | +
| cacheHitsCount | select | | |
| cacheMissCount | + select | | |
| apiTimeAvg | select, orderBy | | | +
| apiTimeMin | select | | |
| apiTimeMax | select | + | |
| serviceTimeAvg | select | | |
| + serviceTimeMin | select | | |
| serviceTimeMax | select | + | |
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param orderby: OData order by query option. + :type orderby: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ReportRecordContract + :rtype: + ~azure.mgmt.apimanagement.models.ReportRecordContractPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ReportRecordContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/bySubscription'} + + def list_by_time( + self, resource_group_name, service_name, filter, interval, top=None, skip=None, orderby=None, custom_headers=None, raw=False, **operation_config): + """Lists report records by Time. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + timestamp | filter, select | ge, le | |
| interval | select | + | |
| apiRegion | filter | eq | |
| userId | filter + | eq | |
| productId | filter | eq | |
| + subscriptionId | filter | eq | |
| apiId | filter | eq | + |
| operationId | filter | eq | |
| callCountSuccess | + select | | |
| callCountBlocked | select | | | +
| callCountFailed | select | | |
| callCountOther | + select | | |
| bandwidth | select, orderBy | | | +
| cacheHitsCount | select | | |
| cacheMissCount | + select | | |
| apiTimeAvg | select | | |
| + apiTimeMin | select | | |
| apiTimeMax | select | | + |
| serviceTimeAvg | select | | |
| serviceTimeMin | + select | | |
| serviceTimeMax | select | | | +
+ :type filter: str + :param interval: By time interval. Interval must be multiple of 15 + minutes and may not be zero. The value should be in ISO 8601 format + (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be + used to convert TimeSpan to a valid interval string: + XmlConvert.ToString(new TimeSpan(hours, minutes, seconds)). + :type interval: timedelta + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param orderby: OData order by query option. + :type orderby: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ReportRecordContract + :rtype: + ~azure.mgmt.apimanagement.models.ReportRecordContractPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_time.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') + query_parameters['interval'] = self._serialize.query("interval", interval, 'duration') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ReportRecordContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_time.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byTime'} + + def list_by_request( + self, resource_group_name, service_name, filter, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + """Lists report records by Request. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + timestamp | filter | ge, le | |
| apiId | filter | eq | | +
| operationId | filter | eq | |
| productId | filter | + eq | |
| userId | filter | eq | |
| apiRegion | + filter | eq | |
| subscriptionId | filter | eq | |
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of RequestReportRecordContract + :rtype: + ~azure.mgmt.apimanagement.models.RequestReportRecordContractPaged[~azure.mgmt.apimanagement.models.RequestReportRecordContract] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_request.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RequestReportRecordContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_request.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byRequest'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_in_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_in_settings_operations.py new file mode 100644 index 000000000000..e0a1626dc3c0 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_in_settings_operations.py @@ -0,0 +1,297 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class SignInSettingsOperations(object): + """SignInSettingsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def get_entity_tag( + self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): + """Gets the entity state (Etag) version of the SignInSettings. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_tag.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'ETag': 'str', + }) + return client_raw_response + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin'} + + def get( + self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): + """Get Sign In Settings for the Portal. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PortalSigninSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.PortalSigninSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PortalSigninSettings', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin'} + + def update( + self, resource_group_name, service_name, if_match, enabled=None, custom_headers=None, raw=False, **operation_config): + """Update Sign-In settings. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param enabled: Redirect Anonymous users to the Sign-In page. + :type enabled: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + parameters = models.PortalSigninSettings(enabled=enabled) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'PortalSigninSettings') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin'} + + def create_or_update( + self, resource_group_name, service_name, if_match=None, enabled=None, custom_headers=None, raw=False, **operation_config): + """Create or Update Sign-In settings. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param if_match: ETag of the Entity. Not required when creating an + entity, but required when updating an entity. + :type if_match: str + :param enabled: Redirect Anonymous users to the Sign-In page. + :type enabled: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PortalSigninSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.PortalSigninSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + parameters = models.PortalSigninSettings(enabled=enabled) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'PortalSigninSettings') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PortalSigninSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_up_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_up_settings_operations.py new file mode 100644 index 000000000000..1a7e76d7c99d --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_up_settings_operations.py @@ -0,0 +1,303 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class SignUpSettingsOperations(object): + """SignUpSettingsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def get_entity_tag( + self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): + """Gets the entity state (Etag) version of the SignUpSettings. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_tag.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'ETag': 'str', + }) + return client_raw_response + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup'} + + def get( + self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): + """Get Sign Up Settings for the Portal. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PortalSignupSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.PortalSignupSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PortalSignupSettings', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup'} + + def update( + self, resource_group_name, service_name, if_match, enabled=None, terms_of_service=None, custom_headers=None, raw=False, **operation_config): + """Update Sign-Up settings. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param enabled: Allow users to sign up on a developer portal. + :type enabled: bool + :param terms_of_service: Terms of service contract properties. + :type terms_of_service: + ~azure.mgmt.apimanagement.models.TermsOfServiceProperties + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + parameters = models.PortalSignupSettings(enabled=enabled, terms_of_service=terms_of_service) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'PortalSignupSettings') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup'} + + def create_or_update( + self, resource_group_name, service_name, if_match=None, enabled=None, terms_of_service=None, custom_headers=None, raw=False, **operation_config): + """Create or Update Sign-Up settings. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param if_match: ETag of the Entity. Not required when creating an + entity, but required when updating an entity. + :type if_match: str + :param enabled: Allow users to sign up on a developer portal. + :type enabled: bool + :param terms_of_service: Terms of service contract properties. + :type terms_of_service: + ~azure.mgmt.apimanagement.models.TermsOfServiceProperties + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PortalSignupSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.PortalSignupSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + parameters = models.PortalSignupSettings(enabled=enabled, terms_of_service=terms_of_service) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'PortalSignupSettings') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PortalSignupSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_subscription_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_subscription_operations.py new file mode 100644 index 000000000000..b633c4dced4c --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_subscription_operations.py @@ -0,0 +1,609 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class SubscriptionOperations(object): + """SubscriptionOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list( + self, resource_group_name, service_name, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + """Lists all subscriptions of the API Management service instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + name | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| displayName | filter | ge, le, eq, ne, + gt, lt | substringof, contains, startswith, endswith |
| + stateComment | filter | ge, le, eq, ne, gt, lt | substringof, + contains, startswith, endswith |
| ownerId | filter | ge, le, eq, + ne, gt, lt | substringof, contains, startswith, endswith |
| + scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt + | substringof, contains, startswith, endswith |
| productId | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| state | filter | eq | |
| user | expand | + | |
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SubscriptionContract + :rtype: + ~azure.mgmt.apimanagement.models.SubscriptionContractPaged[~azure.mgmt.apimanagement.models.SubscriptionContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SubscriptionContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions'} + + def get_entity_tag( + self, resource_group_name, service_name, sid, custom_headers=None, raw=False, **operation_config): + """Gets the entity state (Etag) version of the apimanagement subscription + specified by its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param sid: Subscription entity Identifier. The entity represents the + association between a user and a product in API Management. + :type sid: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_tag.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'sid': self._serialize.url("sid", sid, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'ETag': 'str', + }) + return client_raw_response + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}'} + + def get( + self, resource_group_name, service_name, sid, custom_headers=None, raw=False, **operation_config): + """Gets the specified Subscription entity. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param sid: Subscription entity Identifier. The entity represents the + association between a user and a product in API Management. + :type sid: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SubscriptionContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'sid': self._serialize.url("sid", sid, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SubscriptionContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}'} + + def create_or_update( + self, resource_group_name, service_name, sid, parameters, notify=None, if_match=None, custom_headers=None, raw=False, **operation_config): + """Creates or updates the subscription of specified user to the specified + product. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param sid: Subscription entity Identifier. The entity represents the + association between a user and a product in API Management. + :type sid: str + :param parameters: Create parameters. + :type parameters: + ~azure.mgmt.apimanagement.models.SubscriptionCreateParameters + :param notify: Notify change in Subscription State. + - If false, do not send any email notification for change of state of + subscription + - If true, send email notification of change of state of subscription + :type notify: bool + :param if_match: ETag of the Entity. Not required when creating an + entity, but required when updating an entity. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SubscriptionContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'sid': self._serialize.url("sid", sid, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if notify is not None: + query_parameters['notify'] = self._serialize.query("notify", notify, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'SubscriptionCreateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SubscriptionContract', response) + header_dict = { + 'ETag': 'str', + } + if response.status_code == 201: + deserialized = self._deserialize('SubscriptionContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}'} + + def update( + self, resource_group_name, service_name, sid, parameters, if_match, notify=None, custom_headers=None, raw=False, **operation_config): + """Updates the details of a subscription specified by its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param sid: Subscription entity Identifier. The entity represents the + association between a user and a product in API Management. + :type sid: str + :param parameters: Update parameters. + :type parameters: + ~azure.mgmt.apimanagement.models.SubscriptionUpdateParameters + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param notify: Notify change in Subscription State. + - If false, do not send any email notification for change of state of + subscription + - If true, send email notification of change of state of subscription + :type notify: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'sid': self._serialize.url("sid", sid, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if notify is not None: + query_parameters['notify'] = self._serialize.query("notify", notify, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'SubscriptionUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}'} + + def delete( + self, resource_group_name, service_name, sid, if_match, custom_headers=None, raw=False, **operation_config): + """Deletes the specified subscription. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param sid: Subscription entity Identifier. The entity represents the + association between a user and a product in API Management. + :type sid: str + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'sid': self._serialize.url("sid", sid, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}'} + + def regenerate_primary_key( + self, resource_group_name, service_name, sid, custom_headers=None, raw=False, **operation_config): + """Regenerates primary key of existing subscription of the API Management + service instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param sid: Subscription entity Identifier. The entity represents the + association between a user and a product in API Management. + :type sid: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.regenerate_primary_key.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'sid': self._serialize.url("sid", sid, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + regenerate_primary_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/regeneratePrimaryKey'} + + def regenerate_secondary_key( + self, resource_group_name, service_name, sid, custom_headers=None, raw=False, **operation_config): + """Regenerates secondary key of existing subscription of the API + Management service instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param sid: Subscription entity Identifier. The entity represents the + association between a user and a product in API Management. + :type sid: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.regenerate_secondary_key.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'sid': self._serialize.url("sid", sid, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + regenerate_secondary_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/regenerateSecondaryKey'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_operations.py new file mode 100644 index 000000000000..f32f51c98105 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_operations.py @@ -0,0 +1,1588 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class TagOperations(object): + """TagOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_by_operation( + self, resource_group_name, service_name, api_id, operation_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + """Lists all Tags associated with the Operation. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be + unique in the current API Management service instance. + :type operation_id: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TagContract + :rtype: + ~azure.mgmt.apimanagement.models.TagContractPaged[~azure.mgmt.apimanagement.models.TagContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_operation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TagContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags'} + + def get_entity_state_by_operation( + self, resource_group_name, service_name, api_id, operation_id, tag_id, custom_headers=None, raw=False, **operation_config): + """Gets the entity state version of the tag specified by its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be + unique in the current API Management service instance. + :type operation_id: str + :param tag_id: Tag identifier. Must be unique in the current API + Management service instance. + :type tag_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_state_by_operation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'ETag': 'str', + }) + return client_raw_response + get_entity_state_by_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}'} + + def get_by_operation( + self, resource_group_name, service_name, api_id, operation_id, tag_id, custom_headers=None, raw=False, **operation_config): + """Get tag associated with the Operation. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be + unique in the current API Management service instance. + :type operation_id: str + :param tag_id: Tag identifier. Must be unique in the current API + Management service instance. + :type tag_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TagContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.TagContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_by_operation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TagContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get_by_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}'} + + def assign_to_operation( + self, resource_group_name, service_name, api_id, operation_id, tag_id, custom_headers=None, raw=False, **operation_config): + """Assign tag to the Operation. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be + unique in the current API Management service instance. + :type operation_id: str + :param tag_id: Tag identifier. Must be unique in the current API + Management service instance. + :type tag_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TagContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.TagContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.assign_to_operation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TagContract', response) + if response.status_code == 201: + deserialized = self._deserialize('TagContract', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + assign_to_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}'} + + def detach_from_operation( + self, resource_group_name, service_name, api_id, operation_id, tag_id, custom_headers=None, raw=False, **operation_config): + """Detach the tag from the Operation. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param operation_id: Operation identifier within an API. Must be + unique in the current API Management service instance. + :type operation_id: str + :param tag_id: Tag identifier. Must be unique in the current API + Management service instance. + :type tag_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.detach_from_operation.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + detach_from_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}'} + + def list_by_api( + self, resource_group_name, service_name, api_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + """Lists all Tags associated with the API. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TagContract + :rtype: + ~azure.mgmt.apimanagement.models.TagContractPaged[~azure.mgmt.apimanagement.models.TagContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_api.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TagContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_api.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags'} + + def get_entity_state_by_api( + self, resource_group_name, service_name, api_id, tag_id, custom_headers=None, raw=False, **operation_config): + """Gets the entity state version of the tag specified by its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param tag_id: Tag identifier. Must be unique in the current API + Management service instance. + :type tag_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_state_by_api.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'ETag': 'str', + }) + return client_raw_response + get_entity_state_by_api.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}'} + + def get_by_api( + self, resource_group_name, service_name, api_id, tag_id, custom_headers=None, raw=False, **operation_config): + """Get tag associated with the API. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param tag_id: Tag identifier. Must be unique in the current API + Management service instance. + :type tag_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TagContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.TagContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_by_api.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TagContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get_by_api.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}'} + + def assign_to_api( + self, resource_group_name, service_name, api_id, tag_id, custom_headers=None, raw=False, **operation_config): + """Assign tag to the Api. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param tag_id: Tag identifier. Must be unique in the current API + Management service instance. + :type tag_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TagContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.TagContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.assign_to_api.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TagContract', response) + header_dict = { + 'ETag': 'str', + } + if response.status_code == 201: + deserialized = self._deserialize('TagContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + assign_to_api.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}'} + + def detach_from_api( + self, resource_group_name, service_name, api_id, tag_id, custom_headers=None, raw=False, **operation_config): + """Detach the tag from the Api. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param api_id: API revision identifier. Must be unique in the current + API Management service instance. Non-current revision has ;rev=n as a + suffix where n is the revision number. + :type api_id: str + :param tag_id: Tag identifier. Must be unique in the current API + Management service instance. + :type tag_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.detach_from_api.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + detach_from_api.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}'} + + def list_by_product( + self, resource_group_name, service_name, product_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + """Lists all Tags associated with the Product. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current + API Management service instance. + :type product_id: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TagContract + :rtype: + ~azure.mgmt.apimanagement.models.TagContractPaged[~azure.mgmt.apimanagement.models.TagContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_product.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TagContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_product.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags'} + + def get_entity_state_by_product( + self, resource_group_name, service_name, product_id, tag_id, custom_headers=None, raw=False, **operation_config): + """Gets the entity state version of the tag specified by its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current + API Management service instance. + :type product_id: str + :param tag_id: Tag identifier. Must be unique in the current API + Management service instance. + :type tag_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_state_by_product.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'ETag': 'str', + }) + return client_raw_response + get_entity_state_by_product.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}'} + + def get_by_product( + self, resource_group_name, service_name, product_id, tag_id, custom_headers=None, raw=False, **operation_config): + """Get tag associated with the Product. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current + API Management service instance. + :type product_id: str + :param tag_id: Tag identifier. Must be unique in the current API + Management service instance. + :type tag_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TagContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.TagContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_by_product.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TagContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get_by_product.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}'} + + def assign_to_product( + self, resource_group_name, service_name, product_id, tag_id, custom_headers=None, raw=False, **operation_config): + """Assign tag to the Product. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current + API Management service instance. + :type product_id: str + :param tag_id: Tag identifier. Must be unique in the current API + Management service instance. + :type tag_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TagContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.TagContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.assign_to_product.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TagContract', response) + if response.status_code == 201: + deserialized = self._deserialize('TagContract', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + assign_to_product.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}'} + + def detach_from_product( + self, resource_group_name, service_name, product_id, tag_id, custom_headers=None, raw=False, **operation_config): + """Detach the tag from the Product. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param product_id: Product identifier. Must be unique in the current + API Management service instance. + :type product_id: str + :param tag_id: Tag identifier. Must be unique in the current API + Management service instance. + :type tag_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.detach_from_product.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + detach_from_product.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}'} + + def list_by_service( + self, resource_group_name, service_name, filter=None, top=None, skip=None, scope=None, custom_headers=None, raw=False, **operation_config): + """Lists a collection of tags defined within a service instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + name | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| displayName | filter | ge, le, eq, ne, + gt, lt | substringof, contains, startswith, endswith |
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param scope: Scope like 'apis', 'products' or 'apis/{apiId} + :type scope: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TagContract + :rtype: + ~azure.mgmt.apimanagement.models.TagContractPaged[~azure.mgmt.apimanagement.models.TagContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_service.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if scope is not None: + query_parameters['scope'] = self._serialize.query("scope", scope, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TagContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags'} + + def get_entity_state( + self, resource_group_name, service_name, tag_id, custom_headers=None, raw=False, **operation_config): + """Gets the entity state version of the tag specified by its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API + Management service instance. + :type tag_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_state.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'ETag': 'str', + }) + return client_raw_response + get_entity_state.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}'} + + def get( + self, resource_group_name, service_name, tag_id, custom_headers=None, raw=False, **operation_config): + """Gets the details of the tag specified by its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API + Management service instance. + :type tag_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TagContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.TagContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TagContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}'} + + def create_or_update( + self, resource_group_name, service_name, tag_id, display_name, if_match=None, custom_headers=None, raw=False, **operation_config): + """Creates a tag. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API + Management service instance. + :type tag_id: str + :param display_name: Tag name. + :type display_name: str + :param if_match: ETag of the Entity. Not required when creating an + entity, but required when updating an entity. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TagContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.TagContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + parameters = models.TagCreateUpdateParameters(display_name=display_name) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'TagCreateUpdateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TagContract', response) + header_dict = { + 'ETag': 'str', + } + if response.status_code == 201: + deserialized = self._deserialize('TagContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}'} + + def update( + self, resource_group_name, service_name, tag_id, if_match, display_name, custom_headers=None, raw=False, **operation_config): + """Updates the details of the tag specified by its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API + Management service instance. + :type tag_id: str + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param display_name: Tag name. + :type display_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + parameters = models.TagCreateUpdateParameters(display_name=display_name) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'TagCreateUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}'} + + def delete( + self, resource_group_name, service_name, tag_id, if_match, custom_headers=None, raw=False, **operation_config): + """Deletes specific tag of the API Management service instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param tag_id: Tag identifier. Must be unique in the current API + Management service instance. + :type tag_id: str + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_resource_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_resource_operations.py new file mode 100644 index 000000000000..15cc604d2f44 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_resource_operations.py @@ -0,0 +1,142 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class TagResourceOperations(object): + """TagResourceOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_by_service( + self, resource_group_name, service_name, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + """Lists a collection of resources associated with tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + aid | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
| displayName | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| apiName | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
| apiRevision | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| path | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
| description | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
| method | filter | + ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | +
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, + contains, startswith, endswith |
| terms | filter | ge, le, eq, + ne, gt, lt | substringof, contains, startswith, endswith |
| + state | filter | eq | |
| isCurrent | filter | eq | | +
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TagResourceContract + :rtype: + ~azure.mgmt.apimanagement.models.TagResourceContractPaged[~azure.mgmt.apimanagement.models.TagResourceContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_service.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TagResourceContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tagResources'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_git_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_git_operations.py new file mode 100644 index 000000000000..a2f3ad8d19c3 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_git_operations.py @@ -0,0 +1,213 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class TenantAccessGitOperations(object): + """TenantAccessGitOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + :ivar access_name: The identifier of the Access configuration. Constant value: "access". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + self.access_name = "access" + + self.config = config + + def get( + self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): + """Gets the Git access configuration for the tenant. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AccessInformationContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.AccessInformationContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'accessName': self._serialize.url("self.access_name", self.access_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AccessInformationContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/git'} + + def regenerate_primary_key( + self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): + """Regenerate primary access key for GIT. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.regenerate_primary_key.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'accessName': self._serialize.url("self.access_name", self.access_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + regenerate_primary_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/git/regeneratePrimaryKey'} + + def regenerate_secondary_key( + self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): + """Regenerate secondary access key for GIT. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.regenerate_secondary_key.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'accessName': self._serialize.url("self.access_name", self.access_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + regenerate_secondary_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/git/regenerateSecondaryKey'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_operations.py new file mode 100644 index 000000000000..4fa0bd4be682 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_operations.py @@ -0,0 +1,335 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class TenantAccessOperations(object): + """TenantAccessOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + :ivar access_name: The identifier of the Access configuration. Constant value: "access". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + self.access_name = "access" + + self.config = config + + def get_entity_tag( + self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): + """Tenant access metadata. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_tag.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'accessName': self._serialize.url("self.access_name", self.access_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'ETag': 'str', + }) + return client_raw_response + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}'} + + def get( + self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): + """Get tenant access information details. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AccessInformationContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.AccessInformationContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'accessName': self._serialize.url("self.access_name", self.access_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AccessInformationContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}'} + + def update( + self, resource_group_name, service_name, if_match, enabled=None, custom_headers=None, raw=False, **operation_config): + """Update tenant access information details. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param enabled: Determines whether direct access is enabled. + :type enabled: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + parameters = models.AccessInformationUpdateParameters(enabled=enabled) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'accessName': self._serialize.url("self.access_name", self.access_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'AccessInformationUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}'} + + def regenerate_primary_key( + self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): + """Regenerate primary access key. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.regenerate_primary_key.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'accessName': self._serialize.url("self.access_name", self.access_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + regenerate_primary_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/regeneratePrimaryKey'} + + def regenerate_secondary_key( + self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): + """Regenerate secondary access key. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.regenerate_secondary_key.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'accessName': self._serialize.url("self.access_name", self.access_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + regenerate_secondary_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/regenerateSecondaryKey'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_configuration_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_configuration_operations.py new file mode 100644 index 000000000000..4664b8faaec7 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_configuration_operations.py @@ -0,0 +1,436 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class TenantConfigurationOperations(object): + """TenantConfigurationOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + :ivar configuration_name: The identifier of the Git Configuration Operation. Constant value: "configuration". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + self.configuration_name = "configuration" + + self.config = config + + + def _deploy_initial( + self, resource_group_name, service_name, branch, force=None, custom_headers=None, raw=False, **operation_config): + parameters = models.DeployConfigurationParameters(branch=branch, force=force) + + # Construct URL + url = self.deploy.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'configurationName': self._serialize.url("self.configuration_name", self.configuration_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'DeployConfigurationParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationResultContract', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def deploy( + self, resource_group_name, service_name, branch, force=None, custom_headers=None, raw=False, polling=True, **operation_config): + """This operation applies changes from the specified Git branch to the + configuration database. This is a long running operation and could take + several minutes to complete. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param branch: The name of the Git branch from which the configuration + is to be deployed to the configuration database. + :type branch: str + :param force: The value enforcing deleting subscriptions to products + that are deleted in this update. + :type force: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationResultContract + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.apimanagement.models.OperationResultContract] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.apimanagement.models.OperationResultContract]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._deploy_initial( + resource_group_name=resource_group_name, + service_name=service_name, + branch=branch, + force=force, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationResultContract', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + deploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/deploy'} + + + def _save_initial( + self, resource_group_name, service_name, branch, force=None, custom_headers=None, raw=False, **operation_config): + parameters = models.SaveConfigurationParameter(branch=branch, force=force) + + # Construct URL + url = self.save.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'configurationName': self._serialize.url("self.configuration_name", self.configuration_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'SaveConfigurationParameter') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationResultContract', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def save( + self, resource_group_name, service_name, branch, force=None, custom_headers=None, raw=False, polling=True, **operation_config): + """This operation creates a commit with the current configuration snapshot + to the specified branch in the repository. This is a long running + operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param branch: The name of the Git branch in which to commit the + current configuration snapshot. + :type branch: str + :param force: The value if true, the current configuration database is + committed to the Git repository, even if the Git repository has newer + changes that would be overwritten. + :type force: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationResultContract + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.apimanagement.models.OperationResultContract] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.apimanagement.models.OperationResultContract]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._save_initial( + resource_group_name=resource_group_name, + service_name=service_name, + branch=branch, + force=force, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationResultContract', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + save.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/save'} + + + def _validate_initial( + self, resource_group_name, service_name, branch, force=None, custom_headers=None, raw=False, **operation_config): + parameters = models.DeployConfigurationParameters(branch=branch, force=force) + + # Construct URL + url = self.validate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'configurationName': self._serialize.url("self.configuration_name", self.configuration_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'DeployConfigurationParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationResultContract', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def validate( + self, resource_group_name, service_name, branch, force=None, custom_headers=None, raw=False, polling=True, **operation_config): + """This operation validates the changes in the specified Git branch. This + is a long running operation and could take several minutes to complete. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param branch: The name of the Git branch from which the configuration + is to be deployed to the configuration database. + :type branch: str + :param force: The value enforcing deleting subscriptions to products + that are deleted in this update. + :type force: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OperationResultContract + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.apimanagement.models.OperationResultContract] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.apimanagement.models.OperationResultContract]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._validate_initial( + resource_group_name=resource_group_name, + service_name=service_name, + branch=branch, + force=force, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationResultContract', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/validate'} + + def get_sync_state( + self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): + """Gets the status of the most recent synchronization between the + configuration database and the Git repository. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TenantConfigurationSyncStateContract or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.apimanagement.models.TenantConfigurationSyncStateContract + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_sync_state.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'configurationName': self._serialize.url("self.configuration_name", self.configuration_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TenantConfigurationSyncStateContract', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_sync_state.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/syncState'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_confirmation_password_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_confirmation_password_operations.py new file mode 100644 index 000000000000..d2a8cc4eb489 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_confirmation_password_operations.py @@ -0,0 +1,95 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class UserConfirmationPasswordOperations(object): + """UserConfirmationPasswordOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def send( + self, resource_group_name, service_name, user_id, custom_headers=None, raw=False, **operation_config): + """Sends confirmation. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API + Management service instance. + :type user_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.send.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + send.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/confirmations/password/send'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_group_operations.py new file mode 100644 index 000000000000..a17cf02586ac --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_group_operations.py @@ -0,0 +1,133 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class UserGroupOperations(object): + """UserGroupOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list( + self, resource_group_name, service_name, user_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + """Lists all user groups. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API + Management service instance. + :type user_id: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + name | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| displayName | filter | ge, le, eq, ne, + gt, lt | substringof, contains, startswith, endswith |
| + description | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of GroupContract + :rtype: + ~azure.mgmt.apimanagement.models.GroupContractPaged[~azure.mgmt.apimanagement.models.GroupContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.GroupContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/groups'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_identities_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_identities_operations.py new file mode 100644 index 000000000000..b3ef9a1aadd5 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_identities_operations.py @@ -0,0 +1,114 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class UserIdentitiesOperations(object): + """UserIdentitiesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list( + self, resource_group_name, service_name, user_id, custom_headers=None, raw=False, **operation_config): + """List of all user identities. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API + Management service instance. + :type user_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of UserIdentityContract + :rtype: + ~azure.mgmt.apimanagement.models.UserIdentityContractPaged[~azure.mgmt.apimanagement.models.UserIdentityContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UserIdentityContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/identities'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_operations.py new file mode 100644 index 000000000000..8ba48ed61a1a --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_operations.py @@ -0,0 +1,634 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class UserOperations(object): + """UserOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list_by_service( + self, resource_group_name, service_name, filter=None, top=None, skip=None, expand_groups=None, custom_headers=None, raw=False, **operation_config): + """Lists a collection of registered users in the specified service + instance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + name | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| firstName | filter | ge, le, eq, ne, gt, + lt | substringof, contains, startswith, endswith |
| lastName | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
| email | filter | ge, le, eq, ne, gt, lt | + substringof, contains, startswith, endswith |
| state | filter | + eq | |
| registrationDate | filter | ge, le, eq, ne, gt, lt | + |
| note | filter | ge, le, eq, ne, gt, lt | substringof, + contains, startswith, endswith |
| groups | expand | | | +
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param expand_groups: Detailed Group in response. + :type expand_groups: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of UserContract + :rtype: + ~azure.mgmt.apimanagement.models.UserContractPaged[~azure.mgmt.apimanagement.models.UserContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_service.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + if expand_groups is not None: + query_parameters['expandGroups'] = self._serialize.query("expand_groups", expand_groups, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UserContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users'} + + def get_entity_tag( + self, resource_group_name, service_name, user_id, custom_headers=None, raw=False, **operation_config): + """Gets the entity state (Etag) version of the user specified by its + identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API + Management service instance. + :type user_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_entity_tag.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.head(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'ETag': 'str', + }) + return client_raw_response + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}'} + + def get( + self, resource_group_name, service_name, user_id, custom_headers=None, raw=False, **operation_config): + """Gets the details of the user specified by its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API + Management service instance. + :type user_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: UserContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.UserContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('UserContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}'} + + def create_or_update( + self, resource_group_name, service_name, user_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): + """Creates or Updates a user. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API + Management service instance. + :type user_id: str + :param parameters: Create or update parameters. + :type parameters: + ~azure.mgmt.apimanagement.models.UserCreateParameters + :param if_match: ETag of the Entity. Not required when creating an + entity, but required when updating an entity. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: UserContract or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.UserContract or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'UserCreateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('UserContract', response) + header_dict = { + 'ETag': 'str', + } + if response.status_code == 201: + deserialized = self._deserialize('UserContract', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}'} + + def update( + self, resource_group_name, service_name, user_id, parameters, if_match, custom_headers=None, raw=False, **operation_config): + """Updates the details of the user specified by its identifier. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API + Management service instance. + :type user_id: str + :param parameters: Update parameters. + :type parameters: + ~azure.mgmt.apimanagement.models.UserUpdateParameters + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'UserUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}'} + + def delete( + self, resource_group_name, service_name, user_id, if_match, delete_subscriptions=None, notify=None, custom_headers=None, raw=False, **operation_config): + """Deletes specific user. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API + Management service instance. + :type user_id: str + :param if_match: ETag of the Entity. ETag should match the current + entity state from the header response of the GET request or it should + be * for unconditional update. + :type if_match: str + :param delete_subscriptions: Whether to delete user's subscription or + not. + :type delete_subscriptions: bool + :param notify: Send an Account Closed Email notification to the User. + :type notify: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if delete_subscriptions is not None: + query_parameters['deleteSubscriptions'] = self._serialize.query("delete_subscriptions", delete_subscriptions, 'bool') + if notify is not None: + query_parameters['notify'] = self._serialize.query("notify", notify, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}'} + + def generate_sso_url( + self, resource_group_name, service_name, user_id, custom_headers=None, raw=False, **operation_config): + """Retrieves a redirection URL containing an authentication token for + signing a given user into the developer portal. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API + Management service instance. + :type user_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: GenerateSsoUrlResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.GenerateSsoUrlResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.generate_sso_url.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('GenerateSsoUrlResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + generate_sso_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/generateSsoUrl'} + + def get_shared_access_token( + self, resource_group_name, service_name, user_id, expiry, key_type="primary", custom_headers=None, raw=False, **operation_config): + """Gets the Shared Access Authorization Token for the User. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API + Management service instance. + :type user_id: str + :param key_type: The Key to be used to generate token for user. + Possible values include: 'primary', 'secondary' + :type key_type: str or ~azure.mgmt.apimanagement.models.KeyType + :param expiry: The Expiry time of the Token. Maximum token expiry time + is set to 30 days. The date conforms to the following format: + `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + :type expiry: datetime + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: UserTokenResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.apimanagement.models.UserTokenResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + parameters = models.UserTokenParameters(key_type=key_type, expiry=expiry) + + # Construct URL + url = self.get_shared_access_token.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'UserTokenParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('UserTokenResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_shared_access_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/token'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_subscription_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_subscription_operations.py new file mode 100644 index 000000000000..741daaa892d4 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_subscription_operations.py @@ -0,0 +1,139 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class UserSubscriptionOperations(object): + """UserSubscriptionOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list( + self, resource_group_name, service_name, user_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): + """Lists the collection of subscriptions of the specified user. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param user_id: User identifier. Must be unique in the current API + Management service instance. + :type user_id: str + :param filter: | Field | Usage | Supported operators + | Supported functions + |
|-------------|-------------|-------------|-------------|
| + name | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| displayName | filter | ge, le, eq, ne, + gt, lt | substringof, contains, startswith, endswith |
| + stateComment | filter | ge, le, eq, ne, gt, lt | substringof, + contains, startswith, endswith |
| ownerId | filter | ge, le, eq, + ne, gt, lt | substringof, contains, startswith, endswith |
| + scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, + startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt + | substringof, contains, startswith, endswith |
| productId | + filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, + endswith |
+ :type filter: str + :param top: Number of records to return. + :type top: int + :param skip: Number of records to skip. + :type skip: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SubscriptionContract + :rtype: + ~azure.mgmt.apimanagement.models.SubscriptionContractPaged[~azure.mgmt.apimanagement.models.SubscriptionContract] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SubscriptionContractPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/subscriptions'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_diagnostic_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_diagnostic_operations.py deleted file mode 100644 index b00a8d13b667..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_diagnostic_operations.py +++ /dev/null @@ -1,492 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ApiDiagnosticOperations(object): - """ApiDiagnosticOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_service( - self, resource_group_name, service_name, api_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists all diagnostics of an API. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API - Management service instance. - :type api_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DiagnosticContract - :rtype: - ~azure.mgmt.apimanagement.models.DiagnosticContractPaged[~azure.mgmt.apimanagement.models.DiagnosticContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_service.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.DiagnosticContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DiagnosticContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics'} - - def get_entity_tag( - self, resource_group_name, service_name, api_id, diagnostic_id, custom_headers=None, raw=False, **operation_config): - """Gets the entity state (Etag) version of the Diagnostic for an API - specified by its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API - Management service instance. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the - current API Management service instance. - :type diagnostic_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_entity_tag.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ - 'ETag': 'str', - }) - return client_raw_response - get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}'} - - def get( - self, resource_group_name, service_name, api_id, diagnostic_id, custom_headers=None, raw=False, **operation_config): - """Gets the details of the Diagnostic for an API specified by its - identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API - Management service instance. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the - current API Management service instance. - :type diagnostic_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}'} - - def create_or_update( - self, resource_group_name, service_name, api_id, diagnostic_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): - """Creates a new Diagnostic for an API or updates an existing one. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API - Management service instance. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the - current API Management service instance. - :type diagnostic_id: str - :param parameters: Create parameters. - :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract - :param if_match: ETag of the Entity. Not required when creating an - entity, but required when updating an entity. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'DiagnosticContract') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticContract', response) - header_dict = { - 'ETag': 'str', - } - if response.status_code == 201: - deserialized = self._deserialize('DiagnosticContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}'} - - def update( - self, resource_group_name, service_name, api_id, diagnostic_id, parameters, if_match, custom_headers=None, raw=False, **operation_config): - """Updates the details of the Diagnostic for an API specified by its - identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API - Management service instance. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the - current API Management service instance. - :type diagnostic_id: str - :param parameters: Diagnostic Update parameters. - :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'DiagnosticContract') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}'} - - def delete( - self, resource_group_name, service_name, api_id, diagnostic_id, if_match, custom_headers=None, raw=False, **operation_config): - """Deletes the specified Diagnostic from an API. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API - Management service instance. - :type api_id: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the - current API Management service instance. - :type diagnostic_id: str - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_export_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_export_operations.py deleted file mode 100644 index 18aa4a080a00..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_export_operations.py +++ /dev/null @@ -1,112 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ApiExportOperations(object): - """ApiExportOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar export: Query parameter required to export the API details. Constant value: "true". - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.export = "true" - self.api_version = "2019-01-01" - - self.config = config - - def get( - self, resource_group_name, service_name, api_id, format, custom_headers=None, raw=False, **operation_config): - """Gets the details of the API specified by its identifier in the format - specified to the Storage Blob with SAS Key valid for 5 minutes. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param format: Format in which to export the Api Details to the - Storage Blob with Sas Key valid for 5 minutes. Possible values - include: 'Swagger', 'Wsdl', 'Wadl', 'Openapi' - :type format: str or ~azure.mgmt.apimanagement.models.ExportFormat - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApiExportResult or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.ApiExportResult or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['format'] = self._serialize.query("format", format, 'str') - query_parameters['export'] = self._serialize.query("self.export", self.export, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApiExportResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_attachment_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_attachment_operations.py deleted file mode 100644 index 859143e02e2f..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_attachment_operations.py +++ /dev/null @@ -1,443 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ApiIssueAttachmentOperations(object): - """ApiIssueAttachmentOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_service( - self, resource_group_name, service_name, api_id, issue_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists all attachments for the Issue associated with the specified API. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API - Management service instance. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API - Management service instance. - :type issue_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt - | substringof, contains, startswith, endswith |
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of IssueAttachmentContract - :rtype: - ~azure.mgmt.apimanagement.models.IssueAttachmentContractPaged[~azure.mgmt.apimanagement.models.IssueAttachmentContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_service.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.IssueAttachmentContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.IssueAttachmentContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments'} - - def get_entity_tag( - self, resource_group_name, service_name, api_id, issue_id, attachment_id, custom_headers=None, raw=False, **operation_config): - """Gets the entity state (Etag) version of the issue Attachment for an API - specified by its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API - Management service instance. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API - Management service instance. - :type issue_id: str - :param attachment_id: Attachment identifier within an Issue. Must be - unique in the current Issue. - :type attachment_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_entity_tag.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'attachmentId': self._serialize.url("attachment_id", attachment_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ - 'ETag': 'str', - }) - return client_raw_response - get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}'} - - def get( - self, resource_group_name, service_name, api_id, issue_id, attachment_id, custom_headers=None, raw=False, **operation_config): - """Gets the details of the issue Attachment for an API specified by its - identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API - Management service instance. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API - Management service instance. - :type issue_id: str - :param attachment_id: Attachment identifier within an Issue. Must be - unique in the current Issue. - :type attachment_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IssueAttachmentContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.IssueAttachmentContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'attachmentId': self._serialize.url("attachment_id", attachment_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('IssueAttachmentContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}'} - - def create_or_update( - self, resource_group_name, service_name, api_id, issue_id, attachment_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): - """Creates a new Attachment for the Issue in an API or updates an existing - one. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API - Management service instance. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API - Management service instance. - :type issue_id: str - :param attachment_id: Attachment identifier within an Issue. Must be - unique in the current Issue. - :type attachment_id: str - :param parameters: Create parameters. - :type parameters: - ~azure.mgmt.apimanagement.models.IssueAttachmentContract - :param if_match: ETag of the Entity. Not required when creating an - entity, but required when updating an entity. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IssueAttachmentContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.IssueAttachmentContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'attachmentId': self._serialize.url("attachment_id", attachment_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'IssueAttachmentContract') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('IssueAttachmentContract', response) - header_dict = { - 'ETag': 'str', - } - if response.status_code == 201: - deserialized = self._deserialize('IssueAttachmentContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}'} - - def delete( - self, resource_group_name, service_name, api_id, issue_id, attachment_id, if_match, custom_headers=None, raw=False, **operation_config): - """Deletes the specified comment from an Issue. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API - Management service instance. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API - Management service instance. - :type issue_id: str - :param attachment_id: Attachment identifier within an Issue. Must be - unique in the current Issue. - :type attachment_id: str - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'attachmentId': self._serialize.url("attachment_id", attachment_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_comment_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_comment_operations.py deleted file mode 100644 index d6598520f1dc..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_comment_operations.py +++ /dev/null @@ -1,443 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ApiIssueCommentOperations(object): - """ApiIssueCommentOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_service( - self, resource_group_name, service_name, api_id, issue_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists all comments for the Issue associated with the specified API. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API - Management service instance. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API - Management service instance. - :type issue_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt - | substringof, contains, startswith, endswith |
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of IssueCommentContract - :rtype: - ~azure.mgmt.apimanagement.models.IssueCommentContractPaged[~azure.mgmt.apimanagement.models.IssueCommentContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_service.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.IssueCommentContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.IssueCommentContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments'} - - def get_entity_tag( - self, resource_group_name, service_name, api_id, issue_id, comment_id, custom_headers=None, raw=False, **operation_config): - """Gets the entity state (Etag) version of the issue Comment for an API - specified by its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API - Management service instance. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API - Management service instance. - :type issue_id: str - :param comment_id: Comment identifier within an Issue. Must be unique - in the current Issue. - :type comment_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_entity_tag.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'commentId': self._serialize.url("comment_id", comment_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ - 'ETag': 'str', - }) - return client_raw_response - get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}'} - - def get( - self, resource_group_name, service_name, api_id, issue_id, comment_id, custom_headers=None, raw=False, **operation_config): - """Gets the details of the issue Comment for an API specified by its - identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API - Management service instance. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API - Management service instance. - :type issue_id: str - :param comment_id: Comment identifier within an Issue. Must be unique - in the current Issue. - :type comment_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IssueCommentContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.IssueCommentContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'commentId': self._serialize.url("comment_id", comment_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('IssueCommentContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}'} - - def create_or_update( - self, resource_group_name, service_name, api_id, issue_id, comment_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): - """Creates a new Comment for the Issue in an API or updates an existing - one. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API - Management service instance. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API - Management service instance. - :type issue_id: str - :param comment_id: Comment identifier within an Issue. Must be unique - in the current Issue. - :type comment_id: str - :param parameters: Create parameters. - :type parameters: - ~azure.mgmt.apimanagement.models.IssueCommentContract - :param if_match: ETag of the Entity. Not required when creating an - entity, but required when updating an entity. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IssueCommentContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.IssueCommentContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'commentId': self._serialize.url("comment_id", comment_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'IssueCommentContract') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('IssueCommentContract', response) - header_dict = { - 'ETag': 'str', - } - if response.status_code == 201: - deserialized = self._deserialize('IssueCommentContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}'} - - def delete( - self, resource_group_name, service_name, api_id, issue_id, comment_id, if_match, custom_headers=None, raw=False, **operation_config): - """Deletes the specified comment from an Issue. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API - Management service instance. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API - Management service instance. - :type issue_id: str - :param comment_id: Comment identifier within an Issue. Must be unique - in the current Issue. - :type comment_id: str - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'commentId': self._serialize.url("comment_id", comment_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_operations.py deleted file mode 100644 index c513d93b2c20..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_operations.py +++ /dev/null @@ -1,500 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ApiIssueOperations(object): - """ApiIssueOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_service( - self, resource_group_name, service_name, api_id, filter=None, expand_comments_attachments=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists all issues associated with the specified API. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API - Management service instance. - :type api_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt - | substringof, contains, startswith, endswith |
| state | filter - | eq | |
- :type filter: str - :param expand_comments_attachments: Expand the comment attachments. - :type expand_comments_attachments: bool - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of IssueContract - :rtype: - ~azure.mgmt.apimanagement.models.IssueContractPaged[~azure.mgmt.apimanagement.models.IssueContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_service.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if expand_comments_attachments is not None: - query_parameters['expandCommentsAttachments'] = self._serialize.query("expand_comments_attachments", expand_comments_attachments, 'bool') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.IssueContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.IssueContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues'} - - def get_entity_tag( - self, resource_group_name, service_name, api_id, issue_id, custom_headers=None, raw=False, **operation_config): - """Gets the entity state (Etag) version of the Issue for an API specified - by its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API - Management service instance. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API - Management service instance. - :type issue_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_entity_tag.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ - 'ETag': 'str', - }) - return client_raw_response - get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}'} - - def get( - self, resource_group_name, service_name, api_id, issue_id, expand_comments_attachments=None, custom_headers=None, raw=False, **operation_config): - """Gets the details of the Issue for an API specified by its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API - Management service instance. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API - Management service instance. - :type issue_id: str - :param expand_comments_attachments: Expand the comment attachments. - :type expand_comments_attachments: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IssueContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.IssueContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand_comments_attachments is not None: - query_parameters['expandCommentsAttachments'] = self._serialize.query("expand_comments_attachments", expand_comments_attachments, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('IssueContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}'} - - def create_or_update( - self, resource_group_name, service_name, api_id, issue_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): - """Creates a new Issue for an API or updates an existing one. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API - Management service instance. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API - Management service instance. - :type issue_id: str - :param parameters: Create parameters. - :type parameters: ~azure.mgmt.apimanagement.models.IssueContract - :param if_match: ETag of the Entity. Not required when creating an - entity, but required when updating an entity. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IssueContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.IssueContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'IssueContract') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('IssueContract', response) - header_dict = { - 'ETag': 'str', - } - if response.status_code == 201: - deserialized = self._deserialize('IssueContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}'} - - def update( - self, resource_group_name, service_name, api_id, issue_id, parameters, if_match, custom_headers=None, raw=False, **operation_config): - """Updates an existing issue for an API. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API - Management service instance. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API - Management service instance. - :type issue_id: str - :param parameters: Update parameters. - :type parameters: ~azure.mgmt.apimanagement.models.IssueUpdateContract - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'IssueUpdateContract') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}'} - - def delete( - self, resource_group_name, service_name, api_id, issue_id, if_match, custom_headers=None, raw=False, **operation_config): - """Deletes the specified Issue from an API. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API - Management service instance. - :type api_id: str - :param issue_id: Issue identifier. Must be unique in the current API - Management service instance. - :type issue_id: str - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_management_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_management_operations.py deleted file mode 100644 index a6e74dd10cce..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_management_operations.py +++ /dev/null @@ -1,99 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ApiManagementOperations(object): - """ApiManagementOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all of the available REST API operations of the - Microsoft.ApiManagement provider. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Operation - :rtype: - ~azure.mgmt.apimanagement.models.OperationPaged[~azure.mgmt.apimanagement.models.Operation] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/providers/Microsoft.ApiManagement/operations'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_management_service_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_management_service_operations.py deleted file mode 100644 index 5f7313e5fdf4..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_management_service_operations.py +++ /dev/null @@ -1,989 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ApiManagementServiceOperations(object): - """ApiManagementServiceOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - - def _restore_initial( - self, resource_group_name, service_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restore.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ApiManagementServiceBackupRestoreParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApiManagementServiceResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def restore( - self, resource_group_name, service_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Restores a backup of an API Management service created using the - ApiManagementService_Backup operation on the current service. This is a - long running operation and could take several minutes to complete. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param parameters: Parameters supplied to the Restore API Management - service from backup operation. - :type parameters: - ~azure.mgmt.apimanagement.models.ApiManagementServiceBackupRestoreParameters - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - ApiManagementServiceResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.apimanagement.models.ApiManagementServiceResource]] - :raises: :class:`CloudError` - """ - raw_result = self._restore_initial( - resource_group_name=resource_group_name, - service_name=service_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ApiManagementServiceResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/restore'} - - - def _backup_initial( - self, resource_group_name, service_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.backup.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ApiManagementServiceBackupRestoreParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApiManagementServiceResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def backup( - self, resource_group_name, service_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates a backup of the API Management service to the given Azure - Storage Account. This is long running operation and could take several - minutes to complete. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param parameters: Parameters supplied to the - ApiManagementService_Backup operation. - :type parameters: - ~azure.mgmt.apimanagement.models.ApiManagementServiceBackupRestoreParameters - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - ApiManagementServiceResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.apimanagement.models.ApiManagementServiceResource]] - :raises: :class:`CloudError` - """ - raw_result = self._backup_initial( - resource_group_name=resource_group_name, - service_name=service_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ApiManagementServiceResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backup'} - - - def _create_or_update_initial( - self, resource_group_name, service_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ApiManagementServiceResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApiManagementServiceResource', response) - if response.status_code == 201: - deserialized = self._deserialize('ApiManagementServiceResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, service_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates an API Management service. This is long running - operation and could take several minutes to complete. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param parameters: Parameters supplied to the CreateOrUpdate API - Management service operation. - :type parameters: - ~azure.mgmt.apimanagement.models.ApiManagementServiceResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - ApiManagementServiceResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.apimanagement.models.ApiManagementServiceResource]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - service_name=service_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ApiManagementServiceResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}'} - - - def _update_initial( - self, resource_group_name, service_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ApiManagementServiceUpdateParameters') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApiManagementServiceResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, service_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates an existing API Management service. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param parameters: Parameters supplied to the CreateOrUpdate API - Management service operation. - :type parameters: - ~azure.mgmt.apimanagement.models.ApiManagementServiceUpdateParameters - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - ApiManagementServiceResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.apimanagement.models.ApiManagementServiceResource]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - service_name=service_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ApiManagementServiceResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}'} - - def get( - self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): - """Gets an API Management service resource description. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApiManagementServiceResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.ApiManagementServiceResource - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApiManagementServiceResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}'} - - - def _delete_initial( - self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 202: - deserialized = self._deserialize('ApiManagementServiceResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete( - self, resource_group_name, service_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an existing API Management service. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - ApiManagementServiceResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.apimanagement.models.ApiManagementServiceResource]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - service_name=service_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ApiManagementServiceResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """List all API Management services within a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ApiManagementServiceResource - :rtype: - ~azure.mgmt.apimanagement.models.ApiManagementServiceResourcePaged[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ApiManagementServiceResourcePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ApiManagementServiceResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all API Management services within an Azure subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ApiManagementServiceResource - :rtype: - ~azure.mgmt.apimanagement.models.ApiManagementServiceResourcePaged[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ApiManagementServiceResourcePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ApiManagementServiceResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/service'} - - def get_sso_token( - self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): - """Gets the Single-Sign-On token for the API Management Service which is - valid for 5 Minutes. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApiManagementServiceGetSsoTokenResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.apimanagement.models.ApiManagementServiceGetSsoTokenResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_sso_token.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApiManagementServiceGetSsoTokenResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_sso_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/getssotoken'} - - def check_name_availability( - self, name, custom_headers=None, raw=False, **operation_config): - """Checks availability and correctness of a name for an API Management - service. - - :param name: The name to check for availability. - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApiManagementServiceNameAvailabilityResult or - ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.apimanagement.models.ApiManagementServiceNameAvailabilityResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = models.ApiManagementServiceCheckNameAvailabilityParameters(name=name) - - # Construct URL - url = self.check_name_availability.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ApiManagementServiceCheckNameAvailabilityParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApiManagementServiceNameAvailabilityResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/checkNameAvailability'} - - - def _apply_network_configuration_updates_initial( - self, resource_group_name, service_name, location=None, custom_headers=None, raw=False, **operation_config): - parameters = None - if location is not None: - parameters = models.ApiManagementServiceApplyNetworkConfigurationParameters(location=location) - - # Construct URL - url = self.apply_network_configuration_updates.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if parameters is not None: - body_content = self._serialize.body(parameters, 'ApiManagementServiceApplyNetworkConfigurationParameters') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApiManagementServiceResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def apply_network_configuration_updates( - self, resource_group_name, service_name, location=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates the Microsoft.ApiManagement resource running in the Virtual - network to pick the updated network settings. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param location: Location of the Api Management service to update for - a multi-region service. For a service deployed in a single region, - this parameter is not required. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - ApiManagementServiceResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.apimanagement.models.ApiManagementServiceResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.apimanagement.models.ApiManagementServiceResource]] - :raises: :class:`CloudError` - """ - raw_result = self._apply_network_configuration_updates_initial( - resource_group_name=resource_group_name, - service_name=service_name, - location=location, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ApiManagementServiceResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - apply_network_configuration_updates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/applynetworkconfigurationupdates'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_management_service_skus_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_management_service_skus_operations.py deleted file mode 100644 index 876da69e682e..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_management_service_skus_operations.py +++ /dev/null @@ -1,110 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ApiManagementServiceSkusOperations(object): - """ApiManagementServiceSkusOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_available_service_skus( - self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): - """Gets available SKUs for API Management service. - - Gets all available SKU for a given API Management service. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceSkuResult - :rtype: - ~azure.mgmt.apimanagement.models.ResourceSkuResultPaged[~azure.mgmt.apimanagement.models.ResourceSkuResult] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_available_service_skus.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ResourceSkuResultPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ResourceSkuResultPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_available_service_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/skus'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_operation_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_operation_operations.py deleted file mode 100644 index 596f3528bf20..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_operation_operations.py +++ /dev/null @@ -1,508 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ApiOperationOperations(object): - """ApiOperationOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_api( - self, resource_group_name, service_name, api_id, filter=None, top=None, skip=None, tags=None, custom_headers=None, raw=False, **operation_config): - """Lists a collection of the operations for the specified API. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| displayName | filter | ge, le, eq, ne, - gt, lt | substringof, contains, startswith, endswith |
| method | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| description | filter | ge, le, eq, ne, gt, lt | - substringof, contains, startswith, endswith |
| urlTemplate | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param tags: Include tags in the response. - :type tags: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OperationContract - :rtype: - ~azure.mgmt.apimanagement.models.OperationContractPaged[~azure.mgmt.apimanagement.models.OperationContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_api.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - if tags is not None: - query_parameters['tags'] = self._serialize.query("tags", tags, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.OperationContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.OperationContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_api.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations'} - - def get_entity_tag( - self, resource_group_name, service_name, api_id, operation_id, custom_headers=None, raw=False, **operation_config): - """Gets the entity state (Etag) version of the API operation specified by - its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be - unique in the current API Management service instance. - :type operation_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_entity_tag.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ - 'ETag': 'str', - }) - return client_raw_response - get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}'} - - def get( - self, resource_group_name, service_name, api_id, operation_id, custom_headers=None, raw=False, **operation_config): - """Gets the details of the API Operation specified by its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be - unique in the current API Management service instance. - :type operation_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: OperationContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.OperationContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('OperationContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}'} - - def create_or_update( - self, resource_group_name, service_name, api_id, operation_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): - """Creates a new operation in the API or updates an existing one. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be - unique in the current API Management service instance. - :type operation_id: str - :param parameters: Create parameters. - :type parameters: ~azure.mgmt.apimanagement.models.OperationContract - :param if_match: ETag of the Entity. Not required when creating an - entity, but required when updating an entity. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: OperationContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.OperationContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'OperationContract') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('OperationContract', response) - header_dict = { - 'ETag': 'str', - } - if response.status_code == 201: - deserialized = self._deserialize('OperationContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}'} - - def update( - self, resource_group_name, service_name, api_id, operation_id, parameters, if_match, custom_headers=None, raw=False, **operation_config): - """Updates the details of the operation in the API specified by its - identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be - unique in the current API Management service instance. - :type operation_id: str - :param parameters: API Operation Update parameters. - :type parameters: - ~azure.mgmt.apimanagement.models.OperationUpdateContract - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'OperationUpdateContract') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}'} - - def delete( - self, resource_group_name, service_name, api_id, operation_id, if_match, custom_headers=None, raw=False, **operation_config): - """Deletes the specified operation in the API. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be - unique in the current API Management service instance. - :type operation_id: str - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_operation_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_operation_policy_operations.py deleted file mode 100644 index 57f3b7bbecc1..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_operation_policy_operations.py +++ /dev/null @@ -1,422 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ApiOperationPolicyOperations(object): - """ApiOperationPolicyOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - :ivar policy_id: The identifier of the Policy. Constant value: "policy". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - self.policy_id = "policy" - - self.config = config - - def list_by_operation( - self, resource_group_name, service_name, api_id, operation_id, custom_headers=None, raw=False, **operation_config): - """Get the list of policy configuration at the API Operation level. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be - unique in the current API Management service instance. - :type operation_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PolicyCollection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.PolicyCollection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.list_by_operation.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('PolicyCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_by_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies'} - - def get_entity_tag( - self, resource_group_name, service_name, api_id, operation_id, custom_headers=None, raw=False, **operation_config): - """Gets the entity state (Etag) version of the API operation policy - specified by its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be - unique in the current API Management service instance. - :type operation_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_entity_tag.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ - 'ETag': 'str', - }) - return client_raw_response - get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}'} - - def get( - self, resource_group_name, service_name, api_id, operation_id, format="xml", custom_headers=None, raw=False, **operation_config): - """Get the policy configuration at the API Operation level. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be - unique in the current API Management service instance. - :type operation_id: str - :param format: Policy Export Format. Possible values include: 'xml', - 'rawxml' - :type format: str or - ~azure.mgmt.apimanagement.models.PolicyExportFormat - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PolicyContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if format is not None: - query_parameters['format'] = self._serialize.query("format", format, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('PolicyContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}'} - - def create_or_update( - self, resource_group_name, service_name, api_id, operation_id, value, if_match=None, format="xml", custom_headers=None, raw=False, **operation_config): - """Creates or updates policy configuration for the API Operation level. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be - unique in the current API Management service instance. - :type operation_id: str - :param value: Contents of the Policy as defined by the format. - :type value: str - :param if_match: ETag of the Entity. Not required when creating an - entity, but required when updating an entity. - :type if_match: str - :param format: Format of the policyContent. Possible values include: - 'xml', 'xml-link', 'rawxml', 'rawxml-link' - :type format: str or - ~azure.mgmt.apimanagement.models.PolicyContentFormat - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PolicyContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - parameters = models.PolicyContract(value=value, format=format) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PolicyContract') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('PolicyContract', response) - header_dict = { - 'ETag': 'str', - } - if response.status_code == 201: - deserialized = self._deserialize('PolicyContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}'} - - def delete( - self, resource_group_name, service_name, api_id, operation_id, if_match, custom_headers=None, raw=False, **operation_config): - """Deletes the policy configuration at the Api Operation. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be - unique in the current API Management service instance. - :type operation_id: str - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_operations.py deleted file mode 100644 index 9828b2d15211..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_operations.py +++ /dev/null @@ -1,632 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ApiOperations(object): - """ApiOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_service( - self, resource_group_name, service_name, filter=None, top=None, skip=None, tags=None, expand_api_version_set=None, custom_headers=None, raw=False, **operation_config): - """Lists all APIs of the API Management service instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| displayName | filter | ge, le, eq, ne, - gt, lt | substringof, contains, startswith, endswith |
| - description | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, - gt, lt | substringof, contains, startswith, endswith |
| path | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param tags: Include tags in the response. - :type tags: str - :param expand_api_version_set: Include full ApiVersionSet resource in - response - :type expand_api_version_set: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ApiContract - :rtype: - ~azure.mgmt.apimanagement.models.ApiContractPaged[~azure.mgmt.apimanagement.models.ApiContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_service.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - if tags is not None: - query_parameters['tags'] = self._serialize.query("tags", tags, 'str') - if expand_api_version_set is not None: - query_parameters['expandApiVersionSet'] = self._serialize.query("expand_api_version_set", expand_api_version_set, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.ApiContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ApiContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis'} - - def get_entity_tag( - self, resource_group_name, service_name, api_id, custom_headers=None, raw=False, **operation_config): - """Gets the entity state (Etag) version of the API specified by its - identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_entity_tag.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ - 'ETag': 'str', - }) - return client_raw_response - get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}'} - - def get( - self, resource_group_name, service_name, api_id, custom_headers=None, raw=False, **operation_config): - """Gets the details of the API specified by its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApiContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.ApiContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('ApiContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}'} - - - def _create_or_update_initial( - self, resource_group_name, service_name, api_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ApiCreateOrUpdateParameter') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('ApiContract', response) - header_dict = { - 'ETag': 'str', - } - if response.status_code == 201: - deserialized = self._deserialize('ApiContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, service_name, api_id, parameters, if_match=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates new or updates existing specified API of the API Management - service instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param parameters: Create or update parameters. - :type parameters: - ~azure.mgmt.apimanagement.models.ApiCreateOrUpdateParameter - :param if_match: ETag of the Entity. Not required when creating an - entity, but required when updating an entity. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ApiContract or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.apimanagement.models.ApiContract] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.apimanagement.models.ApiContract]] - :raises: - :class:`ErrorResponseException` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - service_name=service_name, - api_id=api_id, - parameters=parameters, - if_match=if_match, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - header_dict = { - 'ETag': 'str', - } - deserialized = self._deserialize('ApiContract', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}'} - - def update( - self, resource_group_name, service_name, api_id, parameters, if_match, custom_headers=None, raw=False, **operation_config): - """Updates the specified API of the API Management service instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param parameters: API Update Contract parameters. - :type parameters: ~azure.mgmt.apimanagement.models.ApiUpdateContract - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ApiUpdateContract') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}'} - - def delete( - self, resource_group_name, service_name, api_id, if_match, delete_revisions=None, custom_headers=None, raw=False, **operation_config): - """Deletes the specified API of the API Management service instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param delete_revisions: Delete all revisions of the Api. - :type delete_revisions: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if delete_revisions is not None: - query_parameters['deleteRevisions'] = self._serialize.query("delete_revisions", delete_revisions, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}'} - - def list_by_tags( - self, resource_group_name, service_name, filter=None, top=None, skip=None, include_not_tagged_apis=None, custom_headers=None, raw=False, **operation_config): - """Lists a collection of apis associated with tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param filter: | Field | Supported operators | Supported - functions | - |-------------|------------------------|-----------------------------------| - |name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith| - |displayName | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith| - |apiRevision | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith| - |path | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith| - |description | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith| - |serviceUrl | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith| - |isCurrent | eq | | - :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param include_not_tagged_apis: Include not tagged APIs. - :type include_not_tagged_apis: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TagResourceContract - :rtype: - ~azure.mgmt.apimanagement.models.TagResourceContractPaged[~azure.mgmt.apimanagement.models.TagResourceContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_tags.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - if include_not_tagged_apis is not None: - query_parameters['includeNotTaggedApis'] = self._serialize.query("include_not_tagged_apis", include_not_tagged_apis, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.TagResourceContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.TagResourceContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apisByTags'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_policy_operations.py deleted file mode 100644 index 8618fda61700..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_policy_operations.py +++ /dev/null @@ -1,402 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ApiPolicyOperations(object): - """ApiPolicyOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - :ivar policy_id: The identifier of the Policy. Constant value: "policy". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - self.policy_id = "policy" - - self.config = config - - def list_by_api( - self, resource_group_name, service_name, api_id, custom_headers=None, raw=False, **operation_config): - """Get the policy configuration at the API level. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PolicyCollection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.PolicyCollection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.list_by_api.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('PolicyCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_by_api.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies'} - - def get_entity_tag( - self, resource_group_name, service_name, api_id, custom_headers=None, raw=False, **operation_config): - """Gets the entity state (Etag) version of the API policy specified by its - identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_entity_tag.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ - 'ETag': 'str', - }) - return client_raw_response - get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}'} - - def get( - self, resource_group_name, service_name, api_id, format="xml", custom_headers=None, raw=False, **operation_config): - """Get the policy configuration at the API level. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param format: Policy Export Format. Possible values include: 'xml', - 'rawxml' - :type format: str or - ~azure.mgmt.apimanagement.models.PolicyExportFormat - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PolicyContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if format is not None: - query_parameters['format'] = self._serialize.query("format", format, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('PolicyContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}'} - - def create_or_update( - self, resource_group_name, service_name, api_id, value, if_match=None, format="xml", custom_headers=None, raw=False, **operation_config): - """Creates or updates policy configuration for the API. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param value: Contents of the Policy as defined by the format. - :type value: str - :param if_match: ETag of the Entity. Not required when creating an - entity, but required when updating an entity. - :type if_match: str - :param format: Format of the policyContent. Possible values include: - 'xml', 'xml-link', 'rawxml', 'rawxml-link' - :type format: str or - ~azure.mgmt.apimanagement.models.PolicyContentFormat - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PolicyContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - parameters = models.PolicyContract(value=value, format=format) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PolicyContract') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('PolicyContract', response) - header_dict = { - 'ETag': 'str', - } - if response.status_code == 201: - deserialized = self._deserialize('PolicyContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}'} - - def delete( - self, resource_group_name, service_name, api_id, if_match, custom_headers=None, raw=False, **operation_config): - """Deletes the policy configuration at the Api. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_product_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_product_operations.py deleted file mode 100644 index 27542a5e3b4a..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_product_operations.py +++ /dev/null @@ -1,126 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ApiProductOperations(object): - """ApiProductOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_apis( - self, resource_group_name, service_name, api_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists all Products, which the API is part of. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API - Management service instance. - :type api_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProductContract - :rtype: - ~azure.mgmt.apimanagement.models.ProductContractPaged[~azure.mgmt.apimanagement.models.ProductContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_apis.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.ProductContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ProductContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_apis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/products'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_release_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_release_operations.py deleted file mode 100644 index c00e71b80676..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_release_operations.py +++ /dev/null @@ -1,501 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ApiReleaseOperations(object): - """ApiReleaseOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_service( - self, resource_group_name, service_name, api_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists all releases of an API. An API release is created when making an - API Revision current. Releases are also used to rollback to previous - revisions. Results will be paged and can be constrained by the $top and - $skip parameters. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API - Management service instance. - :type api_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - notes | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ApiReleaseContract - :rtype: - ~azure.mgmt.apimanagement.models.ApiReleaseContractPaged[~azure.mgmt.apimanagement.models.ApiReleaseContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_service.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.ApiReleaseContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ApiReleaseContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases'} - - def get_entity_tag( - self, resource_group_name, service_name, api_id, release_id, custom_headers=None, raw=False, **operation_config): - """Returns the etag of an API release. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API - Management service instance. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in - the current API Management service instance. - :type release_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_entity_tag.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'releaseId': self._serialize.url("release_id", release_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ - 'ETag': 'str', - }) - return client_raw_response - get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}'} - - def get( - self, resource_group_name, service_name, api_id, release_id, custom_headers=None, raw=False, **operation_config): - """Returns the details of an API release. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API - Management service instance. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in - the current API Management service instance. - :type release_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApiReleaseContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'releaseId': self._serialize.url("release_id", release_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('ApiReleaseContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}'} - - def create_or_update( - self, resource_group_name, service_name, api_id, release_id, if_match=None, api_id1=None, notes=None, custom_headers=None, raw=False, **operation_config): - """Creates a new Release for the API. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API - Management service instance. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in - the current API Management service instance. - :type release_id: str - :param if_match: ETag of the Entity. Not required when creating an - entity, but required when updating an entity. - :type if_match: str - :param api_id1: Identifier of the API the release belongs to. - :type api_id1: str - :param notes: Release Notes - :type notes: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApiReleaseContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.ApiReleaseContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - parameters = models.ApiReleaseContract(api_id=api_id1, notes=notes) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'releaseId': self._serialize.url("release_id", release_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ApiReleaseContract') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('ApiReleaseContract', response) - header_dict = { - 'ETag': 'str', - } - if response.status_code == 201: - deserialized = self._deserialize('ApiReleaseContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}'} - - def update( - self, resource_group_name, service_name, api_id, release_id, if_match, api_id1=None, notes=None, custom_headers=None, raw=False, **operation_config): - """Updates the details of the release of the API specified by its - identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API - Management service instance. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in - the current API Management service instance. - :type release_id: str - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param api_id1: Identifier of the API the release belongs to. - :type api_id1: str - :param notes: Release Notes - :type notes: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - parameters = models.ApiReleaseContract(api_id=api_id1, notes=notes) - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'releaseId': self._serialize.url("release_id", release_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ApiReleaseContract') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}'} - - def delete( - self, resource_group_name, service_name, api_id, release_id, if_match, custom_headers=None, raw=False, **operation_config): - """Deletes the specified release in the API. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API - Management service instance. - :type api_id: str - :param release_id: Release identifier within an API. Must be unique in - the current API Management service instance. - :type release_id: str - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'releaseId': self._serialize.url("release_id", release_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_revision_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_revision_operations.py deleted file mode 100644 index fc654cfe9f18..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_revision_operations.py +++ /dev/null @@ -1,126 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ApiRevisionOperations(object): - """ApiRevisionOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_service( - self, resource_group_name, service_name, api_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists all revisions of an API. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API identifier. Must be unique in the current API - Management service instance. - :type api_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ApiRevisionContract - :rtype: - ~azure.mgmt.apimanagement.models.ApiRevisionContractPaged[~azure.mgmt.apimanagement.models.ApiRevisionContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_service.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.ApiRevisionContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ApiRevisionContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/revisions'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_schema_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_schema_operations.py deleted file mode 100644 index 6d9dc76a4f8c..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_schema_operations.py +++ /dev/null @@ -1,442 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ApiSchemaOperations(object): - """ApiSchemaOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_api( - self, resource_group_name, service_name, api_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Get the schema configuration at the API level. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - contentType | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SchemaContract - :rtype: - ~azure.mgmt.apimanagement.models.SchemaContractPaged[~azure.mgmt.apimanagement.models.SchemaContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_api.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.SchemaContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.SchemaContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_api.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas'} - - def get_entity_tag( - self, resource_group_name, service_name, api_id, schema_id, custom_headers=None, raw=False, **operation_config): - """Gets the entity state (Etag) version of the schema specified by its - identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param schema_id: Schema identifier within an API. Must be unique in - the current API Management service instance. - :type schema_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_entity_tag.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'schemaId': self._serialize.url("schema_id", schema_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ - 'ETag': 'str', - }) - return client_raw_response - get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}'} - - def get( - self, resource_group_name, service_name, api_id, schema_id, custom_headers=None, raw=False, **operation_config): - """Get the schema configuration at the API level. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param schema_id: Schema identifier within an API. Must be unique in - the current API Management service instance. - :type schema_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SchemaContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.SchemaContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'schemaId': self._serialize.url("schema_id", schema_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('SchemaContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}'} - - def create_or_update( - self, resource_group_name, service_name, api_id, schema_id, content_type, if_match=None, value=None, custom_headers=None, raw=False, **operation_config): - """Creates or updates schema configuration for the API. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param schema_id: Schema identifier within an API. Must be unique in - the current API Management service instance. - :type schema_id: str - :param content_type: Must be a valid a media type used in a - Content-Type header as defined in the RFC 2616. Media type of the - schema document (e.g. application/json, application/xml).
- - `Swagger` Schema use - `application/vnd.ms-azure-apim.swagger.definitions+json`
- - `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml`
- - `OpenApi` Schema use `application/vnd.oai.openapi.components+json` -
- `WADL Schema` use - `application/vnd.ms-azure-apim.wadl.grammars+xml`. - :type content_type: str - :param if_match: ETag of the Entity. Not required when creating an - entity, but required when updating an entity. - :type if_match: str - :param value: Json escaped string defining the document representing - the Schema. - :type value: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SchemaContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.SchemaContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - parameters = models.SchemaCreateOrUpdateContract(content_type=content_type, value=value) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'schemaId': self._serialize.url("schema_id", schema_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'SchemaCreateOrUpdateContract') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('SchemaContract', response) - header_dict = { - 'ETag': 'str', - } - if response.status_code == 201: - deserialized = self._deserialize('SchemaContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}'} - - def delete( - self, resource_group_name, service_name, api_id, schema_id, if_match, force=None, custom_headers=None, raw=False, **operation_config): - """Deletes the schema configuration at the Api. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param schema_id: Schema identifier within an API. Must be unique in - the current API Management service instance. - :type schema_id: str - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param force: If true removes all references to the schema before - deleting it. - :type force: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'schemaId': self._serialize.url("schema_id", schema_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if force is not None: - query_parameters['force'] = self._serialize.query("force", force, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_tag_description_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_tag_description_operations.py deleted file mode 100644 index 9c2324b24d6f..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_tag_description_operations.py +++ /dev/null @@ -1,427 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ApiTagDescriptionOperations(object): - """ApiTagDescriptionOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_service( - self, resource_group_name, service_name, api_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists all Tags descriptions in scope of API. Model similar to swagger - - tagDescription is defined on API level but tag may be assigned to the - Operations. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | - substringof, contains, startswith, endswith |
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TagDescriptionContract - :rtype: - ~azure.mgmt.apimanagement.models.TagDescriptionContractPaged[~azure.mgmt.apimanagement.models.TagDescriptionContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_service.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.TagDescriptionContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.TagDescriptionContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions'} - - def get_entity_tag( - self, resource_group_name, service_name, api_id, tag_id, custom_headers=None, raw=False, **operation_config): - """Gets the entity state version of the tag specified by its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param tag_id: Tag identifier. Must be unique in the current API - Management service instance. - :type tag_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_entity_tag.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ - 'ETag': 'str', - }) - return client_raw_response - get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagId}'} - - def get( - self, resource_group_name, service_name, api_id, tag_id, custom_headers=None, raw=False, **operation_config): - """Get Tag description in scope of API. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param tag_id: Tag identifier. Must be unique in the current API - Management service instance. - :type tag_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TagDescriptionContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.TagDescriptionContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('TagDescriptionContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagId}'} - - def create_or_update( - self, resource_group_name, service_name, api_id, tag_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): - """Create/Update tag description in scope of the Api. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param tag_id: Tag identifier. Must be unique in the current API - Management service instance. - :type tag_id: str - :param parameters: Create parameters. - :type parameters: - ~azure.mgmt.apimanagement.models.TagDescriptionCreateParameters - :param if_match: ETag of the Entity. Not required when creating an - entity, but required when updating an entity. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TagDescriptionContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.TagDescriptionContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TagDescriptionCreateParameters') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('TagDescriptionContract', response) - header_dict = { - 'ETag': 'str', - } - if response.status_code == 201: - deserialized = self._deserialize('TagDescriptionContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagId}'} - - def delete( - self, resource_group_name, service_name, api_id, tag_id, if_match, custom_headers=None, raw=False, **operation_config): - """Delete tag description for the Api. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param tag_id: Tag identifier. Must be unique in the current API - Management service instance. - :type tag_id: str - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_version_set_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_version_set_operations.py deleted file mode 100644 index 72173a8b483f..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_version_set_operations.py +++ /dev/null @@ -1,467 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ApiVersionSetOperations(object): - """ApiVersionSetOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_service( - self, resource_group_name, service_name, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists a collection of API Version Sets in the specified service - instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ApiVersionSetContract - :rtype: - ~azure.mgmt.apimanagement.models.ApiVersionSetContractPaged[~azure.mgmt.apimanagement.models.ApiVersionSetContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_service.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.ApiVersionSetContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ApiVersionSetContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets'} - - def get_entity_tag( - self, resource_group_name, service_name, version_set_id, custom_headers=None, raw=False, **operation_config): - """Gets the entity state (Etag) version of the Api Version Set specified - by its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param version_set_id: Api Version Set identifier. Must be unique in - the current API Management service instance. - :type version_set_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_entity_tag.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'versionSetId': self._serialize.url("version_set_id", version_set_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ - 'ETag': 'str', - }) - return client_raw_response - get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}'} - - def get( - self, resource_group_name, service_name, version_set_id, custom_headers=None, raw=False, **operation_config): - """Gets the details of the Api Version Set specified by its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param version_set_id: Api Version Set identifier. Must be unique in - the current API Management service instance. - :type version_set_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApiVersionSetContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'versionSetId': self._serialize.url("version_set_id", version_set_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('ApiVersionSetContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}'} - - def create_or_update( - self, resource_group_name, service_name, version_set_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): - """Creates or Updates a Api Version Set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param version_set_id: Api Version Set identifier. Must be unique in - the current API Management service instance. - :type version_set_id: str - :param parameters: Create or update parameters. - :type parameters: - ~azure.mgmt.apimanagement.models.ApiVersionSetContract - :param if_match: ETag of the Entity. Not required when creating an - entity, but required when updating an entity. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApiVersionSetContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.ApiVersionSetContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'versionSetId': self._serialize.url("version_set_id", version_set_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ApiVersionSetContract') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('ApiVersionSetContract', response) - header_dict = { - 'ETag': 'str', - } - if response.status_code == 201: - deserialized = self._deserialize('ApiVersionSetContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}'} - - def update( - self, resource_group_name, service_name, version_set_id, parameters, if_match, custom_headers=None, raw=False, **operation_config): - """Updates the details of the Api VersionSet specified by its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param version_set_id: Api Version Set identifier. Must be unique in - the current API Management service instance. - :type version_set_id: str - :param parameters: Update parameters. - :type parameters: - ~azure.mgmt.apimanagement.models.ApiVersionSetUpdateParameters - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'versionSetId': self._serialize.url("version_set_id", version_set_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ApiVersionSetUpdateParameters') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}'} - - def delete( - self, resource_group_name, service_name, version_set_id, if_match, custom_headers=None, raw=False, **operation_config): - """Deletes specific Api Version Set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param version_set_id: Api Version Set identifier. Must be unique in - the current API Management service instance. - :type version_set_id: str - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'versionSetId': self._serialize.url("version_set_id", version_set_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/authorization_server_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/authorization_server_operations.py deleted file mode 100644 index 7473c7856313..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/authorization_server_operations.py +++ /dev/null @@ -1,468 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class AuthorizationServerOperations(object): - """AuthorizationServerOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_service( - self, resource_group_name, service_name, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists a collection of authorization servers defined within a service - instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| displayName | filter | ge, le, eq, ne, - gt, lt | substringof, contains, startswith, endswith |
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AuthorizationServerContract - :rtype: - ~azure.mgmt.apimanagement.models.AuthorizationServerContractPaged[~azure.mgmt.apimanagement.models.AuthorizationServerContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_service.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.AuthorizationServerContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.AuthorizationServerContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers'} - - def get_entity_tag( - self, resource_group_name, service_name, authsid, custom_headers=None, raw=False, **operation_config): - """Gets the entity state (Etag) version of the authorizationServer - specified by its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param authsid: Identifier of the authorization server. - :type authsid: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_entity_tag.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'authsid': self._serialize.url("authsid", authsid, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ - 'ETag': 'str', - }) - return client_raw_response - get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}'} - - def get( - self, resource_group_name, service_name, authsid, custom_headers=None, raw=False, **operation_config): - """Gets the details of the authorization server specified by its - identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param authsid: Identifier of the authorization server. - :type authsid: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AuthorizationServerContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerContract - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'authsid': self._serialize.url("authsid", authsid, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('AuthorizationServerContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}'} - - def create_or_update( - self, resource_group_name, service_name, authsid, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): - """Creates new authorization server or updates an existing authorization - server. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param authsid: Identifier of the authorization server. - :type authsid: str - :param parameters: Create or update parameters. - :type parameters: - ~azure.mgmt.apimanagement.models.AuthorizationServerContract - :param if_match: ETag of the Entity. Not required when creating an - entity, but required when updating an entity. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AuthorizationServerContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.AuthorizationServerContract - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'authsid': self._serialize.url("authsid", authsid, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AuthorizationServerContract') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('AuthorizationServerContract', response) - header_dict = { - 'ETag': 'str', - } - if response.status_code == 201: - deserialized = self._deserialize('AuthorizationServerContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}'} - - def update( - self, resource_group_name, service_name, authsid, parameters, if_match, custom_headers=None, raw=False, **operation_config): - """Updates the details of the authorization server specified by its - identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param authsid: Identifier of the authorization server. - :type authsid: str - :param parameters: OAuth2 Server settings Update parameters. - :type parameters: - ~azure.mgmt.apimanagement.models.AuthorizationServerUpdateContract - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'authsid': self._serialize.url("authsid", authsid, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AuthorizationServerUpdateContract') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}'} - - def delete( - self, resource_group_name, service_name, authsid, if_match, custom_headers=None, raw=False, **operation_config): - """Deletes specific authorization server instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param authsid: Identifier of the authorization server. - :type authsid: str - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'authsid': self._serialize.url("authsid", authsid, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/backend_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/backend_operations.py deleted file mode 100644 index 5afb9bbb081a..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/backend_operations.py +++ /dev/null @@ -1,542 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class BackendOperations(object): - """BackendOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_service( - self, resource_group_name, service_name, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists a collection of backends in the specified service instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| title | filter | ge, le, eq, ne, gt, lt - | substringof, contains, startswith, endswith |
| url | filter | - ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of BackendContract - :rtype: - ~azure.mgmt.apimanagement.models.BackendContractPaged[~azure.mgmt.apimanagement.models.BackendContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_service.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.BackendContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.BackendContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends'} - - def get_entity_tag( - self, resource_group_name, service_name, backend_id, custom_headers=None, raw=False, **operation_config): - """Gets the entity state (Etag) version of the backend specified by its - identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param backend_id: Identifier of the Backend entity. Must be unique in - the current API Management service instance. - :type backend_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_entity_tag.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'backendId': self._serialize.url("backend_id", backend_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ - 'ETag': 'str', - }) - return client_raw_response - get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}'} - - def get( - self, resource_group_name, service_name, backend_id, custom_headers=None, raw=False, **operation_config): - """Gets the details of the backend specified by its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param backend_id: Identifier of the Backend entity. Must be unique in - the current API Management service instance. - :type backend_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackendContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.BackendContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'backendId': self._serialize.url("backend_id", backend_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('BackendContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}'} - - def create_or_update( - self, resource_group_name, service_name, backend_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): - """Creates or Updates a backend. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param backend_id: Identifier of the Backend entity. Must be unique in - the current API Management service instance. - :type backend_id: str - :param parameters: Create parameters. - :type parameters: ~azure.mgmt.apimanagement.models.BackendContract - :param if_match: ETag of the Entity. Not required when creating an - entity, but required when updating an entity. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackendContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.BackendContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'backendId': self._serialize.url("backend_id", backend_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'BackendContract') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('BackendContract', response) - header_dict = { - 'ETag': 'str', - } - if response.status_code == 201: - deserialized = self._deserialize('BackendContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}'} - - def update( - self, resource_group_name, service_name, backend_id, parameters, if_match, custom_headers=None, raw=False, **operation_config): - """Updates an existing backend. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param backend_id: Identifier of the Backend entity. Must be unique in - the current API Management service instance. - :type backend_id: str - :param parameters: Update parameters. - :type parameters: - ~azure.mgmt.apimanagement.models.BackendUpdateParameters - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'backendId': self._serialize.url("backend_id", backend_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'BackendUpdateParameters') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}'} - - def delete( - self, resource_group_name, service_name, backend_id, if_match, custom_headers=None, raw=False, **operation_config): - """Deletes the specified backend. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param backend_id: Identifier of the Backend entity. Must be unique in - the current API Management service instance. - :type backend_id: str - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'backendId': self._serialize.url("backend_id", backend_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}'} - - def reconnect( - self, resource_group_name, service_name, backend_id, after=None, custom_headers=None, raw=False, **operation_config): - """Notifies the APIM proxy to create a new connection to the backend after - the specified timeout. If no timeout was specified, timeout of 2 - minutes is used. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param backend_id: Identifier of the Backend entity. Must be unique in - the current API Management service instance. - :type backend_id: str - :param after: Duration in ISO8601 format after which reconnect will be - initiated. Minimum duration of the Reconnect is PT2M. - :type after: timedelta - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - parameters = None - if after is not None: - parameters = models.BackendReconnectContract(after=after) - - # Construct URL - url = self.reconnect.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'backendId': self._serialize.url("backend_id", backend_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if parameters is not None: - body_content = self._serialize.body(parameters, 'BackendReconnectContract') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reconnect.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}/reconnect'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/cache_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/cache_operations.py deleted file mode 100644 index 165b93f2c6f3..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/cache_operations.py +++ /dev/null @@ -1,461 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class CacheOperations(object): - """CacheOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_service( - self, resource_group_name, service_name, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists a collection of all external Caches in the specified service - instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CacheContract - :rtype: - ~azure.mgmt.apimanagement.models.CacheContractPaged[~azure.mgmt.apimanagement.models.CacheContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_service.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.CacheContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.CacheContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches'} - - def get_entity_tag( - self, resource_group_name, service_name, cache_id, custom_headers=None, raw=False, **operation_config): - """Gets the entity state (Etag) version of the Cache specified by its - identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param cache_id: Identifier of the Cache entity. Cache identifier - (should be either 'default' or valid Azure region identifier). - :type cache_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_entity_tag.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'cacheId': self._serialize.url("cache_id", cache_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ - 'ETag': 'str', - }) - return client_raw_response - get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}'} - - def get( - self, resource_group_name, service_name, cache_id, custom_headers=None, raw=False, **operation_config): - """Gets the details of the Cache specified by its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param cache_id: Identifier of the Cache entity. Cache identifier - (should be either 'default' or valid Azure region identifier). - :type cache_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CacheContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.CacheContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'cacheId': self._serialize.url("cache_id", cache_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('CacheContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}'} - - def create_or_update( - self, resource_group_name, service_name, cache_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): - """Creates or updates an External Cache to be used in Api Management - instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param cache_id: Identifier of the Cache entity. Cache identifier - (should be either 'default' or valid Azure region identifier). - :type cache_id: str - :param parameters: Create or Update parameters. - :type parameters: ~azure.mgmt.apimanagement.models.CacheContract - :param if_match: ETag of the Entity. Not required when creating an - entity, but required when updating an entity. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CacheContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.CacheContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'cacheId': self._serialize.url("cache_id", cache_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'CacheContract') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('CacheContract', response) - header_dict = { - 'ETag': 'str', - } - if response.status_code == 201: - deserialized = self._deserialize('CacheContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}'} - - def update( - self, resource_group_name, service_name, cache_id, parameters, if_match, custom_headers=None, raw=False, **operation_config): - """Updates the details of the cache specified by its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param cache_id: Identifier of the Cache entity. Cache identifier - (should be either 'default' or valid Azure region identifier). - :type cache_id: str - :param parameters: Update parameters. - :type parameters: - ~azure.mgmt.apimanagement.models.CacheUpdateParameters - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'cacheId': self._serialize.url("cache_id", cache_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'CacheUpdateParameters') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}'} - - def delete( - self, resource_group_name, service_name, cache_id, if_match, custom_headers=None, raw=False, **operation_config): - """Deletes specific Cache. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param cache_id: Identifier of the Cache entity. Cache identifier - (should be either 'default' or valid Azure region identifier). - :type cache_id: str - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'cacheId': self._serialize.url("cache_id", cache_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/certificate_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/certificate_operations.py deleted file mode 100644 index 12276ecf2d2c..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/certificate_operations.py +++ /dev/null @@ -1,410 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class CertificateOperations(object): - """CertificateOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_service( - self, resource_group_name, service_name, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists a collection of all certificates in the specified service - instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| subject | filter | ge, le, eq, ne, gt, - lt | substringof, contains, startswith, endswith |
| thumbprint | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| expirationDate | filter | ge, le, eq, ne, gt, lt | - |
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CertificateContract - :rtype: - ~azure.mgmt.apimanagement.models.CertificateContractPaged[~azure.mgmt.apimanagement.models.CertificateContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_service.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.CertificateContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.CertificateContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates'} - - def get_entity_tag( - self, resource_group_name, service_name, certificate_id, custom_headers=None, raw=False, **operation_config): - """Gets the entity state (Etag) version of the certificate specified by - its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param certificate_id: Identifier of the certificate entity. Must be - unique in the current API Management service instance. - :type certificate_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_entity_tag.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'certificateId': self._serialize.url("certificate_id", certificate_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ - 'ETag': 'str', - }) - return client_raw_response - get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}'} - - def get( - self, resource_group_name, service_name, certificate_id, custom_headers=None, raw=False, **operation_config): - """Gets the details of the certificate specified by its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param certificate_id: Identifier of the certificate entity. Must be - unique in the current API Management service instance. - :type certificate_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CertificateContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.CertificateContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'certificateId': self._serialize.url("certificate_id", certificate_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('CertificateContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}'} - - def create_or_update( - self, resource_group_name, service_name, certificate_id, data, password, if_match=None, custom_headers=None, raw=False, **operation_config): - """Creates or updates the certificate being used for authentication with - the backend. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param certificate_id: Identifier of the certificate entity. Must be - unique in the current API Management service instance. - :type certificate_id: str - :param data: Base 64 encoded certificate using the - application/x-pkcs12 representation. - :type data: str - :param password: Password for the Certificate - :type password: str - :param if_match: ETag of the Entity. Not required when creating an - entity, but required when updating an entity. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CertificateContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.CertificateContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - parameters = models.CertificateCreateOrUpdateParameters(data=data, password=password) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'certificateId': self._serialize.url("certificate_id", certificate_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'CertificateCreateOrUpdateParameters') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('CertificateContract', response) - header_dict = { - 'ETag': 'str', - } - if response.status_code == 201: - deserialized = self._deserialize('CertificateContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}'} - - def delete( - self, resource_group_name, service_name, certificate_id, if_match, custom_headers=None, raw=False, **operation_config): - """Deletes specific certificate. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param certificate_id: Identifier of the certificate entity. Must be - unique in the current API Management service instance. - :type certificate_id: str - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'certificateId': self._serialize.url("certificate_id", certificate_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/delegation_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/delegation_settings_operations.py deleted file mode 100644 index d3671260fe47..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/delegation_settings_operations.py +++ /dev/null @@ -1,295 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class DelegationSettingsOperations(object): - """DelegationSettingsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def get_entity_tag( - self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): - """Gets the entity state (Etag) version of the DelegationSettings. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_entity_tag.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ - 'ETag': 'str', - }) - return client_raw_response - get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation'} - - def get( - self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): - """Get Delegation Settings for the Portal. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PortalDelegationSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.PortalDelegationSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('PortalDelegationSettings', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation'} - - def update( - self, resource_group_name, service_name, parameters, if_match, custom_headers=None, raw=False, **operation_config): - """Update Delegation settings. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param parameters: Update Delegation settings. - :type parameters: - ~azure.mgmt.apimanagement.models.PortalDelegationSettings - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PortalDelegationSettings') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation'} - - def create_or_update( - self, resource_group_name, service_name, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): - """Create or Update Delegation settings. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param parameters: Create or update parameters. - :type parameters: - ~azure.mgmt.apimanagement.models.PortalDelegationSettings - :param if_match: ETag of the Entity. Not required when creating an - entity, but required when updating an entity. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PortalDelegationSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.PortalDelegationSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PortalDelegationSettings') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('PortalDelegationSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/diagnostic_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/diagnostic_operations.py deleted file mode 100644 index 8aeb6d1d3ed8..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/diagnostic_operations.py +++ /dev/null @@ -1,466 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class DiagnosticOperations(object): - """DiagnosticOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_service( - self, resource_group_name, service_name, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists all diagnostics of the API Management service instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DiagnosticContract - :rtype: - ~azure.mgmt.apimanagement.models.DiagnosticContractPaged[~azure.mgmt.apimanagement.models.DiagnosticContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_service.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.DiagnosticContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DiagnosticContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics'} - - def get_entity_tag( - self, resource_group_name, service_name, diagnostic_id, custom_headers=None, raw=False, **operation_config): - """Gets the entity state (Etag) version of the Diagnostic specified by its - identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the - current API Management service instance. - :type diagnostic_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_entity_tag.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ - 'ETag': 'str', - }) - return client_raw_response - get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}'} - - def get( - self, resource_group_name, service_name, diagnostic_id, custom_headers=None, raw=False, **operation_config): - """Gets the details of the Diagnostic specified by its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the - current API Management service instance. - :type diagnostic_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}'} - - def create_or_update( - self, resource_group_name, service_name, diagnostic_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): - """Creates a new Diagnostic or updates an existing one. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the - current API Management service instance. - :type diagnostic_id: str - :param parameters: Create parameters. - :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract - :param if_match: ETag of the Entity. Not required when creating an - entity, but required when updating an entity. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiagnosticContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.DiagnosticContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'DiagnosticContract') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('DiagnosticContract', response) - header_dict = { - 'ETag': 'str', - } - if response.status_code == 201: - deserialized = self._deserialize('DiagnosticContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}'} - - def update( - self, resource_group_name, service_name, diagnostic_id, parameters, if_match, custom_headers=None, raw=False, **operation_config): - """Updates the details of the Diagnostic specified by its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the - current API Management service instance. - :type diagnostic_id: str - :param parameters: Diagnostic Update parameters. - :type parameters: ~azure.mgmt.apimanagement.models.DiagnosticContract - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'DiagnosticContract') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}'} - - def delete( - self, resource_group_name, service_name, diagnostic_id, if_match, custom_headers=None, raw=False, **operation_config): - """Deletes the specified Diagnostic. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param diagnostic_id: Diagnostic identifier. Must be unique in the - current API Management service instance. - :type diagnostic_id: str - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'diagnosticId': self._serialize.url("diagnostic_id", diagnostic_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/email_template_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/email_template_operations.py deleted file mode 100644 index 65badc17e0bb..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/email_template_operations.py +++ /dev/null @@ -1,516 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class EmailTemplateOperations(object): - """EmailTemplateOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_service( - self, resource_group_name, service_name, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists a collection of properties defined within a service instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of EmailTemplateContract - :rtype: - ~azure.mgmt.apimanagement.models.EmailTemplateContractPaged[~azure.mgmt.apimanagement.models.EmailTemplateContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_service.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.EmailTemplateContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.EmailTemplateContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates'} - - def get_entity_tag( - self, resource_group_name, service_name, template_name, custom_headers=None, raw=False, **operation_config): - """Gets the entity state (Etag) version of the email template specified by - its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param template_name: Email Template Name Identifier. Possible values - include: 'applicationApprovedNotificationMessage', - 'accountClosedDeveloper', - 'quotaLimitApproachingDeveloperNotificationMessage', - 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', - 'inviteUserNotificationMessage', 'newCommentNotificationMessage', - 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', - 'purchaseDeveloperNotificationMessage', - 'passwordResetIdentityDefault', - 'passwordResetByAdminNotificationMessage', - 'rejectDeveloperNotificationMessage', - 'requestDeveloperNotificationMessage' - :type template_name: str or - ~azure.mgmt.apimanagement.models.TemplateName - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_entity_tag.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'templateName': self._serialize.url("template_name", template_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ - 'ETag': 'str', - }) - return client_raw_response - get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}'} - - def get( - self, resource_group_name, service_name, template_name, custom_headers=None, raw=False, **operation_config): - """Gets the details of the email template specified by its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param template_name: Email Template Name Identifier. Possible values - include: 'applicationApprovedNotificationMessage', - 'accountClosedDeveloper', - 'quotaLimitApproachingDeveloperNotificationMessage', - 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', - 'inviteUserNotificationMessage', 'newCommentNotificationMessage', - 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', - 'purchaseDeveloperNotificationMessage', - 'passwordResetIdentityDefault', - 'passwordResetByAdminNotificationMessage', - 'rejectDeveloperNotificationMessage', - 'requestDeveloperNotificationMessage' - :type template_name: str or - ~azure.mgmt.apimanagement.models.TemplateName - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: EmailTemplateContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.EmailTemplateContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'templateName': self._serialize.url("template_name", template_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('EmailTemplateContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}'} - - def create_or_update( - self, resource_group_name, service_name, template_name, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): - """Updates an Email Template. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param template_name: Email Template Name Identifier. Possible values - include: 'applicationApprovedNotificationMessage', - 'accountClosedDeveloper', - 'quotaLimitApproachingDeveloperNotificationMessage', - 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', - 'inviteUserNotificationMessage', 'newCommentNotificationMessage', - 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', - 'purchaseDeveloperNotificationMessage', - 'passwordResetIdentityDefault', - 'passwordResetByAdminNotificationMessage', - 'rejectDeveloperNotificationMessage', - 'requestDeveloperNotificationMessage' - :type template_name: str or - ~azure.mgmt.apimanagement.models.TemplateName - :param parameters: Email Template update parameters. - :type parameters: - ~azure.mgmt.apimanagement.models.EmailTemplateUpdateParameters - :param if_match: ETag of the Entity. Not required when creating an - entity, but required when updating an entity. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: EmailTemplateContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.EmailTemplateContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'templateName': self._serialize.url("template_name", template_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'EmailTemplateUpdateParameters') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('EmailTemplateContract', response) - if response.status_code == 201: - deserialized = self._deserialize('EmailTemplateContract', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}'} - - def update( - self, resource_group_name, service_name, template_name, parameters, if_match, custom_headers=None, raw=False, **operation_config): - """Updates the specific Email Template. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param template_name: Email Template Name Identifier. Possible values - include: 'applicationApprovedNotificationMessage', - 'accountClosedDeveloper', - 'quotaLimitApproachingDeveloperNotificationMessage', - 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', - 'inviteUserNotificationMessage', 'newCommentNotificationMessage', - 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', - 'purchaseDeveloperNotificationMessage', - 'passwordResetIdentityDefault', - 'passwordResetByAdminNotificationMessage', - 'rejectDeveloperNotificationMessage', - 'requestDeveloperNotificationMessage' - :type template_name: str or - ~azure.mgmt.apimanagement.models.TemplateName - :param parameters: Update parameters. - :type parameters: - ~azure.mgmt.apimanagement.models.EmailTemplateUpdateParameters - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'templateName': self._serialize.url("template_name", template_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'EmailTemplateUpdateParameters') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}'} - - def delete( - self, resource_group_name, service_name, template_name, if_match, custom_headers=None, raw=False, **operation_config): - """Reset the Email Template to default template provided by the API - Management service instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param template_name: Email Template Name Identifier. Possible values - include: 'applicationApprovedNotificationMessage', - 'accountClosedDeveloper', - 'quotaLimitApproachingDeveloperNotificationMessage', - 'newDeveloperNotificationMessage', 'emailChangeIdentityDefault', - 'inviteUserNotificationMessage', 'newCommentNotificationMessage', - 'confirmSignUpIdentityDefault', 'newIssueNotificationMessage', - 'purchaseDeveloperNotificationMessage', - 'passwordResetIdentityDefault', - 'passwordResetByAdminNotificationMessage', - 'rejectDeveloperNotificationMessage', - 'requestDeveloperNotificationMessage' - :type template_name: str or - ~azure.mgmt.apimanagement.models.TemplateName - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'templateName': self._serialize.url("template_name", template_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/group_operations.py deleted file mode 100644 index a7cda28143af..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/group_operations.py +++ /dev/null @@ -1,471 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class GroupOperations(object): - """GroupOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_service( - self, resource_group_name, service_name, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists a collection of groups defined within a service instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| displayName | filter | ge, le, eq, ne, - gt, lt | substringof, contains, startswith, endswith |
| - description | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| aadObjectId | filter | eq | |
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of GroupContract - :rtype: - ~azure.mgmt.apimanagement.models.GroupContractPaged[~azure.mgmt.apimanagement.models.GroupContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_service.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.GroupContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.GroupContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups'} - - def get_entity_tag( - self, resource_group_name, service_name, group_id, custom_headers=None, raw=False, **operation_config): - """Gets the entity state (Etag) version of the group specified by its - identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param group_id: Group identifier. Must be unique in the current API - Management service instance. - :type group_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_entity_tag.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ - 'ETag': 'str', - }) - return client_raw_response - get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}'} - - def get( - self, resource_group_name, service_name, group_id, custom_headers=None, raw=False, **operation_config): - """Gets the details of the group specified by its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param group_id: Group identifier. Must be unique in the current API - Management service instance. - :type group_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: GroupContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.GroupContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('GroupContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}'} - - def create_or_update( - self, resource_group_name, service_name, group_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): - """Creates or Updates a group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param group_id: Group identifier. Must be unique in the current API - Management service instance. - :type group_id: str - :param parameters: Create parameters. - :type parameters: - ~azure.mgmt.apimanagement.models.GroupCreateParameters - :param if_match: ETag of the Entity. Not required when creating an - entity, but required when updating an entity. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: GroupContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.GroupContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'GroupCreateParameters') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('GroupContract', response) - header_dict = { - 'ETag': 'str', - } - if response.status_code == 201: - deserialized = self._deserialize('GroupContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}'} - - def update( - self, resource_group_name, service_name, group_id, parameters, if_match, custom_headers=None, raw=False, **operation_config): - """Updates the details of the group specified by its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param group_id: Group identifier. Must be unique in the current API - Management service instance. - :type group_id: str - :param parameters: Update parameters. - :type parameters: - ~azure.mgmt.apimanagement.models.GroupUpdateParameters - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'GroupUpdateParameters') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}'} - - def delete( - self, resource_group_name, service_name, group_id, if_match, custom_headers=None, raw=False, **operation_config): - """Deletes specific group of the API Management service instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param group_id: Group identifier. Must be unique in the current API - Management service instance. - :type group_id: str - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/group_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/group_user_operations.py deleted file mode 100644 index 728f33598003..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/group_user_operations.py +++ /dev/null @@ -1,327 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class GroupUserOperations(object): - """GroupUserOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list( - self, resource_group_name, service_name, group_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists a collection of user entities associated with the group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param group_id: Group identifier. Must be unique in the current API - Management service instance. - :type group_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| firstName | filter | ge, le, eq, ne, gt, - lt | substringof, contains, startswith, endswith |
| lastName | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| email | filter | ge, le, eq, ne, gt, lt | - substringof, contains, startswith, endswith |
| registrationDate - | filter | ge, le, eq, ne, gt, lt | |
| note | filter | ge, - le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of UserContract - :rtype: - ~azure.mgmt.apimanagement.models.UserContractPaged[~azure.mgmt.apimanagement.models.UserContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.UserContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.UserContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users'} - - def check_entity_exists( - self, resource_group_name, service_name, group_id, user_id, custom_headers=None, raw=False, **operation_config): - """Checks that user entity specified by identifier is associated with the - group entity. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param group_id: Group identifier. Must be unique in the current API - Management service instance. - :type group_id: str - :param user_id: User identifier. Must be unique in the current API - Management service instance. - :type user_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: bool or ClientRawResponse if raw=true - :rtype: bool or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.check_entity_exists.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = (response.status_code == 204) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - return deserialized - check_entity_exists.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}'} - - def create( - self, resource_group_name, service_name, group_id, user_id, custom_headers=None, raw=False, **operation_config): - """Add existing user to existing group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param group_id: Group identifier. Must be unique in the current API - Management service instance. - :type group_id: str - :param user_id: User identifier. Must be unique in the current API - Management service instance. - :type user_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: UserContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.UserContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.create.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('UserContract', response) - if response.status_code == 201: - deserialized = self._deserialize('UserContract', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}'} - - def delete( - self, resource_group_name, service_name, group_id, user_id, custom_headers=None, raw=False, **operation_config): - """Remove existing user from existing group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param group_id: Group identifier. Must be unique in the current API - Management service instance. - :type group_id: str - :param user_id: User identifier. Must be unique in the current API - Management service instance. - :type user_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/identity_provider_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/identity_provider_operations.py deleted file mode 100644 index 601391c42832..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/identity_provider_operations.py +++ /dev/null @@ -1,464 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class IdentityProviderOperations(object): - """IdentityProviderOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_service( - self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): - """Lists a collection of Identity Provider configured in the specified - service instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of IdentityProviderContract - :rtype: - ~azure.mgmt.apimanagement.models.IdentityProviderContractPaged[~azure.mgmt.apimanagement.models.IdentityProviderContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_service.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.IdentityProviderContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.IdentityProviderContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders'} - - def get_entity_tag( - self, resource_group_name, service_name, identity_provider_name, custom_headers=None, raw=False, **operation_config): - """Gets the entity state (Etag) version of the identityProvider specified - by its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param identity_provider_name: Identity Provider Type identifier. - Possible values include: 'facebook', 'google', 'microsoft', 'twitter', - 'aad', 'aadB2C' - :type identity_provider_name: str or - ~azure.mgmt.apimanagement.models.IdentityProviderType - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_entity_tag.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'identityProviderName': self._serialize.url("identity_provider_name", identity_provider_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ - 'ETag': 'str', - }) - return client_raw_response - get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}'} - - def get( - self, resource_group_name, service_name, identity_provider_name, custom_headers=None, raw=False, **operation_config): - """Gets the configuration details of the identity Provider configured in - specified service instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param identity_provider_name: Identity Provider Type identifier. - Possible values include: 'facebook', 'google', 'microsoft', 'twitter', - 'aad', 'aadB2C' - :type identity_provider_name: str or - ~azure.mgmt.apimanagement.models.IdentityProviderType - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IdentityProviderContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.IdentityProviderContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'identityProviderName': self._serialize.url("identity_provider_name", identity_provider_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('IdentityProviderContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}'} - - def create_or_update( - self, resource_group_name, service_name, identity_provider_name, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): - """Creates or Updates the IdentityProvider configuration. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param identity_provider_name: Identity Provider Type identifier. - Possible values include: 'facebook', 'google', 'microsoft', 'twitter', - 'aad', 'aadB2C' - :type identity_provider_name: str or - ~azure.mgmt.apimanagement.models.IdentityProviderType - :param parameters: Create parameters. - :type parameters: - ~azure.mgmt.apimanagement.models.IdentityProviderContract - :param if_match: ETag of the Entity. Not required when creating an - entity, but required when updating an entity. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IdentityProviderContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.IdentityProviderContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'identityProviderName': self._serialize.url("identity_provider_name", identity_provider_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'IdentityProviderContract') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('IdentityProviderContract', response) - header_dict = { - 'ETag': 'str', - } - if response.status_code == 201: - deserialized = self._deserialize('IdentityProviderContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}'} - - def update( - self, resource_group_name, service_name, identity_provider_name, parameters, if_match, custom_headers=None, raw=False, **operation_config): - """Updates an existing IdentityProvider configuration. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param identity_provider_name: Identity Provider Type identifier. - Possible values include: 'facebook', 'google', 'microsoft', 'twitter', - 'aad', 'aadB2C' - :type identity_provider_name: str or - ~azure.mgmt.apimanagement.models.IdentityProviderType - :param parameters: Update parameters. - :type parameters: - ~azure.mgmt.apimanagement.models.IdentityProviderUpdateParameters - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'identityProviderName': self._serialize.url("identity_provider_name", identity_provider_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'IdentityProviderUpdateParameters') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}'} - - def delete( - self, resource_group_name, service_name, identity_provider_name, if_match, custom_headers=None, raw=False, **operation_config): - """Deletes the specified identity provider configuration. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param identity_provider_name: Identity Provider Type identifier. - Possible values include: 'facebook', 'google', 'microsoft', 'twitter', - 'aad', 'aadB2C' - :type identity_provider_name: str or - ~azure.mgmt.apimanagement.models.IdentityProviderType - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'identityProviderName': self._serialize.url("identity_provider_name", identity_provider_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/issue_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/issue_operations.py deleted file mode 100644 index 370534595261..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/issue_operations.py +++ /dev/null @@ -1,198 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class IssueOperations(object): - """IssueOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_service( - self, resource_group_name, service_name, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists a collection of issues in the specified service instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| apiId | filter | ge, le, eq, ne, gt, lt - | substringof, contains, startswith, endswith |
| title | filter - | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith - |
| description | filter | ge, le, eq, ne, gt, lt | substringof, - contains, startswith, endswith |
| authorName | filter | ge, le, - eq, ne, gt, lt | substringof, contains, startswith, endswith |
| - state | filter | eq | |
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of IssueContract - :rtype: - ~azure.mgmt.apimanagement.models.IssueContractPaged[~azure.mgmt.apimanagement.models.IssueContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_service.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.IssueContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.IssueContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/issues'} - - def get( - self, resource_group_name, service_name, issue_id, custom_headers=None, raw=False, **operation_config): - """Gets API Management issue details. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param issue_id: Issue identifier. Must be unique in the current API - Management service instance. - :type issue_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IssueContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.IssueContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'issueId': self._serialize.url("issue_id", issue_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('IssueContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/issues/{issueId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/logger_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/logger_operations.py deleted file mode 100644 index b8ac594d7456..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/logger_operations.py +++ /dev/null @@ -1,474 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class LoggerOperations(object): - """LoggerOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_service( - self, resource_group_name, service_name, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists a collection of loggers in the specified service instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| description | filter | ge, le, eq, ne, - gt, lt | substringof, contains, startswith, endswith |
| - loggerType | filter | eq | |
| resourceId | filter | ge, le, - eq, ne, gt, lt | substringof, contains, startswith, endswith |
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of LoggerContract - :rtype: - ~azure.mgmt.apimanagement.models.LoggerContractPaged[~azure.mgmt.apimanagement.models.LoggerContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_service.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.LoggerContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.LoggerContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers'} - - def get_entity_tag( - self, resource_group_name, service_name, logger_id, custom_headers=None, raw=False, **operation_config): - """Gets the entity state (Etag) version of the logger specified by its - identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param logger_id: Logger identifier. Must be unique in the API - Management service instance. - :type logger_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_entity_tag.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'loggerId': self._serialize.url("logger_id", logger_id, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ - 'ETag': 'str', - }) - return client_raw_response - get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}'} - - def get( - self, resource_group_name, service_name, logger_id, custom_headers=None, raw=False, **operation_config): - """Gets the details of the logger specified by its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param logger_id: Logger identifier. Must be unique in the API - Management service instance. - :type logger_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: LoggerContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.LoggerContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'loggerId': self._serialize.url("logger_id", logger_id, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('LoggerContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}'} - - def create_or_update( - self, resource_group_name, service_name, logger_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): - """Creates or Updates a logger. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param logger_id: Logger identifier. Must be unique in the API - Management service instance. - :type logger_id: str - :param parameters: Create parameters. - :type parameters: ~azure.mgmt.apimanagement.models.LoggerContract - :param if_match: ETag of the Entity. Not required when creating an - entity, but required when updating an entity. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: LoggerContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.LoggerContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'loggerId': self._serialize.url("logger_id", logger_id, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'LoggerContract') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('LoggerContract', response) - header_dict = { - 'ETag': 'str', - } - if response.status_code == 201: - deserialized = self._deserialize('LoggerContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}'} - - def update( - self, resource_group_name, service_name, logger_id, parameters, if_match, custom_headers=None, raw=False, **operation_config): - """Updates an existing logger. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param logger_id: Logger identifier. Must be unique in the API - Management service instance. - :type logger_id: str - :param parameters: Update parameters. - :type parameters: - ~azure.mgmt.apimanagement.models.LoggerUpdateContract - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'loggerId': self._serialize.url("logger_id", logger_id, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'LoggerUpdateContract') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}'} - - def delete( - self, resource_group_name, service_name, logger_id, if_match, force=None, custom_headers=None, raw=False, **operation_config): - """Deletes the specified logger. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param logger_id: Logger identifier. Must be unique in the API - Management service instance. - :type logger_id: str - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param force: Force deletion even if diagnostic is attached. - :type force: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'loggerId': self._serialize.url("logger_id", logger_id, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if force is not None: - query_parameters['force'] = self._serialize.query("force", force, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/network_status_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/network_status_operations.py deleted file mode 100644 index 3dd3986da8e7..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/network_status_operations.py +++ /dev/null @@ -1,169 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class NetworkStatusOperations(object): - """NetworkStatusOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_service( - self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): - """Gets the Connectivity Status to the external resources on which the Api - Management service depends from inside the Cloud Service. This also - returns the DNS Servers as visible to the CloudService. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.apimanagement.models.NetworkStatusContractByLocation] - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.list_by_service.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[NetworkStatusContractByLocation]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/networkstatus'} - - def list_by_location( - self, resource_group_name, service_name, location_name, custom_headers=None, raw=False, **operation_config): - """Gets the Connectivity Status to the external resources on which the Api - Management service depends from inside the Cloud Service. This also - returns the DNS Servers as visible to the CloudService. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param location_name: Location in which the API Management service is - deployed. This is one of the Azure Regions like West US, East US, - South Central US. - :type location_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: NetworkStatusContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.NetworkStatusContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.list_by_location.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'locationName': self._serialize.url("location_name", location_name, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('NetworkStatusContract', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/locations/{locationName}/networkstatus'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/notification_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/notification_operations.py deleted file mode 100644 index 51ca2ea6c65f..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/notification_operations.py +++ /dev/null @@ -1,259 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class NotificationOperations(object): - """NotificationOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_service( - self, resource_group_name, service_name, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists a collection of properties defined within a service instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of NotificationContract - :rtype: - ~azure.mgmt.apimanagement.models.NotificationContractPaged[~azure.mgmt.apimanagement.models.NotificationContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_service.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.NotificationContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.NotificationContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications'} - - def get( - self, resource_group_name, service_name, notification_name, custom_headers=None, raw=False, **operation_config): - """Gets the details of the Notification specified by its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param notification_name: Notification Name Identifier. Possible - values include: 'RequestPublisherNotificationMessage', - 'PurchasePublisherNotificationMessage', - 'NewApplicationNotificationMessage', 'BCC', - 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', - 'QuotaLimitApproachingPublisherNotificationMessage' - :type notification_name: str or - ~azure.mgmt.apimanagement.models.NotificationName - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: NotificationContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.NotificationContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'notificationName': self._serialize.url("notification_name", notification_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('NotificationContract', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}'} - - def create_or_update( - self, resource_group_name, service_name, notification_name, if_match=None, custom_headers=None, raw=False, **operation_config): - """Create or Update API Management publisher notification. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param notification_name: Notification Name Identifier. Possible - values include: 'RequestPublisherNotificationMessage', - 'PurchasePublisherNotificationMessage', - 'NewApplicationNotificationMessage', 'BCC', - 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', - 'QuotaLimitApproachingPublisherNotificationMessage' - :type notification_name: str or - ~azure.mgmt.apimanagement.models.NotificationName - :param if_match: ETag of the Entity. Not required when creating an - entity, but required when updating an entity. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: NotificationContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.NotificationContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'notificationName': self._serialize.url("notification_name", notification_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('NotificationContract', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/notification_recipient_email_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/notification_recipient_email_operations.py deleted file mode 100644 index ce26d8d03aab..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/notification_recipient_email_operations.py +++ /dev/null @@ -1,314 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class NotificationRecipientEmailOperations(object): - """NotificationRecipientEmailOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_notification( - self, resource_group_name, service_name, notification_name, custom_headers=None, raw=False, **operation_config): - """Gets the list of the Notification Recipient Emails subscribed to a - notification. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param notification_name: Notification Name Identifier. Possible - values include: 'RequestPublisherNotificationMessage', - 'PurchasePublisherNotificationMessage', - 'NewApplicationNotificationMessage', 'BCC', - 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', - 'QuotaLimitApproachingPublisherNotificationMessage' - :type notification_name: str or - ~azure.mgmt.apimanagement.models.NotificationName - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RecipientEmailCollection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.RecipientEmailCollection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.list_by_notification.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'notificationName': self._serialize.url("notification_name", notification_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RecipientEmailCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_by_notification.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails'} - - def check_entity_exists( - self, resource_group_name, service_name, notification_name, email, custom_headers=None, raw=False, **operation_config): - """Determine if Notification Recipient Email subscribed to the - notification. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param notification_name: Notification Name Identifier. Possible - values include: 'RequestPublisherNotificationMessage', - 'PurchasePublisherNotificationMessage', - 'NewApplicationNotificationMessage', 'BCC', - 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', - 'QuotaLimitApproachingPublisherNotificationMessage' - :type notification_name: str or - ~azure.mgmt.apimanagement.models.NotificationName - :param email: Email identifier. - :type email: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: bool or ClientRawResponse if raw=true - :rtype: bool or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.check_entity_exists.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'notificationName': self._serialize.url("notification_name", notification_name, 'str'), - 'email': self._serialize.url("email", email, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = (response.status_code == 204) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - return deserialized - check_entity_exists.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}'} - - def create_or_update( - self, resource_group_name, service_name, notification_name, email, custom_headers=None, raw=False, **operation_config): - """Adds the Email address to the list of Recipients for the Notification. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param notification_name: Notification Name Identifier. Possible - values include: 'RequestPublisherNotificationMessage', - 'PurchasePublisherNotificationMessage', - 'NewApplicationNotificationMessage', 'BCC', - 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', - 'QuotaLimitApproachingPublisherNotificationMessage' - :type notification_name: str or - ~azure.mgmt.apimanagement.models.NotificationName - :param email: Email identifier. - :type email: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RecipientEmailContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.RecipientEmailContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'notificationName': self._serialize.url("notification_name", notification_name, 'str'), - 'email': self._serialize.url("email", email, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RecipientEmailContract', response) - if response.status_code == 201: - deserialized = self._deserialize('RecipientEmailContract', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}'} - - def delete( - self, resource_group_name, service_name, notification_name, email, custom_headers=None, raw=False, **operation_config): - """Removes the email from the list of Notification. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param notification_name: Notification Name Identifier. Possible - values include: 'RequestPublisherNotificationMessage', - 'PurchasePublisherNotificationMessage', - 'NewApplicationNotificationMessage', 'BCC', - 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', - 'QuotaLimitApproachingPublisherNotificationMessage' - :type notification_name: str or - ~azure.mgmt.apimanagement.models.NotificationName - :param email: Email identifier. - :type email: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'notificationName': self._serialize.url("notification_name", notification_name, 'str'), - 'email': self._serialize.url("email", email, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/notification_recipient_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/notification_recipient_user_operations.py deleted file mode 100644 index 7041ad6440a4..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/notification_recipient_user_operations.py +++ /dev/null @@ -1,318 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class NotificationRecipientUserOperations(object): - """NotificationRecipientUserOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_notification( - self, resource_group_name, service_name, notification_name, custom_headers=None, raw=False, **operation_config): - """Gets the list of the Notification Recipient User subscribed to the - notification. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param notification_name: Notification Name Identifier. Possible - values include: 'RequestPublisherNotificationMessage', - 'PurchasePublisherNotificationMessage', - 'NewApplicationNotificationMessage', 'BCC', - 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', - 'QuotaLimitApproachingPublisherNotificationMessage' - :type notification_name: str or - ~azure.mgmt.apimanagement.models.NotificationName - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RecipientUserCollection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.RecipientUserCollection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.list_by_notification.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'notificationName': self._serialize.url("notification_name", notification_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RecipientUserCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_by_notification.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers'} - - def check_entity_exists( - self, resource_group_name, service_name, notification_name, user_id, custom_headers=None, raw=False, **operation_config): - """Determine if the Notification Recipient User is subscribed to the - notification. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param notification_name: Notification Name Identifier. Possible - values include: 'RequestPublisherNotificationMessage', - 'PurchasePublisherNotificationMessage', - 'NewApplicationNotificationMessage', 'BCC', - 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', - 'QuotaLimitApproachingPublisherNotificationMessage' - :type notification_name: str or - ~azure.mgmt.apimanagement.models.NotificationName - :param user_id: User identifier. Must be unique in the current API - Management service instance. - :type user_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: bool or ClientRawResponse if raw=true - :rtype: bool or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.check_entity_exists.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'notificationName': self._serialize.url("notification_name", notification_name, 'str'), - 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204, 404]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = (response.status_code == 204) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - return deserialized - check_entity_exists.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}'} - - def create_or_update( - self, resource_group_name, service_name, notification_name, user_id, custom_headers=None, raw=False, **operation_config): - """Adds the API Management User to the list of Recipients for the - Notification. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param notification_name: Notification Name Identifier. Possible - values include: 'RequestPublisherNotificationMessage', - 'PurchasePublisherNotificationMessage', - 'NewApplicationNotificationMessage', 'BCC', - 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', - 'QuotaLimitApproachingPublisherNotificationMessage' - :type notification_name: str or - ~azure.mgmt.apimanagement.models.NotificationName - :param user_id: User identifier. Must be unique in the current API - Management service instance. - :type user_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RecipientUserContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.RecipientUserContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'notificationName': self._serialize.url("notification_name", notification_name, 'str'), - 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RecipientUserContract', response) - if response.status_code == 201: - deserialized = self._deserialize('RecipientUserContract', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}'} - - def delete( - self, resource_group_name, service_name, notification_name, user_id, custom_headers=None, raw=False, **operation_config): - """Removes the API Management user from the list of Notification. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param notification_name: Notification Name Identifier. Possible - values include: 'RequestPublisherNotificationMessage', - 'PurchasePublisherNotificationMessage', - 'NewApplicationNotificationMessage', 'BCC', - 'NewIssuePublisherNotificationMessage', 'AccountClosedPublisher', - 'QuotaLimitApproachingPublisherNotificationMessage' - :type notification_name: str or - ~azure.mgmt.apimanagement.models.NotificationName - :param user_id: User identifier. Must be unique in the current API - Management service instance. - :type user_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'notificationName': self._serialize.url("notification_name", notification_name, 'str'), - 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/open_id_connect_provider_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/open_id_connect_provider_operations.py deleted file mode 100644 index 1987a36bceed..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/open_id_connect_provider_operations.py +++ /dev/null @@ -1,467 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class OpenIdConnectProviderOperations(object): - """OpenIdConnectProviderOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_service( - self, resource_group_name, service_name, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists of all the OpenId Connect Providers. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| displayName | filter | ge, le, eq, ne, - gt, lt | substringof, contains, startswith, endswith |
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of OpenidConnectProviderContract - :rtype: - ~azure.mgmt.apimanagement.models.OpenidConnectProviderContractPaged[~azure.mgmt.apimanagement.models.OpenidConnectProviderContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_service.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.OpenidConnectProviderContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.OpenidConnectProviderContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders'} - - def get_entity_tag( - self, resource_group_name, service_name, opid, custom_headers=None, raw=False, **operation_config): - """Gets the entity state (Etag) version of the openIdConnectProvider - specified by its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param opid: Identifier of the OpenID Connect Provider. - :type opid: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_entity_tag.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'opid': self._serialize.url("opid", opid, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ - 'ETag': 'str', - }) - return client_raw_response - get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}'} - - def get( - self, resource_group_name, service_name, opid, custom_headers=None, raw=False, **operation_config): - """Gets specific OpenID Connect Provider. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param opid: Identifier of the OpenID Connect Provider. - :type opid: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: OpenidConnectProviderContract or ClientRawResponse if - raw=true - :rtype: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'opid': self._serialize.url("opid", opid, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('OpenidConnectProviderContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}'} - - def create_or_update( - self, resource_group_name, service_name, opid, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): - """Creates or updates the OpenID Connect Provider. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param opid: Identifier of the OpenID Connect Provider. - :type opid: str - :param parameters: Create parameters. - :type parameters: - ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract - :param if_match: ETag of the Entity. Not required when creating an - entity, but required when updating an entity. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: OpenidConnectProviderContract or ClientRawResponse if - raw=true - :rtype: ~azure.mgmt.apimanagement.models.OpenidConnectProviderContract - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'opid': self._serialize.url("opid", opid, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'OpenidConnectProviderContract') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('OpenidConnectProviderContract', response) - header_dict = { - 'ETag': 'str', - } - if response.status_code == 201: - deserialized = self._deserialize('OpenidConnectProviderContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}'} - - def update( - self, resource_group_name, service_name, opid, parameters, if_match, custom_headers=None, raw=False, **operation_config): - """Updates the specific OpenID Connect Provider. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param opid: Identifier of the OpenID Connect Provider. - :type opid: str - :param parameters: Update parameters. - :type parameters: - ~azure.mgmt.apimanagement.models.OpenidConnectProviderUpdateContract - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'opid': self._serialize.url("opid", opid, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'OpenidConnectProviderUpdateContract') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}'} - - def delete( - self, resource_group_name, service_name, opid, if_match, custom_headers=None, raw=False, **operation_config): - """Deletes specific OpenID Connect Provider of the API Management service - instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param opid: Identifier of the OpenID Connect Provider. - :type opid: str - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'opid': self._serialize.url("opid", opid, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/operation_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/operation_operations.py deleted file mode 100644 index d3289232f1e2..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/operation_operations.py +++ /dev/null @@ -1,140 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class OperationOperations(object): - """OperationOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_tags( - self, resource_group_name, service_name, api_id, filter=None, top=None, skip=None, include_not_tagged_operations=None, custom_headers=None, raw=False, **operation_config): - """Lists a collection of operations associated with tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| displayName | filter | ge, le, eq, ne, - gt, lt | substringof, contains, startswith, endswith |
| apiName - | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| description | filter | ge, le, eq, ne, gt, lt | - substringof, contains, startswith, endswith |
| method | filter | - ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, - contains, startswith, endswith |
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param include_not_tagged_operations: Include not tagged Operations. - :type include_not_tagged_operations: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TagResourceContract - :rtype: - ~azure.mgmt.apimanagement.models.TagResourceContractPaged[~azure.mgmt.apimanagement.models.TagResourceContract] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_tags.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - if include_not_tagged_operations is not None: - query_parameters['includeNotTaggedOperations'] = self._serialize.query("include_not_tagged_operations", include_not_tagged_operations, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.TagResourceContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.TagResourceContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operationsByTags'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/policy_operations.py deleted file mode 100644 index 8413d78ea04c..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/policy_operations.py +++ /dev/null @@ -1,378 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class PolicyOperations(object): - """PolicyOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - :ivar policy_id: The identifier of the Policy. Constant value: "policy". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - self.policy_id = "policy" - - self.config = config - - def list_by_service( - self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): - """Lists all the Global Policy definitions of the Api Management service. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PolicyCollection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.PolicyCollection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.list_by_service.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('PolicyCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies'} - - def get_entity_tag( - self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): - """Gets the entity state (Etag) version of the Global policy definition in - the Api Management service. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_entity_tag.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ - 'ETag': 'str', - }) - return client_raw_response - get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}'} - - def get( - self, resource_group_name, service_name, format="xml", custom_headers=None, raw=False, **operation_config): - """Get the Global policy definition of the Api Management service. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param format: Policy Export Format. Possible values include: 'xml', - 'rawxml' - :type format: str or - ~azure.mgmt.apimanagement.models.PolicyExportFormat - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PolicyContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if format is not None: - query_parameters['format'] = self._serialize.query("format", format, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('PolicyContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}'} - - def create_or_update( - self, resource_group_name, service_name, value, if_match=None, format="xml", custom_headers=None, raw=False, **operation_config): - """Creates or updates the global policy configuration of the Api - Management service. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param value: Contents of the Policy as defined by the format. - :type value: str - :param if_match: ETag of the Entity. Not required when creating an - entity, but required when updating an entity. - :type if_match: str - :param format: Format of the policyContent. Possible values include: - 'xml', 'xml-link', 'rawxml', 'rawxml-link' - :type format: str or - ~azure.mgmt.apimanagement.models.PolicyContentFormat - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PolicyContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - parameters = models.PolicyContract(value=value, format=format) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PolicyContract') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('PolicyContract', response) - header_dict = { - 'ETag': 'str', - } - if response.status_code == 201: - deserialized = self._deserialize('PolicyContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}'} - - def delete( - self, resource_group_name, service_name, if_match, custom_headers=None, raw=False, **operation_config): - """Deletes the global policy configuration of the Api Management Service. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/policy_snippet_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/policy_snippet_operations.py deleted file mode 100644 index 97872fd324fd..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/policy_snippet_operations.py +++ /dev/null @@ -1,104 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class PolicySnippetOperations(object): - """PolicySnippetOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_service( - self, resource_group_name, service_name, scope=None, custom_headers=None, raw=False, **operation_config): - """Lists all policy snippets. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param scope: Policy scope. Possible values include: 'Tenant', - 'Product', 'Api', 'Operation', 'All' - :type scope: str or - ~azure.mgmt.apimanagement.models.PolicyScopeContract - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PolicySnippetsCollection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.PolicySnippetsCollection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.list_by_service.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if scope is not None: - query_parameters['scope'] = self._serialize.query("scope", scope, 'PolicyScopeContract') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('PolicySnippetsCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policySnippets'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/product_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/product_api_operations.py deleted file mode 100644 index 5263136fbbaf..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/product_api_operations.py +++ /dev/null @@ -1,327 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ProductApiOperations(object): - """ProductApiOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_product( - self, resource_group_name, service_name, product_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists a collection of the APIs associated with a product. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current - API Management service instance. - :type product_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| displayName | filter | ge, le, eq, ne, - gt, lt | substringof, contains, startswith, endswith |
| - description | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, - gt, lt | substringof, contains, startswith, endswith |
| path | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ApiContract - :rtype: - ~azure.mgmt.apimanagement.models.ApiContractPaged[~azure.mgmt.apimanagement.models.ApiContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_product.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.ApiContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ApiContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_product.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis'} - - def check_entity_exists( - self, resource_group_name, service_name, product_id, api_id, custom_headers=None, raw=False, **operation_config): - """Checks that API entity specified by identifier is associated with the - Product entity. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current - API Management service instance. - :type product_id: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.check_entity_exists.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - check_entity_exists.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}'} - - def create_or_update( - self, resource_group_name, service_name, product_id, api_id, custom_headers=None, raw=False, **operation_config): - """Adds an API to the specified product. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current - API Management service instance. - :type product_id: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApiContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.ApiContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApiContract', response) - if response.status_code == 201: - deserialized = self._deserialize('ApiContract', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}'} - - def delete( - self, resource_group_name, service_name, product_id, api_id, custom_headers=None, raw=False, **operation_config): - """Deletes the specified API from the specified product. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current - API Management service instance. - :type product_id: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/product_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/product_group_operations.py deleted file mode 100644 index cefd7ce25cdb..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/product_group_operations.py +++ /dev/null @@ -1,321 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ProductGroupOperations(object): - """ProductGroupOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_product( - self, resource_group_name, service_name, product_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists the collection of developer groups associated with the specified - product. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current - API Management service instance. - :type product_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - name | filter | ge, le, eq, ne, gt, lt | |
| displayName | - filter | eq, ne | |
| description | filter | eq, ne | | -
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of GroupContract - :rtype: - ~azure.mgmt.apimanagement.models.GroupContractPaged[~azure.mgmt.apimanagement.models.GroupContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_product.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.GroupContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.GroupContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_product.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups'} - - def check_entity_exists( - self, resource_group_name, service_name, product_id, group_id, custom_headers=None, raw=False, **operation_config): - """Checks that Group entity specified by identifier is associated with the - Product entity. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current - API Management service instance. - :type product_id: str - :param group_id: Group identifier. Must be unique in the current API - Management service instance. - :type group_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.check_entity_exists.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - check_entity_exists.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}'} - - def create_or_update( - self, resource_group_name, service_name, product_id, group_id, custom_headers=None, raw=False, **operation_config): - """Adds the association between the specified developer group with the - specified product. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current - API Management service instance. - :type product_id: str - :param group_id: Group identifier. Must be unique in the current API - Management service instance. - :type group_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: GroupContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.GroupContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('GroupContract', response) - if response.status_code == 201: - deserialized = self._deserialize('GroupContract', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}'} - - def delete( - self, resource_group_name, service_name, product_id, group_id, custom_headers=None, raw=False, **operation_config): - """Deletes the association between the specified group and product. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current - API Management service instance. - :type product_id: str - :param group_id: Group identifier. Must be unique in the current API - Management service instance. - :type group_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'groupId': self._serialize.url("group_id", group_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/product_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/product_operations.py deleted file mode 100644 index ab5a195f764f..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/product_operations.py +++ /dev/null @@ -1,580 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ProductOperations(object): - """ProductOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_service( - self, resource_group_name, service_name, filter=None, top=None, skip=None, expand_groups=None, tags=None, custom_headers=None, raw=False, **operation_config): - """Lists a collection of products in the specified service instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| displayName | filter | ge, le, eq, ne, - gt, lt | substringof, contains, startswith, endswith |
| - description | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| terms | filter | ge, le, eq, ne, gt, lt - | substringof, contains, startswith, endswith |
| state | filter - | eq | |
| groups | expand | | |
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param expand_groups: When set to true, the response contains an array - of groups that have visibility to the product. The default is false. - :type expand_groups: bool - :param tags: Products which are part of a specific tag. - :type tags: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ProductContract - :rtype: - ~azure.mgmt.apimanagement.models.ProductContractPaged[~azure.mgmt.apimanagement.models.ProductContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_service.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - if expand_groups is not None: - query_parameters['expandGroups'] = self._serialize.query("expand_groups", expand_groups, 'bool') - if tags is not None: - query_parameters['tags'] = self._serialize.query("tags", tags, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.ProductContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ProductContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products'} - - def get_entity_tag( - self, resource_group_name, service_name, product_id, custom_headers=None, raw=False, **operation_config): - """Gets the entity state (Etag) version of the product specified by its - identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current - API Management service instance. - :type product_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_entity_tag.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ - 'ETag': 'str', - }) - return client_raw_response - get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}'} - - def get( - self, resource_group_name, service_name, product_id, custom_headers=None, raw=False, **operation_config): - """Gets the details of the product specified by its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current - API Management service instance. - :type product_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProductContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.ProductContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('ProductContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}'} - - def create_or_update( - self, resource_group_name, service_name, product_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): - """Creates or Updates a product. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current - API Management service instance. - :type product_id: str - :param parameters: Create or update parameters. - :type parameters: ~azure.mgmt.apimanagement.models.ProductContract - :param if_match: ETag of the Entity. Not required when creating an - entity, but required when updating an entity. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProductContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.ProductContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ProductContract') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('ProductContract', response) - header_dict = { - 'ETag': 'str', - } - if response.status_code == 201: - deserialized = self._deserialize('ProductContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}'} - - def update( - self, resource_group_name, service_name, product_id, parameters, if_match, custom_headers=None, raw=False, **operation_config): - """Update existing product details. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current - API Management service instance. - :type product_id: str - :param parameters: Update parameters. - :type parameters: - ~azure.mgmt.apimanagement.models.ProductUpdateParameters - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ProductUpdateParameters') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}'} - - def delete( - self, resource_group_name, service_name, product_id, if_match, delete_subscriptions=None, custom_headers=None, raw=False, **operation_config): - """Delete product. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current - API Management service instance. - :type product_id: str - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param delete_subscriptions: Delete existing subscriptions associated - with the product or not. - :type delete_subscriptions: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if delete_subscriptions is not None: - query_parameters['deleteSubscriptions'] = self._serialize.query("delete_subscriptions", delete_subscriptions, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}'} - - def list_by_tags( - self, resource_group_name, service_name, filter=None, top=None, skip=None, include_not_tagged_products=None, custom_headers=None, raw=False, **operation_config): - """Lists a collection of products associated with tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| displayName | filter | ge, le, eq, ne, - gt, lt | substringof, contains, startswith, endswith |
| - description | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| terms | filter | ge, le, eq, ne, gt, lt - | substringof, contains, startswith, endswith |
| state | filter - | eq | substringof, contains, startswith, endswith |
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param include_not_tagged_products: Include not tagged Products. - :type include_not_tagged_products: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TagResourceContract - :rtype: - ~azure.mgmt.apimanagement.models.TagResourceContractPaged[~azure.mgmt.apimanagement.models.TagResourceContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_tags.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - if include_not_tagged_products is not None: - query_parameters['includeNotTaggedProducts'] = self._serialize.query("include_not_tagged_products", include_not_tagged_products, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.TagResourceContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.TagResourceContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/productsByTags'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/product_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/product_policy_operations.py deleted file mode 100644 index 88efe0a55ee4..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/product_policy_operations.py +++ /dev/null @@ -1,396 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ProductPolicyOperations(object): - """ProductPolicyOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - :ivar policy_id: The identifier of the Policy. Constant value: "policy". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - self.policy_id = "policy" - - self.config = config - - def list_by_product( - self, resource_group_name, service_name, product_id, custom_headers=None, raw=False, **operation_config): - """Get the policy configuration at the Product level. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current - API Management service instance. - :type product_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PolicyCollection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.PolicyCollection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.list_by_product.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('PolicyCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_by_product.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies'} - - def get_entity_tag( - self, resource_group_name, service_name, product_id, custom_headers=None, raw=False, **operation_config): - """Get the ETag of the policy configuration at the Product level. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current - API Management service instance. - :type product_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_entity_tag.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ - 'ETag': 'str', - }) - return client_raw_response - get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}'} - - def get( - self, resource_group_name, service_name, product_id, format="xml", custom_headers=None, raw=False, **operation_config): - """Get the policy configuration at the Product level. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current - API Management service instance. - :type product_id: str - :param format: Policy Export Format. Possible values include: 'xml', - 'rawxml' - :type format: str or - ~azure.mgmt.apimanagement.models.PolicyExportFormat - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PolicyContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if format is not None: - query_parameters['format'] = self._serialize.query("format", format, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('PolicyContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}'} - - def create_or_update( - self, resource_group_name, service_name, product_id, value, if_match=None, format="xml", custom_headers=None, raw=False, **operation_config): - """Creates or updates policy configuration for the Product. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current - API Management service instance. - :type product_id: str - :param value: Contents of the Policy as defined by the format. - :type value: str - :param if_match: ETag of the Entity. Not required when creating an - entity, but required when updating an entity. - :type if_match: str - :param format: Format of the policyContent. Possible values include: - 'xml', 'xml-link', 'rawxml', 'rawxml-link' - :type format: str or - ~azure.mgmt.apimanagement.models.PolicyContentFormat - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PolicyContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.PolicyContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - parameters = models.PolicyContract(value=value, format=format) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PolicyContract') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('PolicyContract', response) - header_dict = { - 'ETag': 'str', - } - if response.status_code == 201: - deserialized = self._deserialize('PolicyContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}'} - - def delete( - self, resource_group_name, service_name, product_id, if_match, custom_headers=None, raw=False, **operation_config): - """Deletes the policy configuration at the Product. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current - API Management service instance. - :type product_id: str - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'policyId': self._serialize.url("self.policy_id", self.policy_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/product_subscriptions_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/product_subscriptions_operations.py deleted file mode 100644 index fee36bbc7942..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/product_subscriptions_operations.py +++ /dev/null @@ -1,136 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ProductSubscriptionsOperations(object): - """ProductSubscriptionsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list( - self, resource_group_name, service_name, product_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists the collection of subscriptions to the specified product. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current - API Management service instance. - :type product_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| displayName | filter | ge, le, eq, ne, - gt, lt | substringof, contains, startswith, endswith |
| - stateComment | filter | ge, le, eq, ne, gt, lt | substringof, - contains, startswith, endswith |
| ownerId | filter | ge, le, eq, - ne, gt, lt | substringof, contains, startswith, endswith |
| - scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt - | substringof, contains, startswith, endswith |
| productId | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| state | filter | eq | |
| user | expand | - | |
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SubscriptionContract - :rtype: - ~azure.mgmt.apimanagement.models.SubscriptionContractPaged[~azure.mgmt.apimanagement.models.SubscriptionContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.SubscriptionContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.SubscriptionContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/subscriptions'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/property_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/property_operations.py deleted file mode 100644 index 3c243740613c..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/property_operations.py +++ /dev/null @@ -1,463 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class PropertyOperations(object): - """PropertyOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_service( - self, resource_group_name, service_name, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists a collection of properties defined within a service instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - tags | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith, any, all |
| displayName | filter | ge, le, - eq, ne, gt, lt | substringof, contains, startswith, endswith |
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PropertyContract - :rtype: - ~azure.mgmt.apimanagement.models.PropertyContractPaged[~azure.mgmt.apimanagement.models.PropertyContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_service.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.PropertyContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.PropertyContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/properties'} - - def get_entity_tag( - self, resource_group_name, service_name, prop_id, custom_headers=None, raw=False, **operation_config): - """Gets the entity state (Etag) version of the property specified by its - identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param prop_id: Identifier of the property. - :type prop_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_entity_tag.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'propId': self._serialize.url("prop_id", prop_id, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ - 'ETag': 'str', - }) - return client_raw_response - get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/properties/{propId}'} - - def get( - self, resource_group_name, service_name, prop_id, custom_headers=None, raw=False, **operation_config): - """Gets the details of the property specified by its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param prop_id: Identifier of the property. - :type prop_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PropertyContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.PropertyContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'propId': self._serialize.url("prop_id", prop_id, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('PropertyContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/properties/{propId}'} - - def create_or_update( - self, resource_group_name, service_name, prop_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): - """Creates or updates a property. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param prop_id: Identifier of the property. - :type prop_id: str - :param parameters: Create parameters. - :type parameters: ~azure.mgmt.apimanagement.models.PropertyContract - :param if_match: ETag of the Entity. Not required when creating an - entity, but required when updating an entity. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PropertyContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.PropertyContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'propId': self._serialize.url("prop_id", prop_id, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PropertyContract') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('PropertyContract', response) - header_dict = { - 'ETag': 'str', - } - if response.status_code == 201: - deserialized = self._deserialize('PropertyContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/properties/{propId}'} - - def update( - self, resource_group_name, service_name, prop_id, parameters, if_match, custom_headers=None, raw=False, **operation_config): - """Updates the specific property. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param prop_id: Identifier of the property. - :type prop_id: str - :param parameters: Update parameters. - :type parameters: - ~azure.mgmt.apimanagement.models.PropertyUpdateParameters - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'propId': self._serialize.url("prop_id", prop_id, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PropertyUpdateParameters') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/properties/{propId}'} - - def delete( - self, resource_group_name, service_name, prop_id, if_match, custom_headers=None, raw=False, **operation_config): - """Deletes specific property from the API Management service instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param prop_id: Identifier of the property. - :type prop_id: str - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'propId': self._serialize.url("prop_id", prop_id, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/properties/{propId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/quota_by_counter_keys_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/quota_by_counter_keys_operations.py deleted file mode 100644 index 6c6da85b6b02..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/quota_by_counter_keys_operations.py +++ /dev/null @@ -1,180 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class QuotaByCounterKeysOperations(object): - """QuotaByCounterKeysOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_service( - self, resource_group_name, service_name, quota_counter_key, custom_headers=None, raw=False, **operation_config): - """Lists a collection of current quota counter periods associated with the - counter-key configured in the policy on the specified service instance. - The api does not support paging yet. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param quota_counter_key: Quota counter key identifier.This is the - result of expression defined in counter-key attribute of the - quota-by-key policy.For Example, if you specify counter-key="boo" in - the policy, then it’s accessible by "boo" counter key. But if it’s - defined as counter-key="@("b"+"a")" then it will be accessible by "ba" - key - :type quota_counter_key: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: QuotaCounterCollection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterCollection or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.list_by_service.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'quotaCounterKey': self._serialize.url("quota_counter_key", quota_counter_key, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('QuotaCounterCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}'} - - def update( - self, resource_group_name, service_name, quota_counter_key, calls_count=None, kb_transferred=None, custom_headers=None, raw=False, **operation_config): - """Updates all the quota counter values specified with the existing quota - counter key to a value in the specified service instance. This should - be used for reset of the quota counter values. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param quota_counter_key: Quota counter key identifier.This is the - result of expression defined in counter-key attribute of the - quota-by-key policy.For Example, if you specify counter-key="boo" in - the policy, then it’s accessible by "boo" counter key. But if it’s - defined as counter-key="@("b"+"a")" then it will be accessible by "ba" - key - :type quota_counter_key: str - :param calls_count: Number of times Counter was called. - :type calls_count: int - :param kb_transferred: Data Transferred in KiloBytes. - :type kb_transferred: float - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - parameters = models.QuotaCounterValueContractProperties(calls_count=calls_count, kb_transferred=kb_transferred) - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'quotaCounterKey': self._serialize.url("quota_counter_key", quota_counter_key, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'QuotaCounterValueContractProperties') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/quota_by_period_keys_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/quota_by_period_keys_operations.py deleted file mode 100644 index ac05c971c9ae..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/quota_by_period_keys_operations.py +++ /dev/null @@ -1,184 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class QuotaByPeriodKeysOperations(object): - """QuotaByPeriodKeysOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def get( - self, resource_group_name, service_name, quota_counter_key, quota_period_key, custom_headers=None, raw=False, **operation_config): - """Gets the value of the quota counter associated with the counter-key in - the policy for the specific period in service instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param quota_counter_key: Quota counter key identifier.This is the - result of expression defined in counter-key attribute of the - quota-by-key policy.For Example, if you specify counter-key="boo" in - the policy, then it’s accessible by "boo" counter key. But if it’s - defined as counter-key="@("b"+"a")" then it will be accessible by "ba" - key - :type quota_counter_key: str - :param quota_period_key: Quota period key identifier. - :type quota_period_key: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: QuotaCounterContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.QuotaCounterContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'quotaCounterKey': self._serialize.url("quota_counter_key", quota_counter_key, 'str'), - 'quotaPeriodKey': self._serialize.url("quota_period_key", quota_period_key, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('QuotaCounterContract', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}'} - - def update( - self, resource_group_name, service_name, quota_counter_key, quota_period_key, calls_count=None, kb_transferred=None, custom_headers=None, raw=False, **operation_config): - """Updates an existing quota counter value in the specified service - instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param quota_counter_key: Quota counter key identifier.This is the - result of expression defined in counter-key attribute of the - quota-by-key policy.For Example, if you specify counter-key="boo" in - the policy, then it’s accessible by "boo" counter key. But if it’s - defined as counter-key="@("b"+"a")" then it will be accessible by "ba" - key - :type quota_counter_key: str - :param quota_period_key: Quota period key identifier. - :type quota_period_key: str - :param calls_count: Number of times Counter was called. - :type calls_count: int - :param kb_transferred: Data Transferred in KiloBytes. - :type kb_transferred: float - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - parameters = models.QuotaCounterValueContractProperties(calls_count=calls_count, kb_transferred=kb_transferred) - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'quotaCounterKey': self._serialize.url("quota_counter_key", quota_counter_key, 'str'), - 'quotaPeriodKey': self._serialize.url("quota_period_key", quota_period_key, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'QuotaCounterValueContractProperties') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/region_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/region_operations.py deleted file mode 100644 index c57466505a4a..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/region_operations.py +++ /dev/null @@ -1,106 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class RegionOperations(object): - """RegionOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_service( - self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): - """Lists all azure regions in which the service exists. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of RegionContract - :rtype: - ~azure.mgmt.apimanagement.models.RegionContractPaged[~azure.mgmt.apimanagement.models.RegionContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_service.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.RegionContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.RegionContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/regions'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/reports_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/reports_operations.py deleted file mode 100644 index 1e238b46aa3f..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/reports_operations.py +++ /dev/null @@ -1,824 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ReportsOperations(object): - """ReportsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_api( - self, resource_group_name, service_name, filter, top=None, skip=None, orderby=None, custom_headers=None, raw=False, **operation_config): - """Lists report records by API. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param filter: The filter to apply on the operation. - :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param orderby: OData order by query option. - :type orderby: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ReportRecordContract - :rtype: - ~azure.mgmt.apimanagement.models.ReportRecordContractPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_api.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - if orderby is not None: - query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ReportRecordContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ReportRecordContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_api.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byApi'} - - def list_by_user( - self, resource_group_name, service_name, filter, top=None, skip=None, orderby=None, custom_headers=None, raw=False, **operation_config): - """Lists report records by User. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - timestamp | filter | ge, le | |
| displayName | select, - orderBy | | |
| userId | select, filter | eq | | -
| apiRegion | filter | eq | |
| productId | filter | eq - | |
| subscriptionId | filter | eq | |
| apiId | - filter | eq | |
| operationId | filter | eq | |
| - callCountSuccess | select, orderBy | | |
| - callCountBlocked | select, orderBy | | |
| - callCountFailed | select, orderBy | | |
| callCountOther - | select, orderBy | | |
| callCountTotal | select, - orderBy | | |
| bandwidth | select, orderBy | | | -
| cacheHitsCount | select | | |
| cacheMissCount | - select | | |
| apiTimeAvg | select, orderBy | | | -
| apiTimeMin | select | | |
| apiTimeMax | select | - | |
| serviceTimeAvg | select | | |
| - serviceTimeMin | select | | |
| serviceTimeMax | select | - | |
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param orderby: OData order by query option. - :type orderby: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ReportRecordContract - :rtype: - ~azure.mgmt.apimanagement.models.ReportRecordContractPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_user.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - if orderby is not None: - query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ReportRecordContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ReportRecordContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byUser'} - - def list_by_operation( - self, resource_group_name, service_name, filter, top=None, skip=None, orderby=None, custom_headers=None, raw=False, **operation_config): - """Lists report records by API Operations. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - timestamp | filter | ge, le | |
| displayName | select, - orderBy | | |
| apiRegion | filter | eq | |
| - userId | filter | eq | |
| productId | filter | eq | | -
| subscriptionId | filter | eq | |
| apiId | filter | eq - | |
| operationId | select, filter | eq | |
| - callCountSuccess | select, orderBy | | |
| - callCountBlocked | select, orderBy | | |
| - callCountFailed | select, orderBy | | |
| callCountOther - | select, orderBy | | |
| callCountTotal | select, - orderBy | | |
| bandwidth | select, orderBy | | | -
| cacheHitsCount | select | | |
| cacheMissCount | - select | | |
| apiTimeAvg | select, orderBy | | | -
| apiTimeMin | select | | |
| apiTimeMax | select | - | |
| serviceTimeAvg | select | | |
| - serviceTimeMin | select | | |
| serviceTimeMax | select | - | |
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param orderby: OData order by query option. - :type orderby: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ReportRecordContract - :rtype: - ~azure.mgmt.apimanagement.models.ReportRecordContractPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_operation.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - if orderby is not None: - query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ReportRecordContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ReportRecordContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byOperation'} - - def list_by_product( - self, resource_group_name, service_name, filter, top=None, skip=None, orderby=None, custom_headers=None, raw=False, **operation_config): - """Lists report records by Product. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - timestamp | filter | ge, le | |
| displayName | select, - orderBy | | |
| apiRegion | filter | eq | |
| - userId | filter | eq | |
| productId | select, filter | eq | - |
| subscriptionId | filter | eq | |
| callCountSuccess - | select, orderBy | | |
| callCountBlocked | select, - orderBy | | |
| callCountFailed | select, orderBy | | - |
| callCountOther | select, orderBy | | |
| - callCountTotal | select, orderBy | | |
| bandwidth | - select, orderBy | | |
| cacheHitsCount | select | | - |
| cacheMissCount | select | | |
| apiTimeAvg | - select, orderBy | | |
| apiTimeMin | select | | | -
| apiTimeMax | select | | |
| serviceTimeAvg | - select | | |
| serviceTimeMin | select | | | -
| serviceTimeMax | select | | |
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param orderby: OData order by query option. - :type orderby: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ReportRecordContract - :rtype: - ~azure.mgmt.apimanagement.models.ReportRecordContractPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_product.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - if orderby is not None: - query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ReportRecordContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ReportRecordContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_product.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byProduct'} - - def list_by_geo( - self, resource_group_name, service_name, filter, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists report records by geography. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - timestamp | filter | ge, le | |
| country | select | | - |
| region | select | | |
| zip | select | | - |
| apiRegion | filter | eq | |
| userId | filter | eq | - |
| productId | filter | eq | |
| subscriptionId | - filter | eq | |
| apiId | filter | eq | |
| - operationId | filter | eq | |
| callCountSuccess | select | - | |
| callCountBlocked | select | | |
| - callCountFailed | select | | |
| callCountOther | select - | | |
| bandwidth | select, orderBy | | |
| - cacheHitsCount | select | | |
| cacheMissCount | select | - | |
| apiTimeAvg | select | | |
| apiTimeMin | - select | | |
| apiTimeMax | select | | |
| - serviceTimeAvg | select | | |
| serviceTimeMin | select | - | |
| serviceTimeMax | select | | |
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ReportRecordContract - :rtype: - ~azure.mgmt.apimanagement.models.ReportRecordContractPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_geo.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ReportRecordContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ReportRecordContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_geo.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byGeo'} - - def list_by_subscription( - self, resource_group_name, service_name, filter, top=None, skip=None, orderby=None, custom_headers=None, raw=False, **operation_config): - """Lists report records by subscription. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - timestamp | filter | ge, le | |
| displayName | select, - orderBy | | |
| apiRegion | filter | eq | |
| - userId | select, filter | eq | |
| productId | select, filter - | eq | |
| subscriptionId | select, filter | eq | | -
| callCountSuccess | select, orderBy | | |
| - callCountBlocked | select, orderBy | | |
| - callCountFailed | select, orderBy | | |
| callCountOther - | select, orderBy | | |
| callCountTotal | select, - orderBy | | |
| bandwidth | select, orderBy | | | -
| cacheHitsCount | select | | |
| cacheMissCount | - select | | |
| apiTimeAvg | select, orderBy | | | -
| apiTimeMin | select | | |
| apiTimeMax | select | - | |
| serviceTimeAvg | select | | |
| - serviceTimeMin | select | | |
| serviceTimeMax | select | - | |
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param orderby: OData order by query option. - :type orderby: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ReportRecordContract - :rtype: - ~azure.mgmt.apimanagement.models.ReportRecordContractPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - if orderby is not None: - query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ReportRecordContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ReportRecordContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/bySubscription'} - - def list_by_time( - self, resource_group_name, service_name, filter, interval, top=None, skip=None, orderby=None, custom_headers=None, raw=False, **operation_config): - """Lists report records by Time. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - timestamp | filter, select | ge, le | |
| interval | select | - | |
| apiRegion | filter | eq | |
| userId | filter - | eq | |
| productId | filter | eq | |
| - subscriptionId | filter | eq | |
| apiId | filter | eq | - |
| operationId | filter | eq | |
| callCountSuccess | - select | | |
| callCountBlocked | select | | | -
| callCountFailed | select | | |
| callCountOther | - select | | |
| bandwidth | select, orderBy | | | -
| cacheHitsCount | select | | |
| cacheMissCount | - select | | |
| apiTimeAvg | select | | |
| - apiTimeMin | select | | |
| apiTimeMax | select | | - |
| serviceTimeAvg | select | | |
| serviceTimeMin | - select | | |
| serviceTimeMax | select | | | -
- :type filter: str - :param interval: By time interval. Interval must be multiple of 15 - minutes and may not be zero. The value should be in ISO 8601 format - (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be - used to convert TimeSpan to a valid interval string: - XmlConvert.ToString(new TimeSpan(hours, minutes, seconds)). - :type interval: timedelta - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param orderby: OData order by query option. - :type orderby: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ReportRecordContract - :rtype: - ~azure.mgmt.apimanagement.models.ReportRecordContractPaged[~azure.mgmt.apimanagement.models.ReportRecordContract] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_time.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - if orderby is not None: - query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') - query_parameters['interval'] = self._serialize.query("interval", interval, 'duration') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ReportRecordContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ReportRecordContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_time.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byTime'} - - def list_by_request( - self, resource_group_name, service_name, filter, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists report records by Request. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - timestamp | filter | ge, le | |
| apiId | filter | eq | | -
| operationId | filter | eq | |
| productId | filter | - eq | |
| userId | filter | eq | |
| apiRegion | - filter | eq | |
| subscriptionId | filter | eq | |
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of RequestReportRecordContract - :rtype: - ~azure.mgmt.apimanagement.models.RequestReportRecordContractPaged[~azure.mgmt.apimanagement.models.RequestReportRecordContract] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_request.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.RequestReportRecordContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.RequestReportRecordContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_request.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byRequest'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/sign_in_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/sign_in_settings_operations.py deleted file mode 100644 index c93a303527d2..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/sign_in_settings_operations.py +++ /dev/null @@ -1,297 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class SignInSettingsOperations(object): - """SignInSettingsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def get_entity_tag( - self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): - """Gets the entity state (Etag) version of the SignInSettings. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_entity_tag.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ - 'ETag': 'str', - }) - return client_raw_response - get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin'} - - def get( - self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): - """Get Sign In Settings for the Portal. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PortalSigninSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.PortalSigninSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('PortalSigninSettings', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin'} - - def update( - self, resource_group_name, service_name, if_match, enabled=None, custom_headers=None, raw=False, **operation_config): - """Update Sign-In settings. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param enabled: Redirect Anonymous users to the Sign-In page. - :type enabled: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - parameters = models.PortalSigninSettings(enabled=enabled) - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PortalSigninSettings') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin'} - - def create_or_update( - self, resource_group_name, service_name, if_match=None, enabled=None, custom_headers=None, raw=False, **operation_config): - """Create or Update Sign-In settings. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param if_match: ETag of the Entity. Not required when creating an - entity, but required when updating an entity. - :type if_match: str - :param enabled: Redirect Anonymous users to the Sign-In page. - :type enabled: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PortalSigninSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.PortalSigninSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - parameters = models.PortalSigninSettings(enabled=enabled) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PortalSigninSettings') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('PortalSigninSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/sign_up_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/sign_up_settings_operations.py deleted file mode 100644 index b8639ccaff81..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/sign_up_settings_operations.py +++ /dev/null @@ -1,303 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class SignUpSettingsOperations(object): - """SignUpSettingsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def get_entity_tag( - self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): - """Gets the entity state (Etag) version of the SignUpSettings. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_entity_tag.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ - 'ETag': 'str', - }) - return client_raw_response - get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup'} - - def get( - self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): - """Get Sign Up Settings for the Portal. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PortalSignupSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.PortalSignupSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('PortalSignupSettings', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup'} - - def update( - self, resource_group_name, service_name, if_match, enabled=None, terms_of_service=None, custom_headers=None, raw=False, **operation_config): - """Update Sign-Up settings. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param enabled: Allow users to sign up on a developer portal. - :type enabled: bool - :param terms_of_service: Terms of service contract properties. - :type terms_of_service: - ~azure.mgmt.apimanagement.models.TermsOfServiceProperties - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - parameters = models.PortalSignupSettings(enabled=enabled, terms_of_service=terms_of_service) - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PortalSignupSettings') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup'} - - def create_or_update( - self, resource_group_name, service_name, if_match=None, enabled=None, terms_of_service=None, custom_headers=None, raw=False, **operation_config): - """Create or Update Sign-Up settings. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param if_match: ETag of the Entity. Not required when creating an - entity, but required when updating an entity. - :type if_match: str - :param enabled: Allow users to sign up on a developer portal. - :type enabled: bool - :param terms_of_service: Terms of service contract properties. - :type terms_of_service: - ~azure.mgmt.apimanagement.models.TermsOfServiceProperties - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PortalSignupSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.PortalSignupSettings or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - parameters = models.PortalSignupSettings(enabled=enabled, terms_of_service=terms_of_service) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'PortalSignupSettings') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('PortalSignupSettings', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/subscription_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/subscription_operations.py deleted file mode 100644 index 848dd5ecd901..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/subscription_operations.py +++ /dev/null @@ -1,607 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class SubscriptionOperations(object): - """SubscriptionOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list( - self, resource_group_name, service_name, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists all subscriptions of the API Management service instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| displayName | filter | ge, le, eq, ne, - gt, lt | substringof, contains, startswith, endswith |
| - stateComment | filter | ge, le, eq, ne, gt, lt | substringof, - contains, startswith, endswith |
| ownerId | filter | ge, le, eq, - ne, gt, lt | substringof, contains, startswith, endswith |
| - scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt - | substringof, contains, startswith, endswith |
| productId | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| state | filter | eq | |
| user | expand | - | |
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SubscriptionContract - :rtype: - ~azure.mgmt.apimanagement.models.SubscriptionContractPaged[~azure.mgmt.apimanagement.models.SubscriptionContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.SubscriptionContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.SubscriptionContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions'} - - def get_entity_tag( - self, resource_group_name, service_name, sid, custom_headers=None, raw=False, **operation_config): - """Gets the entity state (Etag) version of the apimanagement subscription - specified by its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param sid: Subscription entity Identifier. The entity represents the - association between a user and a product in API Management. - :type sid: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_entity_tag.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'sid': self._serialize.url("sid", sid, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ - 'ETag': 'str', - }) - return client_raw_response - get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}'} - - def get( - self, resource_group_name, service_name, sid, custom_headers=None, raw=False, **operation_config): - """Gets the specified Subscription entity. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param sid: Subscription entity Identifier. The entity represents the - association between a user and a product in API Management. - :type sid: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SubscriptionContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'sid': self._serialize.url("sid", sid, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('SubscriptionContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}'} - - def create_or_update( - self, resource_group_name, service_name, sid, parameters, notify=None, if_match=None, custom_headers=None, raw=False, **operation_config): - """Creates or updates the subscription of specified user to the specified - product. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param sid: Subscription entity Identifier. The entity represents the - association between a user and a product in API Management. - :type sid: str - :param parameters: Create parameters. - :type parameters: - ~azure.mgmt.apimanagement.models.SubscriptionCreateParameters - :param notify: Notify change in Subscription State. - - If false, do not send any email notification for change of state of - subscription - - If true, send email notification of change of state of subscription - :type notify: bool - :param if_match: ETag of the Entity. Not required when creating an - entity, but required when updating an entity. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SubscriptionContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.SubscriptionContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'sid': self._serialize.url("sid", sid, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if notify is not None: - query_parameters['notify'] = self._serialize.query("notify", notify, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'SubscriptionCreateParameters') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('SubscriptionContract', response) - header_dict = { - 'ETag': 'str', - } - if response.status_code == 201: - deserialized = self._deserialize('SubscriptionContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}'} - - def update( - self, resource_group_name, service_name, sid, parameters, if_match, notify=None, custom_headers=None, raw=False, **operation_config): - """Updates the details of a subscription specified by its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param sid: Subscription entity Identifier. The entity represents the - association between a user and a product in API Management. - :type sid: str - :param parameters: Update parameters. - :type parameters: - ~azure.mgmt.apimanagement.models.SubscriptionUpdateParameters - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param notify: Notify change in Subscription State. - - If false, do not send any email notification for change of state of - subscription - - If true, send email notification of change of state of subscription - :type notify: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'sid': self._serialize.url("sid", sid, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if notify is not None: - query_parameters['notify'] = self._serialize.query("notify", notify, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'SubscriptionUpdateParameters') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}'} - - def delete( - self, resource_group_name, service_name, sid, if_match, custom_headers=None, raw=False, **operation_config): - """Deletes the specified subscription. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param sid: Subscription entity Identifier. The entity represents the - association between a user and a product in API Management. - :type sid: str - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'sid': self._serialize.url("sid", sid, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}'} - - def regenerate_primary_key( - self, resource_group_name, service_name, sid, custom_headers=None, raw=False, **operation_config): - """Regenerates primary key of existing subscription of the API Management - service instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param sid: Subscription entity Identifier. The entity represents the - association between a user and a product in API Management. - :type sid: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.regenerate_primary_key.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'sid': self._serialize.url("sid", sid, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - regenerate_primary_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/regeneratePrimaryKey'} - - def regenerate_secondary_key( - self, resource_group_name, service_name, sid, custom_headers=None, raw=False, **operation_config): - """Regenerates secondary key of existing subscription of the API - Management service instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param sid: Subscription entity Identifier. The entity represents the - association between a user and a product in API Management. - :type sid: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.regenerate_secondary_key.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'sid': self._serialize.url("sid", sid, 'str', max_length=256, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - regenerate_secondary_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/regenerateSecondaryKey'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/tag_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/tag_operations.py deleted file mode 100644 index 9c314c560929..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/tag_operations.py +++ /dev/null @@ -1,1586 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class TagOperations(object): - """TagOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_operation( - self, resource_group_name, service_name, api_id, operation_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists all Tags associated with the Operation. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be - unique in the current API Management service instance. - :type operation_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | - substringof, contains, startswith, endswith |
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TagContract - :rtype: - ~azure.mgmt.apimanagement.models.TagContractPaged[~azure.mgmt.apimanagement.models.TagContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_operation.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.TagContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.TagContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags'} - - def get_entity_state_by_operation( - self, resource_group_name, service_name, api_id, operation_id, tag_id, custom_headers=None, raw=False, **operation_config): - """Gets the entity state version of the tag specified by its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be - unique in the current API Management service instance. - :type operation_id: str - :param tag_id: Tag identifier. Must be unique in the current API - Management service instance. - :type tag_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_entity_state_by_operation.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ - 'ETag': 'str', - }) - return client_raw_response - get_entity_state_by_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}'} - - def get_by_operation( - self, resource_group_name, service_name, api_id, operation_id, tag_id, custom_headers=None, raw=False, **operation_config): - """Get tag associated with the Operation. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be - unique in the current API Management service instance. - :type operation_id: str - :param tag_id: Tag identifier. Must be unique in the current API - Management service instance. - :type tag_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TagContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.TagContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_by_operation.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('TagContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get_by_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}'} - - def assign_to_operation( - self, resource_group_name, service_name, api_id, operation_id, tag_id, custom_headers=None, raw=False, **operation_config): - """Assign tag to the Operation. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be - unique in the current API Management service instance. - :type operation_id: str - :param tag_id: Tag identifier. Must be unique in the current API - Management service instance. - :type tag_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TagContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.TagContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.assign_to_operation.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('TagContract', response) - if response.status_code == 201: - deserialized = self._deserialize('TagContract', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - assign_to_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}'} - - def detach_from_operation( - self, resource_group_name, service_name, api_id, operation_id, tag_id, custom_headers=None, raw=False, **operation_config): - """Detach the tag from the Operation. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param operation_id: Operation identifier within an API. Must be - unique in the current API Management service instance. - :type operation_id: str - :param tag_id: Tag identifier. Must be unique in the current API - Management service instance. - :type tag_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.detach_from_operation.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - detach_from_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}'} - - def list_by_api( - self, resource_group_name, service_name, api_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists all Tags associated with the API. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | - substringof, contains, startswith, endswith |
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TagContract - :rtype: - ~azure.mgmt.apimanagement.models.TagContractPaged[~azure.mgmt.apimanagement.models.TagContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_api.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.TagContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.TagContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_api.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags'} - - def get_entity_state_by_api( - self, resource_group_name, service_name, api_id, tag_id, custom_headers=None, raw=False, **operation_config): - """Gets the entity state version of the tag specified by its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param tag_id: Tag identifier. Must be unique in the current API - Management service instance. - :type tag_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_entity_state_by_api.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ - 'ETag': 'str', - }) - return client_raw_response - get_entity_state_by_api.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}'} - - def get_by_api( - self, resource_group_name, service_name, api_id, tag_id, custom_headers=None, raw=False, **operation_config): - """Get tag associated with the API. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param tag_id: Tag identifier. Must be unique in the current API - Management service instance. - :type tag_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TagContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.TagContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_by_api.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('TagContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get_by_api.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}'} - - def assign_to_api( - self, resource_group_name, service_name, api_id, tag_id, custom_headers=None, raw=False, **operation_config): - """Assign tag to the Api. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param tag_id: Tag identifier. Must be unique in the current API - Management service instance. - :type tag_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TagContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.TagContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.assign_to_api.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('TagContract', response) - header_dict = { - 'ETag': 'str', - } - if response.status_code == 201: - deserialized = self._deserialize('TagContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - assign_to_api.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}'} - - def detach_from_api( - self, resource_group_name, service_name, api_id, tag_id, custom_headers=None, raw=False, **operation_config): - """Detach the tag from the Api. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param api_id: API revision identifier. Must be unique in the current - API Management service instance. Non-current revision has ;rev=n as a - suffix where n is the revision number. - :type api_id: str - :param tag_id: Tag identifier. Must be unique in the current API - Management service instance. - :type tag_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.detach_from_api.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'apiId': self._serialize.url("api_id", api_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - detach_from_api.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}'} - - def list_by_product( - self, resource_group_name, service_name, product_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists all Tags associated with the Product. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current - API Management service instance. - :type product_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | - substringof, contains, startswith, endswith |
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TagContract - :rtype: - ~azure.mgmt.apimanagement.models.TagContractPaged[~azure.mgmt.apimanagement.models.TagContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_product.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.TagContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.TagContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_product.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags'} - - def get_entity_state_by_product( - self, resource_group_name, service_name, product_id, tag_id, custom_headers=None, raw=False, **operation_config): - """Gets the entity state version of the tag specified by its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current - API Management service instance. - :type product_id: str - :param tag_id: Tag identifier. Must be unique in the current API - Management service instance. - :type tag_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_entity_state_by_product.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ - 'ETag': 'str', - }) - return client_raw_response - get_entity_state_by_product.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}'} - - def get_by_product( - self, resource_group_name, service_name, product_id, tag_id, custom_headers=None, raw=False, **operation_config): - """Get tag associated with the Product. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current - API Management service instance. - :type product_id: str - :param tag_id: Tag identifier. Must be unique in the current API - Management service instance. - :type tag_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TagContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.TagContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_by_product.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('TagContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get_by_product.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}'} - - def assign_to_product( - self, resource_group_name, service_name, product_id, tag_id, custom_headers=None, raw=False, **operation_config): - """Assign tag to the Product. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current - API Management service instance. - :type product_id: str - :param tag_id: Tag identifier. Must be unique in the current API - Management service instance. - :type tag_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TagContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.TagContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.assign_to_product.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('TagContract', response) - if response.status_code == 201: - deserialized = self._deserialize('TagContract', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - assign_to_product.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}'} - - def detach_from_product( - self, resource_group_name, service_name, product_id, tag_id, custom_headers=None, raw=False, **operation_config): - """Detach the tag from the Product. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param product_id: Product identifier. Must be unique in the current - API Management service instance. - :type product_id: str - :param tag_id: Tag identifier. Must be unique in the current API - Management service instance. - :type tag_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.detach_from_product.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'productId': self._serialize.url("product_id", product_id, 'str', max_length=256, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - detach_from_product.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}'} - - def list_by_service( - self, resource_group_name, service_name, filter=None, top=None, skip=None, scope=None, custom_headers=None, raw=False, **operation_config): - """Lists a collection of tags defined within a service instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| displayName | filter | ge, le, eq, ne, - gt, lt | substringof, contains, startswith, endswith |
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param scope: Scope like 'apis', 'products' or 'apis/{apiId} - :type scope: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TagContract - :rtype: - ~azure.mgmt.apimanagement.models.TagContractPaged[~azure.mgmt.apimanagement.models.TagContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_service.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - if scope is not None: - query_parameters['scope'] = self._serialize.query("scope", scope, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.TagContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.TagContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags'} - - def get_entity_state( - self, resource_group_name, service_name, tag_id, custom_headers=None, raw=False, **operation_config): - """Gets the entity state version of the tag specified by its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API - Management service instance. - :type tag_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_entity_state.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ - 'ETag': 'str', - }) - return client_raw_response - get_entity_state.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}'} - - def get( - self, resource_group_name, service_name, tag_id, custom_headers=None, raw=False, **operation_config): - """Gets the details of the tag specified by its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API - Management service instance. - :type tag_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TagContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.TagContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('TagContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}'} - - def create_or_update( - self, resource_group_name, service_name, tag_id, display_name, if_match=None, custom_headers=None, raw=False, **operation_config): - """Creates a tag. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API - Management service instance. - :type tag_id: str - :param display_name: Tag name. - :type display_name: str - :param if_match: ETag of the Entity. Not required when creating an - entity, but required when updating an entity. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TagContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.TagContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - parameters = models.TagCreateUpdateParameters(display_name=display_name) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TagCreateUpdateParameters') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('TagContract', response) - header_dict = { - 'ETag': 'str', - } - if response.status_code == 201: - deserialized = self._deserialize('TagContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}'} - - def update( - self, resource_group_name, service_name, tag_id, if_match, display_name, custom_headers=None, raw=False, **operation_config): - """Updates the details of the tag specified by its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API - Management service instance. - :type tag_id: str - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param display_name: Tag name. - :type display_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - parameters = models.TagCreateUpdateParameters(display_name=display_name) - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'TagCreateUpdateParameters') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}'} - - def delete( - self, resource_group_name, service_name, tag_id, if_match, custom_headers=None, raw=False, **operation_config): - """Deletes specific tag of the API Management service instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param tag_id: Tag identifier. Must be unique in the current API - Management service instance. - :type tag_id: str - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'tagId': self._serialize.url("tag_id", tag_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/tag_resource_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/tag_resource_operations.py deleted file mode 100644 index 4fb092521714..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/tag_resource_operations.py +++ /dev/null @@ -1,138 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class TagResourceOperations(object): - """TagResourceOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_service( - self, resource_group_name, service_name, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists a collection of resources associated with tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - aid | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | - substringof, contains, startswith, endswith |
| displayName | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| apiName | filter | ge, le, eq, ne, gt, lt | - substringof, contains, startswith, endswith |
| apiRevision | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| path | filter | ge, le, eq, ne, gt, lt | - substringof, contains, startswith, endswith |
| description | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | - substringof, contains, startswith, endswith |
| method | filter | - ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, - contains, startswith, endswith |
| terms | filter | ge, le, eq, - ne, gt, lt | substringof, contains, startswith, endswith |
| - state | filter | eq | |
| isCurrent | filter | eq | | -
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TagResourceContract - :rtype: - ~azure.mgmt.apimanagement.models.TagResourceContractPaged[~azure.mgmt.apimanagement.models.TagResourceContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_service.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.TagResourceContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.TagResourceContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tagResources'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/tenant_access_git_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/tenant_access_git_operations.py deleted file mode 100644 index 84740f7e47f6..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/tenant_access_git_operations.py +++ /dev/null @@ -1,212 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class TenantAccessGitOperations(object): - """TenantAccessGitOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - :ivar access_name: The identifier of the Access configuration. Constant value: "access". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - self.access_name = "access" - - self.config = config - - def get( - self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): - """Gets the Git access configuration for the tenant. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AccessInformationContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.AccessInformationContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'accessName': self._serialize.url("self.access_name", self.access_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('AccessInformationContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/git'} - - def regenerate_primary_key( - self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): - """Regenerate primary access key for GIT. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.regenerate_primary_key.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'accessName': self._serialize.url("self.access_name", self.access_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - regenerate_primary_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/git/regeneratePrimaryKey'} - - def regenerate_secondary_key( - self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): - """Regenerate secondary access key for GIT. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.regenerate_secondary_key.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'accessName': self._serialize.url("self.access_name", self.access_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - regenerate_secondary_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/git/regenerateSecondaryKey'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/tenant_access_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/tenant_access_operations.py deleted file mode 100644 index 3c7deb2493c9..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/tenant_access_operations.py +++ /dev/null @@ -1,334 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class TenantAccessOperations(object): - """TenantAccessOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - :ivar access_name: The identifier of the Access configuration. Constant value: "access". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - self.access_name = "access" - - self.config = config - - def get_entity_tag( - self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): - """Tenant access metadata. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_entity_tag.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'accessName': self._serialize.url("self.access_name", self.access_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ - 'ETag': 'str', - }) - return client_raw_response - get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}'} - - def get( - self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): - """Get tenant access information details. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AccessInformationContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.AccessInformationContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'accessName': self._serialize.url("self.access_name", self.access_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('AccessInformationContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}'} - - def update( - self, resource_group_name, service_name, if_match, enabled=None, custom_headers=None, raw=False, **operation_config): - """Update tenant access information details. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param enabled: Determines whether direct access is enabled. - :type enabled: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - parameters = models.AccessInformationUpdateParameters(enabled=enabled) - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'accessName': self._serialize.url("self.access_name", self.access_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'AccessInformationUpdateParameters') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}'} - - def regenerate_primary_key( - self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): - """Regenerate primary access key. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.regenerate_primary_key.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'accessName': self._serialize.url("self.access_name", self.access_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - regenerate_primary_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/regeneratePrimaryKey'} - - def regenerate_secondary_key( - self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): - """Regenerate secondary access key. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.regenerate_secondary_key.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'accessName': self._serialize.url("self.access_name", self.access_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - regenerate_secondary_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/regenerateSecondaryKey'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/tenant_configuration_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/tenant_configuration_operations.py deleted file mode 100644 index 7b4a9bf37a4d..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/tenant_configuration_operations.py +++ /dev/null @@ -1,435 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class TenantConfigurationOperations(object): - """TenantConfigurationOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - :ivar configuration_name: The identifier of the Git Configuration Operation. Constant value: "configuration". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - self.configuration_name = "configuration" - - self.config = config - - - def _deploy_initial( - self, resource_group_name, service_name, branch, force=None, custom_headers=None, raw=False, **operation_config): - parameters = models.DeployConfigurationParameters(branch=branch, force=force) - - # Construct URL - url = self.deploy.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'configurationName': self._serialize.url("self.configuration_name", self.configuration_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'DeployConfigurationParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationResultContract', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def deploy( - self, resource_group_name, service_name, branch, force=None, custom_headers=None, raw=False, polling=True, **operation_config): - """This operation applies changes from the specified Git branch to the - configuration database. This is a long running operation and could take - several minutes to complete. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param branch: The name of the Git branch from which the configuration - is to be deployed to the configuration database. - :type branch: str - :param force: The value enforcing deleting subscriptions to products - that are deleted in this update. - :type force: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationResultContract - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.apimanagement.models.OperationResultContract] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.apimanagement.models.OperationResultContract]] - :raises: - :class:`ErrorResponseException` - """ - raw_result = self._deploy_initial( - resource_group_name=resource_group_name, - service_name=service_name, - branch=branch, - force=force, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationResultContract', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - deploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/deploy'} - - - def _save_initial( - self, resource_group_name, service_name, branch, force=None, custom_headers=None, raw=False, **operation_config): - parameters = models.SaveConfigurationParameter(branch=branch, force=force) - - # Construct URL - url = self.save.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'configurationName': self._serialize.url("self.configuration_name", self.configuration_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'SaveConfigurationParameter') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationResultContract', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def save( - self, resource_group_name, service_name, branch, force=None, custom_headers=None, raw=False, polling=True, **operation_config): - """This operation creates a commit with the current configuration snapshot - to the specified branch in the repository. This is a long running - operation and could take several minutes to complete. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param branch: The name of the Git branch in which to commit the - current configuration snapshot. - :type branch: str - :param force: The value if true, the current configuration database is - committed to the Git repository, even if the Git repository has newer - changes that would be overwritten. - :type force: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationResultContract - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.apimanagement.models.OperationResultContract] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.apimanagement.models.OperationResultContract]] - :raises: - :class:`ErrorResponseException` - """ - raw_result = self._save_initial( - resource_group_name=resource_group_name, - service_name=service_name, - branch=branch, - force=force, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationResultContract', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - save.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/save'} - - - def _validate_initial( - self, resource_group_name, service_name, branch, force=None, custom_headers=None, raw=False, **operation_config): - parameters = models.DeployConfigurationParameters(branch=branch, force=force) - - # Construct URL - url = self.validate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'configurationName': self._serialize.url("self.configuration_name", self.configuration_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'DeployConfigurationParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationResultContract', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def validate( - self, resource_group_name, service_name, branch, force=None, custom_headers=None, raw=False, polling=True, **operation_config): - """This operation validates the changes in the specified Git branch. This - is a long running operation and could take several minutes to complete. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param branch: The name of the Git branch from which the configuration - is to be deployed to the configuration database. - :type branch: str - :param force: The value enforcing deleting subscriptions to products - that are deleted in this update. - :type force: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationResultContract - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.apimanagement.models.OperationResultContract] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.apimanagement.models.OperationResultContract]] - :raises: - :class:`ErrorResponseException` - """ - raw_result = self._validate_initial( - resource_group_name=resource_group_name, - service_name=service_name, - branch=branch, - force=force, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('OperationResultContract', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/validate'} - - def get_sync_state( - self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): - """Gets the status of the most recent synchronization between the - configuration database and the Git repository. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TenantConfigurationSyncStateContract or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.apimanagement.models.TenantConfigurationSyncStateContract - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_sync_state.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'configurationName': self._serialize.url("self.configuration_name", self.configuration_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('TenantConfigurationSyncStateContract', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_sync_state.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/syncState'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/user_confirmation_password_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/user_confirmation_password_operations.py deleted file mode 100644 index faa76b03f4d2..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/user_confirmation_password_operations.py +++ /dev/null @@ -1,93 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class UserConfirmationPasswordOperations(object): - """UserConfirmationPasswordOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def send( - self, resource_group_name, service_name, user_id, custom_headers=None, raw=False, **operation_config): - """Sends confirmation. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API - Management service instance. - :type user_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.send.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - send.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/confirmations/password/send'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/user_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/user_group_operations.py deleted file mode 100644 index d43a29185134..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/user_group_operations.py +++ /dev/null @@ -1,129 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class UserGroupOperations(object): - """UserGroupOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list( - self, resource_group_name, service_name, user_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists all user groups. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API - Management service instance. - :type user_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| displayName | filter | ge, le, eq, ne, - gt, lt | substringof, contains, startswith, endswith |
| - description | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of GroupContract - :rtype: - ~azure.mgmt.apimanagement.models.GroupContractPaged[~azure.mgmt.apimanagement.models.GroupContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.GroupContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.GroupContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/groups'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/user_identities_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/user_identities_operations.py deleted file mode 100644 index 6a9ce0a5b8e2..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/user_identities_operations.py +++ /dev/null @@ -1,110 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class UserIdentitiesOperations(object): - """UserIdentitiesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list( - self, resource_group_name, service_name, user_id, custom_headers=None, raw=False, **operation_config): - """List of all user identities. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API - Management service instance. - :type user_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of UserIdentityContract - :rtype: - ~azure.mgmt.apimanagement.models.UserIdentityContractPaged[~azure.mgmt.apimanagement.models.UserIdentityContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.UserIdentityContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.UserIdentityContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/identities'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/user_operations.py deleted file mode 100644 index 79e55902d2e5..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/user_operations.py +++ /dev/null @@ -1,634 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class UserOperations(object): - """UserOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_service( - self, resource_group_name, service_name, filter=None, top=None, skip=None, expand_groups=None, custom_headers=None, raw=False, **operation_config): - """Lists a collection of registered users in the specified service - instance. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| firstName | filter | ge, le, eq, ne, gt, - lt | substringof, contains, startswith, endswith |
| lastName | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
| email | filter | ge, le, eq, ne, gt, lt | - substringof, contains, startswith, endswith |
| state | filter | - eq | |
| registrationDate | filter | ge, le, eq, ne, gt, lt | - |
| note | filter | ge, le, eq, ne, gt, lt | substringof, - contains, startswith, endswith |
| groups | expand | | | -
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param expand_groups: Detailed Group in response. - :type expand_groups: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of UserContract - :rtype: - ~azure.mgmt.apimanagement.models.UserContractPaged[~azure.mgmt.apimanagement.models.UserContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_service.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - if expand_groups is not None: - query_parameters['expandGroups'] = self._serialize.query("expand_groups", expand_groups, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.UserContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.UserContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users'} - - def get_entity_tag( - self, resource_group_name, service_name, user_id, custom_headers=None, raw=False, **operation_config): - """Gets the entity state (Etag) version of the user specified by its - identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API - Management service instance. - :type user_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_entity_tag.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.head(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ - 'ETag': 'str', - }) - return client_raw_response - get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}'} - - def get( - self, resource_group_name, service_name, user_id, custom_headers=None, raw=False, **operation_config): - """Gets the details of the user specified by its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API - Management service instance. - :type user_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: UserContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.UserContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('UserContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}'} - - def create_or_update( - self, resource_group_name, service_name, user_id, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): - """Creates or Updates a user. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API - Management service instance. - :type user_id: str - :param parameters: Create or update parameters. - :type parameters: - ~azure.mgmt.apimanagement.models.UserCreateParameters - :param if_match: ETag of the Entity. Not required when creating an - entity, but required when updating an entity. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: UserContract or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.UserContract or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'UserCreateParameters') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('UserContract', response) - header_dict = { - 'ETag': 'str', - } - if response.status_code == 201: - deserialized = self._deserialize('UserContract', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}'} - - def update( - self, resource_group_name, service_name, user_id, parameters, if_match, custom_headers=None, raw=False, **operation_config): - """Updates the details of the user specified by its identifier. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API - Management service instance. - :type user_id: str - :param parameters: Update parameters. - :type parameters: - ~azure.mgmt.apimanagement.models.UserUpdateParameters - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'UserUpdateParameters') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}'} - - def delete( - self, resource_group_name, service_name, user_id, if_match, delete_subscriptions=None, notify=None, custom_headers=None, raw=False, **operation_config): - """Deletes specific user. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API - Management service instance. - :type user_id: str - :param if_match: ETag of the Entity. ETag should match the current - entity state from the header response of the GET request or it should - be * for unconditional update. - :type if_match: str - :param delete_subscriptions: Whether to delete user's subscription or - not. - :type delete_subscriptions: bool - :param notify: Send an Account Closed Email notification to the User. - :type notify: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if delete_subscriptions is not None: - query_parameters['deleteSubscriptions'] = self._serialize.query("delete_subscriptions", delete_subscriptions, 'bool') - if notify is not None: - query_parameters['notify'] = self._serialize.query("notify", notify, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}'} - - def generate_sso_url( - self, resource_group_name, service_name, user_id, custom_headers=None, raw=False, **operation_config): - """Retrieves a redirection URL containing an authentication token for - signing a given user into the developer portal. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API - Management service instance. - :type user_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: GenerateSsoUrlResult or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.GenerateSsoUrlResult or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.generate_sso_url.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('GenerateSsoUrlResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - generate_sso_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/generateSsoUrl'} - - def get_shared_access_token( - self, resource_group_name, service_name, user_id, expiry, key_type="primary", custom_headers=None, raw=False, **operation_config): - """Gets the Shared Access Authorization Token for the User. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API - Management service instance. - :type user_id: str - :param key_type: The Key to be used to generate token for user. - Possible values include: 'primary', 'secondary' - :type key_type: str or ~azure.mgmt.apimanagement.models.KeyType - :param expiry: The Expiry time of the Token. Maximum token expiry time - is set to 30 days. The date conforms to the following format: - `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - :type expiry: datetime - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: UserTokenResult or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.apimanagement.models.UserTokenResult or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - parameters = models.UserTokenParameters(key_type=key_type, expiry=expiry) - - # Construct URL - url = self.get_shared_access_token.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'UserTokenParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('UserTokenResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_shared_access_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/token'} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/user_subscription_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/user_subscription_operations.py deleted file mode 100644 index bf2802f5bab9..000000000000 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/user_subscription_operations.py +++ /dev/null @@ -1,135 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class UserSubscriptionOperations(object): - """UserSubscriptionOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list( - self, resource_group_name, service_name, user_id, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists the collection of subscriptions of the specified user. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param service_name: The name of the API Management service. - :type service_name: str - :param user_id: User identifier. Must be unique in the current API - Management service instance. - :type user_id: str - :param filter: | Field | Usage | Supported operators - | Supported functions - |
|-------------|-------------|-------------|-------------|
| - name | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| displayName | filter | ge, le, eq, ne, - gt, lt | substringof, contains, startswith, endswith |
| - stateComment | filter | ge, le, eq, ne, gt, lt | substringof, - contains, startswith, endswith |
| ownerId | filter | ge, le, eq, - ne, gt, lt | substringof, contains, startswith, endswith |
| - scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, - startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt - | substringof, contains, startswith, endswith |
| productId | - filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, - endswith |
- :type filter: str - :param top: Number of records to return. - :type top: int - :param skip: Number of records to skip. - :type skip: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SubscriptionContract - :rtype: - ~azure.mgmt.apimanagement.models.SubscriptionContractPaged[~azure.mgmt.apimanagement.models.SubscriptionContract] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'userId': self._serialize.url("user_id", user_id, 'str', max_length=80, min_length=1, pattern=r'^[^*#&+:<>?]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.SubscriptionContractPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.SubscriptionContractPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/subscriptions'} diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/__init__.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/__init__.py index e33c5d13ed59..298512941d91 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/__init__.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .application_insights_management_client import ApplicationInsightsManagementClient -from .version import VERSION +from ._configuration import ApplicationInsightsManagementClientConfiguration +from ._application_insights_management_client import ApplicationInsightsManagementClient +__all__ = ['ApplicationInsightsManagementClient', 'ApplicationInsightsManagementClientConfiguration'] -__all__ = ['ApplicationInsightsManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/_application_insights_management_client.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/_application_insights_management_client.py new file mode 100644 index 000000000000..4e1c954eab27 --- /dev/null +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/_application_insights_management_client.py @@ -0,0 +1,124 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import ApplicationInsightsManagementClientConfiguration +from .operations import Operations +from .operations import AnnotationsOperations +from .operations import APIKeysOperations +from .operations import ExportConfigurationsOperations +from .operations import ComponentCurrentBillingFeaturesOperations +from .operations import ComponentQuotaStatusOperations +from .operations import ComponentFeatureCapabilitiesOperations +from .operations import ComponentAvailableFeaturesOperations +from .operations import ProactiveDetectionConfigurationsOperations +from .operations import ComponentsOperations +from .operations import WorkItemConfigurationsOperations +from .operations import FavoritesOperations +from .operations import WebTestLocationsOperations +from .operations import WebTestsOperations +from .operations import AnalyticsItemsOperations +from .operations import WorkbooksOperations +from . import models + + +class ApplicationInsightsManagementClient(SDKClient): + """Composite Swagger for Application Insights Management Client + + :ivar config: Configuration for client. + :vartype config: ApplicationInsightsManagementClientConfiguration + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.applicationinsights.operations.Operations + :ivar annotations: Annotations operations + :vartype annotations: azure.mgmt.applicationinsights.operations.AnnotationsOperations + :ivar api_keys: APIKeys operations + :vartype api_keys: azure.mgmt.applicationinsights.operations.APIKeysOperations + :ivar export_configurations: ExportConfigurations operations + :vartype export_configurations: azure.mgmt.applicationinsights.operations.ExportConfigurationsOperations + :ivar component_current_billing_features: ComponentCurrentBillingFeatures operations + :vartype component_current_billing_features: azure.mgmt.applicationinsights.operations.ComponentCurrentBillingFeaturesOperations + :ivar component_quota_status: ComponentQuotaStatus operations + :vartype component_quota_status: azure.mgmt.applicationinsights.operations.ComponentQuotaStatusOperations + :ivar component_feature_capabilities: ComponentFeatureCapabilities operations + :vartype component_feature_capabilities: azure.mgmt.applicationinsights.operations.ComponentFeatureCapabilitiesOperations + :ivar component_available_features: ComponentAvailableFeatures operations + :vartype component_available_features: azure.mgmt.applicationinsights.operations.ComponentAvailableFeaturesOperations + :ivar proactive_detection_configurations: ProactiveDetectionConfigurations operations + :vartype proactive_detection_configurations: azure.mgmt.applicationinsights.operations.ProactiveDetectionConfigurationsOperations + :ivar components: Components operations + :vartype components: azure.mgmt.applicationinsights.operations.ComponentsOperations + :ivar work_item_configurations: WorkItemConfigurations operations + :vartype work_item_configurations: azure.mgmt.applicationinsights.operations.WorkItemConfigurationsOperations + :ivar favorites: Favorites operations + :vartype favorites: azure.mgmt.applicationinsights.operations.FavoritesOperations + :ivar web_test_locations: WebTestLocations operations + :vartype web_test_locations: azure.mgmt.applicationinsights.operations.WebTestLocationsOperations + :ivar web_tests: WebTests operations + :vartype web_tests: azure.mgmt.applicationinsights.operations.WebTestsOperations + :ivar analytics_items: AnalyticsItems operations + :vartype analytics_items: azure.mgmt.applicationinsights.operations.AnalyticsItemsOperations + :ivar workbooks: Workbooks operations + :vartype workbooks: azure.mgmt.applicationinsights.operations.WorkbooksOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = ApplicationInsightsManagementClientConfiguration(credentials, subscription_id, base_url) + super(ApplicationInsightsManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2015-05-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.annotations = AnnotationsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.api_keys = APIKeysOperations( + self._client, self.config, self._serialize, self._deserialize) + self.export_configurations = ExportConfigurationsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.component_current_billing_features = ComponentCurrentBillingFeaturesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.component_quota_status = ComponentQuotaStatusOperations( + self._client, self.config, self._serialize, self._deserialize) + self.component_feature_capabilities = ComponentFeatureCapabilitiesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.component_available_features = ComponentAvailableFeaturesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.proactive_detection_configurations = ProactiveDetectionConfigurationsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.components = ComponentsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.work_item_configurations = WorkItemConfigurationsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.favorites = FavoritesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.web_test_locations = WebTestLocationsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.web_tests = WebTestsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.analytics_items = AnalyticsItemsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.workbooks = WorkbooksOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/_configuration.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/_configuration.py new file mode 100644 index 000000000000..6c855295a4b1 --- /dev/null +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/_configuration.py @@ -0,0 +1,48 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class ApplicationInsightsManagementClientConfiguration(AzureConfiguration): + """Configuration for ApplicationInsightsManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(ApplicationInsightsManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-applicationinsights/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/application_insights_management_client.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/application_insights_management_client.py deleted file mode 100644 index 58f40abf1c0d..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/application_insights_management_client.py +++ /dev/null @@ -1,156 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.operations import Operations -from .operations.annotations_operations import AnnotationsOperations -from .operations.api_keys_operations import APIKeysOperations -from .operations.export_configurations_operations import ExportConfigurationsOperations -from .operations.component_current_billing_features_operations import ComponentCurrentBillingFeaturesOperations -from .operations.component_quota_status_operations import ComponentQuotaStatusOperations -from .operations.component_feature_capabilities_operations import ComponentFeatureCapabilitiesOperations -from .operations.component_available_features_operations import ComponentAvailableFeaturesOperations -from .operations.proactive_detection_configurations_operations import ProactiveDetectionConfigurationsOperations -from .operations.components_operations import ComponentsOperations -from .operations.work_item_configurations_operations import WorkItemConfigurationsOperations -from .operations.favorites_operations import FavoritesOperations -from .operations.web_test_locations_operations import WebTestLocationsOperations -from .operations.web_tests_operations import WebTestsOperations -from .operations.analytics_items_operations import AnalyticsItemsOperations -from .operations.workbooks_operations import WorkbooksOperations -from . import models - - -class ApplicationInsightsManagementClientConfiguration(AzureConfiguration): - """Configuration for ApplicationInsightsManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The ID of the target subscription. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ApplicationInsightsManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-applicationinsights/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class ApplicationInsightsManagementClient(SDKClient): - """Composite Swagger for Application Insights Management Client - - :ivar config: Configuration for client. - :vartype config: ApplicationInsightsManagementClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.applicationinsights.operations.Operations - :ivar annotations: Annotations operations - :vartype annotations: azure.mgmt.applicationinsights.operations.AnnotationsOperations - :ivar api_keys: APIKeys operations - :vartype api_keys: azure.mgmt.applicationinsights.operations.APIKeysOperations - :ivar export_configurations: ExportConfigurations operations - :vartype export_configurations: azure.mgmt.applicationinsights.operations.ExportConfigurationsOperations - :ivar component_current_billing_features: ComponentCurrentBillingFeatures operations - :vartype component_current_billing_features: azure.mgmt.applicationinsights.operations.ComponentCurrentBillingFeaturesOperations - :ivar component_quota_status: ComponentQuotaStatus operations - :vartype component_quota_status: azure.mgmt.applicationinsights.operations.ComponentQuotaStatusOperations - :ivar component_feature_capabilities: ComponentFeatureCapabilities operations - :vartype component_feature_capabilities: azure.mgmt.applicationinsights.operations.ComponentFeatureCapabilitiesOperations - :ivar component_available_features: ComponentAvailableFeatures operations - :vartype component_available_features: azure.mgmt.applicationinsights.operations.ComponentAvailableFeaturesOperations - :ivar proactive_detection_configurations: ProactiveDetectionConfigurations operations - :vartype proactive_detection_configurations: azure.mgmt.applicationinsights.operations.ProactiveDetectionConfigurationsOperations - :ivar components: Components operations - :vartype components: azure.mgmt.applicationinsights.operations.ComponentsOperations - :ivar work_item_configurations: WorkItemConfigurations operations - :vartype work_item_configurations: azure.mgmt.applicationinsights.operations.WorkItemConfigurationsOperations - :ivar favorites: Favorites operations - :vartype favorites: azure.mgmt.applicationinsights.operations.FavoritesOperations - :ivar web_test_locations: WebTestLocations operations - :vartype web_test_locations: azure.mgmt.applicationinsights.operations.WebTestLocationsOperations - :ivar web_tests: WebTests operations - :vartype web_tests: azure.mgmt.applicationinsights.operations.WebTestsOperations - :ivar analytics_items: AnalyticsItems operations - :vartype analytics_items: azure.mgmt.applicationinsights.operations.AnalyticsItemsOperations - :ivar workbooks: Workbooks operations - :vartype workbooks: azure.mgmt.applicationinsights.operations.WorkbooksOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The ID of the target subscription. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ApplicationInsightsManagementClientConfiguration(credentials, subscription_id, base_url) - super(ApplicationInsightsManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2015-05-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.annotations = AnnotationsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.api_keys = APIKeysOperations( - self._client, self.config, self._serialize, self._deserialize) - self.export_configurations = ExportConfigurationsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.component_current_billing_features = ComponentCurrentBillingFeaturesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.component_quota_status = ComponentQuotaStatusOperations( - self._client, self.config, self._serialize, self._deserialize) - self.component_feature_capabilities = ComponentFeatureCapabilitiesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.component_available_features = ComponentAvailableFeaturesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.proactive_detection_configurations = ProactiveDetectionConfigurationsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.components = ComponentsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.work_item_configurations = WorkItemConfigurationsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.favorites = FavoritesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.web_test_locations = WebTestLocationsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.web_tests = WebTestsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.analytics_items = AnalyticsItemsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.workbooks = WorkbooksOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/__init__.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/__init__.py index 6045835ff520..365ec81680ea 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/__init__.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/__init__.py @@ -10,100 +10,100 @@ # -------------------------------------------------------------------------- try: - from .error_response_py3 import ErrorResponse, ErrorResponseException - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .annotation_py3 import Annotation - from .inner_error_py3 import InnerError - from .annotation_error_py3 import AnnotationError, AnnotationErrorException - from .api_key_request_py3 import APIKeyRequest - from .application_insights_component_api_key_py3 import ApplicationInsightsComponentAPIKey - from .application_insights_component_export_request_py3 import ApplicationInsightsComponentExportRequest - from .application_insights_component_export_configuration_py3 import ApplicationInsightsComponentExportConfiguration - from .application_insights_component_data_volume_cap_py3 import ApplicationInsightsComponentDataVolumeCap - from .application_insights_component_billing_features_py3 import ApplicationInsightsComponentBillingFeatures - from .application_insights_component_quota_status_py3 import ApplicationInsightsComponentQuotaStatus - from .application_insights_component_feature_capabilities_py3 import ApplicationInsightsComponentFeatureCapabilities - from .application_insights_component_feature_capability_py3 import ApplicationInsightsComponentFeatureCapability - from .application_insights_component_feature_py3 import ApplicationInsightsComponentFeature - from .application_insights_component_available_features_py3 import ApplicationInsightsComponentAvailableFeatures - from .application_insights_component_proactive_detection_configuration_rule_definitions_py3 import ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions - from .application_insights_component_proactive_detection_configuration_py3 import ApplicationInsightsComponentProactiveDetectionConfiguration - from .components_resource_py3 import ComponentsResource - from .tags_resource_py3 import TagsResource - from .application_insights_component_py3 import ApplicationInsightsComponent - from .component_purge_body_filters_py3 import ComponentPurgeBodyFilters - from .component_purge_body_py3 import ComponentPurgeBody - from .component_purge_response_py3 import ComponentPurgeResponse - from .component_purge_status_response_py3 import ComponentPurgeStatusResponse - from .work_item_configuration_py3 import WorkItemConfiguration - from .work_item_create_configuration_py3 import WorkItemCreateConfiguration - from .work_item_configuration_error_py3 import WorkItemConfigurationError, WorkItemConfigurationErrorException - from .application_insights_component_favorite_py3 import ApplicationInsightsComponentFavorite - from .application_insights_component_web_test_location_py3 import ApplicationInsightsComponentWebTestLocation - from .webtests_resource_py3 import WebtestsResource - from .web_test_geolocation_py3 import WebTestGeolocation - from .web_test_properties_configuration_py3 import WebTestPropertiesConfiguration - from .web_test_py3 import WebTest - from .application_insights_component_analytics_item_properties_py3 import ApplicationInsightsComponentAnalyticsItemProperties - from .application_insights_component_analytics_item_py3 import ApplicationInsightsComponentAnalyticsItem - from .workbook_resource_py3 import WorkbookResource - from .workbook_py3 import Workbook - from .link_properties_py3 import LinkProperties - from .error_field_contract_py3 import ErrorFieldContract - from .workbook_error_py3 import WorkbookError, WorkbookErrorException + from ._models_py3 import Annotation + from ._models_py3 import AnnotationError, AnnotationErrorException + from ._models_py3 import APIKeyRequest + from ._models_py3 import ApplicationInsightsComponent + from ._models_py3 import ApplicationInsightsComponentAnalyticsItem + from ._models_py3 import ApplicationInsightsComponentAnalyticsItemProperties + from ._models_py3 import ApplicationInsightsComponentAPIKey + from ._models_py3 import ApplicationInsightsComponentAvailableFeatures + from ._models_py3 import ApplicationInsightsComponentBillingFeatures + from ._models_py3 import ApplicationInsightsComponentDataVolumeCap + from ._models_py3 import ApplicationInsightsComponentExportConfiguration + from ._models_py3 import ApplicationInsightsComponentExportRequest + from ._models_py3 import ApplicationInsightsComponentFavorite + from ._models_py3 import ApplicationInsightsComponentFeature + from ._models_py3 import ApplicationInsightsComponentFeatureCapabilities + from ._models_py3 import ApplicationInsightsComponentFeatureCapability + from ._models_py3 import ApplicationInsightsComponentProactiveDetectionConfiguration + from ._models_py3 import ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions + from ._models_py3 import ApplicationInsightsComponentQuotaStatus + from ._models_py3 import ApplicationInsightsComponentWebTestLocation + from ._models_py3 import ComponentPurgeBody + from ._models_py3 import ComponentPurgeBodyFilters + from ._models_py3 import ComponentPurgeResponse + from ._models_py3 import ComponentPurgeStatusResponse + from ._models_py3 import ComponentsResource + from ._models_py3 import ErrorFieldContract + from ._models_py3 import ErrorResponse, ErrorResponseException + from ._models_py3 import InnerError + from ._models_py3 import LinkProperties + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import TagsResource + from ._models_py3 import WebTest + from ._models_py3 import WebTestGeolocation + from ._models_py3 import WebTestPropertiesConfiguration + from ._models_py3 import WebtestsResource + from ._models_py3 import Workbook + from ._models_py3 import WorkbookError, WorkbookErrorException + from ._models_py3 import WorkbookResource + from ._models_py3 import WorkItemConfiguration + from ._models_py3 import WorkItemConfigurationError, WorkItemConfigurationErrorException + from ._models_py3 import WorkItemCreateConfiguration except (SyntaxError, ImportError): - from .error_response import ErrorResponse, ErrorResponseException - from .operation_display import OperationDisplay - from .operation import Operation - from .annotation import Annotation - from .inner_error import InnerError - from .annotation_error import AnnotationError, AnnotationErrorException - from .api_key_request import APIKeyRequest - from .application_insights_component_api_key import ApplicationInsightsComponentAPIKey - from .application_insights_component_export_request import ApplicationInsightsComponentExportRequest - from .application_insights_component_export_configuration import ApplicationInsightsComponentExportConfiguration - from .application_insights_component_data_volume_cap import ApplicationInsightsComponentDataVolumeCap - from .application_insights_component_billing_features import ApplicationInsightsComponentBillingFeatures - from .application_insights_component_quota_status import ApplicationInsightsComponentQuotaStatus - from .application_insights_component_feature_capabilities import ApplicationInsightsComponentFeatureCapabilities - from .application_insights_component_feature_capability import ApplicationInsightsComponentFeatureCapability - from .application_insights_component_feature import ApplicationInsightsComponentFeature - from .application_insights_component_available_features import ApplicationInsightsComponentAvailableFeatures - from .application_insights_component_proactive_detection_configuration_rule_definitions import ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions - from .application_insights_component_proactive_detection_configuration import ApplicationInsightsComponentProactiveDetectionConfiguration - from .components_resource import ComponentsResource - from .tags_resource import TagsResource - from .application_insights_component import ApplicationInsightsComponent - from .component_purge_body_filters import ComponentPurgeBodyFilters - from .component_purge_body import ComponentPurgeBody - from .component_purge_response import ComponentPurgeResponse - from .component_purge_status_response import ComponentPurgeStatusResponse - from .work_item_configuration import WorkItemConfiguration - from .work_item_create_configuration import WorkItemCreateConfiguration - from .work_item_configuration_error import WorkItemConfigurationError, WorkItemConfigurationErrorException - from .application_insights_component_favorite import ApplicationInsightsComponentFavorite - from .application_insights_component_web_test_location import ApplicationInsightsComponentWebTestLocation - from .webtests_resource import WebtestsResource - from .web_test_geolocation import WebTestGeolocation - from .web_test_properties_configuration import WebTestPropertiesConfiguration - from .web_test import WebTest - from .application_insights_component_analytics_item_properties import ApplicationInsightsComponentAnalyticsItemProperties - from .application_insights_component_analytics_item import ApplicationInsightsComponentAnalyticsItem - from .workbook_resource import WorkbookResource - from .workbook import Workbook - from .link_properties import LinkProperties - from .error_field_contract import ErrorFieldContract - from .workbook_error import WorkbookError, WorkbookErrorException -from .operation_paged import OperationPaged -from .annotation_paged import AnnotationPaged -from .application_insights_component_api_key_paged import ApplicationInsightsComponentAPIKeyPaged -from .application_insights_component_paged import ApplicationInsightsComponentPaged -from .work_item_configuration_paged import WorkItemConfigurationPaged -from .application_insights_component_web_test_location_paged import ApplicationInsightsComponentWebTestLocationPaged -from .web_test_paged import WebTestPaged -from .workbook_paged import WorkbookPaged -from .application_insights_management_client_enums import ( + from ._models import Annotation + from ._models import AnnotationError, AnnotationErrorException + from ._models import APIKeyRequest + from ._models import ApplicationInsightsComponent + from ._models import ApplicationInsightsComponentAnalyticsItem + from ._models import ApplicationInsightsComponentAnalyticsItemProperties + from ._models import ApplicationInsightsComponentAPIKey + from ._models import ApplicationInsightsComponentAvailableFeatures + from ._models import ApplicationInsightsComponentBillingFeatures + from ._models import ApplicationInsightsComponentDataVolumeCap + from ._models import ApplicationInsightsComponentExportConfiguration + from ._models import ApplicationInsightsComponentExportRequest + from ._models import ApplicationInsightsComponentFavorite + from ._models import ApplicationInsightsComponentFeature + from ._models import ApplicationInsightsComponentFeatureCapabilities + from ._models import ApplicationInsightsComponentFeatureCapability + from ._models import ApplicationInsightsComponentProactiveDetectionConfiguration + from ._models import ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions + from ._models import ApplicationInsightsComponentQuotaStatus + from ._models import ApplicationInsightsComponentWebTestLocation + from ._models import ComponentPurgeBody + from ._models import ComponentPurgeBodyFilters + from ._models import ComponentPurgeResponse + from ._models import ComponentPurgeStatusResponse + from ._models import ComponentsResource + from ._models import ErrorFieldContract + from ._models import ErrorResponse, ErrorResponseException + from ._models import InnerError + from ._models import LinkProperties + from ._models import Operation + from ._models import OperationDisplay + from ._models import TagsResource + from ._models import WebTest + from ._models import WebTestGeolocation + from ._models import WebTestPropertiesConfiguration + from ._models import WebtestsResource + from ._models import Workbook + from ._models import WorkbookError, WorkbookErrorException + from ._models import WorkbookResource + from ._models import WorkItemConfiguration + from ._models import WorkItemConfigurationError, WorkItemConfigurationErrorException + from ._models import WorkItemCreateConfiguration +from ._paged_models import AnnotationPaged +from ._paged_models import ApplicationInsightsComponentAPIKeyPaged +from ._paged_models import ApplicationInsightsComponentPaged +from ._paged_models import ApplicationInsightsComponentWebTestLocationPaged +from ._paged_models import OperationPaged +from ._paged_models import WebTestPaged +from ._paged_models import WorkbookPaged +from ._paged_models import WorkItemConfigurationPaged +from ._application_insights_management_client_enums import ( ApplicationType, FlowType, RequestSource, @@ -120,48 +120,48 @@ ) __all__ = [ - 'ErrorResponse', 'ErrorResponseException', - 'OperationDisplay', - 'Operation', 'Annotation', - 'InnerError', 'AnnotationError', 'AnnotationErrorException', 'APIKeyRequest', + 'ApplicationInsightsComponent', + 'ApplicationInsightsComponentAnalyticsItem', + 'ApplicationInsightsComponentAnalyticsItemProperties', 'ApplicationInsightsComponentAPIKey', - 'ApplicationInsightsComponentExportRequest', - 'ApplicationInsightsComponentExportConfiguration', - 'ApplicationInsightsComponentDataVolumeCap', + 'ApplicationInsightsComponentAvailableFeatures', 'ApplicationInsightsComponentBillingFeatures', - 'ApplicationInsightsComponentQuotaStatus', + 'ApplicationInsightsComponentDataVolumeCap', + 'ApplicationInsightsComponentExportConfiguration', + 'ApplicationInsightsComponentExportRequest', + 'ApplicationInsightsComponentFavorite', + 'ApplicationInsightsComponentFeature', 'ApplicationInsightsComponentFeatureCapabilities', 'ApplicationInsightsComponentFeatureCapability', - 'ApplicationInsightsComponentFeature', - 'ApplicationInsightsComponentAvailableFeatures', - 'ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions', 'ApplicationInsightsComponentProactiveDetectionConfiguration', - 'ComponentsResource', - 'TagsResource', - 'ApplicationInsightsComponent', - 'ComponentPurgeBodyFilters', + 'ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions', + 'ApplicationInsightsComponentQuotaStatus', + 'ApplicationInsightsComponentWebTestLocation', 'ComponentPurgeBody', + 'ComponentPurgeBodyFilters', 'ComponentPurgeResponse', 'ComponentPurgeStatusResponse', - 'WorkItemConfiguration', - 'WorkItemCreateConfiguration', - 'WorkItemConfigurationError', 'WorkItemConfigurationErrorException', - 'ApplicationInsightsComponentFavorite', - 'ApplicationInsightsComponentWebTestLocation', - 'WebtestsResource', + 'ComponentsResource', + 'ErrorFieldContract', + 'ErrorResponse', 'ErrorResponseException', + 'InnerError', + 'LinkProperties', + 'Operation', + 'OperationDisplay', + 'TagsResource', + 'WebTest', 'WebTestGeolocation', 'WebTestPropertiesConfiguration', - 'WebTest', - 'ApplicationInsightsComponentAnalyticsItemProperties', - 'ApplicationInsightsComponentAnalyticsItem', - 'WorkbookResource', + 'WebtestsResource', 'Workbook', - 'LinkProperties', - 'ErrorFieldContract', 'WorkbookError', 'WorkbookErrorException', + 'WorkbookResource', + 'WorkItemConfiguration', + 'WorkItemConfigurationError', 'WorkItemConfigurationErrorException', + 'WorkItemCreateConfiguration', 'OperationPaged', 'AnnotationPaged', 'ApplicationInsightsComponentAPIKeyPaged', diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_management_client_enums.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/_application_insights_management_client_enums.py similarity index 100% rename from sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_management_client_enums.py rename to sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/_application_insights_management_client_enums.py diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/_models.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/_models.py new file mode 100644 index 000000000000..d5e7d83973c0 --- /dev/null +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/_models.py @@ -0,0 +1,1878 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class Annotation(Model): + """Annotation associated with an application insights resource. + + :param annotation_name: Name of annotation + :type annotation_name: str + :param category: Category of annotation, free form + :type category: str + :param event_time: Time when event occurred + :type event_time: datetime + :param id: Unique Id for annotation + :type id: str + :param properties: Serialized JSON object for detailed properties + :type properties: str + :param related_annotation: Related parent annotation if any. Default + value: "null" . + :type related_annotation: str + """ + + _attribute_map = { + 'annotation_name': {'key': 'AnnotationName', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'event_time': {'key': 'EventTime', 'type': 'iso-8601'}, + 'id': {'key': 'Id', 'type': 'str'}, + 'properties': {'key': 'Properties', 'type': 'str'}, + 'related_annotation': {'key': 'RelatedAnnotation', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Annotation, self).__init__(**kwargs) + self.annotation_name = kwargs.get('annotation_name', None) + self.category = kwargs.get('category', None) + self.event_time = kwargs.get('event_time', None) + self.id = kwargs.get('id', None) + self.properties = kwargs.get('properties', None) + self.related_annotation = kwargs.get('related_annotation', "null") + + +class AnnotationError(Model): + """Error associated with trying to create annotation with Id that already + exist. + + :param code: Error detail code and explanation + :type code: str + :param message: Error message + :type message: str + :param innererror: + :type innererror: ~azure.mgmt.applicationinsights.models.InnerError + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'innererror': {'key': 'innererror', 'type': 'InnerError'}, + } + + def __init__(self, **kwargs): + super(AnnotationError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.innererror = kwargs.get('innererror', None) + + +class AnnotationErrorException(HttpOperationError): + """Server responsed with exception of type: 'AnnotationError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(AnnotationErrorException, self).__init__(deserialize, response, 'AnnotationError', *args) + + +class APIKeyRequest(Model): + """An Application Insights component API Key creation request definition. + + :param name: The name of the API Key. + :type name: str + :param linked_read_properties: The read access rights of this API Key. + :type linked_read_properties: list[str] + :param linked_write_properties: The write access rights of this API Key. + :type linked_write_properties: list[str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'linked_read_properties': {'key': 'linkedReadProperties', 'type': '[str]'}, + 'linked_write_properties': {'key': 'linkedWriteProperties', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(APIKeyRequest, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.linked_read_properties = kwargs.get('linked_read_properties', None) + self.linked_write_properties = kwargs.get('linked_write_properties', None) + + +class ComponentsResource(Model): + """An azure resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ComponentsResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class ApplicationInsightsComponent(ComponentsResource): + """An Application Insights component definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param kind: Required. The kind of application that this component refers + to, used to customize UI. This value is a freeform string, values should + typically be one of the following: web, ios, other, store, java, phone. + :type kind: str + :ivar application_id: The unique ID of your application. This field + mirrors the 'Name' field and cannot be changed. + :vartype application_id: str + :ivar app_id: Application Insights Unique ID for your Application. + :vartype app_id: str + :param application_type: Required. Type of application being monitored. + Possible values include: 'web', 'other'. Default value: "web" . + :type application_type: str or + ~azure.mgmt.applicationinsights.models.ApplicationType + :param flow_type: Used by the Application Insights system to determine + what kind of flow this component was created by. This is to be set to + 'Bluefield' when creating/updating a component via the REST API. Possible + values include: 'Bluefield'. Default value: "Bluefield" . + :type flow_type: str or ~azure.mgmt.applicationinsights.models.FlowType + :param request_source: Describes what tool created this Application + Insights component. Customers using this API should set this to the + default 'rest'. Possible values include: 'rest'. Default value: "rest" . + :type request_source: str or + ~azure.mgmt.applicationinsights.models.RequestSource + :ivar instrumentation_key: Application Insights Instrumentation key. A + read-only value that applications can use to identify the destination for + all telemetry sent to Azure Application Insights. This value will be + supplied upon construction of each new Application Insights component. + :vartype instrumentation_key: str + :ivar creation_date: Creation Date for the Application Insights component, + in ISO 8601 format. + :vartype creation_date: datetime + :ivar tenant_id: Azure Tenant Id. + :vartype tenant_id: str + :param hockey_app_id: The unique application ID created when a new + application is added to HockeyApp, used for communications with HockeyApp. + :type hockey_app_id: str + :ivar hockey_app_token: Token used to authenticate communications with + between Application Insights and HockeyApp. + :vartype hockey_app_token: str + :ivar provisioning_state: Current state of this component: whether or not + is has been provisioned within the resource group it is defined. Users + cannot change this value but are able to read from it. Values will include + Succeeded, Deploying, Canceled, and Failed. + :vartype provisioning_state: str + :param sampling_percentage: Percentage of the data produced by the + application being monitored that is being sampled for Application Insights + telemetry. + :type sampling_percentage: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'readonly': True}, + 'app_id': {'readonly': True}, + 'application_type': {'required': True}, + 'instrumentation_key': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'hockey_app_token': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'application_id': {'key': 'properties.ApplicationId', 'type': 'str'}, + 'app_id': {'key': 'properties.AppId', 'type': 'str'}, + 'application_type': {'key': 'properties.Application_Type', 'type': 'str'}, + 'flow_type': {'key': 'properties.Flow_Type', 'type': 'str'}, + 'request_source': {'key': 'properties.Request_Source', 'type': 'str'}, + 'instrumentation_key': {'key': 'properties.InstrumentationKey', 'type': 'str'}, + 'creation_date': {'key': 'properties.CreationDate', 'type': 'iso-8601'}, + 'tenant_id': {'key': 'properties.TenantId', 'type': 'str'}, + 'hockey_app_id': {'key': 'properties.HockeyAppId', 'type': 'str'}, + 'hockey_app_token': {'key': 'properties.HockeyAppToken', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'sampling_percentage': {'key': 'properties.SamplingPercentage', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(ApplicationInsightsComponent, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) + self.application_id = None + self.app_id = None + self.application_type = kwargs.get('application_type', "web") + self.flow_type = kwargs.get('flow_type', "Bluefield") + self.request_source = kwargs.get('request_source', "rest") + self.instrumentation_key = None + self.creation_date = None + self.tenant_id = None + self.hockey_app_id = kwargs.get('hockey_app_id', None) + self.hockey_app_token = None + self.provisioning_state = None + self.sampling_percentage = kwargs.get('sampling_percentage', None) + + +class ApplicationInsightsComponentAnalyticsItem(Model): + """Properties that define an Analytics item that is associated to an + Application Insights component. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: Internally assigned unique id of the item definition. + :type id: str + :param name: The user-defined name of the item. + :type name: str + :param content: The content of this item + :type content: str + :ivar version: This instance's version of the data model. This can change + as new features are added. + :vartype version: str + :param scope: Enum indicating if this item definition is owned by a + specific user or is shared between all users with access to the + Application Insights component. Possible values include: 'shared', 'user' + :type scope: str or ~azure.mgmt.applicationinsights.models.ItemScope + :param type: Enum indicating the type of the Analytics item. Possible + values include: 'query', 'function', 'folder', 'recent' + :type type: str or ~azure.mgmt.applicationinsights.models.ItemType + :ivar time_created: Date and time in UTC when this item was created. + :vartype time_created: str + :ivar time_modified: Date and time in UTC of the last modification that + was made to this item. + :vartype time_modified: str + :param properties: + :type properties: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentAnalyticsItemProperties + """ + + _validation = { + 'version': {'readonly': True}, + 'time_created': {'readonly': True}, + 'time_modified': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'content': {'key': 'Content', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'scope': {'key': 'Scope', 'type': 'str'}, + 'type': {'key': 'Type', 'type': 'str'}, + 'time_created': {'key': 'TimeCreated', 'type': 'str'}, + 'time_modified': {'key': 'TimeModified', 'type': 'str'}, + 'properties': {'key': 'Properties', 'type': 'ApplicationInsightsComponentAnalyticsItemProperties'}, + } + + def __init__(self, **kwargs): + super(ApplicationInsightsComponentAnalyticsItem, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.content = kwargs.get('content', None) + self.version = None + self.scope = kwargs.get('scope', None) + self.type = kwargs.get('type', None) + self.time_created = None + self.time_modified = None + self.properties = kwargs.get('properties', None) + + +class ApplicationInsightsComponentAnalyticsItemProperties(Model): + """A set of properties that can be defined in the context of a specific item + type. Each type may have its own properties. + + :param function_alias: A function alias, used when the type of the item is + Function + :type function_alias: str + """ + + _attribute_map = { + 'function_alias': {'key': 'functionAlias', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationInsightsComponentAnalyticsItemProperties, self).__init__(**kwargs) + self.function_alias = kwargs.get('function_alias', None) + + +class ApplicationInsightsComponentAPIKey(Model): + """Properties that define an API key of an Application Insights Component. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique ID of the API key inside an Application Insights + component. It is auto generated when the API key is created. + :vartype id: str + :ivar api_key: The API key value. It will be only return once when the API + Key was created. + :vartype api_key: str + :param created_date: The create date of this API key. + :type created_date: str + :param name: The name of the API key. + :type name: str + :param linked_read_properties: The read access rights of this API Key. + :type linked_read_properties: list[str] + :param linked_write_properties: The write access rights of this API Key. + :type linked_write_properties: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'api_key': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'api_key': {'key': 'apiKey', 'type': 'str'}, + 'created_date': {'key': 'createdDate', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'linked_read_properties': {'key': 'linkedReadProperties', 'type': '[str]'}, + 'linked_write_properties': {'key': 'linkedWriteProperties', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ApplicationInsightsComponentAPIKey, self).__init__(**kwargs) + self.id = None + self.api_key = None + self.created_date = kwargs.get('created_date', None) + self.name = kwargs.get('name', None) + self.linked_read_properties = kwargs.get('linked_read_properties', None) + self.linked_write_properties = kwargs.get('linked_write_properties', None) + + +class ApplicationInsightsComponentAvailableFeatures(Model): + """An Application Insights component available features. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar result: A list of Application Insights component feature. + :vartype result: + list[~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentFeature] + """ + + _validation = { + 'result': {'readonly': True}, + } + + _attribute_map = { + 'result': {'key': 'Result', 'type': '[ApplicationInsightsComponentFeature]'}, + } + + def __init__(self, **kwargs): + super(ApplicationInsightsComponentAvailableFeatures, self).__init__(**kwargs) + self.result = None + + +class ApplicationInsightsComponentBillingFeatures(Model): + """An Application Insights component billing features. + + :param data_volume_cap: An Application Insights component daily data + volume cap + :type data_volume_cap: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentDataVolumeCap + :param current_billing_features: Current enabled pricing plan. When the + component is in the Enterprise plan, this will list both 'Basic' and + 'Application Insights Enterprise'. + :type current_billing_features: list[str] + """ + + _attribute_map = { + 'data_volume_cap': {'key': 'DataVolumeCap', 'type': 'ApplicationInsightsComponentDataVolumeCap'}, + 'current_billing_features': {'key': 'CurrentBillingFeatures', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ApplicationInsightsComponentBillingFeatures, self).__init__(**kwargs) + self.data_volume_cap = kwargs.get('data_volume_cap', None) + self.current_billing_features = kwargs.get('current_billing_features', None) + + +class ApplicationInsightsComponentDataVolumeCap(Model): + """An Application Insights component daily data volume cap. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param cap: Daily data volume cap in GB. + :type cap: float + :ivar reset_time: Daily data volume cap UTC reset hour. + :vartype reset_time: int + :param warning_threshold: Reserved, not used for now. + :type warning_threshold: int + :param stop_send_notification_when_hit_threshold: Reserved, not used for + now. + :type stop_send_notification_when_hit_threshold: bool + :param stop_send_notification_when_hit_cap: Do not send a notification + email when the daily data volume cap is met. + :type stop_send_notification_when_hit_cap: bool + :ivar max_history_cap: Maximum daily data volume cap that the user can set + for this component. + :vartype max_history_cap: float + """ + + _validation = { + 'reset_time': {'readonly': True}, + 'max_history_cap': {'readonly': True}, + } + + _attribute_map = { + 'cap': {'key': 'Cap', 'type': 'float'}, + 'reset_time': {'key': 'ResetTime', 'type': 'int'}, + 'warning_threshold': {'key': 'WarningThreshold', 'type': 'int'}, + 'stop_send_notification_when_hit_threshold': {'key': 'StopSendNotificationWhenHitThreshold', 'type': 'bool'}, + 'stop_send_notification_when_hit_cap': {'key': 'StopSendNotificationWhenHitCap', 'type': 'bool'}, + 'max_history_cap': {'key': 'MaxHistoryCap', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(ApplicationInsightsComponentDataVolumeCap, self).__init__(**kwargs) + self.cap = kwargs.get('cap', None) + self.reset_time = None + self.warning_threshold = kwargs.get('warning_threshold', None) + self.stop_send_notification_when_hit_threshold = kwargs.get('stop_send_notification_when_hit_threshold', None) + self.stop_send_notification_when_hit_cap = kwargs.get('stop_send_notification_when_hit_cap', None) + self.max_history_cap = None + + +class ApplicationInsightsComponentExportConfiguration(Model): + """Properties that define a Continuous Export configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar export_id: The unique ID of the export configuration inside an + Application Insights component. It is auto generated when the Continuous + Export configuration is created. + :vartype export_id: str + :ivar instrumentation_key: The instrumentation key of the Application + Insights component. + :vartype instrumentation_key: str + :param record_types: This comma separated list of document types that will + be exported. The possible values include 'Requests', 'Event', + 'Exceptions', 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd', + 'PerformanceCounters', 'Availability', 'Messages'. + :type record_types: str + :ivar application_name: The name of the Application Insights component. + :vartype application_name: str + :ivar subscription_id: The subscription of the Application Insights + component. + :vartype subscription_id: str + :ivar resource_group: The resource group of the Application Insights + component. + :vartype resource_group: str + :ivar destination_storage_subscription_id: The destination storage account + subscription ID. + :vartype destination_storage_subscription_id: str + :ivar destination_storage_location_id: The destination account location + ID. + :vartype destination_storage_location_id: str + :ivar destination_account_id: The name of destination account. + :vartype destination_account_id: str + :ivar destination_type: The destination type. + :vartype destination_type: str + :ivar is_user_enabled: This will be 'true' if the Continuous Export + configuration is enabled, otherwise it will be 'false'. + :vartype is_user_enabled: str + :ivar last_user_update: Last time the Continuous Export configuration was + updated. + :vartype last_user_update: str + :param notification_queue_enabled: Deprecated + :type notification_queue_enabled: str + :ivar export_status: This indicates current Continuous Export + configuration status. The possible values are 'Preparing', 'Success', + 'Failure'. + :vartype export_status: str + :ivar last_success_time: The last time data was successfully delivered to + the destination storage container for this Continuous Export + configuration. + :vartype last_success_time: str + :ivar last_gap_time: The last time the Continuous Export configuration + started failing. + :vartype last_gap_time: str + :ivar permanent_error_reason: This is the reason the Continuous Export + configuration started failing. It can be 'AzureStorageNotFound' or + 'AzureStorageAccessDenied'. + :vartype permanent_error_reason: str + :ivar storage_name: The name of the destination storage account. + :vartype storage_name: str + :ivar container_name: The name of the destination storage container. + :vartype container_name: str + """ + + _validation = { + 'export_id': {'readonly': True}, + 'instrumentation_key': {'readonly': True}, + 'application_name': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'destination_storage_subscription_id': {'readonly': True}, + 'destination_storage_location_id': {'readonly': True}, + 'destination_account_id': {'readonly': True}, + 'destination_type': {'readonly': True}, + 'is_user_enabled': {'readonly': True}, + 'last_user_update': {'readonly': True}, + 'export_status': {'readonly': True}, + 'last_success_time': {'readonly': True}, + 'last_gap_time': {'readonly': True}, + 'permanent_error_reason': {'readonly': True}, + 'storage_name': {'readonly': True}, + 'container_name': {'readonly': True}, + } + + _attribute_map = { + 'export_id': {'key': 'ExportId', 'type': 'str'}, + 'instrumentation_key': {'key': 'InstrumentationKey', 'type': 'str'}, + 'record_types': {'key': 'RecordTypes', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'subscription_id': {'key': 'SubscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'ResourceGroup', 'type': 'str'}, + 'destination_storage_subscription_id': {'key': 'DestinationStorageSubscriptionId', 'type': 'str'}, + 'destination_storage_location_id': {'key': 'DestinationStorageLocationId', 'type': 'str'}, + 'destination_account_id': {'key': 'DestinationAccountId', 'type': 'str'}, + 'destination_type': {'key': 'DestinationType', 'type': 'str'}, + 'is_user_enabled': {'key': 'IsUserEnabled', 'type': 'str'}, + 'last_user_update': {'key': 'LastUserUpdate', 'type': 'str'}, + 'notification_queue_enabled': {'key': 'NotificationQueueEnabled', 'type': 'str'}, + 'export_status': {'key': 'ExportStatus', 'type': 'str'}, + 'last_success_time': {'key': 'LastSuccessTime', 'type': 'str'}, + 'last_gap_time': {'key': 'LastGapTime', 'type': 'str'}, + 'permanent_error_reason': {'key': 'PermanentErrorReason', 'type': 'str'}, + 'storage_name': {'key': 'StorageName', 'type': 'str'}, + 'container_name': {'key': 'ContainerName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationInsightsComponentExportConfiguration, self).__init__(**kwargs) + self.export_id = None + self.instrumentation_key = None + self.record_types = kwargs.get('record_types', None) + self.application_name = None + self.subscription_id = None + self.resource_group = None + self.destination_storage_subscription_id = None + self.destination_storage_location_id = None + self.destination_account_id = None + self.destination_type = None + self.is_user_enabled = None + self.last_user_update = None + self.notification_queue_enabled = kwargs.get('notification_queue_enabled', None) + self.export_status = None + self.last_success_time = None + self.last_gap_time = None + self.permanent_error_reason = None + self.storage_name = None + self.container_name = None + + +class ApplicationInsightsComponentExportRequest(Model): + """An Application Insights component Continuous Export configuration request + definition. + + :param record_types: The document types to be exported, as comma separated + values. Allowed values include 'Requests', 'Event', 'Exceptions', + 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd', + 'PerformanceCounters', 'Availability', 'Messages'. + :type record_types: str + :param destination_type: The Continuous Export destination type. This has + to be 'Blob'. + :type destination_type: str + :param destination_address: The SAS URL for the destination storage + container. It must grant write permission. + :type destination_address: str + :param is_enabled: Set to 'true' to create a Continuous Export + configuration as enabled, otherwise set it to 'false'. + :type is_enabled: str + :param notification_queue_enabled: Deprecated + :type notification_queue_enabled: str + :param notification_queue_uri: Deprecated + :type notification_queue_uri: str + :param destination_storage_subscription_id: The subscription ID of the + destination storage container. + :type destination_storage_subscription_id: str + :param destination_storage_location_id: The location ID of the destination + storage container. + :type destination_storage_location_id: str + :param destination_account_id: The name of destination storage account. + :type destination_account_id: str + """ + + _attribute_map = { + 'record_types': {'key': 'RecordTypes', 'type': 'str'}, + 'destination_type': {'key': 'DestinationType', 'type': 'str'}, + 'destination_address': {'key': 'DestinationAddress', 'type': 'str'}, + 'is_enabled': {'key': 'IsEnabled', 'type': 'str'}, + 'notification_queue_enabled': {'key': 'NotificationQueueEnabled', 'type': 'str'}, + 'notification_queue_uri': {'key': 'NotificationQueueUri', 'type': 'str'}, + 'destination_storage_subscription_id': {'key': 'DestinationStorageSubscriptionId', 'type': 'str'}, + 'destination_storage_location_id': {'key': 'DestinationStorageLocationId', 'type': 'str'}, + 'destination_account_id': {'key': 'DestinationAccountId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationInsightsComponentExportRequest, self).__init__(**kwargs) + self.record_types = kwargs.get('record_types', None) + self.destination_type = kwargs.get('destination_type', None) + self.destination_address = kwargs.get('destination_address', None) + self.is_enabled = kwargs.get('is_enabled', None) + self.notification_queue_enabled = kwargs.get('notification_queue_enabled', None) + self.notification_queue_uri = kwargs.get('notification_queue_uri', None) + self.destination_storage_subscription_id = kwargs.get('destination_storage_subscription_id', None) + self.destination_storage_location_id = kwargs.get('destination_storage_location_id', None) + self.destination_account_id = kwargs.get('destination_account_id', None) + + +class ApplicationInsightsComponentFavorite(Model): + """Properties that define a favorite that is associated to an Application + Insights component. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param name: The user-defined name of the favorite. + :type name: str + :param config: Configuration of this particular favorite, which are driven + by the Azure portal UX. Configuration data is a string containing valid + JSON + :type config: str + :param version: This instance's version of the data model. This can change + as new features are added that can be marked favorite. Current examples + include MetricsExplorer (ME) and Search. + :type version: str + :ivar favorite_id: Internally assigned unique id of the favorite + definition. + :vartype favorite_id: str + :param favorite_type: Enum indicating if this favorite definition is owned + by a specific user or is shared between all users with access to the + Application Insights component. Possible values include: 'shared', 'user' + :type favorite_type: str or + ~azure.mgmt.applicationinsights.models.FavoriteType + :param source_type: The source of the favorite definition. + :type source_type: str + :ivar time_modified: Date and time in UTC of the last modification that + was made to this favorite definition. + :vartype time_modified: str + :param tags: A list of 0 or more tags that are associated with this + favorite definition + :type tags: list[str] + :param category: Favorite category, as defined by the user at creation + time. + :type category: str + :param is_generated_from_template: Flag denoting wether or not this + favorite was generated from a template. + :type is_generated_from_template: bool + :ivar user_id: Unique user id of the specific user that owns this + favorite. + :vartype user_id: str + """ + + _validation = { + 'favorite_id': {'readonly': True}, + 'time_modified': {'readonly': True}, + 'user_id': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'config': {'key': 'Config', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'favorite_id': {'key': 'FavoriteId', 'type': 'str'}, + 'favorite_type': {'key': 'FavoriteType', 'type': 'FavoriteType'}, + 'source_type': {'key': 'SourceType', 'type': 'str'}, + 'time_modified': {'key': 'TimeModified', 'type': 'str'}, + 'tags': {'key': 'Tags', 'type': '[str]'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'is_generated_from_template': {'key': 'IsGeneratedFromTemplate', 'type': 'bool'}, + 'user_id': {'key': 'UserId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationInsightsComponentFavorite, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.config = kwargs.get('config', None) + self.version = kwargs.get('version', None) + self.favorite_id = None + self.favorite_type = kwargs.get('favorite_type', None) + self.source_type = kwargs.get('source_type', None) + self.time_modified = None + self.tags = kwargs.get('tags', None) + self.category = kwargs.get('category', None) + self.is_generated_from_template = kwargs.get('is_generated_from_template', None) + self.user_id = None + + +class ApplicationInsightsComponentFeature(Model): + """An Application Insights component daily data volume cap status. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar feature_name: The pricing feature name. + :vartype feature_name: str + :ivar meter_id: The meter id used for the feature. + :vartype meter_id: str + :ivar meter_rate_frequency: The meter rate for the feature's meter. + :vartype meter_rate_frequency: str + :ivar resouce_id: Reserved, not used now. + :vartype resouce_id: str + :ivar is_hidden: Reserved, not used now. + :vartype is_hidden: bool + :ivar capabilities: A list of Application Insights component feature + capability. + :vartype capabilities: + list[~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentFeatureCapability] + :ivar title: Display name of the feature. + :vartype title: str + :ivar is_main_feature: Whether can apply addon feature on to it. + :vartype is_main_feature: bool + :ivar supported_addon_features: The add on features on main feature. + :vartype supported_addon_features: str + """ + + _validation = { + 'feature_name': {'readonly': True}, + 'meter_id': {'readonly': True}, + 'meter_rate_frequency': {'readonly': True}, + 'resouce_id': {'readonly': True}, + 'is_hidden': {'readonly': True}, + 'capabilities': {'readonly': True}, + 'title': {'readonly': True}, + 'is_main_feature': {'readonly': True}, + 'supported_addon_features': {'readonly': True}, + } + + _attribute_map = { + 'feature_name': {'key': 'FeatureName', 'type': 'str'}, + 'meter_id': {'key': 'MeterId', 'type': 'str'}, + 'meter_rate_frequency': {'key': 'MeterRateFrequency', 'type': 'str'}, + 'resouce_id': {'key': 'ResouceId', 'type': 'str'}, + 'is_hidden': {'key': 'IsHidden', 'type': 'bool'}, + 'capabilities': {'key': 'Capabilities', 'type': '[ApplicationInsightsComponentFeatureCapability]'}, + 'title': {'key': 'Title', 'type': 'str'}, + 'is_main_feature': {'key': 'IsMainFeature', 'type': 'bool'}, + 'supported_addon_features': {'key': 'SupportedAddonFeatures', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationInsightsComponentFeature, self).__init__(**kwargs) + self.feature_name = None + self.meter_id = None + self.meter_rate_frequency = None + self.resouce_id = None + self.is_hidden = None + self.capabilities = None + self.title = None + self.is_main_feature = None + self.supported_addon_features = None + + +class ApplicationInsightsComponentFeatureCapabilities(Model): + """An Application Insights component feature capabilities. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar support_export_data: Whether allow to use continuous export feature. + :vartype support_export_data: bool + :ivar burst_throttle_policy: Reserved, not used now. + :vartype burst_throttle_policy: str + :ivar metadata_class: Reserved, not used now. + :vartype metadata_class: str + :ivar live_stream_metrics: Reserved, not used now. + :vartype live_stream_metrics: bool + :ivar application_map: Reserved, not used now. + :vartype application_map: bool + :ivar work_item_integration: Whether allow to use work item integration + feature. + :vartype work_item_integration: bool + :ivar power_bi_integration: Reserved, not used now. + :vartype power_bi_integration: bool + :ivar open_schema: Reserved, not used now. + :vartype open_schema: bool + :ivar proactive_detection: Reserved, not used now. + :vartype proactive_detection: bool + :ivar analytics_integration: Reserved, not used now. + :vartype analytics_integration: bool + :ivar multiple_step_web_test: Whether allow to use multiple steps web test + feature. + :vartype multiple_step_web_test: bool + :ivar api_access_level: Reserved, not used now. + :vartype api_access_level: str + :ivar tracking_type: The application insights component used tracking + type. + :vartype tracking_type: str + :ivar daily_cap: Daily data volume cap in GB. + :vartype daily_cap: float + :ivar daily_cap_reset_time: Daily data volume cap UTC reset hour. + :vartype daily_cap_reset_time: float + :ivar throttle_rate: Reserved, not used now. + :vartype throttle_rate: float + """ + + _validation = { + 'support_export_data': {'readonly': True}, + 'burst_throttle_policy': {'readonly': True}, + 'metadata_class': {'readonly': True}, + 'live_stream_metrics': {'readonly': True}, + 'application_map': {'readonly': True}, + 'work_item_integration': {'readonly': True}, + 'power_bi_integration': {'readonly': True}, + 'open_schema': {'readonly': True}, + 'proactive_detection': {'readonly': True}, + 'analytics_integration': {'readonly': True}, + 'multiple_step_web_test': {'readonly': True}, + 'api_access_level': {'readonly': True}, + 'tracking_type': {'readonly': True}, + 'daily_cap': {'readonly': True}, + 'daily_cap_reset_time': {'readonly': True}, + 'throttle_rate': {'readonly': True}, + } + + _attribute_map = { + 'support_export_data': {'key': 'SupportExportData', 'type': 'bool'}, + 'burst_throttle_policy': {'key': 'BurstThrottlePolicy', 'type': 'str'}, + 'metadata_class': {'key': 'MetadataClass', 'type': 'str'}, + 'live_stream_metrics': {'key': 'LiveStreamMetrics', 'type': 'bool'}, + 'application_map': {'key': 'ApplicationMap', 'type': 'bool'}, + 'work_item_integration': {'key': 'WorkItemIntegration', 'type': 'bool'}, + 'power_bi_integration': {'key': 'PowerBIIntegration', 'type': 'bool'}, + 'open_schema': {'key': 'OpenSchema', 'type': 'bool'}, + 'proactive_detection': {'key': 'ProactiveDetection', 'type': 'bool'}, + 'analytics_integration': {'key': 'AnalyticsIntegration', 'type': 'bool'}, + 'multiple_step_web_test': {'key': 'MultipleStepWebTest', 'type': 'bool'}, + 'api_access_level': {'key': 'ApiAccessLevel', 'type': 'str'}, + 'tracking_type': {'key': 'TrackingType', 'type': 'str'}, + 'daily_cap': {'key': 'DailyCap', 'type': 'float'}, + 'daily_cap_reset_time': {'key': 'DailyCapResetTime', 'type': 'float'}, + 'throttle_rate': {'key': 'ThrottleRate', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(ApplicationInsightsComponentFeatureCapabilities, self).__init__(**kwargs) + self.support_export_data = None + self.burst_throttle_policy = None + self.metadata_class = None + self.live_stream_metrics = None + self.application_map = None + self.work_item_integration = None + self.power_bi_integration = None + self.open_schema = None + self.proactive_detection = None + self.analytics_integration = None + self.multiple_step_web_test = None + self.api_access_level = None + self.tracking_type = None + self.daily_cap = None + self.daily_cap_reset_time = None + self.throttle_rate = None + + +class ApplicationInsightsComponentFeatureCapability(Model): + """An Application Insights component feature capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the capability. + :vartype name: str + :ivar description: The description of the capability. + :vartype description: str + :ivar value: The value of the capability. + :vartype value: str + :ivar unit: The unit of the capability. + :vartype unit: str + :ivar meter_id: The meter used for the capability. + :vartype meter_id: str + :ivar meter_rate_frequency: The meter rate of the meter. + :vartype meter_rate_frequency: str + """ + + _validation = { + 'name': {'readonly': True}, + 'description': {'readonly': True}, + 'value': {'readonly': True}, + 'unit': {'readonly': True}, + 'meter_id': {'readonly': True}, + 'meter_rate_frequency': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'str'}, + 'unit': {'key': 'Unit', 'type': 'str'}, + 'meter_id': {'key': 'MeterId', 'type': 'str'}, + 'meter_rate_frequency': {'key': 'MeterRateFrequency', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationInsightsComponentFeatureCapability, self).__init__(**kwargs) + self.name = None + self.description = None + self.value = None + self.unit = None + self.meter_id = None + self.meter_rate_frequency = None + + +class ApplicationInsightsComponentProactiveDetectionConfiguration(Model): + """Properties that define a ProactiveDetection configuration. + + :param name: The rule name + :type name: str + :param enabled: A flag that indicates whether this rule is enabled by the + user + :type enabled: bool + :param send_emails_to_subscription_owners: A flag that indicated whether + notifications on this rule should be sent to subscription owners + :type send_emails_to_subscription_owners: bool + :param custom_emails: Custom email addresses for this rule notifications + :type custom_emails: list[str] + :param last_updated_time: The last time this rule was updated + :type last_updated_time: str + :param rule_definitions: Static definitions of the ProactiveDetection + configuration rule (same values for all components). + :type rule_definitions: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'enabled': {'key': 'Enabled', 'type': 'bool'}, + 'send_emails_to_subscription_owners': {'key': 'SendEmailsToSubscriptionOwners', 'type': 'bool'}, + 'custom_emails': {'key': 'CustomEmails', 'type': '[str]'}, + 'last_updated_time': {'key': 'LastUpdatedTime', 'type': 'str'}, + 'rule_definitions': {'key': 'RuleDefinitions', 'type': 'ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions'}, + } + + def __init__(self, **kwargs): + super(ApplicationInsightsComponentProactiveDetectionConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.enabled = kwargs.get('enabled', None) + self.send_emails_to_subscription_owners = kwargs.get('send_emails_to_subscription_owners', None) + self.custom_emails = kwargs.get('custom_emails', None) + self.last_updated_time = kwargs.get('last_updated_time', None) + self.rule_definitions = kwargs.get('rule_definitions', None) + + +class ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions(Model): + """Static definitions of the ProactiveDetection configuration rule (same + values for all components). + + :param name: The rule name + :type name: str + :param display_name: The rule name as it is displayed in UI + :type display_name: str + :param description: The rule description + :type description: str + :param help_url: URL which displays additional info about the proactive + detection rule + :type help_url: str + :param is_hidden: A flag indicating whether the rule is hidden (from the + UI) + :type is_hidden: bool + :param is_enabled_by_default: A flag indicating whether the rule is + enabled by default + :type is_enabled_by_default: bool + :param is_in_preview: A flag indicating whether the rule is in preview + :type is_in_preview: bool + :param supports_email_notifications: A flag indicating whether email + notifications are supported for detections for this rule + :type supports_email_notifications: bool + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'display_name': {'key': 'DisplayName', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'help_url': {'key': 'HelpUrl', 'type': 'str'}, + 'is_hidden': {'key': 'IsHidden', 'type': 'bool'}, + 'is_enabled_by_default': {'key': 'IsEnabledByDefault', 'type': 'bool'}, + 'is_in_preview': {'key': 'IsInPreview', 'type': 'bool'}, + 'supports_email_notifications': {'key': 'SupportsEmailNotifications', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.help_url = kwargs.get('help_url', None) + self.is_hidden = kwargs.get('is_hidden', None) + self.is_enabled_by_default = kwargs.get('is_enabled_by_default', None) + self.is_in_preview = kwargs.get('is_in_preview', None) + self.supports_email_notifications = kwargs.get('supports_email_notifications', None) + + +class ApplicationInsightsComponentQuotaStatus(Model): + """An Application Insights component daily data volume cap status. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar app_id: The Application ID for the Application Insights component. + :vartype app_id: str + :ivar should_be_throttled: The daily data volume cap is met, and data + ingestion will be stopped. + :vartype should_be_throttled: bool + :ivar expiration_time: Date and time when the daily data volume cap will + be reset, and data ingestion will resume. + :vartype expiration_time: str + """ + + _validation = { + 'app_id': {'readonly': True}, + 'should_be_throttled': {'readonly': True}, + 'expiration_time': {'readonly': True}, + } + + _attribute_map = { + 'app_id': {'key': 'AppId', 'type': 'str'}, + 'should_be_throttled': {'key': 'ShouldBeThrottled', 'type': 'bool'}, + 'expiration_time': {'key': 'ExpirationTime', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationInsightsComponentQuotaStatus, self).__init__(**kwargs) + self.app_id = None + self.should_be_throttled = None + self.expiration_time = None + + +class ApplicationInsightsComponentWebTestLocation(Model): + """Properties that define a web test location available to an Application + Insights Component. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar display_name: The display name of the web test location. + :vartype display_name: str + :ivar tag: Internally defined geographic location tag. + :vartype tag: str + """ + + _validation = { + 'display_name': {'readonly': True}, + 'tag': {'readonly': True}, + } + + _attribute_map = { + 'display_name': {'key': 'DisplayName', 'type': 'str'}, + 'tag': {'key': 'Tag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationInsightsComponentWebTestLocation, self).__init__(**kwargs) + self.display_name = None + self.tag = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ComponentPurgeBody(Model): + """Describes the body of a purge request for an App Insights component. + + All required parameters must be populated in order to send to Azure. + + :param table: Required. Table from which to purge data. + :type table: str + :param filters: Required. The set of columns and filters (queries) to run + over them to purge the resulting data. + :type filters: + list[~azure.mgmt.applicationinsights.models.ComponentPurgeBodyFilters] + """ + + _validation = { + 'table': {'required': True}, + 'filters': {'required': True}, + } + + _attribute_map = { + 'table': {'key': 'table', 'type': 'str'}, + 'filters': {'key': 'filters', 'type': '[ComponentPurgeBodyFilters]'}, + } + + def __init__(self, **kwargs): + super(ComponentPurgeBody, self).__init__(**kwargs) + self.table = kwargs.get('table', None) + self.filters = kwargs.get('filters', None) + + +class ComponentPurgeBodyFilters(Model): + """User-defined filters to return data which will be purged from the table. + + :param column: The column of the table over which the given query should + run + :type column: str + :param operator: A query operator to evaluate over the provided column and + value(s). Supported operators are ==, =~, in, in~, >, >=, <, <=, between, + and have the same behavior as they would in a KQL query. + :type operator: str + :param value: the value for the operator to function over. This can be a + number (e.g., > 100), a string (timestamp >= '2017-09-01') or array of + values. + :type value: object + :param key: When filtering over custom dimensions, this key will be used + as the name of the custom dimension. + :type key: str + """ + + _attribute_map = { + 'column': {'key': 'column', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'object'}, + 'key': {'key': 'key', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ComponentPurgeBodyFilters, self).__init__(**kwargs) + self.column = kwargs.get('column', None) + self.operator = kwargs.get('operator', None) + self.value = kwargs.get('value', None) + self.key = kwargs.get('key', None) + + +class ComponentPurgeResponse(Model): + """Response containing operationId for a specific purge action. + + All required parameters must be populated in order to send to Azure. + + :param operation_id: Required. Id to use when querying for status for a + particular purge operation. + :type operation_id: str + """ + + _validation = { + 'operation_id': {'required': True}, + } + + _attribute_map = { + 'operation_id': {'key': 'operationId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ComponentPurgeResponse, self).__init__(**kwargs) + self.operation_id = kwargs.get('operation_id', None) + + +class ComponentPurgeStatusResponse(Model): + """Response containing status for a specific purge operation. + + All required parameters must be populated in order to send to Azure. + + :param status: Required. Status of the operation represented by the + requested Id. Possible values include: 'pending', 'completed' + :type status: str or ~azure.mgmt.applicationinsights.models.PurgeState + """ + + _validation = { + 'status': {'required': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ComponentPurgeStatusResponse, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + + +class ErrorFieldContract(Model): + """Error Field contract. + + :param code: Property level error code. + :type code: str + :param message: Human-readable representation of property-level error. + :type message: str + :param target: Property name. + :type target: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorFieldContract, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + + +class ErrorResponse(Model): + """Error response indicates Insights service is not able to process the + incoming request. The reason is provided in the error message. + + :param code: Error code. + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class InnerError(Model): + """Inner error. + + :param diagnosticcontext: Provides correlation for request + :type diagnosticcontext: str + :param time: Request time + :type time: datetime + """ + + _attribute_map = { + 'diagnosticcontext': {'key': 'diagnosticcontext', 'type': 'str'}, + 'time': {'key': 'time', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(InnerError, self).__init__(**kwargs) + self.diagnosticcontext = kwargs.get('diagnosticcontext', None) + self.time = kwargs.get('time', None) + + +class LinkProperties(Model): + """Contains a sourceId and workbook resource id to link two resources. + + :param source_id: The source Azure resource id + :type source_id: str + :param target_id: The workbook Azure resource id + :type target_id: str + :param category: The category of workbook + :type category: str + """ + + _attribute_map = { + 'source_id': {'key': 'sourceId', 'type': 'str'}, + 'target_id': {'key': 'targetId', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LinkProperties, self).__init__(**kwargs) + self.source_id = kwargs.get('source_id', None) + self.target_id = kwargs.get('target_id', None) + self.category = kwargs.get('category', None) + + +class Operation(Model): + """CDN REST API operation. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: The object that represents the operation. + :type display: ~azure.mgmt.applicationinsights.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + + +class OperationDisplay(Model): + """The object that represents the operation. + + :param provider: Service provider: Microsoft.Cdn + :type provider: str + :param resource: Resource on which the operation is performed: Profile, + endpoint, etc. + :type resource: str + :param operation: Operation type: Read, write, delete, etc. + :type operation: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + + +class TagsResource(Model): + """A container holding only the Tags for a resource, allowing the user to + update the tags on a WebTest instance. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(TagsResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class WebtestsResource(Model): + """An azure resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(WebtestsResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class WebTest(WebtestsResource): + """An Application Insights web test definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param kind: The kind of web test that this web test watches. Choices are + ping and multistep. Possible values include: 'ping', 'multistep'. Default + value: "ping" . + :type kind: str or ~azure.mgmt.applicationinsights.models.WebTestKind + :param synthetic_monitor_id: Required. Unique ID of this WebTest. This is + typically the same value as the Name field. + :type synthetic_monitor_id: str + :param web_test_name: Required. User defined name if this WebTest. + :type web_test_name: str + :param description: Purpose/user defined descriptive test for this + WebTest. + :type description: str + :param enabled: Is the test actively being monitored. + :type enabled: bool + :param frequency: Interval in seconds between test runs for this WebTest. + Default value is 300. Default value: 300 . + :type frequency: int + :param timeout: Seconds until this WebTest will timeout and fail. Default + value is 30. Default value: 30 . + :type timeout: int + :param web_test_kind: Required. The kind of web test this is, valid + choices are ping and multistep. Possible values include: 'ping', + 'multistep'. Default value: "ping" . + :type web_test_kind: str or + ~azure.mgmt.applicationinsights.models.WebTestKind + :param retry_enabled: Allow for retries should this WebTest fail. + :type retry_enabled: bool + :param locations: Required. A list of where to physically run the tests + from to give global coverage for accessibility of your application. + :type locations: + list[~azure.mgmt.applicationinsights.models.WebTestGeolocation] + :param configuration: An XML configuration specification for a WebTest. + :type configuration: + ~azure.mgmt.applicationinsights.models.WebTestPropertiesConfiguration + :ivar provisioning_state: Current state of this component, whether or not + is has been provisioned within the resource group it is defined. Users + cannot change this value but are able to read from it. Values will include + Succeeded, Deploying, Canceled, and Failed. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'synthetic_monitor_id': {'required': True}, + 'web_test_name': {'required': True}, + 'web_test_kind': {'required': True}, + 'locations': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'WebTestKind'}, + 'synthetic_monitor_id': {'key': 'properties.SyntheticMonitorId', 'type': 'str'}, + 'web_test_name': {'key': 'properties.Name', 'type': 'str'}, + 'description': {'key': 'properties.Description', 'type': 'str'}, + 'enabled': {'key': 'properties.Enabled', 'type': 'bool'}, + 'frequency': {'key': 'properties.Frequency', 'type': 'int'}, + 'timeout': {'key': 'properties.Timeout', 'type': 'int'}, + 'web_test_kind': {'key': 'properties.Kind', 'type': 'WebTestKind'}, + 'retry_enabled': {'key': 'properties.RetryEnabled', 'type': 'bool'}, + 'locations': {'key': 'properties.Locations', 'type': '[WebTestGeolocation]'}, + 'configuration': {'key': 'properties.Configuration', 'type': 'WebTestPropertiesConfiguration'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WebTest, self).__init__(**kwargs) + self.kind = kwargs.get('kind', "ping") + self.synthetic_monitor_id = kwargs.get('synthetic_monitor_id', None) + self.web_test_name = kwargs.get('web_test_name', None) + self.description = kwargs.get('description', None) + self.enabled = kwargs.get('enabled', None) + self.frequency = kwargs.get('frequency', 300) + self.timeout = kwargs.get('timeout', 30) + self.web_test_kind = kwargs.get('web_test_kind', "ping") + self.retry_enabled = kwargs.get('retry_enabled', None) + self.locations = kwargs.get('locations', None) + self.configuration = kwargs.get('configuration', None) + self.provisioning_state = None + + +class WebTestGeolocation(Model): + """Geo-physical location to run a web test from. You must specify one or more + locations for the test to run from. + + :param location: Location ID for the webtest to run from. + :type location: str + """ + + _attribute_map = { + 'location': {'key': 'Id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WebTestGeolocation, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + + +class WebTestPropertiesConfiguration(Model): + """An XML configuration specification for a WebTest. + + :param web_test: The XML specification of a WebTest to run against an + application. + :type web_test: str + """ + + _attribute_map = { + 'web_test': {'key': 'WebTest', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WebTestPropertiesConfiguration, self).__init__(**kwargs) + self.web_test = kwargs.get('web_test', None) + + +class WorkbookResource(Model): + """An azure resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(WorkbookResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class Workbook(WorkbookResource): + """An Application Insights workbook definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param kind: The kind of workbook. Choices are user and shared. Possible + values include: 'user', 'shared' + :type kind: str or ~azure.mgmt.applicationinsights.models.SharedTypeKind + :param workbook_name: Required. The user-defined name of the workbook. + :type workbook_name: str + :param serialized_data: Required. Configuration of this particular + workbook. Configuration data is a string containing valid JSON + :type serialized_data: str + :param version: This instance's version of the data model. This can change + as new features are added that can be marked workbook. + :type version: str + :param workbook_id: Required. Internally assigned unique id of the + workbook definition. + :type workbook_id: str + :param shared_type_kind: Required. Enum indicating if this workbook + definition is owned by a specific user or is shared between all users with + access to the Application Insights component. Possible values include: + 'user', 'shared'. Default value: "shared" . + :type shared_type_kind: str or + ~azure.mgmt.applicationinsights.models.SharedTypeKind + :ivar time_modified: Date and time in UTC of the last modification that + was made to this workbook definition. + :vartype time_modified: str + :param category: Required. Workbook category, as defined by the user at + creation time. + :type category: str + :param workbook_tags: A list of 0 or more tags that are associated with + this workbook definition + :type workbook_tags: list[str] + :param user_id: Required. Unique user id of the specific user that owns + this workbook. + :type user_id: str + :param source_resource_id: Optional resourceId for a source resource. + :type source_resource_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'workbook_name': {'required': True}, + 'serialized_data': {'required': True}, + 'workbook_id': {'required': True}, + 'shared_type_kind': {'required': True}, + 'time_modified': {'readonly': True}, + 'category': {'required': True}, + 'user_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'workbook_name': {'key': 'properties.name', 'type': 'str'}, + 'serialized_data': {'key': 'properties.serializedData', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'workbook_id': {'key': 'properties.workbookId', 'type': 'str'}, + 'shared_type_kind': {'key': 'properties.kind', 'type': 'str'}, + 'time_modified': {'key': 'properties.timeModified', 'type': 'str'}, + 'category': {'key': 'properties.category', 'type': 'str'}, + 'workbook_tags': {'key': 'properties.tags', 'type': '[str]'}, + 'user_id': {'key': 'properties.userId', 'type': 'str'}, + 'source_resource_id': {'key': 'properties.sourceResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Workbook, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) + self.workbook_name = kwargs.get('workbook_name', None) + self.serialized_data = kwargs.get('serialized_data', None) + self.version = kwargs.get('version', None) + self.workbook_id = kwargs.get('workbook_id', None) + self.shared_type_kind = kwargs.get('shared_type_kind', "shared") + self.time_modified = None + self.category = kwargs.get('category', None) + self.workbook_tags = kwargs.get('workbook_tags', None) + self.user_id = kwargs.get('user_id', None) + self.source_resource_id = kwargs.get('source_resource_id', None) + + +class WorkbookError(Model): + """Error message body that will indicate why the operation failed. + + :param code: Service-defined error code. This code serves as a sub-status + for the HTTP error code specified in the response. + :type code: str + :param message: Human-readable representation of the error. + :type message: str + :param details: The list of invalid fields send in request, in case of + validation error. + :type details: + list[~azure.mgmt.applicationinsights.models.ErrorFieldContract] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorFieldContract]'}, + } + + def __init__(self, **kwargs): + super(WorkbookError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.details = kwargs.get('details', None) + + +class WorkbookErrorException(HttpOperationError): + """Server responsed with exception of type: 'WorkbookError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(WorkbookErrorException, self).__init__(deserialize, response, 'WorkbookError', *args) + + +class WorkItemConfiguration(Model): + """Work item configuration associated with an application insights resource. + + :param connector_id: Connector identifier where work item is created + :type connector_id: str + :param config_display_name: Configuration friendly name + :type config_display_name: str + :param is_default: Boolean value indicating whether configuration is + default + :type is_default: bool + :param id: Unique Id for work item + :type id: str + :param config_properties: Serialized JSON object for detailed properties + :type config_properties: str + """ + + _attribute_map = { + 'connector_id': {'key': 'ConnectorId', 'type': 'str'}, + 'config_display_name': {'key': 'ConfigDisplayName', 'type': 'str'}, + 'is_default': {'key': 'IsDefault', 'type': 'bool'}, + 'id': {'key': 'Id', 'type': 'str'}, + 'config_properties': {'key': 'ConfigProperties', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WorkItemConfiguration, self).__init__(**kwargs) + self.connector_id = kwargs.get('connector_id', None) + self.config_display_name = kwargs.get('config_display_name', None) + self.is_default = kwargs.get('is_default', None) + self.id = kwargs.get('id', None) + self.config_properties = kwargs.get('config_properties', None) + + +class WorkItemConfigurationError(Model): + """Error associated with trying to get work item configuration or + configurations. + + :param code: Error detail code and explanation + :type code: str + :param message: Error message + :type message: str + :param innererror: + :type innererror: ~azure.mgmt.applicationinsights.models.InnerError + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'innererror': {'key': 'innererror', 'type': 'InnerError'}, + } + + def __init__(self, **kwargs): + super(WorkItemConfigurationError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.innererror = kwargs.get('innererror', None) + + +class WorkItemConfigurationErrorException(HttpOperationError): + """Server responsed with exception of type: 'WorkItemConfigurationError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(WorkItemConfigurationErrorException, self).__init__(deserialize, response, 'WorkItemConfigurationError', *args) + + +class WorkItemCreateConfiguration(Model): + """Work item configuration creation payload. + + :param connector_id: Unique connector id + :type connector_id: str + :param connector_data_configuration: Serialized JSON object for detailed + properties + :type connector_data_configuration: str + :param validate_only: Boolean indicating validate only + :type validate_only: bool + :param work_item_properties: Custom work item properties + :type work_item_properties: dict[str, str] + """ + + _attribute_map = { + 'connector_id': {'key': 'ConnectorId', 'type': 'str'}, + 'connector_data_configuration': {'key': 'ConnectorDataConfiguration', 'type': 'str'}, + 'validate_only': {'key': 'ValidateOnly', 'type': 'bool'}, + 'work_item_properties': {'key': 'WorkItemProperties', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(WorkItemCreateConfiguration, self).__init__(**kwargs) + self.connector_id = kwargs.get('connector_id', None) + self.connector_data_configuration = kwargs.get('connector_data_configuration', None) + self.validate_only = kwargs.get('validate_only', None) + self.work_item_properties = kwargs.get('work_item_properties', None) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/_models_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/_models_py3.py new file mode 100644 index 000000000000..eb31c21c949c --- /dev/null +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/_models_py3.py @@ -0,0 +1,1878 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class Annotation(Model): + """Annotation associated with an application insights resource. + + :param annotation_name: Name of annotation + :type annotation_name: str + :param category: Category of annotation, free form + :type category: str + :param event_time: Time when event occurred + :type event_time: datetime + :param id: Unique Id for annotation + :type id: str + :param properties: Serialized JSON object for detailed properties + :type properties: str + :param related_annotation: Related parent annotation if any. Default + value: "null" . + :type related_annotation: str + """ + + _attribute_map = { + 'annotation_name': {'key': 'AnnotationName', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'event_time': {'key': 'EventTime', 'type': 'iso-8601'}, + 'id': {'key': 'Id', 'type': 'str'}, + 'properties': {'key': 'Properties', 'type': 'str'}, + 'related_annotation': {'key': 'RelatedAnnotation', 'type': 'str'}, + } + + def __init__(self, *, annotation_name: str=None, category: str=None, event_time=None, id: str=None, properties: str=None, related_annotation: str="null", **kwargs) -> None: + super(Annotation, self).__init__(**kwargs) + self.annotation_name = annotation_name + self.category = category + self.event_time = event_time + self.id = id + self.properties = properties + self.related_annotation = related_annotation + + +class AnnotationError(Model): + """Error associated with trying to create annotation with Id that already + exist. + + :param code: Error detail code and explanation + :type code: str + :param message: Error message + :type message: str + :param innererror: + :type innererror: ~azure.mgmt.applicationinsights.models.InnerError + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'innererror': {'key': 'innererror', 'type': 'InnerError'}, + } + + def __init__(self, *, code: str=None, message: str=None, innererror=None, **kwargs) -> None: + super(AnnotationError, self).__init__(**kwargs) + self.code = code + self.message = message + self.innererror = innererror + + +class AnnotationErrorException(HttpOperationError): + """Server responsed with exception of type: 'AnnotationError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(AnnotationErrorException, self).__init__(deserialize, response, 'AnnotationError', *args) + + +class APIKeyRequest(Model): + """An Application Insights component API Key creation request definition. + + :param name: The name of the API Key. + :type name: str + :param linked_read_properties: The read access rights of this API Key. + :type linked_read_properties: list[str] + :param linked_write_properties: The write access rights of this API Key. + :type linked_write_properties: list[str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'linked_read_properties': {'key': 'linkedReadProperties', 'type': '[str]'}, + 'linked_write_properties': {'key': 'linkedWriteProperties', 'type': '[str]'}, + } + + def __init__(self, *, name: str=None, linked_read_properties=None, linked_write_properties=None, **kwargs) -> None: + super(APIKeyRequest, self).__init__(**kwargs) + self.name = name + self.linked_read_properties = linked_read_properties + self.linked_write_properties = linked_write_properties + + +class ComponentsResource(Model): + """An azure resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(ComponentsResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class ApplicationInsightsComponent(ComponentsResource): + """An Application Insights component definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param kind: Required. The kind of application that this component refers + to, used to customize UI. This value is a freeform string, values should + typically be one of the following: web, ios, other, store, java, phone. + :type kind: str + :ivar application_id: The unique ID of your application. This field + mirrors the 'Name' field and cannot be changed. + :vartype application_id: str + :ivar app_id: Application Insights Unique ID for your Application. + :vartype app_id: str + :param application_type: Required. Type of application being monitored. + Possible values include: 'web', 'other'. Default value: "web" . + :type application_type: str or + ~azure.mgmt.applicationinsights.models.ApplicationType + :param flow_type: Used by the Application Insights system to determine + what kind of flow this component was created by. This is to be set to + 'Bluefield' when creating/updating a component via the REST API. Possible + values include: 'Bluefield'. Default value: "Bluefield" . + :type flow_type: str or ~azure.mgmt.applicationinsights.models.FlowType + :param request_source: Describes what tool created this Application + Insights component. Customers using this API should set this to the + default 'rest'. Possible values include: 'rest'. Default value: "rest" . + :type request_source: str or + ~azure.mgmt.applicationinsights.models.RequestSource + :ivar instrumentation_key: Application Insights Instrumentation key. A + read-only value that applications can use to identify the destination for + all telemetry sent to Azure Application Insights. This value will be + supplied upon construction of each new Application Insights component. + :vartype instrumentation_key: str + :ivar creation_date: Creation Date for the Application Insights component, + in ISO 8601 format. + :vartype creation_date: datetime + :ivar tenant_id: Azure Tenant Id. + :vartype tenant_id: str + :param hockey_app_id: The unique application ID created when a new + application is added to HockeyApp, used for communications with HockeyApp. + :type hockey_app_id: str + :ivar hockey_app_token: Token used to authenticate communications with + between Application Insights and HockeyApp. + :vartype hockey_app_token: str + :ivar provisioning_state: Current state of this component: whether or not + is has been provisioned within the resource group it is defined. Users + cannot change this value but are able to read from it. Values will include + Succeeded, Deploying, Canceled, and Failed. + :vartype provisioning_state: str + :param sampling_percentage: Percentage of the data produced by the + application being monitored that is being sampled for Application Insights + telemetry. + :type sampling_percentage: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'readonly': True}, + 'app_id': {'readonly': True}, + 'application_type': {'required': True}, + 'instrumentation_key': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'hockey_app_token': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'application_id': {'key': 'properties.ApplicationId', 'type': 'str'}, + 'app_id': {'key': 'properties.AppId', 'type': 'str'}, + 'application_type': {'key': 'properties.Application_Type', 'type': 'str'}, + 'flow_type': {'key': 'properties.Flow_Type', 'type': 'str'}, + 'request_source': {'key': 'properties.Request_Source', 'type': 'str'}, + 'instrumentation_key': {'key': 'properties.InstrumentationKey', 'type': 'str'}, + 'creation_date': {'key': 'properties.CreationDate', 'type': 'iso-8601'}, + 'tenant_id': {'key': 'properties.TenantId', 'type': 'str'}, + 'hockey_app_id': {'key': 'properties.HockeyAppId', 'type': 'str'}, + 'hockey_app_token': {'key': 'properties.HockeyAppToken', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'sampling_percentage': {'key': 'properties.SamplingPercentage', 'type': 'float'}, + } + + def __init__(self, *, location: str, kind: str, tags=None, application_type="web", flow_type="Bluefield", request_source="rest", hockey_app_id: str=None, sampling_percentage: float=None, **kwargs) -> None: + super(ApplicationInsightsComponent, self).__init__(location=location, tags=tags, **kwargs) + self.kind = kind + self.application_id = None + self.app_id = None + self.application_type = application_type + self.flow_type = flow_type + self.request_source = request_source + self.instrumentation_key = None + self.creation_date = None + self.tenant_id = None + self.hockey_app_id = hockey_app_id + self.hockey_app_token = None + self.provisioning_state = None + self.sampling_percentage = sampling_percentage + + +class ApplicationInsightsComponentAnalyticsItem(Model): + """Properties that define an Analytics item that is associated to an + Application Insights component. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: Internally assigned unique id of the item definition. + :type id: str + :param name: The user-defined name of the item. + :type name: str + :param content: The content of this item + :type content: str + :ivar version: This instance's version of the data model. This can change + as new features are added. + :vartype version: str + :param scope: Enum indicating if this item definition is owned by a + specific user or is shared between all users with access to the + Application Insights component. Possible values include: 'shared', 'user' + :type scope: str or ~azure.mgmt.applicationinsights.models.ItemScope + :param type: Enum indicating the type of the Analytics item. Possible + values include: 'query', 'function', 'folder', 'recent' + :type type: str or ~azure.mgmt.applicationinsights.models.ItemType + :ivar time_created: Date and time in UTC when this item was created. + :vartype time_created: str + :ivar time_modified: Date and time in UTC of the last modification that + was made to this item. + :vartype time_modified: str + :param properties: + :type properties: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentAnalyticsItemProperties + """ + + _validation = { + 'version': {'readonly': True}, + 'time_created': {'readonly': True}, + 'time_modified': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'content': {'key': 'Content', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'scope': {'key': 'Scope', 'type': 'str'}, + 'type': {'key': 'Type', 'type': 'str'}, + 'time_created': {'key': 'TimeCreated', 'type': 'str'}, + 'time_modified': {'key': 'TimeModified', 'type': 'str'}, + 'properties': {'key': 'Properties', 'type': 'ApplicationInsightsComponentAnalyticsItemProperties'}, + } + + def __init__(self, *, id: str=None, name: str=None, content: str=None, scope=None, type=None, properties=None, **kwargs) -> None: + super(ApplicationInsightsComponentAnalyticsItem, self).__init__(**kwargs) + self.id = id + self.name = name + self.content = content + self.version = None + self.scope = scope + self.type = type + self.time_created = None + self.time_modified = None + self.properties = properties + + +class ApplicationInsightsComponentAnalyticsItemProperties(Model): + """A set of properties that can be defined in the context of a specific item + type. Each type may have its own properties. + + :param function_alias: A function alias, used when the type of the item is + Function + :type function_alias: str + """ + + _attribute_map = { + 'function_alias': {'key': 'functionAlias', 'type': 'str'}, + } + + def __init__(self, *, function_alias: str=None, **kwargs) -> None: + super(ApplicationInsightsComponentAnalyticsItemProperties, self).__init__(**kwargs) + self.function_alias = function_alias + + +class ApplicationInsightsComponentAPIKey(Model): + """Properties that define an API key of an Application Insights Component. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique ID of the API key inside an Application Insights + component. It is auto generated when the API key is created. + :vartype id: str + :ivar api_key: The API key value. It will be only return once when the API + Key was created. + :vartype api_key: str + :param created_date: The create date of this API key. + :type created_date: str + :param name: The name of the API key. + :type name: str + :param linked_read_properties: The read access rights of this API Key. + :type linked_read_properties: list[str] + :param linked_write_properties: The write access rights of this API Key. + :type linked_write_properties: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'api_key': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'api_key': {'key': 'apiKey', 'type': 'str'}, + 'created_date': {'key': 'createdDate', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'linked_read_properties': {'key': 'linkedReadProperties', 'type': '[str]'}, + 'linked_write_properties': {'key': 'linkedWriteProperties', 'type': '[str]'}, + } + + def __init__(self, *, created_date: str=None, name: str=None, linked_read_properties=None, linked_write_properties=None, **kwargs) -> None: + super(ApplicationInsightsComponentAPIKey, self).__init__(**kwargs) + self.id = None + self.api_key = None + self.created_date = created_date + self.name = name + self.linked_read_properties = linked_read_properties + self.linked_write_properties = linked_write_properties + + +class ApplicationInsightsComponentAvailableFeatures(Model): + """An Application Insights component available features. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar result: A list of Application Insights component feature. + :vartype result: + list[~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentFeature] + """ + + _validation = { + 'result': {'readonly': True}, + } + + _attribute_map = { + 'result': {'key': 'Result', 'type': '[ApplicationInsightsComponentFeature]'}, + } + + def __init__(self, **kwargs) -> None: + super(ApplicationInsightsComponentAvailableFeatures, self).__init__(**kwargs) + self.result = None + + +class ApplicationInsightsComponentBillingFeatures(Model): + """An Application Insights component billing features. + + :param data_volume_cap: An Application Insights component daily data + volume cap + :type data_volume_cap: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentDataVolumeCap + :param current_billing_features: Current enabled pricing plan. When the + component is in the Enterprise plan, this will list both 'Basic' and + 'Application Insights Enterprise'. + :type current_billing_features: list[str] + """ + + _attribute_map = { + 'data_volume_cap': {'key': 'DataVolumeCap', 'type': 'ApplicationInsightsComponentDataVolumeCap'}, + 'current_billing_features': {'key': 'CurrentBillingFeatures', 'type': '[str]'}, + } + + def __init__(self, *, data_volume_cap=None, current_billing_features=None, **kwargs) -> None: + super(ApplicationInsightsComponentBillingFeatures, self).__init__(**kwargs) + self.data_volume_cap = data_volume_cap + self.current_billing_features = current_billing_features + + +class ApplicationInsightsComponentDataVolumeCap(Model): + """An Application Insights component daily data volume cap. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param cap: Daily data volume cap in GB. + :type cap: float + :ivar reset_time: Daily data volume cap UTC reset hour. + :vartype reset_time: int + :param warning_threshold: Reserved, not used for now. + :type warning_threshold: int + :param stop_send_notification_when_hit_threshold: Reserved, not used for + now. + :type stop_send_notification_when_hit_threshold: bool + :param stop_send_notification_when_hit_cap: Do not send a notification + email when the daily data volume cap is met. + :type stop_send_notification_when_hit_cap: bool + :ivar max_history_cap: Maximum daily data volume cap that the user can set + for this component. + :vartype max_history_cap: float + """ + + _validation = { + 'reset_time': {'readonly': True}, + 'max_history_cap': {'readonly': True}, + } + + _attribute_map = { + 'cap': {'key': 'Cap', 'type': 'float'}, + 'reset_time': {'key': 'ResetTime', 'type': 'int'}, + 'warning_threshold': {'key': 'WarningThreshold', 'type': 'int'}, + 'stop_send_notification_when_hit_threshold': {'key': 'StopSendNotificationWhenHitThreshold', 'type': 'bool'}, + 'stop_send_notification_when_hit_cap': {'key': 'StopSendNotificationWhenHitCap', 'type': 'bool'}, + 'max_history_cap': {'key': 'MaxHistoryCap', 'type': 'float'}, + } + + def __init__(self, *, cap: float=None, warning_threshold: int=None, stop_send_notification_when_hit_threshold: bool=None, stop_send_notification_when_hit_cap: bool=None, **kwargs) -> None: + super(ApplicationInsightsComponentDataVolumeCap, self).__init__(**kwargs) + self.cap = cap + self.reset_time = None + self.warning_threshold = warning_threshold + self.stop_send_notification_when_hit_threshold = stop_send_notification_when_hit_threshold + self.stop_send_notification_when_hit_cap = stop_send_notification_when_hit_cap + self.max_history_cap = None + + +class ApplicationInsightsComponentExportConfiguration(Model): + """Properties that define a Continuous Export configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar export_id: The unique ID of the export configuration inside an + Application Insights component. It is auto generated when the Continuous + Export configuration is created. + :vartype export_id: str + :ivar instrumentation_key: The instrumentation key of the Application + Insights component. + :vartype instrumentation_key: str + :param record_types: This comma separated list of document types that will + be exported. The possible values include 'Requests', 'Event', + 'Exceptions', 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd', + 'PerformanceCounters', 'Availability', 'Messages'. + :type record_types: str + :ivar application_name: The name of the Application Insights component. + :vartype application_name: str + :ivar subscription_id: The subscription of the Application Insights + component. + :vartype subscription_id: str + :ivar resource_group: The resource group of the Application Insights + component. + :vartype resource_group: str + :ivar destination_storage_subscription_id: The destination storage account + subscription ID. + :vartype destination_storage_subscription_id: str + :ivar destination_storage_location_id: The destination account location + ID. + :vartype destination_storage_location_id: str + :ivar destination_account_id: The name of destination account. + :vartype destination_account_id: str + :ivar destination_type: The destination type. + :vartype destination_type: str + :ivar is_user_enabled: This will be 'true' if the Continuous Export + configuration is enabled, otherwise it will be 'false'. + :vartype is_user_enabled: str + :ivar last_user_update: Last time the Continuous Export configuration was + updated. + :vartype last_user_update: str + :param notification_queue_enabled: Deprecated + :type notification_queue_enabled: str + :ivar export_status: This indicates current Continuous Export + configuration status. The possible values are 'Preparing', 'Success', + 'Failure'. + :vartype export_status: str + :ivar last_success_time: The last time data was successfully delivered to + the destination storage container for this Continuous Export + configuration. + :vartype last_success_time: str + :ivar last_gap_time: The last time the Continuous Export configuration + started failing. + :vartype last_gap_time: str + :ivar permanent_error_reason: This is the reason the Continuous Export + configuration started failing. It can be 'AzureStorageNotFound' or + 'AzureStorageAccessDenied'. + :vartype permanent_error_reason: str + :ivar storage_name: The name of the destination storage account. + :vartype storage_name: str + :ivar container_name: The name of the destination storage container. + :vartype container_name: str + """ + + _validation = { + 'export_id': {'readonly': True}, + 'instrumentation_key': {'readonly': True}, + 'application_name': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'destination_storage_subscription_id': {'readonly': True}, + 'destination_storage_location_id': {'readonly': True}, + 'destination_account_id': {'readonly': True}, + 'destination_type': {'readonly': True}, + 'is_user_enabled': {'readonly': True}, + 'last_user_update': {'readonly': True}, + 'export_status': {'readonly': True}, + 'last_success_time': {'readonly': True}, + 'last_gap_time': {'readonly': True}, + 'permanent_error_reason': {'readonly': True}, + 'storage_name': {'readonly': True}, + 'container_name': {'readonly': True}, + } + + _attribute_map = { + 'export_id': {'key': 'ExportId', 'type': 'str'}, + 'instrumentation_key': {'key': 'InstrumentationKey', 'type': 'str'}, + 'record_types': {'key': 'RecordTypes', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'subscription_id': {'key': 'SubscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'ResourceGroup', 'type': 'str'}, + 'destination_storage_subscription_id': {'key': 'DestinationStorageSubscriptionId', 'type': 'str'}, + 'destination_storage_location_id': {'key': 'DestinationStorageLocationId', 'type': 'str'}, + 'destination_account_id': {'key': 'DestinationAccountId', 'type': 'str'}, + 'destination_type': {'key': 'DestinationType', 'type': 'str'}, + 'is_user_enabled': {'key': 'IsUserEnabled', 'type': 'str'}, + 'last_user_update': {'key': 'LastUserUpdate', 'type': 'str'}, + 'notification_queue_enabled': {'key': 'NotificationQueueEnabled', 'type': 'str'}, + 'export_status': {'key': 'ExportStatus', 'type': 'str'}, + 'last_success_time': {'key': 'LastSuccessTime', 'type': 'str'}, + 'last_gap_time': {'key': 'LastGapTime', 'type': 'str'}, + 'permanent_error_reason': {'key': 'PermanentErrorReason', 'type': 'str'}, + 'storage_name': {'key': 'StorageName', 'type': 'str'}, + 'container_name': {'key': 'ContainerName', 'type': 'str'}, + } + + def __init__(self, *, record_types: str=None, notification_queue_enabled: str=None, **kwargs) -> None: + super(ApplicationInsightsComponentExportConfiguration, self).__init__(**kwargs) + self.export_id = None + self.instrumentation_key = None + self.record_types = record_types + self.application_name = None + self.subscription_id = None + self.resource_group = None + self.destination_storage_subscription_id = None + self.destination_storage_location_id = None + self.destination_account_id = None + self.destination_type = None + self.is_user_enabled = None + self.last_user_update = None + self.notification_queue_enabled = notification_queue_enabled + self.export_status = None + self.last_success_time = None + self.last_gap_time = None + self.permanent_error_reason = None + self.storage_name = None + self.container_name = None + + +class ApplicationInsightsComponentExportRequest(Model): + """An Application Insights component Continuous Export configuration request + definition. + + :param record_types: The document types to be exported, as comma separated + values. Allowed values include 'Requests', 'Event', 'Exceptions', + 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd', + 'PerformanceCounters', 'Availability', 'Messages'. + :type record_types: str + :param destination_type: The Continuous Export destination type. This has + to be 'Blob'. + :type destination_type: str + :param destination_address: The SAS URL for the destination storage + container. It must grant write permission. + :type destination_address: str + :param is_enabled: Set to 'true' to create a Continuous Export + configuration as enabled, otherwise set it to 'false'. + :type is_enabled: str + :param notification_queue_enabled: Deprecated + :type notification_queue_enabled: str + :param notification_queue_uri: Deprecated + :type notification_queue_uri: str + :param destination_storage_subscription_id: The subscription ID of the + destination storage container. + :type destination_storage_subscription_id: str + :param destination_storage_location_id: The location ID of the destination + storage container. + :type destination_storage_location_id: str + :param destination_account_id: The name of destination storage account. + :type destination_account_id: str + """ + + _attribute_map = { + 'record_types': {'key': 'RecordTypes', 'type': 'str'}, + 'destination_type': {'key': 'DestinationType', 'type': 'str'}, + 'destination_address': {'key': 'DestinationAddress', 'type': 'str'}, + 'is_enabled': {'key': 'IsEnabled', 'type': 'str'}, + 'notification_queue_enabled': {'key': 'NotificationQueueEnabled', 'type': 'str'}, + 'notification_queue_uri': {'key': 'NotificationQueueUri', 'type': 'str'}, + 'destination_storage_subscription_id': {'key': 'DestinationStorageSubscriptionId', 'type': 'str'}, + 'destination_storage_location_id': {'key': 'DestinationStorageLocationId', 'type': 'str'}, + 'destination_account_id': {'key': 'DestinationAccountId', 'type': 'str'}, + } + + def __init__(self, *, record_types: str=None, destination_type: str=None, destination_address: str=None, is_enabled: str=None, notification_queue_enabled: str=None, notification_queue_uri: str=None, destination_storage_subscription_id: str=None, destination_storage_location_id: str=None, destination_account_id: str=None, **kwargs) -> None: + super(ApplicationInsightsComponentExportRequest, self).__init__(**kwargs) + self.record_types = record_types + self.destination_type = destination_type + self.destination_address = destination_address + self.is_enabled = is_enabled + self.notification_queue_enabled = notification_queue_enabled + self.notification_queue_uri = notification_queue_uri + self.destination_storage_subscription_id = destination_storage_subscription_id + self.destination_storage_location_id = destination_storage_location_id + self.destination_account_id = destination_account_id + + +class ApplicationInsightsComponentFavorite(Model): + """Properties that define a favorite that is associated to an Application + Insights component. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param name: The user-defined name of the favorite. + :type name: str + :param config: Configuration of this particular favorite, which are driven + by the Azure portal UX. Configuration data is a string containing valid + JSON + :type config: str + :param version: This instance's version of the data model. This can change + as new features are added that can be marked favorite. Current examples + include MetricsExplorer (ME) and Search. + :type version: str + :ivar favorite_id: Internally assigned unique id of the favorite + definition. + :vartype favorite_id: str + :param favorite_type: Enum indicating if this favorite definition is owned + by a specific user or is shared between all users with access to the + Application Insights component. Possible values include: 'shared', 'user' + :type favorite_type: str or + ~azure.mgmt.applicationinsights.models.FavoriteType + :param source_type: The source of the favorite definition. + :type source_type: str + :ivar time_modified: Date and time in UTC of the last modification that + was made to this favorite definition. + :vartype time_modified: str + :param tags: A list of 0 or more tags that are associated with this + favorite definition + :type tags: list[str] + :param category: Favorite category, as defined by the user at creation + time. + :type category: str + :param is_generated_from_template: Flag denoting wether or not this + favorite was generated from a template. + :type is_generated_from_template: bool + :ivar user_id: Unique user id of the specific user that owns this + favorite. + :vartype user_id: str + """ + + _validation = { + 'favorite_id': {'readonly': True}, + 'time_modified': {'readonly': True}, + 'user_id': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'config': {'key': 'Config', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'favorite_id': {'key': 'FavoriteId', 'type': 'str'}, + 'favorite_type': {'key': 'FavoriteType', 'type': 'FavoriteType'}, + 'source_type': {'key': 'SourceType', 'type': 'str'}, + 'time_modified': {'key': 'TimeModified', 'type': 'str'}, + 'tags': {'key': 'Tags', 'type': '[str]'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'is_generated_from_template': {'key': 'IsGeneratedFromTemplate', 'type': 'bool'}, + 'user_id': {'key': 'UserId', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, config: str=None, version: str=None, favorite_type=None, source_type: str=None, tags=None, category: str=None, is_generated_from_template: bool=None, **kwargs) -> None: + super(ApplicationInsightsComponentFavorite, self).__init__(**kwargs) + self.name = name + self.config = config + self.version = version + self.favorite_id = None + self.favorite_type = favorite_type + self.source_type = source_type + self.time_modified = None + self.tags = tags + self.category = category + self.is_generated_from_template = is_generated_from_template + self.user_id = None + + +class ApplicationInsightsComponentFeature(Model): + """An Application Insights component daily data volume cap status. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar feature_name: The pricing feature name. + :vartype feature_name: str + :ivar meter_id: The meter id used for the feature. + :vartype meter_id: str + :ivar meter_rate_frequency: The meter rate for the feature's meter. + :vartype meter_rate_frequency: str + :ivar resouce_id: Reserved, not used now. + :vartype resouce_id: str + :ivar is_hidden: Reserved, not used now. + :vartype is_hidden: bool + :ivar capabilities: A list of Application Insights component feature + capability. + :vartype capabilities: + list[~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentFeatureCapability] + :ivar title: Display name of the feature. + :vartype title: str + :ivar is_main_feature: Whether can apply addon feature on to it. + :vartype is_main_feature: bool + :ivar supported_addon_features: The add on features on main feature. + :vartype supported_addon_features: str + """ + + _validation = { + 'feature_name': {'readonly': True}, + 'meter_id': {'readonly': True}, + 'meter_rate_frequency': {'readonly': True}, + 'resouce_id': {'readonly': True}, + 'is_hidden': {'readonly': True}, + 'capabilities': {'readonly': True}, + 'title': {'readonly': True}, + 'is_main_feature': {'readonly': True}, + 'supported_addon_features': {'readonly': True}, + } + + _attribute_map = { + 'feature_name': {'key': 'FeatureName', 'type': 'str'}, + 'meter_id': {'key': 'MeterId', 'type': 'str'}, + 'meter_rate_frequency': {'key': 'MeterRateFrequency', 'type': 'str'}, + 'resouce_id': {'key': 'ResouceId', 'type': 'str'}, + 'is_hidden': {'key': 'IsHidden', 'type': 'bool'}, + 'capabilities': {'key': 'Capabilities', 'type': '[ApplicationInsightsComponentFeatureCapability]'}, + 'title': {'key': 'Title', 'type': 'str'}, + 'is_main_feature': {'key': 'IsMainFeature', 'type': 'bool'}, + 'supported_addon_features': {'key': 'SupportedAddonFeatures', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ApplicationInsightsComponentFeature, self).__init__(**kwargs) + self.feature_name = None + self.meter_id = None + self.meter_rate_frequency = None + self.resouce_id = None + self.is_hidden = None + self.capabilities = None + self.title = None + self.is_main_feature = None + self.supported_addon_features = None + + +class ApplicationInsightsComponentFeatureCapabilities(Model): + """An Application Insights component feature capabilities. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar support_export_data: Whether allow to use continuous export feature. + :vartype support_export_data: bool + :ivar burst_throttle_policy: Reserved, not used now. + :vartype burst_throttle_policy: str + :ivar metadata_class: Reserved, not used now. + :vartype metadata_class: str + :ivar live_stream_metrics: Reserved, not used now. + :vartype live_stream_metrics: bool + :ivar application_map: Reserved, not used now. + :vartype application_map: bool + :ivar work_item_integration: Whether allow to use work item integration + feature. + :vartype work_item_integration: bool + :ivar power_bi_integration: Reserved, not used now. + :vartype power_bi_integration: bool + :ivar open_schema: Reserved, not used now. + :vartype open_schema: bool + :ivar proactive_detection: Reserved, not used now. + :vartype proactive_detection: bool + :ivar analytics_integration: Reserved, not used now. + :vartype analytics_integration: bool + :ivar multiple_step_web_test: Whether allow to use multiple steps web test + feature. + :vartype multiple_step_web_test: bool + :ivar api_access_level: Reserved, not used now. + :vartype api_access_level: str + :ivar tracking_type: The application insights component used tracking + type. + :vartype tracking_type: str + :ivar daily_cap: Daily data volume cap in GB. + :vartype daily_cap: float + :ivar daily_cap_reset_time: Daily data volume cap UTC reset hour. + :vartype daily_cap_reset_time: float + :ivar throttle_rate: Reserved, not used now. + :vartype throttle_rate: float + """ + + _validation = { + 'support_export_data': {'readonly': True}, + 'burst_throttle_policy': {'readonly': True}, + 'metadata_class': {'readonly': True}, + 'live_stream_metrics': {'readonly': True}, + 'application_map': {'readonly': True}, + 'work_item_integration': {'readonly': True}, + 'power_bi_integration': {'readonly': True}, + 'open_schema': {'readonly': True}, + 'proactive_detection': {'readonly': True}, + 'analytics_integration': {'readonly': True}, + 'multiple_step_web_test': {'readonly': True}, + 'api_access_level': {'readonly': True}, + 'tracking_type': {'readonly': True}, + 'daily_cap': {'readonly': True}, + 'daily_cap_reset_time': {'readonly': True}, + 'throttle_rate': {'readonly': True}, + } + + _attribute_map = { + 'support_export_data': {'key': 'SupportExportData', 'type': 'bool'}, + 'burst_throttle_policy': {'key': 'BurstThrottlePolicy', 'type': 'str'}, + 'metadata_class': {'key': 'MetadataClass', 'type': 'str'}, + 'live_stream_metrics': {'key': 'LiveStreamMetrics', 'type': 'bool'}, + 'application_map': {'key': 'ApplicationMap', 'type': 'bool'}, + 'work_item_integration': {'key': 'WorkItemIntegration', 'type': 'bool'}, + 'power_bi_integration': {'key': 'PowerBIIntegration', 'type': 'bool'}, + 'open_schema': {'key': 'OpenSchema', 'type': 'bool'}, + 'proactive_detection': {'key': 'ProactiveDetection', 'type': 'bool'}, + 'analytics_integration': {'key': 'AnalyticsIntegration', 'type': 'bool'}, + 'multiple_step_web_test': {'key': 'MultipleStepWebTest', 'type': 'bool'}, + 'api_access_level': {'key': 'ApiAccessLevel', 'type': 'str'}, + 'tracking_type': {'key': 'TrackingType', 'type': 'str'}, + 'daily_cap': {'key': 'DailyCap', 'type': 'float'}, + 'daily_cap_reset_time': {'key': 'DailyCapResetTime', 'type': 'float'}, + 'throttle_rate': {'key': 'ThrottleRate', 'type': 'float'}, + } + + def __init__(self, **kwargs) -> None: + super(ApplicationInsightsComponentFeatureCapabilities, self).__init__(**kwargs) + self.support_export_data = None + self.burst_throttle_policy = None + self.metadata_class = None + self.live_stream_metrics = None + self.application_map = None + self.work_item_integration = None + self.power_bi_integration = None + self.open_schema = None + self.proactive_detection = None + self.analytics_integration = None + self.multiple_step_web_test = None + self.api_access_level = None + self.tracking_type = None + self.daily_cap = None + self.daily_cap_reset_time = None + self.throttle_rate = None + + +class ApplicationInsightsComponentFeatureCapability(Model): + """An Application Insights component feature capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the capability. + :vartype name: str + :ivar description: The description of the capability. + :vartype description: str + :ivar value: The value of the capability. + :vartype value: str + :ivar unit: The unit of the capability. + :vartype unit: str + :ivar meter_id: The meter used for the capability. + :vartype meter_id: str + :ivar meter_rate_frequency: The meter rate of the meter. + :vartype meter_rate_frequency: str + """ + + _validation = { + 'name': {'readonly': True}, + 'description': {'readonly': True}, + 'value': {'readonly': True}, + 'unit': {'readonly': True}, + 'meter_id': {'readonly': True}, + 'meter_rate_frequency': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'str'}, + 'unit': {'key': 'Unit', 'type': 'str'}, + 'meter_id': {'key': 'MeterId', 'type': 'str'}, + 'meter_rate_frequency': {'key': 'MeterRateFrequency', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ApplicationInsightsComponentFeatureCapability, self).__init__(**kwargs) + self.name = None + self.description = None + self.value = None + self.unit = None + self.meter_id = None + self.meter_rate_frequency = None + + +class ApplicationInsightsComponentProactiveDetectionConfiguration(Model): + """Properties that define a ProactiveDetection configuration. + + :param name: The rule name + :type name: str + :param enabled: A flag that indicates whether this rule is enabled by the + user + :type enabled: bool + :param send_emails_to_subscription_owners: A flag that indicated whether + notifications on this rule should be sent to subscription owners + :type send_emails_to_subscription_owners: bool + :param custom_emails: Custom email addresses for this rule notifications + :type custom_emails: list[str] + :param last_updated_time: The last time this rule was updated + :type last_updated_time: str + :param rule_definitions: Static definitions of the ProactiveDetection + configuration rule (same values for all components). + :type rule_definitions: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'enabled': {'key': 'Enabled', 'type': 'bool'}, + 'send_emails_to_subscription_owners': {'key': 'SendEmailsToSubscriptionOwners', 'type': 'bool'}, + 'custom_emails': {'key': 'CustomEmails', 'type': '[str]'}, + 'last_updated_time': {'key': 'LastUpdatedTime', 'type': 'str'}, + 'rule_definitions': {'key': 'RuleDefinitions', 'type': 'ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions'}, + } + + def __init__(self, *, name: str=None, enabled: bool=None, send_emails_to_subscription_owners: bool=None, custom_emails=None, last_updated_time: str=None, rule_definitions=None, **kwargs) -> None: + super(ApplicationInsightsComponentProactiveDetectionConfiguration, self).__init__(**kwargs) + self.name = name + self.enabled = enabled + self.send_emails_to_subscription_owners = send_emails_to_subscription_owners + self.custom_emails = custom_emails + self.last_updated_time = last_updated_time + self.rule_definitions = rule_definitions + + +class ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions(Model): + """Static definitions of the ProactiveDetection configuration rule (same + values for all components). + + :param name: The rule name + :type name: str + :param display_name: The rule name as it is displayed in UI + :type display_name: str + :param description: The rule description + :type description: str + :param help_url: URL which displays additional info about the proactive + detection rule + :type help_url: str + :param is_hidden: A flag indicating whether the rule is hidden (from the + UI) + :type is_hidden: bool + :param is_enabled_by_default: A flag indicating whether the rule is + enabled by default + :type is_enabled_by_default: bool + :param is_in_preview: A flag indicating whether the rule is in preview + :type is_in_preview: bool + :param supports_email_notifications: A flag indicating whether email + notifications are supported for detections for this rule + :type supports_email_notifications: bool + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'display_name': {'key': 'DisplayName', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'help_url': {'key': 'HelpUrl', 'type': 'str'}, + 'is_hidden': {'key': 'IsHidden', 'type': 'bool'}, + 'is_enabled_by_default': {'key': 'IsEnabledByDefault', 'type': 'bool'}, + 'is_in_preview': {'key': 'IsInPreview', 'type': 'bool'}, + 'supports_email_notifications': {'key': 'SupportsEmailNotifications', 'type': 'bool'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, description: str=None, help_url: str=None, is_hidden: bool=None, is_enabled_by_default: bool=None, is_in_preview: bool=None, supports_email_notifications: bool=None, **kwargs) -> None: + super(ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.description = description + self.help_url = help_url + self.is_hidden = is_hidden + self.is_enabled_by_default = is_enabled_by_default + self.is_in_preview = is_in_preview + self.supports_email_notifications = supports_email_notifications + + +class ApplicationInsightsComponentQuotaStatus(Model): + """An Application Insights component daily data volume cap status. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar app_id: The Application ID for the Application Insights component. + :vartype app_id: str + :ivar should_be_throttled: The daily data volume cap is met, and data + ingestion will be stopped. + :vartype should_be_throttled: bool + :ivar expiration_time: Date and time when the daily data volume cap will + be reset, and data ingestion will resume. + :vartype expiration_time: str + """ + + _validation = { + 'app_id': {'readonly': True}, + 'should_be_throttled': {'readonly': True}, + 'expiration_time': {'readonly': True}, + } + + _attribute_map = { + 'app_id': {'key': 'AppId', 'type': 'str'}, + 'should_be_throttled': {'key': 'ShouldBeThrottled', 'type': 'bool'}, + 'expiration_time': {'key': 'ExpirationTime', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ApplicationInsightsComponentQuotaStatus, self).__init__(**kwargs) + self.app_id = None + self.should_be_throttled = None + self.expiration_time = None + + +class ApplicationInsightsComponentWebTestLocation(Model): + """Properties that define a web test location available to an Application + Insights Component. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar display_name: The display name of the web test location. + :vartype display_name: str + :ivar tag: Internally defined geographic location tag. + :vartype tag: str + """ + + _validation = { + 'display_name': {'readonly': True}, + 'tag': {'readonly': True}, + } + + _attribute_map = { + 'display_name': {'key': 'DisplayName', 'type': 'str'}, + 'tag': {'key': 'Tag', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ApplicationInsightsComponentWebTestLocation, self).__init__(**kwargs) + self.display_name = None + self.tag = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ComponentPurgeBody(Model): + """Describes the body of a purge request for an App Insights component. + + All required parameters must be populated in order to send to Azure. + + :param table: Required. Table from which to purge data. + :type table: str + :param filters: Required. The set of columns and filters (queries) to run + over them to purge the resulting data. + :type filters: + list[~azure.mgmt.applicationinsights.models.ComponentPurgeBodyFilters] + """ + + _validation = { + 'table': {'required': True}, + 'filters': {'required': True}, + } + + _attribute_map = { + 'table': {'key': 'table', 'type': 'str'}, + 'filters': {'key': 'filters', 'type': '[ComponentPurgeBodyFilters]'}, + } + + def __init__(self, *, table: str, filters, **kwargs) -> None: + super(ComponentPurgeBody, self).__init__(**kwargs) + self.table = table + self.filters = filters + + +class ComponentPurgeBodyFilters(Model): + """User-defined filters to return data which will be purged from the table. + + :param column: The column of the table over which the given query should + run + :type column: str + :param operator: A query operator to evaluate over the provided column and + value(s). Supported operators are ==, =~, in, in~, >, >=, <, <=, between, + and have the same behavior as they would in a KQL query. + :type operator: str + :param value: the value for the operator to function over. This can be a + number (e.g., > 100), a string (timestamp >= '2017-09-01') or array of + values. + :type value: object + :param key: When filtering over custom dimensions, this key will be used + as the name of the custom dimension. + :type key: str + """ + + _attribute_map = { + 'column': {'key': 'column', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'object'}, + 'key': {'key': 'key', 'type': 'str'}, + } + + def __init__(self, *, column: str=None, operator: str=None, value=None, key: str=None, **kwargs) -> None: + super(ComponentPurgeBodyFilters, self).__init__(**kwargs) + self.column = column + self.operator = operator + self.value = value + self.key = key + + +class ComponentPurgeResponse(Model): + """Response containing operationId for a specific purge action. + + All required parameters must be populated in order to send to Azure. + + :param operation_id: Required. Id to use when querying for status for a + particular purge operation. + :type operation_id: str + """ + + _validation = { + 'operation_id': {'required': True}, + } + + _attribute_map = { + 'operation_id': {'key': 'operationId', 'type': 'str'}, + } + + def __init__(self, *, operation_id: str, **kwargs) -> None: + super(ComponentPurgeResponse, self).__init__(**kwargs) + self.operation_id = operation_id + + +class ComponentPurgeStatusResponse(Model): + """Response containing status for a specific purge operation. + + All required parameters must be populated in order to send to Azure. + + :param status: Required. Status of the operation represented by the + requested Id. Possible values include: 'pending', 'completed' + :type status: str or ~azure.mgmt.applicationinsights.models.PurgeState + """ + + _validation = { + 'status': {'required': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, *, status, **kwargs) -> None: + super(ComponentPurgeStatusResponse, self).__init__(**kwargs) + self.status = status + + +class ErrorFieldContract(Model): + """Error Field contract. + + :param code: Property level error code. + :type code: str + :param message: Human-readable representation of property-level error. + :type message: str + :param target: Property name. + :type target: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, target: str=None, **kwargs) -> None: + super(ErrorFieldContract, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + + +class ErrorResponse(Model): + """Error response indicates Insights service is not able to process the + incoming request. The reason is provided in the error message. + + :param code: Error code. + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.code = code + self.message = message + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class InnerError(Model): + """Inner error. + + :param diagnosticcontext: Provides correlation for request + :type diagnosticcontext: str + :param time: Request time + :type time: datetime + """ + + _attribute_map = { + 'diagnosticcontext': {'key': 'diagnosticcontext', 'type': 'str'}, + 'time': {'key': 'time', 'type': 'iso-8601'}, + } + + def __init__(self, *, diagnosticcontext: str=None, time=None, **kwargs) -> None: + super(InnerError, self).__init__(**kwargs) + self.diagnosticcontext = diagnosticcontext + self.time = time + + +class LinkProperties(Model): + """Contains a sourceId and workbook resource id to link two resources. + + :param source_id: The source Azure resource id + :type source_id: str + :param target_id: The workbook Azure resource id + :type target_id: str + :param category: The category of workbook + :type category: str + """ + + _attribute_map = { + 'source_id': {'key': 'sourceId', 'type': 'str'}, + 'target_id': {'key': 'targetId', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + } + + def __init__(self, *, source_id: str=None, target_id: str=None, category: str=None, **kwargs) -> None: + super(LinkProperties, self).__init__(**kwargs) + self.source_id = source_id + self.target_id = target_id + self.category = category + + +class Operation(Model): + """CDN REST API operation. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: The object that represents the operation. + :type display: ~azure.mgmt.applicationinsights.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, name: str=None, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display + + +class OperationDisplay(Model): + """The object that represents the operation. + + :param provider: Service provider: Microsoft.Cdn + :type provider: str + :param resource: Resource on which the operation is performed: Profile, + endpoint, etc. + :type resource: str + :param operation: Operation type: Read, write, delete, etc. + :type operation: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + + +class TagsResource(Model): + """A container holding only the Tags for a resource, allowing the user to + update the tags on a WebTest instance. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(TagsResource, self).__init__(**kwargs) + self.tags = tags + + +class WebtestsResource(Model): + """An azure resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(WebtestsResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class WebTest(WebtestsResource): + """An Application Insights web test definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param kind: The kind of web test that this web test watches. Choices are + ping and multistep. Possible values include: 'ping', 'multistep'. Default + value: "ping" . + :type kind: str or ~azure.mgmt.applicationinsights.models.WebTestKind + :param synthetic_monitor_id: Required. Unique ID of this WebTest. This is + typically the same value as the Name field. + :type synthetic_monitor_id: str + :param web_test_name: Required. User defined name if this WebTest. + :type web_test_name: str + :param description: Purpose/user defined descriptive test for this + WebTest. + :type description: str + :param enabled: Is the test actively being monitored. + :type enabled: bool + :param frequency: Interval in seconds between test runs for this WebTest. + Default value is 300. Default value: 300 . + :type frequency: int + :param timeout: Seconds until this WebTest will timeout and fail. Default + value is 30. Default value: 30 . + :type timeout: int + :param web_test_kind: Required. The kind of web test this is, valid + choices are ping and multistep. Possible values include: 'ping', + 'multistep'. Default value: "ping" . + :type web_test_kind: str or + ~azure.mgmt.applicationinsights.models.WebTestKind + :param retry_enabled: Allow for retries should this WebTest fail. + :type retry_enabled: bool + :param locations: Required. A list of where to physically run the tests + from to give global coverage for accessibility of your application. + :type locations: + list[~azure.mgmt.applicationinsights.models.WebTestGeolocation] + :param configuration: An XML configuration specification for a WebTest. + :type configuration: + ~azure.mgmt.applicationinsights.models.WebTestPropertiesConfiguration + :ivar provisioning_state: Current state of this component, whether or not + is has been provisioned within the resource group it is defined. Users + cannot change this value but are able to read from it. Values will include + Succeeded, Deploying, Canceled, and Failed. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'synthetic_monitor_id': {'required': True}, + 'web_test_name': {'required': True}, + 'web_test_kind': {'required': True}, + 'locations': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'WebTestKind'}, + 'synthetic_monitor_id': {'key': 'properties.SyntheticMonitorId', 'type': 'str'}, + 'web_test_name': {'key': 'properties.Name', 'type': 'str'}, + 'description': {'key': 'properties.Description', 'type': 'str'}, + 'enabled': {'key': 'properties.Enabled', 'type': 'bool'}, + 'frequency': {'key': 'properties.Frequency', 'type': 'int'}, + 'timeout': {'key': 'properties.Timeout', 'type': 'int'}, + 'web_test_kind': {'key': 'properties.Kind', 'type': 'WebTestKind'}, + 'retry_enabled': {'key': 'properties.RetryEnabled', 'type': 'bool'}, + 'locations': {'key': 'properties.Locations', 'type': '[WebTestGeolocation]'}, + 'configuration': {'key': 'properties.Configuration', 'type': 'WebTestPropertiesConfiguration'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str, synthetic_monitor_id: str, web_test_name: str, locations, tags=None, kind="ping", description: str=None, enabled: bool=None, frequency: int=300, timeout: int=30, web_test_kind="ping", retry_enabled: bool=None, configuration=None, **kwargs) -> None: + super(WebTest, self).__init__(location=location, tags=tags, **kwargs) + self.kind = kind + self.synthetic_monitor_id = synthetic_monitor_id + self.web_test_name = web_test_name + self.description = description + self.enabled = enabled + self.frequency = frequency + self.timeout = timeout + self.web_test_kind = web_test_kind + self.retry_enabled = retry_enabled + self.locations = locations + self.configuration = configuration + self.provisioning_state = None + + +class WebTestGeolocation(Model): + """Geo-physical location to run a web test from. You must specify one or more + locations for the test to run from. + + :param location: Location ID for the webtest to run from. + :type location: str + """ + + _attribute_map = { + 'location': {'key': 'Id', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, **kwargs) -> None: + super(WebTestGeolocation, self).__init__(**kwargs) + self.location = location + + +class WebTestPropertiesConfiguration(Model): + """An XML configuration specification for a WebTest. + + :param web_test: The XML specification of a WebTest to run against an + application. + :type web_test: str + """ + + _attribute_map = { + 'web_test': {'key': 'WebTest', 'type': 'str'}, + } + + def __init__(self, *, web_test: str=None, **kwargs) -> None: + super(WebTestPropertiesConfiguration, self).__init__(**kwargs) + self.web_test = web_test + + +class WorkbookResource(Model): + """An azure resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(WorkbookResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class Workbook(WorkbookResource): + """An Application Insights workbook definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param kind: The kind of workbook. Choices are user and shared. Possible + values include: 'user', 'shared' + :type kind: str or ~azure.mgmt.applicationinsights.models.SharedTypeKind + :param workbook_name: Required. The user-defined name of the workbook. + :type workbook_name: str + :param serialized_data: Required. Configuration of this particular + workbook. Configuration data is a string containing valid JSON + :type serialized_data: str + :param version: This instance's version of the data model. This can change + as new features are added that can be marked workbook. + :type version: str + :param workbook_id: Required. Internally assigned unique id of the + workbook definition. + :type workbook_id: str + :param shared_type_kind: Required. Enum indicating if this workbook + definition is owned by a specific user or is shared between all users with + access to the Application Insights component. Possible values include: + 'user', 'shared'. Default value: "shared" . + :type shared_type_kind: str or + ~azure.mgmt.applicationinsights.models.SharedTypeKind + :ivar time_modified: Date and time in UTC of the last modification that + was made to this workbook definition. + :vartype time_modified: str + :param category: Required. Workbook category, as defined by the user at + creation time. + :type category: str + :param workbook_tags: A list of 0 or more tags that are associated with + this workbook definition + :type workbook_tags: list[str] + :param user_id: Required. Unique user id of the specific user that owns + this workbook. + :type user_id: str + :param source_resource_id: Optional resourceId for a source resource. + :type source_resource_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'workbook_name': {'required': True}, + 'serialized_data': {'required': True}, + 'workbook_id': {'required': True}, + 'shared_type_kind': {'required': True}, + 'time_modified': {'readonly': True}, + 'category': {'required': True}, + 'user_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'workbook_name': {'key': 'properties.name', 'type': 'str'}, + 'serialized_data': {'key': 'properties.serializedData', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'workbook_id': {'key': 'properties.workbookId', 'type': 'str'}, + 'shared_type_kind': {'key': 'properties.kind', 'type': 'str'}, + 'time_modified': {'key': 'properties.timeModified', 'type': 'str'}, + 'category': {'key': 'properties.category', 'type': 'str'}, + 'workbook_tags': {'key': 'properties.tags', 'type': '[str]'}, + 'user_id': {'key': 'properties.userId', 'type': 'str'}, + 'source_resource_id': {'key': 'properties.sourceResourceId', 'type': 'str'}, + } + + def __init__(self, *, workbook_name: str, serialized_data: str, workbook_id: str, category: str, user_id: str, location: str=None, tags=None, kind=None, version: str=None, shared_type_kind="shared", workbook_tags=None, source_resource_id: str=None, **kwargs) -> None: + super(Workbook, self).__init__(location=location, tags=tags, **kwargs) + self.kind = kind + self.workbook_name = workbook_name + self.serialized_data = serialized_data + self.version = version + self.workbook_id = workbook_id + self.shared_type_kind = shared_type_kind + self.time_modified = None + self.category = category + self.workbook_tags = workbook_tags + self.user_id = user_id + self.source_resource_id = source_resource_id + + +class WorkbookError(Model): + """Error message body that will indicate why the operation failed. + + :param code: Service-defined error code. This code serves as a sub-status + for the HTTP error code specified in the response. + :type code: str + :param message: Human-readable representation of the error. + :type message: str + :param details: The list of invalid fields send in request, in case of + validation error. + :type details: + list[~azure.mgmt.applicationinsights.models.ErrorFieldContract] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorFieldContract]'}, + } + + def __init__(self, *, code: str=None, message: str=None, details=None, **kwargs) -> None: + super(WorkbookError, self).__init__(**kwargs) + self.code = code + self.message = message + self.details = details + + +class WorkbookErrorException(HttpOperationError): + """Server responsed with exception of type: 'WorkbookError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(WorkbookErrorException, self).__init__(deserialize, response, 'WorkbookError', *args) + + +class WorkItemConfiguration(Model): + """Work item configuration associated with an application insights resource. + + :param connector_id: Connector identifier where work item is created + :type connector_id: str + :param config_display_name: Configuration friendly name + :type config_display_name: str + :param is_default: Boolean value indicating whether configuration is + default + :type is_default: bool + :param id: Unique Id for work item + :type id: str + :param config_properties: Serialized JSON object for detailed properties + :type config_properties: str + """ + + _attribute_map = { + 'connector_id': {'key': 'ConnectorId', 'type': 'str'}, + 'config_display_name': {'key': 'ConfigDisplayName', 'type': 'str'}, + 'is_default': {'key': 'IsDefault', 'type': 'bool'}, + 'id': {'key': 'Id', 'type': 'str'}, + 'config_properties': {'key': 'ConfigProperties', 'type': 'str'}, + } + + def __init__(self, *, connector_id: str=None, config_display_name: str=None, is_default: bool=None, id: str=None, config_properties: str=None, **kwargs) -> None: + super(WorkItemConfiguration, self).__init__(**kwargs) + self.connector_id = connector_id + self.config_display_name = config_display_name + self.is_default = is_default + self.id = id + self.config_properties = config_properties + + +class WorkItemConfigurationError(Model): + """Error associated with trying to get work item configuration or + configurations. + + :param code: Error detail code and explanation + :type code: str + :param message: Error message + :type message: str + :param innererror: + :type innererror: ~azure.mgmt.applicationinsights.models.InnerError + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'innererror': {'key': 'innererror', 'type': 'InnerError'}, + } + + def __init__(self, *, code: str=None, message: str=None, innererror=None, **kwargs) -> None: + super(WorkItemConfigurationError, self).__init__(**kwargs) + self.code = code + self.message = message + self.innererror = innererror + + +class WorkItemConfigurationErrorException(HttpOperationError): + """Server responsed with exception of type: 'WorkItemConfigurationError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(WorkItemConfigurationErrorException, self).__init__(deserialize, response, 'WorkItemConfigurationError', *args) + + +class WorkItemCreateConfiguration(Model): + """Work item configuration creation payload. + + :param connector_id: Unique connector id + :type connector_id: str + :param connector_data_configuration: Serialized JSON object for detailed + properties + :type connector_data_configuration: str + :param validate_only: Boolean indicating validate only + :type validate_only: bool + :param work_item_properties: Custom work item properties + :type work_item_properties: dict[str, str] + """ + + _attribute_map = { + 'connector_id': {'key': 'ConnectorId', 'type': 'str'}, + 'connector_data_configuration': {'key': 'ConnectorDataConfiguration', 'type': 'str'}, + 'validate_only': {'key': 'ValidateOnly', 'type': 'bool'}, + 'work_item_properties': {'key': 'WorkItemProperties', 'type': '{str}'}, + } + + def __init__(self, *, connector_id: str=None, connector_data_configuration: str=None, validate_only: bool=None, work_item_properties=None, **kwargs) -> None: + super(WorkItemCreateConfiguration, self).__init__(**kwargs) + self.connector_id = connector_id + self.connector_data_configuration = connector_data_configuration + self.validate_only = validate_only + self.work_item_properties = work_item_properties diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/_paged_models.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/_paged_models.py new file mode 100644 index 000000000000..aedb15547dd9 --- /dev/null +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/_paged_models.py @@ -0,0 +1,118 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class AnnotationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Annotation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Annotation]'} + } + + def __init__(self, *args, **kwargs): + + super(AnnotationPaged, self).__init__(*args, **kwargs) +class ApplicationInsightsComponentAPIKeyPaged(Paged): + """ + A paging container for iterating over a list of :class:`ApplicationInsightsComponentAPIKey ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ApplicationInsightsComponentAPIKey]'} + } + + def __init__(self, *args, **kwargs): + + super(ApplicationInsightsComponentAPIKeyPaged, self).__init__(*args, **kwargs) +class ApplicationInsightsComponentPaged(Paged): + """ + A paging container for iterating over a list of :class:`ApplicationInsightsComponent ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ApplicationInsightsComponent]'} + } + + def __init__(self, *args, **kwargs): + + super(ApplicationInsightsComponentPaged, self).__init__(*args, **kwargs) +class WorkItemConfigurationPaged(Paged): + """ + A paging container for iterating over a list of :class:`WorkItemConfiguration ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[WorkItemConfiguration]'} + } + + def __init__(self, *args, **kwargs): + + super(WorkItemConfigurationPaged, self).__init__(*args, **kwargs) +class ApplicationInsightsComponentWebTestLocationPaged(Paged): + """ + A paging container for iterating over a list of :class:`ApplicationInsightsComponentWebTestLocation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ApplicationInsightsComponentWebTestLocation]'} + } + + def __init__(self, *args, **kwargs): + + super(ApplicationInsightsComponentWebTestLocationPaged, self).__init__(*args, **kwargs) +class WebTestPaged(Paged): + """ + A paging container for iterating over a list of :class:`WebTest ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[WebTest]'} + } + + def __init__(self, *args, **kwargs): + + super(WebTestPaged, self).__init__(*args, **kwargs) +class WorkbookPaged(Paged): + """ + A paging container for iterating over a list of :class:`Workbook ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Workbook]'} + } + + def __init__(self, *args, **kwargs): + + super(WorkbookPaged, self).__init__(*args, **kwargs) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/annotation.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/annotation.py deleted file mode 100644 index 34b96b0d7660..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/annotation.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Annotation(Model): - """Annotation associated with an application insights resource. - - :param annotation_name: Name of annotation - :type annotation_name: str - :param category: Category of annotation, free form - :type category: str - :param event_time: Time when event occurred - :type event_time: datetime - :param id: Unique Id for annotation - :type id: str - :param properties: Serialized JSON object for detailed properties - :type properties: str - :param related_annotation: Related parent annotation if any. Default - value: "null" . - :type related_annotation: str - """ - - _attribute_map = { - 'annotation_name': {'key': 'AnnotationName', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'event_time': {'key': 'EventTime', 'type': 'iso-8601'}, - 'id': {'key': 'Id', 'type': 'str'}, - 'properties': {'key': 'Properties', 'type': 'str'}, - 'related_annotation': {'key': 'RelatedAnnotation', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Annotation, self).__init__(**kwargs) - self.annotation_name = kwargs.get('annotation_name', None) - self.category = kwargs.get('category', None) - self.event_time = kwargs.get('event_time', None) - self.id = kwargs.get('id', None) - self.properties = kwargs.get('properties', None) - self.related_annotation = kwargs.get('related_annotation', "null") diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/annotation_error.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/annotation_error.py deleted file mode 100644 index b0eb1feb10e2..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/annotation_error.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class AnnotationError(Model): - """Error associated with trying to create annotation with Id that already - exist. - - :param code: Error detail code and explanation - :type code: str - :param message: Error message - :type message: str - :param innererror: - :type innererror: ~azure.mgmt.applicationinsights.models.InnerError - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'innererror': {'key': 'innererror', 'type': 'InnerError'}, - } - - def __init__(self, **kwargs): - super(AnnotationError, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.innererror = kwargs.get('innererror', None) - - -class AnnotationErrorException(HttpOperationError): - """Server responsed with exception of type: 'AnnotationError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(AnnotationErrorException, self).__init__(deserialize, response, 'AnnotationError', *args) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/annotation_error_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/annotation_error_py3.py deleted file mode 100644 index 81ac3d4340b1..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/annotation_error_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class AnnotationError(Model): - """Error associated with trying to create annotation with Id that already - exist. - - :param code: Error detail code and explanation - :type code: str - :param message: Error message - :type message: str - :param innererror: - :type innererror: ~azure.mgmt.applicationinsights.models.InnerError - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'innererror': {'key': 'innererror', 'type': 'InnerError'}, - } - - def __init__(self, *, code: str=None, message: str=None, innererror=None, **kwargs) -> None: - super(AnnotationError, self).__init__(**kwargs) - self.code = code - self.message = message - self.innererror = innererror - - -class AnnotationErrorException(HttpOperationError): - """Server responsed with exception of type: 'AnnotationError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(AnnotationErrorException, self).__init__(deserialize, response, 'AnnotationError', *args) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/annotation_paged.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/annotation_paged.py deleted file mode 100644 index c9de7bcba53a..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/annotation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class AnnotationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Annotation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Annotation]'} - } - - def __init__(self, *args, **kwargs): - - super(AnnotationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/annotation_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/annotation_py3.py deleted file mode 100644 index f9e84417d725..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/annotation_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Annotation(Model): - """Annotation associated with an application insights resource. - - :param annotation_name: Name of annotation - :type annotation_name: str - :param category: Category of annotation, free form - :type category: str - :param event_time: Time when event occurred - :type event_time: datetime - :param id: Unique Id for annotation - :type id: str - :param properties: Serialized JSON object for detailed properties - :type properties: str - :param related_annotation: Related parent annotation if any. Default - value: "null" . - :type related_annotation: str - """ - - _attribute_map = { - 'annotation_name': {'key': 'AnnotationName', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'event_time': {'key': 'EventTime', 'type': 'iso-8601'}, - 'id': {'key': 'Id', 'type': 'str'}, - 'properties': {'key': 'Properties', 'type': 'str'}, - 'related_annotation': {'key': 'RelatedAnnotation', 'type': 'str'}, - } - - def __init__(self, *, annotation_name: str=None, category: str=None, event_time=None, id: str=None, properties: str=None, related_annotation: str="null", **kwargs) -> None: - super(Annotation, self).__init__(**kwargs) - self.annotation_name = annotation_name - self.category = category - self.event_time = event_time - self.id = id - self.properties = properties - self.related_annotation = related_annotation diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/api_key_request.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/api_key_request.py deleted file mode 100644 index 324be1c1e51f..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/api_key_request.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class APIKeyRequest(Model): - """An Application Insights component API Key creation request definition. - - :param name: The name of the API Key. - :type name: str - :param linked_read_properties: The read access rights of this API Key. - :type linked_read_properties: list[str] - :param linked_write_properties: The write access rights of this API Key. - :type linked_write_properties: list[str] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'linked_read_properties': {'key': 'linkedReadProperties', 'type': '[str]'}, - 'linked_write_properties': {'key': 'linkedWriteProperties', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(APIKeyRequest, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.linked_read_properties = kwargs.get('linked_read_properties', None) - self.linked_write_properties = kwargs.get('linked_write_properties', None) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/api_key_request_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/api_key_request_py3.py deleted file mode 100644 index 4d36981c4e23..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/api_key_request_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class APIKeyRequest(Model): - """An Application Insights component API Key creation request definition. - - :param name: The name of the API Key. - :type name: str - :param linked_read_properties: The read access rights of this API Key. - :type linked_read_properties: list[str] - :param linked_write_properties: The write access rights of this API Key. - :type linked_write_properties: list[str] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'linked_read_properties': {'key': 'linkedReadProperties', 'type': '[str]'}, - 'linked_write_properties': {'key': 'linkedWriteProperties', 'type': '[str]'}, - } - - def __init__(self, *, name: str=None, linked_read_properties=None, linked_write_properties=None, **kwargs) -> None: - super(APIKeyRequest, self).__init__(**kwargs) - self.name = name - self.linked_read_properties = linked_read_properties - self.linked_write_properties = linked_write_properties diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component.py deleted file mode 100644 index 226b0bfd90f9..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component.py +++ /dev/null @@ -1,134 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .components_resource import ComponentsResource - - -class ApplicationInsightsComponent(ComponentsResource): - """An Application Insights component definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Azure resource Id - :vartype id: str - :ivar name: Azure resource name - :vartype name: str - :ivar type: Azure resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kind: Required. The kind of application that this component refers - to, used to customize UI. This value is a freeform string, values should - typically be one of the following: web, ios, other, store, java, phone. - :type kind: str - :ivar application_id: The unique ID of your application. This field - mirrors the 'Name' field and cannot be changed. - :vartype application_id: str - :ivar app_id: Application Insights Unique ID for your Application. - :vartype app_id: str - :param application_type: Required. Type of application being monitored. - Possible values include: 'web', 'other'. Default value: "web" . - :type application_type: str or - ~azure.mgmt.applicationinsights.models.ApplicationType - :param flow_type: Used by the Application Insights system to determine - what kind of flow this component was created by. This is to be set to - 'Bluefield' when creating/updating a component via the REST API. Possible - values include: 'Bluefield'. Default value: "Bluefield" . - :type flow_type: str or ~azure.mgmt.applicationinsights.models.FlowType - :param request_source: Describes what tool created this Application - Insights component. Customers using this API should set this to the - default 'rest'. Possible values include: 'rest'. Default value: "rest" . - :type request_source: str or - ~azure.mgmt.applicationinsights.models.RequestSource - :ivar instrumentation_key: Application Insights Instrumentation key. A - read-only value that applications can use to identify the destination for - all telemetry sent to Azure Application Insights. This value will be - supplied upon construction of each new Application Insights component. - :vartype instrumentation_key: str - :ivar creation_date: Creation Date for the Application Insights component, - in ISO 8601 format. - :vartype creation_date: datetime - :ivar tenant_id: Azure Tenant Id. - :vartype tenant_id: str - :param hockey_app_id: The unique application ID created when a new - application is added to HockeyApp, used for communications with HockeyApp. - :type hockey_app_id: str - :ivar hockey_app_token: Token used to authenticate communications with - between Application Insights and HockeyApp. - :vartype hockey_app_token: str - :ivar provisioning_state: Current state of this component: whether or not - is has been provisioned within the resource group it is defined. Users - cannot change this value but are able to read from it. Values will include - Succeeded, Deploying, Canceled, and Failed. - :vartype provisioning_state: str - :param sampling_percentage: Percentage of the data produced by the - application being monitored that is being sampled for Application Insights - telemetry. - :type sampling_percentage: float - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'readonly': True}, - 'app_id': {'readonly': True}, - 'application_type': {'required': True}, - 'instrumentation_key': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'tenant_id': {'readonly': True}, - 'hockey_app_token': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'application_id': {'key': 'properties.ApplicationId', 'type': 'str'}, - 'app_id': {'key': 'properties.AppId', 'type': 'str'}, - 'application_type': {'key': 'properties.Application_Type', 'type': 'str'}, - 'flow_type': {'key': 'properties.Flow_Type', 'type': 'str'}, - 'request_source': {'key': 'properties.Request_Source', 'type': 'str'}, - 'instrumentation_key': {'key': 'properties.InstrumentationKey', 'type': 'str'}, - 'creation_date': {'key': 'properties.CreationDate', 'type': 'iso-8601'}, - 'tenant_id': {'key': 'properties.TenantId', 'type': 'str'}, - 'hockey_app_id': {'key': 'properties.HockeyAppId', 'type': 'str'}, - 'hockey_app_token': {'key': 'properties.HockeyAppToken', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'sampling_percentage': {'key': 'properties.SamplingPercentage', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(ApplicationInsightsComponent, self).__init__(**kwargs) - self.kind = kwargs.get('kind', None) - self.application_id = None - self.app_id = None - self.application_type = kwargs.get('application_type', "web") - self.flow_type = kwargs.get('flow_type', "Bluefield") - self.request_source = kwargs.get('request_source', "rest") - self.instrumentation_key = None - self.creation_date = None - self.tenant_id = None - self.hockey_app_id = kwargs.get('hockey_app_id', None) - self.hockey_app_token = None - self.provisioning_state = None - self.sampling_percentage = kwargs.get('sampling_percentage', None) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_analytics_item.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_analytics_item.py deleted file mode 100644 index ac41804be429..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_analytics_item.py +++ /dev/null @@ -1,76 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationInsightsComponentAnalyticsItem(Model): - """Properties that define an Analytics item that is associated to an - Application Insights component. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: Internally assigned unique id of the item definition. - :type id: str - :param name: The user-defined name of the item. - :type name: str - :param content: The content of this item - :type content: str - :ivar version: This instance's version of the data model. This can change - as new features are added. - :vartype version: str - :param scope: Enum indicating if this item definition is owned by a - specific user or is shared between all users with access to the - Application Insights component. Possible values include: 'shared', 'user' - :type scope: str or ~azure.mgmt.applicationinsights.models.ItemScope - :param type: Enum indicating the type of the Analytics item. Possible - values include: 'query', 'function', 'folder', 'recent' - :type type: str or ~azure.mgmt.applicationinsights.models.ItemType - :ivar time_created: Date and time in UTC when this item was created. - :vartype time_created: str - :ivar time_modified: Date and time in UTC of the last modification that - was made to this item. - :vartype time_modified: str - :param properties: - :type properties: - ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentAnalyticsItemProperties - """ - - _validation = { - 'version': {'readonly': True}, - 'time_created': {'readonly': True}, - 'time_modified': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'content': {'key': 'Content', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'scope': {'key': 'Scope', 'type': 'str'}, - 'type': {'key': 'Type', 'type': 'str'}, - 'time_created': {'key': 'TimeCreated', 'type': 'str'}, - 'time_modified': {'key': 'TimeModified', 'type': 'str'}, - 'properties': {'key': 'Properties', 'type': 'ApplicationInsightsComponentAnalyticsItemProperties'}, - } - - def __init__(self, **kwargs): - super(ApplicationInsightsComponentAnalyticsItem, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) - self.content = kwargs.get('content', None) - self.version = None - self.scope = kwargs.get('scope', None) - self.type = kwargs.get('type', None) - self.time_created = None - self.time_modified = None - self.properties = kwargs.get('properties', None) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_analytics_item_properties.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_analytics_item_properties.py deleted file mode 100644 index 56a2b9ca8258..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_analytics_item_properties.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationInsightsComponentAnalyticsItemProperties(Model): - """A set of properties that can be defined in the context of a specific item - type. Each type may have its own properties. - - :param function_alias: A function alias, used when the type of the item is - Function - :type function_alias: str - """ - - _attribute_map = { - 'function_alias': {'key': 'functionAlias', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApplicationInsightsComponentAnalyticsItemProperties, self).__init__(**kwargs) - self.function_alias = kwargs.get('function_alias', None) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_analytics_item_properties_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_analytics_item_properties_py3.py deleted file mode 100644 index 30a0e6c0dca3..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_analytics_item_properties_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationInsightsComponentAnalyticsItemProperties(Model): - """A set of properties that can be defined in the context of a specific item - type. Each type may have its own properties. - - :param function_alias: A function alias, used when the type of the item is - Function - :type function_alias: str - """ - - _attribute_map = { - 'function_alias': {'key': 'functionAlias', 'type': 'str'}, - } - - def __init__(self, *, function_alias: str=None, **kwargs) -> None: - super(ApplicationInsightsComponentAnalyticsItemProperties, self).__init__(**kwargs) - self.function_alias = function_alias diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_analytics_item_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_analytics_item_py3.py deleted file mode 100644 index fb2502512db3..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_analytics_item_py3.py +++ /dev/null @@ -1,76 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationInsightsComponentAnalyticsItem(Model): - """Properties that define an Analytics item that is associated to an - Application Insights component. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: Internally assigned unique id of the item definition. - :type id: str - :param name: The user-defined name of the item. - :type name: str - :param content: The content of this item - :type content: str - :ivar version: This instance's version of the data model. This can change - as new features are added. - :vartype version: str - :param scope: Enum indicating if this item definition is owned by a - specific user or is shared between all users with access to the - Application Insights component. Possible values include: 'shared', 'user' - :type scope: str or ~azure.mgmt.applicationinsights.models.ItemScope - :param type: Enum indicating the type of the Analytics item. Possible - values include: 'query', 'function', 'folder', 'recent' - :type type: str or ~azure.mgmt.applicationinsights.models.ItemType - :ivar time_created: Date and time in UTC when this item was created. - :vartype time_created: str - :ivar time_modified: Date and time in UTC of the last modification that - was made to this item. - :vartype time_modified: str - :param properties: - :type properties: - ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentAnalyticsItemProperties - """ - - _validation = { - 'version': {'readonly': True}, - 'time_created': {'readonly': True}, - 'time_modified': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'content': {'key': 'Content', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'scope': {'key': 'Scope', 'type': 'str'}, - 'type': {'key': 'Type', 'type': 'str'}, - 'time_created': {'key': 'TimeCreated', 'type': 'str'}, - 'time_modified': {'key': 'TimeModified', 'type': 'str'}, - 'properties': {'key': 'Properties', 'type': 'ApplicationInsightsComponentAnalyticsItemProperties'}, - } - - def __init__(self, *, id: str=None, name: str=None, content: str=None, scope=None, type=None, properties=None, **kwargs) -> None: - super(ApplicationInsightsComponentAnalyticsItem, self).__init__(**kwargs) - self.id = id - self.name = name - self.content = content - self.version = None - self.scope = scope - self.type = type - self.time_created = None - self.time_modified = None - self.properties = properties diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_api_key.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_api_key.py deleted file mode 100644 index 854139952ad1..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_api_key.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationInsightsComponentAPIKey(Model): - """Properties that define an API key of an Application Insights Component. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique ID of the API key inside an Application Insights - component. It is auto generated when the API key is created. - :vartype id: str - :ivar api_key: The API key value. It will be only return once when the API - Key was created. - :vartype api_key: str - :param created_date: The create date of this API key. - :type created_date: str - :param name: The name of the API key. - :type name: str - :param linked_read_properties: The read access rights of this API Key. - :type linked_read_properties: list[str] - :param linked_write_properties: The write access rights of this API Key. - :type linked_write_properties: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'api_key': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'api_key': {'key': 'apiKey', 'type': 'str'}, - 'created_date': {'key': 'createdDate', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'linked_read_properties': {'key': 'linkedReadProperties', 'type': '[str]'}, - 'linked_write_properties': {'key': 'linkedWriteProperties', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ApplicationInsightsComponentAPIKey, self).__init__(**kwargs) - self.id = None - self.api_key = None - self.created_date = kwargs.get('created_date', None) - self.name = kwargs.get('name', None) - self.linked_read_properties = kwargs.get('linked_read_properties', None) - self.linked_write_properties = kwargs.get('linked_write_properties', None) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_api_key_paged.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_api_key_paged.py deleted file mode 100644 index d3b65643a2b7..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_api_key_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ApplicationInsightsComponentAPIKeyPaged(Paged): - """ - A paging container for iterating over a list of :class:`ApplicationInsightsComponentAPIKey ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ApplicationInsightsComponentAPIKey]'} - } - - def __init__(self, *args, **kwargs): - - super(ApplicationInsightsComponentAPIKeyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_api_key_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_api_key_py3.py deleted file mode 100644 index 670dcdbce4d8..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_api_key_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationInsightsComponentAPIKey(Model): - """Properties that define an API key of an Application Insights Component. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique ID of the API key inside an Application Insights - component. It is auto generated when the API key is created. - :vartype id: str - :ivar api_key: The API key value. It will be only return once when the API - Key was created. - :vartype api_key: str - :param created_date: The create date of this API key. - :type created_date: str - :param name: The name of the API key. - :type name: str - :param linked_read_properties: The read access rights of this API Key. - :type linked_read_properties: list[str] - :param linked_write_properties: The write access rights of this API Key. - :type linked_write_properties: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'api_key': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'api_key': {'key': 'apiKey', 'type': 'str'}, - 'created_date': {'key': 'createdDate', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'linked_read_properties': {'key': 'linkedReadProperties', 'type': '[str]'}, - 'linked_write_properties': {'key': 'linkedWriteProperties', 'type': '[str]'}, - } - - def __init__(self, *, created_date: str=None, name: str=None, linked_read_properties=None, linked_write_properties=None, **kwargs) -> None: - super(ApplicationInsightsComponentAPIKey, self).__init__(**kwargs) - self.id = None - self.api_key = None - self.created_date = created_date - self.name = name - self.linked_read_properties = linked_read_properties - self.linked_write_properties = linked_write_properties diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_available_features.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_available_features.py deleted file mode 100644 index 5358010ad5d4..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_available_features.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationInsightsComponentAvailableFeatures(Model): - """An Application Insights component available features. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar result: A list of Application Insights component feature. - :vartype result: - list[~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentFeature] - """ - - _validation = { - 'result': {'readonly': True}, - } - - _attribute_map = { - 'result': {'key': 'Result', 'type': '[ApplicationInsightsComponentFeature]'}, - } - - def __init__(self, **kwargs): - super(ApplicationInsightsComponentAvailableFeatures, self).__init__(**kwargs) - self.result = None diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_available_features_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_available_features_py3.py deleted file mode 100644 index a42604832686..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_available_features_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationInsightsComponentAvailableFeatures(Model): - """An Application Insights component available features. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar result: A list of Application Insights component feature. - :vartype result: - list[~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentFeature] - """ - - _validation = { - 'result': {'readonly': True}, - } - - _attribute_map = { - 'result': {'key': 'Result', 'type': '[ApplicationInsightsComponentFeature]'}, - } - - def __init__(self, **kwargs) -> None: - super(ApplicationInsightsComponentAvailableFeatures, self).__init__(**kwargs) - self.result = None diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_billing_features.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_billing_features.py deleted file mode 100644 index 4b194d4b26d4..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_billing_features.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationInsightsComponentBillingFeatures(Model): - """An Application Insights component billing features. - - :param data_volume_cap: An Application Insights component daily data - volume cap - :type data_volume_cap: - ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentDataVolumeCap - :param current_billing_features: Current enabled pricing plan. When the - component is in the Enterprise plan, this will list both 'Basic' and - 'Application Insights Enterprise'. - :type current_billing_features: list[str] - """ - - _attribute_map = { - 'data_volume_cap': {'key': 'DataVolumeCap', 'type': 'ApplicationInsightsComponentDataVolumeCap'}, - 'current_billing_features': {'key': 'CurrentBillingFeatures', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ApplicationInsightsComponentBillingFeatures, self).__init__(**kwargs) - self.data_volume_cap = kwargs.get('data_volume_cap', None) - self.current_billing_features = kwargs.get('current_billing_features', None) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_billing_features_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_billing_features_py3.py deleted file mode 100644 index 94ade3fcf09a..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_billing_features_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationInsightsComponentBillingFeatures(Model): - """An Application Insights component billing features. - - :param data_volume_cap: An Application Insights component daily data - volume cap - :type data_volume_cap: - ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentDataVolumeCap - :param current_billing_features: Current enabled pricing plan. When the - component is in the Enterprise plan, this will list both 'Basic' and - 'Application Insights Enterprise'. - :type current_billing_features: list[str] - """ - - _attribute_map = { - 'data_volume_cap': {'key': 'DataVolumeCap', 'type': 'ApplicationInsightsComponentDataVolumeCap'}, - 'current_billing_features': {'key': 'CurrentBillingFeatures', 'type': '[str]'}, - } - - def __init__(self, *, data_volume_cap=None, current_billing_features=None, **kwargs) -> None: - super(ApplicationInsightsComponentBillingFeatures, self).__init__(**kwargs) - self.data_volume_cap = data_volume_cap - self.current_billing_features = current_billing_features diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_data_volume_cap.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_data_volume_cap.py deleted file mode 100644 index a364ad440217..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_data_volume_cap.py +++ /dev/null @@ -1,59 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationInsightsComponentDataVolumeCap(Model): - """An Application Insights component daily data volume cap. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param cap: Daily data volume cap in GB. - :type cap: float - :ivar reset_time: Daily data volume cap UTC reset hour. - :vartype reset_time: int - :param warning_threshold: Reserved, not used for now. - :type warning_threshold: int - :param stop_send_notification_when_hit_threshold: Reserved, not used for - now. - :type stop_send_notification_when_hit_threshold: bool - :param stop_send_notification_when_hit_cap: Do not send a notification - email when the daily data volume cap is met. - :type stop_send_notification_when_hit_cap: bool - :ivar max_history_cap: Maximum daily data volume cap that the user can set - for this component. - :vartype max_history_cap: float - """ - - _validation = { - 'reset_time': {'readonly': True}, - 'max_history_cap': {'readonly': True}, - } - - _attribute_map = { - 'cap': {'key': 'Cap', 'type': 'float'}, - 'reset_time': {'key': 'ResetTime', 'type': 'int'}, - 'warning_threshold': {'key': 'WarningThreshold', 'type': 'int'}, - 'stop_send_notification_when_hit_threshold': {'key': 'StopSendNotificationWhenHitThreshold', 'type': 'bool'}, - 'stop_send_notification_when_hit_cap': {'key': 'StopSendNotificationWhenHitCap', 'type': 'bool'}, - 'max_history_cap': {'key': 'MaxHistoryCap', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(ApplicationInsightsComponentDataVolumeCap, self).__init__(**kwargs) - self.cap = kwargs.get('cap', None) - self.reset_time = None - self.warning_threshold = kwargs.get('warning_threshold', None) - self.stop_send_notification_when_hit_threshold = kwargs.get('stop_send_notification_when_hit_threshold', None) - self.stop_send_notification_when_hit_cap = kwargs.get('stop_send_notification_when_hit_cap', None) - self.max_history_cap = None diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_data_volume_cap_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_data_volume_cap_py3.py deleted file mode 100644 index 1065fa77ceba..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_data_volume_cap_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationInsightsComponentDataVolumeCap(Model): - """An Application Insights component daily data volume cap. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param cap: Daily data volume cap in GB. - :type cap: float - :ivar reset_time: Daily data volume cap UTC reset hour. - :vartype reset_time: int - :param warning_threshold: Reserved, not used for now. - :type warning_threshold: int - :param stop_send_notification_when_hit_threshold: Reserved, not used for - now. - :type stop_send_notification_when_hit_threshold: bool - :param stop_send_notification_when_hit_cap: Do not send a notification - email when the daily data volume cap is met. - :type stop_send_notification_when_hit_cap: bool - :ivar max_history_cap: Maximum daily data volume cap that the user can set - for this component. - :vartype max_history_cap: float - """ - - _validation = { - 'reset_time': {'readonly': True}, - 'max_history_cap': {'readonly': True}, - } - - _attribute_map = { - 'cap': {'key': 'Cap', 'type': 'float'}, - 'reset_time': {'key': 'ResetTime', 'type': 'int'}, - 'warning_threshold': {'key': 'WarningThreshold', 'type': 'int'}, - 'stop_send_notification_when_hit_threshold': {'key': 'StopSendNotificationWhenHitThreshold', 'type': 'bool'}, - 'stop_send_notification_when_hit_cap': {'key': 'StopSendNotificationWhenHitCap', 'type': 'bool'}, - 'max_history_cap': {'key': 'MaxHistoryCap', 'type': 'float'}, - } - - def __init__(self, *, cap: float=None, warning_threshold: int=None, stop_send_notification_when_hit_threshold: bool=None, stop_send_notification_when_hit_cap: bool=None, **kwargs) -> None: - super(ApplicationInsightsComponentDataVolumeCap, self).__init__(**kwargs) - self.cap = cap - self.reset_time = None - self.warning_threshold = warning_threshold - self.stop_send_notification_when_hit_threshold = stop_send_notification_when_hit_threshold - self.stop_send_notification_when_hit_cap = stop_send_notification_when_hit_cap - self.max_history_cap = None diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_export_configuration.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_export_configuration.py deleted file mode 100644 index 8c99d4bddc91..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_export_configuration.py +++ /dev/null @@ -1,142 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationInsightsComponentExportConfiguration(Model): - """Properties that define a Continuous Export configuration. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar export_id: The unique ID of the export configuration inside an - Application Insights component. It is auto generated when the Continuous - Export configuration is created. - :vartype export_id: str - :ivar instrumentation_key: The instrumentation key of the Application - Insights component. - :vartype instrumentation_key: str - :param record_types: This comma separated list of document types that will - be exported. The possible values include 'Requests', 'Event', - 'Exceptions', 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd', - 'PerformanceCounters', 'Availability', 'Messages'. - :type record_types: str - :ivar application_name: The name of the Application Insights component. - :vartype application_name: str - :ivar subscription_id: The subscription of the Application Insights - component. - :vartype subscription_id: str - :ivar resource_group: The resource group of the Application Insights - component. - :vartype resource_group: str - :ivar destination_storage_subscription_id: The destination storage account - subscription ID. - :vartype destination_storage_subscription_id: str - :ivar destination_storage_location_id: The destination account location - ID. - :vartype destination_storage_location_id: str - :ivar destination_account_id: The name of destination account. - :vartype destination_account_id: str - :ivar destination_type: The destination type. - :vartype destination_type: str - :ivar is_user_enabled: This will be 'true' if the Continuous Export - configuration is enabled, otherwise it will be 'false'. - :vartype is_user_enabled: str - :ivar last_user_update: Last time the Continuous Export configuration was - updated. - :vartype last_user_update: str - :param notification_queue_enabled: Deprecated - :type notification_queue_enabled: str - :ivar export_status: This indicates current Continuous Export - configuration status. The possible values are 'Preparing', 'Success', - 'Failure'. - :vartype export_status: str - :ivar last_success_time: The last time data was successfully delivered to - the destination storage container for this Continuous Export - configuration. - :vartype last_success_time: str - :ivar last_gap_time: The last time the Continuous Export configuration - started failing. - :vartype last_gap_time: str - :ivar permanent_error_reason: This is the reason the Continuous Export - configuration started failing. It can be 'AzureStorageNotFound' or - 'AzureStorageAccessDenied'. - :vartype permanent_error_reason: str - :ivar storage_name: The name of the destination storage account. - :vartype storage_name: str - :ivar container_name: The name of the destination storage container. - :vartype container_name: str - """ - - _validation = { - 'export_id': {'readonly': True}, - 'instrumentation_key': {'readonly': True}, - 'application_name': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'destination_storage_subscription_id': {'readonly': True}, - 'destination_storage_location_id': {'readonly': True}, - 'destination_account_id': {'readonly': True}, - 'destination_type': {'readonly': True}, - 'is_user_enabled': {'readonly': True}, - 'last_user_update': {'readonly': True}, - 'export_status': {'readonly': True}, - 'last_success_time': {'readonly': True}, - 'last_gap_time': {'readonly': True}, - 'permanent_error_reason': {'readonly': True}, - 'storage_name': {'readonly': True}, - 'container_name': {'readonly': True}, - } - - _attribute_map = { - 'export_id': {'key': 'ExportId', 'type': 'str'}, - 'instrumentation_key': {'key': 'InstrumentationKey', 'type': 'str'}, - 'record_types': {'key': 'RecordTypes', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'subscription_id': {'key': 'SubscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'ResourceGroup', 'type': 'str'}, - 'destination_storage_subscription_id': {'key': 'DestinationStorageSubscriptionId', 'type': 'str'}, - 'destination_storage_location_id': {'key': 'DestinationStorageLocationId', 'type': 'str'}, - 'destination_account_id': {'key': 'DestinationAccountId', 'type': 'str'}, - 'destination_type': {'key': 'DestinationType', 'type': 'str'}, - 'is_user_enabled': {'key': 'IsUserEnabled', 'type': 'str'}, - 'last_user_update': {'key': 'LastUserUpdate', 'type': 'str'}, - 'notification_queue_enabled': {'key': 'NotificationQueueEnabled', 'type': 'str'}, - 'export_status': {'key': 'ExportStatus', 'type': 'str'}, - 'last_success_time': {'key': 'LastSuccessTime', 'type': 'str'}, - 'last_gap_time': {'key': 'LastGapTime', 'type': 'str'}, - 'permanent_error_reason': {'key': 'PermanentErrorReason', 'type': 'str'}, - 'storage_name': {'key': 'StorageName', 'type': 'str'}, - 'container_name': {'key': 'ContainerName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApplicationInsightsComponentExportConfiguration, self).__init__(**kwargs) - self.export_id = None - self.instrumentation_key = None - self.record_types = kwargs.get('record_types', None) - self.application_name = None - self.subscription_id = None - self.resource_group = None - self.destination_storage_subscription_id = None - self.destination_storage_location_id = None - self.destination_account_id = None - self.destination_type = None - self.is_user_enabled = None - self.last_user_update = None - self.notification_queue_enabled = kwargs.get('notification_queue_enabled', None) - self.export_status = None - self.last_success_time = None - self.last_gap_time = None - self.permanent_error_reason = None - self.storage_name = None - self.container_name = None diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_export_configuration_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_export_configuration_py3.py deleted file mode 100644 index 81d92c3b82d1..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_export_configuration_py3.py +++ /dev/null @@ -1,142 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationInsightsComponentExportConfiguration(Model): - """Properties that define a Continuous Export configuration. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar export_id: The unique ID of the export configuration inside an - Application Insights component. It is auto generated when the Continuous - Export configuration is created. - :vartype export_id: str - :ivar instrumentation_key: The instrumentation key of the Application - Insights component. - :vartype instrumentation_key: str - :param record_types: This comma separated list of document types that will - be exported. The possible values include 'Requests', 'Event', - 'Exceptions', 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd', - 'PerformanceCounters', 'Availability', 'Messages'. - :type record_types: str - :ivar application_name: The name of the Application Insights component. - :vartype application_name: str - :ivar subscription_id: The subscription of the Application Insights - component. - :vartype subscription_id: str - :ivar resource_group: The resource group of the Application Insights - component. - :vartype resource_group: str - :ivar destination_storage_subscription_id: The destination storage account - subscription ID. - :vartype destination_storage_subscription_id: str - :ivar destination_storage_location_id: The destination account location - ID. - :vartype destination_storage_location_id: str - :ivar destination_account_id: The name of destination account. - :vartype destination_account_id: str - :ivar destination_type: The destination type. - :vartype destination_type: str - :ivar is_user_enabled: This will be 'true' if the Continuous Export - configuration is enabled, otherwise it will be 'false'. - :vartype is_user_enabled: str - :ivar last_user_update: Last time the Continuous Export configuration was - updated. - :vartype last_user_update: str - :param notification_queue_enabled: Deprecated - :type notification_queue_enabled: str - :ivar export_status: This indicates current Continuous Export - configuration status. The possible values are 'Preparing', 'Success', - 'Failure'. - :vartype export_status: str - :ivar last_success_time: The last time data was successfully delivered to - the destination storage container for this Continuous Export - configuration. - :vartype last_success_time: str - :ivar last_gap_time: The last time the Continuous Export configuration - started failing. - :vartype last_gap_time: str - :ivar permanent_error_reason: This is the reason the Continuous Export - configuration started failing. It can be 'AzureStorageNotFound' or - 'AzureStorageAccessDenied'. - :vartype permanent_error_reason: str - :ivar storage_name: The name of the destination storage account. - :vartype storage_name: str - :ivar container_name: The name of the destination storage container. - :vartype container_name: str - """ - - _validation = { - 'export_id': {'readonly': True}, - 'instrumentation_key': {'readonly': True}, - 'application_name': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'destination_storage_subscription_id': {'readonly': True}, - 'destination_storage_location_id': {'readonly': True}, - 'destination_account_id': {'readonly': True}, - 'destination_type': {'readonly': True}, - 'is_user_enabled': {'readonly': True}, - 'last_user_update': {'readonly': True}, - 'export_status': {'readonly': True}, - 'last_success_time': {'readonly': True}, - 'last_gap_time': {'readonly': True}, - 'permanent_error_reason': {'readonly': True}, - 'storage_name': {'readonly': True}, - 'container_name': {'readonly': True}, - } - - _attribute_map = { - 'export_id': {'key': 'ExportId', 'type': 'str'}, - 'instrumentation_key': {'key': 'InstrumentationKey', 'type': 'str'}, - 'record_types': {'key': 'RecordTypes', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'subscription_id': {'key': 'SubscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'ResourceGroup', 'type': 'str'}, - 'destination_storage_subscription_id': {'key': 'DestinationStorageSubscriptionId', 'type': 'str'}, - 'destination_storage_location_id': {'key': 'DestinationStorageLocationId', 'type': 'str'}, - 'destination_account_id': {'key': 'DestinationAccountId', 'type': 'str'}, - 'destination_type': {'key': 'DestinationType', 'type': 'str'}, - 'is_user_enabled': {'key': 'IsUserEnabled', 'type': 'str'}, - 'last_user_update': {'key': 'LastUserUpdate', 'type': 'str'}, - 'notification_queue_enabled': {'key': 'NotificationQueueEnabled', 'type': 'str'}, - 'export_status': {'key': 'ExportStatus', 'type': 'str'}, - 'last_success_time': {'key': 'LastSuccessTime', 'type': 'str'}, - 'last_gap_time': {'key': 'LastGapTime', 'type': 'str'}, - 'permanent_error_reason': {'key': 'PermanentErrorReason', 'type': 'str'}, - 'storage_name': {'key': 'StorageName', 'type': 'str'}, - 'container_name': {'key': 'ContainerName', 'type': 'str'}, - } - - def __init__(self, *, record_types: str=None, notification_queue_enabled: str=None, **kwargs) -> None: - super(ApplicationInsightsComponentExportConfiguration, self).__init__(**kwargs) - self.export_id = None - self.instrumentation_key = None - self.record_types = record_types - self.application_name = None - self.subscription_id = None - self.resource_group = None - self.destination_storage_subscription_id = None - self.destination_storage_location_id = None - self.destination_account_id = None - self.destination_type = None - self.is_user_enabled = None - self.last_user_update = None - self.notification_queue_enabled = notification_queue_enabled - self.export_status = None - self.last_success_time = None - self.last_gap_time = None - self.permanent_error_reason = None - self.storage_name = None - self.container_name = None diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_export_request.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_export_request.py deleted file mode 100644 index 19e940c75162..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_export_request.py +++ /dev/null @@ -1,69 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationInsightsComponentExportRequest(Model): - """An Application Insights component Continuous Export configuration request - definition. - - :param record_types: The document types to be exported, as comma separated - values. Allowed values include 'Requests', 'Event', 'Exceptions', - 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd', - 'PerformanceCounters', 'Availability', 'Messages'. - :type record_types: str - :param destination_type: The Continuous Export destination type. This has - to be 'Blob'. - :type destination_type: str - :param destination_address: The SAS URL for the destination storage - container. It must grant write permission. - :type destination_address: str - :param is_enabled: Set to 'true' to create a Continuous Export - configuration as enabled, otherwise set it to 'false'. - :type is_enabled: str - :param notification_queue_enabled: Deprecated - :type notification_queue_enabled: str - :param notification_queue_uri: Deprecated - :type notification_queue_uri: str - :param destination_storage_subscription_id: The subscription ID of the - destination storage container. - :type destination_storage_subscription_id: str - :param destination_storage_location_id: The location ID of the destination - storage container. - :type destination_storage_location_id: str - :param destination_account_id: The name of destination storage account. - :type destination_account_id: str - """ - - _attribute_map = { - 'record_types': {'key': 'RecordTypes', 'type': 'str'}, - 'destination_type': {'key': 'DestinationType', 'type': 'str'}, - 'destination_address': {'key': 'DestinationAddress', 'type': 'str'}, - 'is_enabled': {'key': 'IsEnabled', 'type': 'str'}, - 'notification_queue_enabled': {'key': 'NotificationQueueEnabled', 'type': 'str'}, - 'notification_queue_uri': {'key': 'NotificationQueueUri', 'type': 'str'}, - 'destination_storage_subscription_id': {'key': 'DestinationStorageSubscriptionId', 'type': 'str'}, - 'destination_storage_location_id': {'key': 'DestinationStorageLocationId', 'type': 'str'}, - 'destination_account_id': {'key': 'DestinationAccountId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApplicationInsightsComponentExportRequest, self).__init__(**kwargs) - self.record_types = kwargs.get('record_types', None) - self.destination_type = kwargs.get('destination_type', None) - self.destination_address = kwargs.get('destination_address', None) - self.is_enabled = kwargs.get('is_enabled', None) - self.notification_queue_enabled = kwargs.get('notification_queue_enabled', None) - self.notification_queue_uri = kwargs.get('notification_queue_uri', None) - self.destination_storage_subscription_id = kwargs.get('destination_storage_subscription_id', None) - self.destination_storage_location_id = kwargs.get('destination_storage_location_id', None) - self.destination_account_id = kwargs.get('destination_account_id', None) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_export_request_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_export_request_py3.py deleted file mode 100644 index ecacc3b49a02..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_export_request_py3.py +++ /dev/null @@ -1,69 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationInsightsComponentExportRequest(Model): - """An Application Insights component Continuous Export configuration request - definition. - - :param record_types: The document types to be exported, as comma separated - values. Allowed values include 'Requests', 'Event', 'Exceptions', - 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd', - 'PerformanceCounters', 'Availability', 'Messages'. - :type record_types: str - :param destination_type: The Continuous Export destination type. This has - to be 'Blob'. - :type destination_type: str - :param destination_address: The SAS URL for the destination storage - container. It must grant write permission. - :type destination_address: str - :param is_enabled: Set to 'true' to create a Continuous Export - configuration as enabled, otherwise set it to 'false'. - :type is_enabled: str - :param notification_queue_enabled: Deprecated - :type notification_queue_enabled: str - :param notification_queue_uri: Deprecated - :type notification_queue_uri: str - :param destination_storage_subscription_id: The subscription ID of the - destination storage container. - :type destination_storage_subscription_id: str - :param destination_storage_location_id: The location ID of the destination - storage container. - :type destination_storage_location_id: str - :param destination_account_id: The name of destination storage account. - :type destination_account_id: str - """ - - _attribute_map = { - 'record_types': {'key': 'RecordTypes', 'type': 'str'}, - 'destination_type': {'key': 'DestinationType', 'type': 'str'}, - 'destination_address': {'key': 'DestinationAddress', 'type': 'str'}, - 'is_enabled': {'key': 'IsEnabled', 'type': 'str'}, - 'notification_queue_enabled': {'key': 'NotificationQueueEnabled', 'type': 'str'}, - 'notification_queue_uri': {'key': 'NotificationQueueUri', 'type': 'str'}, - 'destination_storage_subscription_id': {'key': 'DestinationStorageSubscriptionId', 'type': 'str'}, - 'destination_storage_location_id': {'key': 'DestinationStorageLocationId', 'type': 'str'}, - 'destination_account_id': {'key': 'DestinationAccountId', 'type': 'str'}, - } - - def __init__(self, *, record_types: str=None, destination_type: str=None, destination_address: str=None, is_enabled: str=None, notification_queue_enabled: str=None, notification_queue_uri: str=None, destination_storage_subscription_id: str=None, destination_storage_location_id: str=None, destination_account_id: str=None, **kwargs) -> None: - super(ApplicationInsightsComponentExportRequest, self).__init__(**kwargs) - self.record_types = record_types - self.destination_type = destination_type - self.destination_address = destination_address - self.is_enabled = is_enabled - self.notification_queue_enabled = notification_queue_enabled - self.notification_queue_uri = notification_queue_uri - self.destination_storage_subscription_id = destination_storage_subscription_id - self.destination_storage_location_id = destination_storage_location_id - self.destination_account_id = destination_account_id diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_favorite.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_favorite.py deleted file mode 100644 index a4e853688245..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_favorite.py +++ /dev/null @@ -1,91 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationInsightsComponentFavorite(Model): - """Properties that define a favorite that is associated to an Application - Insights component. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param name: The user-defined name of the favorite. - :type name: str - :param config: Configuration of this particular favorite, which are driven - by the Azure portal UX. Configuration data is a string containing valid - JSON - :type config: str - :param version: This instance's version of the data model. This can change - as new features are added that can be marked favorite. Current examples - include MetricsExplorer (ME) and Search. - :type version: str - :ivar favorite_id: Internally assigned unique id of the favorite - definition. - :vartype favorite_id: str - :param favorite_type: Enum indicating if this favorite definition is owned - by a specific user or is shared between all users with access to the - Application Insights component. Possible values include: 'shared', 'user' - :type favorite_type: str or - ~azure.mgmt.applicationinsights.models.FavoriteType - :param source_type: The source of the favorite definition. - :type source_type: str - :ivar time_modified: Date and time in UTC of the last modification that - was made to this favorite definition. - :vartype time_modified: str - :param tags: A list of 0 or more tags that are associated with this - favorite definition - :type tags: list[str] - :param category: Favorite category, as defined by the user at creation - time. - :type category: str - :param is_generated_from_template: Flag denoting wether or not this - favorite was generated from a template. - :type is_generated_from_template: bool - :ivar user_id: Unique user id of the specific user that owns this - favorite. - :vartype user_id: str - """ - - _validation = { - 'favorite_id': {'readonly': True}, - 'time_modified': {'readonly': True}, - 'user_id': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'config': {'key': 'Config', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'favorite_id': {'key': 'FavoriteId', 'type': 'str'}, - 'favorite_type': {'key': 'FavoriteType', 'type': 'FavoriteType'}, - 'source_type': {'key': 'SourceType', 'type': 'str'}, - 'time_modified': {'key': 'TimeModified', 'type': 'str'}, - 'tags': {'key': 'Tags', 'type': '[str]'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'is_generated_from_template': {'key': 'IsGeneratedFromTemplate', 'type': 'bool'}, - 'user_id': {'key': 'UserId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApplicationInsightsComponentFavorite, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.config = kwargs.get('config', None) - self.version = kwargs.get('version', None) - self.favorite_id = None - self.favorite_type = kwargs.get('favorite_type', None) - self.source_type = kwargs.get('source_type', None) - self.time_modified = None - self.tags = kwargs.get('tags', None) - self.category = kwargs.get('category', None) - self.is_generated_from_template = kwargs.get('is_generated_from_template', None) - self.user_id = None diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_favorite_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_favorite_py3.py deleted file mode 100644 index e259c7974f11..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_favorite_py3.py +++ /dev/null @@ -1,91 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationInsightsComponentFavorite(Model): - """Properties that define a favorite that is associated to an Application - Insights component. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param name: The user-defined name of the favorite. - :type name: str - :param config: Configuration of this particular favorite, which are driven - by the Azure portal UX. Configuration data is a string containing valid - JSON - :type config: str - :param version: This instance's version of the data model. This can change - as new features are added that can be marked favorite. Current examples - include MetricsExplorer (ME) and Search. - :type version: str - :ivar favorite_id: Internally assigned unique id of the favorite - definition. - :vartype favorite_id: str - :param favorite_type: Enum indicating if this favorite definition is owned - by a specific user or is shared between all users with access to the - Application Insights component. Possible values include: 'shared', 'user' - :type favorite_type: str or - ~azure.mgmt.applicationinsights.models.FavoriteType - :param source_type: The source of the favorite definition. - :type source_type: str - :ivar time_modified: Date and time in UTC of the last modification that - was made to this favorite definition. - :vartype time_modified: str - :param tags: A list of 0 or more tags that are associated with this - favorite definition - :type tags: list[str] - :param category: Favorite category, as defined by the user at creation - time. - :type category: str - :param is_generated_from_template: Flag denoting wether or not this - favorite was generated from a template. - :type is_generated_from_template: bool - :ivar user_id: Unique user id of the specific user that owns this - favorite. - :vartype user_id: str - """ - - _validation = { - 'favorite_id': {'readonly': True}, - 'time_modified': {'readonly': True}, - 'user_id': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'config': {'key': 'Config', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'favorite_id': {'key': 'FavoriteId', 'type': 'str'}, - 'favorite_type': {'key': 'FavoriteType', 'type': 'FavoriteType'}, - 'source_type': {'key': 'SourceType', 'type': 'str'}, - 'time_modified': {'key': 'TimeModified', 'type': 'str'}, - 'tags': {'key': 'Tags', 'type': '[str]'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'is_generated_from_template': {'key': 'IsGeneratedFromTemplate', 'type': 'bool'}, - 'user_id': {'key': 'UserId', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, config: str=None, version: str=None, favorite_type=None, source_type: str=None, tags=None, category: str=None, is_generated_from_template: bool=None, **kwargs) -> None: - super(ApplicationInsightsComponentFavorite, self).__init__(**kwargs) - self.name = name - self.config = config - self.version = version - self.favorite_id = None - self.favorite_type = favorite_type - self.source_type = source_type - self.time_modified = None - self.tags = tags - self.category = category - self.is_generated_from_template = is_generated_from_template - self.user_id = None diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_feature.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_feature.py deleted file mode 100644 index 88d9c54730be..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_feature.py +++ /dev/null @@ -1,77 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationInsightsComponentFeature(Model): - """An Application Insights component daily data volume cap status. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar feature_name: The pricing feature name. - :vartype feature_name: str - :ivar meter_id: The meter id used for the feature. - :vartype meter_id: str - :ivar meter_rate_frequency: The meter rate for the feature's meter. - :vartype meter_rate_frequency: str - :ivar resouce_id: Reserved, not used now. - :vartype resouce_id: str - :ivar is_hidden: Reserved, not used now. - :vartype is_hidden: bool - :ivar capabilities: A list of Application Insights component feature - capability. - :vartype capabilities: - list[~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentFeatureCapability] - :ivar title: Display name of the feature. - :vartype title: str - :ivar is_main_feature: Whether can apply addon feature on to it. - :vartype is_main_feature: bool - :ivar supported_addon_features: The add on features on main feature. - :vartype supported_addon_features: str - """ - - _validation = { - 'feature_name': {'readonly': True}, - 'meter_id': {'readonly': True}, - 'meter_rate_frequency': {'readonly': True}, - 'resouce_id': {'readonly': True}, - 'is_hidden': {'readonly': True}, - 'capabilities': {'readonly': True}, - 'title': {'readonly': True}, - 'is_main_feature': {'readonly': True}, - 'supported_addon_features': {'readonly': True}, - } - - _attribute_map = { - 'feature_name': {'key': 'FeatureName', 'type': 'str'}, - 'meter_id': {'key': 'MeterId', 'type': 'str'}, - 'meter_rate_frequency': {'key': 'MeterRateFrequency', 'type': 'str'}, - 'resouce_id': {'key': 'ResouceId', 'type': 'str'}, - 'is_hidden': {'key': 'IsHidden', 'type': 'bool'}, - 'capabilities': {'key': 'Capabilities', 'type': '[ApplicationInsightsComponentFeatureCapability]'}, - 'title': {'key': 'Title', 'type': 'str'}, - 'is_main_feature': {'key': 'IsMainFeature', 'type': 'bool'}, - 'supported_addon_features': {'key': 'SupportedAddonFeatures', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApplicationInsightsComponentFeature, self).__init__(**kwargs) - self.feature_name = None - self.meter_id = None - self.meter_rate_frequency = None - self.resouce_id = None - self.is_hidden = None - self.capabilities = None - self.title = None - self.is_main_feature = None - self.supported_addon_features = None diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_feature_capabilities.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_feature_capabilities.py deleted file mode 100644 index 7207366358e1..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_feature_capabilities.py +++ /dev/null @@ -1,113 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationInsightsComponentFeatureCapabilities(Model): - """An Application Insights component feature capabilities. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar support_export_data: Whether allow to use continuous export feature. - :vartype support_export_data: bool - :ivar burst_throttle_policy: Reserved, not used now. - :vartype burst_throttle_policy: str - :ivar metadata_class: Reserved, not used now. - :vartype metadata_class: str - :ivar live_stream_metrics: Reserved, not used now. - :vartype live_stream_metrics: bool - :ivar application_map: Reserved, not used now. - :vartype application_map: bool - :ivar work_item_integration: Whether allow to use work item integration - feature. - :vartype work_item_integration: bool - :ivar power_bi_integration: Reserved, not used now. - :vartype power_bi_integration: bool - :ivar open_schema: Reserved, not used now. - :vartype open_schema: bool - :ivar proactive_detection: Reserved, not used now. - :vartype proactive_detection: bool - :ivar analytics_integration: Reserved, not used now. - :vartype analytics_integration: bool - :ivar multiple_step_web_test: Whether allow to use multiple steps web test - feature. - :vartype multiple_step_web_test: bool - :ivar api_access_level: Reserved, not used now. - :vartype api_access_level: str - :ivar tracking_type: The application insights component used tracking - type. - :vartype tracking_type: str - :ivar daily_cap: Daily data volume cap in GB. - :vartype daily_cap: float - :ivar daily_cap_reset_time: Daily data volume cap UTC reset hour. - :vartype daily_cap_reset_time: float - :ivar throttle_rate: Reserved, not used now. - :vartype throttle_rate: float - """ - - _validation = { - 'support_export_data': {'readonly': True}, - 'burst_throttle_policy': {'readonly': True}, - 'metadata_class': {'readonly': True}, - 'live_stream_metrics': {'readonly': True}, - 'application_map': {'readonly': True}, - 'work_item_integration': {'readonly': True}, - 'power_bi_integration': {'readonly': True}, - 'open_schema': {'readonly': True}, - 'proactive_detection': {'readonly': True}, - 'analytics_integration': {'readonly': True}, - 'multiple_step_web_test': {'readonly': True}, - 'api_access_level': {'readonly': True}, - 'tracking_type': {'readonly': True}, - 'daily_cap': {'readonly': True}, - 'daily_cap_reset_time': {'readonly': True}, - 'throttle_rate': {'readonly': True}, - } - - _attribute_map = { - 'support_export_data': {'key': 'SupportExportData', 'type': 'bool'}, - 'burst_throttle_policy': {'key': 'BurstThrottlePolicy', 'type': 'str'}, - 'metadata_class': {'key': 'MetadataClass', 'type': 'str'}, - 'live_stream_metrics': {'key': 'LiveStreamMetrics', 'type': 'bool'}, - 'application_map': {'key': 'ApplicationMap', 'type': 'bool'}, - 'work_item_integration': {'key': 'WorkItemIntegration', 'type': 'bool'}, - 'power_bi_integration': {'key': 'PowerBIIntegration', 'type': 'bool'}, - 'open_schema': {'key': 'OpenSchema', 'type': 'bool'}, - 'proactive_detection': {'key': 'ProactiveDetection', 'type': 'bool'}, - 'analytics_integration': {'key': 'AnalyticsIntegration', 'type': 'bool'}, - 'multiple_step_web_test': {'key': 'MultipleStepWebTest', 'type': 'bool'}, - 'api_access_level': {'key': 'ApiAccessLevel', 'type': 'str'}, - 'tracking_type': {'key': 'TrackingType', 'type': 'str'}, - 'daily_cap': {'key': 'DailyCap', 'type': 'float'}, - 'daily_cap_reset_time': {'key': 'DailyCapResetTime', 'type': 'float'}, - 'throttle_rate': {'key': 'ThrottleRate', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(ApplicationInsightsComponentFeatureCapabilities, self).__init__(**kwargs) - self.support_export_data = None - self.burst_throttle_policy = None - self.metadata_class = None - self.live_stream_metrics = None - self.application_map = None - self.work_item_integration = None - self.power_bi_integration = None - self.open_schema = None - self.proactive_detection = None - self.analytics_integration = None - self.multiple_step_web_test = None - self.api_access_level = None - self.tracking_type = None - self.daily_cap = None - self.daily_cap_reset_time = None - self.throttle_rate = None diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_feature_capabilities_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_feature_capabilities_py3.py deleted file mode 100644 index 80cd00e62901..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_feature_capabilities_py3.py +++ /dev/null @@ -1,113 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationInsightsComponentFeatureCapabilities(Model): - """An Application Insights component feature capabilities. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar support_export_data: Whether allow to use continuous export feature. - :vartype support_export_data: bool - :ivar burst_throttle_policy: Reserved, not used now. - :vartype burst_throttle_policy: str - :ivar metadata_class: Reserved, not used now. - :vartype metadata_class: str - :ivar live_stream_metrics: Reserved, not used now. - :vartype live_stream_metrics: bool - :ivar application_map: Reserved, not used now. - :vartype application_map: bool - :ivar work_item_integration: Whether allow to use work item integration - feature. - :vartype work_item_integration: bool - :ivar power_bi_integration: Reserved, not used now. - :vartype power_bi_integration: bool - :ivar open_schema: Reserved, not used now. - :vartype open_schema: bool - :ivar proactive_detection: Reserved, not used now. - :vartype proactive_detection: bool - :ivar analytics_integration: Reserved, not used now. - :vartype analytics_integration: bool - :ivar multiple_step_web_test: Whether allow to use multiple steps web test - feature. - :vartype multiple_step_web_test: bool - :ivar api_access_level: Reserved, not used now. - :vartype api_access_level: str - :ivar tracking_type: The application insights component used tracking - type. - :vartype tracking_type: str - :ivar daily_cap: Daily data volume cap in GB. - :vartype daily_cap: float - :ivar daily_cap_reset_time: Daily data volume cap UTC reset hour. - :vartype daily_cap_reset_time: float - :ivar throttle_rate: Reserved, not used now. - :vartype throttle_rate: float - """ - - _validation = { - 'support_export_data': {'readonly': True}, - 'burst_throttle_policy': {'readonly': True}, - 'metadata_class': {'readonly': True}, - 'live_stream_metrics': {'readonly': True}, - 'application_map': {'readonly': True}, - 'work_item_integration': {'readonly': True}, - 'power_bi_integration': {'readonly': True}, - 'open_schema': {'readonly': True}, - 'proactive_detection': {'readonly': True}, - 'analytics_integration': {'readonly': True}, - 'multiple_step_web_test': {'readonly': True}, - 'api_access_level': {'readonly': True}, - 'tracking_type': {'readonly': True}, - 'daily_cap': {'readonly': True}, - 'daily_cap_reset_time': {'readonly': True}, - 'throttle_rate': {'readonly': True}, - } - - _attribute_map = { - 'support_export_data': {'key': 'SupportExportData', 'type': 'bool'}, - 'burst_throttle_policy': {'key': 'BurstThrottlePolicy', 'type': 'str'}, - 'metadata_class': {'key': 'MetadataClass', 'type': 'str'}, - 'live_stream_metrics': {'key': 'LiveStreamMetrics', 'type': 'bool'}, - 'application_map': {'key': 'ApplicationMap', 'type': 'bool'}, - 'work_item_integration': {'key': 'WorkItemIntegration', 'type': 'bool'}, - 'power_bi_integration': {'key': 'PowerBIIntegration', 'type': 'bool'}, - 'open_schema': {'key': 'OpenSchema', 'type': 'bool'}, - 'proactive_detection': {'key': 'ProactiveDetection', 'type': 'bool'}, - 'analytics_integration': {'key': 'AnalyticsIntegration', 'type': 'bool'}, - 'multiple_step_web_test': {'key': 'MultipleStepWebTest', 'type': 'bool'}, - 'api_access_level': {'key': 'ApiAccessLevel', 'type': 'str'}, - 'tracking_type': {'key': 'TrackingType', 'type': 'str'}, - 'daily_cap': {'key': 'DailyCap', 'type': 'float'}, - 'daily_cap_reset_time': {'key': 'DailyCapResetTime', 'type': 'float'}, - 'throttle_rate': {'key': 'ThrottleRate', 'type': 'float'}, - } - - def __init__(self, **kwargs) -> None: - super(ApplicationInsightsComponentFeatureCapabilities, self).__init__(**kwargs) - self.support_export_data = None - self.burst_throttle_policy = None - self.metadata_class = None - self.live_stream_metrics = None - self.application_map = None - self.work_item_integration = None - self.power_bi_integration = None - self.open_schema = None - self.proactive_detection = None - self.analytics_integration = None - self.multiple_step_web_test = None - self.api_access_level = None - self.tracking_type = None - self.daily_cap = None - self.daily_cap_reset_time = None - self.throttle_rate = None diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_feature_capability.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_feature_capability.py deleted file mode 100644 index eb5a4cee5c28..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_feature_capability.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationInsightsComponentFeatureCapability(Model): - """An Application Insights component feature capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the capability. - :vartype name: str - :ivar description: The description of the capability. - :vartype description: str - :ivar value: The value of the capability. - :vartype value: str - :ivar unit: The unit of the capability. - :vartype unit: str - :ivar meter_id: The meter used for the capability. - :vartype meter_id: str - :ivar meter_rate_frequency: The meter rate of the meter. - :vartype meter_rate_frequency: str - """ - - _validation = { - 'name': {'readonly': True}, - 'description': {'readonly': True}, - 'value': {'readonly': True}, - 'unit': {'readonly': True}, - 'meter_id': {'readonly': True}, - 'meter_rate_frequency': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'str'}, - 'unit': {'key': 'Unit', 'type': 'str'}, - 'meter_id': {'key': 'MeterId', 'type': 'str'}, - 'meter_rate_frequency': {'key': 'MeterRateFrequency', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApplicationInsightsComponentFeatureCapability, self).__init__(**kwargs) - self.name = None - self.description = None - self.value = None - self.unit = None - self.meter_id = None - self.meter_rate_frequency = None diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_feature_capability_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_feature_capability_py3.py deleted file mode 100644 index e301012a6694..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_feature_capability_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationInsightsComponentFeatureCapability(Model): - """An Application Insights component feature capability. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the capability. - :vartype name: str - :ivar description: The description of the capability. - :vartype description: str - :ivar value: The value of the capability. - :vartype value: str - :ivar unit: The unit of the capability. - :vartype unit: str - :ivar meter_id: The meter used for the capability. - :vartype meter_id: str - :ivar meter_rate_frequency: The meter rate of the meter. - :vartype meter_rate_frequency: str - """ - - _validation = { - 'name': {'readonly': True}, - 'description': {'readonly': True}, - 'value': {'readonly': True}, - 'unit': {'readonly': True}, - 'meter_id': {'readonly': True}, - 'meter_rate_frequency': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'str'}, - 'unit': {'key': 'Unit', 'type': 'str'}, - 'meter_id': {'key': 'MeterId', 'type': 'str'}, - 'meter_rate_frequency': {'key': 'MeterRateFrequency', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ApplicationInsightsComponentFeatureCapability, self).__init__(**kwargs) - self.name = None - self.description = None - self.value = None - self.unit = None - self.meter_id = None - self.meter_rate_frequency = None diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_feature_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_feature_py3.py deleted file mode 100644 index 1df9aee5e940..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_feature_py3.py +++ /dev/null @@ -1,77 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationInsightsComponentFeature(Model): - """An Application Insights component daily data volume cap status. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar feature_name: The pricing feature name. - :vartype feature_name: str - :ivar meter_id: The meter id used for the feature. - :vartype meter_id: str - :ivar meter_rate_frequency: The meter rate for the feature's meter. - :vartype meter_rate_frequency: str - :ivar resouce_id: Reserved, not used now. - :vartype resouce_id: str - :ivar is_hidden: Reserved, not used now. - :vartype is_hidden: bool - :ivar capabilities: A list of Application Insights component feature - capability. - :vartype capabilities: - list[~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentFeatureCapability] - :ivar title: Display name of the feature. - :vartype title: str - :ivar is_main_feature: Whether can apply addon feature on to it. - :vartype is_main_feature: bool - :ivar supported_addon_features: The add on features on main feature. - :vartype supported_addon_features: str - """ - - _validation = { - 'feature_name': {'readonly': True}, - 'meter_id': {'readonly': True}, - 'meter_rate_frequency': {'readonly': True}, - 'resouce_id': {'readonly': True}, - 'is_hidden': {'readonly': True}, - 'capabilities': {'readonly': True}, - 'title': {'readonly': True}, - 'is_main_feature': {'readonly': True}, - 'supported_addon_features': {'readonly': True}, - } - - _attribute_map = { - 'feature_name': {'key': 'FeatureName', 'type': 'str'}, - 'meter_id': {'key': 'MeterId', 'type': 'str'}, - 'meter_rate_frequency': {'key': 'MeterRateFrequency', 'type': 'str'}, - 'resouce_id': {'key': 'ResouceId', 'type': 'str'}, - 'is_hidden': {'key': 'IsHidden', 'type': 'bool'}, - 'capabilities': {'key': 'Capabilities', 'type': '[ApplicationInsightsComponentFeatureCapability]'}, - 'title': {'key': 'Title', 'type': 'str'}, - 'is_main_feature': {'key': 'IsMainFeature', 'type': 'bool'}, - 'supported_addon_features': {'key': 'SupportedAddonFeatures', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ApplicationInsightsComponentFeature, self).__init__(**kwargs) - self.feature_name = None - self.meter_id = None - self.meter_rate_frequency = None - self.resouce_id = None - self.is_hidden = None - self.capabilities = None - self.title = None - self.is_main_feature = None - self.supported_addon_features = None diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_paged.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_paged.py deleted file mode 100644 index 7283609bd08a..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ApplicationInsightsComponentPaged(Paged): - """ - A paging container for iterating over a list of :class:`ApplicationInsightsComponent ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ApplicationInsightsComponent]'} - } - - def __init__(self, *args, **kwargs): - - super(ApplicationInsightsComponentPaged, self).__init__(*args, **kwargs) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_proactive_detection_configuration.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_proactive_detection_configuration.py deleted file mode 100644 index 355e6bf6014a..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_proactive_detection_configuration.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationInsightsComponentProactiveDetectionConfiguration(Model): - """Properties that define a ProactiveDetection configuration. - - :param name: The rule name - :type name: str - :param enabled: A flag that indicates whether this rule is enabled by the - user - :type enabled: bool - :param send_emails_to_subscription_owners: A flag that indicated whether - notifications on this rule should be sent to subscription owners - :type send_emails_to_subscription_owners: bool - :param custom_emails: Custom email addresses for this rule notifications - :type custom_emails: list[str] - :param last_updated_time: The last time this rule was updated - :type last_updated_time: str - :param rule_definitions: Static definitions of the ProactiveDetection - configuration rule (same values for all components). - :type rule_definitions: - ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'enabled': {'key': 'Enabled', 'type': 'bool'}, - 'send_emails_to_subscription_owners': {'key': 'SendEmailsToSubscriptionOwners', 'type': 'bool'}, - 'custom_emails': {'key': 'CustomEmails', 'type': '[str]'}, - 'last_updated_time': {'key': 'LastUpdatedTime', 'type': 'str'}, - 'rule_definitions': {'key': 'RuleDefinitions', 'type': 'ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions'}, - } - - def __init__(self, **kwargs): - super(ApplicationInsightsComponentProactiveDetectionConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.enabled = kwargs.get('enabled', None) - self.send_emails_to_subscription_owners = kwargs.get('send_emails_to_subscription_owners', None) - self.custom_emails = kwargs.get('custom_emails', None) - self.last_updated_time = kwargs.get('last_updated_time', None) - self.rule_definitions = kwargs.get('rule_definitions', None) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_proactive_detection_configuration_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_proactive_detection_configuration_py3.py deleted file mode 100644 index 9dd76e067641..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_proactive_detection_configuration_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationInsightsComponentProactiveDetectionConfiguration(Model): - """Properties that define a ProactiveDetection configuration. - - :param name: The rule name - :type name: str - :param enabled: A flag that indicates whether this rule is enabled by the - user - :type enabled: bool - :param send_emails_to_subscription_owners: A flag that indicated whether - notifications on this rule should be sent to subscription owners - :type send_emails_to_subscription_owners: bool - :param custom_emails: Custom email addresses for this rule notifications - :type custom_emails: list[str] - :param last_updated_time: The last time this rule was updated - :type last_updated_time: str - :param rule_definitions: Static definitions of the ProactiveDetection - configuration rule (same values for all components). - :type rule_definitions: - ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'enabled': {'key': 'Enabled', 'type': 'bool'}, - 'send_emails_to_subscription_owners': {'key': 'SendEmailsToSubscriptionOwners', 'type': 'bool'}, - 'custom_emails': {'key': 'CustomEmails', 'type': '[str]'}, - 'last_updated_time': {'key': 'LastUpdatedTime', 'type': 'str'}, - 'rule_definitions': {'key': 'RuleDefinitions', 'type': 'ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions'}, - } - - def __init__(self, *, name: str=None, enabled: bool=None, send_emails_to_subscription_owners: bool=None, custom_emails=None, last_updated_time: str=None, rule_definitions=None, **kwargs) -> None: - super(ApplicationInsightsComponentProactiveDetectionConfiguration, self).__init__(**kwargs) - self.name = name - self.enabled = enabled - self.send_emails_to_subscription_owners = send_emails_to_subscription_owners - self.custom_emails = custom_emails - self.last_updated_time = last_updated_time - self.rule_definitions = rule_definitions diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_proactive_detection_configuration_rule_definitions.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_proactive_detection_configuration_rule_definitions.py deleted file mode 100644 index c555ca273c51..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_proactive_detection_configuration_rule_definitions.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions(Model): - """Static definitions of the ProactiveDetection configuration rule (same - values for all components). - - :param name: The rule name - :type name: str - :param display_name: The rule name as it is displayed in UI - :type display_name: str - :param description: The rule description - :type description: str - :param help_url: URL which displays additional info about the proactive - detection rule - :type help_url: str - :param is_hidden: A flag indicating whether the rule is hidden (from the - UI) - :type is_hidden: bool - :param is_enabled_by_default: A flag indicating whether the rule is - enabled by default - :type is_enabled_by_default: bool - :param is_in_preview: A flag indicating whether the rule is in preview - :type is_in_preview: bool - :param supports_email_notifications: A flag indicating whether email - notifications are supported for detections for this rule - :type supports_email_notifications: bool - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'display_name': {'key': 'DisplayName', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'help_url': {'key': 'HelpUrl', 'type': 'str'}, - 'is_hidden': {'key': 'IsHidden', 'type': 'bool'}, - 'is_enabled_by_default': {'key': 'IsEnabledByDefault', 'type': 'bool'}, - 'is_in_preview': {'key': 'IsInPreview', 'type': 'bool'}, - 'supports_email_notifications': {'key': 'SupportsEmailNotifications', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display_name = kwargs.get('display_name', None) - self.description = kwargs.get('description', None) - self.help_url = kwargs.get('help_url', None) - self.is_hidden = kwargs.get('is_hidden', None) - self.is_enabled_by_default = kwargs.get('is_enabled_by_default', None) - self.is_in_preview = kwargs.get('is_in_preview', None) - self.supports_email_notifications = kwargs.get('supports_email_notifications', None) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_proactive_detection_configuration_rule_definitions_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_proactive_detection_configuration_rule_definitions_py3.py deleted file mode 100644 index f10a49b01c1c..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_proactive_detection_configuration_rule_definitions_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions(Model): - """Static definitions of the ProactiveDetection configuration rule (same - values for all components). - - :param name: The rule name - :type name: str - :param display_name: The rule name as it is displayed in UI - :type display_name: str - :param description: The rule description - :type description: str - :param help_url: URL which displays additional info about the proactive - detection rule - :type help_url: str - :param is_hidden: A flag indicating whether the rule is hidden (from the - UI) - :type is_hidden: bool - :param is_enabled_by_default: A flag indicating whether the rule is - enabled by default - :type is_enabled_by_default: bool - :param is_in_preview: A flag indicating whether the rule is in preview - :type is_in_preview: bool - :param supports_email_notifications: A flag indicating whether email - notifications are supported for detections for this rule - :type supports_email_notifications: bool - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'display_name': {'key': 'DisplayName', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'help_url': {'key': 'HelpUrl', 'type': 'str'}, - 'is_hidden': {'key': 'IsHidden', 'type': 'bool'}, - 'is_enabled_by_default': {'key': 'IsEnabledByDefault', 'type': 'bool'}, - 'is_in_preview': {'key': 'IsInPreview', 'type': 'bool'}, - 'supports_email_notifications': {'key': 'SupportsEmailNotifications', 'type': 'bool'}, - } - - def __init__(self, *, name: str=None, display_name: str=None, description: str=None, help_url: str=None, is_hidden: bool=None, is_enabled_by_default: bool=None, is_in_preview: bool=None, supports_email_notifications: bool=None, **kwargs) -> None: - super(ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions, self).__init__(**kwargs) - self.name = name - self.display_name = display_name - self.description = description - self.help_url = help_url - self.is_hidden = is_hidden - self.is_enabled_by_default = is_enabled_by_default - self.is_in_preview = is_in_preview - self.supports_email_notifications = supports_email_notifications diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_py3.py deleted file mode 100644 index 30a77745810b..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_py3.py +++ /dev/null @@ -1,134 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .components_resource_py3 import ComponentsResource - - -class ApplicationInsightsComponent(ComponentsResource): - """An Application Insights component definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Azure resource Id - :vartype id: str - :ivar name: Azure resource name - :vartype name: str - :ivar type: Azure resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kind: Required. The kind of application that this component refers - to, used to customize UI. This value is a freeform string, values should - typically be one of the following: web, ios, other, store, java, phone. - :type kind: str - :ivar application_id: The unique ID of your application. This field - mirrors the 'Name' field and cannot be changed. - :vartype application_id: str - :ivar app_id: Application Insights Unique ID for your Application. - :vartype app_id: str - :param application_type: Required. Type of application being monitored. - Possible values include: 'web', 'other'. Default value: "web" . - :type application_type: str or - ~azure.mgmt.applicationinsights.models.ApplicationType - :param flow_type: Used by the Application Insights system to determine - what kind of flow this component was created by. This is to be set to - 'Bluefield' when creating/updating a component via the REST API. Possible - values include: 'Bluefield'. Default value: "Bluefield" . - :type flow_type: str or ~azure.mgmt.applicationinsights.models.FlowType - :param request_source: Describes what tool created this Application - Insights component. Customers using this API should set this to the - default 'rest'. Possible values include: 'rest'. Default value: "rest" . - :type request_source: str or - ~azure.mgmt.applicationinsights.models.RequestSource - :ivar instrumentation_key: Application Insights Instrumentation key. A - read-only value that applications can use to identify the destination for - all telemetry sent to Azure Application Insights. This value will be - supplied upon construction of each new Application Insights component. - :vartype instrumentation_key: str - :ivar creation_date: Creation Date for the Application Insights component, - in ISO 8601 format. - :vartype creation_date: datetime - :ivar tenant_id: Azure Tenant Id. - :vartype tenant_id: str - :param hockey_app_id: The unique application ID created when a new - application is added to HockeyApp, used for communications with HockeyApp. - :type hockey_app_id: str - :ivar hockey_app_token: Token used to authenticate communications with - between Application Insights and HockeyApp. - :vartype hockey_app_token: str - :ivar provisioning_state: Current state of this component: whether or not - is has been provisioned within the resource group it is defined. Users - cannot change this value but are able to read from it. Values will include - Succeeded, Deploying, Canceled, and Failed. - :vartype provisioning_state: str - :param sampling_percentage: Percentage of the data produced by the - application being monitored that is being sampled for Application Insights - telemetry. - :type sampling_percentage: float - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'readonly': True}, - 'app_id': {'readonly': True}, - 'application_type': {'required': True}, - 'instrumentation_key': {'readonly': True}, - 'creation_date': {'readonly': True}, - 'tenant_id': {'readonly': True}, - 'hockey_app_token': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'application_id': {'key': 'properties.ApplicationId', 'type': 'str'}, - 'app_id': {'key': 'properties.AppId', 'type': 'str'}, - 'application_type': {'key': 'properties.Application_Type', 'type': 'str'}, - 'flow_type': {'key': 'properties.Flow_Type', 'type': 'str'}, - 'request_source': {'key': 'properties.Request_Source', 'type': 'str'}, - 'instrumentation_key': {'key': 'properties.InstrumentationKey', 'type': 'str'}, - 'creation_date': {'key': 'properties.CreationDate', 'type': 'iso-8601'}, - 'tenant_id': {'key': 'properties.TenantId', 'type': 'str'}, - 'hockey_app_id': {'key': 'properties.HockeyAppId', 'type': 'str'}, - 'hockey_app_token': {'key': 'properties.HockeyAppToken', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'sampling_percentage': {'key': 'properties.SamplingPercentage', 'type': 'float'}, - } - - def __init__(self, *, location: str, kind: str, tags=None, application_type="web", flow_type="Bluefield", request_source="rest", hockey_app_id: str=None, sampling_percentage: float=None, **kwargs) -> None: - super(ApplicationInsightsComponent, self).__init__(location=location, tags=tags, **kwargs) - self.kind = kind - self.application_id = None - self.app_id = None - self.application_type = application_type - self.flow_type = flow_type - self.request_source = request_source - self.instrumentation_key = None - self.creation_date = None - self.tenant_id = None - self.hockey_app_id = hockey_app_id - self.hockey_app_token = None - self.provisioning_state = None - self.sampling_percentage = sampling_percentage diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_quota_status.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_quota_status.py deleted file mode 100644 index 3d9ad05948f1..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_quota_status.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationInsightsComponentQuotaStatus(Model): - """An Application Insights component daily data volume cap status. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar app_id: The Application ID for the Application Insights component. - :vartype app_id: str - :ivar should_be_throttled: The daily data volume cap is met, and data - ingestion will be stopped. - :vartype should_be_throttled: bool - :ivar expiration_time: Date and time when the daily data volume cap will - be reset, and data ingestion will resume. - :vartype expiration_time: str - """ - - _validation = { - 'app_id': {'readonly': True}, - 'should_be_throttled': {'readonly': True}, - 'expiration_time': {'readonly': True}, - } - - _attribute_map = { - 'app_id': {'key': 'AppId', 'type': 'str'}, - 'should_be_throttled': {'key': 'ShouldBeThrottled', 'type': 'bool'}, - 'expiration_time': {'key': 'ExpirationTime', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApplicationInsightsComponentQuotaStatus, self).__init__(**kwargs) - self.app_id = None - self.should_be_throttled = None - self.expiration_time = None diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_quota_status_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_quota_status_py3.py deleted file mode 100644 index 19d10c0dd902..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_quota_status_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationInsightsComponentQuotaStatus(Model): - """An Application Insights component daily data volume cap status. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar app_id: The Application ID for the Application Insights component. - :vartype app_id: str - :ivar should_be_throttled: The daily data volume cap is met, and data - ingestion will be stopped. - :vartype should_be_throttled: bool - :ivar expiration_time: Date and time when the daily data volume cap will - be reset, and data ingestion will resume. - :vartype expiration_time: str - """ - - _validation = { - 'app_id': {'readonly': True}, - 'should_be_throttled': {'readonly': True}, - 'expiration_time': {'readonly': True}, - } - - _attribute_map = { - 'app_id': {'key': 'AppId', 'type': 'str'}, - 'should_be_throttled': {'key': 'ShouldBeThrottled', 'type': 'bool'}, - 'expiration_time': {'key': 'ExpirationTime', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ApplicationInsightsComponentQuotaStatus, self).__init__(**kwargs) - self.app_id = None - self.should_be_throttled = None - self.expiration_time = None diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_web_test_location.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_web_test_location.py deleted file mode 100644 index f58dd82e7eb2..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_web_test_location.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationInsightsComponentWebTestLocation(Model): - """Properties that define a web test location available to an Application - Insights Component. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar display_name: The display name of the web test location. - :vartype display_name: str - :ivar tag: Internally defined geographic location tag. - :vartype tag: str - """ - - _validation = { - 'display_name': {'readonly': True}, - 'tag': {'readonly': True}, - } - - _attribute_map = { - 'display_name': {'key': 'DisplayName', 'type': 'str'}, - 'tag': {'key': 'Tag', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApplicationInsightsComponentWebTestLocation, self).__init__(**kwargs) - self.display_name = None - self.tag = None diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_web_test_location_paged.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_web_test_location_paged.py deleted file mode 100644 index 7cfba600f3f5..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_web_test_location_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ApplicationInsightsComponentWebTestLocationPaged(Paged): - """ - A paging container for iterating over a list of :class:`ApplicationInsightsComponentWebTestLocation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ApplicationInsightsComponentWebTestLocation]'} - } - - def __init__(self, *args, **kwargs): - - super(ApplicationInsightsComponentWebTestLocationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_web_test_location_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_web_test_location_py3.py deleted file mode 100644 index 408b28928111..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_web_test_location_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationInsightsComponentWebTestLocation(Model): - """Properties that define a web test location available to an Application - Insights Component. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar display_name: The display name of the web test location. - :vartype display_name: str - :ivar tag: Internally defined geographic location tag. - :vartype tag: str - """ - - _validation = { - 'display_name': {'readonly': True}, - 'tag': {'readonly': True}, - } - - _attribute_map = { - 'display_name': {'key': 'DisplayName', 'type': 'str'}, - 'tag': {'key': 'Tag', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ApplicationInsightsComponentWebTestLocation, self).__init__(**kwargs) - self.display_name = None - self.tag = None diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/component_purge_body.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/component_purge_body.py deleted file mode 100644 index 90a0be9c9bfa..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/component_purge_body.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComponentPurgeBody(Model): - """Describes the body of a purge request for an App Insights component. - - All required parameters must be populated in order to send to Azure. - - :param table: Required. Table from which to purge data. - :type table: str - :param filters: Required. The set of columns and filters (queries) to run - over them to purge the resulting data. - :type filters: - list[~azure.mgmt.applicationinsights.models.ComponentPurgeBodyFilters] - """ - - _validation = { - 'table': {'required': True}, - 'filters': {'required': True}, - } - - _attribute_map = { - 'table': {'key': 'table', 'type': 'str'}, - 'filters': {'key': 'filters', 'type': '[ComponentPurgeBodyFilters]'}, - } - - def __init__(self, **kwargs): - super(ComponentPurgeBody, self).__init__(**kwargs) - self.table = kwargs.get('table', None) - self.filters = kwargs.get('filters', None) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/component_purge_body_filters.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/component_purge_body_filters.py deleted file mode 100644 index 09948ccd3907..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/component_purge_body_filters.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComponentPurgeBodyFilters(Model): - """User-defined filters to return data which will be purged from the table. - - :param column: The column of the table over which the given query should - run - :type column: str - :param operator: A query operator to evaluate over the provided column and - value(s). - :type operator: str - :param value: the value for the operator to function over. This can be a - number (e.g., > 100), a string (timestamp >= '2017-09-01') or array of - values. - :type value: object - :param key: When filtering over custom dimensions, this key will be used - as the name of the custom dimension. - :type key: str - """ - - _attribute_map = { - 'column': {'key': 'column', 'type': 'str'}, - 'operator': {'key': 'operator', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'object'}, - 'key': {'key': 'key', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ComponentPurgeBodyFilters, self).__init__(**kwargs) - self.column = kwargs.get('column', None) - self.operator = kwargs.get('operator', None) - self.value = kwargs.get('value', None) - self.key = kwargs.get('key', None) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/component_purge_body_filters_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/component_purge_body_filters_py3.py deleted file mode 100644 index 9da4c4eb8e6b..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/component_purge_body_filters_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComponentPurgeBodyFilters(Model): - """User-defined filters to return data which will be purged from the table. - - :param column: The column of the table over which the given query should - run - :type column: str - :param operator: A query operator to evaluate over the provided column and - value(s). - :type operator: str - :param value: the value for the operator to function over. This can be a - number (e.g., > 100), a string (timestamp >= '2017-09-01') or array of - values. - :type value: object - :param key: When filtering over custom dimensions, this key will be used - as the name of the custom dimension. - :type key: str - """ - - _attribute_map = { - 'column': {'key': 'column', 'type': 'str'}, - 'operator': {'key': 'operator', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'object'}, - 'key': {'key': 'key', 'type': 'str'}, - } - - def __init__(self, *, column: str=None, operator: str=None, value=None, key: str=None, **kwargs) -> None: - super(ComponentPurgeBodyFilters, self).__init__(**kwargs) - self.column = column - self.operator = operator - self.value = value - self.key = key diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/component_purge_body_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/component_purge_body_py3.py deleted file mode 100644 index d5dae00d2c93..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/component_purge_body_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComponentPurgeBody(Model): - """Describes the body of a purge request for an App Insights component. - - All required parameters must be populated in order to send to Azure. - - :param table: Required. Table from which to purge data. - :type table: str - :param filters: Required. The set of columns and filters (queries) to run - over them to purge the resulting data. - :type filters: - list[~azure.mgmt.applicationinsights.models.ComponentPurgeBodyFilters] - """ - - _validation = { - 'table': {'required': True}, - 'filters': {'required': True}, - } - - _attribute_map = { - 'table': {'key': 'table', 'type': 'str'}, - 'filters': {'key': 'filters', 'type': '[ComponentPurgeBodyFilters]'}, - } - - def __init__(self, *, table: str, filters, **kwargs) -> None: - super(ComponentPurgeBody, self).__init__(**kwargs) - self.table = table - self.filters = filters diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/component_purge_response.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/component_purge_response.py deleted file mode 100644 index fda99b2a52fb..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/component_purge_response.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComponentPurgeResponse(Model): - """Response containing operationId for a specific purge action. - - All required parameters must be populated in order to send to Azure. - - :param operation_id: Required. Id to use when querying for status for a - particular purge operation. - :type operation_id: str - """ - - _validation = { - 'operation_id': {'required': True}, - } - - _attribute_map = { - 'operation_id': {'key': 'operationId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ComponentPurgeResponse, self).__init__(**kwargs) - self.operation_id = kwargs.get('operation_id', None) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/component_purge_response_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/component_purge_response_py3.py deleted file mode 100644 index 4ba086b30add..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/component_purge_response_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComponentPurgeResponse(Model): - """Response containing operationId for a specific purge action. - - All required parameters must be populated in order to send to Azure. - - :param operation_id: Required. Id to use when querying for status for a - particular purge operation. - :type operation_id: str - """ - - _validation = { - 'operation_id': {'required': True}, - } - - _attribute_map = { - 'operation_id': {'key': 'operationId', 'type': 'str'}, - } - - def __init__(self, *, operation_id: str, **kwargs) -> None: - super(ComponentPurgeResponse, self).__init__(**kwargs) - self.operation_id = operation_id diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/component_purge_status_response.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/component_purge_status_response.py deleted file mode 100644 index f45c559d30c5..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/component_purge_status_response.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComponentPurgeStatusResponse(Model): - """Response containing status for a specific purge operation. - - All required parameters must be populated in order to send to Azure. - - :param status: Required. Status of the operation represented by the - requested Id. Possible values include: 'pending', 'completed' - :type status: str or ~azure.mgmt.applicationinsights.models.PurgeState - """ - - _validation = { - 'status': {'required': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ComponentPurgeStatusResponse, self).__init__(**kwargs) - self.status = kwargs.get('status', None) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/component_purge_status_response_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/component_purge_status_response_py3.py deleted file mode 100644 index ced738baf8a8..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/component_purge_status_response_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComponentPurgeStatusResponse(Model): - """Response containing status for a specific purge operation. - - All required parameters must be populated in order to send to Azure. - - :param status: Required. Status of the operation represented by the - requested Id. Possible values include: 'pending', 'completed' - :type status: str or ~azure.mgmt.applicationinsights.models.PurgeState - """ - - _validation = { - 'status': {'required': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__(self, *, status, **kwargs) -> None: - super(ComponentPurgeStatusResponse, self).__init__(**kwargs) - self.status = status diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/components_resource.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/components_resource.py deleted file mode 100644 index 23e2f8e06a54..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/components_resource.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComponentsResource(Model): - """An azure resource object. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Azure resource Id - :vartype id: str - :ivar name: Azure resource name - :vartype name: str - :ivar type: Azure resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ComponentsResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/components_resource_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/components_resource_py3.py deleted file mode 100644 index 565bbcbdfab9..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/components_resource_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComponentsResource(Model): - """An azure resource object. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Azure resource Id - :vartype id: str - :ivar name: Azure resource name - :vartype name: str - :ivar type: Azure resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(ComponentsResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/error_field_contract.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/error_field_contract.py deleted file mode 100644 index f376b6292b73..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/error_field_contract.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ErrorFieldContract(Model): - """Error Field contract. - - :param code: Property level error code. - :type code: str - :param message: Human-readable representation of property-level error. - :type message: str - :param target: Property name. - :type target: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ErrorFieldContract, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.target = kwargs.get('target', None) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/error_field_contract_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/error_field_contract_py3.py deleted file mode 100644 index f5c5e28d94d8..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/error_field_contract_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ErrorFieldContract(Model): - """Error Field contract. - - :param code: Property level error code. - :type code: str - :param message: Human-readable representation of property-level error. - :type message: str - :param target: Property name. - :type target: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, message: str=None, target: str=None, **kwargs) -> None: - super(ErrorFieldContract, self).__init__(**kwargs) - self.code = code - self.message = message - self.target = target diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/error_response.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/error_response.py deleted file mode 100644 index 89631521edd0..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/error_response.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class ErrorResponse(Model): - """Error response indicates Insights service is not able to process the - incoming request. The reason is provided in the error message. - - :param code: Error code. - :type code: str - :param message: Error message indicating why the operation failed. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ErrorResponse, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - - -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/error_response_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/error_response_py3.py deleted file mode 100644 index c9d57472c9a9..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/error_response_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class ErrorResponse(Model): - """Error response indicates Insights service is not able to process the - incoming request. The reason is provided in the error message. - - :param code: Error code. - :type code: str - :param message: Error message indicating why the operation failed. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: - super(ErrorResponse, self).__init__(**kwargs) - self.code = code - self.message = message - - -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/inner_error.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/inner_error.py deleted file mode 100644 index c6a045d11a9b..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/inner_error.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InnerError(Model): - """Inner error. - - :param diagnosticcontext: Provides correlation for request - :type diagnosticcontext: str - :param time: Request time - :type time: datetime - """ - - _attribute_map = { - 'diagnosticcontext': {'key': 'diagnosticcontext', 'type': 'str'}, - 'time': {'key': 'time', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(InnerError, self).__init__(**kwargs) - self.diagnosticcontext = kwargs.get('diagnosticcontext', None) - self.time = kwargs.get('time', None) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/inner_error_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/inner_error_py3.py deleted file mode 100644 index 3d49c7d88df6..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/inner_error_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InnerError(Model): - """Inner error. - - :param diagnosticcontext: Provides correlation for request - :type diagnosticcontext: str - :param time: Request time - :type time: datetime - """ - - _attribute_map = { - 'diagnosticcontext': {'key': 'diagnosticcontext', 'type': 'str'}, - 'time': {'key': 'time', 'type': 'iso-8601'}, - } - - def __init__(self, *, diagnosticcontext: str=None, time=None, **kwargs) -> None: - super(InnerError, self).__init__(**kwargs) - self.diagnosticcontext = diagnosticcontext - self.time = time diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/link_properties.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/link_properties.py deleted file mode 100644 index daf15acf5f1f..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/link_properties.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinkProperties(Model): - """Contains a sourceId and workbook resource id to link two resources. - - :param source_id: The source Azure resource id - :type source_id: str - :param target_id: The workbook Azure resource id - :type target_id: str - :param category: The category of workbook - :type category: str - """ - - _attribute_map = { - 'source_id': {'key': 'sourceId', 'type': 'str'}, - 'target_id': {'key': 'targetId', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LinkProperties, self).__init__(**kwargs) - self.source_id = kwargs.get('source_id', None) - self.target_id = kwargs.get('target_id', None) - self.category = kwargs.get('category', None) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/link_properties_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/link_properties_py3.py deleted file mode 100644 index e7612f593cf8..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/link_properties_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinkProperties(Model): - """Contains a sourceId and workbook resource id to link two resources. - - :param source_id: The source Azure resource id - :type source_id: str - :param target_id: The workbook Azure resource id - :type target_id: str - :param category: The category of workbook - :type category: str - """ - - _attribute_map = { - 'source_id': {'key': 'sourceId', 'type': 'str'}, - 'target_id': {'key': 'targetId', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - } - - def __init__(self, *, source_id: str=None, target_id: str=None, category: str=None, **kwargs) -> None: - super(LinkProperties, self).__init__(**kwargs) - self.source_id = source_id - self.target_id = target_id - self.category = category diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/operation.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/operation.py deleted file mode 100644 index 994037f48c03..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/operation.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """CDN REST API operation. - - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param display: The object that represents the operation. - :type display: ~azure.mgmt.applicationinsights.models.OperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/operation_display.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/operation_display.py deleted file mode 100644 index 2ff48a6ea9fe..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/operation_display.py +++ /dev/null @@ -1,37 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """The object that represents the operation. - - :param provider: Service provider: Microsoft.Cdn - :type provider: str - :param resource: Resource on which the operation is performed: Profile, - endpoint, etc. - :type resource: str - :param operation: Operation type: Read, write, delete, etc. - :type operation: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.resource = kwargs.get('resource', None) - self.operation = kwargs.get('operation', None) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/operation_display_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/operation_display_py3.py deleted file mode 100644 index 5ea914f161e4..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/operation_display_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """The object that represents the operation. - - :param provider: Service provider: Microsoft.Cdn - :type provider: str - :param resource: Resource on which the operation is performed: Profile, - endpoint, etc. - :type resource: str - :param operation: Operation type: Read, write, delete, etc. - :type operation: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - } - - def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/operation_paged.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/operation_paged.py deleted file mode 100644 index 73ef02f08863..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/operation_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/operation_py3.py deleted file mode 100644 index 852ec7479e5e..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/operation_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """CDN REST API operation. - - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param display: The object that represents the operation. - :type display: ~azure.mgmt.applicationinsights.models.OperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, *, name: str=None, display=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = name - self.display = display diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/tags_resource.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/tags_resource.py deleted file mode 100644 index 2c5923e9194b..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/tags_resource.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TagsResource(Model): - """A container holding only the Tags for a resource, allowing the user to - update the tags on a WebTest instance. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TagsResource, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/tags_resource_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/tags_resource_py3.py deleted file mode 100644 index 999720dda2fd..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/tags_resource_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TagsResource(Model): - """A container holding only the Tags for a resource, allowing the user to - update the tags on a WebTest instance. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(TagsResource, self).__init__(**kwargs) - self.tags = tags diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/web_test.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/web_test.py deleted file mode 100644 index 9c825ecf5a3e..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/web_test.py +++ /dev/null @@ -1,119 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .webtests_resource import WebtestsResource - - -class WebTest(WebtestsResource): - """An Application Insights web test definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Azure resource Id - :vartype id: str - :ivar name: Azure resource name - :vartype name: str - :ivar type: Azure resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kind: The kind of web test that this web test watches. Choices are - ping and multistep. Possible values include: 'ping', 'multistep'. Default - value: "ping" . - :type kind: str or ~azure.mgmt.applicationinsights.models.WebTestKind - :param synthetic_monitor_id: Required. Unique ID of this WebTest. This is - typically the same value as the Name field. - :type synthetic_monitor_id: str - :param web_test_name: Required. User defined name if this WebTest. - :type web_test_name: str - :param description: Purpose/user defined descriptive test for this - WebTest. - :type description: str - :param enabled: Is the test actively being monitored. - :type enabled: bool - :param frequency: Interval in seconds between test runs for this WebTest. - Default value is 300. Default value: 300 . - :type frequency: int - :param timeout: Seconds until this WebTest will timeout and fail. Default - value is 30. Default value: 30 . - :type timeout: int - :param web_test_kind: Required. The kind of web test this is, valid - choices are ping and multistep. Possible values include: 'ping', - 'multistep'. Default value: "ping" . - :type web_test_kind: str or - ~azure.mgmt.applicationinsights.models.WebTestKind - :param retry_enabled: Allow for retries should this WebTest fail. - :type retry_enabled: bool - :param locations: Required. A list of where to physically run the tests - from to give global coverage for accessibility of your application. - :type locations: - list[~azure.mgmt.applicationinsights.models.WebTestGeolocation] - :param configuration: An XML configuration specification for a WebTest. - :type configuration: - ~azure.mgmt.applicationinsights.models.WebTestPropertiesConfiguration - :ivar provisioning_state: Current state of this component, whether or not - is has been provisioned within the resource group it is defined. Users - cannot change this value but are able to read from it. Values will include - Succeeded, Deploying, Canceled, and Failed. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'synthetic_monitor_id': {'required': True}, - 'web_test_name': {'required': True}, - 'web_test_kind': {'required': True}, - 'locations': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kind': {'key': 'kind', 'type': 'WebTestKind'}, - 'synthetic_monitor_id': {'key': 'properties.SyntheticMonitorId', 'type': 'str'}, - 'web_test_name': {'key': 'properties.Name', 'type': 'str'}, - 'description': {'key': 'properties.Description', 'type': 'str'}, - 'enabled': {'key': 'properties.Enabled', 'type': 'bool'}, - 'frequency': {'key': 'properties.Frequency', 'type': 'int'}, - 'timeout': {'key': 'properties.Timeout', 'type': 'int'}, - 'web_test_kind': {'key': 'properties.Kind', 'type': 'WebTestKind'}, - 'retry_enabled': {'key': 'properties.RetryEnabled', 'type': 'bool'}, - 'locations': {'key': 'properties.Locations', 'type': '[WebTestGeolocation]'}, - 'configuration': {'key': 'properties.Configuration', 'type': 'WebTestPropertiesConfiguration'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WebTest, self).__init__(**kwargs) - self.kind = kwargs.get('kind', "ping") - self.synthetic_monitor_id = kwargs.get('synthetic_monitor_id', None) - self.web_test_name = kwargs.get('web_test_name', None) - self.description = kwargs.get('description', None) - self.enabled = kwargs.get('enabled', None) - self.frequency = kwargs.get('frequency', 300) - self.timeout = kwargs.get('timeout', 30) - self.web_test_kind = kwargs.get('web_test_kind', "ping") - self.retry_enabled = kwargs.get('retry_enabled', None) - self.locations = kwargs.get('locations', None) - self.configuration = kwargs.get('configuration', None) - self.provisioning_state = None diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/web_test_geolocation.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/web_test_geolocation.py deleted file mode 100644 index c6560922a4e4..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/web_test_geolocation.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WebTestGeolocation(Model): - """Geo-physical location to run a web test from. You must specify one or more - locations for the test to run from. - - :param location: Location ID for the webtest to run from. - :type location: str - """ - - _attribute_map = { - 'location': {'key': 'Id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WebTestGeolocation, self).__init__(**kwargs) - self.location = kwargs.get('location', None) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/web_test_geolocation_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/web_test_geolocation_py3.py deleted file mode 100644 index e3483d9fa678..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/web_test_geolocation_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WebTestGeolocation(Model): - """Geo-physical location to run a web test from. You must specify one or more - locations for the test to run from. - - :param location: Location ID for the webtest to run from. - :type location: str - """ - - _attribute_map = { - 'location': {'key': 'Id', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, **kwargs) -> None: - super(WebTestGeolocation, self).__init__(**kwargs) - self.location = location diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/web_test_paged.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/web_test_paged.py deleted file mode 100644 index ef7b3263882d..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/web_test_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class WebTestPaged(Paged): - """ - A paging container for iterating over a list of :class:`WebTest ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[WebTest]'} - } - - def __init__(self, *args, **kwargs): - - super(WebTestPaged, self).__init__(*args, **kwargs) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/web_test_properties_configuration.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/web_test_properties_configuration.py deleted file mode 100644 index c21de2b8a490..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/web_test_properties_configuration.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WebTestPropertiesConfiguration(Model): - """An XML configuration specification for a WebTest. - - :param web_test: The XML specification of a WebTest to run against an - application. - :type web_test: str - """ - - _attribute_map = { - 'web_test': {'key': 'WebTest', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WebTestPropertiesConfiguration, self).__init__(**kwargs) - self.web_test = kwargs.get('web_test', None) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/web_test_properties_configuration_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/web_test_properties_configuration_py3.py deleted file mode 100644 index 74e8b47f2c6b..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/web_test_properties_configuration_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WebTestPropertiesConfiguration(Model): - """An XML configuration specification for a WebTest. - - :param web_test: The XML specification of a WebTest to run against an - application. - :type web_test: str - """ - - _attribute_map = { - 'web_test': {'key': 'WebTest', 'type': 'str'}, - } - - def __init__(self, *, web_test: str=None, **kwargs) -> None: - super(WebTestPropertiesConfiguration, self).__init__(**kwargs) - self.web_test = web_test diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/web_test_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/web_test_py3.py deleted file mode 100644 index 9bd0ec5aecf9..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/web_test_py3.py +++ /dev/null @@ -1,119 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .webtests_resource_py3 import WebtestsResource - - -class WebTest(WebtestsResource): - """An Application Insights web test definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Azure resource Id - :vartype id: str - :ivar name: Azure resource name - :vartype name: str - :ivar type: Azure resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kind: The kind of web test that this web test watches. Choices are - ping and multistep. Possible values include: 'ping', 'multistep'. Default - value: "ping" . - :type kind: str or ~azure.mgmt.applicationinsights.models.WebTestKind - :param synthetic_monitor_id: Required. Unique ID of this WebTest. This is - typically the same value as the Name field. - :type synthetic_monitor_id: str - :param web_test_name: Required. User defined name if this WebTest. - :type web_test_name: str - :param description: Purpose/user defined descriptive test for this - WebTest. - :type description: str - :param enabled: Is the test actively being monitored. - :type enabled: bool - :param frequency: Interval in seconds between test runs for this WebTest. - Default value is 300. Default value: 300 . - :type frequency: int - :param timeout: Seconds until this WebTest will timeout and fail. Default - value is 30. Default value: 30 . - :type timeout: int - :param web_test_kind: Required. The kind of web test this is, valid - choices are ping and multistep. Possible values include: 'ping', - 'multistep'. Default value: "ping" . - :type web_test_kind: str or - ~azure.mgmt.applicationinsights.models.WebTestKind - :param retry_enabled: Allow for retries should this WebTest fail. - :type retry_enabled: bool - :param locations: Required. A list of where to physically run the tests - from to give global coverage for accessibility of your application. - :type locations: - list[~azure.mgmt.applicationinsights.models.WebTestGeolocation] - :param configuration: An XML configuration specification for a WebTest. - :type configuration: - ~azure.mgmt.applicationinsights.models.WebTestPropertiesConfiguration - :ivar provisioning_state: Current state of this component, whether or not - is has been provisioned within the resource group it is defined. Users - cannot change this value but are able to read from it. Values will include - Succeeded, Deploying, Canceled, and Failed. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'synthetic_monitor_id': {'required': True}, - 'web_test_name': {'required': True}, - 'web_test_kind': {'required': True}, - 'locations': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kind': {'key': 'kind', 'type': 'WebTestKind'}, - 'synthetic_monitor_id': {'key': 'properties.SyntheticMonitorId', 'type': 'str'}, - 'web_test_name': {'key': 'properties.Name', 'type': 'str'}, - 'description': {'key': 'properties.Description', 'type': 'str'}, - 'enabled': {'key': 'properties.Enabled', 'type': 'bool'}, - 'frequency': {'key': 'properties.Frequency', 'type': 'int'}, - 'timeout': {'key': 'properties.Timeout', 'type': 'int'}, - 'web_test_kind': {'key': 'properties.Kind', 'type': 'WebTestKind'}, - 'retry_enabled': {'key': 'properties.RetryEnabled', 'type': 'bool'}, - 'locations': {'key': 'properties.Locations', 'type': '[WebTestGeolocation]'}, - 'configuration': {'key': 'properties.Configuration', 'type': 'WebTestPropertiesConfiguration'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, location: str, synthetic_monitor_id: str, web_test_name: str, locations, tags=None, kind="ping", description: str=None, enabled: bool=None, frequency: int=300, timeout: int=30, web_test_kind="ping", retry_enabled: bool=None, configuration=None, **kwargs) -> None: - super(WebTest, self).__init__(location=location, tags=tags, **kwargs) - self.kind = kind - self.synthetic_monitor_id = synthetic_monitor_id - self.web_test_name = web_test_name - self.description = description - self.enabled = enabled - self.frequency = frequency - self.timeout = timeout - self.web_test_kind = web_test_kind - self.retry_enabled = retry_enabled - self.locations = locations - self.configuration = configuration - self.provisioning_state = None diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/webtests_resource.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/webtests_resource.py deleted file mode 100644 index 266febe3d6a6..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/webtests_resource.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WebtestsResource(Model): - """An azure resource object. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Azure resource Id - :vartype id: str - :ivar name: Azure resource name - :vartype name: str - :ivar type: Azure resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(WebtestsResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/webtests_resource_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/webtests_resource_py3.py deleted file mode 100644 index 84a3e4c9ff71..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/webtests_resource_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WebtestsResource(Model): - """An azure resource object. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Azure resource Id - :vartype id: str - :ivar name: Azure resource name - :vartype name: str - :ivar type: Azure resource type - :vartype type: str - :param location: Required. Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(WebtestsResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/work_item_configuration.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/work_item_configuration.py deleted file mode 100644 index 900129be8297..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/work_item_configuration.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WorkItemConfiguration(Model): - """Work item configuration associated with an application insights resource. - - :param connector_id: Connector identifier where work item is created - :type connector_id: str - :param config_display_name: Configuration friendly name - :type config_display_name: str - :param is_default: Boolean value indicating whether configuration is - default - :type is_default: bool - :param id: Unique Id for work item - :type id: str - :param config_properties: Serialized JSON object for detailed properties - :type config_properties: str - """ - - _attribute_map = { - 'connector_id': {'key': 'ConnectorId', 'type': 'str'}, - 'config_display_name': {'key': 'ConfigDisplayName', 'type': 'str'}, - 'is_default': {'key': 'IsDefault', 'type': 'bool'}, - 'id': {'key': 'Id', 'type': 'str'}, - 'config_properties': {'key': 'ConfigProperties', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WorkItemConfiguration, self).__init__(**kwargs) - self.connector_id = kwargs.get('connector_id', None) - self.config_display_name = kwargs.get('config_display_name', None) - self.is_default = kwargs.get('is_default', None) - self.id = kwargs.get('id', None) - self.config_properties = kwargs.get('config_properties', None) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/work_item_configuration_error.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/work_item_configuration_error.py deleted file mode 100644 index 5552a22a16cf..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/work_item_configuration_error.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class WorkItemConfigurationError(Model): - """Error associated with trying to get work item configuration or - configurations. - - :param code: Error detail code and explanation - :type code: str - :param message: Error message - :type message: str - :param innererror: - :type innererror: ~azure.mgmt.applicationinsights.models.InnerError - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'innererror': {'key': 'innererror', 'type': 'InnerError'}, - } - - def __init__(self, **kwargs): - super(WorkItemConfigurationError, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.innererror = kwargs.get('innererror', None) - - -class WorkItemConfigurationErrorException(HttpOperationError): - """Server responsed with exception of type: 'WorkItemConfigurationError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(WorkItemConfigurationErrorException, self).__init__(deserialize, response, 'WorkItemConfigurationError', *args) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/work_item_configuration_error_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/work_item_configuration_error_py3.py deleted file mode 100644 index dcffcf9da20e..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/work_item_configuration_error_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class WorkItemConfigurationError(Model): - """Error associated with trying to get work item configuration or - configurations. - - :param code: Error detail code and explanation - :type code: str - :param message: Error message - :type message: str - :param innererror: - :type innererror: ~azure.mgmt.applicationinsights.models.InnerError - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'innererror': {'key': 'innererror', 'type': 'InnerError'}, - } - - def __init__(self, *, code: str=None, message: str=None, innererror=None, **kwargs) -> None: - super(WorkItemConfigurationError, self).__init__(**kwargs) - self.code = code - self.message = message - self.innererror = innererror - - -class WorkItemConfigurationErrorException(HttpOperationError): - """Server responsed with exception of type: 'WorkItemConfigurationError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(WorkItemConfigurationErrorException, self).__init__(deserialize, response, 'WorkItemConfigurationError', *args) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/work_item_configuration_paged.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/work_item_configuration_paged.py deleted file mode 100644 index 6543cadd6a76..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/work_item_configuration_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class WorkItemConfigurationPaged(Paged): - """ - A paging container for iterating over a list of :class:`WorkItemConfiguration ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[WorkItemConfiguration]'} - } - - def __init__(self, *args, **kwargs): - - super(WorkItemConfigurationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/work_item_configuration_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/work_item_configuration_py3.py deleted file mode 100644 index b0b85fff7ac7..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/work_item_configuration_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WorkItemConfiguration(Model): - """Work item configuration associated with an application insights resource. - - :param connector_id: Connector identifier where work item is created - :type connector_id: str - :param config_display_name: Configuration friendly name - :type config_display_name: str - :param is_default: Boolean value indicating whether configuration is - default - :type is_default: bool - :param id: Unique Id for work item - :type id: str - :param config_properties: Serialized JSON object for detailed properties - :type config_properties: str - """ - - _attribute_map = { - 'connector_id': {'key': 'ConnectorId', 'type': 'str'}, - 'config_display_name': {'key': 'ConfigDisplayName', 'type': 'str'}, - 'is_default': {'key': 'IsDefault', 'type': 'bool'}, - 'id': {'key': 'Id', 'type': 'str'}, - 'config_properties': {'key': 'ConfigProperties', 'type': 'str'}, - } - - def __init__(self, *, connector_id: str=None, config_display_name: str=None, is_default: bool=None, id: str=None, config_properties: str=None, **kwargs) -> None: - super(WorkItemConfiguration, self).__init__(**kwargs) - self.connector_id = connector_id - self.config_display_name = config_display_name - self.is_default = is_default - self.id = id - self.config_properties = config_properties diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/work_item_create_configuration.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/work_item_create_configuration.py deleted file mode 100644 index 4d4421c85bbe..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/work_item_create_configuration.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WorkItemCreateConfiguration(Model): - """Work item configuration creation payload. - - :param connector_id: Unique connector id - :type connector_id: str - :param connector_data_configuration: Serialized JSON object for detailed - properties - :type connector_data_configuration: str - :param validate_only: Boolean indicating validate only - :type validate_only: bool - :param work_item_properties: Custom work item properties - :type work_item_properties: dict[str, str] - """ - - _attribute_map = { - 'connector_id': {'key': 'ConnectorId', 'type': 'str'}, - 'connector_data_configuration': {'key': 'ConnectorDataConfiguration', 'type': 'str'}, - 'validate_only': {'key': 'ValidateOnly', 'type': 'bool'}, - 'work_item_properties': {'key': 'WorkItemProperties', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(WorkItemCreateConfiguration, self).__init__(**kwargs) - self.connector_id = kwargs.get('connector_id', None) - self.connector_data_configuration = kwargs.get('connector_data_configuration', None) - self.validate_only = kwargs.get('validate_only', None) - self.work_item_properties = kwargs.get('work_item_properties', None) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/work_item_create_configuration_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/work_item_create_configuration_py3.py deleted file mode 100644 index ee9807614a1a..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/work_item_create_configuration_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WorkItemCreateConfiguration(Model): - """Work item configuration creation payload. - - :param connector_id: Unique connector id - :type connector_id: str - :param connector_data_configuration: Serialized JSON object for detailed - properties - :type connector_data_configuration: str - :param validate_only: Boolean indicating validate only - :type validate_only: bool - :param work_item_properties: Custom work item properties - :type work_item_properties: dict[str, str] - """ - - _attribute_map = { - 'connector_id': {'key': 'ConnectorId', 'type': 'str'}, - 'connector_data_configuration': {'key': 'ConnectorDataConfiguration', 'type': 'str'}, - 'validate_only': {'key': 'ValidateOnly', 'type': 'bool'}, - 'work_item_properties': {'key': 'WorkItemProperties', 'type': '{str}'}, - } - - def __init__(self, *, connector_id: str=None, connector_data_configuration: str=None, validate_only: bool=None, work_item_properties=None, **kwargs) -> None: - super(WorkItemCreateConfiguration, self).__init__(**kwargs) - self.connector_id = connector_id - self.connector_data_configuration = connector_data_configuration - self.validate_only = validate_only - self.work_item_properties = work_item_properties diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/workbook.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/workbook.py deleted file mode 100644 index 2133163369ca..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/workbook.py +++ /dev/null @@ -1,113 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .workbook_resource import WorkbookResource - - -class Workbook(WorkbookResource): - """An Application Insights workbook definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Azure resource Id - :vartype id: str - :ivar name: Azure resource name - :vartype name: str - :ivar type: Azure resource type - :vartype type: str - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kind: The kind of workbook. Choices are user and shared. Possible - values include: 'user', 'shared' - :type kind: str or ~azure.mgmt.applicationinsights.models.SharedTypeKind - :param workbook_name: Required. The user-defined name of the workbook. - :type workbook_name: str - :param serialized_data: Required. Configuration of this particular - workbook. Configuration data is a string containing valid JSON - :type serialized_data: str - :param version: This instance's version of the data model. This can change - as new features are added that can be marked workbook. - :type version: str - :param workbook_id: Required. Internally assigned unique id of the - workbook definition. - :type workbook_id: str - :param shared_type_kind: Required. Enum indicating if this workbook - definition is owned by a specific user or is shared between all users with - access to the Application Insights component. Possible values include: - 'user', 'shared'. Default value: "shared" . - :type shared_type_kind: str or - ~azure.mgmt.applicationinsights.models.SharedTypeKind - :ivar time_modified: Date and time in UTC of the last modification that - was made to this workbook definition. - :vartype time_modified: str - :param category: Required. Workbook category, as defined by the user at - creation time. - :type category: str - :param workbook_tags: A list of 0 or more tags that are associated with - this workbook definition - :type workbook_tags: list[str] - :param user_id: Required. Unique user id of the specific user that owns - this workbook. - :type user_id: str - :param source_resource_id: Optional resourceId for a source resource. - :type source_resource_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'workbook_name': {'required': True}, - 'serialized_data': {'required': True}, - 'workbook_id': {'required': True}, - 'shared_type_kind': {'required': True}, - 'time_modified': {'readonly': True}, - 'category': {'required': True}, - 'user_id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'workbook_name': {'key': 'properties.name', 'type': 'str'}, - 'serialized_data': {'key': 'properties.serializedData', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'workbook_id': {'key': 'properties.workbookId', 'type': 'str'}, - 'shared_type_kind': {'key': 'properties.kind', 'type': 'str'}, - 'time_modified': {'key': 'properties.timeModified', 'type': 'str'}, - 'category': {'key': 'properties.category', 'type': 'str'}, - 'workbook_tags': {'key': 'properties.tags', 'type': '[str]'}, - 'user_id': {'key': 'properties.userId', 'type': 'str'}, - 'source_resource_id': {'key': 'properties.sourceResourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Workbook, self).__init__(**kwargs) - self.kind = kwargs.get('kind', None) - self.workbook_name = kwargs.get('workbook_name', None) - self.serialized_data = kwargs.get('serialized_data', None) - self.version = kwargs.get('version', None) - self.workbook_id = kwargs.get('workbook_id', None) - self.shared_type_kind = kwargs.get('shared_type_kind', "shared") - self.time_modified = None - self.category = kwargs.get('category', None) - self.workbook_tags = kwargs.get('workbook_tags', None) - self.user_id = kwargs.get('user_id', None) - self.source_resource_id = kwargs.get('source_resource_id', None) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/workbook_error.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/workbook_error.py deleted file mode 100644 index bc970ed4d755..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/workbook_error.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class WorkbookError(Model): - """Error message body that will indicate why the operation failed. - - :param code: Service-defined error code. This code serves as a sub-status - for the HTTP error code specified in the response. - :type code: str - :param message: Human-readable representation of the error. - :type message: str - :param details: The list of invalid fields send in request, in case of - validation error. - :type details: - list[~azure.mgmt.applicationinsights.models.ErrorFieldContract] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorFieldContract]'}, - } - - def __init__(self, **kwargs): - super(WorkbookError, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.details = kwargs.get('details', None) - - -class WorkbookErrorException(HttpOperationError): - """Server responsed with exception of type: 'WorkbookError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(WorkbookErrorException, self).__init__(deserialize, response, 'WorkbookError', *args) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/workbook_error_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/workbook_error_py3.py deleted file mode 100644 index bc44a7f9db55..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/workbook_error_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class WorkbookError(Model): - """Error message body that will indicate why the operation failed. - - :param code: Service-defined error code. This code serves as a sub-status - for the HTTP error code specified in the response. - :type code: str - :param message: Human-readable representation of the error. - :type message: str - :param details: The list of invalid fields send in request, in case of - validation error. - :type details: - list[~azure.mgmt.applicationinsights.models.ErrorFieldContract] - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorFieldContract]'}, - } - - def __init__(self, *, code: str=None, message: str=None, details=None, **kwargs) -> None: - super(WorkbookError, self).__init__(**kwargs) - self.code = code - self.message = message - self.details = details - - -class WorkbookErrorException(HttpOperationError): - """Server responsed with exception of type: 'WorkbookError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(WorkbookErrorException, self).__init__(deserialize, response, 'WorkbookError', *args) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/workbook_paged.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/workbook_paged.py deleted file mode 100644 index 5487b5ce3e32..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/workbook_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class WorkbookPaged(Paged): - """ - A paging container for iterating over a list of :class:`Workbook ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Workbook]'} - } - - def __init__(self, *args, **kwargs): - - super(WorkbookPaged, self).__init__(*args, **kwargs) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/workbook_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/workbook_py3.py deleted file mode 100644 index 1513836a9ff6..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/workbook_py3.py +++ /dev/null @@ -1,113 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .workbook_resource_py3 import WorkbookResource - - -class Workbook(WorkbookResource): - """An Application Insights workbook definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Azure resource Id - :vartype id: str - :ivar name: Azure resource name - :vartype name: str - :ivar type: Azure resource type - :vartype type: str - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param kind: The kind of workbook. Choices are user and shared. Possible - values include: 'user', 'shared' - :type kind: str or ~azure.mgmt.applicationinsights.models.SharedTypeKind - :param workbook_name: Required. The user-defined name of the workbook. - :type workbook_name: str - :param serialized_data: Required. Configuration of this particular - workbook. Configuration data is a string containing valid JSON - :type serialized_data: str - :param version: This instance's version of the data model. This can change - as new features are added that can be marked workbook. - :type version: str - :param workbook_id: Required. Internally assigned unique id of the - workbook definition. - :type workbook_id: str - :param shared_type_kind: Required. Enum indicating if this workbook - definition is owned by a specific user or is shared between all users with - access to the Application Insights component. Possible values include: - 'user', 'shared'. Default value: "shared" . - :type shared_type_kind: str or - ~azure.mgmt.applicationinsights.models.SharedTypeKind - :ivar time_modified: Date and time in UTC of the last modification that - was made to this workbook definition. - :vartype time_modified: str - :param category: Required. Workbook category, as defined by the user at - creation time. - :type category: str - :param workbook_tags: A list of 0 or more tags that are associated with - this workbook definition - :type workbook_tags: list[str] - :param user_id: Required. Unique user id of the specific user that owns - this workbook. - :type user_id: str - :param source_resource_id: Optional resourceId for a source resource. - :type source_resource_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'workbook_name': {'required': True}, - 'serialized_data': {'required': True}, - 'workbook_id': {'required': True}, - 'shared_type_kind': {'required': True}, - 'time_modified': {'readonly': True}, - 'category': {'required': True}, - 'user_id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'workbook_name': {'key': 'properties.name', 'type': 'str'}, - 'serialized_data': {'key': 'properties.serializedData', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'workbook_id': {'key': 'properties.workbookId', 'type': 'str'}, - 'shared_type_kind': {'key': 'properties.kind', 'type': 'str'}, - 'time_modified': {'key': 'properties.timeModified', 'type': 'str'}, - 'category': {'key': 'properties.category', 'type': 'str'}, - 'workbook_tags': {'key': 'properties.tags', 'type': '[str]'}, - 'user_id': {'key': 'properties.userId', 'type': 'str'}, - 'source_resource_id': {'key': 'properties.sourceResourceId', 'type': 'str'}, - } - - def __init__(self, *, workbook_name: str, serialized_data: str, workbook_id: str, category: str, user_id: str, location: str=None, tags=None, kind=None, version: str=None, shared_type_kind="shared", workbook_tags=None, source_resource_id: str=None, **kwargs) -> None: - super(Workbook, self).__init__(location=location, tags=tags, **kwargs) - self.kind = kind - self.workbook_name = workbook_name - self.serialized_data = serialized_data - self.version = version - self.workbook_id = workbook_id - self.shared_type_kind = shared_type_kind - self.time_modified = None - self.category = category - self.workbook_tags = workbook_tags - self.user_id = user_id - self.source_resource_id = source_resource_id diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/workbook_resource.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/workbook_resource.py deleted file mode 100644 index 93469ee6ca6f..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/workbook_resource.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WorkbookResource(Model): - """An azure resource object. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar name: Azure resource name - :vartype name: str - :ivar type: Azure resource type - :vartype type: str - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(WorkbookResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/workbook_resource_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/workbook_resource_py3.py deleted file mode 100644 index 24f2b8e726dd..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/workbook_resource_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WorkbookResource(Model): - """An azure resource object. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource Id - :vartype id: str - :ivar name: Azure resource name - :vartype name: str - :ivar type: Azure resource type - :vartype type: str - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: - super(WorkbookResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/__init__.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/__init__.py index dadfea943845..3bd2ec335a09 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/__init__.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/__init__.py @@ -9,22 +9,22 @@ # regenerated. # -------------------------------------------------------------------------- -from .operations import Operations -from .annotations_operations import AnnotationsOperations -from .api_keys_operations import APIKeysOperations -from .export_configurations_operations import ExportConfigurationsOperations -from .component_current_billing_features_operations import ComponentCurrentBillingFeaturesOperations -from .component_quota_status_operations import ComponentQuotaStatusOperations -from .component_feature_capabilities_operations import ComponentFeatureCapabilitiesOperations -from .component_available_features_operations import ComponentAvailableFeaturesOperations -from .proactive_detection_configurations_operations import ProactiveDetectionConfigurationsOperations -from .components_operations import ComponentsOperations -from .work_item_configurations_operations import WorkItemConfigurationsOperations -from .favorites_operations import FavoritesOperations -from .web_test_locations_operations import WebTestLocationsOperations -from .web_tests_operations import WebTestsOperations -from .analytics_items_operations import AnalyticsItemsOperations -from .workbooks_operations import WorkbooksOperations +from ._operations import Operations +from ._annotations_operations import AnnotationsOperations +from ._api_keys_operations import APIKeysOperations +from ._export_configurations_operations import ExportConfigurationsOperations +from ._component_current_billing_features_operations import ComponentCurrentBillingFeaturesOperations +from ._component_quota_status_operations import ComponentQuotaStatusOperations +from ._component_feature_capabilities_operations import ComponentFeatureCapabilitiesOperations +from ._component_available_features_operations import ComponentAvailableFeaturesOperations +from ._proactive_detection_configurations_operations import ProactiveDetectionConfigurationsOperations +from ._components_operations import ComponentsOperations +from ._work_item_configurations_operations import WorkItemConfigurationsOperations +from ._favorites_operations import FavoritesOperations +from ._web_test_locations_operations import WebTestLocationsOperations +from ._web_tests_operations import WebTestsOperations +from ._analytics_items_operations import AnalyticsItemsOperations +from ._workbooks_operations import WorkbooksOperations __all__ = [ 'Operations', diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_analytics_items_operations.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_analytics_items_operations.py new file mode 100644 index 000000000000..742baefb1848 --- /dev/null +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_analytics_items_operations.py @@ -0,0 +1,373 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class AnalyticsItemsOperations(object): + """AnalyticsItemsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-05-01" + + self.config = config + + def list( + self, resource_group_name, resource_name, scope_path, scope="shared", type="none", include_content=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of Analytics Items defined within an Application Insights + component. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param scope_path: Enum indicating if this item definition is owned by + a specific user or is shared between all users with access to the + Application Insights component. Possible values include: + 'analyticsItems', 'myanalyticsItems' + :type scope_path: str or + ~azure.mgmt.applicationinsights.models.ItemScopePath + :param scope: Enum indicating if this item definition is owned by a + specific user or is shared between all users with access to the + Application Insights component. Possible values include: 'shared', + 'user' + :type scope: str or ~azure.mgmt.applicationinsights.models.ItemScope + :param type: Enum indicating the type of the Analytics item. Possible + values include: 'none', 'query', 'function', 'folder', 'recent' + :type type: str or + ~azure.mgmt.applicationinsights.models.ItemTypeParameter + :param include_content: Flag indicating whether or not to return the + content of each applicable item. If false, only return the item + information. + :type include_content: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentAnalyticsItem] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'scopePath': self._serialize.url("scope_path", scope_path, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + if scope is not None: + query_parameters['scope'] = self._serialize.query("scope", scope, 'str') + if type is not None: + query_parameters['type'] = self._serialize.query("type", type, 'str') + if include_content is not None: + query_parameters['includeContent'] = self._serialize.query("include_content", include_content, 'bool') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[ApplicationInsightsComponentAnalyticsItem]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/{scopePath}'} + + def get( + self, resource_group_name, resource_name, scope_path, id=None, name=None, custom_headers=None, raw=False, **operation_config): + """Gets a specific Analytics Items defined within an Application Insights + component. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param scope_path: Enum indicating if this item definition is owned by + a specific user or is shared between all users with access to the + Application Insights component. Possible values include: + 'analyticsItems', 'myanalyticsItems' + :type scope_path: str or + ~azure.mgmt.applicationinsights.models.ItemScopePath + :param id: The Id of a specific item defined in the Application + Insights component + :type id: str + :param name: The name of a specific item defined in the Application + Insights component + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationInsightsComponentAnalyticsItem or + ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentAnalyticsItem + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'scopePath': self._serialize.url("scope_path", scope_path, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + if id is not None: + query_parameters['id'] = self._serialize.query("id", id, 'str') + if name is not None: + query_parameters['name'] = self._serialize.query("name", name, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationInsightsComponentAnalyticsItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/{scopePath}/item'} + + def put( + self, resource_group_name, resource_name, scope_path, item_properties, override_item=None, custom_headers=None, raw=False, **operation_config): + """Adds or Updates a specific Analytics Item within an Application + Insights component. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param scope_path: Enum indicating if this item definition is owned by + a specific user or is shared between all users with access to the + Application Insights component. Possible values include: + 'analyticsItems', 'myanalyticsItems' + :type scope_path: str or + ~azure.mgmt.applicationinsights.models.ItemScopePath + :param item_properties: Properties that need to be specified to create + a new item and add it to an Application Insights component. + :type item_properties: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentAnalyticsItem + :param override_item: Flag indicating whether or not to force save an + item. This allows overriding an item if it already exists. + :type override_item: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationInsightsComponentAnalyticsItem or + ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentAnalyticsItem + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.put.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'scopePath': self._serialize.url("scope_path", scope_path, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + if override_item is not None: + query_parameters['overrideItem'] = self._serialize.query("override_item", override_item, 'bool') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(item_properties, 'ApplicationInsightsComponentAnalyticsItem') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationInsightsComponentAnalyticsItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/{scopePath}/item'} + + def delete( + self, resource_group_name, resource_name, scope_path, id=None, name=None, custom_headers=None, raw=False, **operation_config): + """Deletes a specific Analytics Items defined within an Application + Insights component. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param scope_path: Enum indicating if this item definition is owned by + a specific user or is shared between all users with access to the + Application Insights component. Possible values include: + 'analyticsItems', 'myanalyticsItems' + :type scope_path: str or + ~azure.mgmt.applicationinsights.models.ItemScopePath + :param id: The Id of a specific item defined in the Application + Insights component + :type id: str + :param name: The name of a specific item defined in the Application + Insights component + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'scopePath': self._serialize.url("scope_path", scope_path, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + if id is not None: + query_parameters['id'] = self._serialize.query("id", id, 'str') + if name is not None: + query_parameters['name'] = self._serialize.query("name", name, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/{scopePath}/item'} diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_annotations_operations.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_annotations_operations.py new file mode 100644 index 000000000000..5b1b4b45b0e1 --- /dev/null +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_annotations_operations.py @@ -0,0 +1,315 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class AnnotationsOperations(object): + """AnnotationsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-05-01" + + self.config = config + + def list( + self, resource_group_name, resource_name, start, end, custom_headers=None, raw=False, **operation_config): + """Gets the list of annotations for a component for given time range. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param start: The start time to query from for annotations, cannot be + older than 90 days from current date. + :type start: str + :param end: The end time to query for annotations. + :type end: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Annotation + :rtype: + ~azure.mgmt.applicationinsights.models.AnnotationPaged[~azure.mgmt.applicationinsights.models.Annotation] + :raises: + :class:`AnnotationErrorException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + query_parameters['start'] = self._serialize.query("start", start, 'str') + query_parameters['end'] = self._serialize.query("end", end, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.AnnotationErrorException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AnnotationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/Annotations'} + + def create( + self, resource_group_name, resource_name, annotation_properties, custom_headers=None, raw=False, **operation_config): + """Create an Annotation of an Application Insights component. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param annotation_properties: Properties that need to be specified to + create an annotation of a Application Insights component. + :type annotation_properties: + ~azure.mgmt.applicationinsights.models.Annotation + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.applicationinsights.models.Annotation] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`AnnotationErrorException` + """ + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(annotation_properties, 'Annotation') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.AnnotationErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[Annotation]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/Annotations'} + + def delete( + self, resource_group_name, resource_name, annotation_id, custom_headers=None, raw=False, **operation_config): + """Delete an Annotation of an Application Insights component. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param annotation_id: The unique annotation ID. This is unique within + a Application Insights component. + :type annotation_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'annotationId': self._serialize.url("annotation_id", annotation_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/Annotations/{annotationId}'} + + def get( + self, resource_group_name, resource_name, annotation_id, custom_headers=None, raw=False, **operation_config): + """Get the annotation for given id. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param annotation_id: The unique annotation ID. This is unique within + a Application Insights component. + :type annotation_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.applicationinsights.models.Annotation] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`AnnotationErrorException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'annotationId': self._serialize.url("annotation_id", annotation_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.AnnotationErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[Annotation]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/Annotations/{annotationId}'} diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_api_keys_operations.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_api_keys_operations.py new file mode 100644 index 000000000000..14e03b49d483 --- /dev/null +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_api_keys_operations.py @@ -0,0 +1,326 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class APIKeysOperations(object): + """APIKeysOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-05-01" + + self.config = config + + def list( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of API keys of an Application Insights component. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of + ApplicationInsightsComponentAPIKey + :rtype: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentAPIKeyPaged[~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentAPIKey] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ApplicationInsightsComponentAPIKeyPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ApiKeys'} + + def create( + self, resource_group_name, resource_name, api_key_properties, custom_headers=None, raw=False, **operation_config): + """Create an API Key of an Application Insights component. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param api_key_properties: Properties that need to be specified to + create an API key of a Application Insights component. + :type api_key_properties: + ~azure.mgmt.applicationinsights.models.APIKeyRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationInsightsComponentAPIKey or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentAPIKey + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(api_key_properties, 'APIKeyRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationInsightsComponentAPIKey', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ApiKeys'} + + def delete( + self, resource_group_name, resource_name, key_id, custom_headers=None, raw=False, **operation_config): + """Delete an API Key of an Application Insights component. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param key_id: The API Key ID. This is unique within a Application + Insights component. + :type key_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationInsightsComponentAPIKey or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentAPIKey + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'keyId': self._serialize.url("key_id", key_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationInsightsComponentAPIKey', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/APIKeys/{keyId}'} + + def get( + self, resource_group_name, resource_name, key_id, custom_headers=None, raw=False, **operation_config): + """Get the API Key for this key id. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param key_id: The API Key ID. This is unique within a Application + Insights component. + :type key_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationInsightsComponentAPIKey or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentAPIKey + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'keyId': self._serialize.url("key_id", key_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationInsightsComponentAPIKey', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/APIKeys/{keyId}'} diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_component_available_features_operations.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_component_available_features_operations.py new file mode 100644 index 000000000000..00083d360b75 --- /dev/null +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_component_available_features_operations.py @@ -0,0 +1,105 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ComponentAvailableFeaturesOperations(object): + """ComponentAvailableFeaturesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-05-01" + + self.config = config + + def get( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Returns all available features of the application insights component. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationInsightsComponentAvailableFeatures or + ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentAvailableFeatures + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationInsightsComponentAvailableFeatures', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/getavailablebillingfeatures'} diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_component_current_billing_features_operations.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_component_current_billing_features_operations.py new file mode 100644 index 000000000000..56b17c7f5aff --- /dev/null +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_component_current_billing_features_operations.py @@ -0,0 +1,184 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ComponentCurrentBillingFeaturesOperations(object): + """ComponentCurrentBillingFeaturesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-05-01" + + self.config = config + + def get( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Returns current billing features for an Application Insights component. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationInsightsComponentBillingFeatures or + ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentBillingFeatures + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationInsightsComponentBillingFeatures', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/currentbillingfeatures'} + + def update( + self, resource_group_name, resource_name, data_volume_cap=None, current_billing_features=None, custom_headers=None, raw=False, **operation_config): + """Update current billing features for an Application Insights component. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param data_volume_cap: An Application Insights component daily data + volume cap + :type data_volume_cap: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentDataVolumeCap + :param current_billing_features: Current enabled pricing plan. When + the component is in the Enterprise plan, this will list both 'Basic' + and 'Application Insights Enterprise'. + :type current_billing_features: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationInsightsComponentBillingFeatures or + ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentBillingFeatures + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + billing_features_properties = models.ApplicationInsightsComponentBillingFeatures(data_volume_cap=data_volume_cap, current_billing_features=current_billing_features) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(billing_features_properties, 'ApplicationInsightsComponentBillingFeatures') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationInsightsComponentBillingFeatures', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/currentbillingfeatures'} diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_component_feature_capabilities_operations.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_component_feature_capabilities_operations.py new file mode 100644 index 000000000000..ab574893bae6 --- /dev/null +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_component_feature_capabilities_operations.py @@ -0,0 +1,105 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ComponentFeatureCapabilitiesOperations(object): + """ComponentFeatureCapabilitiesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-05-01" + + self.config = config + + def get( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Returns feature capabilities of the application insights component. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationInsightsComponentFeatureCapabilities or + ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentFeatureCapabilities + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationInsightsComponentFeatureCapabilities', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/featurecapabilities'} diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_component_quota_status_operations.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_component_quota_status_operations.py new file mode 100644 index 000000000000..2a58efc41a1d --- /dev/null +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_component_quota_status_operations.py @@ -0,0 +1,106 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ComponentQuotaStatusOperations(object): + """ComponentQuotaStatusOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-05-01" + + self.config = config + + def get( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Returns daily data volume cap (quota) status for an Application + Insights component. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationInsightsComponentQuotaStatus or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentQuotaStatus + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationInsightsComponentQuotaStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/quotastatus'} diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_components_operations.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_components_operations.py new file mode 100644 index 000000000000..1fc68d5b38e6 --- /dev/null +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_components_operations.py @@ -0,0 +1,587 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ComponentsOperations(object): + """ComponentsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-05-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets a list of all Application Insights components within a + subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ApplicationInsightsComponent + :rtype: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentPaged[~azure.mgmt.applicationinsights.models.ApplicationInsightsComponent] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ApplicationInsightsComponentPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/components'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of Application Insights components within a resource group. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ApplicationInsightsComponent + :rtype: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentPaged[~azure.mgmt.applicationinsights.models.ApplicationInsightsComponent] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ApplicationInsightsComponentPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components'} + + def delete( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Deletes an Application Insights component. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}'} + + def get( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Returns an Application Insights component. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationInsightsComponent or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponent or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationInsightsComponent', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}'} + + def create_or_update( + self, resource_group_name, resource_name, insight_properties, custom_headers=None, raw=False, **operation_config): + """Creates (or updates) an Application Insights component. Note: You + cannot specify a different value for InstrumentationKey nor AppId in + the Put operation. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param insight_properties: Properties that need to be specified to + create an Application Insights component. + :type insight_properties: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponent + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationInsightsComponent or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponent or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(insight_properties, 'ApplicationInsightsComponent') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationInsightsComponent', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}'} + + def update_tags( + self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): + """Updates an existing component's tags. To update other fields use the + CreateOrUpdate method. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param tags: Resource tags + :type tags: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationInsightsComponent or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponent or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + component_tags = models.TagsResource(tags=tags) + + # Construct URL + url = self.update_tags.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(component_tags, 'TagsResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationInsightsComponent', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}'} + + def purge( + self, resource_group_name, resource_name, table, filters, custom_headers=None, raw=False, **operation_config): + """Purges data in an Application Insights component by a set of + user-defined filters. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param table: Table from which to purge data. + :type table: str + :param filters: The set of columns and filters (queries) to run over + them to purge the resulting data. + :type filters: + list[~azure.mgmt.applicationinsights.models.ComponentPurgeBodyFilters] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ComponentPurgeResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.applicationinsights.models.ComponentPurgeResponse + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + body = models.ComponentPurgeBody(table=table, filters=filters) + + # Construct URL + url = self.purge.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(body, 'ComponentPurgeBody') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 202: + deserialized = self._deserialize('ComponentPurgeResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + purge.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/purge'} + + def get_purge_status( + self, resource_group_name, resource_name, purge_id, custom_headers=None, raw=False, **operation_config): + """Get status for an ongoing purge operation. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param purge_id: In a purge status request, this is the Id of the + operation the status of which is returned. + :type purge_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ComponentPurgeStatusResponse or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.applicationinsights.models.ComponentPurgeStatusResponse or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_purge_status.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'purgeId': self._serialize.url("purge_id", purge_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ComponentPurgeStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_purge_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/operations/{purgeId}'} diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_export_configurations_operations.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_export_configurations_operations.py new file mode 100644 index 000000000000..803bbd3ca336 --- /dev/null +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_export_configurations_operations.py @@ -0,0 +1,395 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ExportConfigurationsOperations(object): + """ExportConfigurationsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-05-01" + + self.config = config + + def list( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of Continuous Export configuration of an Application + Insights component. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentExportConfiguration] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[ApplicationInsightsComponentExportConfiguration]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/exportconfiguration'} + + def create( + self, resource_group_name, resource_name, export_properties, custom_headers=None, raw=False, **operation_config): + """Create a Continuous Export configuration of an Application Insights + component. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param export_properties: Properties that need to be specified to + create a Continuous Export configuration of a Application Insights + component. + :type export_properties: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentExportRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentExportConfiguration] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(export_properties, 'ApplicationInsightsComponentExportRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[ApplicationInsightsComponentExportConfiguration]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/exportconfiguration'} + + def delete( + self, resource_group_name, resource_name, export_id, custom_headers=None, raw=False, **operation_config): + """Delete a Continuous Export configuration of an Application Insights + component. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param export_id: The Continuous Export configuration ID. This is + unique within a Application Insights component. + :type export_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationInsightsComponentExportConfiguration or + ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentExportConfiguration + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'exportId': self._serialize.url("export_id", export_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationInsightsComponentExportConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/exportconfiguration/{exportId}'} + + def get( + self, resource_group_name, resource_name, export_id, custom_headers=None, raw=False, **operation_config): + """Get the Continuous Export configuration for this export id. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param export_id: The Continuous Export configuration ID. This is + unique within a Application Insights component. + :type export_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationInsightsComponentExportConfiguration or + ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentExportConfiguration + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'exportId': self._serialize.url("export_id", export_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationInsightsComponentExportConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/exportconfiguration/{exportId}'} + + def update( + self, resource_group_name, resource_name, export_id, export_properties, custom_headers=None, raw=False, **operation_config): + """Update the Continuous Export configuration for this export id. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param export_id: The Continuous Export configuration ID. This is + unique within a Application Insights component. + :type export_id: str + :param export_properties: Properties that need to be specified to + update the Continuous Export configuration. + :type export_properties: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentExportRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationInsightsComponentExportConfiguration or + ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentExportConfiguration + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'exportId': self._serialize.url("export_id", export_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(export_properties, 'ApplicationInsightsComponentExportRequest') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationInsightsComponentExportConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/exportconfiguration/{exportId}'} diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_favorites_operations.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_favorites_operations.py new file mode 100644 index 000000000000..9f76e41e019b --- /dev/null +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_favorites_operations.py @@ -0,0 +1,414 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class FavoritesOperations(object): + """FavoritesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-05-01" + + self.config = config + + def list( + self, resource_group_name, resource_name, favorite_type="shared", source_type=None, can_fetch_content=None, tags=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of favorites defined within an Application Insights + component. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param favorite_type: The type of favorite. Value can be either shared + or user. Possible values include: 'shared', 'user' + :type favorite_type: str or + ~azure.mgmt.applicationinsights.models.FavoriteType + :param source_type: Source type of favorite to return. When left out, + the source type defaults to 'other' (not present in this enum). + Possible values include: 'retention', 'notebook', 'sessions', + 'events', 'userflows', 'funnel', 'impact', 'segmentation' + :type source_type: str or + ~azure.mgmt.applicationinsights.models.FavoriteSourceType + :param can_fetch_content: Flag indicating whether or not to return the + full content for each applicable favorite. If false, only return + summary content for favorites. + :type can_fetch_content: bool + :param tags: Tags that must be present on each favorite returned. + :type tags: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentFavorite] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + if favorite_type is not None: + query_parameters['favoriteType'] = self._serialize.query("favorite_type", favorite_type, 'FavoriteType') + if source_type is not None: + query_parameters['sourceType'] = self._serialize.query("source_type", source_type, 'str') + if can_fetch_content is not None: + query_parameters['canFetchContent'] = self._serialize.query("can_fetch_content", can_fetch_content, 'bool') + if tags is not None: + query_parameters['tags'] = self._serialize.query("tags", tags, '[str]', div=',') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[ApplicationInsightsComponentFavorite]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites'} + + def get( + self, resource_group_name, resource_name, favorite_id, custom_headers=None, raw=False, **operation_config): + """Get a single favorite by its FavoriteId, defined within an Application + Insights component. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param favorite_id: The Id of a specific favorite defined in the + Application Insights component + :type favorite_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationInsightsComponentFavorite or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentFavorite + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'favoriteId': self._serialize.url("favorite_id", favorite_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationInsightsComponentFavorite', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}'} + + def add( + self, resource_group_name, resource_name, favorite_id, favorite_properties, custom_headers=None, raw=False, **operation_config): + """Adds a new favorites to an Application Insights component. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param favorite_id: The Id of a specific favorite defined in the + Application Insights component + :type favorite_id: str + :param favorite_properties: Properties that need to be specified to + create a new favorite and add it to an Application Insights component. + :type favorite_properties: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentFavorite + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationInsightsComponentFavorite or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentFavorite + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.add.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'favoriteId': self._serialize.url("favorite_id", favorite_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(favorite_properties, 'ApplicationInsightsComponentFavorite') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationInsightsComponentFavorite', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}'} + + def update( + self, resource_group_name, resource_name, favorite_id, favorite_properties, custom_headers=None, raw=False, **operation_config): + """Updates a favorite that has already been added to an Application + Insights component. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param favorite_id: The Id of a specific favorite defined in the + Application Insights component + :type favorite_id: str + :param favorite_properties: Properties that need to be specified to + update the existing favorite. + :type favorite_properties: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentFavorite + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationInsightsComponentFavorite or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentFavorite + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'favoriteId': self._serialize.url("favorite_id", favorite_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(favorite_properties, 'ApplicationInsightsComponentFavorite') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationInsightsComponentFavorite', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}'} + + def delete( + self, resource_group_name, resource_name, favorite_id, custom_headers=None, raw=False, **operation_config): + """Remove a favorite that is associated to an Application Insights + component. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param favorite_id: The Id of a specific favorite defined in the + Application Insights component + :type favorite_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'favoriteId': self._serialize.url("favorite_id", favorite_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}'} diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_operations.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_operations.py new file mode 100644 index 000000000000..748c271fbbad --- /dev/null +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_operations.py @@ -0,0 +1,100 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class Operations(object): + """Operations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-05-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the available insights REST API operations. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Operation + :rtype: + ~azure.mgmt.applicationinsights.models.OperationPaged[~azure.mgmt.applicationinsights.models.Operation] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Insights/operations'} diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_proactive_detection_configurations_operations.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_proactive_detection_configurations_operations.py new file mode 100644 index 000000000000..0ff1e64ab5fb --- /dev/null +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_proactive_detection_configurations_operations.py @@ -0,0 +1,251 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ProactiveDetectionConfigurationsOperations(object): + """ProactiveDetectionConfigurationsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-05-01" + + self.config = config + + def list( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of ProactiveDetection configurations of an Application + Insights component. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentProactiveDetectionConfiguration] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[ApplicationInsightsComponentProactiveDetectionConfiguration]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ProactiveDetectionConfigs'} + + def get( + self, resource_group_name, resource_name, configuration_id, custom_headers=None, raw=False, **operation_config): + """Get the ProactiveDetection configuration for this configuration id. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param configuration_id: The ProactiveDetection configuration ID. This + is unique within a Application Insights component. + :type configuration_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationInsightsComponentProactiveDetectionConfiguration + or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentProactiveDetectionConfiguration + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'ConfigurationId': self._serialize.url("configuration_id", configuration_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationInsightsComponentProactiveDetectionConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ProactiveDetectionConfigs/{ConfigurationId}'} + + def update( + self, resource_group_name, resource_name, configuration_id, proactive_detection_properties, custom_headers=None, raw=False, **operation_config): + """Update the ProactiveDetection configuration for this configuration id. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param configuration_id: The ProactiveDetection configuration ID. This + is unique within a Application Insights component. + :type configuration_id: str + :param proactive_detection_properties: Properties that need to be + specified to update the ProactiveDetection configuration. + :type proactive_detection_properties: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentProactiveDetectionConfiguration + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationInsightsComponentProactiveDetectionConfiguration + or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentProactiveDetectionConfiguration + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'ConfigurationId': self._serialize.url("configuration_id", configuration_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(proactive_detection_properties, 'ApplicationInsightsComponentProactiveDetectionConfiguration') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationInsightsComponentProactiveDetectionConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ProactiveDetectionConfigs/{ConfigurationId}'} diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_web_test_locations_operations.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_web_test_locations_operations.py new file mode 100644 index 000000000000..1a2f5fb36605 --- /dev/null +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_web_test_locations_operations.py @@ -0,0 +1,116 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class WebTestLocationsOperations(object): + """WebTestLocationsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-05-01" + + self.config = config + + def list( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of web test locations available to this Application + Insights component. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of + ApplicationInsightsComponentWebTestLocation + :rtype: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentWebTestLocationPaged[~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentWebTestLocation] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ApplicationInsightsComponentWebTestLocationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/syntheticmonitorlocations'} diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_web_tests_operations.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_web_tests_operations.py new file mode 100644 index 000000000000..cdfc876097ab --- /dev/null +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_web_tests_operations.py @@ -0,0 +1,513 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class WebTestsOperations(object): + """WebTestsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-05-01" + + self.config = config + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Get all Application Insights web tests defined within a specified + resource group. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WebTest + :rtype: + ~azure.mgmt.applicationinsights.models.WebTestPaged[~azure.mgmt.applicationinsights.models.WebTest] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WebTestPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests'} + + def get( + self, resource_group_name, web_test_name, custom_headers=None, raw=False, **operation_config): + """Get a specific Application Insights web test definition. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param web_test_name: The name of the Application Insights webtest + resource. + :type web_test_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WebTest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.applicationinsights.models.WebTest or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'webTestName': self._serialize.url("web_test_name", web_test_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WebTest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName}'} + + def create_or_update( + self, resource_group_name, web_test_name, web_test_definition, custom_headers=None, raw=False, **operation_config): + """Creates or updates an Application Insights web test definition. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param web_test_name: The name of the Application Insights webtest + resource. + :type web_test_name: str + :param web_test_definition: Properties that need to be specified to + create or update an Application Insights web test definition. + :type web_test_definition: + ~azure.mgmt.applicationinsights.models.WebTest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WebTest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.applicationinsights.models.WebTest or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'webTestName': self._serialize.url("web_test_name", web_test_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(web_test_definition, 'WebTest') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WebTest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName}'} + + def update_tags( + self, resource_group_name, web_test_name, tags=None, custom_headers=None, raw=False, **operation_config): + """Creates or updates an Application Insights web test definition. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param web_test_name: The name of the Application Insights webtest + resource. + :type web_test_name: str + :param tags: Resource tags + :type tags: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WebTest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.applicationinsights.models.WebTest or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + web_test_tags = models.TagsResource(tags=tags) + + # Construct URL + url = self.update_tags.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'webTestName': self._serialize.url("web_test_name", web_test_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(web_test_tags, 'TagsResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WebTest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName}'} + + def delete( + self, resource_group_name, web_test_name, custom_headers=None, raw=False, **operation_config): + """Deletes an Application Insights web test. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param web_test_name: The name of the Application Insights webtest + resource. + :type web_test_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'webTestName': self._serialize.url("web_test_name", web_test_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName}'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all Application Insights web test alerts definitions within a + subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WebTest + :rtype: + ~azure.mgmt.applicationinsights.models.WebTestPaged[~azure.mgmt.applicationinsights.models.WebTest] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WebTestPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/webtests'} + + def list_by_component( + self, component_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Get all Application Insights web tests defined for the specified + component. + + :param component_name: The name of the Application Insights component + resource. + :type component_name: str + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WebTest + :rtype: + ~azure.mgmt.applicationinsights.models.WebTestPaged[~azure.mgmt.applicationinsights.models.WebTest] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_component.metadata['url'] + path_format_arguments = { + 'componentName': self._serialize.url("component_name", component_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WebTestPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_component.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{componentName}/webtests'} diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_work_item_configurations_operations.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_work_item_configurations_operations.py new file mode 100644 index 000000000000..0a2a4c7dbeb1 --- /dev/null +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_work_item_configurations_operations.py @@ -0,0 +1,454 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class WorkItemConfigurationsOperations(object): + """WorkItemConfigurationsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-05-01" + + self.config = config + + def list( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Gets the list work item configurations that exist for the application. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WorkItemConfiguration + :rtype: + ~azure.mgmt.applicationinsights.models.WorkItemConfigurationPaged[~azure.mgmt.applicationinsights.models.WorkItemConfiguration] + :raises: + :class:`WorkItemConfigurationErrorException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.WorkItemConfigurationErrorException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WorkItemConfigurationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs'} + + def create( + self, resource_group_name, resource_name, work_item_configuration_properties, custom_headers=None, raw=False, **operation_config): + """Create a work item configuration for an Application Insights component. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param work_item_configuration_properties: Properties that need to be + specified to create a work item configuration of a Application + Insights component. + :type work_item_configuration_properties: + ~azure.mgmt.applicationinsights.models.WorkItemCreateConfiguration + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkItemConfiguration or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.applicationinsights.models.WorkItemConfiguration + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(work_item_configuration_properties, 'WorkItemCreateConfiguration') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkItemConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs'} + + def get_default( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Gets default work item configurations that exist for the application. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkItemConfiguration or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.applicationinsights.models.WorkItemConfiguration + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_default.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkItemConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_default.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/DefaultWorkItemConfig'} + + def delete( + self, resource_group_name, resource_name, work_item_config_id, custom_headers=None, raw=False, **operation_config): + """Delete a work item configuration of an Application Insights component. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param work_item_config_id: The unique work item configuration Id. + This can be either friendly name of connector as defined in connector + configuration + :type work_item_config_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'workItemConfigId': self._serialize.url("work_item_config_id", work_item_config_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs/{workItemConfigId}'} + + def get_item( + self, resource_group_name, resource_name, work_item_config_id, custom_headers=None, raw=False, **operation_config): + """Gets specified work item configuration for an Application Insights + component. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param work_item_config_id: The unique work item configuration Id. + This can be either friendly name of connector as defined in connector + configuration + :type work_item_config_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkItemConfiguration or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.applicationinsights.models.WorkItemConfiguration + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_item.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'workItemConfigId': self._serialize.url("work_item_config_id", work_item_config_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkItemConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs/{workItemConfigId}'} + + def update_item( + self, resource_group_name, resource_name, work_item_config_id, work_item_configuration_properties, custom_headers=None, raw=False, **operation_config): + """Update a work item configuration for an Application Insights component. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param work_item_config_id: The unique work item configuration Id. + This can be either friendly name of connector as defined in connector + configuration + :type work_item_config_id: str + :param work_item_configuration_properties: Properties that need to be + specified to update a work item configuration for this Application + Insights component. + :type work_item_configuration_properties: + ~azure.mgmt.applicationinsights.models.WorkItemCreateConfiguration + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkItemConfiguration or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.applicationinsights.models.WorkItemConfiguration + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_item.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'workItemConfigId': self._serialize.url("work_item_config_id", work_item_config_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(work_item_configuration_properties, 'WorkItemCreateConfiguration') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkItemConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs/{workItemConfigId}'} diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_workbooks_operations.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_workbooks_operations.py new file mode 100644 index 000000000000..44b55c229791 --- /dev/null +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/_workbooks_operations.py @@ -0,0 +1,382 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class WorkbooksOperations(object): + """WorkbooksOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-05-01" + + self.config = config + + def list_by_resource_group( + self, resource_group_name, category, tags=None, can_fetch_content=None, custom_headers=None, raw=False, **operation_config): + """Get all Workbooks defined within a specified resource group and + category. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param category: Category of workbook to return. Possible values + include: 'workbook', 'TSG', 'performance', 'retention' + :type category: str or + ~azure.mgmt.applicationinsights.models.CategoryType + :param tags: Tags presents on each workbook returned. + :type tags: list[str] + :param can_fetch_content: Flag indicating whether or not to return the + full content for each applicable workbook. If false, only return + summary content for workbooks. + :type can_fetch_content: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Workbook + :rtype: + ~azure.mgmt.applicationinsights.models.WorkbookPaged[~azure.mgmt.applicationinsights.models.Workbook] + :raises: + :class:`WorkbookErrorException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['category'] = self._serialize.query("category", category, 'str') + if tags is not None: + query_parameters['tags'] = self._serialize.query("tags", tags, '[str]', div=',') + if can_fetch_content is not None: + query_parameters['canFetchContent'] = self._serialize.query("can_fetch_content", can_fetch_content, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.WorkbookErrorException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WorkbookPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks'} + + def get( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Get a single workbook by its resourceName. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Workbook or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.applicationinsights.models.Workbook or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`WorkbookErrorException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.WorkbookErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Workbook', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'} + + def delete( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Delete a workbook. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`WorkbookErrorException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201, 204]: + raise models.WorkbookErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'} + + def create_or_update( + self, resource_group_name, resource_name, workbook_properties, custom_headers=None, raw=False, **operation_config): + """Create a new workbook. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param workbook_properties: Properties that need to be specified to + create a new workbook. + :type workbook_properties: + ~azure.mgmt.applicationinsights.models.Workbook + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Workbook or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.applicationinsights.models.Workbook or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`WorkbookErrorException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(workbook_properties, 'Workbook') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.WorkbookErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Workbook', response) + if response.status_code == 201: + deserialized = self._deserialize('Workbook', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'} + + def update( + self, resource_group_name, resource_name, workbook_properties, custom_headers=None, raw=False, **operation_config): + """Updates a workbook that has already been added. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param workbook_properties: Properties that need to be specified to + create a new workbook. + :type workbook_properties: + ~azure.mgmt.applicationinsights.models.Workbook + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Workbook or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.applicationinsights.models.Workbook or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`WorkbookErrorException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(workbook_properties, 'Workbook') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.WorkbookErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Workbook', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'} diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/analytics_items_operations.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/analytics_items_operations.py deleted file mode 100644 index dc51748f12a0..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/analytics_items_operations.py +++ /dev/null @@ -1,374 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class AnalyticsItemsOperations(object): - """AnalyticsItemsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-05-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, scope_path, scope="shared", type="none", include_content=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of Analytics Items defined within an Application Insights - component. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param scope_path: Enum indicating if this item definition is owned by - a specific user or is shared between all users with access to the - Application Insights component. Possible values include: - 'analyticsItems', 'myanalyticsItems' - :type scope_path: str or - ~azure.mgmt.applicationinsights.models.ItemScopePath - :param scope: Enum indicating if this item definition is owned by a - specific user or is shared between all users with access to the - Application Insights component. Possible values include: 'shared', - 'user' - :type scope: str or ~azure.mgmt.applicationinsights.models.ItemScope - :param type: Enum indicating the type of the Analytics item. Possible - values include: 'none', 'query', 'function', 'folder', 'recent' - :type type: str or - ~azure.mgmt.applicationinsights.models.ItemTypeParameter - :param include_content: Flag indicating whether or not to return the - content of each applicable item. If false, only return the item - information. - :type include_content: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentAnalyticsItem] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'scopePath': self._serialize.url("scope_path", scope_path, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - if scope is not None: - query_parameters['scope'] = self._serialize.query("scope", scope, 'str') - if type is not None: - query_parameters['type'] = self._serialize.query("type", type, 'str') - if include_content is not None: - query_parameters['includeContent'] = self._serialize.query("include_content", include_content, 'bool') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[ApplicationInsightsComponentAnalyticsItem]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/{scopePath}'} - - def get( - self, resource_group_name, resource_name, scope_path, id=None, name=None, custom_headers=None, raw=False, **operation_config): - """Gets a specific Analytics Items defined within an Application Insights - component. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param scope_path: Enum indicating if this item definition is owned by - a specific user or is shared between all users with access to the - Application Insights component. Possible values include: - 'analyticsItems', 'myanalyticsItems' - :type scope_path: str or - ~azure.mgmt.applicationinsights.models.ItemScopePath - :param id: The Id of a specific item defined in the Application - Insights component - :type id: str - :param name: The name of a specific item defined in the Application - Insights component - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationInsightsComponentAnalyticsItem or - ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentAnalyticsItem - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'scopePath': self._serialize.url("scope_path", scope_path, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - if id is not None: - query_parameters['id'] = self._serialize.query("id", id, 'str') - if name is not None: - query_parameters['name'] = self._serialize.query("name", name, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApplicationInsightsComponentAnalyticsItem', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/{scopePath}/item'} - - def put( - self, resource_group_name, resource_name, scope_path, item_properties, override_item=None, custom_headers=None, raw=False, **operation_config): - """Adds or Updates a specific Analytics Item within an Application - Insights component. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param scope_path: Enum indicating if this item definition is owned by - a specific user or is shared between all users with access to the - Application Insights component. Possible values include: - 'analyticsItems', 'myanalyticsItems' - :type scope_path: str or - ~azure.mgmt.applicationinsights.models.ItemScopePath - :param item_properties: Properties that need to be specified to create - a new item and add it to an Application Insights component. - :type item_properties: - ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentAnalyticsItem - :param override_item: Flag indicating whether or not to force save an - item. This allows overriding an item if it already exists. - :type override_item: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationInsightsComponentAnalyticsItem or - ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentAnalyticsItem - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.put.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'scopePath': self._serialize.url("scope_path", scope_path, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - if override_item is not None: - query_parameters['overrideItem'] = self._serialize.query("override_item", override_item, 'bool') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(item_properties, 'ApplicationInsightsComponentAnalyticsItem') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApplicationInsightsComponentAnalyticsItem', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/{scopePath}/item'} - - def delete( - self, resource_group_name, resource_name, scope_path, id=None, name=None, custom_headers=None, raw=False, **operation_config): - """Deletes a specific Analytics Items defined within an Application - Insights component. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param scope_path: Enum indicating if this item definition is owned by - a specific user or is shared between all users with access to the - Application Insights component. Possible values include: - 'analyticsItems', 'myanalyticsItems' - :type scope_path: str or - ~azure.mgmt.applicationinsights.models.ItemScopePath - :param id: The Id of a specific item defined in the Application - Insights component - :type id: str - :param name: The name of a specific item defined in the Application - Insights component - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'scopePath': self._serialize.url("scope_path", scope_path, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - if id is not None: - query_parameters['id'] = self._serialize.query("id", id, 'str') - if name is not None: - query_parameters['name'] = self._serialize.query("name", name, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/{scopePath}/item'} diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/annotations_operations.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/annotations_operations.py deleted file mode 100644 index 1ccc8a802733..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/annotations_operations.py +++ /dev/null @@ -1,321 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class AnnotationsOperations(object): - """AnnotationsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-05-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, start, end, custom_headers=None, raw=False, **operation_config): - """Gets the list of annotations for a component for given time range. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param start: The start time to query from for annotations, cannot be - older than 90 days from current date. - :type start: str - :param end: The end time to query for annotations. - :type end: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Annotation - :rtype: - ~azure.mgmt.applicationinsights.models.AnnotationPaged[~azure.mgmt.applicationinsights.models.Annotation] - :raises: - :class:`AnnotationErrorException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - query_parameters['start'] = self._serialize.query("start", start, 'str') - query_parameters['end'] = self._serialize.query("end", end, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.AnnotationErrorException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.AnnotationPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.AnnotationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/Annotations'} - - def create( - self, resource_group_name, resource_name, annotation_properties, custom_headers=None, raw=False, **operation_config): - """Create an Annotation of an Application Insights component. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param annotation_properties: Properties that need to be specified to - create an annotation of a Application Insights component. - :type annotation_properties: - ~azure.mgmt.applicationinsights.models.Annotation - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.applicationinsights.models.Annotation] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`AnnotationErrorException` - """ - # Construct URL - url = self.create.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(annotation_properties, 'Annotation') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.AnnotationErrorException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[Annotation]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/Annotations'} - - def delete( - self, resource_group_name, resource_name, annotation_id, custom_headers=None, raw=False, **operation_config): - """Delete an Annotation of an Application Insights component. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param annotation_id: The unique annotation ID. This is unique within - a Application Insights component. - :type annotation_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: object or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'annotationId': self._serialize.url("annotation_id", annotation_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('object', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/Annotations/{annotationId}'} - - def get( - self, resource_group_name, resource_name, annotation_id, custom_headers=None, raw=False, **operation_config): - """Get the annotation for given id. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param annotation_id: The unique annotation ID. This is unique within - a Application Insights component. - :type annotation_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.applicationinsights.models.Annotation] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`AnnotationErrorException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'annotationId': self._serialize.url("annotation_id", annotation_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.AnnotationErrorException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[Annotation]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/Annotations/{annotationId}'} diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/api_keys_operations.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/api_keys_operations.py deleted file mode 100644 index 578a76b50aae..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/api_keys_operations.py +++ /dev/null @@ -1,325 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class APIKeysOperations(object): - """APIKeysOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-05-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of API keys of an Application Insights component. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of - ApplicationInsightsComponentAPIKey - :rtype: - ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentAPIKeyPaged[~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentAPIKey] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ApplicationInsightsComponentAPIKeyPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ApplicationInsightsComponentAPIKeyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ApiKeys'} - - def create( - self, resource_group_name, resource_name, api_key_properties, custom_headers=None, raw=False, **operation_config): - """Create an API Key of an Application Insights component. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param api_key_properties: Properties that need to be specified to - create an API key of a Application Insights component. - :type api_key_properties: - ~azure.mgmt.applicationinsights.models.APIKeyRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationInsightsComponentAPIKey or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentAPIKey - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(api_key_properties, 'APIKeyRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApplicationInsightsComponentAPIKey', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ApiKeys'} - - def delete( - self, resource_group_name, resource_name, key_id, custom_headers=None, raw=False, **operation_config): - """Delete an API Key of an Application Insights component. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param key_id: The API Key ID. This is unique within a Application - Insights component. - :type key_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationInsightsComponentAPIKey or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentAPIKey - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'keyId': self._serialize.url("key_id", key_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApplicationInsightsComponentAPIKey', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/APIKeys/{keyId}'} - - def get( - self, resource_group_name, resource_name, key_id, custom_headers=None, raw=False, **operation_config): - """Get the API Key for this key id. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param key_id: The API Key ID. This is unique within a Application - Insights component. - :type key_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationInsightsComponentAPIKey or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentAPIKey - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'keyId': self._serialize.url("key_id", key_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApplicationInsightsComponentAPIKey', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/APIKeys/{keyId}'} diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/component_available_features_operations.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/component_available_features_operations.py deleted file mode 100644 index f90bdf9b27c0..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/component_available_features_operations.py +++ /dev/null @@ -1,104 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ComponentAvailableFeaturesOperations(object): - """ComponentAvailableFeaturesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-05-01" - - self.config = config - - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Returns all available features of the application insights component. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationInsightsComponentAvailableFeatures or - ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentAvailableFeatures - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApplicationInsightsComponentAvailableFeatures', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/getavailablebillingfeatures'} diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/component_current_billing_features_operations.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/component_current_billing_features_operations.py deleted file mode 100644 index 92261d281f10..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/component_current_billing_features_operations.py +++ /dev/null @@ -1,184 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ComponentCurrentBillingFeaturesOperations(object): - """ComponentCurrentBillingFeaturesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-05-01" - - self.config = config - - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Returns current billing features for an Application Insights component. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationInsightsComponentBillingFeatures or - ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentBillingFeatures - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApplicationInsightsComponentBillingFeatures', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/currentbillingfeatures'} - - def update( - self, resource_group_name, resource_name, data_volume_cap=None, current_billing_features=None, custom_headers=None, raw=False, **operation_config): - """Update current billing features for an Application Insights component. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param data_volume_cap: An Application Insights component daily data - volume cap - :type data_volume_cap: - ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentDataVolumeCap - :param current_billing_features: Current enabled pricing plan. When - the component is in the Enterprise plan, this will list both 'Basic' - and 'Application Insights Enterprise'. - :type current_billing_features: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationInsightsComponentBillingFeatures or - ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentBillingFeatures - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - billing_features_properties = models.ApplicationInsightsComponentBillingFeatures(data_volume_cap=data_volume_cap, current_billing_features=current_billing_features) - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(billing_features_properties, 'ApplicationInsightsComponentBillingFeatures') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApplicationInsightsComponentBillingFeatures', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/currentbillingfeatures'} diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/component_feature_capabilities_operations.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/component_feature_capabilities_operations.py deleted file mode 100644 index e3f6e169f0fe..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/component_feature_capabilities_operations.py +++ /dev/null @@ -1,104 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ComponentFeatureCapabilitiesOperations(object): - """ComponentFeatureCapabilitiesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-05-01" - - self.config = config - - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Returns feature capabilities of the application insights component. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationInsightsComponentFeatureCapabilities or - ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentFeatureCapabilities - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApplicationInsightsComponentFeatureCapabilities', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/featurecapabilities'} diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/component_quota_status_operations.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/component_quota_status_operations.py deleted file mode 100644 index f31665321b6d..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/component_quota_status_operations.py +++ /dev/null @@ -1,105 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ComponentQuotaStatusOperations(object): - """ComponentQuotaStatusOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-05-01" - - self.config = config - - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Returns daily data volume cap (quota) status for an Application - Insights component. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationInsightsComponentQuotaStatus or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentQuotaStatus - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApplicationInsightsComponentQuotaStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/quotastatus'} diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/components_operations.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/components_operations.py deleted file mode 100644 index b133e0d68e5f..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/components_operations.py +++ /dev/null @@ -1,586 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ComponentsOperations(object): - """ComponentsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-05-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of all Application Insights components within a - subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ApplicationInsightsComponent - :rtype: - ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentPaged[~azure.mgmt.applicationinsights.models.ApplicationInsightsComponent] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ApplicationInsightsComponentPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ApplicationInsightsComponentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/components'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of Application Insights components within a resource group. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ApplicationInsightsComponent - :rtype: - ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentPaged[~azure.mgmt.applicationinsights.models.ApplicationInsightsComponent] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ApplicationInsightsComponentPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ApplicationInsightsComponentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components'} - - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Deletes an Application Insights component. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}'} - - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Returns an Application Insights component. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationInsightsComponent or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponent or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApplicationInsightsComponent', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}'} - - def create_or_update( - self, resource_group_name, resource_name, insight_properties, custom_headers=None, raw=False, **operation_config): - """Creates (or updates) an Application Insights component. Note: You - cannot specify a different value for InstrumentationKey nor AppId in - the Put operation. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param insight_properties: Properties that need to be specified to - create an Application Insights component. - :type insight_properties: - ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponent - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationInsightsComponent or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponent or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(insight_properties, 'ApplicationInsightsComponent') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApplicationInsightsComponent', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}'} - - def update_tags( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): - """Updates an existing component's tags. To update other fields use the - CreateOrUpdate method. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param tags: Resource tags - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationInsightsComponent or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponent or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - component_tags = models.TagsResource(tags=tags) - - # Construct URL - url = self.update_tags.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(component_tags, 'TagsResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApplicationInsightsComponent', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}'} - - def purge( - self, resource_group_name, resource_name, table, filters, custom_headers=None, raw=False, **operation_config): - """Purges data in an Application Insights component by a set of - user-defined filters. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param table: Table from which to purge data. - :type table: str - :param filters: The set of columns and filters (queries) to run over - them to purge the resulting data. - :type filters: - list[~azure.mgmt.applicationinsights.models.ComponentPurgeBodyFilters] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ComponentPurgeResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.applicationinsights.models.ComponentPurgeResponse - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - body = models.ComponentPurgeBody(table=table, filters=filters) - - # Construct URL - url = self.purge.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(body, 'ComponentPurgeBody') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 202: - deserialized = self._deserialize('ComponentPurgeResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - purge.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/purge'} - - def get_purge_status( - self, resource_group_name, resource_name, purge_id, custom_headers=None, raw=False, **operation_config): - """Get status for an ongoing purge operation. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param purge_id: In a purge status request, this is the Id of the - operation the status of which is returned. - :type purge_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ComponentPurgeStatusResponse or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.applicationinsights.models.ComponentPurgeStatusResponse or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_purge_status.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'purgeId': self._serialize.url("purge_id", purge_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ComponentPurgeStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_purge_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/operations/{purgeId}'} diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/export_configurations_operations.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/export_configurations_operations.py deleted file mode 100644 index 676984225b87..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/export_configurations_operations.py +++ /dev/null @@ -1,398 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ExportConfigurationsOperations(object): - """ExportConfigurationsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-05-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of Continuous Export configuration of an Application - Insights component. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentExportConfiguration] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[ApplicationInsightsComponentExportConfiguration]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/exportconfiguration'} - - def create( - self, resource_group_name, resource_name, export_properties, custom_headers=None, raw=False, **operation_config): - """Create a Continuous Export configuration of an Application Insights - component. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param export_properties: Properties that need to be specified to - create a Continuous Export configuration of a Application Insights - component. - :type export_properties: - ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentExportRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentExportConfiguration] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(export_properties, 'ApplicationInsightsComponentExportRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[ApplicationInsightsComponentExportConfiguration]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/exportconfiguration'} - - def delete( - self, resource_group_name, resource_name, export_id, custom_headers=None, raw=False, **operation_config): - """Delete a Continuous Export configuration of an Application Insights - component. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param export_id: The Continuous Export configuration ID. This is - unique within a Application Insights component. - :type export_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationInsightsComponentExportConfiguration or - ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentExportConfiguration - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'exportId': self._serialize.url("export_id", export_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApplicationInsightsComponentExportConfiguration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/exportconfiguration/{exportId}'} - - def get( - self, resource_group_name, resource_name, export_id, custom_headers=None, raw=False, **operation_config): - """Get the Continuous Export configuration for this export id. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param export_id: The Continuous Export configuration ID. This is - unique within a Application Insights component. - :type export_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationInsightsComponentExportConfiguration or - ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentExportConfiguration - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'exportId': self._serialize.url("export_id", export_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApplicationInsightsComponentExportConfiguration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/exportconfiguration/{exportId}'} - - def update( - self, resource_group_name, resource_name, export_id, export_properties, custom_headers=None, raw=False, **operation_config): - """Update the Continuous Export configuration for this export id. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param export_id: The Continuous Export configuration ID. This is - unique within a Application Insights component. - :type export_id: str - :param export_properties: Properties that need to be specified to - update the Continuous Export configuration. - :type export_properties: - ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentExportRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationInsightsComponentExportConfiguration or - ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentExportConfiguration - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'exportId': self._serialize.url("export_id", export_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(export_properties, 'ApplicationInsightsComponentExportRequest') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApplicationInsightsComponentExportConfiguration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/exportconfiguration/{exportId}'} diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/favorites_operations.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/favorites_operations.py deleted file mode 100644 index 6d95c8aba102..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/favorites_operations.py +++ /dev/null @@ -1,416 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class FavoritesOperations(object): - """FavoritesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-05-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, favorite_type="shared", source_type=None, can_fetch_content=None, tags=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of favorites defined within an Application Insights - component. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param favorite_type: The type of favorite. Value can be either shared - or user. Possible values include: 'shared', 'user' - :type favorite_type: str or - ~azure.mgmt.applicationinsights.models.FavoriteType - :param source_type: Source type of favorite to return. When left out, - the source type defaults to 'other' (not present in this enum). - Possible values include: 'retention', 'notebook', 'sessions', - 'events', 'userflows', 'funnel', 'impact', 'segmentation' - :type source_type: str or - ~azure.mgmt.applicationinsights.models.FavoriteSourceType - :param can_fetch_content: Flag indicating whether or not to return the - full content for each applicable favorite. If false, only return - summary content for favorites. - :type can_fetch_content: bool - :param tags: Tags that must be present on each favorite returned. - :type tags: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentFavorite] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - if favorite_type is not None: - query_parameters['favoriteType'] = self._serialize.query("favorite_type", favorite_type, 'FavoriteType') - if source_type is not None: - query_parameters['sourceType'] = self._serialize.query("source_type", source_type, 'str') - if can_fetch_content is not None: - query_parameters['canFetchContent'] = self._serialize.query("can_fetch_content", can_fetch_content, 'bool') - if tags is not None: - query_parameters['tags'] = self._serialize.query("tags", tags, '[str]', div=',') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[ApplicationInsightsComponentFavorite]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites'} - - def get( - self, resource_group_name, resource_name, favorite_id, custom_headers=None, raw=False, **operation_config): - """Get a single favorite by its FavoriteId, defined within an Application - Insights component. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param favorite_id: The Id of a specific favorite defined in the - Application Insights component - :type favorite_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationInsightsComponentFavorite or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentFavorite - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'favoriteId': self._serialize.url("favorite_id", favorite_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApplicationInsightsComponentFavorite', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}'} - - def add( - self, resource_group_name, resource_name, favorite_id, favorite_properties, custom_headers=None, raw=False, **operation_config): - """Adds a new favorites to an Application Insights component. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param favorite_id: The Id of a specific favorite defined in the - Application Insights component - :type favorite_id: str - :param favorite_properties: Properties that need to be specified to - create a new favorite and add it to an Application Insights component. - :type favorite_properties: - ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentFavorite - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationInsightsComponentFavorite or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentFavorite - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.add.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'favoriteId': self._serialize.url("favorite_id", favorite_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(favorite_properties, 'ApplicationInsightsComponentFavorite') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApplicationInsightsComponentFavorite', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - add.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}'} - - def update( - self, resource_group_name, resource_name, favorite_id, favorite_properties, custom_headers=None, raw=False, **operation_config): - """Updates a favorite that has already been added to an Application - Insights component. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param favorite_id: The Id of a specific favorite defined in the - Application Insights component - :type favorite_id: str - :param favorite_properties: Properties that need to be specified to - update the existing favorite. - :type favorite_properties: - ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentFavorite - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationInsightsComponentFavorite or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentFavorite - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'favoriteId': self._serialize.url("favorite_id", favorite_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(favorite_properties, 'ApplicationInsightsComponentFavorite') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApplicationInsightsComponentFavorite', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}'} - - def delete( - self, resource_group_name, resource_name, favorite_id, custom_headers=None, raw=False, **operation_config): - """Remove a favorite that is associated to an Application Insights - component. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param favorite_id: The Id of a specific favorite defined in the - Application Insights component - :type favorite_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'favoriteId': self._serialize.url("favorite_id", favorite_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}'} diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/operations.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/operations.py deleted file mode 100644 index 126ca2eca5bf..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/operations.py +++ /dev/null @@ -1,96 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class Operations(object): - """Operations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-05-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all of the available insights REST API operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Operation - :rtype: - ~azure.mgmt.applicationinsights.models.OperationPaged[~azure.mgmt.applicationinsights.models.Operation] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/providers/Microsoft.Insights/operations'} diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/proactive_detection_configurations_operations.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/proactive_detection_configurations_operations.py deleted file mode 100644 index cf7384327518..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/proactive_detection_configurations_operations.py +++ /dev/null @@ -1,252 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ProactiveDetectionConfigurationsOperations(object): - """ProactiveDetectionConfigurationsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-05-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of ProactiveDetection configurations of an Application - Insights component. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentProactiveDetectionConfiguration] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[ApplicationInsightsComponentProactiveDetectionConfiguration]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ProactiveDetectionConfigs'} - - def get( - self, resource_group_name, resource_name, configuration_id, custom_headers=None, raw=False, **operation_config): - """Get the ProactiveDetection configuration for this configuration id. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param configuration_id: The ProactiveDetection configuration ID. This - is unique within a Application Insights component. - :type configuration_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationInsightsComponentProactiveDetectionConfiguration - or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentProactiveDetectionConfiguration - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'ConfigurationId': self._serialize.url("configuration_id", configuration_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApplicationInsightsComponentProactiveDetectionConfiguration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ProactiveDetectionConfigs/{ConfigurationId}'} - - def update( - self, resource_group_name, resource_name, configuration_id, proactive_detection_properties, custom_headers=None, raw=False, **operation_config): - """Update the ProactiveDetection configuration for this configuration id. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param configuration_id: The ProactiveDetection configuration ID. This - is unique within a Application Insights component. - :type configuration_id: str - :param proactive_detection_properties: Properties that need to be - specified to update the ProactiveDetection configuration. - :type proactive_detection_properties: - ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentProactiveDetectionConfiguration - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationInsightsComponentProactiveDetectionConfiguration - or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentProactiveDetectionConfiguration - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'ConfigurationId': self._serialize.url("configuration_id", configuration_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(proactive_detection_properties, 'ApplicationInsightsComponentProactiveDetectionConfiguration') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApplicationInsightsComponentProactiveDetectionConfiguration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ProactiveDetectionConfigs/{ConfigurationId}'} diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/web_test_locations_operations.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/web_test_locations_operations.py deleted file mode 100644 index 5890c5fd7daf..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/web_test_locations_operations.py +++ /dev/null @@ -1,112 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class WebTestLocationsOperations(object): - """WebTestLocationsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-05-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of web test locations available to this Application - Insights component. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of - ApplicationInsightsComponentWebTestLocation - :rtype: - ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentWebTestLocationPaged[~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentWebTestLocation] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ApplicationInsightsComponentWebTestLocationPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ApplicationInsightsComponentWebTestLocationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/syntheticmonitorlocations'} diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/web_tests_operations.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/web_tests_operations.py deleted file mode 100644 index 8a6f068bc047..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/web_tests_operations.py +++ /dev/null @@ -1,508 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class WebTestsOperations(object): - """WebTestsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-05-01" - - self.config = config - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Get all Application Insights web tests defined within a specified - resource group. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WebTest - :rtype: - ~azure.mgmt.applicationinsights.models.WebTestPaged[~azure.mgmt.applicationinsights.models.WebTest] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.WebTestPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.WebTestPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests'} - - def get( - self, resource_group_name, web_test_name, custom_headers=None, raw=False, **operation_config): - """Get a specific Application Insights web test definition. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param web_test_name: The name of the Application Insights webtest - resource. - :type web_test_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WebTest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.applicationinsights.models.WebTest or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'webTestName': self._serialize.url("web_test_name", web_test_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WebTest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName}'} - - def create_or_update( - self, resource_group_name, web_test_name, web_test_definition, custom_headers=None, raw=False, **operation_config): - """Creates or updates an Application Insights web test definition. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param web_test_name: The name of the Application Insights webtest - resource. - :type web_test_name: str - :param web_test_definition: Properties that need to be specified to - create or update an Application Insights web test definition. - :type web_test_definition: - ~azure.mgmt.applicationinsights.models.WebTest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WebTest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.applicationinsights.models.WebTest or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'webTestName': self._serialize.url("web_test_name", web_test_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(web_test_definition, 'WebTest') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WebTest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName}'} - - def update_tags( - self, resource_group_name, web_test_name, tags=None, custom_headers=None, raw=False, **operation_config): - """Creates or updates an Application Insights web test definition. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param web_test_name: The name of the Application Insights webtest - resource. - :type web_test_name: str - :param tags: Resource tags - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WebTest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.applicationinsights.models.WebTest or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - web_test_tags = models.TagsResource(tags=tags) - - # Construct URL - url = self.update_tags.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'webTestName': self._serialize.url("web_test_name", web_test_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(web_test_tags, 'TagsResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WebTest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName}'} - - def delete( - self, resource_group_name, web_test_name, custom_headers=None, raw=False, **operation_config): - """Deletes an Application Insights web test. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param web_test_name: The name of the Application Insights webtest - resource. - :type web_test_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'webTestName': self._serialize.url("web_test_name", web_test_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName}'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Get all Application Insights web test alerts definitions within a - subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WebTest - :rtype: - ~azure.mgmt.applicationinsights.models.WebTestPaged[~azure.mgmt.applicationinsights.models.WebTest] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.WebTestPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.WebTestPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/webtests'} - - def list_by_component( - self, component_name, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Get all Application Insights web tests defined for the specified - component. - - :param component_name: The name of the Application Insights component - resource. - :type component_name: str - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WebTest - :rtype: - ~azure.mgmt.applicationinsights.models.WebTestPaged[~azure.mgmt.applicationinsights.models.WebTest] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_component.metadata['url'] - path_format_arguments = { - 'componentName': self._serialize.url("component_name", component_name, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.WebTestPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.WebTestPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_component.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{componentName}/webtests'} diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/work_item_configurations_operations.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/work_item_configurations_operations.py deleted file mode 100644 index cb78771ba266..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/work_item_configurations_operations.py +++ /dev/null @@ -1,462 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class WorkItemConfigurationsOperations(object): - """WorkItemConfigurationsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-05-01" - - self.config = config - - def list( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets the list work item configurations that exist for the application. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WorkItemConfiguration - :rtype: - ~azure.mgmt.applicationinsights.models.WorkItemConfigurationPaged[~azure.mgmt.applicationinsights.models.WorkItemConfiguration] - :raises: - :class:`WorkItemConfigurationErrorException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.WorkItemConfigurationErrorException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.WorkItemConfigurationPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.WorkItemConfigurationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs'} - - def create( - self, resource_group_name, resource_name, work_item_configuration_properties, custom_headers=None, raw=False, **operation_config): - """Create a work item configuration for an Application Insights component. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param work_item_configuration_properties: Properties that need to be - specified to create a work item configuration of a Application - Insights component. - :type work_item_configuration_properties: - ~azure.mgmt.applicationinsights.models.WorkItemCreateConfiguration - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkItemConfiguration or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.applicationinsights.models.WorkItemConfiguration - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(work_item_configuration_properties, 'WorkItemCreateConfiguration') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkItemConfiguration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs'} - - def get_default( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Gets default work item configurations that exist for the application. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkItemConfiguration or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.applicationinsights.models.WorkItemConfiguration - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_default.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkItemConfiguration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_default.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/DefaultWorkItemConfig'} - - def delete( - self, resource_group_name, resource_name, work_item_config_id, custom_headers=None, raw=False, **operation_config): - """Delete a work item configuration of an Application Insights component. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param work_item_config_id: The unique work item configuration Id. - This can be either friendly name of connector as defined in connector - configuration - :type work_item_config_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: object or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'workItemConfigId': self._serialize.url("work_item_config_id", work_item_config_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('object', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs/{workItemConfigId}'} - - def get_item( - self, resource_group_name, resource_name, work_item_config_id, custom_headers=None, raw=False, **operation_config): - """Gets specified work item configuration for an Application Insights - component. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param work_item_config_id: The unique work item configuration Id. - This can be either friendly name of connector as defined in connector - configuration - :type work_item_config_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkItemConfiguration or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.applicationinsights.models.WorkItemConfiguration - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_item.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'workItemConfigId': self._serialize.url("work_item_config_id", work_item_config_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkItemConfiguration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs/{workItemConfigId}'} - - def update_item( - self, resource_group_name, resource_name, work_item_config_id, work_item_configuration_properties, custom_headers=None, raw=False, **operation_config): - """Update a work item configuration for an Application Insights component. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param work_item_config_id: The unique work item configuration Id. - This can be either friendly name of connector as defined in connector - configuration - :type work_item_config_id: str - :param work_item_configuration_properties: Properties that need to be - specified to update a work item configuration for this Application - Insights component. - :type work_item_configuration_properties: - ~azure.mgmt.applicationinsights.models.WorkItemCreateConfiguration - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkItemConfiguration or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.applicationinsights.models.WorkItemConfiguration - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update_item.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'workItemConfigId': self._serialize.url("work_item_config_id", work_item_config_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(work_item_configuration_properties, 'WorkItemCreateConfiguration') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkItemConfiguration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs/{workItemConfigId}'} diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/workbooks_operations.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/workbooks_operations.py deleted file mode 100644 index 89a6b02d5949..000000000000 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/workbooks_operations.py +++ /dev/null @@ -1,381 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class WorkbooksOperations(object): - """WorkbooksOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-05-01" - - self.config = config - - def list_by_resource_group( - self, resource_group_name, category, tags=None, can_fetch_content=None, custom_headers=None, raw=False, **operation_config): - """Get all Workbooks defined within a specified resource group and - category. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param category: Category of workbook to return. Possible values - include: 'workbook', 'TSG', 'performance', 'retention' - :type category: str or - ~azure.mgmt.applicationinsights.models.CategoryType - :param tags: Tags presents on each workbook returned. - :type tags: list[str] - :param can_fetch_content: Flag indicating whether or not to return the - full content for each applicable workbook. If false, only return - summary content for workbooks. - :type can_fetch_content: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Workbook - :rtype: - ~azure.mgmt.applicationinsights.models.WorkbookPaged[~azure.mgmt.applicationinsights.models.Workbook] - :raises: - :class:`WorkbookErrorException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['category'] = self._serialize.query("category", category, 'str') - if tags is not None: - query_parameters['tags'] = self._serialize.query("tags", tags, '[str]', div=',') - if can_fetch_content is not None: - query_parameters['canFetchContent'] = self._serialize.query("can_fetch_content", can_fetch_content, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.WorkbookErrorException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.WorkbookPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.WorkbookPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks'} - - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Get a single workbook by its resourceName. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Workbook or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.applicationinsights.models.Workbook or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`WorkbookErrorException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.WorkbookErrorException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Workbook', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'} - - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Delete a workbook. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`WorkbookErrorException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201, 204]: - raise models.WorkbookErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'} - - def create_or_update( - self, resource_group_name, resource_name, workbook_properties, custom_headers=None, raw=False, **operation_config): - """Create a new workbook. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param workbook_properties: Properties that need to be specified to - create a new workbook. - :type workbook_properties: - ~azure.mgmt.applicationinsights.models.Workbook - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Workbook or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.applicationinsights.models.Workbook or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`WorkbookErrorException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(workbook_properties, 'Workbook') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.WorkbookErrorException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Workbook', response) - if response.status_code == 201: - deserialized = self._deserialize('Workbook', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'} - - def update( - self, resource_group_name, resource_name, workbook_properties, custom_headers=None, raw=False, **operation_config): - """Updates a workbook that has already been added. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param resource_name: The name of the Application Insights component - resource. - :type resource_name: str - :param workbook_properties: Properties that need to be specified to - create a new workbook. - :type workbook_properties: - ~azure.mgmt.applicationinsights.models.Workbook - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Workbook or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.applicationinsights.models.Workbook or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`WorkbookErrorException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(workbook_properties, 'Workbook') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.WorkbookErrorException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Workbook', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'} diff --git a/sdk/azure-imds/azure/imds/__init__.py b/sdk/azure-imds/azure/imds/__init__.py new file mode 100644 index 000000000000..7c028b6800c8 --- /dev/null +++ b/sdk/azure-imds/azure/imds/__init__.py @@ -0,0 +1,19 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from ._configuration import InstanceMetadataClientConfiguration +from ._instance_metadata_client import InstanceMetadataClient +__all__ = ['InstanceMetadataClient', 'InstanceMetadataClientConfiguration'] + +from .version import VERSION + +__version__ = VERSION + diff --git a/sdk/azure-imds/azure/imds/_configuration.py b/sdk/azure-imds/azure/imds/_configuration.py new file mode 100644 index 000000000000..ed14469a941b --- /dev/null +++ b/sdk/azure-imds/azure/imds/_configuration.py @@ -0,0 +1,43 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class InstanceMetadataClientConfiguration(AzureConfiguration): + """Configuration for InstanceMetadataClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param str base_url: Service URL + """ + + def __init__( + self, credentials, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if not base_url: + base_url = 'https://169.254.169.254/metadata' + + super(InstanceMetadataClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-imds/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials diff --git a/sdk/azure-imds/azure/imds/_instance_metadata_client.py b/sdk/azure-imds/azure/imds/_instance_metadata_client.py new file mode 100644 index 000000000000..f7de9b9f652b --- /dev/null +++ b/sdk/azure-imds/azure/imds/_instance_metadata_client.py @@ -0,0 +1,57 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import InstanceMetadataClientConfiguration +from .operations import InstancesOperations +from .operations import AttestedOperations +from .operations import IdentityOperations +from . import models + + +class InstanceMetadataClient(SDKClient): + """The Azure Instance Metadata Client + + :ivar config: Configuration for client. + :vartype config: InstanceMetadataClientConfiguration + + :ivar instances: Instances operations + :vartype instances: azure.imds.operations.InstancesOperations + :ivar attested: Attested operations + :vartype attested: azure.imds.operations.AttestedOperations + :ivar identity: Identity operations + :vartype identity: azure.imds.operations.IdentityOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param str base_url: Service URL + """ + + def __init__( + self, credentials, base_url=None): + + self.config = InstanceMetadataClientConfiguration(credentials, base_url) + super(InstanceMetadataClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2019-02-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.instances = InstancesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.attested = AttestedOperations( + self._client, self.config, self._serialize, self._deserialize) + self.identity = IdentityOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/azure-imds/azure/imds/models/__init__.py b/sdk/azure-imds/azure/imds/models/__init__.py new file mode 100644 index 000000000000..047ddf505a55 --- /dev/null +++ b/sdk/azure-imds/azure/imds/models/__init__.py @@ -0,0 +1,70 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import AttestedData + from ._models_py3 import Compute + from ._models_py3 import ErrorResponse, ErrorResponseException + from ._models_py3 import IdentityErrorResponse, IdentityErrorResponseException + from ._models_py3 import IdentityInfoResponse + from ._models_py3 import IdentityTokenResponse + from ._models_py3 import Instance + from ._models_py3 import Ipv4Properties + from ._models_py3 import Ipv6Properties + from ._models_py3 import Network + from ._models_py3 import NetworkInterface + from ._models_py3 import NetworkInterfaceIpv4 + from ._models_py3 import NetworkInterfaceIpv6 + from ._models_py3 import PlanProperties + from ._models_py3 import PublicKeysProperties + from ._models_py3 import SubnetProperties +except (SyntaxError, ImportError): + from ._models import AttestedData + from ._models import Compute + from ._models import ErrorResponse, ErrorResponseException + from ._models import IdentityErrorResponse, IdentityErrorResponseException + from ._models import IdentityInfoResponse + from ._models import IdentityTokenResponse + from ._models import Instance + from ._models import Ipv4Properties + from ._models import Ipv6Properties + from ._models import Network + from ._models import NetworkInterface + from ._models import NetworkInterfaceIpv4 + from ._models import NetworkInterfaceIpv6 + from ._models import PlanProperties + from ._models import PublicKeysProperties + from ._models import SubnetProperties +from ._instance_metadata_client_enums import ( + Error, + BypassCache, +) + +__all__ = [ + 'AttestedData', + 'Compute', + 'ErrorResponse', 'ErrorResponseException', + 'IdentityErrorResponse', 'IdentityErrorResponseException', + 'IdentityInfoResponse', + 'IdentityTokenResponse', + 'Instance', + 'Ipv4Properties', + 'Ipv6Properties', + 'Network', + 'NetworkInterface', + 'NetworkInterfaceIpv4', + 'NetworkInterfaceIpv6', + 'PlanProperties', + 'PublicKeysProperties', + 'SubnetProperties', + 'Error', + 'BypassCache', +] diff --git a/sdk/azure-imds/azure/imds/models/_instance_metadata_client_enums.py b/sdk/azure-imds/azure/imds/models/_instance_metadata_client_enums.py new file mode 100644 index 000000000000..5d29f6f5ca7b --- /dev/null +++ b/sdk/azure-imds/azure/imds/models/_instance_metadata_client_enums.py @@ -0,0 +1,33 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class Error(str, Enum): + + invalid_request = "invalid_request" + unauthorized_client = "unauthorized_client" + access_denied = "access_denied" + unsupported_response_type = "unsupported_response_type" + invalid_scope = "invalid_scope" + server_error = "server_error" + service_unavailable = "service_unavailable" + bad_request = "bad_request" + forbidden = "forbidden" + not_found = "not_found" + method_not_allowed = "method_not_allowed" + too_many_requests = "too_many_requests" + + +class BypassCache(str, Enum): + + true = "true" diff --git a/sdk/azure-imds/azure/imds/models/_models.py b/sdk/azure-imds/azure/imds/models/_models.py new file mode 100644 index 000000000000..9ba0b0f809ba --- /dev/null +++ b/sdk/azure-imds/azure/imds/models/_models.py @@ -0,0 +1,490 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AttestedData(Model): + """This is the response from the Attested_GetDocument operation. + + :param signature: This is the encoded string containing the VM ID, plan + information, public key, timestamp, and nonce value. + :type signature: str + :param encoding: This is the encoding scheme of the signature. + :type encoding: str + """ + + _attribute_map = { + 'signature': {'key': 'signature', 'type': 'str'}, + 'encoding': {'key': 'encoding', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AttestedData, self).__init__(**kwargs) + self.signature = kwargs.get('signature', None) + self.encoding = kwargs.get('encoding', None) + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class Compute(Model): + """Compute Metadata. + + :param az_environment: This is the name of the environment in which the VM + is running. + :type az_environment: str + :param custom_data: This is the base64 encoded custom data for the running + VM. + :type custom_data: str + :param location: This is the Azure Region in which the VM is running. + :type location: str + :param name: This is the name of the VM. + :type name: str + :param offer: This is the offer information for the VM image. This value + is only present for images deployed from the Azure Image Gallery. + :type offer: str + :param os_type: This value indicates the type of OS the VM is running, + either Linux or Windows. + :type os_type: str + :param placement_group_id: This is the placement group of your Virtual + Machine Scale Set. + :type placement_group_id: str + :param plan: This contains the data about the plan. + :type plan: ~azure.imds.models.PlanProperties + :param public_keys: This is information about the SSH certificate + :type public_keys: list[~azure.imds.models.PublicKeysProperties] + :param platform_fault_domain: This is the fault domain in which the VM. + :type platform_fault_domain: str + :param platform_update_domain: This is the update domain in which the VM. + :type platform_update_domain: str + :param provider: This is the provider of the VM. + :type provider: str + :param publisher: This is the publisher of the VM image. + :type publisher: str + :param resource_group_name: This is the resource group for the VM. + :type resource_group_name: str + :param sku: This is the specific SKU for the VM image. + :type sku: str + :param subscription_id: This is the Azure subscription for the VM. + :type subscription_id: str + :param tags: This is the list of tags for your VM. + :type tags: str + :param version: This is the version of the VM image. + :type version: str + :param vm_id: This is the unique identifier for the VM. + :type vm_id: str + :param vm_scale_set_name: This is the resource name of the VMSS. + :type vm_scale_set_name: str + :param vm_size: This is the size of the VM. + :type vm_size: str + :param zone: This is the availability zone of the VM. + :type zone: str + """ + + _attribute_map = { + 'az_environment': {'key': 'azEnvironment', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'placement_group_id': {'key': 'placementGroupId', 'type': 'str'}, + 'plan': {'key': 'plan', 'type': 'PlanProperties'}, + 'public_keys': {'key': 'publicKeys', 'type': '[PublicKeysProperties]'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'str'}, + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'str'}, + 'provider': {'key': 'provider', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'vm_id': {'key': 'vmId', 'type': 'str'}, + 'vm_scale_set_name': {'key': 'vmScaleSetName', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'zone': {'key': 'zone', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Compute, self).__init__(**kwargs) + self.az_environment = kwargs.get('az_environment', None) + self.custom_data = kwargs.get('custom_data', None) + self.location = kwargs.get('location', None) + self.name = kwargs.get('name', None) + self.offer = kwargs.get('offer', None) + self.os_type = kwargs.get('os_type', None) + self.placement_group_id = kwargs.get('placement_group_id', None) + self.plan = kwargs.get('plan', None) + self.public_keys = kwargs.get('public_keys', None) + self.platform_fault_domain = kwargs.get('platform_fault_domain', None) + self.platform_update_domain = kwargs.get('platform_update_domain', None) + self.provider = kwargs.get('provider', None) + self.publisher = kwargs.get('publisher', None) + self.resource_group_name = kwargs.get('resource_group_name', None) + self.sku = kwargs.get('sku', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.tags = kwargs.get('tags', None) + self.version = kwargs.get('version', None) + self.vm_id = kwargs.get('vm_id', None) + self.vm_scale_set_name = kwargs.get('vm_scale_set_name', None) + self.vm_size = kwargs.get('vm_size', None) + self.zone = kwargs.get('zone', None) + + +class ErrorResponse(Model): + """This is the response from an operation in the case an error occurs. + + :param error: Error message indicating why the operation failed. + :type error: str + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class IdentityErrorResponse(Model): + """This is the response from an Identity operation in the case an error + occurs. + + :param error: Error code. Possible values include: 'invalid_request', + 'unauthorized_client', 'access_denied', 'unsupported_response_type', + 'invalid_scope', 'server_error', 'service_unavailable', 'bad_request', + 'forbidden', 'not_found', 'method_not_allowed', 'too_many_requests' + :type error: str or ~azure.imds.models.Error + :param error_description: Error message indicating why the operation + failed. + :type error_description: str + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'str'}, + 'error_description': {'key': 'error_description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IdentityErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + self.error_description = kwargs.get('error_description', None) + + +class IdentityErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'IdentityErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(IdentityErrorResponseException, self).__init__(deserialize, response, 'IdentityErrorResponse', *args) + + +class IdentityInfoResponse(Model): + """This is the response from the Identity_GetInfo operation. + + :param tenant_id: This is the AAD tenantId of the identity of the caller. + :type tenant_id: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IdentityInfoResponse, self).__init__(**kwargs) + self.tenant_id = kwargs.get('tenant_id', None) + + +class IdentityTokenResponse(Model): + """This is the response from the Identity_GetToken operation. + + :param access_token: This is the requested access token. The app can use + this token to authenticate to the sink resource. + :type access_token: str + :param expires_in: This is how long the access token is valid (in + seconds). + :type expires_in: str + :param expires_on: This is the time when the access token expires. The + date is represented as the number of seconds from 1970-01-01T0:0:0Z UTC + until the expiration time. This value is used to determine the lifetime of + cached tokens. + :type expires_on: str + :param ext_expires_in: This indicates the extended lifetime of the token + (in seconds). + :type ext_expires_in: str + :param not_before: This is the time when the access token becomes + effective. The date is represented as the number of seconds from + 1970-01-01T0:0:0Z UTC until the expiration time. + :type not_before: str + :param resource: This is the app ID URI of the sink resource. + :type resource: str + :param token_type: This indicates the token type value. + :type token_type: str + :param client_id: This is the client_id specified in the request, if any. + :type client_id: str + :param object_id: This is the object_id specified in the request, if any. + :type object_id: str + :param msi_res_id: This is the msi_res_id specified in the request, if + any. + :type msi_res_id: str + """ + + _attribute_map = { + 'access_token': {'key': 'access_token', 'type': 'str'}, + 'expires_in': {'key': 'expires_in', 'type': 'str'}, + 'expires_on': {'key': 'expires_on', 'type': 'str'}, + 'ext_expires_in': {'key': 'ext_expires_in', 'type': 'str'}, + 'not_before': {'key': 'not_before', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'token_type': {'key': 'token_type', 'type': 'str'}, + 'client_id': {'key': 'client_id', 'type': 'str'}, + 'object_id': {'key': 'object_id', 'type': 'str'}, + 'msi_res_id': {'key': 'msi_res_id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IdentityTokenResponse, self).__init__(**kwargs) + self.access_token = kwargs.get('access_token', None) + self.expires_in = kwargs.get('expires_in', None) + self.expires_on = kwargs.get('expires_on', None) + self.ext_expires_in = kwargs.get('ext_expires_in', None) + self.not_before = kwargs.get('not_before', None) + self.resource = kwargs.get('resource', None) + self.token_type = kwargs.get('token_type', None) + self.client_id = kwargs.get('client_id', None) + self.object_id = kwargs.get('object_id', None) + self.msi_res_id = kwargs.get('msi_res_id', None) + + +class Instance(Model): + """This is the response from the Instance_GetMetadata operation. + + :param compute: Compute Metadata + :type compute: ~azure.imds.models.Compute + :param network: Network Metadata + :type network: ~azure.imds.models.Network + """ + + _attribute_map = { + 'compute': {'key': 'compute', 'type': 'Compute'}, + 'network': {'key': 'network', 'type': 'Network'}, + } + + def __init__(self, **kwargs): + super(Instance, self).__init__(**kwargs) + self.compute = kwargs.get('compute', None) + self.network = kwargs.get('network', None) + + +class Ipv4Properties(Model): + """This contains the IPv4 properties. + + :param private_ip_address: This is the private IP address assigned to the + interface. + :type private_ip_address: str + :param public_ip_address: This is the public IP address assigned to the + interface. + :type public_ip_address: str + """ + + _attribute_map = { + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Ipv4Properties, self).__init__(**kwargs) + self.private_ip_address = kwargs.get('private_ip_address', None) + self.public_ip_address = kwargs.get('public_ip_address', None) + + +class Ipv6Properties(Model): + """This contains the IPv6 properties. + + :param private_ip_address: This is the private IPv6 address assigned to + the interface. + :type private_ip_address: str + """ + + _attribute_map = { + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Ipv6Properties, self).__init__(**kwargs) + self.private_ip_address = kwargs.get('private_ip_address', None) + + +class Network(Model): + """Network Metadata. + + :param interface: This contains data about the network interface. + :type interface: list[~azure.imds.models.NetworkInterface] + """ + + _attribute_map = { + 'interface': {'key': 'interface', 'type': '[NetworkInterface]'}, + } + + def __init__(self, **kwargs): + super(Network, self).__init__(**kwargs) + self.interface = kwargs.get('interface', None) + + +class NetworkInterface(Model): + """This contains data about the network interface. + + :param ipv4: This contains the IPv4 address. + :type ipv4: ~azure.imds.models.NetworkInterfaceIpv4 + :param ipv6: This contains the IPv6 address. + :type ipv6: ~azure.imds.models.NetworkInterfaceIpv6 + :param mac_address: This is the MAC address of the interface. + :type mac_address: str + """ + + _attribute_map = { + 'ipv4': {'key': 'ipv4', 'type': 'NetworkInterfaceIpv4'}, + 'ipv6': {'key': 'ipv6', 'type': 'NetworkInterfaceIpv6'}, + 'mac_address': {'key': 'macAddress', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NetworkInterface, self).__init__(**kwargs) + self.ipv4 = kwargs.get('ipv4', None) + self.ipv6 = kwargs.get('ipv6', None) + self.mac_address = kwargs.get('mac_address', None) + + +class NetworkInterfaceIpv4(Model): + """This contains the IPv4 address. + + :param ip_address: This is the IP address + :type ip_address: list[~azure.imds.models.Ipv4Properties] + :param subnet: This is the subnet + :type subnet: list[~azure.imds.models.SubnetProperties] + """ + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': '[Ipv4Properties]'}, + 'subnet': {'key': 'subnet', 'type': '[SubnetProperties]'}, + } + + def __init__(self, **kwargs): + super(NetworkInterfaceIpv4, self).__init__(**kwargs) + self.ip_address = kwargs.get('ip_address', None) + self.subnet = kwargs.get('subnet', None) + + +class NetworkInterfaceIpv6(Model): + """This contains the IPv6 address. + + :param ip_address: This is the IP address + :type ip_address: list[~azure.imds.models.Ipv6Properties] + """ + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': '[Ipv6Properties]'}, + } + + def __init__(self, **kwargs): + super(NetworkInterfaceIpv6, self).__init__(**kwargs) + self.ip_address = kwargs.get('ip_address', None) + + +class PlanProperties(Model): + """This contains the data about the plan. + + :param name: This is the Plan ID. + :type name: str + :param publisher: This is the publisher ID. + :type publisher: str + :param product: This is the product of the image from the Marketplace. + :type product: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PlanProperties, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.publisher = kwargs.get('publisher', None) + self.product = kwargs.get('product', None) + + +class PublicKeysProperties(Model): + """This contains the data about the public key. + + :param path: This specifies the full path on the VM where the SSH public + key is stored. + :type path: str + :param key_data: This is the SSH public key certificate used to + authenticate with the VM. + :type key_data: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'key_data': {'key': 'keyData', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PublicKeysProperties, self).__init__(**kwargs) + self.path = kwargs.get('path', None) + self.key_data = kwargs.get('key_data', None) + + +class SubnetProperties(Model): + """This contains the properties of the subnet. + + :param address: This is the address range of the subnet. + :type address: str + :param prefix: This is the prefix of the subnet. + :type prefix: str + """ + + _attribute_map = { + 'address': {'key': 'address', 'type': 'str'}, + 'prefix': {'key': 'prefix', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubnetProperties, self).__init__(**kwargs) + self.address = kwargs.get('address', None) + self.prefix = kwargs.get('prefix', None) diff --git a/sdk/azure-imds/azure/imds/models/_models_py3.py b/sdk/azure-imds/azure/imds/models/_models_py3.py new file mode 100644 index 000000000000..dfa8bbb2c6e0 --- /dev/null +++ b/sdk/azure-imds/azure/imds/models/_models_py3.py @@ -0,0 +1,490 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AttestedData(Model): + """This is the response from the Attested_GetDocument operation. + + :param signature: This is the encoded string containing the VM ID, plan + information, public key, timestamp, and nonce value. + :type signature: str + :param encoding: This is the encoding scheme of the signature. + :type encoding: str + """ + + _attribute_map = { + 'signature': {'key': 'signature', 'type': 'str'}, + 'encoding': {'key': 'encoding', 'type': 'str'}, + } + + def __init__(self, *, signature: str=None, encoding: str=None, **kwargs) -> None: + super(AttestedData, self).__init__(**kwargs) + self.signature = signature + self.encoding = encoding + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class Compute(Model): + """Compute Metadata. + + :param az_environment: This is the name of the environment in which the VM + is running. + :type az_environment: str + :param custom_data: This is the base64 encoded custom data for the running + VM. + :type custom_data: str + :param location: This is the Azure Region in which the VM is running. + :type location: str + :param name: This is the name of the VM. + :type name: str + :param offer: This is the offer information for the VM image. This value + is only present for images deployed from the Azure Image Gallery. + :type offer: str + :param os_type: This value indicates the type of OS the VM is running, + either Linux or Windows. + :type os_type: str + :param placement_group_id: This is the placement group of your Virtual + Machine Scale Set. + :type placement_group_id: str + :param plan: This contains the data about the plan. + :type plan: ~azure.imds.models.PlanProperties + :param public_keys: This is information about the SSH certificate + :type public_keys: list[~azure.imds.models.PublicKeysProperties] + :param platform_fault_domain: This is the fault domain in which the VM. + :type platform_fault_domain: str + :param platform_update_domain: This is the update domain in which the VM. + :type platform_update_domain: str + :param provider: This is the provider of the VM. + :type provider: str + :param publisher: This is the publisher of the VM image. + :type publisher: str + :param resource_group_name: This is the resource group for the VM. + :type resource_group_name: str + :param sku: This is the specific SKU for the VM image. + :type sku: str + :param subscription_id: This is the Azure subscription for the VM. + :type subscription_id: str + :param tags: This is the list of tags for your VM. + :type tags: str + :param version: This is the version of the VM image. + :type version: str + :param vm_id: This is the unique identifier for the VM. + :type vm_id: str + :param vm_scale_set_name: This is the resource name of the VMSS. + :type vm_scale_set_name: str + :param vm_size: This is the size of the VM. + :type vm_size: str + :param zone: This is the availability zone of the VM. + :type zone: str + """ + + _attribute_map = { + 'az_environment': {'key': 'azEnvironment', 'type': 'str'}, + 'custom_data': {'key': 'customData', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'offer': {'key': 'offer', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'placement_group_id': {'key': 'placementGroupId', 'type': 'str'}, + 'plan': {'key': 'plan', 'type': 'PlanProperties'}, + 'public_keys': {'key': 'publicKeys', 'type': '[PublicKeysProperties]'}, + 'platform_fault_domain': {'key': 'platformFaultDomain', 'type': 'str'}, + 'platform_update_domain': {'key': 'platformUpdateDomain', 'type': 'str'}, + 'provider': {'key': 'provider', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'vm_id': {'key': 'vmId', 'type': 'str'}, + 'vm_scale_set_name': {'key': 'vmScaleSetName', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'zone': {'key': 'zone', 'type': 'str'}, + } + + def __init__(self, *, az_environment: str=None, custom_data: str=None, location: str=None, name: str=None, offer: str=None, os_type: str=None, placement_group_id: str=None, plan=None, public_keys=None, platform_fault_domain: str=None, platform_update_domain: str=None, provider: str=None, publisher: str=None, resource_group_name: str=None, sku: str=None, subscription_id: str=None, tags: str=None, version: str=None, vm_id: str=None, vm_scale_set_name: str=None, vm_size: str=None, zone: str=None, **kwargs) -> None: + super(Compute, self).__init__(**kwargs) + self.az_environment = az_environment + self.custom_data = custom_data + self.location = location + self.name = name + self.offer = offer + self.os_type = os_type + self.placement_group_id = placement_group_id + self.plan = plan + self.public_keys = public_keys + self.platform_fault_domain = platform_fault_domain + self.platform_update_domain = platform_update_domain + self.provider = provider + self.publisher = publisher + self.resource_group_name = resource_group_name + self.sku = sku + self.subscription_id = subscription_id + self.tags = tags + self.version = version + self.vm_id = vm_id + self.vm_scale_set_name = vm_scale_set_name + self.vm_size = vm_size + self.zone = zone + + +class ErrorResponse(Model): + """This is the response from an operation in the case an error occurs. + + :param error: Error message indicating why the operation failed. + :type error: str + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'str'}, + } + + def __init__(self, *, error: str=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class IdentityErrorResponse(Model): + """This is the response from an Identity operation in the case an error + occurs. + + :param error: Error code. Possible values include: 'invalid_request', + 'unauthorized_client', 'access_denied', 'unsupported_response_type', + 'invalid_scope', 'server_error', 'service_unavailable', 'bad_request', + 'forbidden', 'not_found', 'method_not_allowed', 'too_many_requests' + :type error: str or ~azure.imds.models.Error + :param error_description: Error message indicating why the operation + failed. + :type error_description: str + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'str'}, + 'error_description': {'key': 'error_description', 'type': 'str'}, + } + + def __init__(self, *, error=None, error_description: str=None, **kwargs) -> None: + super(IdentityErrorResponse, self).__init__(**kwargs) + self.error = error + self.error_description = error_description + + +class IdentityErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'IdentityErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(IdentityErrorResponseException, self).__init__(deserialize, response, 'IdentityErrorResponse', *args) + + +class IdentityInfoResponse(Model): + """This is the response from the Identity_GetInfo operation. + + :param tenant_id: This is the AAD tenantId of the identity of the caller. + :type tenant_id: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__(self, *, tenant_id: str=None, **kwargs) -> None: + super(IdentityInfoResponse, self).__init__(**kwargs) + self.tenant_id = tenant_id + + +class IdentityTokenResponse(Model): + """This is the response from the Identity_GetToken operation. + + :param access_token: This is the requested access token. The app can use + this token to authenticate to the sink resource. + :type access_token: str + :param expires_in: This is how long the access token is valid (in + seconds). + :type expires_in: str + :param expires_on: This is the time when the access token expires. The + date is represented as the number of seconds from 1970-01-01T0:0:0Z UTC + until the expiration time. This value is used to determine the lifetime of + cached tokens. + :type expires_on: str + :param ext_expires_in: This indicates the extended lifetime of the token + (in seconds). + :type ext_expires_in: str + :param not_before: This is the time when the access token becomes + effective. The date is represented as the number of seconds from + 1970-01-01T0:0:0Z UTC until the expiration time. + :type not_before: str + :param resource: This is the app ID URI of the sink resource. + :type resource: str + :param token_type: This indicates the token type value. + :type token_type: str + :param client_id: This is the client_id specified in the request, if any. + :type client_id: str + :param object_id: This is the object_id specified in the request, if any. + :type object_id: str + :param msi_res_id: This is the msi_res_id specified in the request, if + any. + :type msi_res_id: str + """ + + _attribute_map = { + 'access_token': {'key': 'access_token', 'type': 'str'}, + 'expires_in': {'key': 'expires_in', 'type': 'str'}, + 'expires_on': {'key': 'expires_on', 'type': 'str'}, + 'ext_expires_in': {'key': 'ext_expires_in', 'type': 'str'}, + 'not_before': {'key': 'not_before', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'token_type': {'key': 'token_type', 'type': 'str'}, + 'client_id': {'key': 'client_id', 'type': 'str'}, + 'object_id': {'key': 'object_id', 'type': 'str'}, + 'msi_res_id': {'key': 'msi_res_id', 'type': 'str'}, + } + + def __init__(self, *, access_token: str=None, expires_in: str=None, expires_on: str=None, ext_expires_in: str=None, not_before: str=None, resource: str=None, token_type: str=None, client_id: str=None, object_id: str=None, msi_res_id: str=None, **kwargs) -> None: + super(IdentityTokenResponse, self).__init__(**kwargs) + self.access_token = access_token + self.expires_in = expires_in + self.expires_on = expires_on + self.ext_expires_in = ext_expires_in + self.not_before = not_before + self.resource = resource + self.token_type = token_type + self.client_id = client_id + self.object_id = object_id + self.msi_res_id = msi_res_id + + +class Instance(Model): + """This is the response from the Instance_GetMetadata operation. + + :param compute: Compute Metadata + :type compute: ~azure.imds.models.Compute + :param network: Network Metadata + :type network: ~azure.imds.models.Network + """ + + _attribute_map = { + 'compute': {'key': 'compute', 'type': 'Compute'}, + 'network': {'key': 'network', 'type': 'Network'}, + } + + def __init__(self, *, compute=None, network=None, **kwargs) -> None: + super(Instance, self).__init__(**kwargs) + self.compute = compute + self.network = network + + +class Ipv4Properties(Model): + """This contains the IPv4 properties. + + :param private_ip_address: This is the private IP address assigned to the + interface. + :type private_ip_address: str + :param public_ip_address: This is the public IP address assigned to the + interface. + :type public_ip_address: str + """ + + _attribute_map = { + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + } + + def __init__(self, *, private_ip_address: str=None, public_ip_address: str=None, **kwargs) -> None: + super(Ipv4Properties, self).__init__(**kwargs) + self.private_ip_address = private_ip_address + self.public_ip_address = public_ip_address + + +class Ipv6Properties(Model): + """This contains the IPv6 properties. + + :param private_ip_address: This is the private IPv6 address assigned to + the interface. + :type private_ip_address: str + """ + + _attribute_map = { + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + } + + def __init__(self, *, private_ip_address: str=None, **kwargs) -> None: + super(Ipv6Properties, self).__init__(**kwargs) + self.private_ip_address = private_ip_address + + +class Network(Model): + """Network Metadata. + + :param interface: This contains data about the network interface. + :type interface: list[~azure.imds.models.NetworkInterface] + """ + + _attribute_map = { + 'interface': {'key': 'interface', 'type': '[NetworkInterface]'}, + } + + def __init__(self, *, interface=None, **kwargs) -> None: + super(Network, self).__init__(**kwargs) + self.interface = interface + + +class NetworkInterface(Model): + """This contains data about the network interface. + + :param ipv4: This contains the IPv4 address. + :type ipv4: ~azure.imds.models.NetworkInterfaceIpv4 + :param ipv6: This contains the IPv6 address. + :type ipv6: ~azure.imds.models.NetworkInterfaceIpv6 + :param mac_address: This is the MAC address of the interface. + :type mac_address: str + """ + + _attribute_map = { + 'ipv4': {'key': 'ipv4', 'type': 'NetworkInterfaceIpv4'}, + 'ipv6': {'key': 'ipv6', 'type': 'NetworkInterfaceIpv6'}, + 'mac_address': {'key': 'macAddress', 'type': 'str'}, + } + + def __init__(self, *, ipv4=None, ipv6=None, mac_address: str=None, **kwargs) -> None: + super(NetworkInterface, self).__init__(**kwargs) + self.ipv4 = ipv4 + self.ipv6 = ipv6 + self.mac_address = mac_address + + +class NetworkInterfaceIpv4(Model): + """This contains the IPv4 address. + + :param ip_address: This is the IP address + :type ip_address: list[~azure.imds.models.Ipv4Properties] + :param subnet: This is the subnet + :type subnet: list[~azure.imds.models.SubnetProperties] + """ + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': '[Ipv4Properties]'}, + 'subnet': {'key': 'subnet', 'type': '[SubnetProperties]'}, + } + + def __init__(self, *, ip_address=None, subnet=None, **kwargs) -> None: + super(NetworkInterfaceIpv4, self).__init__(**kwargs) + self.ip_address = ip_address + self.subnet = subnet + + +class NetworkInterfaceIpv6(Model): + """This contains the IPv6 address. + + :param ip_address: This is the IP address + :type ip_address: list[~azure.imds.models.Ipv6Properties] + """ + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': '[Ipv6Properties]'}, + } + + def __init__(self, *, ip_address=None, **kwargs) -> None: + super(NetworkInterfaceIpv6, self).__init__(**kwargs) + self.ip_address = ip_address + + +class PlanProperties(Model): + """This contains the data about the plan. + + :param name: This is the Plan ID. + :type name: str + :param publisher: This is the publisher ID. + :type publisher: str + :param product: This is the product of the image from the Marketplace. + :type product: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, publisher: str=None, product: str=None, **kwargs) -> None: + super(PlanProperties, self).__init__(**kwargs) + self.name = name + self.publisher = publisher + self.product = product + + +class PublicKeysProperties(Model): + """This contains the data about the public key. + + :param path: This specifies the full path on the VM where the SSH public + key is stored. + :type path: str + :param key_data: This is the SSH public key certificate used to + authenticate with the VM. + :type key_data: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'key_data': {'key': 'keyData', 'type': 'str'}, + } + + def __init__(self, *, path: str=None, key_data: str=None, **kwargs) -> None: + super(PublicKeysProperties, self).__init__(**kwargs) + self.path = path + self.key_data = key_data + + +class SubnetProperties(Model): + """This contains the properties of the subnet. + + :param address: This is the address range of the subnet. + :type address: str + :param prefix: This is the prefix of the subnet. + :type prefix: str + """ + + _attribute_map = { + 'address': {'key': 'address', 'type': 'str'}, + 'prefix': {'key': 'prefix', 'type': 'str'}, + } + + def __init__(self, *, address: str=None, prefix: str=None, **kwargs) -> None: + super(SubnetProperties, self).__init__(**kwargs) + self.address = address + self.prefix = prefix diff --git a/sdk/azure-imds/azure/imds/operations/__init__.py b/sdk/azure-imds/azure/imds/operations/__init__.py new file mode 100644 index 000000000000..272e0e229e1f --- /dev/null +++ b/sdk/azure-imds/azure/imds/operations/__init__.py @@ -0,0 +1,20 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from ._instances_operations import InstancesOperations +from ._attested_operations import AttestedOperations +from ._identity_operations import IdentityOperations + +__all__ = [ + 'InstancesOperations', + 'AttestedOperations', + 'IdentityOperations', +] diff --git a/sdk/azure-imds/azure/imds/operations/_attested_operations.py b/sdk/azure-imds/azure/imds/operations/_attested_operations.py new file mode 100644 index 000000000000..686fdccfe3dc --- /dev/null +++ b/sdk/azure-imds/azure/imds/operations/_attested_operations.py @@ -0,0 +1,97 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class AttestedOperations(object): + """AttestedOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: This is the API version to use. Constant value: "2019-02-01". + :ivar metadata: This must be set to 'true'. Constant value: "true". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-02-01" + self.metadata = "true" + + self.config = config + + def get_document( + self, nonce=None, custom_headers=None, raw=False, **operation_config): + """Get Attested Data for the Virtual Machine. + + :param nonce: This is a string of up to 32 random alphanumeric + characters. + :type nonce: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AttestedData or ClientRawResponse if raw=true + :rtype: ~azure.imds.models.AttestedData or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_document.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if nonce is not None: + query_parameters['nonce'] = self._serialize.query("nonce", nonce, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['Metadata'] = self._serialize.header("self.metadata", self.metadata, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AttestedData', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_document.metadata = {'url': '/attested/document'} diff --git a/sdk/azure-imds/azure/imds/operations/_identity_operations.py b/sdk/azure-imds/azure/imds/operations/_identity_operations.py new file mode 100644 index 000000000000..070c25dfbfd3 --- /dev/null +++ b/sdk/azure-imds/azure/imds/operations/_identity_operations.py @@ -0,0 +1,178 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class IdentityOperations(object): + """IdentityOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar metadata: This must be set to 'true'. Constant value: "true". + :ivar api_version: This is the API version to use. Constant value: "2019-02-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.metadata = "true" + self.api_version = "2019-02-01" + + self.config = config + + def get_token( + self, resource, client_id=None, object_id=None, msi_res_id=None, authority=None, bypass_cache=None, custom_headers=None, raw=False, **operation_config): + """Get a Token from Azure AD. + + :param resource: This is the urlencoded identifier URI of the sink + resource for the requested Azure AD token. The resulting token + contains the corresponding aud for this resource. + :type resource: str + :param client_id: This identifies, by Azure AD client id, a specific + explicit identity to use when authenticating to Azure AD. Mutually + exclusive with object_id and msi_res_id. + :type client_id: str + :param object_id: This identifies, by Azure AD object id, a specific + explicit identity to use when authenticating to Azure AD. Mutually + exclusive with client_id and msi_res_id. + :type object_id: str + :param msi_res_id: This identifies, by urlencoded ARM resource id, a + specific explicit identity to use when authenticating to Azure AD. + Mutually exclusive with client_id and object_id. + :type msi_res_id: str + :param authority: This indicates the authority to request AAD tokens + from. Defaults to the known authority of the identity to be used. + :type authority: str + :param bypass_cache: If provided, the value must be 'true'. This + indicates to the server that the token must be retrieved from Azure AD + and cannot be retrieved from an internal cache. Possible values + include: 'true' + :type bypass_cache: str or ~azure.imds.models.BypassCache + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IdentityTokenResponse or ClientRawResponse if raw=true + :rtype: ~azure.imds.models.IdentityTokenResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`IdentityErrorResponseException` + """ + # Construct URL + url = self.get_token.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['resource'] = self._serialize.query("resource", resource, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if client_id is not None: + query_parameters['client_id'] = self._serialize.query("client_id", client_id, 'str') + if object_id is not None: + query_parameters['object_id'] = self._serialize.query("object_id", object_id, 'str') + if msi_res_id is not None: + query_parameters['msi_res_id'] = self._serialize.query("msi_res_id", msi_res_id, 'str') + if authority is not None: + query_parameters['authority'] = self._serialize.query("authority", authority, 'str') + if bypass_cache is not None: + query_parameters['bypass_cache'] = self._serialize.query("bypass_cache", bypass_cache, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['Metadata'] = self._serialize.header("self.metadata", self.metadata, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.IdentityErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IdentityTokenResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_token.metadata = {'url': '/identity/oauth2/token'} + + def get_info( + self, custom_headers=None, raw=False, **operation_config): + """Get information about AAD Metadata. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IdentityInfoResponse or ClientRawResponse if raw=true + :rtype: ~azure.imds.models.IdentityInfoResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`IdentityErrorResponseException` + """ + # Construct URL + url = self.get_info.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['Metadata'] = self._serialize.header("self.metadata", self.metadata, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.IdentityErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IdentityInfoResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_info.metadata = {'url': '/identity/info'} diff --git a/sdk/azure-imds/azure/imds/operations/_instances_operations.py b/sdk/azure-imds/azure/imds/operations/_instances_operations.py new file mode 100644 index 000000000000..0713e23ec6d5 --- /dev/null +++ b/sdk/azure-imds/azure/imds/operations/_instances_operations.py @@ -0,0 +1,92 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class InstancesOperations(object): + """InstancesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: This is the API version to use. Constant value: "2019-02-01". + :ivar metadata: This must be set to 'true'. Constant value: "true". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-02-01" + self.metadata = "true" + + self.config = config + + def get_metadata( + self, custom_headers=None, raw=False, **operation_config): + """Get Instance Metadata for the Virtual Machine. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Instance or ClientRawResponse if raw=true + :rtype: ~azure.imds.models.Instance or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_metadata.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['Metadata'] = self._serialize.header("self.metadata", self.metadata, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Instance', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_metadata.metadata = {'url': '/instance'} diff --git a/sdk/azure-imds/azure/imds/version.py b/sdk/azure-imds/azure/imds/version.py new file mode 100644 index 000000000000..e0ec669828cb --- /dev/null +++ b/sdk/azure-imds/azure/imds/version.py @@ -0,0 +1,13 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" + diff --git a/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/__init__.py b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/__init__.py new file mode 100644 index 000000000000..74676ff31aac --- /dev/null +++ b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/__init__.py @@ -0,0 +1,19 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from ._configuration import HealthcareApisManagementClientConfiguration +from ._healthcare_apis_management_client import HealthcareApisManagementClient +__all__ = ['HealthcareApisManagementClient', 'HealthcareApisManagementClientConfiguration'] + +from .version import VERSION + +__version__ = VERSION + diff --git a/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/_configuration.py b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/_configuration.py new file mode 100644 index 000000000000..351baa8a13f5 --- /dev/null +++ b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/_configuration.py @@ -0,0 +1,48 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class HealthcareApisManagementClientConfiguration(AzureConfiguration): + """Configuration for HealthcareApisManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The subscription identifier. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(HealthcareApisManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-healthcareapis/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/_healthcare_apis_management_client.py b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/_healthcare_apis_management_client.py new file mode 100644 index 000000000000..61807f835bc4 --- /dev/null +++ b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/_healthcare_apis_management_client.py @@ -0,0 +1,59 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import HealthcareApisManagementClientConfiguration +from .operations import ServicesOperations +from .operations import Operations +from .operations import OperationResultsOperations +from . import models + + +class HealthcareApisManagementClient(SDKClient): + """Azure Healthcare APIs Client + + :ivar config: Configuration for client. + :vartype config: HealthcareApisManagementClientConfiguration + + :ivar services: Services operations + :vartype services: azure.mgmt.healthcareapis.operations.ServicesOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.healthcareapis.operations.Operations + :ivar operation_results: OperationResults operations + :vartype operation_results: azure.mgmt.healthcareapis.operations.OperationResultsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The subscription identifier. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = HealthcareApisManagementClientConfiguration(credentials, subscription_id, base_url) + super(HealthcareApisManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2018-08-20-preview' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.services = ServicesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.operation_results = OperationResultsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/__init__.py b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/__init__.py new file mode 100644 index 000000000000..cb27d5affb6e --- /dev/null +++ b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/__init__.py @@ -0,0 +1,75 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import CheckNameAvailabilityParameters + from ._models_py3 import ErrorDetails, ErrorDetailsException + from ._models_py3 import ErrorDetailsInternal + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import OperationResultsDescription + from ._models_py3 import Resource + from ._models_py3 import ServiceAccessPolicyEntry + from ._models_py3 import ServiceAuthenticationConfigurationInfo + from ._models_py3 import ServiceCorsConfigurationInfo + from ._models_py3 import ServiceCosmosDbConfigurationInfo + from ._models_py3 import ServicesDescription + from ._models_py3 import ServicesNameAvailabilityInfo + from ._models_py3 import ServicesPatchDescription + from ._models_py3 import ServicesProperties +except (SyntaxError, ImportError): + from ._models import CheckNameAvailabilityParameters + from ._models import ErrorDetails, ErrorDetailsException + from ._models import ErrorDetailsInternal + from ._models import Operation + from ._models import OperationDisplay + from ._models import OperationResultsDescription + from ._models import Resource + from ._models import ServiceAccessPolicyEntry + from ._models import ServiceAuthenticationConfigurationInfo + from ._models import ServiceCorsConfigurationInfo + from ._models import ServiceCosmosDbConfigurationInfo + from ._models import ServicesDescription + from ._models import ServicesNameAvailabilityInfo + from ._models import ServicesPatchDescription + from ._models import ServicesProperties +from ._paged_models import OperationPaged +from ._paged_models import ServicesDescriptionPaged +from ._healthcare_apis_management_client_enums import ( + ProvisioningState, + Kind, + ServiceNameUnavailabilityReason, + OperationResultStatus, +) + +__all__ = [ + 'CheckNameAvailabilityParameters', + 'ErrorDetails', 'ErrorDetailsException', + 'ErrorDetailsInternal', + 'Operation', + 'OperationDisplay', + 'OperationResultsDescription', + 'Resource', + 'ServiceAccessPolicyEntry', + 'ServiceAuthenticationConfigurationInfo', + 'ServiceCorsConfigurationInfo', + 'ServiceCosmosDbConfigurationInfo', + 'ServicesDescription', + 'ServicesNameAvailabilityInfo', + 'ServicesPatchDescription', + 'ServicesProperties', + 'ServicesDescriptionPaged', + 'OperationPaged', + 'ProvisioningState', + 'Kind', + 'ServiceNameUnavailabilityReason', + 'OperationResultStatus', +] diff --git a/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_healthcare_apis_management_client_enums.py b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_healthcare_apis_management_client_enums.py new file mode 100644 index 000000000000..a910aebf78d1 --- /dev/null +++ b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_healthcare_apis_management_client_enums.py @@ -0,0 +1,47 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class ProvisioningState(str, Enum): + + deleting = "Deleting" + succeeded = "Succeeded" + creating = "Creating" + accepted = "Accepted" + verifying = "Verifying" + updating = "Updating" + failed = "Failed" + canceled = "Canceled" + deprovisioned = "Deprovisioned" + + +class Kind(str, Enum): + + fhir = "fhir" + fhir_stu3 = "fhir-Stu3" + fhir_r4 = "fhir-R4" + + +class ServiceNameUnavailabilityReason(str, Enum): + + invalid = "Invalid" + already_exists = "AlreadyExists" + + +class OperationResultStatus(str, Enum): + + canceled = "Canceled" + succeeded = "Succeeded" + failed = "Failed" + requested = "Requested" + running = "Running" diff --git a/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_models.py b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_models.py new file mode 100644 index 000000000000..5993183ed587 --- /dev/null +++ b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_models.py @@ -0,0 +1,543 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class CheckNameAvailabilityParameters(Model): + """Input values. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the service instance to check. + :type name: str + :param type: Required. The fully qualified resource type which includes + provider namespace. + :type type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CheckNameAvailabilityParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ErrorDetails(Model): + """Error details. + + :param error: Object containing error details. + :type error: ~azure.mgmt.healthcareapis.models.ErrorDetailsInternal + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetailsInternal'}, + } + + def __init__(self, **kwargs): + super(ErrorDetails, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class ErrorDetailsException(HttpOperationError): + """Server responsed with exception of type: 'ErrorDetails'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorDetailsException, self).__init__(deserialize, response, 'ErrorDetails', *args) + + +class ErrorDetailsInternal(Model): + """Error details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The target of the particular error. + :vartype target: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorDetailsInternal, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + + +class Operation(Model): + """Service REST API operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation name: {provider}/{resource}/{read | write | action | + delete} + :vartype name: str + :ivar origin: Default value is 'user,system'. + :vartype origin: str + :param display: The information displayed about the operation. + :type display: ~azure.mgmt.healthcareapis.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + 'origin': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = None + self.origin = None + self.display = kwargs.get('display', None) + + +class OperationDisplay(Model): + """The object that represents the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: Service provider: Microsoft.HealthcareApis + :vartype provider: str + :ivar resource: Resource Type: Services + :vartype resource: str + :ivar operation: Name of the operation + :vartype operation: str + :ivar description: Friendly description for the operation, + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class OperationResultsDescription(Model): + """The properties indicating the operation result of an operation on a + service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the operation returned. + :vartype id: str + :ivar name: The name of the operation result. + :vartype name: str + :ivar status: The status of the operation being performed. Possible values + include: 'Canceled', 'Succeeded', 'Failed', 'Requested', 'Running' + :vartype status: str or + ~azure.mgmt.healthcareapis.models.OperationResultStatus + :ivar start_time: The time that the operation was started. + :vartype start_time: str + :param properties: Additional properties of the operation result. + :type properties: object + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(OperationResultsDescription, self).__init__(**kwargs) + self.id = None + self.name = None + self.status = None + self.start_time = None + self.properties = kwargs.get('properties', None) + + +class Resource(Model): + """The common properties of a service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :param kind: Required. The kind of the service. Valid values are: fhir, + fhir-Stu3 and fhir-R4. Possible values include: 'fhir', 'fhir-Stu3', + 'fhir-R4' + :type kind: str or ~azure.mgmt.healthcareapis.models.Kind + :param location: Required. The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param etag: An etag associated with the resource, used for optimistic + concurrency when editing it. + :type etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True, 'pattern': r'^[a-z0-9][a-z0-9-]{1,21}[a-z0-9]$'}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'Kind'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.kind = kwargs.get('kind', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.etag = kwargs.get('etag', None) + + +class ServiceAccessPolicyEntry(Model): + """An access policy entry. + + All required parameters must be populated in order to send to Azure. + + :param object_id: Required. An object ID that is allowed access to the + FHIR service. + :type object_id: str + """ + + _validation = { + 'object_id': {'required': True, 'pattern': r'^(([0-9A-Fa-f]{8}[-]?(?:[0-9A-Fa-f]{4}[-]?){3}[0-9A-Fa-f]{12}){1})+$'}, + } + + _attribute_map = { + 'object_id': {'key': 'objectId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceAccessPolicyEntry, self).__init__(**kwargs) + self.object_id = kwargs.get('object_id', None) + + +class ServiceAuthenticationConfigurationInfo(Model): + """Authentication configuration information. + + :param authority: The authority url for the service + :type authority: str + :param audience: The audience url for the service + :type audience: str + :param smart_proxy_enabled: If the SMART on FHIR proxy is enabled + :type smart_proxy_enabled: bool + """ + + _attribute_map = { + 'authority': {'key': 'authority', 'type': 'str'}, + 'audience': {'key': 'audience', 'type': 'str'}, + 'smart_proxy_enabled': {'key': 'smartProxyEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ServiceAuthenticationConfigurationInfo, self).__init__(**kwargs) + self.authority = kwargs.get('authority', None) + self.audience = kwargs.get('audience', None) + self.smart_proxy_enabled = kwargs.get('smart_proxy_enabled', None) + + +class ServiceCorsConfigurationInfo(Model): + """The settings for the CORS configuration of the service instance. + + :param origins: The origins to be allowed via CORS. + :type origins: list[str] + :param headers: The headers to be allowed via CORS. + :type headers: list[str] + :param methods: The methods to be allowed via CORS. + :type methods: list[str] + :param max_age: The max age to be allowed via CORS. + :type max_age: int + :param allow_credentials: If credentials are allowed via CORS. + :type allow_credentials: bool + """ + + _validation = { + 'max_age': {'maximum': 99999, 'minimum': 0}, + } + + _attribute_map = { + 'origins': {'key': 'origins', 'type': '[str]'}, + 'headers': {'key': 'headers', 'type': '[str]'}, + 'methods': {'key': 'methods', 'type': '[str]'}, + 'max_age': {'key': 'maxAge', 'type': 'int'}, + 'allow_credentials': {'key': 'allowCredentials', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ServiceCorsConfigurationInfo, self).__init__(**kwargs) + self.origins = kwargs.get('origins', None) + self.headers = kwargs.get('headers', None) + self.methods = kwargs.get('methods', None) + self.max_age = kwargs.get('max_age', None) + self.allow_credentials = kwargs.get('allow_credentials', None) + + +class ServiceCosmosDbConfigurationInfo(Model): + """The settings for the Cosmos DB database backing the service. + + :param offer_throughput: The provisioned throughput for the backing + database. + :type offer_throughput: int + """ + + _validation = { + 'offer_throughput': {'maximum': 10000, 'minimum': 400}, + } + + _attribute_map = { + 'offer_throughput': {'key': 'offerThroughput', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ServiceCosmosDbConfigurationInfo, self).__init__(**kwargs) + self.offer_throughput = kwargs.get('offer_throughput', None) + + +class ServicesDescription(Resource): + """The description of the service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :param kind: Required. The kind of the service. Valid values are: fhir, + fhir-Stu3 and fhir-R4. Possible values include: 'fhir', 'fhir-Stu3', + 'fhir-R4' + :type kind: str or ~azure.mgmt.healthcareapis.models.Kind + :param location: Required. The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param etag: An etag associated with the resource, used for optimistic + concurrency when editing it. + :type etag: str + :param properties: The common properties of a service. + :type properties: ~azure.mgmt.healthcareapis.models.ServicesProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True, 'pattern': r'^[a-z0-9][a-z0-9-]{1,21}[a-z0-9]$'}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'Kind'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ServicesProperties'}, + } + + def __init__(self, **kwargs): + super(ServicesDescription, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class ServicesNameAvailabilityInfo(Model): + """The properties indicating whether a given service name is available. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name_available: The value which indicates whether the provided name + is available. + :vartype name_available: bool + :ivar reason: The reason for unavailability. Possible values include: + 'Invalid', 'AlreadyExists' + :vartype reason: str or + ~azure.mgmt.healthcareapis.models.ServiceNameUnavailabilityReason + :param message: The detailed reason message. + :type message: str + """ + + _validation = { + 'name_available': {'readonly': True}, + 'reason': {'readonly': True}, + } + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'ServiceNameUnavailabilityReason'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServicesNameAvailabilityInfo, self).__init__(**kwargs) + self.name_available = None + self.reason = None + self.message = kwargs.get('message', None) + + +class ServicesPatchDescription(Model): + """The description of the service. + + :param tags: Instance tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ServicesPatchDescription, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class ServicesProperties(Model): + """The properties of a service instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar provisioning_state: The provisioning state. Possible values include: + 'Deleting', 'Succeeded', 'Creating', 'Accepted', 'Verifying', 'Updating', + 'Failed', 'Canceled', 'Deprovisioned' + :vartype provisioning_state: str or + ~azure.mgmt.healthcareapis.models.ProvisioningState + :param access_policies: Required. The access policies of the service + instance. + :type access_policies: + list[~azure.mgmt.healthcareapis.models.ServiceAccessPolicyEntry] + :param cosmos_db_configuration: The settings for the Cosmos DB database + backing the service. + :type cosmos_db_configuration: + ~azure.mgmt.healthcareapis.models.ServiceCosmosDbConfigurationInfo + :param authentication_configuration: The authentication configuration for + the service instance. + :type authentication_configuration: + ~azure.mgmt.healthcareapis.models.ServiceAuthenticationConfigurationInfo + :param cors_configuration: The settings for the CORS configuration of the + service instance. + :type cors_configuration: + ~azure.mgmt.healthcareapis.models.ServiceCorsConfigurationInfo + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'access_policies': {'required': True}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'access_policies': {'key': 'accessPolicies', 'type': '[ServiceAccessPolicyEntry]'}, + 'cosmos_db_configuration': {'key': 'cosmosDbConfiguration', 'type': 'ServiceCosmosDbConfigurationInfo'}, + 'authentication_configuration': {'key': 'authenticationConfiguration', 'type': 'ServiceAuthenticationConfigurationInfo'}, + 'cors_configuration': {'key': 'corsConfiguration', 'type': 'ServiceCorsConfigurationInfo'}, + } + + def __init__(self, **kwargs): + super(ServicesProperties, self).__init__(**kwargs) + self.provisioning_state = None + self.access_policies = kwargs.get('access_policies', None) + self.cosmos_db_configuration = kwargs.get('cosmos_db_configuration', None) + self.authentication_configuration = kwargs.get('authentication_configuration', None) + self.cors_configuration = kwargs.get('cors_configuration', None) diff --git a/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_models_py3.py b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_models_py3.py new file mode 100644 index 000000000000..8070f9eec9dc --- /dev/null +++ b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_models_py3.py @@ -0,0 +1,543 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class CheckNameAvailabilityParameters(Model): + """Input values. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the service instance to check. + :type name: str + :param type: Required. The fully qualified resource type which includes + provider namespace. + :type type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, name: str, type: str, **kwargs) -> None: + super(CheckNameAvailabilityParameters, self).__init__(**kwargs) + self.name = name + self.type = type + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ErrorDetails(Model): + """Error details. + + :param error: Object containing error details. + :type error: ~azure.mgmt.healthcareapis.models.ErrorDetailsInternal + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetailsInternal'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(ErrorDetails, self).__init__(**kwargs) + self.error = error + + +class ErrorDetailsException(HttpOperationError): + """Server responsed with exception of type: 'ErrorDetails'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorDetailsException, self).__init__(deserialize, response, 'ErrorDetails', *args) + + +class ErrorDetailsInternal(Model): + """Error details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The target of the particular error. + :vartype target: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ErrorDetailsInternal, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + + +class Operation(Model): + """Service REST API operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation name: {provider}/{resource}/{read | write | action | + delete} + :vartype name: str + :ivar origin: Default value is 'user,system'. + :vartype origin: str + :param display: The information displayed about the operation. + :type display: ~azure.mgmt.healthcareapis.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + 'origin': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.origin = None + self.display = display + + +class OperationDisplay(Model): + """The object that represents the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: Service provider: Microsoft.HealthcareApis + :vartype provider: str + :ivar resource: Resource Type: Services + :vartype resource: str + :ivar operation: Name of the operation + :vartype operation: str + :ivar description: Friendly description for the operation, + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class OperationResultsDescription(Model): + """The properties indicating the operation result of an operation on a + service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the operation returned. + :vartype id: str + :ivar name: The name of the operation result. + :vartype name: str + :ivar status: The status of the operation being performed. Possible values + include: 'Canceled', 'Succeeded', 'Failed', 'Requested', 'Running' + :vartype status: str or + ~azure.mgmt.healthcareapis.models.OperationResultStatus + :ivar start_time: The time that the operation was started. + :vartype start_time: str + :param properties: Additional properties of the operation result. + :type properties: object + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(OperationResultsDescription, self).__init__(**kwargs) + self.id = None + self.name = None + self.status = None + self.start_time = None + self.properties = properties + + +class Resource(Model): + """The common properties of a service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :param kind: Required. The kind of the service. Valid values are: fhir, + fhir-Stu3 and fhir-R4. Possible values include: 'fhir', 'fhir-Stu3', + 'fhir-R4' + :type kind: str or ~azure.mgmt.healthcareapis.models.Kind + :param location: Required. The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param etag: An etag associated with the resource, used for optimistic + concurrency when editing it. + :type etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True, 'pattern': r'^[a-z0-9][a-z0-9-]{1,21}[a-z0-9]$'}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'Kind'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, *, kind, location: str, tags=None, etag: str=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.kind = kind + self.location = location + self.tags = tags + self.etag = etag + + +class ServiceAccessPolicyEntry(Model): + """An access policy entry. + + All required parameters must be populated in order to send to Azure. + + :param object_id: Required. An object ID that is allowed access to the + FHIR service. + :type object_id: str + """ + + _validation = { + 'object_id': {'required': True, 'pattern': r'^(([0-9A-Fa-f]{8}[-]?(?:[0-9A-Fa-f]{4}[-]?){3}[0-9A-Fa-f]{12}){1})+$'}, + } + + _attribute_map = { + 'object_id': {'key': 'objectId', 'type': 'str'}, + } + + def __init__(self, *, object_id: str, **kwargs) -> None: + super(ServiceAccessPolicyEntry, self).__init__(**kwargs) + self.object_id = object_id + + +class ServiceAuthenticationConfigurationInfo(Model): + """Authentication configuration information. + + :param authority: The authority url for the service + :type authority: str + :param audience: The audience url for the service + :type audience: str + :param smart_proxy_enabled: If the SMART on FHIR proxy is enabled + :type smart_proxy_enabled: bool + """ + + _attribute_map = { + 'authority': {'key': 'authority', 'type': 'str'}, + 'audience': {'key': 'audience', 'type': 'str'}, + 'smart_proxy_enabled': {'key': 'smartProxyEnabled', 'type': 'bool'}, + } + + def __init__(self, *, authority: str=None, audience: str=None, smart_proxy_enabled: bool=None, **kwargs) -> None: + super(ServiceAuthenticationConfigurationInfo, self).__init__(**kwargs) + self.authority = authority + self.audience = audience + self.smart_proxy_enabled = smart_proxy_enabled + + +class ServiceCorsConfigurationInfo(Model): + """The settings for the CORS configuration of the service instance. + + :param origins: The origins to be allowed via CORS. + :type origins: list[str] + :param headers: The headers to be allowed via CORS. + :type headers: list[str] + :param methods: The methods to be allowed via CORS. + :type methods: list[str] + :param max_age: The max age to be allowed via CORS. + :type max_age: int + :param allow_credentials: If credentials are allowed via CORS. + :type allow_credentials: bool + """ + + _validation = { + 'max_age': {'maximum': 99999, 'minimum': 0}, + } + + _attribute_map = { + 'origins': {'key': 'origins', 'type': '[str]'}, + 'headers': {'key': 'headers', 'type': '[str]'}, + 'methods': {'key': 'methods', 'type': '[str]'}, + 'max_age': {'key': 'maxAge', 'type': 'int'}, + 'allow_credentials': {'key': 'allowCredentials', 'type': 'bool'}, + } + + def __init__(self, *, origins=None, headers=None, methods=None, max_age: int=None, allow_credentials: bool=None, **kwargs) -> None: + super(ServiceCorsConfigurationInfo, self).__init__(**kwargs) + self.origins = origins + self.headers = headers + self.methods = methods + self.max_age = max_age + self.allow_credentials = allow_credentials + + +class ServiceCosmosDbConfigurationInfo(Model): + """The settings for the Cosmos DB database backing the service. + + :param offer_throughput: The provisioned throughput for the backing + database. + :type offer_throughput: int + """ + + _validation = { + 'offer_throughput': {'maximum': 10000, 'minimum': 400}, + } + + _attribute_map = { + 'offer_throughput': {'key': 'offerThroughput', 'type': 'int'}, + } + + def __init__(self, *, offer_throughput: int=None, **kwargs) -> None: + super(ServiceCosmosDbConfigurationInfo, self).__init__(**kwargs) + self.offer_throughput = offer_throughput + + +class ServicesDescription(Resource): + """The description of the service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :param kind: Required. The kind of the service. Valid values are: fhir, + fhir-Stu3 and fhir-R4. Possible values include: 'fhir', 'fhir-Stu3', + 'fhir-R4' + :type kind: str or ~azure.mgmt.healthcareapis.models.Kind + :param location: Required. The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param etag: An etag associated with the resource, used for optimistic + concurrency when editing it. + :type etag: str + :param properties: The common properties of a service. + :type properties: ~azure.mgmt.healthcareapis.models.ServicesProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True, 'pattern': r'^[a-z0-9][a-z0-9-]{1,21}[a-z0-9]$'}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'Kind'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ServicesProperties'}, + } + + def __init__(self, *, kind, location: str, tags=None, etag: str=None, properties=None, **kwargs) -> None: + super(ServicesDescription, self).__init__(kind=kind, location=location, tags=tags, etag=etag, **kwargs) + self.properties = properties + + +class ServicesNameAvailabilityInfo(Model): + """The properties indicating whether a given service name is available. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name_available: The value which indicates whether the provided name + is available. + :vartype name_available: bool + :ivar reason: The reason for unavailability. Possible values include: + 'Invalid', 'AlreadyExists' + :vartype reason: str or + ~azure.mgmt.healthcareapis.models.ServiceNameUnavailabilityReason + :param message: The detailed reason message. + :type message: str + """ + + _validation = { + 'name_available': {'readonly': True}, + 'reason': {'readonly': True}, + } + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'ServiceNameUnavailabilityReason'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, message: str=None, **kwargs) -> None: + super(ServicesNameAvailabilityInfo, self).__init__(**kwargs) + self.name_available = None + self.reason = None + self.message = message + + +class ServicesPatchDescription(Model): + """The description of the service. + + :param tags: Instance tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(ServicesPatchDescription, self).__init__(**kwargs) + self.tags = tags + + +class ServicesProperties(Model): + """The properties of a service instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar provisioning_state: The provisioning state. Possible values include: + 'Deleting', 'Succeeded', 'Creating', 'Accepted', 'Verifying', 'Updating', + 'Failed', 'Canceled', 'Deprovisioned' + :vartype provisioning_state: str or + ~azure.mgmt.healthcareapis.models.ProvisioningState + :param access_policies: Required. The access policies of the service + instance. + :type access_policies: + list[~azure.mgmt.healthcareapis.models.ServiceAccessPolicyEntry] + :param cosmos_db_configuration: The settings for the Cosmos DB database + backing the service. + :type cosmos_db_configuration: + ~azure.mgmt.healthcareapis.models.ServiceCosmosDbConfigurationInfo + :param authentication_configuration: The authentication configuration for + the service instance. + :type authentication_configuration: + ~azure.mgmt.healthcareapis.models.ServiceAuthenticationConfigurationInfo + :param cors_configuration: The settings for the CORS configuration of the + service instance. + :type cors_configuration: + ~azure.mgmt.healthcareapis.models.ServiceCorsConfigurationInfo + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'access_policies': {'required': True}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'access_policies': {'key': 'accessPolicies', 'type': '[ServiceAccessPolicyEntry]'}, + 'cosmos_db_configuration': {'key': 'cosmosDbConfiguration', 'type': 'ServiceCosmosDbConfigurationInfo'}, + 'authentication_configuration': {'key': 'authenticationConfiguration', 'type': 'ServiceAuthenticationConfigurationInfo'}, + 'cors_configuration': {'key': 'corsConfiguration', 'type': 'ServiceCorsConfigurationInfo'}, + } + + def __init__(self, *, access_policies, cosmos_db_configuration=None, authentication_configuration=None, cors_configuration=None, **kwargs) -> None: + super(ServicesProperties, self).__init__(**kwargs) + self.provisioning_state = None + self.access_policies = access_policies + self.cosmos_db_configuration = cosmos_db_configuration + self.authentication_configuration = authentication_configuration + self.cors_configuration = cors_configuration diff --git a/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_paged_models.py b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_paged_models.py new file mode 100644 index 000000000000..646be2a168cc --- /dev/null +++ b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_paged_models.py @@ -0,0 +1,40 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class ServicesDescriptionPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServicesDescription ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServicesDescription]'} + } + + def __init__(self, *args, **kwargs): + + super(ServicesDescriptionPaged, self).__init__(*args, **kwargs) +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/__init__.py b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/__init__.py new file mode 100644 index 000000000000..6bca9ee351e6 --- /dev/null +++ b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/__init__.py @@ -0,0 +1,20 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from ._services_operations import ServicesOperations +from ._operations import Operations +from ._operation_results_operations import OperationResultsOperations + +__all__ = [ + 'ServicesOperations', + 'Operations', + 'OperationResultsOperations', +] diff --git a/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_operation_results_operations.py b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_operation_results_operations.py new file mode 100644 index 000000000000..7050fa3cc564 --- /dev/null +++ b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_operation_results_operations.py @@ -0,0 +1,100 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class OperationResultsOperations(object): + """OperationResultsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API. Constant value: "2018-08-20-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-08-20-preview" + + self.config = config + + def get( + self, location_name, operation_result_id, custom_headers=None, raw=False, **operation_config): + """Get the operation result for a long running operation. + + :param location_name: The location of the operation. + :type location_name: str + :param operation_result_id: The ID of the operation result to get. + :type operation_result_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: object or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorDetailsException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'operationResultId': self._serialize.url("operation_result_id", operation_result_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=10) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + raise models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationResultsDescription', response) + if response.status_code == 404: + deserialized = self._deserialize('ErrorDetails', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.HealthcareApis/locations/{locationName}/operationresults/{operationResultId}'} diff --git a/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_operations.py b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_operations.py new file mode 100644 index 000000000000..e60e1aff1e7d --- /dev/null +++ b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_operations.py @@ -0,0 +1,100 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class Operations(object): + """Operations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API. Constant value: "2018-08-20-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-08-20-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the available Healthcare service REST API operations. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Operation + :rtype: + ~azure.mgmt.healthcareapis.models.OperationPaged[~azure.mgmt.healthcareapis.models.Operation] + :raises: + :class:`ErrorDetailsException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=10) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.HealthcareApis/operations'} diff --git a/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_services_operations.py b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_services_operations.py new file mode 100644 index 000000000000..76ee198c35a8 --- /dev/null +++ b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_services_operations.py @@ -0,0 +1,585 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class ServicesOperations(object): + """ServicesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API. Constant value: "2018-08-20-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-08-20-preview" + + self.config = config + + def get( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Get the metadata of a service instance. + + :param resource_group_name: The name of the resource group that + contains the service instance. + :type resource_group_name: str + :param resource_name: The name of the service instance. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServicesDescription or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.healthcareapis.models.ServicesDescription or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorDetailsException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=24, min_length=3) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=10) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ServicesDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}'} + + + def _create_or_update_initial( + self, resource_group_name, resource_name, service_description, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=24, min_length=3) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=10) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(service_description, 'ServicesDescription') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ServicesDescription', response) + if response.status_code == 201: + deserialized = self._deserialize('ServicesDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, resource_name, service_description, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update the metadata of a service instance. + + :param resource_group_name: The name of the resource group that + contains the service instance. + :type resource_group_name: str + :param resource_name: The name of the service instance. + :type resource_name: str + :param service_description: The service instance metadata. + :type service_description: + ~azure.mgmt.healthcareapis.models.ServicesDescription + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns ServicesDescription or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.healthcareapis.models.ServicesDescription] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.healthcareapis.models.ServicesDescription]] + :raises: + :class:`ErrorDetailsException` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + service_description=service_description, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ServicesDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}'} + + + def _update_initial( + self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): + service_patch_description = models.ServicesPatchDescription(tags=tags) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=24, min_length=3) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=10) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(service_patch_description, 'ServicesPatchDescription') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ServicesDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Update the metadata of a service instance. + + :param resource_group_name: The name of the resource group that + contains the service instance. + :type resource_group_name: str + :param resource_name: The name of the service instance. + :type resource_name: str + :param tags: Instance tags + :type tags: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns ServicesDescription or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.healthcareapis.models.ServicesDescription] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.healthcareapis.models.ServicesDescription]] + :raises: + :class:`ErrorDetailsException` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + tags=tags, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ServicesDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}'} + + + def _delete_initial( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=24, min_length=3) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=10) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202, 204]: + raise models.ErrorDetailsException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Delete a service instance. + + :param resource_group_name: The name of the resource group that + contains the service instance. + :type resource_group_name: str + :param resource_name: The name of the service instance. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ErrorDetailsException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get all the service instances in a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ServicesDescription + :rtype: + ~azure.mgmt.healthcareapis.models.ServicesDescriptionPaged[~azure.mgmt.healthcareapis.models.ServicesDescription] + :raises: + :class:`ErrorDetailsException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=10) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ServicesDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.HealthcareApis/services'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Get all the service instances in a resource group. + + :param resource_group_name: The name of the resource group that + contains the service instance. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ServicesDescription + :rtype: + ~azure.mgmt.healthcareapis.models.ServicesDescriptionPaged[~azure.mgmt.healthcareapis.models.ServicesDescription] + :raises: + :class:`ErrorDetailsException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=10) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ServicesDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services'} + + def check_name_availability( + self, name, type, custom_headers=None, raw=False, **operation_config): + """Check if a service instance name is available. + + :param name: The name of the service instance to check. + :type name: str + :param type: The fully qualified resource type which includes provider + namespace. + :type type: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServicesNameAvailabilityInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.healthcareapis.models.ServicesNameAvailabilityInfo + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorDetailsException` + """ + check_name_availability_inputs = models.CheckNameAvailabilityParameters(name=name, type=type) + + # Construct URL + url = self.check_name_availability.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=10) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(check_name_availability_inputs, 'CheckNameAvailabilityParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ServicesNameAvailabilityInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.HealthcareApis/checkNameAvailability'} diff --git a/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/version.py b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/version.py new file mode 100644 index 000000000000..e0ec669828cb --- /dev/null +++ b/sdk/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/version.py @@ -0,0 +1,13 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" + diff --git a/sdk/azure-mgmt/portal/__init__.py b/sdk/azure-mgmt/portal/__init__.py new file mode 100644 index 000000000000..dbf69957e6ed --- /dev/null +++ b/sdk/azure-mgmt/portal/__init__.py @@ -0,0 +1,19 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from ._configuration import portalClientConfiguration +from ._portal_client import portalClient +__all__ = ['portalClient', 'portalClientConfiguration'] + +from .version import VERSION + +__version__ = VERSION + diff --git a/sdk/azure-mgmt/portal/_configuration.py b/sdk/azure-mgmt/portal/_configuration.py new file mode 100644 index 000000000000..b59837032c21 --- /dev/null +++ b/sdk/azure-mgmt/portal/_configuration.py @@ -0,0 +1,49 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class portalClientConfiguration(AzureConfiguration): + """Configuration for portalClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The Azure subscription ID. This is a + GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(portalClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('portal/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/azure-mgmt/portal/_portal_client.py b/sdk/azure-mgmt/portal/_portal_client.py new file mode 100644 index 000000000000..3466eb23e2d7 --- /dev/null +++ b/sdk/azure-mgmt/portal/_portal_client.py @@ -0,0 +1,55 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import portalClientConfiguration +from .operations import Operations +from .operations import DashboardsOperations +from . import models + + +class portalClient(SDKClient): + """Allows creation and deletion of Azure Shared Dashboards. + + :ivar config: Configuration for client. + :vartype config: portalClientConfiguration + + :ivar operations: Operations operations + :vartype operations: microsoft.portal.operations.Operations + :ivar dashboards: Dashboards operations + :vartype dashboards: microsoft.portal.operations.DashboardsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The Azure subscription ID. This is a + GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = portalClientConfiguration(credentials, subscription_id, base_url) + super(portalClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2019-01-01-preview' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.dashboards = DashboardsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/azure-mgmt/portal/models/__init__.py b/sdk/azure-mgmt/portal/models/__init__.py new file mode 100644 index 000000000000..71ddcfff4471 --- /dev/null +++ b/sdk/azure-mgmt/portal/models/__init__.py @@ -0,0 +1,47 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import Dashboard + from ._models_py3 import DashboardLens + from ._models_py3 import DashboardParts + from ._models_py3 import DashboardPartsPosition + from ._models_py3 import ErrorDefinition + from ._models_py3 import ErrorResponse, ErrorResponseException + from ._models_py3 import PatchableDashboard + from ._models_py3 import ResourceProviderOperation + from ._models_py3 import ResourceProviderOperationDisplay +except (SyntaxError, ImportError): + from ._models import Dashboard + from ._models import DashboardLens + from ._models import DashboardParts + from ._models import DashboardPartsPosition + from ._models import ErrorDefinition + from ._models import ErrorResponse, ErrorResponseException + from ._models import PatchableDashboard + from ._models import ResourceProviderOperation + from ._models import ResourceProviderOperationDisplay +from ._paged_models import DashboardPaged +from ._paged_models import ResourceProviderOperationPaged + +__all__ = [ + 'Dashboard', + 'DashboardLens', + 'DashboardParts', + 'DashboardPartsPosition', + 'ErrorDefinition', + 'ErrorResponse', 'ErrorResponseException', + 'PatchableDashboard', + 'ResourceProviderOperation', + 'ResourceProviderOperationDisplay', + 'ResourceProviderOperationPaged', + 'DashboardPaged', +] diff --git a/sdk/azure-mgmt/portal/models/_models.py b/sdk/azure-mgmt/portal/models/_models.py new file mode 100644 index 000000000000..e93bb8b5f74a --- /dev/null +++ b/sdk/azure-mgmt/portal/models/_models.py @@ -0,0 +1,311 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class Dashboard(Model): + """The shared dashboard resource definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param lenses: The dashboard lenses. + :type lenses: dict[str, ~microsoft.portal.models.DashboardLens] + :param metadata: The dashboard metadata. + :type metadata: dict[str, object] + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'lenses': {'key': 'properties.lenses', 'type': '{DashboardLens}'}, + 'metadata': {'key': 'properties.metadata', 'type': '{object}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(Dashboard, self).__init__(**kwargs) + self.lenses = kwargs.get('lenses', None) + self.metadata = kwargs.get('metadata', None) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class DashboardLens(Model): + """A dashboard lens. + + All required parameters must be populated in order to send to Azure. + + :param order: Required. The lens order. + :type order: int + :param parts: Required. The dashboard parts. + :type parts: dict[str, ~microsoft.portal.models.DashboardParts] + :param metadata: The dashboard len's metadata. + :type metadata: dict[str, object] + """ + + _validation = { + 'order': {'required': True}, + 'parts': {'required': True}, + } + + _attribute_map = { + 'order': {'key': 'order', 'type': 'int'}, + 'parts': {'key': 'parts', 'type': '{DashboardParts}'}, + 'metadata': {'key': 'metadata', 'type': '{object}'}, + } + + def __init__(self, **kwargs): + super(DashboardLens, self).__init__(**kwargs) + self.order = kwargs.get('order', None) + self.parts = kwargs.get('parts', None) + self.metadata = kwargs.get('metadata', None) + + +class DashboardParts(Model): + """A dashboard part. + + All required parameters must be populated in order to send to Azure. + + :param position: Required. The dashboard's part position. + :type position: ~microsoft.portal.models.DashboardPartsPosition + :param metadata: The dashboard part's metadata. + :type metadata: dict[str, object] + """ + + _validation = { + 'position': {'required': True}, + } + + _attribute_map = { + 'position': {'key': 'position', 'type': 'DashboardPartsPosition'}, + 'metadata': {'key': 'metadata', 'type': '{object}'}, + } + + def __init__(self, **kwargs): + super(DashboardParts, self).__init__(**kwargs) + self.position = kwargs.get('position', None) + self.metadata = kwargs.get('metadata', None) + + +class DashboardPartsPosition(Model): + """The dashboard's part position. + + All required parameters must be populated in order to send to Azure. + + :param x: Required. The dashboard's part x coordinate. + :type x: float + :param y: Required. The dashboard's part y coordinate. + :type y: float + :param row_span: Required. The dashboard's part row span. + :type row_span: float + :param col_span: Required. The dashboard's part column span. + :type col_span: float + :param metadata: The dashboard part's metadata. + :type metadata: dict[str, object] + """ + + _validation = { + 'x': {'required': True}, + 'y': {'required': True}, + 'row_span': {'required': True}, + 'col_span': {'required': True}, + } + + _attribute_map = { + 'x': {'key': 'x', 'type': 'float'}, + 'y': {'key': 'y', 'type': 'float'}, + 'row_span': {'key': 'rowSpan', 'type': 'float'}, + 'col_span': {'key': 'colSpan', 'type': 'float'}, + 'metadata': {'key': 'metadata', 'type': '{object}'}, + } + + def __init__(self, **kwargs): + super(DashboardPartsPosition, self).__init__(**kwargs) + self.x = kwargs.get('x', None) + self.y = kwargs.get('y', None) + self.row_span = kwargs.get('row_span', None) + self.col_span = kwargs.get('col_span', None) + self.metadata = kwargs.get('metadata', None) + + +class ErrorDefinition(Model): + """Error definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Service specific error code which serves as the substatus for + the HTTP error code. + :vartype code: str + :ivar message: Description of the error. + :vartype message: str + :ivar details: Internal error details. + :vartype details: list[~microsoft.portal.models.ErrorDefinition] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'details': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDefinition]'}, + } + + def __init__(self, **kwargs): + super(ErrorDefinition, self).__init__(**kwargs) + self.code = None + self.message = None + self.details = None + + +class ErrorResponse(Model): + """Error response. + + :param error: The error details. + :type error: ~microsoft.portal.models.ErrorDefinition + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDefinition'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class PatchableDashboard(Model): + """The shared dashboard resource definition. + + :param lenses: The dashboard lenses. + :type lenses: dict[str, ~microsoft.portal.models.DashboardLens] + :param metadata: The dashboard metadata. + :type metadata: dict[str, object] + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'lenses': {'key': 'properties.lenses', 'type': '{DashboardLens}'}, + 'metadata': {'key': 'properties.metadata', 'type': '{object}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(PatchableDashboard, self).__init__(**kwargs) + self.lenses = kwargs.get('lenses', None) + self.metadata = kwargs.get('metadata', None) + self.tags = kwargs.get('tags', None) + + +class ResourceProviderOperation(Model): + """Supported operations of this resource provider. + + :param name: Operation name, in format of + {provider}/{resource}/{operation} + :type name: str + :param is_data_action: Indicates whether the operation applies to + data-plane. + :type is_data_action: str + :param display: Display metadata associated with the operation. + :type display: ~microsoft.portal.models.ResourceProviderOperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'ResourceProviderOperationDisplay'}, + } + + def __init__(self, **kwargs): + super(ResourceProviderOperation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.is_data_action = kwargs.get('is_data_action', None) + self.display = kwargs.get('display', None) + + +class ResourceProviderOperationDisplay(Model): + """Display metadata associated with the operation. + + :param provider: Resource provider: Microsoft Custom Providers. + :type provider: str + :param resource: Resource on which the operation is performed. + :type resource: str + :param operation: Type of operation: get, read, delete, etc. + :type operation: str + :param description: Description of this operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceProviderOperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) diff --git a/sdk/azure-mgmt/portal/models/_models_py3.py b/sdk/azure-mgmt/portal/models/_models_py3.py new file mode 100644 index 000000000000..1e4264ea7593 --- /dev/null +++ b/sdk/azure-mgmt/portal/models/_models_py3.py @@ -0,0 +1,311 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class Dashboard(Model): + """The shared dashboard resource definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param lenses: The dashboard lenses. + :type lenses: dict[str, ~microsoft.portal.models.DashboardLens] + :param metadata: The dashboard metadata. + :type metadata: dict[str, object] + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'lenses': {'key': 'properties.lenses', 'type': '{DashboardLens}'}, + 'metadata': {'key': 'properties.metadata', 'type': '{object}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, lenses=None, metadata=None, tags=None, **kwargs) -> None: + super(Dashboard, self).__init__(**kwargs) + self.lenses = lenses + self.metadata = metadata + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class DashboardLens(Model): + """A dashboard lens. + + All required parameters must be populated in order to send to Azure. + + :param order: Required. The lens order. + :type order: int + :param parts: Required. The dashboard parts. + :type parts: dict[str, ~microsoft.portal.models.DashboardParts] + :param metadata: The dashboard len's metadata. + :type metadata: dict[str, object] + """ + + _validation = { + 'order': {'required': True}, + 'parts': {'required': True}, + } + + _attribute_map = { + 'order': {'key': 'order', 'type': 'int'}, + 'parts': {'key': 'parts', 'type': '{DashboardParts}'}, + 'metadata': {'key': 'metadata', 'type': '{object}'}, + } + + def __init__(self, *, order: int, parts, metadata=None, **kwargs) -> None: + super(DashboardLens, self).__init__(**kwargs) + self.order = order + self.parts = parts + self.metadata = metadata + + +class DashboardParts(Model): + """A dashboard part. + + All required parameters must be populated in order to send to Azure. + + :param position: Required. The dashboard's part position. + :type position: ~microsoft.portal.models.DashboardPartsPosition + :param metadata: The dashboard part's metadata. + :type metadata: dict[str, object] + """ + + _validation = { + 'position': {'required': True}, + } + + _attribute_map = { + 'position': {'key': 'position', 'type': 'DashboardPartsPosition'}, + 'metadata': {'key': 'metadata', 'type': '{object}'}, + } + + def __init__(self, *, position, metadata=None, **kwargs) -> None: + super(DashboardParts, self).__init__(**kwargs) + self.position = position + self.metadata = metadata + + +class DashboardPartsPosition(Model): + """The dashboard's part position. + + All required parameters must be populated in order to send to Azure. + + :param x: Required. The dashboard's part x coordinate. + :type x: float + :param y: Required. The dashboard's part y coordinate. + :type y: float + :param row_span: Required. The dashboard's part row span. + :type row_span: float + :param col_span: Required. The dashboard's part column span. + :type col_span: float + :param metadata: The dashboard part's metadata. + :type metadata: dict[str, object] + """ + + _validation = { + 'x': {'required': True}, + 'y': {'required': True}, + 'row_span': {'required': True}, + 'col_span': {'required': True}, + } + + _attribute_map = { + 'x': {'key': 'x', 'type': 'float'}, + 'y': {'key': 'y', 'type': 'float'}, + 'row_span': {'key': 'rowSpan', 'type': 'float'}, + 'col_span': {'key': 'colSpan', 'type': 'float'}, + 'metadata': {'key': 'metadata', 'type': '{object}'}, + } + + def __init__(self, *, x: float, y: float, row_span: float, col_span: float, metadata=None, **kwargs) -> None: + super(DashboardPartsPosition, self).__init__(**kwargs) + self.x = x + self.y = y + self.row_span = row_span + self.col_span = col_span + self.metadata = metadata + + +class ErrorDefinition(Model): + """Error definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Service specific error code which serves as the substatus for + the HTTP error code. + :vartype code: str + :ivar message: Description of the error. + :vartype message: str + :ivar details: Internal error details. + :vartype details: list[~microsoft.portal.models.ErrorDefinition] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'details': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDefinition]'}, + } + + def __init__(self, **kwargs) -> None: + super(ErrorDefinition, self).__init__(**kwargs) + self.code = None + self.message = None + self.details = None + + +class ErrorResponse(Model): + """Error response. + + :param error: The error details. + :type error: ~microsoft.portal.models.ErrorDefinition + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDefinition'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class PatchableDashboard(Model): + """The shared dashboard resource definition. + + :param lenses: The dashboard lenses. + :type lenses: dict[str, ~microsoft.portal.models.DashboardLens] + :param metadata: The dashboard metadata. + :type metadata: dict[str, object] + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'lenses': {'key': 'properties.lenses', 'type': '{DashboardLens}'}, + 'metadata': {'key': 'properties.metadata', 'type': '{object}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, lenses=None, metadata=None, tags=None, **kwargs) -> None: + super(PatchableDashboard, self).__init__(**kwargs) + self.lenses = lenses + self.metadata = metadata + self.tags = tags + + +class ResourceProviderOperation(Model): + """Supported operations of this resource provider. + + :param name: Operation name, in format of + {provider}/{resource}/{operation} + :type name: str + :param is_data_action: Indicates whether the operation applies to + data-plane. + :type is_data_action: str + :param display: Display metadata associated with the operation. + :type display: ~microsoft.portal.models.ResourceProviderOperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'ResourceProviderOperationDisplay'}, + } + + def __init__(self, *, name: str=None, is_data_action: str=None, display=None, **kwargs) -> None: + super(ResourceProviderOperation, self).__init__(**kwargs) + self.name = name + self.is_data_action = is_data_action + self.display = display + + +class ResourceProviderOperationDisplay(Model): + """Display metadata associated with the operation. + + :param provider: Resource provider: Microsoft Custom Providers. + :type provider: str + :param resource: Resource on which the operation is performed. + :type resource: str + :param operation: Type of operation: get, read, delete, etc. + :type operation: str + :param description: Description of this operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(ResourceProviderOperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description diff --git a/sdk/azure-mgmt/portal/models/_paged_models.py b/sdk/azure-mgmt/portal/models/_paged_models.py new file mode 100644 index 000000000000..577567c5e578 --- /dev/null +++ b/sdk/azure-mgmt/portal/models/_paged_models.py @@ -0,0 +1,40 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class ResourceProviderOperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`ResourceProviderOperation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ResourceProviderOperation]'} + } + + def __init__(self, *args, **kwargs): + + super(ResourceProviderOperationPaged, self).__init__(*args, **kwargs) +class DashboardPaged(Paged): + """ + A paging container for iterating over a list of :class:`Dashboard ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Dashboard]'} + } + + def __init__(self, *args, **kwargs): + + super(DashboardPaged, self).__init__(*args, **kwargs) diff --git a/sdk/azure-mgmt/portal/operations/__init__.py b/sdk/azure-mgmt/portal/operations/__init__.py new file mode 100644 index 000000000000..1f68b8f377d6 --- /dev/null +++ b/sdk/azure-mgmt/portal/operations/__init__.py @@ -0,0 +1,18 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from ._operations import Operations +from ._dashboards_operations import DashboardsOperations + +__all__ = [ + 'Operations', + 'DashboardsOperations', +] diff --git a/sdk/azure-mgmt/portal/operations/_dashboards_operations.py b/sdk/azure-mgmt/portal/operations/_dashboards_operations.py new file mode 100644 index 000000000000..aefddf59ff01 --- /dev/null +++ b/sdk/azure-mgmt/portal/operations/_dashboards_operations.py @@ -0,0 +1,419 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class DashboardsOperations(object): + """DashboardsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-01-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01-preview" + + self.config = config + + def create_or_update( + self, resource_group_name, dashboard_name, dashboard, custom_headers=None, raw=False, **operation_config): + """Creates or updates a Dashboard. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dashboard_name: The name of the dashboard. + :type dashboard_name: str + :param dashboard: The parameters required to create or update a + dashboard. + :type dashboard: ~microsoft.portal.models.Dashboard + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Dashboard or ClientRawResponse if raw=true + :rtype: ~microsoft.portal.models.Dashboard or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'dashboardName': self._serialize.url("dashboard_name", dashboard_name, 'str', max_length=64, min_length=3) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(dashboard, 'Dashboard') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Dashboard', response) + if response.status_code == 201: + deserialized = self._deserialize('Dashboard', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Portal/dashboards/{dashboardName}'} + + def delete( + self, resource_group_name, dashboard_name, custom_headers=None, raw=False, **operation_config): + """Deletes the Dashboard. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dashboard_name: The name of the dashboard. + :type dashboard_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'dashboardName': self._serialize.url("dashboard_name", dashboard_name, 'str', max_length=64, min_length=3) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Portal/dashboards/{dashboardName}'} + + def get( + self, resource_group_name, dashboard_name, custom_headers=None, raw=False, **operation_config): + """Gets the Dashboard. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dashboard_name: The name of the dashboard. + :type dashboard_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Dashboard or ClientRawResponse if raw=true + :rtype: ~microsoft.portal.models.Dashboard or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'dashboardName': self._serialize.url("dashboard_name", dashboard_name, 'str', max_length=64, min_length=3) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Dashboard', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Portal/dashboards/{dashboardName}'} + + def update( + self, resource_group_name, dashboard_name, dashboard, custom_headers=None, raw=False, **operation_config): + """Updates an existing Dashboard. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dashboard_name: The name of the dashboard. + :type dashboard_name: str + :param dashboard: The updatable fields of a Dashboard. + :type dashboard: ~microsoft.portal.models.PatchableDashboard + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Dashboard or ClientRawResponse if raw=true + :rtype: ~microsoft.portal.models.Dashboard or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'dashboardName': self._serialize.url("dashboard_name", dashboard_name, 'str', max_length=64, min_length=3) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(dashboard, 'PatchableDashboard') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Dashboard', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Portal/dashboards/{dashboardName}'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets all the Dashboards within a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Dashboard + :rtype: + ~microsoft.portal.models.DashboardPaged[~microsoft.portal.models.Dashboard] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DashboardPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Portal/dashboards'} + + def list_by_subscription( + self, custom_headers=None, raw=False, **operation_config): + """Gets all the dashboards within a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Dashboard + :rtype: + ~microsoft.portal.models.DashboardPaged[~microsoft.portal.models.Dashboard] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DashboardPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Portal/dashboards'} diff --git a/sdk/azure-mgmt/portal/operations/_operations.py b/sdk/azure-mgmt/portal/operations/_operations.py new file mode 100644 index 000000000000..0d00a4380e4c --- /dev/null +++ b/sdk/azure-mgmt/portal/operations/_operations.py @@ -0,0 +1,100 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class Operations(object): + """Operations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-01-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """The Microsoft Portal operations API. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceProviderOperation + :rtype: + ~microsoft.portal.models.ResourceProviderOperationPaged[~microsoft.portal.models.ResourceProviderOperation] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceProviderOperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Portal/operations'} diff --git a/sdk/azure-mgmt/portal/version.py b/sdk/azure-mgmt/portal/version.py new file mode 100644 index 000000000000..22ee9818a3e5 --- /dev/null +++ b/sdk/azure-mgmt/portal/version.py @@ -0,0 +1,13 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "2015-08-01-preview" + diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/__init__.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/__init__.py index da4d07e1222e..bfdd6ac1c466 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/__init__.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .batch_management_client import BatchManagementClient -from .version import VERSION +from ._configuration import BatchManagementClientConfiguration +from ._batch_management_client import BatchManagementClient +__all__ = ['BatchManagementClient', 'BatchManagementClientConfiguration'] -__all__ = ['BatchManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_batch_management_client.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_batch_management_client.py new file mode 100644 index 000000000000..93830a182c23 --- /dev/null +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_batch_management_client.py @@ -0,0 +1,80 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import BatchManagementClientConfiguration +from .operations import BatchAccountOperations +from .operations import ApplicationPackageOperations +from .operations import ApplicationOperations +from .operations import LocationOperations +from .operations import Operations +from .operations import CertificateOperations +from .operations import PoolOperations +from . import models + + +class BatchManagementClient(SDKClient): + """BatchManagementClient + + :ivar config: Configuration for client. + :vartype config: BatchManagementClientConfiguration + + :ivar batch_account: BatchAccount operations + :vartype batch_account: azure.mgmt.batch.operations.BatchAccountOperations + :ivar application_package: ApplicationPackage operations + :vartype application_package: azure.mgmt.batch.operations.ApplicationPackageOperations + :ivar application: Application operations + :vartype application: azure.mgmt.batch.operations.ApplicationOperations + :ivar location: Location operations + :vartype location: azure.mgmt.batch.operations.LocationOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.batch.operations.Operations + :ivar certificate: Certificate operations + :vartype certificate: azure.mgmt.batch.operations.CertificateOperations + :ivar pool: Pool operations + :vartype pool: azure.mgmt.batch.operations.PoolOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The Azure subscription ID. This is a + GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = BatchManagementClientConfiguration(credentials, subscription_id, base_url) + super(BatchManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2019-08-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.batch_account = BatchAccountOperations( + self._client, self.config, self._serialize, self._deserialize) + self.application_package = ApplicationPackageOperations( + self._client, self.config, self._serialize, self._deserialize) + self.application = ApplicationOperations( + self._client, self.config, self._serialize, self._deserialize) + self.location = LocationOperations( + self._client, self.config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.certificate = CertificateOperations( + self._client, self.config, self._serialize, self._deserialize) + self.pool = PoolOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_configuration.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_configuration.py new file mode 100644 index 000000000000..75c9d4004f40 --- /dev/null +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_configuration.py @@ -0,0 +1,49 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class BatchManagementClientConfiguration(AzureConfiguration): + """Configuration for BatchManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The Azure subscription ID. This is a + GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(BatchManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-batch/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/batch_management_client.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/batch_management_client.py deleted file mode 100644 index d31cfa110ab2..000000000000 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/batch_management_client.py +++ /dev/null @@ -1,113 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import ServiceClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.batch_account_operations import BatchAccountOperations -from .operations.application_package_operations import ApplicationPackageOperations -from .operations.application_operations import ApplicationOperations -from .operations.location_operations import LocationOperations -from .operations.operations import Operations -from .operations.certificate_operations import CertificateOperations -from .operations.pool_operations import PoolOperations -from . import models - - -class BatchManagementClientConfiguration(AzureConfiguration): - """Configuration for BatchManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The Azure subscription ID. This is a - GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(BatchManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-batch/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class BatchManagementClient(object): - """BatchManagementClient - - :ivar config: Configuration for client. - :vartype config: BatchManagementClientConfiguration - - :ivar batch_account: BatchAccount operations - :vartype batch_account: azure.mgmt.batch.operations.BatchAccountOperations - :ivar application_package: ApplicationPackage operations - :vartype application_package: azure.mgmt.batch.operations.ApplicationPackageOperations - :ivar application: Application operations - :vartype application: azure.mgmt.batch.operations.ApplicationOperations - :ivar location: Location operations - :vartype location: azure.mgmt.batch.operations.LocationOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.batch.operations.Operations - :ivar certificate: Certificate operations - :vartype certificate: azure.mgmt.batch.operations.CertificateOperations - :ivar pool: Pool operations - :vartype pool: azure.mgmt.batch.operations.PoolOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The Azure subscription ID. This is a - GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = BatchManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2018-12-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.batch_account = BatchAccountOperations( - self._client, self.config, self._serialize, self._deserialize) - self.application_package = ApplicationPackageOperations( - self._client, self.config, self._serialize, self._deserialize) - self.application = ApplicationOperations( - self._client, self.config, self._serialize, self._deserialize) - self.location = LocationOperations( - self._client, self.config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.certificate = CertificateOperations( - self._client, self.config, self._serialize, self._deserialize) - self.pool = PoolOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/__init__.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/__init__.py index ad7c3fe653cf..0e44daa97447 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/__init__.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/__init__.py @@ -9,24 +9,32 @@ # regenerated. # -------------------------------------------------------------------------- - try: from ._models_py3 import ActivateApplicationPackageParameters + from ._models_py3 import Application + from ._models_py3 import ApplicationPackage from ._models_py3 import ApplicationPackageReference from ._models_py3 import AutoScaleRun from ._models_py3 import AutoScaleRunError from ._models_py3 import AutoScaleSettings from ._models_py3 import AutoStorageBaseProperties + from ._models_py3 import AutoStorageProperties from ._models_py3 import AutoUserSpecification + from ._models_py3 import AzureBlobFileSystemConfiguration + from ._models_py3 import AzureFileShareConfiguration + from ._models_py3 import BatchAccount from ._models_py3 import BatchAccountCreateParameters from ._models_py3 import BatchAccountKeys from ._models_py3 import BatchAccountRegenerateKeyParameters from ._models_py3 import BatchAccountUpdateParameters from ._models_py3 import BatchLocationQuota + from ._models_py3 import Certificate from ._models_py3 import CertificateBaseProperties + from ._models_py3 import CertificateCreateOrUpdateParameters from ._models_py3 import CertificateReference from ._models_py3 import CheckNameAvailabilityParameters from ._models_py3 import CheckNameAvailabilityResult + from ._models_py3 import CIFSMountConfiguration from ._models_py3 import CloudServiceConfiguration from ._models_py3 import ContainerConfiguration from ._models_py3 import ContainerRegistry @@ -40,10 +48,13 @@ from ._models_py3 import KeyVaultReference from ._models_py3 import LinuxUserConfiguration from ._models_py3 import MetadataItem + from ._models_py3 import MountConfiguration from ._models_py3 import NetworkConfiguration from ._models_py3 import NetworkSecurityGroupRule + from ._models_py3 import NFSMountConfiguration from ._models_py3 import Operation from ._models_py3 import OperationDisplay + from ._models_py3 import Pool from ._models_py3 import PoolEndpointConfiguration from ._models_py3 import ProxyResource from ._models_py3 import ResizeError @@ -57,32 +68,35 @@ from ._models_py3 import UserAccount from ._models_py3 import UserIdentity from ._models_py3 import VirtualMachineConfiguration + from ._models_py3 import VirtualMachineFamilyCoreQuota from ._models_py3 import WindowsConfiguration from ._models_py3 import WindowsUserConfiguration - from ._models_py3 import Application - from ._models_py3 import ApplicationPackage - from ._models_py3 import AutoStorageProperties - from ._models_py3 import BatchAccount - from ._models_py3 import Certificate - from ._models_py3 import CertificateCreateOrUpdateParameters - from ._models_py3 import Pool except (SyntaxError, ImportError): from ._models import ActivateApplicationPackageParameters + from ._models import Application + from ._models import ApplicationPackage from ._models import ApplicationPackageReference from ._models import AutoScaleRun from ._models import AutoScaleRunError from ._models import AutoScaleSettings from ._models import AutoStorageBaseProperties + from ._models import AutoStorageProperties from ._models import AutoUserSpecification + from ._models import AzureBlobFileSystemConfiguration + from ._models import AzureFileShareConfiguration + from ._models import BatchAccount from ._models import BatchAccountCreateParameters from ._models import BatchAccountKeys from ._models import BatchAccountRegenerateKeyParameters from ._models import BatchAccountUpdateParameters from ._models import BatchLocationQuota + from ._models import Certificate from ._models import CertificateBaseProperties + from ._models import CertificateCreateOrUpdateParameters from ._models import CertificateReference from ._models import CheckNameAvailabilityParameters from ._models import CheckNameAvailabilityResult + from ._models import CIFSMountConfiguration from ._models import CloudServiceConfiguration from ._models import ContainerConfiguration from ._models import ContainerRegistry @@ -96,10 +110,13 @@ from ._models import KeyVaultReference from ._models import LinuxUserConfiguration from ._models import MetadataItem + from ._models import MountConfiguration from ._models import NetworkConfiguration from ._models import NetworkSecurityGroupRule + from ._models import NFSMountConfiguration from ._models import Operation from ._models import OperationDisplay + from ._models import Pool from ._models import PoolEndpointConfiguration from ._models import ProxyResource from ._models import ResizeError @@ -113,61 +130,66 @@ from ._models import UserAccount from ._models import UserIdentity from ._models import VirtualMachineConfiguration + from ._models import VirtualMachineFamilyCoreQuota from ._models import WindowsConfiguration from ._models import WindowsUserConfiguration - from ._models import Application - from ._models import ApplicationPackage - from ._models import AutoStorageProperties - from ._models import BatchAccount - from ._models import Certificate - from ._models import CertificateCreateOrUpdateParameters - from ._models import Pool -from ._paged_models import BatchAccountPaged from ._paged_models import ApplicationPackagePaged from ._paged_models import ApplicationPaged -from ._paged_models import OperationPaged +from ._paged_models import BatchAccountPaged from ._paged_models import CertificatePaged +from ._paged_models import OperationPaged from ._paged_models import PoolPaged -from ._batch_management_client_enums import PoolAllocationMode -from ._batch_management_client_enums import ProvisioningState -from ._batch_management_client_enums import AccountKeyType -from ._batch_management_client_enums import PackageState -from ._batch_management_client_enums import CertificateFormat -from ._batch_management_client_enums import CertificateProvisioningState -from ._batch_management_client_enums import PoolProvisioningState -from ._batch_management_client_enums import AllocationState -from ._batch_management_client_enums import CachingType -from ._batch_management_client_enums import StorageAccountType -from ._batch_management_client_enums import ComputeNodeDeallocationOption -from ._batch_management_client_enums import InterNodeCommunicationState -from ._batch_management_client_enums import InboundEndpointProtocol -from ._batch_management_client_enums import NetworkSecurityGroupRuleAccess -from ._batch_management_client_enums import ComputeNodeFillType -from ._batch_management_client_enums import ElevationLevel -from ._batch_management_client_enums import LoginMode -from ._batch_management_client_enums import AutoUserScope -from ._batch_management_client_enums import CertificateStoreLocation -from ._batch_management_client_enums import CertificateVisibility -from ._batch_management_client_enums import NameAvailabilityReason +from ._batch_management_client_enums import ( + PoolAllocationMode, + ProvisioningState, + AccountKeyType, + PackageState, + CertificateFormat, + CertificateProvisioningState, + PoolProvisioningState, + AllocationState, + CachingType, + StorageAccountType, + ComputeNodeDeallocationOption, + InterNodeCommunicationState, + InboundEndpointProtocol, + NetworkSecurityGroupRuleAccess, + ComputeNodeFillType, + ElevationLevel, + LoginMode, + AutoUserScope, + ContainerWorkingDirectory, + CertificateStoreLocation, + CertificateVisibility, + NameAvailabilityReason, +) - -__all__=[ +__all__ = [ 'ActivateApplicationPackageParameters', + 'Application', + 'ApplicationPackage', 'ApplicationPackageReference', 'AutoScaleRun', 'AutoScaleRunError', 'AutoScaleSettings', 'AutoStorageBaseProperties', + 'AutoStorageProperties', 'AutoUserSpecification', + 'AzureBlobFileSystemConfiguration', + 'AzureFileShareConfiguration', + 'BatchAccount', 'BatchAccountCreateParameters', 'BatchAccountKeys', 'BatchAccountRegenerateKeyParameters', 'BatchAccountUpdateParameters', 'BatchLocationQuota', + 'Certificate', 'CertificateBaseProperties', + 'CertificateCreateOrUpdateParameters', 'CertificateReference', 'CheckNameAvailabilityParameters', 'CheckNameAvailabilityResult', + 'CIFSMountConfiguration', 'CloudServiceConfiguration', 'ContainerConfiguration', 'ContainerRegistry', @@ -181,10 +203,13 @@ 'KeyVaultReference', 'LinuxUserConfiguration', 'MetadataItem', + 'MountConfiguration', 'NetworkConfiguration', 'NetworkSecurityGroupRule', + 'NFSMountConfiguration', 'Operation', 'OperationDisplay', + 'Pool', 'PoolEndpointConfiguration', 'ProxyResource', 'ResizeError', @@ -198,15 +223,9 @@ 'UserAccount', 'UserIdentity', 'VirtualMachineConfiguration', + 'VirtualMachineFamilyCoreQuota', 'WindowsConfiguration', 'WindowsUserConfiguration', - 'Application', - 'ApplicationPackage', - 'AutoStorageProperties', - 'BatchAccount', - 'Certificate', - 'CertificateCreateOrUpdateParameters', - 'Pool', 'BatchAccountPaged', 'ApplicationPackagePaged', 'ApplicationPaged', @@ -231,6 +250,7 @@ 'ElevationLevel', 'LoginMode', 'AutoUserScope', + 'ContainerWorkingDirectory', 'CertificateStoreLocation', 'CertificateVisibility', 'NameAvailabilityReason', diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_batch_management_client_enums.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_batch_management_client_enums.py index da2eba944432..126edf4d370a 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_batch_management_client_enums.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_batch_management_client_enums.py @@ -12,137 +12,143 @@ from enum import Enum -class PoolAllocationMode(Enum): +class PoolAllocationMode(str, Enum): - batch_service = "BatchService" - user_subscription = "UserSubscription" + batch_service = "BatchService" #: Pools will be allocated in subscriptions owned by the Batch service. + user_subscription = "UserSubscription" #: Pools will be allocated in a subscription owned by the user. -class ProvisioningState(Enum): +class ProvisioningState(str, Enum): - invalid = "Invalid" - creating = "Creating" - deleting = "Deleting" - succeeded = "Succeeded" - failed = "Failed" - cancelled = "Cancelled" + invalid = "Invalid" #: The account is in an invalid state. + creating = "Creating" #: The account is being created. + deleting = "Deleting" #: The account is being deleted. + succeeded = "Succeeded" #: The account has been created and is ready for use. + failed = "Failed" #: The last operation for the account is failed. + cancelled = "Cancelled" #: The last operation for the account is cancelled. -class AccountKeyType(Enum): +class AccountKeyType(str, Enum): - primary = "Primary" - secondary = "Secondary" + primary = "Primary" #: The primary account key. + secondary = "Secondary" #: The secondary account key. -class PackageState(Enum): +class PackageState(str, Enum): - pending = "Pending" - active = "Active" + pending = "Pending" #: The application package has been created but has not yet been activated. + active = "Active" #: The application package is ready for use. -class CertificateFormat(Enum): +class CertificateFormat(str, Enum): - pfx = "Pfx" - cer = "Cer" + pfx = "Pfx" #: The certificate is a PFX (PKCS#12) formatted certificate or certificate chain. + cer = "Cer" #: The certificate is a base64-encoded X.509 certificate. -class CertificateProvisioningState(Enum): +class CertificateProvisioningState(str, Enum): - succeeded = "Succeeded" - deleting = "Deleting" - failed = "Failed" + succeeded = "Succeeded" #: The certificate is available for use in pools. + deleting = "Deleting" #: The user has requested that the certificate be deleted, but the delete operation has not yet completed. You may not reference the certificate when creating or updating pools. + failed = "Failed" #: The user requested that the certificate be deleted, but there are pools that still have references to the certificate, or it is still installed on one or more compute nodes. (The latter can occur if the certificate has been removed from the pool, but the node has not yet restarted. Nodes refresh their certificates only when they restart.) You may use the cancel certificate delete operation to cancel the delete, or the delete certificate operation to retry the delete. -class PoolProvisioningState(Enum): +class PoolProvisioningState(str, Enum): - succeeded = "Succeeded" - deleting = "Deleting" + succeeded = "Succeeded" #: The pool is available to run tasks subject to the availability of compute nodes. + deleting = "Deleting" #: The user has requested that the pool be deleted, but the delete operation has not yet completed. -class AllocationState(Enum): +class AllocationState(str, Enum): - steady = "Steady" - resizing = "Resizing" - stopping = "Stopping" + steady = "Steady" #: The pool is not resizing. There are no changes to the number of nodes in the pool in progress. A pool enters this state when it is created and when no operations are being performed on the pool to change the number of nodes. + resizing = "Resizing" #: The pool is resizing; that is, compute nodes are being added to or removed from the pool. + stopping = "Stopping" #: The pool was resizing, but the user has requested that the resize be stopped, but the stop request has not yet been completed. -class CachingType(Enum): +class CachingType(str, Enum): - none = "None" - read_only = "ReadOnly" - read_write = "ReadWrite" + none = "None" #: The caching mode for the disk is not enabled. + read_only = "ReadOnly" #: The caching mode for the disk is read only. + read_write = "ReadWrite" #: The caching mode for the disk is read and write. -class StorageAccountType(Enum): +class StorageAccountType(str, Enum): - standard_lrs = "Standard_LRS" - premium_lrs = "Premium_LRS" + standard_lrs = "Standard_LRS" #: The data disk should use standard locally redundant storage. + premium_lrs = "Premium_LRS" #: The data disk should use premium locally redundant storage. -class ComputeNodeDeallocationOption(Enum): +class ComputeNodeDeallocationOption(str, Enum): - requeue = "Requeue" - terminate = "Terminate" - task_completion = "TaskCompletion" - retained_data = "RetainedData" + requeue = "Requeue" #: Terminate running task processes and requeue the tasks. The tasks will run again when a node is available. Remove nodes as soon as tasks have been terminated. + terminate = "Terminate" #: Terminate running tasks. The tasks will be completed with failureInfo indicating that they were terminated, and will not run again. Remove nodes as soon as tasks have been terminated. + task_completion = "TaskCompletion" #: Allow currently running tasks to complete. Schedule no new tasks while waiting. Remove nodes when all tasks have completed. + retained_data = "RetainedData" #: Allow currently running tasks to complete, then wait for all task data retention periods to expire. Schedule no new tasks while waiting. Remove nodes when all task retention periods have expired. -class InterNodeCommunicationState(Enum): +class InterNodeCommunicationState(str, Enum): - enabled = "Enabled" - disabled = "Disabled" + enabled = "Enabled" #: Enable network communication between virtual machines. + disabled = "Disabled" #: Disable network communication between virtual machines. -class InboundEndpointProtocol(Enum): +class InboundEndpointProtocol(str, Enum): - tcp = "TCP" - udp = "UDP" + tcp = "TCP" #: Use TCP for the endpoint. + udp = "UDP" #: Use UDP for the endpoint. -class NetworkSecurityGroupRuleAccess(Enum): +class NetworkSecurityGroupRuleAccess(str, Enum): - allow = "Allow" - deny = "Deny" + allow = "Allow" #: Allow access. + deny = "Deny" #: Deny access. -class ComputeNodeFillType(Enum): +class ComputeNodeFillType(str, Enum): - spread = "Spread" - pack = "Pack" + spread = "Spread" #: Tasks should be assigned evenly across all nodes in the pool. + pack = "Pack" #: As many tasks as possible (maxTasksPerNode) should be assigned to each node in the pool before any tasks are assigned to the next node in the pool. -class ElevationLevel(Enum): +class ElevationLevel(str, Enum): - non_admin = "NonAdmin" - admin = "Admin" + non_admin = "NonAdmin" #: The user is a standard user without elevated access. + admin = "Admin" #: The user is a user with elevated access and operates with full Administrator permissions. -class LoginMode(Enum): +class LoginMode(str, Enum): - batch = "Batch" - interactive = "Interactive" + batch = "Batch" #: The LOGON32_LOGON_BATCH Win32 login mode. The batch login mode is recommended for long running parallel processes. + interactive = "Interactive" #: The LOGON32_LOGON_INTERACTIVE Win32 login mode. Some applications require having permissions associated with the interactive login mode. If this is the case for an application used in your task, then this option is recommended. -class AutoUserScope(Enum): +class AutoUserScope(str, Enum): - task = "Task" - pool = "Pool" + task = "Task" #: Specifies that the service should create a new user for the task. + pool = "Pool" #: Specifies that the task runs as the common auto user account which is created on every node in a pool. -class CertificateStoreLocation(Enum): +class ContainerWorkingDirectory(str, Enum): - current_user = "CurrentUser" - local_machine = "LocalMachine" + task_working_directory = "TaskWorkingDirectory" #: Use the standard Batch service task working directory, which will contain the Task resource files populated by Batch. + container_image_default = "ContainerImageDefault" #: Using container image defined working directory. Beware that this directory will not contain the resource files downloaded by Batch. -class CertificateVisibility(Enum): +class CertificateStoreLocation(str, Enum): - start_task = "StartTask" - task = "Task" - remote_user = "RemoteUser" + current_user = "CurrentUser" #: Certificates should be installed to the CurrentUser certificate store. + local_machine = "LocalMachine" #: Certificates should be installed to the LocalMachine certificate store. -class NameAvailabilityReason(Enum): +class CertificateVisibility(str, Enum): - invalid = "Invalid" - already_exists = "AlreadyExists" + start_task = "StartTask" #: The certificate should be visible to the user account under which the start task is run. Note that if AutoUser Scope is Pool for both the StartTask and a Task, this certificate will be visible to the Task as well. + task = "Task" #: The certificate should be visible to the user accounts under which job tasks are run. + remote_user = "RemoteUser" #: The certificate should be visible to the user accounts under which users remotely access the node. + + +class NameAvailabilityReason(str, Enum): + + invalid = "Invalid" #: The requested name is invalid. + already_exists = "AlreadyExists" #: The requested name is already in use. diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models.py index c64ee92d4c21..dab9f9a63fbc 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models.py @@ -16,7 +16,10 @@ class ActivateApplicationPackageParameters(Model): """Parameters for an activating an application package. - :param format: The format of the application package binary file. + All required parameters must be populated in order to send to Azure. + + :param format: Required. The format of the application package binary + file. :type format: str """ @@ -28,17 +31,170 @@ class ActivateApplicationPackageParameters(Model): 'format': {'key': 'format', 'type': 'str'}, } - def __init__(self, format): - super(ActivateApplicationPackageParameters, self).__init__() - self.format = format + def __init__(self, **kwargs): + super(ActivateApplicationPackageParameters, self).__init__(**kwargs) + self.format = kwargs.get('format', None) + + +class ProxyResource(Model): + """A definition of an Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProxyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.etag = None + + +class Application(ProxyResource): + """Contains information about an application in a Batch account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :param display_name: The display name for the application. + :type display_name: str + :param allow_updates: A value indicating whether packages within the + application may be overwritten using the same version string. + :type allow_updates: bool + :param default_version: The package to use if a client requests the + application but does not specify a version. This property can only be set + to the name of an existing package. + :type default_version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'allow_updates': {'key': 'properties.allowUpdates', 'type': 'bool'}, + 'default_version': {'key': 'properties.defaultVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Application, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.allow_updates = kwargs.get('allow_updates', None) + self.default_version = kwargs.get('default_version', None) + + +class ApplicationPackage(ProxyResource): + """An application package which represents a particular version of an + application. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :ivar state: The current state of the application package. Possible values + include: 'Pending', 'Active' + :vartype state: str or ~azure.mgmt.batch.models.PackageState + :ivar format: The format of the application package, if the package is + active. + :vartype format: str + :ivar storage_url: The URL for the application package in Azure Storage. + :vartype storage_url: str + :ivar storage_url_expiry: The UTC time at which the Azure Storage URL will + expire. + :vartype storage_url_expiry: datetime + :ivar last_activation_time: The time at which the package was last + activated, if the package is active. + :vartype last_activation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'state': {'readonly': True}, + 'format': {'readonly': True}, + 'storage_url': {'readonly': True}, + 'storage_url_expiry': {'readonly': True}, + 'last_activation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'PackageState'}, + 'format': {'key': 'properties.format', 'type': 'str'}, + 'storage_url': {'key': 'properties.storageUrl', 'type': 'str'}, + 'storage_url_expiry': {'key': 'properties.storageUrlExpiry', 'type': 'iso-8601'}, + 'last_activation_time': {'key': 'properties.lastActivationTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ApplicationPackage, self).__init__(**kwargs) + self.state = None + self.format = None + self.storage_url = None + self.storage_url_expiry = None + self.last_activation_time = None class ApplicationPackageReference(Model): """Link to an application package inside the batch account. - :param id: The ID of the application package to install. This must be - inside the same batch account as the pool. This can either be a reference - to a specific version or the default version if one exists. + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the application package to install. This + must be inside the same batch account as the pool. This can either be a + reference to a specific version or the default version if one exists. :type id: str :param version: The version of the application to deploy. If omitted, the default version is deployed. If this is omitted, and no default version is @@ -57,17 +213,19 @@ class ApplicationPackageReference(Model): 'version': {'key': 'version', 'type': 'str'}, } - def __init__(self, id, version=None): - super(ApplicationPackageReference, self).__init__() - self.id = id - self.version = version + def __init__(self, **kwargs): + super(ApplicationPackageReference, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.version = kwargs.get('version', None) class AutoScaleRun(Model): """The results and errors from an execution of a pool autoscale formula. - :param evaluation_time: The time at which the autoscale formula was last - evaluated. + All required parameters must be populated in order to send to Azure. + + :param evaluation_time: Required. The time at which the autoscale formula + was last evaluated. :type evaluation_time: datetime :param results: The final values of all variables used in the evaluation of the autoscale formula. Each variable value is returned in the form @@ -88,21 +246,23 @@ class AutoScaleRun(Model): 'error': {'key': 'error', 'type': 'AutoScaleRunError'}, } - def __init__(self, evaluation_time, results=None, error=None): - super(AutoScaleRun, self).__init__() - self.evaluation_time = evaluation_time - self.results = results - self.error = error + def __init__(self, **kwargs): + super(AutoScaleRun, self).__init__(**kwargs) + self.evaluation_time = kwargs.get('evaluation_time', None) + self.results = kwargs.get('results', None) + self.error = kwargs.get('error', None) class AutoScaleRunError(Model): """An error that occurred when autoscaling a pool. - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. + All required parameters must be populated in order to send to Azure. + + :param code: Required. An identifier for the error. Codes are invariant + and are intended to be consumed programmatically. :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. + :param message: Required. A message describing the error, intended to be + suitable for display in a user interface. :type message: str :param details: Additional details about the error. :type details: list[~azure.mgmt.batch.models.AutoScaleRunError] @@ -119,18 +279,20 @@ class AutoScaleRunError(Model): 'details': {'key': 'details', 'type': '[AutoScaleRunError]'}, } - def __init__(self, code, message, details=None): - super(AutoScaleRunError, self).__init__() - self.code = code - self.message = message - self.details = details + def __init__(self, **kwargs): + super(AutoScaleRunError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.details = kwargs.get('details', None) class AutoScaleSettings(Model): """AutoScale settings for the pool. - :param formula: A formula for the desired number of compute nodes in the - pool. + All required parameters must be populated in order to send to Azure. + + :param formula: Required. A formula for the desired number of compute + nodes in the pool. :type formula: str :param evaluation_interval: The time interval at which to automatically adjust the pool size according to the autoscale formula. If omitted, the @@ -147,45 +309,78 @@ class AutoScaleSettings(Model): 'evaluation_interval': {'key': 'evaluationInterval', 'type': 'duration'}, } - def __init__(self, formula, evaluation_interval=None): - super(AutoScaleSettings, self).__init__() - self.formula = formula - self.evaluation_interval = evaluation_interval + def __init__(self, **kwargs): + super(AutoScaleSettings, self).__init__(**kwargs) + self.formula = kwargs.get('formula', None) + self.evaluation_interval = kwargs.get('evaluation_interval', None) class AutoStorageBaseProperties(Model): """The properties related to the auto-storage account. - :param storage_account_id: The resource ID of the storage account to be - used for auto-storage account. + All required parameters must be populated in order to send to Azure. + + :param storage_account_id: Required. The resource ID of the storage + account to be used for auto-storage account. + :type storage_account_id: str + """ + + _validation = { + 'storage_account_id': {'required': True}, + } + + _attribute_map = { + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AutoStorageBaseProperties, self).__init__(**kwargs) + self.storage_account_id = kwargs.get('storage_account_id', None) + + +class AutoStorageProperties(AutoStorageBaseProperties): + """Contains information about the auto-storage account associated with a Batch + account. + + All required parameters must be populated in order to send to Azure. + + :param storage_account_id: Required. The resource ID of the storage + account to be used for auto-storage account. :type storage_account_id: str + :param last_key_sync: Required. The UTC time at which storage keys were + last synchronized with the Batch account. + :type last_key_sync: datetime """ _validation = { 'storage_account_id': {'required': True}, + 'last_key_sync': {'required': True}, } _attribute_map = { 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + 'last_key_sync': {'key': 'lastKeySync', 'type': 'iso-8601'}, } - def __init__(self, storage_account_id): - super(AutoStorageBaseProperties, self).__init__() - self.storage_account_id = storage_account_id + def __init__(self, **kwargs): + super(AutoStorageProperties, self).__init__(**kwargs) + self.last_key_sync = kwargs.get('last_key_sync', None) class AutoUserSpecification(Model): """Specifies the parameters for the auto user that runs a task on the Batch service. - :param scope: The scope for the auto user. The default value is task. + :param scope: The scope for the auto user. The default value is Pool. If + the pool is running Windows a value of Task should be specified if + stricter isolation between tasks is required. For example, if the task + mutates the registry in a way which could impact other tasks, or if + certificates have been specified on the pool which should not be + accessible by normal tasks but should be accessible by start tasks. Possible values include: 'Task', 'Pool' :type scope: str or ~azure.mgmt.batch.models.AutoUserScope - :param elevation_level: The elevation level of the auto user. nonAdmin - - The auto user is a standard user without elevated access. admin - The auto - user is a user with elevated access and operates with full Administrator - permissions. The default value is nonAdmin. Possible values include: - 'NonAdmin', 'Admin' + :param elevation_level: The elevation level of the auto user. The default + value is nonAdmin. Possible values include: 'NonAdmin', 'Admin' :type elevation_level: str or ~azure.mgmt.batch.models.ElevationLevel """ @@ -194,95 +389,357 @@ class AutoUserSpecification(Model): 'elevation_level': {'key': 'elevationLevel', 'type': 'ElevationLevel'}, } - def __init__(self, scope=None, elevation_level=None): - super(AutoUserSpecification, self).__init__() - self.scope = scope - self.elevation_level = elevation_level - + def __init__(self, **kwargs): + super(AutoUserSpecification, self).__init__(**kwargs) + self.scope = kwargs.get('scope', None) + self.elevation_level = kwargs.get('elevation_level', None) + + +class AzureBlobFileSystemConfiguration(Model): + """Blobfuse file system details. + + All required parameters must be populated in order to send to Azure. + + :param account_name: Required. The Azure Storage account name. + :type account_name: str + :param container_name: Required. The Azure Blob Storage container name. + :type container_name: str + :param account_key: The Azure Storage account key. This property is + mutually exclusive with sasKey and one must be specified. + :type account_key: str + :param sas_key: The Azure Storage SAS token. This property is mutually + exclusive with accountKey and one must be specified. + :type sas_key: str + :param blobfuse_options: Additional command line options to pass to the + mount command. These are 'net use' options in Windows and 'mount' options + in Linux. + :type blobfuse_options: str + :param relative_mount_path: Required. The relative path on the compute + node where the file system will be mounted. All file systems are mounted + relative to the Batch mounts directory, accessible via the + AZ_BATCH_NODE_MOUNTS_DIR environment variable. + :type relative_mount_path: str + """ -class BatchAccountCreateParameters(Model): - """Parameters supplied to the Create operation. + _validation = { + 'account_name': {'required': True}, + 'container_name': {'required': True}, + 'relative_mount_path': {'required': True}, + } - :param location: The region in which to create the account. - :type location: str - :param tags: The user-specified tags associated with the account. - :type tags: dict[str, str] - :param auto_storage: The properties related to the auto-storage account. - :type auto_storage: ~azure.mgmt.batch.models.AutoStorageBaseProperties - :param pool_allocation_mode: The allocation mode to use for creating pools - in the Batch account. The pool allocation mode also affects how clients - may authenticate to the Batch Service API. If the mode is BatchService, - clients may authenticate using access keys or Azure Active Directory. If - the mode is UserSubscription, clients must use Azure Active Directory. The - default is BatchService. Possible values include: 'BatchService', - 'UserSubscription' - :type pool_allocation_mode: str or - ~azure.mgmt.batch.models.PoolAllocationMode - :param key_vault_reference: A reference to the Azure key vault associated - with the Batch account. - :type key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'account_key': {'key': 'accountKey', 'type': 'str'}, + 'sas_key': {'key': 'sasKey', 'type': 'str'}, + 'blobfuse_options': {'key': 'blobfuseOptions', 'type': 'str'}, + 'relative_mount_path': {'key': 'relativeMountPath', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureBlobFileSystemConfiguration, self).__init__(**kwargs) + self.account_name = kwargs.get('account_name', None) + self.container_name = kwargs.get('container_name', None) + self.account_key = kwargs.get('account_key', None) + self.sas_key = kwargs.get('sas_key', None) + self.blobfuse_options = kwargs.get('blobfuse_options', None) + self.relative_mount_path = kwargs.get('relative_mount_path', None) + + +class AzureFileShareConfiguration(Model): + """Azure Files details. + + All required parameters must be populated in order to send to Azure. + + :param account_name: Required. The Azure Storage account name. + :type account_name: str + :param azure_file_url: Required. The Azure Files URL. + :type azure_file_url: str + :param account_key: Required. The Azure Storage account key. + :type account_key: str + :param relative_mount_path: Required. The relative path on the compute + node where the file system will be mounted. All file systems are mounted + relative to the Batch mounts directory, accessible via the + AZ_BATCH_NODE_MOUNTS_DIR environment variable. + :type relative_mount_path: str + :param mount_options: Specifies various mount options that can be used. + :type mount_options: str """ _validation = { - 'location': {'required': True}, + 'account_name': {'required': True}, + 'azure_file_url': {'required': True}, + 'account_key': {'required': True}, + 'relative_mount_path': {'required': True}, } _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageBaseProperties'}, - 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, - 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'azure_file_url': {'key': 'azureFileUrl', 'type': 'str'}, + 'account_key': {'key': 'accountKey', 'type': 'str'}, + 'relative_mount_path': {'key': 'relativeMountPath', 'type': 'str'}, + 'mount_options': {'key': 'mountOptions', 'type': 'str'}, } - def __init__(self, location, tags=None, auto_storage=None, pool_allocation_mode=None, key_vault_reference=None): - super(BatchAccountCreateParameters, self).__init__() - self.location = location - self.tags = tags - self.auto_storage = auto_storage - self.pool_allocation_mode = pool_allocation_mode - self.key_vault_reference = key_vault_reference + def __init__(self, **kwargs): + super(AzureFileShareConfiguration, self).__init__(**kwargs) + self.account_name = kwargs.get('account_name', None) + self.azure_file_url = kwargs.get('azure_file_url', None) + self.account_key = kwargs.get('account_key', None) + self.relative_mount_path = kwargs.get('relative_mount_path', None) + self.mount_options = kwargs.get('mount_options', None) -class BatchAccountKeys(Model): - """A set of Azure Batch account keys. +class Resource(Model): + """A definition of an Azure resource. Variables are only populated by the server, and will be ignored when sending a request. - :ivar account_name: The Batch account name. - :vartype account_name: str - :ivar primary: The primary key associated with the account. - :vartype primary: str - :ivar secondary: The secondary key associated with the account. - :vartype secondary: str + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar location: The location of the resource. + :vartype location: str + :ivar tags: The tags of the resource. + :vartype tags: dict[str, str] """ _validation = { - 'account_name': {'readonly': True}, - 'primary': {'readonly': True}, - 'secondary': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'readonly': True}, } _attribute_map = { - 'account_name': {'key': 'accountName', 'type': 'str'}, - 'primary': {'key': 'primary', 'type': 'str'}, - 'secondary': {'key': 'secondary', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self): - super(BatchAccountKeys, self).__init__() - self.account_name = None - self.primary = None - self.secondary = None + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.tags = None -class BatchAccountRegenerateKeyParameters(Model): - """Parameters supplied to the RegenerateKey operation. +class BatchAccount(Resource): + """Contains information about an Azure Batch account. - :param key_name: The type of account key to regenerate. Possible values - include: 'Primary', 'Secondary' - :type key_name: str or ~azure.mgmt.batch.models.AccountKeyType + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar location: The location of the resource. + :vartype location: str + :ivar tags: The tags of the resource. + :vartype tags: dict[str, str] + :ivar account_endpoint: The account endpoint used to interact with the + Batch service. + :vartype account_endpoint: str + :ivar provisioning_state: The provisioned state of the resource. Possible + values include: 'Invalid', 'Creating', 'Deleting', 'Succeeded', 'Failed', + 'Cancelled' + :vartype provisioning_state: str or + ~azure.mgmt.batch.models.ProvisioningState + :ivar pool_allocation_mode: The allocation mode to use for creating pools + in the Batch account. Possible values include: 'BatchService', + 'UserSubscription' + :vartype pool_allocation_mode: str or + ~azure.mgmt.batch.models.PoolAllocationMode + :ivar key_vault_reference: A reference to the Azure key vault associated + with the Batch account. + :vartype key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference + :ivar auto_storage: The properties and status of any auto-storage account + associated with the Batch account. + :vartype auto_storage: ~azure.mgmt.batch.models.AutoStorageProperties + :ivar dedicated_core_quota: The dedicated core quota for the Batch + account. For accounts with PoolAllocationMode set to UserSubscription, + quota is managed on the subscription so this value is not returned. + :vartype dedicated_core_quota: int + :ivar low_priority_core_quota: The low-priority core quota for the Batch + account. For accounts with PoolAllocationMode set to UserSubscription, + quota is managed on the subscription so this value is not returned. + :vartype low_priority_core_quota: int + :ivar dedicated_core_quota_per_vm_family: A list of the dedicated core + quota per Virtual Machine family for the Batch account. For accounts with + PoolAllocationMode set to UserSubscription, quota is managed on the + subscription so this value is not returned. + :vartype dedicated_core_quota_per_vm_family: + list[~azure.mgmt.batch.models.VirtualMachineFamilyCoreQuota] + :ivar dedicated_core_quota_per_vm_family_enforced: A value indicating + whether the core quota for the Batch Account is enforced per Virtual + Machine family or not. Batch is transitioning its core quota system for + dedicated cores to be enforced per Virtual Machine family. During this + transitional phase, the dedicated core quota per Virtual Machine family + may not yet be enforced. If this flag is false, dedicated core quota is + enforced via the old dedicatedCoreQuota property on the account and does + not consider Virtual Machine family. If this flag is true, dedicated core + quota is enforced via the dedicatedCoreQuotaPerVMFamily property on the + account, and the old dedicatedCoreQuota does not apply. + :vartype dedicated_core_quota_per_vm_family_enforced: bool + :ivar pool_quota: The pool quota for the Batch account. + :vartype pool_quota: int + :ivar active_job_and_job_schedule_quota: The active job and job schedule + quota for the Batch account. + :vartype active_job_and_job_schedule_quota: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'readonly': True}, + 'account_endpoint': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'pool_allocation_mode': {'readonly': True}, + 'key_vault_reference': {'readonly': True}, + 'auto_storage': {'readonly': True}, + 'dedicated_core_quota': {'readonly': True}, + 'low_priority_core_quota': {'readonly': True}, + 'dedicated_core_quota_per_vm_family': {'readonly': True}, + 'dedicated_core_quota_per_vm_family_enforced': {'readonly': True}, + 'pool_quota': {'readonly': True}, + 'active_job_and_job_schedule_quota': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'account_endpoint': {'key': 'properties.accountEndpoint', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, + 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, + 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageProperties'}, + 'dedicated_core_quota': {'key': 'properties.dedicatedCoreQuota', 'type': 'int'}, + 'low_priority_core_quota': {'key': 'properties.lowPriorityCoreQuota', 'type': 'int'}, + 'dedicated_core_quota_per_vm_family': {'key': 'properties.dedicatedCoreQuotaPerVMFamily', 'type': '[VirtualMachineFamilyCoreQuota]'}, + 'dedicated_core_quota_per_vm_family_enforced': {'key': 'properties.dedicatedCoreQuotaPerVMFamilyEnforced', 'type': 'bool'}, + 'pool_quota': {'key': 'properties.poolQuota', 'type': 'int'}, + 'active_job_and_job_schedule_quota': {'key': 'properties.activeJobAndJobScheduleQuota', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(BatchAccount, self).__init__(**kwargs) + self.account_endpoint = None + self.provisioning_state = None + self.pool_allocation_mode = None + self.key_vault_reference = None + self.auto_storage = None + self.dedicated_core_quota = None + self.low_priority_core_quota = None + self.dedicated_core_quota_per_vm_family = None + self.dedicated_core_quota_per_vm_family_enforced = None + self.pool_quota = None + self.active_job_and_job_schedule_quota = None + + +class BatchAccountCreateParameters(Model): + """Parameters supplied to the Create operation. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The region in which to create the account. + :type location: str + :param tags: The user-specified tags associated with the account. + :type tags: dict[str, str] + :param auto_storage: The properties related to the auto-storage account. + :type auto_storage: ~azure.mgmt.batch.models.AutoStorageBaseProperties + :param pool_allocation_mode: The allocation mode to use for creating pools + in the Batch account. The pool allocation mode also affects how clients + may authenticate to the Batch Service API. If the mode is BatchService, + clients may authenticate using access keys or Azure Active Directory. If + the mode is UserSubscription, clients must use Azure Active Directory. The + default is BatchService. Possible values include: 'BatchService', + 'UserSubscription' + :type pool_allocation_mode: str or + ~azure.mgmt.batch.models.PoolAllocationMode + :param key_vault_reference: A reference to the Azure key vault associated + with the Batch account. + :type key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference + """ + + _validation = { + 'location': {'required': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageBaseProperties'}, + 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, + 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, + } + + def __init__(self, **kwargs): + super(BatchAccountCreateParameters, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.auto_storage = kwargs.get('auto_storage', None) + self.pool_allocation_mode = kwargs.get('pool_allocation_mode', None) + self.key_vault_reference = kwargs.get('key_vault_reference', None) + + +class BatchAccountKeys(Model): + """A set of Azure Batch account keys. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar account_name: The Batch account name. + :vartype account_name: str + :ivar primary: The primary key associated with the account. + :vartype primary: str + :ivar secondary: The secondary key associated with the account. + :vartype secondary: str + """ + + _validation = { + 'account_name': {'readonly': True}, + 'primary': {'readonly': True}, + 'secondary': {'readonly': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'primary': {'key': 'primary', 'type': 'str'}, + 'secondary': {'key': 'secondary', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BatchAccountKeys, self).__init__(**kwargs) + self.account_name = None + self.primary = None + self.secondary = None + + +class BatchAccountRegenerateKeyParameters(Model): + """Parameters supplied to the RegenerateKey operation. + + All required parameters must be populated in order to send to Azure. + + :param key_name: Required. The type of account key to regenerate. Possible + values include: 'Primary', 'Secondary' + :type key_name: str or ~azure.mgmt.batch.models.AccountKeyType """ _validation = { @@ -293,9 +750,9 @@ class BatchAccountRegenerateKeyParameters(Model): 'key_name': {'key': 'keyName', 'type': 'AccountKeyType'}, } - def __init__(self, key_name): - super(BatchAccountRegenerateKeyParameters, self).__init__() - self.key_name = key_name + def __init__(self, **kwargs): + super(BatchAccountRegenerateKeyParameters, self).__init__(**kwargs) + self.key_name = kwargs.get('key_name', None) class BatchAccountUpdateParameters(Model): @@ -312,10 +769,10 @@ class BatchAccountUpdateParameters(Model): 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageBaseProperties'}, } - def __init__(self, tags=None, auto_storage=None): - super(BatchAccountUpdateParameters, self).__init__() - self.tags = tags - self.auto_storage = auto_storage + def __init__(self, **kwargs): + super(BatchAccountUpdateParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.auto_storage = kwargs.get('auto_storage', None) class BatchLocationQuota(Model): @@ -337,11 +794,100 @@ class BatchLocationQuota(Model): 'account_quota': {'key': 'accountQuota', 'type': 'int'}, } - def __init__(self): - super(BatchLocationQuota, self).__init__() + def __init__(self, **kwargs): + super(BatchLocationQuota, self).__init__(**kwargs) self.account_quota = None +class Certificate(ProxyResource): + """Contains information about a certificate. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :param thumbprint_algorithm: The algorithm of the certificate thumbprint. + This must match the first portion of the certificate name. Currently + required to be 'SHA1'. + :type thumbprint_algorithm: str + :param thumbprint: The thumbprint of the certificate. This must match the + thumbprint from the name. + :type thumbprint: str + :param format: The format of the certificate - either Pfx or Cer. If + omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' + :type format: str or ~azure.mgmt.batch.models.CertificateFormat + :ivar provisioning_state: The provisioned state of the resource. Possible + values include: 'Succeeded', 'Deleting', 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.batch.models.CertificateProvisioningState + :ivar provisioning_state_transition_time: The time at which the + certificate entered its current state. + :vartype provisioning_state_transition_time: datetime + :ivar previous_provisioning_state: The previous provisioned state of the + resource. Possible values include: 'Succeeded', 'Deleting', 'Failed' + :vartype previous_provisioning_state: str or + ~azure.mgmt.batch.models.CertificateProvisioningState + :ivar previous_provisioning_state_transition_time: The time at which the + certificate entered its previous state. + :vartype previous_provisioning_state_transition_time: datetime + :ivar public_data: The public key of the certificate. + :vartype public_data: str + :ivar delete_certificate_error: The error which occurred while deleting + the certificate. This is only returned when the certificate + provisioningState is 'Failed'. + :vartype delete_certificate_error: + ~azure.mgmt.batch.models.DeleteCertificateError + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'provisioning_state_transition_time': {'readonly': True}, + 'previous_provisioning_state': {'readonly': True}, + 'previous_provisioning_state_transition_time': {'readonly': True}, + 'public_data': {'readonly': True}, + 'delete_certificate_error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'CertificateProvisioningState'}, + 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, + 'previous_provisioning_state': {'key': 'properties.previousProvisioningState', 'type': 'CertificateProvisioningState'}, + 'previous_provisioning_state_transition_time': {'key': 'properties.previousProvisioningStateTransitionTime', 'type': 'iso-8601'}, + 'public_data': {'key': 'properties.publicData', 'type': 'str'}, + 'delete_certificate_error': {'key': 'properties.deleteCertificateError', 'type': 'DeleteCertificateError'}, + } + + def __init__(self, **kwargs): + super(Certificate, self).__init__(**kwargs) + self.thumbprint_algorithm = kwargs.get('thumbprint_algorithm', None) + self.thumbprint = kwargs.get('thumbprint', None) + self.format = kwargs.get('format', None) + self.provisioning_state = None + self.provisioning_state_transition_time = None + self.previous_provisioning_state = None + self.previous_provisioning_state_transition_time = None + self.public_data = None + self.delete_certificate_error = None + + class CertificateBaseProperties(Model): """CertificateBaseProperties. @@ -363,29 +909,95 @@ class CertificateBaseProperties(Model): 'format': {'key': 'format', 'type': 'CertificateFormat'}, } - def __init__(self, thumbprint_algorithm=None, thumbprint=None, format=None): - super(CertificateBaseProperties, self).__init__() - self.thumbprint_algorithm = thumbprint_algorithm - self.thumbprint = thumbprint - self.format = format + def __init__(self, **kwargs): + super(CertificateBaseProperties, self).__init__(**kwargs) + self.thumbprint_algorithm = kwargs.get('thumbprint_algorithm', None) + self.thumbprint = kwargs.get('thumbprint', None) + self.format = kwargs.get('format', None) -class CertificateReference(Model): - """A reference to a certificate to be installed on compute nodes in a pool. - This must exist inside the same account as the pool. +class CertificateCreateOrUpdateParameters(ProxyResource): + """Contains information about a certificate. - :param id: The fully qualified ID of the certificate to install on the - pool. This must be inside the same batch account as the pool. - :type id: str - :param store_location: The location of the certificate store on the - compute node into which to install the certificate. The default value is - currentUser. This property is applicable only for pools configured with - Windows nodes (that is, created with cloudServiceConfiguration, or with - virtualMachineConfiguration using a Windows image reference). For Linux - compute nodes, the certificates are stored in a directory inside the task - working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is - supplied to the task to query for this location. For certificates with - visibility of 'remoteUser', a 'certs' directory is created in the user's + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :param thumbprint_algorithm: The algorithm of the certificate thumbprint. + This must match the first portion of the certificate name. Currently + required to be 'SHA1'. + :type thumbprint_algorithm: str + :param thumbprint: The thumbprint of the certificate. This must match the + thumbprint from the name. + :type thumbprint: str + :param format: The format of the certificate - either Pfx or Cer. If + omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' + :type format: str or ~azure.mgmt.batch.models.CertificateFormat + :param data: Required. The base64-encoded contents of the certificate. The + maximum size is 10KB. + :type data: str + :param password: The password to access the certificate's private key. + This is required if the certificate format is pfx and must be omitted if + the certificate format is cer. + :type password: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, + 'data': {'key': 'properties.data', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateCreateOrUpdateParameters, self).__init__(**kwargs) + self.thumbprint_algorithm = kwargs.get('thumbprint_algorithm', None) + self.thumbprint = kwargs.get('thumbprint', None) + self.format = kwargs.get('format', None) + self.data = kwargs.get('data', None) + self.password = kwargs.get('password', None) + + +class CertificateReference(Model): + """A reference to a certificate to be installed on compute nodes in a pool. + This must exist inside the same account as the pool. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The fully qualified ID of the certificate to install + on the pool. This must be inside the same batch account as the pool. + :type id: str + :param store_location: The location of the certificate store on the + compute node into which to install the certificate. The default value is + currentUser. This property is applicable only for pools configured with + Windows nodes (that is, created with cloudServiceConfiguration, or with + virtualMachineConfiguration using a Windows image reference). For Linux + compute nodes, the certificates are stored in a directory inside the task + working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is + supplied to the task to query for this location. For certificates with + visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory. Possible values include: 'CurrentUser', 'LocalMachine' :type store_location: str or @@ -415,12 +1027,12 @@ class CertificateReference(Model): 'visibility': {'key': 'visibility', 'type': '[CertificateVisibility]'}, } - def __init__(self, id, store_location=None, store_name=None, visibility=None): - super(CertificateReference, self).__init__() - self.id = id - self.store_location = store_location - self.store_name = store_name - self.visibility = visibility + def __init__(self, **kwargs): + super(CertificateReference, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.store_location = kwargs.get('store_location', None) + self.store_name = kwargs.get('store_name', None) + self.visibility = kwargs.get('visibility', None) class CheckNameAvailabilityParameters(Model): @@ -429,9 +1041,11 @@ class CheckNameAvailabilityParameters(Model): Variables are only populated by the server, and will be ignored when sending a request. - :param name: The name to check for availability + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name to check for availability :type name: str - :ivar type: The resource type. Must be set to + :ivar type: Required. The resource type. Must be set to Microsoft.Batch/batchAccounts. Default value: "Microsoft.Batch/batchAccounts" . :vartype type: str @@ -449,9 +1063,9 @@ class CheckNameAvailabilityParameters(Model): type = "Microsoft.Batch/batchAccounts" - def __init__(self, name): - super(CheckNameAvailabilityParameters, self).__init__() - self.name = name + def __init__(self, **kwargs): + super(CheckNameAvailabilityParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) class CheckNameAvailabilityResult(Model): @@ -485,23 +1099,130 @@ class CheckNameAvailabilityResult(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self): - super(CheckNameAvailabilityResult, self).__init__() + def __init__(self, **kwargs): + super(CheckNameAvailabilityResult, self).__init__(**kwargs) self.name_available = None self.reason = None self.message = None +class CIFSMountConfiguration(Model): + """CIFS file system details. + + All required parameters must be populated in order to send to Azure. + + :param username: Required. The user to use for authentication against the + CIFS file system. + :type username: str + :param source: Required. The URI of the file system to mount. + :type source: str + :param relative_mount_path: Required. The relative path on the compute + node where the file system will be mounted. All file systems are mounted + relative to the Batch mounts directory, accessible via the + AZ_BATCH_NODE_MOUNTS_DIR environment variable. + :type relative_mount_path: str + :param mount_options: Specifies various mount options that can be used. + :type mount_options: str + :param password: Required. The password to authenticate with. + :type password: str + """ + + _validation = { + 'username': {'required': True}, + 'source': {'required': True}, + 'relative_mount_path': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'username': {'key': 'username', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'relative_mount_path': {'key': 'relativeMountPath', 'type': 'str'}, + 'mount_options': {'key': 'mountOptions', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CIFSMountConfiguration, self).__init__(**kwargs) + self.username = kwargs.get('username', None) + self.source = kwargs.get('source', None) + self.relative_mount_path = kwargs.get('relative_mount_path', None) + self.mount_options = kwargs.get('mount_options', None) + self.password = kwargs.get('password', None) + + +class CloudError(Model): + """An error response from the Batch service. + + :param error: + :type error: ~azure.mgmt.batch.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, **kwargs): + super(CloudError, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class CloudErrorBody(Model): + """An error response from the Batch service. + + :param code: An identifier for the error. Codes are invariant and are + intended to be consumed programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable + for display in a user interface. + :type message: str + :param target: The target of the particular error. For example, the name + of the property in error. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.batch.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, **kwargs): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + + class CloudServiceConfiguration(Model): """The configuration for nodes in a pool based on the Azure Cloud Services platform. - :param os_family: The Azure Guest OS family to be installed on the virtual - machines in the pool. Possible values are: 2 - OS Family 2, equivalent to - Windows Server 2008 R2 SP1. 3 - OS Family 3, equivalent to Windows Server - 2012. 4 - OS Family 4, equivalent to Windows Server 2012 R2. 5 - OS Family - 5, equivalent to Windows Server 2016. For more information, see Azure - Guest OS Releases + All required parameters must be populated in order to send to Azure. + + :param os_family: Required. The Azure Guest OS family to be installed on + the virtual machines in the pool. Possible values are: 2 - OS Family 2, + equivalent to Windows Server 2008 R2 SP1. 3 - OS Family 3, equivalent to + Windows Server 2012. 4 - OS Family 4, equivalent to Windows Server 2012 + R2. 5 - OS Family 5, equivalent to Windows Server 2016. 6 - OS Family 6, + equivalent to Windows Server 2019. For more information, see Azure Guest + OS Releases (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). :type os_family: str :param os_version: The Azure Guest OS version to be installed on the @@ -519,10 +1240,10 @@ class CloudServiceConfiguration(Model): 'os_version': {'key': 'osVersion', 'type': 'str'}, } - def __init__(self, os_family, os_version=None): - super(CloudServiceConfiguration, self).__init__() - self.os_family = os_family - self.os_version = os_version + def __init__(self, **kwargs): + super(CloudServiceConfiguration, self).__init__(**kwargs) + self.os_family = kwargs.get('os_family', None) + self.os_version = kwargs.get('os_version', None) class ContainerConfiguration(Model): @@ -531,7 +1252,9 @@ class ContainerConfiguration(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar type: The container technology to be used. Default value: + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. The container technology to be used. Default value: "DockerCompatible" . :vartype type: str :param container_image_names: The collection of container image names. @@ -559,21 +1282,23 @@ class ContainerConfiguration(Model): type = "DockerCompatible" - def __init__(self, container_image_names=None, container_registries=None): - super(ContainerConfiguration, self).__init__() - self.container_image_names = container_image_names - self.container_registries = container_registries + def __init__(self, **kwargs): + super(ContainerConfiguration, self).__init__(**kwargs) + self.container_image_names = kwargs.get('container_image_names', None) + self.container_registries = kwargs.get('container_registries', None) class ContainerRegistry(Model): """A private container registry. + All required parameters must be populated in order to send to Azure. + :param registry_server: The registry URL. If omitted, the default is "docker.io". :type registry_server: str - :param user_name: The user name to log into the registry server. + :param user_name: Required. The user name to log into the registry server. :type user_name: str - :param password: The password to log into the registry server. + :param password: Required. The password to log into the registry server. :type password: str """ @@ -588,20 +1313,23 @@ class ContainerRegistry(Model): 'password': {'key': 'password', 'type': 'str'}, } - def __init__(self, user_name, password, registry_server=None): - super(ContainerRegistry, self).__init__() - self.registry_server = registry_server - self.user_name = user_name - self.password = password + def __init__(self, **kwargs): + super(ContainerRegistry, self).__init__(**kwargs) + self.registry_server = kwargs.get('registry_server', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) class DataDisk(Model): - """Data Disk settings which will be used by the data disks associated to - Compute Nodes in the pool. + """Settings which will be used by the data disks associated to Compute Nodes + in the Pool. When using attached data disks, you need to mount and format + the disks from within a VM to use them. - :param lun: The logical unit number. The lun is used to uniquely identify - each data disk. If attaching multiple disks, each should have a distinct - lun. + All required parameters must be populated in order to send to Azure. + + :param lun: Required. The logical unit number. The lun is used to uniquely + identify each data disk. If attaching multiple disks, each should have a + distinct lun. :type lun: int :param caching: The type of caching to be enabled for the data disks. Values are: @@ -613,8 +1341,8 @@ class DataDisk(Model): https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. Possible values include: 'None', 'ReadOnly', 'ReadWrite' :type caching: str or ~azure.mgmt.batch.models.CachingType - :param disk_size_gb: The initial disk size in GB when creating new data - disk. + :param disk_size_gb: Required. The initial disk size in GB when creating + new data disk. :type disk_size_gb: int :param storage_account_type: The storage account type to be used for the data disk. If omitted, the default is "Standard_LRS". Values are: @@ -638,22 +1366,24 @@ class DataDisk(Model): 'storage_account_type': {'key': 'storageAccountType', 'type': 'StorageAccountType'}, } - def __init__(self, lun, disk_size_gb, caching=None, storage_account_type=None): - super(DataDisk, self).__init__() - self.lun = lun - self.caching = caching - self.disk_size_gb = disk_size_gb - self.storage_account_type = storage_account_type + def __init__(self, **kwargs): + super(DataDisk, self).__init__(**kwargs) + self.lun = kwargs.get('lun', None) + self.caching = kwargs.get('caching', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.storage_account_type = kwargs.get('storage_account_type', None) class DeleteCertificateError(Model): """An error response from the Batch service. - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. + All required parameters must be populated in order to send to Azure. + + :param code: Required. An identifier for the error. Codes are invariant + and are intended to be consumed programmatically. :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. + :param message: Required. A message describing the error, intended to be + suitable for display in a user interface. :type message: str :param target: The target of the particular error. For example, the name of the property in error. @@ -674,12 +1404,12 @@ class DeleteCertificateError(Model): 'details': {'key': 'details', 'type': '[DeleteCertificateError]'}, } - def __init__(self, code, message, target=None, details=None): - super(DeleteCertificateError, self).__init__() - self.code = code - self.message = message - self.target = target - self.details = details + def __init__(self, **kwargs): + super(DeleteCertificateError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) class DeploymentConfiguration(Model): @@ -704,16 +1434,18 @@ class DeploymentConfiguration(Model): 'virtual_machine_configuration': {'key': 'virtualMachineConfiguration', 'type': 'VirtualMachineConfiguration'}, } - def __init__(self, cloud_service_configuration=None, virtual_machine_configuration=None): - super(DeploymentConfiguration, self).__init__() - self.cloud_service_configuration = cloud_service_configuration - self.virtual_machine_configuration = virtual_machine_configuration + def __init__(self, **kwargs): + super(DeploymentConfiguration, self).__init__(**kwargs) + self.cloud_service_configuration = kwargs.get('cloud_service_configuration', None) + self.virtual_machine_configuration = kwargs.get('virtual_machine_configuration', None) class EnvironmentSetting(Model): """An environment variable to be set on a task process. - :param name: The name of the environment variable. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the environment variable. :type name: str :param value: The value of the environment variable. :type value: str @@ -728,10 +1460,10 @@ class EnvironmentSetting(Model): 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, name, value=None): - super(EnvironmentSetting, self).__init__() - self.name = name - self.value = value + def __init__(self, **kwargs): + super(EnvironmentSetting, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) class FixedScaleSettings(Model): @@ -767,12 +1499,12 @@ class FixedScaleSettings(Model): 'node_deallocation_option': {'key': 'nodeDeallocationOption', 'type': 'ComputeNodeDeallocationOption'}, } - def __init__(self, resize_timeout=None, target_dedicated_nodes=None, target_low_priority_nodes=None, node_deallocation_option=None): - super(FixedScaleSettings, self).__init__() - self.resize_timeout = resize_timeout - self.target_dedicated_nodes = target_dedicated_nodes - self.target_low_priority_nodes = target_low_priority_nodes - self.node_deallocation_option = node_deallocation_option + def __init__(self, **kwargs): + super(FixedScaleSettings, self).__init__(**kwargs) + self.resize_timeout = kwargs.get('resize_timeout', None) + self.target_dedicated_nodes = kwargs.get('target_dedicated_nodes', None) + self.target_low_priority_nodes = kwargs.get('target_low_priority_nodes', None) + self.node_deallocation_option = kwargs.get('node_deallocation_option', None) class ImageReference(Model): @@ -788,22 +1520,25 @@ class ImageReference(Model): image. For example, UbuntuServer or WindowsServer. :type offer: str :param sku: The SKU of the Azure Virtual Machines Marketplace image. For - example, 14.04.0-LTS or 2012-R2-Datacenter. + example, 18.04-LTS or 2019-Datacenter. :type sku: str :param version: The version of the Azure Virtual Machines Marketplace image. A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'. :type version: str - :param id: The ARM resource identifier of the virtual machine image. - Computes nodes of the pool will be created using this custom image. This - is of the form - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}. - This property is mutually exclusive with other properties. The virtual - machine image must be in the same region and subscription as the Azure - Batch account. For information about the firewall settings for Batch node - agent to communicate with Batch service see - https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration - . + :param id: The ARM resource identifier of the Virtual Machine Image or + Shared Image Gallery Image. Compute Nodes of the Pool will be created + using this Image Id. This is of either the form + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} + for Virtual Machine Image or + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{versionId} + for SIG image. This property is mutually exclusive with other properties. + For Virtual Machine Image it must be in the same region and subscription + as the Azure Batch account. For SIG image it must have replicas in the + same region as the Azure Batch account. For information about the firewall + settings for the Batch node agent to communicate with the Batch service + see + https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. :type id: str """ @@ -815,43 +1550,45 @@ class ImageReference(Model): 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, publisher=None, offer=None, sku=None, version=None, id=None): - super(ImageReference, self).__init__() - self.publisher = publisher - self.offer = offer - self.sku = sku - self.version = version - self.id = id + def __init__(self, **kwargs): + super(ImageReference, self).__init__(**kwargs) + self.publisher = kwargs.get('publisher', None) + self.offer = kwargs.get('offer', None) + self.sku = kwargs.get('sku', None) + self.version = kwargs.get('version', None) + self.id = kwargs.get('id', None) class InboundNatPool(Model): """A inbound NAT pool that can be used to address specific ports on compute nodes in a Batch pool externally. - :param name: The name of the endpoint. The name must be unique within a - Batch pool, can contain letters, numbers, underscores, periods, and - hyphens. Names must start with a letter or number, must end with a letter, - number, or underscore, and cannot exceed 77 characters. If any invalid - values are provided the request fails with HTTP status code 400. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the endpoint. The name must be unique + within a Batch pool, can contain letters, numbers, underscores, periods, + and hyphens. Names must start with a letter or number, must end with a + letter, number, or underscore, and cannot exceed 77 characters. If any + invalid values are provided the request fails with HTTP status code 400. :type name: str - :param protocol: The protocol of the endpoint. Possible values include: - 'TCP', 'UDP' + :param protocol: Required. The protocol of the endpoint. Possible values + include: 'TCP', 'UDP' :type protocol: str or ~azure.mgmt.batch.models.InboundEndpointProtocol - :param backend_port: The port number on the compute node. This must be - unique within a Batch pool. Acceptable values are between 1 and 65535 - except for 22, 3389, 29876 and 29877 as these are reserved. If any + :param backend_port: Required. The port number on the compute node. This + must be unique within a Batch pool. Acceptable values are between 1 and + 65535 except for 22, 3389, 29876 and 29877 as these are reserved. If any reserved values are provided the request fails with HTTP status code 400. :type backend_port: int - :param frontend_port_range_start: The first port number in the range of - external ports that will be used to provide inbound access to the + :param frontend_port_range_start: Required. The first port number in the + range of external ports that will be used to provide inbound access to the backendPort on individual compute nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved. All ranges within a pool must be distinct and cannot overlap. If any reserved or overlapping values are provided the request fails with HTTP status code 400. :type frontend_port_range_start: int - :param frontend_port_range_end: The last port number in the range of - external ports that will be used to provide inbound access to the + :param frontend_port_range_end: Required. The last port number in the + range of external ports that will be used to provide inbound access to the backendPort on individual compute nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved by the Batch service. All ranges within a pool must be distinct and cannot overlap. If @@ -886,24 +1623,26 @@ class InboundNatPool(Model): 'network_security_group_rules': {'key': 'networkSecurityGroupRules', 'type': '[NetworkSecurityGroupRule]'}, } - def __init__(self, name, protocol, backend_port, frontend_port_range_start, frontend_port_range_end, network_security_group_rules=None): - super(InboundNatPool, self).__init__() - self.name = name - self.protocol = protocol - self.backend_port = backend_port - self.frontend_port_range_start = frontend_port_range_start - self.frontend_port_range_end = frontend_port_range_end - self.network_security_group_rules = network_security_group_rules + def __init__(self, **kwargs): + super(InboundNatPool, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.protocol = kwargs.get('protocol', None) + self.backend_port = kwargs.get('backend_port', None) + self.frontend_port_range_start = kwargs.get('frontend_port_range_start', None) + self.frontend_port_range_end = kwargs.get('frontend_port_range_end', None) + self.network_security_group_rules = kwargs.get('network_security_group_rules', None) class KeyVaultReference(Model): """Identifies the Azure key vault associated with a Batch account. - :param id: The resource ID of the Azure key vault associated with the - Batch account. + All required parameters must be populated in order to send to Azure. + + :param id: Required. The resource ID of the Azure key vault associated + with the Batch account. :type id: str - :param url: The URL of the Azure key vault associated with the Batch - account. + :param url: Required. The URL of the Azure key vault associated with the + Batch account. :type url: str """ @@ -917,10 +1656,10 @@ class KeyVaultReference(Model): 'url': {'key': 'url', 'type': 'str'}, } - def __init__(self, id, url): - super(KeyVaultReference, self).__init__() - self.id = id - self.url = url + def __init__(self, **kwargs): + super(KeyVaultReference, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.url = kwargs.get('url', None) class LinuxUserConfiguration(Model): @@ -951,11 +1690,11 @@ class LinuxUserConfiguration(Model): 'ssh_private_key': {'key': 'sshPrivateKey', 'type': 'str'}, } - def __init__(self, uid=None, gid=None, ssh_private_key=None): - super(LinuxUserConfiguration, self).__init__() - self.uid = uid - self.gid = gid - self.ssh_private_key = ssh_private_key + def __init__(self, **kwargs): + super(LinuxUserConfiguration, self).__init__(**kwargs) + self.uid = kwargs.get('uid', None) + self.gid = kwargs.get('gid', None) + self.ssh_private_key = kwargs.get('ssh_private_key', None) class MetadataItem(Model): @@ -964,9 +1703,11 @@ class MetadataItem(Model): The Batch service does not assign any meaning to this metadata; it is solely for the use of user code. - :param name: The name of the metadata item. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the metadata item. :type name: str - :param value: The value of the metadata item. + :param value: Required. The value of the metadata item. :type value: str """ @@ -980,10 +1721,50 @@ class MetadataItem(Model): 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, name, value): - super(MetadataItem, self).__init__() - self.name = name - self.value = value + def __init__(self, **kwargs): + super(MetadataItem, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class MountConfiguration(Model): + """The file system to mount on each node. + + Each property is mutually exclusive. + + :param azure_blob_file_system_configuration: The Azure Storage container + to mount using blob FUSE on each node. This property is mutually exclusive + with all other properties. + :type azure_blob_file_system_configuration: + ~azure.mgmt.batch.models.AzureBlobFileSystemConfiguration + :param nfs_mount_configuration: The NFS file system to mount on each node. + This property is mutually exclusive with all other properties. + :type nfs_mount_configuration: + ~azure.mgmt.batch.models.NFSMountConfiguration + :param cifs_mount_configuration: The CIFS/SMB file system to mount on each + node. This property is mutually exclusive with all other properties. + :type cifs_mount_configuration: + ~azure.mgmt.batch.models.CIFSMountConfiguration + :param azure_file_share_configuration: The Azure File Share to mount on + each node. This is CIFS based for linux and net use for for windows, and + this property is mutually exclusive with all other properties. + :type azure_file_share_configuration: + ~azure.mgmt.batch.models.AzureFileShareConfiguration + """ + + _attribute_map = { + 'azure_blob_file_system_configuration': {'key': 'azureBlobFileSystemConfiguration', 'type': 'AzureBlobFileSystemConfiguration'}, + 'nfs_mount_configuration': {'key': 'nfsMountConfiguration', 'type': 'NFSMountConfiguration'}, + 'cifs_mount_configuration': {'key': 'cifsMountConfiguration', 'type': 'CIFSMountConfiguration'}, + 'azure_file_share_configuration': {'key': 'azureFileShareConfiguration', 'type': 'AzureFileShareConfiguration'}, + } + + def __init__(self, **kwargs): + super(MountConfiguration, self).__init__(**kwargs) + self.azure_blob_file_system_configuration = kwargs.get('azure_blob_file_system_configuration', None) + self.nfs_mount_configuration = kwargs.get('nfs_mount_configuration', None) + self.cifs_mount_configuration = kwargs.get('cifs_mount_configuration', None) + self.azure_file_share_configuration = kwargs.get('azure_file_share_configuration', None) class NetworkConfiguration(Model): @@ -1020,39 +1801,58 @@ class NetworkConfiguration(Model): pools with the virtualMachineConfiguration property. :type endpoint_configuration: ~azure.mgmt.batch.models.PoolEndpointConfiguration + :param public_ips: The list of public IPs which the Batch service will use + when provisioning Compute Nodes. The number of IPs specified here limits + the maximum size of the Pool - 50 dedicated nodes or 20 low-priority nodes + can be allocated for each public IP. For example, a pool needing 150 + dedicated VMs would need at least 3 public IPs specified. This is of the + form: + /subscriptions/{subscription}/resourceGroups/{group}/providers/Microsoft.Network/publicIPAddresses/{ip}. + :type public_ips: list[str] """ _attribute_map = { 'subnet_id': {'key': 'subnetId', 'type': 'str'}, 'endpoint_configuration': {'key': 'endpointConfiguration', 'type': 'PoolEndpointConfiguration'}, + 'public_ips': {'key': 'publicIPs', 'type': '[str]'}, } - def __init__(self, subnet_id=None, endpoint_configuration=None): - super(NetworkConfiguration, self).__init__() - self.subnet_id = subnet_id - self.endpoint_configuration = endpoint_configuration + def __init__(self, **kwargs): + super(NetworkConfiguration, self).__init__(**kwargs) + self.subnet_id = kwargs.get('subnet_id', None) + self.endpoint_configuration = kwargs.get('endpoint_configuration', None) + self.public_ips = kwargs.get('public_ips', None) class NetworkSecurityGroupRule(Model): """A network security group rule to apply to an inbound endpoint. - :param priority: The priority for this rule. Priorities within a pool must - be unique and are evaluated in order of priority. The lower the number the - higher the priority. For example, rules could be specified with order - numbers of 150, 250, and 350. The rule with the order number of 150 takes - precedence over the rule that has an order of 250. Allowed priorities are - 150 to 3500. If any reserved or duplicate values are provided the request - fails with HTTP status code 400. + All required parameters must be populated in order to send to Azure. + + :param priority: Required. The priority for this rule. Priorities within a + pool must be unique and are evaluated in order of priority. The lower the + number the higher the priority. For example, rules could be specified with + order numbers of 150, 250, and 350. The rule with the order number of 150 + takes precedence over the rule that has an order of 250. Allowed + priorities are 150 to 3500. If any reserved or duplicate values are + provided the request fails with HTTP status code 400. :type priority: int - :param access: The action that should be taken for a specified IP address, - subnet range or tag. Possible values include: 'Allow', 'Deny' + :param access: Required. The action that should be taken for a specified + IP address, subnet range or tag. Possible values include: 'Allow', 'Deny' :type access: str or ~azure.mgmt.batch.models.NetworkSecurityGroupRuleAccess - :param source_address_prefix: The source address prefix or tag to match - for the rule. Valid values are a single IP address (i.e. 10.10.10.10), IP - subnet (i.e. 192.168.1.0/24), default tag, or * (for all addresses). If - any other values are provided the request fails with HTTP status code 400. + :param source_address_prefix: Required. The source address prefix or tag + to match for the rule. Valid values are a single IP address (i.e. + 10.10.10.10), IP subnet (i.e. 192.168.1.0/24), default tag, or * (for all + addresses). If any other values are provided the request fails with HTTP + status code 400. :type source_address_prefix: str + :param source_port_ranges: The source port ranges to match for the rule. + Valid values are '*' (for all ports 0 - 65535) or arrays of ports or port + ranges (i.e. 100-200). The ports should in the range of 0 to 65535 and the + port ranges or ports can't overlap. If any other values are provided the + request fails with HTTP status code 400. Default value will be *. + :type source_port_ranges: list[str] """ _validation = { @@ -1065,13 +1865,49 @@ class NetworkSecurityGroupRule(Model): 'priority': {'key': 'priority', 'type': 'int'}, 'access': {'key': 'access', 'type': 'NetworkSecurityGroupRuleAccess'}, 'source_address_prefix': {'key': 'sourceAddressPrefix', 'type': 'str'}, + 'source_port_ranges': {'key': 'sourcePortRanges', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(NetworkSecurityGroupRule, self).__init__(**kwargs) + self.priority = kwargs.get('priority', None) + self.access = kwargs.get('access', None) + self.source_address_prefix = kwargs.get('source_address_prefix', None) + self.source_port_ranges = kwargs.get('source_port_ranges', None) + + +class NFSMountConfiguration(Model): + """NFS file system detail. + + All required parameters must be populated in order to send to Azure. + + :param source: Required. The URI of the file system to mount. + :type source: str + :param relative_mount_path: Required. The relative path on the compute + node where the file system will be mounted. All file systems are mounted + relative to the Batch mounts directory, accessible via the + AZ_BATCH_NODE_MOUNTS_DIR environment variable. + :type relative_mount_path: str + :param mount_options: Specifies various mount options that can be used. + :type mount_options: str + """ + + _validation = { + 'source': {'required': True}, + 'relative_mount_path': {'required': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'str'}, + 'relative_mount_path': {'key': 'relativeMountPath', 'type': 'str'}, + 'mount_options': {'key': 'mountOptions', 'type': 'str'}, } - def __init__(self, priority, access, source_address_prefix): - super(NetworkSecurityGroupRule, self).__init__() - self.priority = priority - self.access = access - self.source_address_prefix = source_address_prefix + def __init__(self, **kwargs): + super(NFSMountConfiguration, self).__init__(**kwargs) + self.source = kwargs.get('source', None) + self.relative_mount_path = kwargs.get('relative_mount_path', None) + self.mount_options = kwargs.get('mount_options', None) class Operation(Model): @@ -1095,12 +1931,12 @@ class Operation(Model): 'properties': {'key': 'properties', 'type': 'object'}, } - def __init__(self, name=None, display=None, origin=None, properties=None): - super(Operation, self).__init__() - self.name = name - self.display = display - self.origin = origin - self.properties = properties + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + self.properties = kwargs.get('properties', None) class OperationDisplay(Model): @@ -1124,40 +1960,16 @@ class OperationDisplay(Model): 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, provider=None, operation=None, resource=None, description=None): - super(OperationDisplay, self).__init__() - self.provider = provider - self.operation = operation - self.resource = resource - self.description = description - - -class PoolEndpointConfiguration(Model): - """The endpoint configuration for a pool. - - :param inbound_nat_pools: A list of inbound NAT pools that can be used to - address specific ports on an individual compute node externally. The - maximum number of inbound NAT pools per Batch pool is 5. If the maximum - number of inbound NAT pools is exceeded the request fails with HTTP status - code 400. - :type inbound_nat_pools: list[~azure.mgmt.batch.models.InboundNatPool] - """ - - _validation = { - 'inbound_nat_pools': {'required': True}, - } - - _attribute_map = { - 'inbound_nat_pools': {'key': 'inboundNatPools', 'type': '[InboundNatPool]'}, - } - - def __init__(self, inbound_nat_pools): - super(PoolEndpointConfiguration, self).__init__() - self.inbound_nat_pools = inbound_nat_pools + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.operation = kwargs.get('operation', None) + self.resource = kwargs.get('resource', None) + self.description = kwargs.get('description', None) -class ProxyResource(Model): - """A definition of an Azure resource. +class Pool(ProxyResource): + """Contains information about a pool. Variables are only populated by the server, and will be ignored when sending a request. @@ -1170,154 +1982,316 @@ class ProxyResource(Model): :vartype type: str :ivar etag: The ETag of the resource, used for concurrency statements. :vartype etag: str + :param display_name: The display name for the pool. The display name need + not be unique and can contain any Unicode characters up to a maximum + length of 1024. + :type display_name: str + :ivar last_modified: The last modified time of the pool. This is the last + time at which the pool level data, such as the targetDedicatedNodes or + autoScaleSettings, changed. It does not factor in node-level changes such + as a compute node changing state. + :vartype last_modified: datetime + :ivar creation_time: The creation time of the pool. + :vartype creation_time: datetime + :ivar provisioning_state: The current state of the pool. Possible values + include: 'Succeeded', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.batch.models.PoolProvisioningState + :ivar provisioning_state_transition_time: The time at which the pool + entered its current state. + :vartype provisioning_state_transition_time: datetime + :ivar allocation_state: Whether the pool is resizing. Possible values + include: 'Steady', 'Resizing', 'Stopping' + :vartype allocation_state: str or ~azure.mgmt.batch.models.AllocationState + :ivar allocation_state_transition_time: The time at which the pool entered + its current allocation state. + :vartype allocation_state_transition_time: datetime + :param vm_size: The size of virtual machines in the pool. All VMs in a + pool are the same size. For information about available sizes of virtual + machines for Cloud Services pools (pools created with + cloudServiceConfiguration), see Sizes for Cloud Services + (http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). + Batch supports all Cloud Services VM sizes except ExtraSmall. For + information about available VM sizes for pools using images from the + Virtual Machines Marketplace (pools created with + virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) + (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) + or Sizes for Virtual Machines (Windows) + (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). + Batch supports all Azure VM sizes except STANDARD_A0 and those with + premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). + :type vm_size: str + :param deployment_configuration: This property describes how the pool + nodes will be deployed - using Cloud Services or Virtual Machines. Using + CloudServiceConfiguration specifies that the nodes should be creating + using Azure Cloud Services (PaaS), while VirtualMachineConfiguration uses + Azure Virtual Machines (IaaS). + :type deployment_configuration: + ~azure.mgmt.batch.models.DeploymentConfiguration + :ivar current_dedicated_nodes: The number of compute nodes currently in + the pool. + :vartype current_dedicated_nodes: int + :ivar current_low_priority_nodes: The number of low priority compute nodes + currently in the pool. + :vartype current_low_priority_nodes: int + :param scale_settings: Settings which configure the number of nodes in the + pool. + :type scale_settings: ~azure.mgmt.batch.models.ScaleSettings + :ivar auto_scale_run: The results and errors from the last execution of + the autoscale formula. This property is set only if the pool automatically + scales, i.e. autoScaleSettings are used. + :vartype auto_scale_run: ~azure.mgmt.batch.models.AutoScaleRun + :param inter_node_communication: Whether the pool permits direct + communication between nodes. This imposes restrictions on which nodes can + be assigned to the pool. Enabling this value can reduce the chance of the + requested number of nodes to be allocated in the pool. If not specified, + this value defaults to 'Disabled'. Possible values include: 'Enabled', + 'Disabled' + :type inter_node_communication: str or + ~azure.mgmt.batch.models.InterNodeCommunicationState + :param network_configuration: The network configuration for the pool. + :type network_configuration: ~azure.mgmt.batch.models.NetworkConfiguration + :param max_tasks_per_node: The maximum number of tasks that can run + concurrently on a single compute node in the pool. The default value is 1. + The maximum value is the smaller of 4 times the number of cores of the + vmSize of the pool or 256. + :type max_tasks_per_node: int + :param task_scheduling_policy: How tasks are distributed across compute + nodes in a pool. If not specified, the default is spread. + :type task_scheduling_policy: + ~azure.mgmt.batch.models.TaskSchedulingPolicy + :param user_accounts: The list of user accounts to be created on each node + in the pool. + :type user_accounts: list[~azure.mgmt.batch.models.UserAccount] + :param metadata: A list of name-value pairs associated with the pool as + metadata. The Batch service does not assign any meaning to metadata; it is + solely for the use of user code. + :type metadata: list[~azure.mgmt.batch.models.MetadataItem] + :param start_task: A task specified to run on each compute node as it + joins the pool. In an PATCH (update) operation, this property can be set + to an empty object to remove the start task from the pool. + :type start_task: ~azure.mgmt.batch.models.StartTask + :param certificates: The list of certificates to be installed on each + compute node in the pool. For Windows compute nodes, the Batch service + installs the certificates to the specified certificate store and location. + For Linux compute nodes, the certificates are stored in a directory inside + the task working directory and an environment variable + AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this + location. For certificates with visibility of 'remoteUser', a 'certs' + directory is created in the user's home directory (e.g., + /home/{user-name}/certs) and certificates are placed in that directory. + :type certificates: list[~azure.mgmt.batch.models.CertificateReference] + :param application_packages: The list of application packages to be + installed on each compute node in the pool. Changes to application package + references affect all new compute nodes joining the pool, but do not + affect compute nodes that are already in the pool until they are rebooted + or reimaged. There is a maximum of 10 application package references on + any given pool. + :type application_packages: + list[~azure.mgmt.batch.models.ApplicationPackageReference] + :param application_licenses: The list of application licenses the Batch + service will make available on each compute node in the pool. The list of + application licenses must be a subset of available Batch service + application licenses. If a license is requested which is not supported, + pool creation will fail. + :type application_licenses: list[str] + :ivar resize_operation_status: Contains details about the current or last + completed resize operation. + :vartype resize_operation_status: + ~azure.mgmt.batch.models.ResizeOperationStatus + :param mount_configuration: A list of file systems to mount on each node + in the pool. This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. + :type mount_configuration: + list[~azure.mgmt.batch.models.MountConfiguration] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - } - - def __init__(self): - super(ProxyResource, self).__init__() - self.id = None - self.name = None - self.type = None - self.etag = None - - -class ResizeError(Model): - """An error that occurred when resizing a pool. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param details: Additional details about the error. - :type details: list[~azure.mgmt.batch.models.ResizeError] - """ - - _validation = { - 'code': {'required': True}, - 'message': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ResizeError]'}, - } - - def __init__(self, code, message, details=None): - super(ResizeError, self).__init__() - self.code = code - self.message = message - self.details = details - - -class ResizeOperationStatus(Model): - """Details about the current or last completed resize operation. - - Describes either the current operation (if the pool AllocationState is - Resizing) or the previously completed operation (if the AllocationState is - Steady). - - :param target_dedicated_nodes: The desired number of dedicated compute - nodes in the pool. - :type target_dedicated_nodes: int - :param target_low_priority_nodes: The desired number of low-priority - compute nodes in the pool. - :type target_low_priority_nodes: int - :param resize_timeout: The timeout for allocation of compute nodes to the - pool or removal of compute nodes from the pool. The default value is 15 - minutes. The minimum value is 5 minutes. If you specify a value less than - 5 minutes, the Batch service returns an error; if you are calling the REST - API directly, the HTTP status code is 400 (Bad Request). - :type resize_timeout: timedelta - :param node_deallocation_option: Determines what to do with a node and its - running task(s) if the pool size is decreasing. The default value is - requeue. Possible values include: 'Requeue', 'Terminate', - 'TaskCompletion', 'RetainedData' - :type node_deallocation_option: str or - ~azure.mgmt.batch.models.ComputeNodeDeallocationOption - :param start_time: The time when this resize operation was started. - :type start_time: datetime - :param errors: Details of any errors encountered while performing the last - resize on the pool. This property is set only if an error occurred during - the last pool resize, and only when the pool allocationState is Steady. - :type errors: list[~azure.mgmt.batch.models.ResizeError] - """ - - _attribute_map = { - 'target_dedicated_nodes': {'key': 'targetDedicatedNodes', 'type': 'int'}, - 'target_low_priority_nodes': {'key': 'targetLowPriorityNodes', 'type': 'int'}, - 'resize_timeout': {'key': 'resizeTimeout', 'type': 'duration'}, - 'node_deallocation_option': {'key': 'nodeDeallocationOption', 'type': 'ComputeNodeDeallocationOption'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'errors': {'key': 'errors', 'type': '[ResizeError]'}, - } - - def __init__(self, target_dedicated_nodes=None, target_low_priority_nodes=None, resize_timeout=None, node_deallocation_option=None, start_time=None, errors=None): - super(ResizeOperationStatus, self).__init__() - self.target_dedicated_nodes = target_dedicated_nodes - self.target_low_priority_nodes = target_low_priority_nodes - self.resize_timeout = resize_timeout - self.node_deallocation_option = node_deallocation_option - self.start_time = start_time - self.errors = errors - - -class Resource(Model): - """A definition of an Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar location: The location of the resource. - :vartype location: str - :ivar tags: The tags of the resource. - :vartype tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'tags': {'readonly': True}, + 'etag': {'readonly': True}, + 'last_modified': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'provisioning_state_transition_time': {'readonly': True}, + 'allocation_state': {'readonly': True}, + 'allocation_state_transition_time': {'readonly': True}, + 'current_dedicated_nodes': {'readonly': True}, + 'current_low_priority_nodes': {'readonly': True}, + 'auto_scale_run': {'readonly': True}, + 'resize_operation_status': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'PoolProvisioningState'}, + 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, + 'allocation_state': {'key': 'properties.allocationState', 'type': 'AllocationState'}, + 'allocation_state_transition_time': {'key': 'properties.allocationStateTransitionTime', 'type': 'iso-8601'}, + 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, + 'deployment_configuration': {'key': 'properties.deploymentConfiguration', 'type': 'DeploymentConfiguration'}, + 'current_dedicated_nodes': {'key': 'properties.currentDedicatedNodes', 'type': 'int'}, + 'current_low_priority_nodes': {'key': 'properties.currentLowPriorityNodes', 'type': 'int'}, + 'scale_settings': {'key': 'properties.scaleSettings', 'type': 'ScaleSettings'}, + 'auto_scale_run': {'key': 'properties.autoScaleRun', 'type': 'AutoScaleRun'}, + 'inter_node_communication': {'key': 'properties.interNodeCommunication', 'type': 'InterNodeCommunicationState'}, + 'network_configuration': {'key': 'properties.networkConfiguration', 'type': 'NetworkConfiguration'}, + 'max_tasks_per_node': {'key': 'properties.maxTasksPerNode', 'type': 'int'}, + 'task_scheduling_policy': {'key': 'properties.taskSchedulingPolicy', 'type': 'TaskSchedulingPolicy'}, + 'user_accounts': {'key': 'properties.userAccounts', 'type': '[UserAccount]'}, + 'metadata': {'key': 'properties.metadata', 'type': '[MetadataItem]'}, + 'start_task': {'key': 'properties.startTask', 'type': 'StartTask'}, + 'certificates': {'key': 'properties.certificates', 'type': '[CertificateReference]'}, + 'application_packages': {'key': 'properties.applicationPackages', 'type': '[ApplicationPackageReference]'}, + 'application_licenses': {'key': 'properties.applicationLicenses', 'type': '[str]'}, + 'resize_operation_status': {'key': 'properties.resizeOperationStatus', 'type': 'ResizeOperationStatus'}, + 'mount_configuration': {'key': 'properties.mountConfiguration', 'type': '[MountConfiguration]'}, + } + + def __init__(self, **kwargs): + super(Pool, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.last_modified = None + self.creation_time = None + self.provisioning_state = None + self.provisioning_state_transition_time = None + self.allocation_state = None + self.allocation_state_transition_time = None + self.vm_size = kwargs.get('vm_size', None) + self.deployment_configuration = kwargs.get('deployment_configuration', None) + self.current_dedicated_nodes = None + self.current_low_priority_nodes = None + self.scale_settings = kwargs.get('scale_settings', None) + self.auto_scale_run = None + self.inter_node_communication = kwargs.get('inter_node_communication', None) + self.network_configuration = kwargs.get('network_configuration', None) + self.max_tasks_per_node = kwargs.get('max_tasks_per_node', None) + self.task_scheduling_policy = kwargs.get('task_scheduling_policy', None) + self.user_accounts = kwargs.get('user_accounts', None) + self.metadata = kwargs.get('metadata', None) + self.start_task = kwargs.get('start_task', None) + self.certificates = kwargs.get('certificates', None) + self.application_packages = kwargs.get('application_packages', None) + self.application_licenses = kwargs.get('application_licenses', None) + self.resize_operation_status = None + self.mount_configuration = kwargs.get('mount_configuration', None) + + +class PoolEndpointConfiguration(Model): + """The endpoint configuration for a pool. + + All required parameters must be populated in order to send to Azure. + + :param inbound_nat_pools: Required. A list of inbound NAT pools that can + be used to address specific ports on an individual compute node + externally. The maximum number of inbound NAT pools per Batch pool is 5. + If the maximum number of inbound NAT pools is exceeded the request fails + with HTTP status code 400. + :type inbound_nat_pools: list[~azure.mgmt.batch.models.InboundNatPool] + """ + + _validation = { + 'inbound_nat_pools': {'required': True}, + } + + _attribute_map = { + 'inbound_nat_pools': {'key': 'inboundNatPools', 'type': '[InboundNatPool]'}, + } + + def __init__(self, **kwargs): + super(PoolEndpointConfiguration, self).__init__(**kwargs) + self.inbound_nat_pools = kwargs.get('inbound_nat_pools', None) + + +class ResizeError(Model): + """An error that occurred when resizing a pool. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. An identifier for the error. Codes are invariant + and are intended to be consumed programmatically. + :type code: str + :param message: Required. A message describing the error, intended to be + suitable for display in a user interface. + :type message: str + :param details: Additional details about the error. + :type details: list[~azure.mgmt.batch.models.ResizeError] + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ResizeError]'}, + } + + def __init__(self, **kwargs): + super(ResizeError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.details = kwargs.get('details', None) + + +class ResizeOperationStatus(Model): + """Details about the current or last completed resize operation. + + Describes either the current operation (if the pool AllocationState is + Resizing) or the previously completed operation (if the AllocationState is + Steady). + + :param target_dedicated_nodes: The desired number of dedicated compute + nodes in the pool. + :type target_dedicated_nodes: int + :param target_low_priority_nodes: The desired number of low-priority + compute nodes in the pool. + :type target_low_priority_nodes: int + :param resize_timeout: The timeout for allocation of compute nodes to the + pool or removal of compute nodes from the pool. The default value is 15 + minutes. The minimum value is 5 minutes. If you specify a value less than + 5 minutes, the Batch service returns an error; if you are calling the REST + API directly, the HTTP status code is 400 (Bad Request). + :type resize_timeout: timedelta + :param node_deallocation_option: Determines what to do with a node and its + running task(s) if the pool size is decreasing. The default value is + requeue. Possible values include: 'Requeue', 'Terminate', + 'TaskCompletion', 'RetainedData' + :type node_deallocation_option: str or + ~azure.mgmt.batch.models.ComputeNodeDeallocationOption + :param start_time: The time when this resize operation was started. + :type start_time: datetime + :param errors: Details of any errors encountered while performing the last + resize on the pool. This property is set only if an error occurred during + the last pool resize, and only when the pool allocationState is Steady. + :type errors: list[~azure.mgmt.batch.models.ResizeError] + """ + + _attribute_map = { + 'target_dedicated_nodes': {'key': 'targetDedicatedNodes', 'type': 'int'}, + 'target_low_priority_nodes': {'key': 'targetLowPriorityNodes', 'type': 'int'}, + 'resize_timeout': {'key': 'resizeTimeout', 'type': 'duration'}, + 'node_deallocation_option': {'key': 'nodeDeallocationOption', 'type': 'ComputeNodeDeallocationOption'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'errors': {'key': 'errors', 'type': '[ResizeError]'}, } - def __init__(self): - super(Resource, self).__init__() - self.id = None - self.name = None - self.type = None - self.location = None - self.tags = None + def __init__(self, **kwargs): + super(ResizeOperationStatus, self).__init__(**kwargs) + self.target_dedicated_nodes = kwargs.get('target_dedicated_nodes', None) + self.target_low_priority_nodes = kwargs.get('target_low_priority_nodes', None) + self.resize_timeout = kwargs.get('resize_timeout', None) + self.node_deallocation_option = kwargs.get('node_deallocation_option', None) + self.start_time = kwargs.get('start_time', None) + self.errors = kwargs.get('errors', None) class ResourceFile(Model): @@ -1333,10 +2307,10 @@ class ResourceFile(Model): httpUrl properties are mutually exclusive and one of them must be specified. This URL must be readable and listable using anonymous access; that is, the Batch service does not present any credentials when - downloading blobs from the container. There are two ways to get such a URL - for a container in Azure storage: include a Shared Access Signature (SAS) - granting read and list permissions on the container, or set the ACL for - the container to allow public access. + downloading the blob. There are two ways to get such a URL for a blob in + Azure storage: include a Shared Access Signature (SAS) granting read and + list permissions on the blob, or set the ACL for the blob or its container + to allow public access. :type storage_container_url: str :param http_url: The URL of the file to download. The autoStorageContainerName, storageContainerUrl and httpUrl properties are @@ -1383,14 +2357,14 @@ class ResourceFile(Model): 'file_mode': {'key': 'fileMode', 'type': 'str'}, } - def __init__(self, auto_storage_container_name=None, storage_container_url=None, http_url=None, blob_prefix=None, file_path=None, file_mode=None): - super(ResourceFile, self).__init__() - self.auto_storage_container_name = auto_storage_container_name - self.storage_container_url = storage_container_url - self.http_url = http_url - self.blob_prefix = blob_prefix - self.file_path = file_path - self.file_mode = file_mode + def __init__(self, **kwargs): + super(ResourceFile, self).__init__(**kwargs) + self.auto_storage_container_name = kwargs.get('auto_storage_container_name', None) + self.storage_container_url = kwargs.get('storage_container_url', None) + self.http_url = kwargs.get('http_url', None) + self.blob_prefix = kwargs.get('blob_prefix', None) + self.file_path = kwargs.get('file_path', None) + self.file_mode = kwargs.get('file_mode', None) class ScaleSettings(Model): @@ -1417,16 +2391,23 @@ class ScaleSettings(Model): 'auto_scale': {'key': 'autoScale', 'type': 'AutoScaleSettings'}, } - def __init__(self, fixed_scale=None, auto_scale=None): - super(ScaleSettings, self).__init__() - self.fixed_scale = fixed_scale - self.auto_scale = auto_scale + def __init__(self, **kwargs): + super(ScaleSettings, self).__init__(**kwargs) + self.fixed_scale = kwargs.get('fixed_scale', None) + self.auto_scale = kwargs.get('auto_scale', None) class StartTask(Model): """A task which is run when a compute node joins a pool in the Azure Batch service, or when the compute node is rebooted or reimaged. + In some cases the start task may be re-run even though the node was not + rebooted. Due to this, start tasks should be idempotent and exit gracefully + if the setup they're performing has already been done. Special care should + be taken to avoid start tasks which create breakaway process or + install/launch services from the start task working directory, as this will + block Batch from being able to re-run the start task. + :param command_line: The command line of the start task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take @@ -1465,7 +2446,7 @@ class StartTask(Model): the Batch service will not wait for the start task to complete. In this case, other tasks can start executing on the compute node while the start task is still running; and even if the start task fails, new tasks will - continue to be scheduled on the node. The default is false. + continue to be scheduled on the node. The default is true. :type wait_for_success: bool :param container_settings: The settings for the container under which the start task runs. When this is specified, all directories recursively below @@ -1486,835 +2467,286 @@ class StartTask(Model): 'container_settings': {'key': 'containerSettings', 'type': 'TaskContainerSettings'}, } - def __init__(self, command_line=None, resource_files=None, environment_settings=None, user_identity=None, max_task_retry_count=None, wait_for_success=None, container_settings=None): - super(StartTask, self).__init__() - self.command_line = command_line - self.resource_files = resource_files - self.environment_settings = environment_settings - self.user_identity = user_identity - self.max_task_retry_count = max_task_retry_count - self.wait_for_success = wait_for_success - self.container_settings = container_settings + def __init__(self, **kwargs): + super(StartTask, self).__init__(**kwargs) + self.command_line = kwargs.get('command_line', None) + self.resource_files = kwargs.get('resource_files', None) + self.environment_settings = kwargs.get('environment_settings', None) + self.user_identity = kwargs.get('user_identity', None) + self.max_task_retry_count = kwargs.get('max_task_retry_count', None) + self.wait_for_success = kwargs.get('wait_for_success', None) + self.container_settings = kwargs.get('container_settings', None) class TaskContainerSettings(Model): """The container settings for a task. + All required parameters must be populated in order to send to Azure. + :param container_run_options: Additional options to the container create command. These additional options are supplied as arguments to the "docker create" command, in addition to those controlled by the Batch Service. :type container_run_options: str - :param image_name: The image to use to create the container in which the - task will run. This is the full image reference, as would be specified to - "docker pull". If no tag is provided as part of the image name, the tag - ":latest" is used as a default. + :param image_name: Required. The image to use to create the container in + which the task will run. This is the full image reference, as would be + specified to "docker pull". If no tag is provided as part of the image + name, the tag ":latest" is used as a default. :type image_name: str :param registry: The private registry which contains the container image. This setting can be omitted if was already provided at pool creation. :type registry: ~azure.mgmt.batch.models.ContainerRegistry + :param working_directory: A flag to indicate where the container task + working directory is. The default is 'taskWorkingDirectory'. Possible + values include: 'TaskWorkingDirectory', 'ContainerImageDefault' + :type working_directory: str or + ~azure.mgmt.batch.models.ContainerWorkingDirectory """ _validation = { - 'image_name': {'required': True}, - } - - _attribute_map = { - 'container_run_options': {'key': 'containerRunOptions', 'type': 'str'}, - 'image_name': {'key': 'imageName', 'type': 'str'}, - 'registry': {'key': 'registry', 'type': 'ContainerRegistry'}, - } - - def __init__(self, image_name, container_run_options=None, registry=None): - super(TaskContainerSettings, self).__init__() - self.container_run_options = container_run_options - self.image_name = image_name - self.registry = registry - - -class TaskSchedulingPolicy(Model): - """Specifies how tasks should be distributed across compute nodes. - - :param node_fill_type: How tasks should be distributed across compute - nodes. Possible values include: 'Spread', 'Pack' - :type node_fill_type: str or ~azure.mgmt.batch.models.ComputeNodeFillType - """ - - _validation = { - 'node_fill_type': {'required': True}, - } - - _attribute_map = { - 'node_fill_type': {'key': 'nodeFillType', 'type': 'ComputeNodeFillType'}, - } - - def __init__(self, node_fill_type): - super(TaskSchedulingPolicy, self).__init__() - self.node_fill_type = node_fill_type - - -class UserAccount(Model): - """Properties used to create a user on an Azure Batch node. - - :param name: The name of the user account. - :type name: str - :param password: The password for the user account. - :type password: str - :param elevation_level: The elevation level of the user account. nonAdmin - - The auto user is a standard user without elevated access. admin - The - auto user is a user with elevated access and operates with full - Administrator permissions. The default value is nonAdmin. Possible values - include: 'NonAdmin', 'Admin' - :type elevation_level: str or ~azure.mgmt.batch.models.ElevationLevel - :param linux_user_configuration: The Linux-specific user configuration for - the user account. This property is ignored if specified on a Windows pool. - If not specified, the user is created with the default options. - :type linux_user_configuration: - ~azure.mgmt.batch.models.LinuxUserConfiguration - :param windows_user_configuration: The Windows-specific user configuration - for the user account. This property can only be specified if the user is - on a Windows pool. If not specified and on a Windows pool, the user is - created with the default options. - :type windows_user_configuration: - ~azure.mgmt.batch.models.WindowsUserConfiguration - """ - - _validation = { - 'name': {'required': True}, - 'password': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, - 'elevation_level': {'key': 'elevationLevel', 'type': 'ElevationLevel'}, - 'linux_user_configuration': {'key': 'linuxUserConfiguration', 'type': 'LinuxUserConfiguration'}, - 'windows_user_configuration': {'key': 'windowsUserConfiguration', 'type': 'WindowsUserConfiguration'}, - } - - def __init__(self, name, password, elevation_level=None, linux_user_configuration=None, windows_user_configuration=None): - super(UserAccount, self).__init__() - self.name = name - self.password = password - self.elevation_level = elevation_level - self.linux_user_configuration = linux_user_configuration - self.windows_user_configuration = windows_user_configuration - - -class UserIdentity(Model): - """The definition of the user identity under which the task is run. - - Specify either the userName or autoUser property, but not both. - - :param user_name: The name of the user identity under which the task is - run. The userName and autoUser properties are mutually exclusive; you must - specify one but not both. - :type user_name: str - :param auto_user: The auto user under which the task is run. The userName - and autoUser properties are mutually exclusive; you must specify one but - not both. - :type auto_user: ~azure.mgmt.batch.models.AutoUserSpecification - """ - - _attribute_map = { - 'user_name': {'key': 'userName', 'type': 'str'}, - 'auto_user': {'key': 'autoUser', 'type': 'AutoUserSpecification'}, - } - - def __init__(self, user_name=None, auto_user=None): - super(UserIdentity, self).__init__() - self.user_name = user_name - self.auto_user = auto_user - - -class VirtualMachineConfiguration(Model): - """The configuration for compute nodes in a pool based on the Azure Virtual - Machines infrastructure. - - :param image_reference: A reference to the Azure Virtual Machines - Marketplace Image or the custom Virtual Machine Image to use. - :type image_reference: ~azure.mgmt.batch.models.ImageReference - :param node_agent_sku_id: The SKU of the Batch node agent to be - provisioned on compute nodes in the pool. The Batch node agent is a - program that runs on each node in the pool, and provides the - command-and-control interface between the node and the Batch service. - There are different implementations of the node agent, known as SKUs, for - different operating systems. You must specify a node agent SKU which - matches the selected image reference. To get the list of supported node - agent SKUs along with their list of verified image references, see the - 'List supported node agent SKUs' operation. - :type node_agent_sku_id: str - :param windows_configuration: Windows operating system settings on the - virtual machine. This property must not be specified if the imageReference - specifies a Linux OS image. - :type windows_configuration: ~azure.mgmt.batch.models.WindowsConfiguration - :param data_disks: The configuration for data disks attached to the - compute nodes in the pool. This property must be specified if the compute - nodes in the pool need to have empty data disks attached to them. - :type data_disks: list[~azure.mgmt.batch.models.DataDisk] - :param license_type: The type of on-premises license to be used when - deploying the operating system. This only applies to images that contain - the Windows operating system, and should only be used when you hold valid - on-premises licenses for the nodes which will be deployed. If omitted, no - on-premises licensing discount is applied. Values are: - Windows_Server - The on-premises license is for Windows Server. - Windows_Client - The on-premises license is for Windows Client. - :type license_type: str - :param container_configuration: The container configuration for the pool. - If specified, setup is performed on each node in the pool to allow tasks - to run in containers. All regular tasks and job manager tasks run on this - pool must specify the containerSettings property, and all other tasks may - specify it. - :type container_configuration: - ~azure.mgmt.batch.models.ContainerConfiguration - """ - - _validation = { - 'image_reference': {'required': True}, - 'node_agent_sku_id': {'required': True}, - } - - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'node_agent_sku_id': {'key': 'nodeAgentSkuId', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - 'container_configuration': {'key': 'containerConfiguration', 'type': 'ContainerConfiguration'}, - } - - def __init__(self, image_reference, node_agent_sku_id, windows_configuration=None, data_disks=None, license_type=None, container_configuration=None): - super(VirtualMachineConfiguration, self).__init__() - self.image_reference = image_reference - self.node_agent_sku_id = node_agent_sku_id - self.windows_configuration = windows_configuration - self.data_disks = data_disks - self.license_type = license_type - self.container_configuration = container_configuration - - -class WindowsConfiguration(Model): - """Windows operating system settings to apply to the virtual machine. - - :param enable_automatic_updates: Whether automatic updates are enabled on - the virtual machine. If omitted, the default value is true. - :type enable_automatic_updates: bool - """ - - _attribute_map = { - 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, - } - - def __init__(self, enable_automatic_updates=None): - super(WindowsConfiguration, self).__init__() - self.enable_automatic_updates = enable_automatic_updates - - -class WindowsUserConfiguration(Model): - """Properties used to create a user account on a Windows node. - - :param login_mode: Login mode for user. Specifies login mode for the user. - The default value for VirtualMachineConfiguration pools is interactive - mode and for CloudServiceConfiguration pools is batch mode. Possible - values include: 'Batch', 'Interactive' - :type login_mode: str or ~azure.mgmt.batch.models.LoginMode - """ - - _attribute_map = { - 'login_mode': {'key': 'loginMode', 'type': 'LoginMode'}, - } - - def __init__(self, login_mode=None): - super(WindowsUserConfiguration, self).__init__() - self.login_mode = login_mode - - -class Application(ProxyResource): - """Contains information about an application in a Batch account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param display_name: The display name for the application. - :type display_name: str - :param allow_updates: A value indicating whether packages within the - application may be overwritten using the same version string. - :type allow_updates: bool - :param default_version: The package to use if a client requests the - application but does not specify a version. This property can only be set - to the name of an existing package. - :type default_version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'allow_updates': {'key': 'properties.allowUpdates', 'type': 'bool'}, - 'default_version': {'key': 'properties.defaultVersion', 'type': 'str'}, - } - - def __init__(self, display_name=None, allow_updates=None, default_version=None): - super(Application, self).__init__() - self.display_name = display_name - self.allow_updates = allow_updates - self.default_version = default_version - - -class ApplicationPackage(ProxyResource): - """An application package which represents a particular version of an - application. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :ivar state: The current state of the application package. Possible values - include: 'Pending', 'Active' - :vartype state: str or ~azure.mgmt.batch.models.PackageState - :ivar format: The format of the application package, if the package is - active. - :vartype format: str - :ivar storage_url: The URL for the application package in Azure Storage. - :vartype storage_url: str - :ivar storage_url_expiry: The UTC time at which the Azure Storage URL will - expire. - :vartype storage_url_expiry: datetime - :ivar last_activation_time: The time at which the package was last - activated, if the package is active. - :vartype last_activation_time: datetime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'state': {'readonly': True}, - 'format': {'readonly': True}, - 'storage_url': {'readonly': True}, - 'storage_url_expiry': {'readonly': True}, - 'last_activation_time': {'readonly': True}, + 'image_name': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'PackageState'}, - 'format': {'key': 'properties.format', 'type': 'str'}, - 'storage_url': {'key': 'properties.storageUrl', 'type': 'str'}, - 'storage_url_expiry': {'key': 'properties.storageUrlExpiry', 'type': 'iso-8601'}, - 'last_activation_time': {'key': 'properties.lastActivationTime', 'type': 'iso-8601'}, + 'container_run_options': {'key': 'containerRunOptions', 'type': 'str'}, + 'image_name': {'key': 'imageName', 'type': 'str'}, + 'registry': {'key': 'registry', 'type': 'ContainerRegistry'}, + 'working_directory': {'key': 'workingDirectory', 'type': 'ContainerWorkingDirectory'}, } - def __init__(self): - super(ApplicationPackage, self).__init__() - self.state = None - self.format = None - self.storage_url = None - self.storage_url_expiry = None - self.last_activation_time = None + def __init__(self, **kwargs): + super(TaskContainerSettings, self).__init__(**kwargs) + self.container_run_options = kwargs.get('container_run_options', None) + self.image_name = kwargs.get('image_name', None) + self.registry = kwargs.get('registry', None) + self.working_directory = kwargs.get('working_directory', None) -class AutoStorageProperties(AutoStorageBaseProperties): - """Contains information about the auto-storage account associated with a Batch - account. +class TaskSchedulingPolicy(Model): + """Specifies how tasks should be distributed across compute nodes. - :param storage_account_id: The resource ID of the storage account to be - used for auto-storage account. - :type storage_account_id: str - :param last_key_sync: The UTC time at which storage keys were last - synchronized with the Batch account. - :type last_key_sync: datetime + All required parameters must be populated in order to send to Azure. + + :param node_fill_type: Required. How tasks should be distributed across + compute nodes. Possible values include: 'Spread', 'Pack' + :type node_fill_type: str or ~azure.mgmt.batch.models.ComputeNodeFillType """ _validation = { - 'storage_account_id': {'required': True}, - 'last_key_sync': {'required': True}, + 'node_fill_type': {'required': True}, } _attribute_map = { - 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, - 'last_key_sync': {'key': 'lastKeySync', 'type': 'iso-8601'}, + 'node_fill_type': {'key': 'nodeFillType', 'type': 'ComputeNodeFillType'}, } - def __init__(self, storage_account_id, last_key_sync): - super(AutoStorageProperties, self).__init__(storage_account_id=storage_account_id) - self.last_key_sync = last_key_sync + def __init__(self, **kwargs): + super(TaskSchedulingPolicy, self).__init__(**kwargs) + self.node_fill_type = kwargs.get('node_fill_type', None) -class BatchAccount(Resource): - """Contains information about an Azure Batch account. +class UserAccount(Model): + """Properties used to create a user on an Azure Batch node. - Variables are only populated by the server, and will be ignored when - sending a request. + All required parameters must be populated in order to send to Azure. - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar location: The location of the resource. - :vartype location: str - :ivar tags: The tags of the resource. - :vartype tags: dict[str, str] - :ivar account_endpoint: The account endpoint used to interact with the - Batch service. - :vartype account_endpoint: str - :ivar provisioning_state: The provisioned state of the resource. Possible - values include: 'Invalid', 'Creating', 'Deleting', 'Succeeded', 'Failed', - 'Cancelled' - :vartype provisioning_state: str or - ~azure.mgmt.batch.models.ProvisioningState - :ivar pool_allocation_mode: The allocation mode to use for creating pools - in the Batch account. Possible values include: 'BatchService', - 'UserSubscription' - :vartype pool_allocation_mode: str or - ~azure.mgmt.batch.models.PoolAllocationMode - :ivar key_vault_reference: A reference to the Azure key vault associated - with the Batch account. - :vartype key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference - :ivar auto_storage: The properties and status of any auto-storage account - associated with the Batch account. - :vartype auto_storage: ~azure.mgmt.batch.models.AutoStorageProperties - :ivar dedicated_core_quota: The dedicated core quota for this Batch - account. - :vartype dedicated_core_quota: int - :ivar low_priority_core_quota: The low-priority core quota for this Batch - account. - :vartype low_priority_core_quota: int - :ivar pool_quota: The pool quota for this Batch account. - :vartype pool_quota: int - :ivar active_job_and_job_schedule_quota: The active job and job schedule - quota for this Batch account. - :vartype active_job_and_job_schedule_quota: int + :param name: Required. The name of the user account. + :type name: str + :param password: Required. The password for the user account. + :type password: str + :param elevation_level: The elevation level of the user account. nonAdmin + - The auto user is a standard user without elevated access. admin - The + auto user is a user with elevated access and operates with full + Administrator permissions. The default value is nonAdmin. Possible values + include: 'NonAdmin', 'Admin' + :type elevation_level: str or ~azure.mgmt.batch.models.ElevationLevel + :param linux_user_configuration: The Linux-specific user configuration for + the user account. This property is ignored if specified on a Windows pool. + If not specified, the user is created with the default options. + :type linux_user_configuration: + ~azure.mgmt.batch.models.LinuxUserConfiguration + :param windows_user_configuration: The Windows-specific user configuration + for the user account. This property can only be specified if the user is + on a Windows pool. If not specified and on a Windows pool, the user is + created with the default options. + :type windows_user_configuration: + ~azure.mgmt.batch.models.WindowsUserConfiguration """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'tags': {'readonly': True}, - 'account_endpoint': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'pool_allocation_mode': {'readonly': True}, - 'key_vault_reference': {'readonly': True}, - 'auto_storage': {'readonly': True}, - 'dedicated_core_quota': {'readonly': True}, - 'low_priority_core_quota': {'readonly': True}, - 'pool_quota': {'readonly': True}, - 'active_job_and_job_schedule_quota': {'readonly': True}, + 'name': {'required': True}, + 'password': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'account_endpoint': {'key': 'properties.accountEndpoint', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, - 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, - 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageProperties'}, - 'dedicated_core_quota': {'key': 'properties.dedicatedCoreQuota', 'type': 'int'}, - 'low_priority_core_quota': {'key': 'properties.lowPriorityCoreQuota', 'type': 'int'}, - 'pool_quota': {'key': 'properties.poolQuota', 'type': 'int'}, - 'active_job_and_job_schedule_quota': {'key': 'properties.activeJobAndJobScheduleQuota', 'type': 'int'}, + 'password': {'key': 'password', 'type': 'str'}, + 'elevation_level': {'key': 'elevationLevel', 'type': 'ElevationLevel'}, + 'linux_user_configuration': {'key': 'linuxUserConfiguration', 'type': 'LinuxUserConfiguration'}, + 'windows_user_configuration': {'key': 'windowsUserConfiguration', 'type': 'WindowsUserConfiguration'}, } - def __init__(self): - super(BatchAccount, self).__init__() - self.account_endpoint = None - self.provisioning_state = None - self.pool_allocation_mode = None - self.key_vault_reference = None - self.auto_storage = None - self.dedicated_core_quota = None - self.low_priority_core_quota = None - self.pool_quota = None - self.active_job_and_job_schedule_quota = None + def __init__(self, **kwargs): + super(UserAccount, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.password = kwargs.get('password', None) + self.elevation_level = kwargs.get('elevation_level', None) + self.linux_user_configuration = kwargs.get('linux_user_configuration', None) + self.windows_user_configuration = kwargs.get('windows_user_configuration', None) -class Certificate(ProxyResource): - """Contains information about a certificate. +class UserIdentity(Model): + """The definition of the user identity under which the task is run. - Variables are only populated by the server, and will be ignored when - sending a request. + Specify either the userName or autoUser property, but not both. - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param thumbprint_algorithm: The algorithm of the certificate thumbprint. - This must match the first portion of the certificate name. Currently - required to be 'SHA1'. - :type thumbprint_algorithm: str - :param thumbprint: The thumbprint of the certificate. This must match the - thumbprint from the name. - :type thumbprint: str - :param format: The format of the certificate - either Pfx or Cer. If - omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' - :type format: str or ~azure.mgmt.batch.models.CertificateFormat - :ivar provisioning_state: The provisioned state of the resource. Possible - values include: 'Succeeded', 'Deleting', 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.batch.models.CertificateProvisioningState - :ivar provisioning_state_transition_time: The time at which the - certificate entered its current state. - :vartype provisioning_state_transition_time: datetime - :ivar previous_provisioning_state: The previous provisioned state of the - resource. Possible values include: 'Succeeded', 'Deleting', 'Failed' - :vartype previous_provisioning_state: str or - ~azure.mgmt.batch.models.CertificateProvisioningState - :ivar previous_provisioning_state_transition_time: The time at which the - certificate entered its previous state. - :vartype previous_provisioning_state_transition_time: datetime - :ivar public_data: The public key of the certificate. - :vartype public_data: str - :ivar delete_certificate_error: The error which occurred while deleting - the certificate. This is only returned when the certificate - provisioningState is 'Failed'. - :vartype delete_certificate_error: - ~azure.mgmt.batch.models.DeleteCertificateError + :param user_name: The name of the user identity under which the task is + run. The userName and autoUser properties are mutually exclusive; you must + specify one but not both. + :type user_name: str + :param auto_user: The auto user under which the task is run. The userName + and autoUser properties are mutually exclusive; you must specify one but + not both. + :type auto_user: ~azure.mgmt.batch.models.AutoUserSpecification + """ + + _attribute_map = { + 'user_name': {'key': 'userName', 'type': 'str'}, + 'auto_user': {'key': 'autoUser', 'type': 'AutoUserSpecification'}, + } + + def __init__(self, **kwargs): + super(UserIdentity, self).__init__(**kwargs) + self.user_name = kwargs.get('user_name', None) + self.auto_user = kwargs.get('auto_user', None) + + +class VirtualMachineConfiguration(Model): + """The configuration for compute nodes in a pool based on the Azure Virtual + Machines infrastructure. + + All required parameters must be populated in order to send to Azure. + + :param image_reference: Required. A reference to the Azure Virtual + Machines Marketplace Image or the custom Virtual Machine Image to use. + :type image_reference: ~azure.mgmt.batch.models.ImageReference + :param node_agent_sku_id: Required. The SKU of the Batch node agent to be + provisioned on compute nodes in the pool. The Batch node agent is a + program that runs on each node in the pool, and provides the + command-and-control interface between the node and the Batch service. + There are different implementations of the node agent, known as SKUs, for + different operating systems. You must specify a node agent SKU which + matches the selected image reference. To get the list of supported node + agent SKUs along with their list of verified image references, see the + 'List supported node agent SKUs' operation. + :type node_agent_sku_id: str + :param windows_configuration: Windows operating system settings on the + virtual machine. This property must not be specified if the imageReference + specifies a Linux OS image. + :type windows_configuration: ~azure.mgmt.batch.models.WindowsConfiguration + :param data_disks: The configuration for data disks attached to the + compute nodes in the pool. This property must be specified if the compute + nodes in the pool need to have empty data disks attached to them. + :type data_disks: list[~azure.mgmt.batch.models.DataDisk] + :param license_type: The type of on-premises license to be used when + deploying the operating system. This only applies to images that contain + the Windows operating system, and should only be used when you hold valid + on-premises licenses for the nodes which will be deployed. If omitted, no + on-premises licensing discount is applied. Values are: + Windows_Server - The on-premises license is for Windows Server. + Windows_Client - The on-premises license is for Windows Client. + :type license_type: str + :param container_configuration: The container configuration for the pool. + If specified, setup is performed on each node in the pool to allow tasks + to run in containers. All regular tasks and job manager tasks run on this + pool must specify the containerSettings property, and all other tasks may + specify it. + :type container_configuration: + ~azure.mgmt.batch.models.ContainerConfiguration """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'provisioning_state_transition_time': {'readonly': True}, - 'previous_provisioning_state': {'readonly': True}, - 'previous_provisioning_state_transition_time': {'readonly': True}, - 'public_data': {'readonly': True}, - 'delete_certificate_error': {'readonly': True}, + 'image_reference': {'required': True}, + 'node_agent_sku_id': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'CertificateProvisioningState'}, - 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, - 'previous_provisioning_state': {'key': 'properties.previousProvisioningState', 'type': 'CertificateProvisioningState'}, - 'previous_provisioning_state_transition_time': {'key': 'properties.previousProvisioningStateTransitionTime', 'type': 'iso-8601'}, - 'public_data': {'key': 'properties.publicData', 'type': 'str'}, - 'delete_certificate_error': {'key': 'properties.deleteCertificateError', 'type': 'DeleteCertificateError'}, + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'node_agent_sku_id': {'key': 'nodeAgentSkuId', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + 'container_configuration': {'key': 'containerConfiguration', 'type': 'ContainerConfiguration'}, } - def __init__(self, thumbprint_algorithm=None, thumbprint=None, format=None): - super(Certificate, self).__init__() - self.thumbprint_algorithm = thumbprint_algorithm - self.thumbprint = thumbprint - self.format = format - self.provisioning_state = None - self.provisioning_state_transition_time = None - self.previous_provisioning_state = None - self.previous_provisioning_state_transition_time = None - self.public_data = None - self.delete_certificate_error = None + def __init__(self, **kwargs): + super(VirtualMachineConfiguration, self).__init__(**kwargs) + self.image_reference = kwargs.get('image_reference', None) + self.node_agent_sku_id = kwargs.get('node_agent_sku_id', None) + self.windows_configuration = kwargs.get('windows_configuration', None) + self.data_disks = kwargs.get('data_disks', None) + self.license_type = kwargs.get('license_type', None) + self.container_configuration = kwargs.get('container_configuration', None) -class CertificateCreateOrUpdateParameters(ProxyResource): - """Contains information about a certificate. +class VirtualMachineFamilyCoreQuota(Model): + """A VM Family and its associated core quota for the Batch account. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. + :ivar name: The Virtual Machine family name. :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param thumbprint_algorithm: The algorithm of the certificate thumbprint. - This must match the first portion of the certificate name. Currently - required to be 'SHA1'. - :type thumbprint_algorithm: str - :param thumbprint: The thumbprint of the certificate. This must match the - thumbprint from the name. - :type thumbprint: str - :param format: The format of the certificate - either Pfx or Cer. If - omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' - :type format: str or ~azure.mgmt.batch.models.CertificateFormat - :param data: The base64-encoded contents of the certificate. The maximum - size is 10KB. - :type data: str - :param password: The password to access the certificate's private key. - This is required if the certificate format is pfx and must be omitted if - the certificate format is cer. - :type password: str + :ivar core_quota: The core quota for the VM family for the Batch account. + :vartype core_quota: int """ _validation = { - 'id': {'readonly': True}, 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'data': {'required': True}, + 'core_quota': {'readonly': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, - 'data': {'key': 'properties.data', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, + 'core_quota': {'key': 'coreQuota', 'type': 'int'}, } - def __init__(self, data, thumbprint_algorithm=None, thumbprint=None, format=None, password=None): - super(CertificateCreateOrUpdateParameters, self).__init__() - self.thumbprint_algorithm = thumbprint_algorithm - self.thumbprint = thumbprint - self.format = format - self.data = data - self.password = password - + def __init__(self, **kwargs): + super(VirtualMachineFamilyCoreQuota, self).__init__(**kwargs) + self.name = None + self.core_quota = None -class Pool(ProxyResource): - """Contains information about a pool. - Variables are only populated by the server, and will be ignored when - sending a request. +class WindowsConfiguration(Model): + """Windows operating system settings to apply to the virtual machine. - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param display_name: The display name for the pool. The display name need - not be unique and can contain any Unicode characters up to a maximum - length of 1024. - :type display_name: str - :ivar last_modified: The last modified time of the pool. This is the last - time at which the pool level data, such as the targetDedicatedNodes or - autoScaleSettings, changed. It does not factor in node-level changes such - as a compute node changing state. - :vartype last_modified: datetime - :ivar creation_time: The creation time of the pool. - :vartype creation_time: datetime - :ivar provisioning_state: The current state of the pool. Possible values - include: 'Succeeded', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.batch.models.PoolProvisioningState - :ivar provisioning_state_transition_time: The time at which the pool - entered its current state. - :vartype provisioning_state_transition_time: datetime - :ivar allocation_state: Whether the pool is resizing. Possible values - include: 'Steady', 'Resizing', 'Stopping' - :vartype allocation_state: str or ~azure.mgmt.batch.models.AllocationState - :ivar allocation_state_transition_time: The time at which the pool entered - its current allocation state. - :vartype allocation_state_transition_time: datetime - :param vm_size: The size of virtual machines in the pool. All VMs in a - pool are the same size. For information about available sizes of virtual - machines for Cloud Services pools (pools created with - cloudServiceConfiguration), see Sizes for Cloud Services - (http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). - Batch supports all Cloud Services VM sizes except ExtraSmall. For - information about available VM sizes for pools using images from the - Virtual Machines Marketplace (pools created with - virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) - (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) - or Sizes for Virtual Machines (Windows) - (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). - Batch supports all Azure VM sizes except STANDARD_A0 and those with - premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). - :type vm_size: str - :param deployment_configuration: This property describes how the pool - nodes will be deployed - using Cloud Services or Virtual Machines. Using - CloudServiceConfiguration specifies that the nodes should be creating - using Azure Cloud Services (PaaS), while VirtualMachineConfiguration uses - Azure Virtual Machines (IaaS). - :type deployment_configuration: - ~azure.mgmt.batch.models.DeploymentConfiguration - :ivar current_dedicated_nodes: The number of compute nodes currently in - the pool. - :vartype current_dedicated_nodes: int - :ivar current_low_priority_nodes: The number of low priority compute nodes - currently in the pool. - :vartype current_low_priority_nodes: int - :param scale_settings: Settings which configure the number of nodes in the - pool. - :type scale_settings: ~azure.mgmt.batch.models.ScaleSettings - :ivar auto_scale_run: The results and errors from the last execution of - the autoscale formula. This property is set only if the pool automatically - scales, i.e. autoScaleSettings are used. - :vartype auto_scale_run: ~azure.mgmt.batch.models.AutoScaleRun - :param inter_node_communication: Whether the pool permits direct - communication between nodes. This imposes restrictions on which nodes can - be assigned to the pool. Enabling this value can reduce the chance of the - requested number of nodes to be allocated in the pool. If not specified, - this value defaults to 'Disabled'. Possible values include: 'Enabled', - 'Disabled' - :type inter_node_communication: str or - ~azure.mgmt.batch.models.InterNodeCommunicationState - :param network_configuration: The network configuration for the pool. - :type network_configuration: ~azure.mgmt.batch.models.NetworkConfiguration - :param max_tasks_per_node: The maximum number of tasks that can run - concurrently on a single compute node in the pool. - :type max_tasks_per_node: int - :param task_scheduling_policy: How tasks are distributed across compute - nodes in a pool. - :type task_scheduling_policy: - ~azure.mgmt.batch.models.TaskSchedulingPolicy - :param user_accounts: The list of user accounts to be created on each node - in the pool. - :type user_accounts: list[~azure.mgmt.batch.models.UserAccount] - :param metadata: A list of name-value pairs associated with the pool as - metadata. The Batch service does not assign any meaning to metadata; it is - solely for the use of user code. - :type metadata: list[~azure.mgmt.batch.models.MetadataItem] - :param start_task: A task specified to run on each compute node as it - joins the pool. In an PATCH (update) operation, this property can be set - to an empty object to remove the start task from the pool. - :type start_task: ~azure.mgmt.batch.models.StartTask - :param certificates: The list of certificates to be installed on each - compute node in the pool. For Windows compute nodes, the Batch service - installs the certificates to the specified certificate store and location. - For Linux compute nodes, the certificates are stored in a directory inside - the task working directory and an environment variable - AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this - location. For certificates with visibility of 'remoteUser', a 'certs' - directory is created in the user's home directory (e.g., - /home/{user-name}/certs) and certificates are placed in that directory. - :type certificates: list[~azure.mgmt.batch.models.CertificateReference] - :param application_packages: The list of application packages to be - installed on each compute node in the pool. Changes to application - packages affect all new compute nodes joining the pool, but do not affect - compute nodes that are already in the pool until they are rebooted or - reimaged. - :type application_packages: - list[~azure.mgmt.batch.models.ApplicationPackageReference] - :param application_licenses: The list of application licenses the Batch - service will make available on each compute node in the pool. The list of - application licenses must be a subset of available Batch service - application licenses. If a license is requested which is not supported, - pool creation will fail. - :type application_licenses: list[str] - :ivar resize_operation_status: Contains details about the current or last - completed resize operation. - :vartype resize_operation_status: - ~azure.mgmt.batch.models.ResizeOperationStatus + :param enable_automatic_updates: Whether automatic updates are enabled on + the virtual machine. If omitted, the default value is true. + :type enable_automatic_updates: bool """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'last_modified': {'readonly': True}, - 'creation_time': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'provisioning_state_transition_time': {'readonly': True}, - 'allocation_state': {'readonly': True}, - 'allocation_state_transition_time': {'readonly': True}, - 'current_dedicated_nodes': {'readonly': True}, - 'current_low_priority_nodes': {'readonly': True}, - 'auto_scale_run': {'readonly': True}, - 'resize_operation_status': {'readonly': True}, + _attribute_map = { + 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, } + def __init__(self, **kwargs): + super(WindowsConfiguration, self).__init__(**kwargs) + self.enable_automatic_updates = kwargs.get('enable_automatic_updates', None) + + +class WindowsUserConfiguration(Model): + """Properties used to create a user account on a Windows node. + + :param login_mode: Login mode for user. Specifies login mode for the user. + The default value for VirtualMachineConfiguration pools is interactive + mode and for CloudServiceConfiguration pools is batch mode. Possible + values include: 'Batch', 'Interactive' + :type login_mode: str or ~azure.mgmt.batch.models.LoginMode + """ + _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'PoolProvisioningState'}, - 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, - 'allocation_state': {'key': 'properties.allocationState', 'type': 'AllocationState'}, - 'allocation_state_transition_time': {'key': 'properties.allocationStateTransitionTime', 'type': 'iso-8601'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'deployment_configuration': {'key': 'properties.deploymentConfiguration', 'type': 'DeploymentConfiguration'}, - 'current_dedicated_nodes': {'key': 'properties.currentDedicatedNodes', 'type': 'int'}, - 'current_low_priority_nodes': {'key': 'properties.currentLowPriorityNodes', 'type': 'int'}, - 'scale_settings': {'key': 'properties.scaleSettings', 'type': 'ScaleSettings'}, - 'auto_scale_run': {'key': 'properties.autoScaleRun', 'type': 'AutoScaleRun'}, - 'inter_node_communication': {'key': 'properties.interNodeCommunication', 'type': 'InterNodeCommunicationState'}, - 'network_configuration': {'key': 'properties.networkConfiguration', 'type': 'NetworkConfiguration'}, - 'max_tasks_per_node': {'key': 'properties.maxTasksPerNode', 'type': 'int'}, - 'task_scheduling_policy': {'key': 'properties.taskSchedulingPolicy', 'type': 'TaskSchedulingPolicy'}, - 'user_accounts': {'key': 'properties.userAccounts', 'type': '[UserAccount]'}, - 'metadata': {'key': 'properties.metadata', 'type': '[MetadataItem]'}, - 'start_task': {'key': 'properties.startTask', 'type': 'StartTask'}, - 'certificates': {'key': 'properties.certificates', 'type': '[CertificateReference]'}, - 'application_packages': {'key': 'properties.applicationPackages', 'type': '[ApplicationPackageReference]'}, - 'application_licenses': {'key': 'properties.applicationLicenses', 'type': '[str]'}, - 'resize_operation_status': {'key': 'properties.resizeOperationStatus', 'type': 'ResizeOperationStatus'}, + 'login_mode': {'key': 'loginMode', 'type': 'LoginMode'}, } - def __init__(self, display_name=None, vm_size=None, deployment_configuration=None, scale_settings=None, inter_node_communication=None, network_configuration=None, max_tasks_per_node=None, task_scheduling_policy=None, user_accounts=None, metadata=None, start_task=None, certificates=None, application_packages=None, application_licenses=None): - super(Pool, self).__init__() - self.display_name = display_name - self.last_modified = None - self.creation_time = None - self.provisioning_state = None - self.provisioning_state_transition_time = None - self.allocation_state = None - self.allocation_state_transition_time = None - self.vm_size = vm_size - self.deployment_configuration = deployment_configuration - self.current_dedicated_nodes = None - self.current_low_priority_nodes = None - self.scale_settings = scale_settings - self.auto_scale_run = None - self.inter_node_communication = inter_node_communication - self.network_configuration = network_configuration - self.max_tasks_per_node = max_tasks_per_node - self.task_scheduling_policy = task_scheduling_policy - self.user_accounts = user_accounts - self.metadata = metadata - self.start_task = start_task - self.certificates = certificates - self.application_packages = application_packages - self.application_licenses = application_licenses - self.resize_operation_status = None + def __init__(self, **kwargs): + super(WindowsUserConfiguration, self).__init__(**kwargs) + self.login_mode = kwargs.get('login_mode', None) diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models_py3.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models_py3.py index c64ee92d4c21..1a287b5e2e90 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models_py3.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models_py3.py @@ -16,7 +16,10 @@ class ActivateApplicationPackageParameters(Model): """Parameters for an activating an application package. - :param format: The format of the application package binary file. + All required parameters must be populated in order to send to Azure. + + :param format: Required. The format of the application package binary + file. :type format: str """ @@ -28,17 +31,170 @@ class ActivateApplicationPackageParameters(Model): 'format': {'key': 'format', 'type': 'str'}, } - def __init__(self, format): - super(ActivateApplicationPackageParameters, self).__init__() + def __init__(self, *, format: str, **kwargs) -> None: + super(ActivateApplicationPackageParameters, self).__init__(**kwargs) self.format = format +class ProxyResource(Model): + """A definition of an Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ProxyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.etag = None + + +class Application(ProxyResource): + """Contains information about an application in a Batch account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :param display_name: The display name for the application. + :type display_name: str + :param allow_updates: A value indicating whether packages within the + application may be overwritten using the same version string. + :type allow_updates: bool + :param default_version: The package to use if a client requests the + application but does not specify a version. This property can only be set + to the name of an existing package. + :type default_version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'allow_updates': {'key': 'properties.allowUpdates', 'type': 'bool'}, + 'default_version': {'key': 'properties.defaultVersion', 'type': 'str'}, + } + + def __init__(self, *, display_name: str=None, allow_updates: bool=None, default_version: str=None, **kwargs) -> None: + super(Application, self).__init__(**kwargs) + self.display_name = display_name + self.allow_updates = allow_updates + self.default_version = default_version + + +class ApplicationPackage(ProxyResource): + """An application package which represents a particular version of an + application. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :ivar state: The current state of the application package. Possible values + include: 'Pending', 'Active' + :vartype state: str or ~azure.mgmt.batch.models.PackageState + :ivar format: The format of the application package, if the package is + active. + :vartype format: str + :ivar storage_url: The URL for the application package in Azure Storage. + :vartype storage_url: str + :ivar storage_url_expiry: The UTC time at which the Azure Storage URL will + expire. + :vartype storage_url_expiry: datetime + :ivar last_activation_time: The time at which the package was last + activated, if the package is active. + :vartype last_activation_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'state': {'readonly': True}, + 'format': {'readonly': True}, + 'storage_url': {'readonly': True}, + 'storage_url_expiry': {'readonly': True}, + 'last_activation_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'PackageState'}, + 'format': {'key': 'properties.format', 'type': 'str'}, + 'storage_url': {'key': 'properties.storageUrl', 'type': 'str'}, + 'storage_url_expiry': {'key': 'properties.storageUrlExpiry', 'type': 'iso-8601'}, + 'last_activation_time': {'key': 'properties.lastActivationTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(ApplicationPackage, self).__init__(**kwargs) + self.state = None + self.format = None + self.storage_url = None + self.storage_url_expiry = None + self.last_activation_time = None + + class ApplicationPackageReference(Model): """Link to an application package inside the batch account. - :param id: The ID of the application package to install. This must be - inside the same batch account as the pool. This can either be a reference - to a specific version or the default version if one exists. + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the application package to install. This + must be inside the same batch account as the pool. This can either be a + reference to a specific version or the default version if one exists. :type id: str :param version: The version of the application to deploy. If omitted, the default version is deployed. If this is omitted, and no default version is @@ -57,8 +213,8 @@ class ApplicationPackageReference(Model): 'version': {'key': 'version', 'type': 'str'}, } - def __init__(self, id, version=None): - super(ApplicationPackageReference, self).__init__() + def __init__(self, *, id: str, version: str=None, **kwargs) -> None: + super(ApplicationPackageReference, self).__init__(**kwargs) self.id = id self.version = version @@ -66,8 +222,10 @@ def __init__(self, id, version=None): class AutoScaleRun(Model): """The results and errors from an execution of a pool autoscale formula. - :param evaluation_time: The time at which the autoscale formula was last - evaluated. + All required parameters must be populated in order to send to Azure. + + :param evaluation_time: Required. The time at which the autoscale formula + was last evaluated. :type evaluation_time: datetime :param results: The final values of all variables used in the evaluation of the autoscale formula. Each variable value is returned in the form @@ -88,8 +246,8 @@ class AutoScaleRun(Model): 'error': {'key': 'error', 'type': 'AutoScaleRunError'}, } - def __init__(self, evaluation_time, results=None, error=None): - super(AutoScaleRun, self).__init__() + def __init__(self, *, evaluation_time, results: str=None, error=None, **kwargs) -> None: + super(AutoScaleRun, self).__init__(**kwargs) self.evaluation_time = evaluation_time self.results = results self.error = error @@ -98,11 +256,13 @@ def __init__(self, evaluation_time, results=None, error=None): class AutoScaleRunError(Model): """An error that occurred when autoscaling a pool. - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. + All required parameters must be populated in order to send to Azure. + + :param code: Required. An identifier for the error. Codes are invariant + and are intended to be consumed programmatically. :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. + :param message: Required. A message describing the error, intended to be + suitable for display in a user interface. :type message: str :param details: Additional details about the error. :type details: list[~azure.mgmt.batch.models.AutoScaleRunError] @@ -119,8 +279,8 @@ class AutoScaleRunError(Model): 'details': {'key': 'details', 'type': '[AutoScaleRunError]'}, } - def __init__(self, code, message, details=None): - super(AutoScaleRunError, self).__init__() + def __init__(self, *, code: str, message: str, details=None, **kwargs) -> None: + super(AutoScaleRunError, self).__init__(**kwargs) self.code = code self.message = message self.details = details @@ -129,8 +289,10 @@ def __init__(self, code, message, details=None): class AutoScaleSettings(Model): """AutoScale settings for the pool. - :param formula: A formula for the desired number of compute nodes in the - pool. + All required parameters must be populated in order to send to Azure. + + :param formula: Required. A formula for the desired number of compute + nodes in the pool. :type formula: str :param evaluation_interval: The time interval at which to automatically adjust the pool size according to the autoscale formula. If omitted, the @@ -147,8 +309,8 @@ class AutoScaleSettings(Model): 'evaluation_interval': {'key': 'evaluationInterval', 'type': 'duration'}, } - def __init__(self, formula, evaluation_interval=None): - super(AutoScaleSettings, self).__init__() + def __init__(self, *, formula: str, evaluation_interval=None, **kwargs) -> None: + super(AutoScaleSettings, self).__init__(**kwargs) self.formula = formula self.evaluation_interval = evaluation_interval @@ -156,8 +318,10 @@ def __init__(self, formula, evaluation_interval=None): class AutoStorageBaseProperties(Model): """The properties related to the auto-storage account. - :param storage_account_id: The resource ID of the storage account to be - used for auto-storage account. + All required parameters must be populated in order to send to Azure. + + :param storage_account_id: Required. The resource ID of the storage + account to be used for auto-storage account. :type storage_account_id: str """ @@ -169,23 +333,54 @@ class AutoStorageBaseProperties(Model): 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, } - def __init__(self, storage_account_id): - super(AutoStorageBaseProperties, self).__init__() + def __init__(self, *, storage_account_id: str, **kwargs) -> None: + super(AutoStorageBaseProperties, self).__init__(**kwargs) self.storage_account_id = storage_account_id +class AutoStorageProperties(AutoStorageBaseProperties): + """Contains information about the auto-storage account associated with a Batch + account. + + All required parameters must be populated in order to send to Azure. + + :param storage_account_id: Required. The resource ID of the storage + account to be used for auto-storage account. + :type storage_account_id: str + :param last_key_sync: Required. The UTC time at which storage keys were + last synchronized with the Batch account. + :type last_key_sync: datetime + """ + + _validation = { + 'storage_account_id': {'required': True}, + 'last_key_sync': {'required': True}, + } + + _attribute_map = { + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + 'last_key_sync': {'key': 'lastKeySync', 'type': 'iso-8601'}, + } + + def __init__(self, *, storage_account_id: str, last_key_sync, **kwargs) -> None: + super(AutoStorageProperties, self).__init__(storage_account_id=storage_account_id, **kwargs) + self.last_key_sync = last_key_sync + + class AutoUserSpecification(Model): """Specifies the parameters for the auto user that runs a task on the Batch service. - :param scope: The scope for the auto user. The default value is task. + :param scope: The scope for the auto user. The default value is Pool. If + the pool is running Windows a value of Task should be specified if + stricter isolation between tasks is required. For example, if the task + mutates the registry in a way which could impact other tasks, or if + certificates have been specified on the pool which should not be + accessible by normal tasks but should be accessible by start tasks. Possible values include: 'Task', 'Pool' :type scope: str or ~azure.mgmt.batch.models.AutoUserScope - :param elevation_level: The elevation level of the auto user. nonAdmin - - The auto user is a standard user without elevated access. admin - The auto - user is a user with elevated access and operates with full Administrator - permissions. The default value is nonAdmin. Possible values include: - 'NonAdmin', 'Admin' + :param elevation_level: The elevation level of the auto user. The default + value is nonAdmin. Possible values include: 'NonAdmin', 'Admin' :type elevation_level: str or ~azure.mgmt.batch.models.ElevationLevel """ @@ -194,94 +389,356 @@ class AutoUserSpecification(Model): 'elevation_level': {'key': 'elevationLevel', 'type': 'ElevationLevel'}, } - def __init__(self, scope=None, elevation_level=None): - super(AutoUserSpecification, self).__init__() + def __init__(self, *, scope=None, elevation_level=None, **kwargs) -> None: + super(AutoUserSpecification, self).__init__(**kwargs) self.scope = scope self.elevation_level = elevation_level -class BatchAccountCreateParameters(Model): - """Parameters supplied to the Create operation. +class AzureBlobFileSystemConfiguration(Model): + """Blobfuse file system details. + + All required parameters must be populated in order to send to Azure. + + :param account_name: Required. The Azure Storage account name. + :type account_name: str + :param container_name: Required. The Azure Blob Storage container name. + :type container_name: str + :param account_key: The Azure Storage account key. This property is + mutually exclusive with sasKey and one must be specified. + :type account_key: str + :param sas_key: The Azure Storage SAS token. This property is mutually + exclusive with accountKey and one must be specified. + :type sas_key: str + :param blobfuse_options: Additional command line options to pass to the + mount command. These are 'net use' options in Windows and 'mount' options + in Linux. + :type blobfuse_options: str + :param relative_mount_path: Required. The relative path on the compute + node where the file system will be mounted. All file systems are mounted + relative to the Batch mounts directory, accessible via the + AZ_BATCH_NODE_MOUNTS_DIR environment variable. + :type relative_mount_path: str + """ - :param location: The region in which to create the account. - :type location: str - :param tags: The user-specified tags associated with the account. - :type tags: dict[str, str] - :param auto_storage: The properties related to the auto-storage account. - :type auto_storage: ~azure.mgmt.batch.models.AutoStorageBaseProperties - :param pool_allocation_mode: The allocation mode to use for creating pools - in the Batch account. The pool allocation mode also affects how clients - may authenticate to the Batch Service API. If the mode is BatchService, - clients may authenticate using access keys or Azure Active Directory. If - the mode is UserSubscription, clients must use Azure Active Directory. The - default is BatchService. Possible values include: 'BatchService', - 'UserSubscription' - :type pool_allocation_mode: str or - ~azure.mgmt.batch.models.PoolAllocationMode - :param key_vault_reference: A reference to the Azure key vault associated - with the Batch account. - :type key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference + _validation = { + 'account_name': {'required': True}, + 'container_name': {'required': True}, + 'relative_mount_path': {'required': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'account_key': {'key': 'accountKey', 'type': 'str'}, + 'sas_key': {'key': 'sasKey', 'type': 'str'}, + 'blobfuse_options': {'key': 'blobfuseOptions', 'type': 'str'}, + 'relative_mount_path': {'key': 'relativeMountPath', 'type': 'str'}, + } + + def __init__(self, *, account_name: str, container_name: str, relative_mount_path: str, account_key: str=None, sas_key: str=None, blobfuse_options: str=None, **kwargs) -> None: + super(AzureBlobFileSystemConfiguration, self).__init__(**kwargs) + self.account_name = account_name + self.container_name = container_name + self.account_key = account_key + self.sas_key = sas_key + self.blobfuse_options = blobfuse_options + self.relative_mount_path = relative_mount_path + + +class AzureFileShareConfiguration(Model): + """Azure Files details. + + All required parameters must be populated in order to send to Azure. + + :param account_name: Required. The Azure Storage account name. + :type account_name: str + :param azure_file_url: Required. The Azure Files URL. + :type azure_file_url: str + :param account_key: Required. The Azure Storage account key. + :type account_key: str + :param relative_mount_path: Required. The relative path on the compute + node where the file system will be mounted. All file systems are mounted + relative to the Batch mounts directory, accessible via the + AZ_BATCH_NODE_MOUNTS_DIR environment variable. + :type relative_mount_path: str + :param mount_options: Specifies various mount options that can be used. + :type mount_options: str """ _validation = { - 'location': {'required': True}, + 'account_name': {'required': True}, + 'azure_file_url': {'required': True}, + 'account_key': {'required': True}, + 'relative_mount_path': {'required': True}, } _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageBaseProperties'}, - 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, - 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'azure_file_url': {'key': 'azureFileUrl', 'type': 'str'}, + 'account_key': {'key': 'accountKey', 'type': 'str'}, + 'relative_mount_path': {'key': 'relativeMountPath', 'type': 'str'}, + 'mount_options': {'key': 'mountOptions', 'type': 'str'}, } - def __init__(self, location, tags=None, auto_storage=None, pool_allocation_mode=None, key_vault_reference=None): - super(BatchAccountCreateParameters, self).__init__() - self.location = location - self.tags = tags - self.auto_storage = auto_storage - self.pool_allocation_mode = pool_allocation_mode - self.key_vault_reference = key_vault_reference + def __init__(self, *, account_name: str, azure_file_url: str, account_key: str, relative_mount_path: str, mount_options: str=None, **kwargs) -> None: + super(AzureFileShareConfiguration, self).__init__(**kwargs) + self.account_name = account_name + self.azure_file_url = azure_file_url + self.account_key = account_key + self.relative_mount_path = relative_mount_path + self.mount_options = mount_options -class BatchAccountKeys(Model): - """A set of Azure Batch account keys. +class Resource(Model): + """A definition of an Azure resource. Variables are only populated by the server, and will be ignored when sending a request. - :ivar account_name: The Batch account name. - :vartype account_name: str - :ivar primary: The primary key associated with the account. - :vartype primary: str - :ivar secondary: The secondary key associated with the account. - :vartype secondary: str + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar location: The location of the resource. + :vartype location: str + :ivar tags: The tags of the resource. + :vartype tags: dict[str, str] """ _validation = { - 'account_name': {'readonly': True}, - 'primary': {'readonly': True}, - 'secondary': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'readonly': True}, } _attribute_map = { - 'account_name': {'key': 'accountName', 'type': 'str'}, - 'primary': {'key': 'primary', 'type': 'str'}, - 'secondary': {'key': 'secondary', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self): - super(BatchAccountKeys, self).__init__() - self.account_name = None - self.primary = None - self.secondary = None - + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.tags = None + + +class BatchAccount(Resource): + """Contains information about an Azure Batch account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar location: The location of the resource. + :vartype location: str + :ivar tags: The tags of the resource. + :vartype tags: dict[str, str] + :ivar account_endpoint: The account endpoint used to interact with the + Batch service. + :vartype account_endpoint: str + :ivar provisioning_state: The provisioned state of the resource. Possible + values include: 'Invalid', 'Creating', 'Deleting', 'Succeeded', 'Failed', + 'Cancelled' + :vartype provisioning_state: str or + ~azure.mgmt.batch.models.ProvisioningState + :ivar pool_allocation_mode: The allocation mode to use for creating pools + in the Batch account. Possible values include: 'BatchService', + 'UserSubscription' + :vartype pool_allocation_mode: str or + ~azure.mgmt.batch.models.PoolAllocationMode + :ivar key_vault_reference: A reference to the Azure key vault associated + with the Batch account. + :vartype key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference + :ivar auto_storage: The properties and status of any auto-storage account + associated with the Batch account. + :vartype auto_storage: ~azure.mgmt.batch.models.AutoStorageProperties + :ivar dedicated_core_quota: The dedicated core quota for the Batch + account. For accounts with PoolAllocationMode set to UserSubscription, + quota is managed on the subscription so this value is not returned. + :vartype dedicated_core_quota: int + :ivar low_priority_core_quota: The low-priority core quota for the Batch + account. For accounts with PoolAllocationMode set to UserSubscription, + quota is managed on the subscription so this value is not returned. + :vartype low_priority_core_quota: int + :ivar dedicated_core_quota_per_vm_family: A list of the dedicated core + quota per Virtual Machine family for the Batch account. For accounts with + PoolAllocationMode set to UserSubscription, quota is managed on the + subscription so this value is not returned. + :vartype dedicated_core_quota_per_vm_family: + list[~azure.mgmt.batch.models.VirtualMachineFamilyCoreQuota] + :ivar dedicated_core_quota_per_vm_family_enforced: A value indicating + whether the core quota for the Batch Account is enforced per Virtual + Machine family or not. Batch is transitioning its core quota system for + dedicated cores to be enforced per Virtual Machine family. During this + transitional phase, the dedicated core quota per Virtual Machine family + may not yet be enforced. If this flag is false, dedicated core quota is + enforced via the old dedicatedCoreQuota property on the account and does + not consider Virtual Machine family. If this flag is true, dedicated core + quota is enforced via the dedicatedCoreQuotaPerVMFamily property on the + account, and the old dedicatedCoreQuota does not apply. + :vartype dedicated_core_quota_per_vm_family_enforced: bool + :ivar pool_quota: The pool quota for the Batch account. + :vartype pool_quota: int + :ivar active_job_and_job_schedule_quota: The active job and job schedule + quota for the Batch account. + :vartype active_job_and_job_schedule_quota: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'readonly': True}, + 'account_endpoint': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'pool_allocation_mode': {'readonly': True}, + 'key_vault_reference': {'readonly': True}, + 'auto_storage': {'readonly': True}, + 'dedicated_core_quota': {'readonly': True}, + 'low_priority_core_quota': {'readonly': True}, + 'dedicated_core_quota_per_vm_family': {'readonly': True}, + 'dedicated_core_quota_per_vm_family_enforced': {'readonly': True}, + 'pool_quota': {'readonly': True}, + 'active_job_and_job_schedule_quota': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'account_endpoint': {'key': 'properties.accountEndpoint', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, + 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, + 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageProperties'}, + 'dedicated_core_quota': {'key': 'properties.dedicatedCoreQuota', 'type': 'int'}, + 'low_priority_core_quota': {'key': 'properties.lowPriorityCoreQuota', 'type': 'int'}, + 'dedicated_core_quota_per_vm_family': {'key': 'properties.dedicatedCoreQuotaPerVMFamily', 'type': '[VirtualMachineFamilyCoreQuota]'}, + 'dedicated_core_quota_per_vm_family_enforced': {'key': 'properties.dedicatedCoreQuotaPerVMFamilyEnforced', 'type': 'bool'}, + 'pool_quota': {'key': 'properties.poolQuota', 'type': 'int'}, + 'active_job_and_job_schedule_quota': {'key': 'properties.activeJobAndJobScheduleQuota', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(BatchAccount, self).__init__(**kwargs) + self.account_endpoint = None + self.provisioning_state = None + self.pool_allocation_mode = None + self.key_vault_reference = None + self.auto_storage = None + self.dedicated_core_quota = None + self.low_priority_core_quota = None + self.dedicated_core_quota_per_vm_family = None + self.dedicated_core_quota_per_vm_family_enforced = None + self.pool_quota = None + self.active_job_and_job_schedule_quota = None + + +class BatchAccountCreateParameters(Model): + """Parameters supplied to the Create operation. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The region in which to create the account. + :type location: str + :param tags: The user-specified tags associated with the account. + :type tags: dict[str, str] + :param auto_storage: The properties related to the auto-storage account. + :type auto_storage: ~azure.mgmt.batch.models.AutoStorageBaseProperties + :param pool_allocation_mode: The allocation mode to use for creating pools + in the Batch account. The pool allocation mode also affects how clients + may authenticate to the Batch Service API. If the mode is BatchService, + clients may authenticate using access keys or Azure Active Directory. If + the mode is UserSubscription, clients must use Azure Active Directory. The + default is BatchService. Possible values include: 'BatchService', + 'UserSubscription' + :type pool_allocation_mode: str or + ~azure.mgmt.batch.models.PoolAllocationMode + :param key_vault_reference: A reference to the Azure key vault associated + with the Batch account. + :type key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference + """ + + _validation = { + 'location': {'required': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageBaseProperties'}, + 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, + 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, + } + + def __init__(self, *, location: str, tags=None, auto_storage=None, pool_allocation_mode=None, key_vault_reference=None, **kwargs) -> None: + super(BatchAccountCreateParameters, self).__init__(**kwargs) + self.location = location + self.tags = tags + self.auto_storage = auto_storage + self.pool_allocation_mode = pool_allocation_mode + self.key_vault_reference = key_vault_reference + + +class BatchAccountKeys(Model): + """A set of Azure Batch account keys. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar account_name: The Batch account name. + :vartype account_name: str + :ivar primary: The primary key associated with the account. + :vartype primary: str + :ivar secondary: The secondary key associated with the account. + :vartype secondary: str + """ + + _validation = { + 'account_name': {'readonly': True}, + 'primary': {'readonly': True}, + 'secondary': {'readonly': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'primary': {'key': 'primary', 'type': 'str'}, + 'secondary': {'key': 'secondary', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(BatchAccountKeys, self).__init__(**kwargs) + self.account_name = None + self.primary = None + self.secondary = None + class BatchAccountRegenerateKeyParameters(Model): """Parameters supplied to the RegenerateKey operation. - :param key_name: The type of account key to regenerate. Possible values - include: 'Primary', 'Secondary' + All required parameters must be populated in order to send to Azure. + + :param key_name: Required. The type of account key to regenerate. Possible + values include: 'Primary', 'Secondary' :type key_name: str or ~azure.mgmt.batch.models.AccountKeyType """ @@ -293,8 +750,8 @@ class BatchAccountRegenerateKeyParameters(Model): 'key_name': {'key': 'keyName', 'type': 'AccountKeyType'}, } - def __init__(self, key_name): - super(BatchAccountRegenerateKeyParameters, self).__init__() + def __init__(self, *, key_name, **kwargs) -> None: + super(BatchAccountRegenerateKeyParameters, self).__init__(**kwargs) self.key_name = key_name @@ -312,8 +769,8 @@ class BatchAccountUpdateParameters(Model): 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageBaseProperties'}, } - def __init__(self, tags=None, auto_storage=None): - super(BatchAccountUpdateParameters, self).__init__() + def __init__(self, *, tags=None, auto_storage=None, **kwargs) -> None: + super(BatchAccountUpdateParameters, self).__init__(**kwargs) self.tags = tags self.auto_storage = auto_storage @@ -337,11 +794,100 @@ class BatchLocationQuota(Model): 'account_quota': {'key': 'accountQuota', 'type': 'int'}, } - def __init__(self): - super(BatchLocationQuota, self).__init__() + def __init__(self, **kwargs) -> None: + super(BatchLocationQuota, self).__init__(**kwargs) self.account_quota = None +class Certificate(ProxyResource): + """Contains information about a certificate. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :param thumbprint_algorithm: The algorithm of the certificate thumbprint. + This must match the first portion of the certificate name. Currently + required to be 'SHA1'. + :type thumbprint_algorithm: str + :param thumbprint: The thumbprint of the certificate. This must match the + thumbprint from the name. + :type thumbprint: str + :param format: The format of the certificate - either Pfx or Cer. If + omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' + :type format: str or ~azure.mgmt.batch.models.CertificateFormat + :ivar provisioning_state: The provisioned state of the resource. Possible + values include: 'Succeeded', 'Deleting', 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.batch.models.CertificateProvisioningState + :ivar provisioning_state_transition_time: The time at which the + certificate entered its current state. + :vartype provisioning_state_transition_time: datetime + :ivar previous_provisioning_state: The previous provisioned state of the + resource. Possible values include: 'Succeeded', 'Deleting', 'Failed' + :vartype previous_provisioning_state: str or + ~azure.mgmt.batch.models.CertificateProvisioningState + :ivar previous_provisioning_state_transition_time: The time at which the + certificate entered its previous state. + :vartype previous_provisioning_state_transition_time: datetime + :ivar public_data: The public key of the certificate. + :vartype public_data: str + :ivar delete_certificate_error: The error which occurred while deleting + the certificate. This is only returned when the certificate + provisioningState is 'Failed'. + :vartype delete_certificate_error: + ~azure.mgmt.batch.models.DeleteCertificateError + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'provisioning_state_transition_time': {'readonly': True}, + 'previous_provisioning_state': {'readonly': True}, + 'previous_provisioning_state_transition_time': {'readonly': True}, + 'public_data': {'readonly': True}, + 'delete_certificate_error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'CertificateProvisioningState'}, + 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, + 'previous_provisioning_state': {'key': 'properties.previousProvisioningState', 'type': 'CertificateProvisioningState'}, + 'previous_provisioning_state_transition_time': {'key': 'properties.previousProvisioningStateTransitionTime', 'type': 'iso-8601'}, + 'public_data': {'key': 'properties.publicData', 'type': 'str'}, + 'delete_certificate_error': {'key': 'properties.deleteCertificateError', 'type': 'DeleteCertificateError'}, + } + + def __init__(self, *, thumbprint_algorithm: str=None, thumbprint: str=None, format=None, **kwargs) -> None: + super(Certificate, self).__init__(**kwargs) + self.thumbprint_algorithm = thumbprint_algorithm + self.thumbprint = thumbprint + self.format = format + self.provisioning_state = None + self.provisioning_state_transition_time = None + self.previous_provisioning_state = None + self.previous_provisioning_state_transition_time = None + self.public_data = None + self.delete_certificate_error = None + + class CertificateBaseProperties(Model): """CertificateBaseProperties. @@ -363,19 +909,85 @@ class CertificateBaseProperties(Model): 'format': {'key': 'format', 'type': 'CertificateFormat'}, } - def __init__(self, thumbprint_algorithm=None, thumbprint=None, format=None): - super(CertificateBaseProperties, self).__init__() + def __init__(self, *, thumbprint_algorithm: str=None, thumbprint: str=None, format=None, **kwargs) -> None: + super(CertificateBaseProperties, self).__init__(**kwargs) self.thumbprint_algorithm = thumbprint_algorithm self.thumbprint = thumbprint self.format = format -class CertificateReference(Model): - """A reference to a certificate to be installed on compute nodes in a pool. +class CertificateCreateOrUpdateParameters(ProxyResource): + """Contains information about a certificate. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: The ETag of the resource, used for concurrency statements. + :vartype etag: str + :param thumbprint_algorithm: The algorithm of the certificate thumbprint. + This must match the first portion of the certificate name. Currently + required to be 'SHA1'. + :type thumbprint_algorithm: str + :param thumbprint: The thumbprint of the certificate. This must match the + thumbprint from the name. + :type thumbprint: str + :param format: The format of the certificate - either Pfx or Cer. If + omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' + :type format: str or ~azure.mgmt.batch.models.CertificateFormat + :param data: Required. The base64-encoded contents of the certificate. The + maximum size is 10KB. + :type data: str + :param password: The password to access the certificate's private key. + This is required if the certificate format is pfx and must be omitted if + the certificate format is cer. + :type password: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, + 'data': {'key': 'properties.data', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + } + + def __init__(self, *, data: str, thumbprint_algorithm: str=None, thumbprint: str=None, format=None, password: str=None, **kwargs) -> None: + super(CertificateCreateOrUpdateParameters, self).__init__(**kwargs) + self.thumbprint_algorithm = thumbprint_algorithm + self.thumbprint = thumbprint + self.format = format + self.data = data + self.password = password + + +class CertificateReference(Model): + """A reference to a certificate to be installed on compute nodes in a pool. This must exist inside the same account as the pool. - :param id: The fully qualified ID of the certificate to install on the - pool. This must be inside the same batch account as the pool. + All required parameters must be populated in order to send to Azure. + + :param id: Required. The fully qualified ID of the certificate to install + on the pool. This must be inside the same batch account as the pool. :type id: str :param store_location: The location of the certificate store on the compute node into which to install the certificate. The default value is @@ -415,8 +1027,8 @@ class CertificateReference(Model): 'visibility': {'key': 'visibility', 'type': '[CertificateVisibility]'}, } - def __init__(self, id, store_location=None, store_name=None, visibility=None): - super(CertificateReference, self).__init__() + def __init__(self, *, id: str, store_location=None, store_name: str=None, visibility=None, **kwargs) -> None: + super(CertificateReference, self).__init__(**kwargs) self.id = id self.store_location = store_location self.store_name = store_name @@ -429,9 +1041,11 @@ class CheckNameAvailabilityParameters(Model): Variables are only populated by the server, and will be ignored when sending a request. - :param name: The name to check for availability + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name to check for availability :type name: str - :ivar type: The resource type. Must be set to + :ivar type: Required. The resource type. Must be set to Microsoft.Batch/batchAccounts. Default value: "Microsoft.Batch/batchAccounts" . :vartype type: str @@ -449,8 +1063,8 @@ class CheckNameAvailabilityParameters(Model): type = "Microsoft.Batch/batchAccounts" - def __init__(self, name): - super(CheckNameAvailabilityParameters, self).__init__() + def __init__(self, *, name: str, **kwargs) -> None: + super(CheckNameAvailabilityParameters, self).__init__(**kwargs) self.name = name @@ -485,23 +1099,130 @@ class CheckNameAvailabilityResult(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self): - super(CheckNameAvailabilityResult, self).__init__() + def __init__(self, **kwargs) -> None: + super(CheckNameAvailabilityResult, self).__init__(**kwargs) self.name_available = None self.reason = None self.message = None +class CIFSMountConfiguration(Model): + """CIFS file system details. + + All required parameters must be populated in order to send to Azure. + + :param username: Required. The user to use for authentication against the + CIFS file system. + :type username: str + :param source: Required. The URI of the file system to mount. + :type source: str + :param relative_mount_path: Required. The relative path on the compute + node where the file system will be mounted. All file systems are mounted + relative to the Batch mounts directory, accessible via the + AZ_BATCH_NODE_MOUNTS_DIR environment variable. + :type relative_mount_path: str + :param mount_options: Specifies various mount options that can be used. + :type mount_options: str + :param password: Required. The password to authenticate with. + :type password: str + """ + + _validation = { + 'username': {'required': True}, + 'source': {'required': True}, + 'relative_mount_path': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'username': {'key': 'username', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'relative_mount_path': {'key': 'relativeMountPath', 'type': 'str'}, + 'mount_options': {'key': 'mountOptions', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__(self, *, username: str, source: str, relative_mount_path: str, password: str, mount_options: str=None, **kwargs) -> None: + super(CIFSMountConfiguration, self).__init__(**kwargs) + self.username = username + self.source = source + self.relative_mount_path = relative_mount_path + self.mount_options = mount_options + self.password = password + + +class CloudError(Model): + """An error response from the Batch service. + + :param error: + :type error: ~azure.mgmt.batch.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(CloudError, self).__init__(**kwargs) + self.error = error + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class CloudErrorBody(Model): + """An error response from the Batch service. + + :param code: An identifier for the error. Codes are invariant and are + intended to be consumed programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable + for display in a user interface. + :type message: str + :param target: The target of the particular error. For example, the name + of the property in error. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.batch.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: + super(CloudErrorBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + class CloudServiceConfiguration(Model): """The configuration for nodes in a pool based on the Azure Cloud Services platform. - :param os_family: The Azure Guest OS family to be installed on the virtual - machines in the pool. Possible values are: 2 - OS Family 2, equivalent to - Windows Server 2008 R2 SP1. 3 - OS Family 3, equivalent to Windows Server - 2012. 4 - OS Family 4, equivalent to Windows Server 2012 R2. 5 - OS Family - 5, equivalent to Windows Server 2016. For more information, see Azure - Guest OS Releases + All required parameters must be populated in order to send to Azure. + + :param os_family: Required. The Azure Guest OS family to be installed on + the virtual machines in the pool. Possible values are: 2 - OS Family 2, + equivalent to Windows Server 2008 R2 SP1. 3 - OS Family 3, equivalent to + Windows Server 2012. 4 - OS Family 4, equivalent to Windows Server 2012 + R2. 5 - OS Family 5, equivalent to Windows Server 2016. 6 - OS Family 6, + equivalent to Windows Server 2019. For more information, see Azure Guest + OS Releases (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). :type os_family: str :param os_version: The Azure Guest OS version to be installed on the @@ -519,8 +1240,8 @@ class CloudServiceConfiguration(Model): 'os_version': {'key': 'osVersion', 'type': 'str'}, } - def __init__(self, os_family, os_version=None): - super(CloudServiceConfiguration, self).__init__() + def __init__(self, *, os_family: str, os_version: str=None, **kwargs) -> None: + super(CloudServiceConfiguration, self).__init__(**kwargs) self.os_family = os_family self.os_version = os_version @@ -531,7 +1252,9 @@ class ContainerConfiguration(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar type: The container technology to be used. Default value: + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. The container technology to be used. Default value: "DockerCompatible" . :vartype type: str :param container_image_names: The collection of container image names. @@ -559,8 +1282,8 @@ class ContainerConfiguration(Model): type = "DockerCompatible" - def __init__(self, container_image_names=None, container_registries=None): - super(ContainerConfiguration, self).__init__() + def __init__(self, *, container_image_names=None, container_registries=None, **kwargs) -> None: + super(ContainerConfiguration, self).__init__(**kwargs) self.container_image_names = container_image_names self.container_registries = container_registries @@ -568,12 +1291,14 @@ def __init__(self, container_image_names=None, container_registries=None): class ContainerRegistry(Model): """A private container registry. + All required parameters must be populated in order to send to Azure. + :param registry_server: The registry URL. If omitted, the default is "docker.io". :type registry_server: str - :param user_name: The user name to log into the registry server. + :param user_name: Required. The user name to log into the registry server. :type user_name: str - :param password: The password to log into the registry server. + :param password: Required. The password to log into the registry server. :type password: str """ @@ -588,20 +1313,23 @@ class ContainerRegistry(Model): 'password': {'key': 'password', 'type': 'str'}, } - def __init__(self, user_name, password, registry_server=None): - super(ContainerRegistry, self).__init__() + def __init__(self, *, user_name: str, password: str, registry_server: str=None, **kwargs) -> None: + super(ContainerRegistry, self).__init__(**kwargs) self.registry_server = registry_server self.user_name = user_name self.password = password class DataDisk(Model): - """Data Disk settings which will be used by the data disks associated to - Compute Nodes in the pool. + """Settings which will be used by the data disks associated to Compute Nodes + in the Pool. When using attached data disks, you need to mount and format + the disks from within a VM to use them. - :param lun: The logical unit number. The lun is used to uniquely identify - each data disk. If attaching multiple disks, each should have a distinct - lun. + All required parameters must be populated in order to send to Azure. + + :param lun: Required. The logical unit number. The lun is used to uniquely + identify each data disk. If attaching multiple disks, each should have a + distinct lun. :type lun: int :param caching: The type of caching to be enabled for the data disks. Values are: @@ -613,8 +1341,8 @@ class DataDisk(Model): https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. Possible values include: 'None', 'ReadOnly', 'ReadWrite' :type caching: str or ~azure.mgmt.batch.models.CachingType - :param disk_size_gb: The initial disk size in GB when creating new data - disk. + :param disk_size_gb: Required. The initial disk size in GB when creating + new data disk. :type disk_size_gb: int :param storage_account_type: The storage account type to be used for the data disk. If omitted, the default is "Standard_LRS". Values are: @@ -638,8 +1366,8 @@ class DataDisk(Model): 'storage_account_type': {'key': 'storageAccountType', 'type': 'StorageAccountType'}, } - def __init__(self, lun, disk_size_gb, caching=None, storage_account_type=None): - super(DataDisk, self).__init__() + def __init__(self, *, lun: int, disk_size_gb: int, caching=None, storage_account_type=None, **kwargs) -> None: + super(DataDisk, self).__init__(**kwargs) self.lun = lun self.caching = caching self.disk_size_gb = disk_size_gb @@ -649,11 +1377,13 @@ def __init__(self, lun, disk_size_gb, caching=None, storage_account_type=None): class DeleteCertificateError(Model): """An error response from the Batch service. - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. + All required parameters must be populated in order to send to Azure. + + :param code: Required. An identifier for the error. Codes are invariant + and are intended to be consumed programmatically. :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. + :param message: Required. A message describing the error, intended to be + suitable for display in a user interface. :type message: str :param target: The target of the particular error. For example, the name of the property in error. @@ -674,8 +1404,8 @@ class DeleteCertificateError(Model): 'details': {'key': 'details', 'type': '[DeleteCertificateError]'}, } - def __init__(self, code, message, target=None, details=None): - super(DeleteCertificateError, self).__init__() + def __init__(self, *, code: str, message: str, target: str=None, details=None, **kwargs) -> None: + super(DeleteCertificateError, self).__init__(**kwargs) self.code = code self.message = message self.target = target @@ -704,8 +1434,8 @@ class DeploymentConfiguration(Model): 'virtual_machine_configuration': {'key': 'virtualMachineConfiguration', 'type': 'VirtualMachineConfiguration'}, } - def __init__(self, cloud_service_configuration=None, virtual_machine_configuration=None): - super(DeploymentConfiguration, self).__init__() + def __init__(self, *, cloud_service_configuration=None, virtual_machine_configuration=None, **kwargs) -> None: + super(DeploymentConfiguration, self).__init__(**kwargs) self.cloud_service_configuration = cloud_service_configuration self.virtual_machine_configuration = virtual_machine_configuration @@ -713,7 +1443,9 @@ def __init__(self, cloud_service_configuration=None, virtual_machine_configurati class EnvironmentSetting(Model): """An environment variable to be set on a task process. - :param name: The name of the environment variable. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the environment variable. :type name: str :param value: The value of the environment variable. :type value: str @@ -728,8 +1460,8 @@ class EnvironmentSetting(Model): 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, name, value=None): - super(EnvironmentSetting, self).__init__() + def __init__(self, *, name: str, value: str=None, **kwargs) -> None: + super(EnvironmentSetting, self).__init__(**kwargs) self.name = name self.value = value @@ -767,8 +1499,8 @@ class FixedScaleSettings(Model): 'node_deallocation_option': {'key': 'nodeDeallocationOption', 'type': 'ComputeNodeDeallocationOption'}, } - def __init__(self, resize_timeout=None, target_dedicated_nodes=None, target_low_priority_nodes=None, node_deallocation_option=None): - super(FixedScaleSettings, self).__init__() + def __init__(self, *, resize_timeout=None, target_dedicated_nodes: int=None, target_low_priority_nodes: int=None, node_deallocation_option=None, **kwargs) -> None: + super(FixedScaleSettings, self).__init__(**kwargs) self.resize_timeout = resize_timeout self.target_dedicated_nodes = target_dedicated_nodes self.target_low_priority_nodes = target_low_priority_nodes @@ -788,22 +1520,25 @@ class ImageReference(Model): image. For example, UbuntuServer or WindowsServer. :type offer: str :param sku: The SKU of the Azure Virtual Machines Marketplace image. For - example, 14.04.0-LTS or 2012-R2-Datacenter. + example, 18.04-LTS or 2019-Datacenter. :type sku: str :param version: The version of the Azure Virtual Machines Marketplace image. A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'. :type version: str - :param id: The ARM resource identifier of the virtual machine image. - Computes nodes of the pool will be created using this custom image. This - is of the form - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}. - This property is mutually exclusive with other properties. The virtual - machine image must be in the same region and subscription as the Azure - Batch account. For information about the firewall settings for Batch node - agent to communicate with Batch service see - https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration - . + :param id: The ARM resource identifier of the Virtual Machine Image or + Shared Image Gallery Image. Compute Nodes of the Pool will be created + using this Image Id. This is of either the form + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} + for Virtual Machine Image or + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{versionId} + for SIG image. This property is mutually exclusive with other properties. + For Virtual Machine Image it must be in the same region and subscription + as the Azure Batch account. For SIG image it must have replicas in the + same region as the Azure Batch account. For information about the firewall + settings for the Batch node agent to communicate with the Batch service + see + https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. :type id: str """ @@ -815,8 +1550,8 @@ class ImageReference(Model): 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, publisher=None, offer=None, sku=None, version=None, id=None): - super(ImageReference, self).__init__() + def __init__(self, *, publisher: str=None, offer: str=None, sku: str=None, version: str=None, id: str=None, **kwargs) -> None: + super(ImageReference, self).__init__(**kwargs) self.publisher = publisher self.offer = offer self.sku = sku @@ -828,30 +1563,32 @@ class InboundNatPool(Model): """A inbound NAT pool that can be used to address specific ports on compute nodes in a Batch pool externally. - :param name: The name of the endpoint. The name must be unique within a - Batch pool, can contain letters, numbers, underscores, periods, and - hyphens. Names must start with a letter or number, must end with a letter, - number, or underscore, and cannot exceed 77 characters. If any invalid - values are provided the request fails with HTTP status code 400. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the endpoint. The name must be unique + within a Batch pool, can contain letters, numbers, underscores, periods, + and hyphens. Names must start with a letter or number, must end with a + letter, number, or underscore, and cannot exceed 77 characters. If any + invalid values are provided the request fails with HTTP status code 400. :type name: str - :param protocol: The protocol of the endpoint. Possible values include: - 'TCP', 'UDP' + :param protocol: Required. The protocol of the endpoint. Possible values + include: 'TCP', 'UDP' :type protocol: str or ~azure.mgmt.batch.models.InboundEndpointProtocol - :param backend_port: The port number on the compute node. This must be - unique within a Batch pool. Acceptable values are between 1 and 65535 - except for 22, 3389, 29876 and 29877 as these are reserved. If any + :param backend_port: Required. The port number on the compute node. This + must be unique within a Batch pool. Acceptable values are between 1 and + 65535 except for 22, 3389, 29876 and 29877 as these are reserved. If any reserved values are provided the request fails with HTTP status code 400. :type backend_port: int - :param frontend_port_range_start: The first port number in the range of - external ports that will be used to provide inbound access to the + :param frontend_port_range_start: Required. The first port number in the + range of external ports that will be used to provide inbound access to the backendPort on individual compute nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved. All ranges within a pool must be distinct and cannot overlap. If any reserved or overlapping values are provided the request fails with HTTP status code 400. :type frontend_port_range_start: int - :param frontend_port_range_end: The last port number in the range of - external ports that will be used to provide inbound access to the + :param frontend_port_range_end: Required. The last port number in the + range of external ports that will be used to provide inbound access to the backendPort on individual compute nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved by the Batch service. All ranges within a pool must be distinct and cannot overlap. If @@ -886,8 +1623,8 @@ class InboundNatPool(Model): 'network_security_group_rules': {'key': 'networkSecurityGroupRules', 'type': '[NetworkSecurityGroupRule]'}, } - def __init__(self, name, protocol, backend_port, frontend_port_range_start, frontend_port_range_end, network_security_group_rules=None): - super(InboundNatPool, self).__init__() + def __init__(self, *, name: str, protocol, backend_port: int, frontend_port_range_start: int, frontend_port_range_end: int, network_security_group_rules=None, **kwargs) -> None: + super(InboundNatPool, self).__init__(**kwargs) self.name = name self.protocol = protocol self.backend_port = backend_port @@ -899,11 +1636,13 @@ def __init__(self, name, protocol, backend_port, frontend_port_range_start, fron class KeyVaultReference(Model): """Identifies the Azure key vault associated with a Batch account. - :param id: The resource ID of the Azure key vault associated with the - Batch account. + All required parameters must be populated in order to send to Azure. + + :param id: Required. The resource ID of the Azure key vault associated + with the Batch account. :type id: str - :param url: The URL of the Azure key vault associated with the Batch - account. + :param url: Required. The URL of the Azure key vault associated with the + Batch account. :type url: str """ @@ -917,8 +1656,8 @@ class KeyVaultReference(Model): 'url': {'key': 'url', 'type': 'str'}, } - def __init__(self, id, url): - super(KeyVaultReference, self).__init__() + def __init__(self, *, id: str, url: str, **kwargs) -> None: + super(KeyVaultReference, self).__init__(**kwargs) self.id = id self.url = url @@ -951,8 +1690,8 @@ class LinuxUserConfiguration(Model): 'ssh_private_key': {'key': 'sshPrivateKey', 'type': 'str'}, } - def __init__(self, uid=None, gid=None, ssh_private_key=None): - super(LinuxUserConfiguration, self).__init__() + def __init__(self, *, uid: int=None, gid: int=None, ssh_private_key: str=None, **kwargs) -> None: + super(LinuxUserConfiguration, self).__init__(**kwargs) self.uid = uid self.gid = gid self.ssh_private_key = ssh_private_key @@ -964,9 +1703,11 @@ class MetadataItem(Model): The Batch service does not assign any meaning to this metadata; it is solely for the use of user code. - :param name: The name of the metadata item. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the metadata item. :type name: str - :param value: The value of the metadata item. + :param value: Required. The value of the metadata item. :type value: str """ @@ -980,12 +1721,52 @@ class MetadataItem(Model): 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, name, value): - super(MetadataItem, self).__init__() + def __init__(self, *, name: str, value: str, **kwargs) -> None: + super(MetadataItem, self).__init__(**kwargs) self.name = name self.value = value +class MountConfiguration(Model): + """The file system to mount on each node. + + Each property is mutually exclusive. + + :param azure_blob_file_system_configuration: The Azure Storage container + to mount using blob FUSE on each node. This property is mutually exclusive + with all other properties. + :type azure_blob_file_system_configuration: + ~azure.mgmt.batch.models.AzureBlobFileSystemConfiguration + :param nfs_mount_configuration: The NFS file system to mount on each node. + This property is mutually exclusive with all other properties. + :type nfs_mount_configuration: + ~azure.mgmt.batch.models.NFSMountConfiguration + :param cifs_mount_configuration: The CIFS/SMB file system to mount on each + node. This property is mutually exclusive with all other properties. + :type cifs_mount_configuration: + ~azure.mgmt.batch.models.CIFSMountConfiguration + :param azure_file_share_configuration: The Azure File Share to mount on + each node. This is CIFS based for linux and net use for for windows, and + this property is mutually exclusive with all other properties. + :type azure_file_share_configuration: + ~azure.mgmt.batch.models.AzureFileShareConfiguration + """ + + _attribute_map = { + 'azure_blob_file_system_configuration': {'key': 'azureBlobFileSystemConfiguration', 'type': 'AzureBlobFileSystemConfiguration'}, + 'nfs_mount_configuration': {'key': 'nfsMountConfiguration', 'type': 'NFSMountConfiguration'}, + 'cifs_mount_configuration': {'key': 'cifsMountConfiguration', 'type': 'CIFSMountConfiguration'}, + 'azure_file_share_configuration': {'key': 'azureFileShareConfiguration', 'type': 'AzureFileShareConfiguration'}, + } + + def __init__(self, *, azure_blob_file_system_configuration=None, nfs_mount_configuration=None, cifs_mount_configuration=None, azure_file_share_configuration=None, **kwargs) -> None: + super(MountConfiguration, self).__init__(**kwargs) + self.azure_blob_file_system_configuration = azure_blob_file_system_configuration + self.nfs_mount_configuration = nfs_mount_configuration + self.cifs_mount_configuration = cifs_mount_configuration + self.azure_file_share_configuration = azure_file_share_configuration + + class NetworkConfiguration(Model): """The network configuration for a pool. @@ -1020,39 +1801,58 @@ class NetworkConfiguration(Model): pools with the virtualMachineConfiguration property. :type endpoint_configuration: ~azure.mgmt.batch.models.PoolEndpointConfiguration + :param public_ips: The list of public IPs which the Batch service will use + when provisioning Compute Nodes. The number of IPs specified here limits + the maximum size of the Pool - 50 dedicated nodes or 20 low-priority nodes + can be allocated for each public IP. For example, a pool needing 150 + dedicated VMs would need at least 3 public IPs specified. This is of the + form: + /subscriptions/{subscription}/resourceGroups/{group}/providers/Microsoft.Network/publicIPAddresses/{ip}. + :type public_ips: list[str] """ _attribute_map = { 'subnet_id': {'key': 'subnetId', 'type': 'str'}, 'endpoint_configuration': {'key': 'endpointConfiguration', 'type': 'PoolEndpointConfiguration'}, + 'public_ips': {'key': 'publicIPs', 'type': '[str]'}, } - def __init__(self, subnet_id=None, endpoint_configuration=None): - super(NetworkConfiguration, self).__init__() + def __init__(self, *, subnet_id: str=None, endpoint_configuration=None, public_ips=None, **kwargs) -> None: + super(NetworkConfiguration, self).__init__(**kwargs) self.subnet_id = subnet_id self.endpoint_configuration = endpoint_configuration + self.public_ips = public_ips class NetworkSecurityGroupRule(Model): """A network security group rule to apply to an inbound endpoint. - :param priority: The priority for this rule. Priorities within a pool must - be unique and are evaluated in order of priority. The lower the number the - higher the priority. For example, rules could be specified with order - numbers of 150, 250, and 350. The rule with the order number of 150 takes - precedence over the rule that has an order of 250. Allowed priorities are - 150 to 3500. If any reserved or duplicate values are provided the request - fails with HTTP status code 400. + All required parameters must be populated in order to send to Azure. + + :param priority: Required. The priority for this rule. Priorities within a + pool must be unique and are evaluated in order of priority. The lower the + number the higher the priority. For example, rules could be specified with + order numbers of 150, 250, and 350. The rule with the order number of 150 + takes precedence over the rule that has an order of 250. Allowed + priorities are 150 to 3500. If any reserved or duplicate values are + provided the request fails with HTTP status code 400. :type priority: int - :param access: The action that should be taken for a specified IP address, - subnet range or tag. Possible values include: 'Allow', 'Deny' + :param access: Required. The action that should be taken for a specified + IP address, subnet range or tag. Possible values include: 'Allow', 'Deny' :type access: str or ~azure.mgmt.batch.models.NetworkSecurityGroupRuleAccess - :param source_address_prefix: The source address prefix or tag to match - for the rule. Valid values are a single IP address (i.e. 10.10.10.10), IP - subnet (i.e. 192.168.1.0/24), default tag, or * (for all addresses). If - any other values are provided the request fails with HTTP status code 400. + :param source_address_prefix: Required. The source address prefix or tag + to match for the rule. Valid values are a single IP address (i.e. + 10.10.10.10), IP subnet (i.e. 192.168.1.0/24), default tag, or * (for all + addresses). If any other values are provided the request fails with HTTP + status code 400. :type source_address_prefix: str + :param source_port_ranges: The source port ranges to match for the rule. + Valid values are '*' (for all ports 0 - 65535) or arrays of ports or port + ranges (i.e. 100-200). The ports should in the range of 0 to 65535 and the + port ranges or ports can't overlap. If any other values are provided the + request fails with HTTP status code 400. Default value will be *. + :type source_port_ranges: list[str] """ _validation = { @@ -1065,13 +1865,49 @@ class NetworkSecurityGroupRule(Model): 'priority': {'key': 'priority', 'type': 'int'}, 'access': {'key': 'access', 'type': 'NetworkSecurityGroupRuleAccess'}, 'source_address_prefix': {'key': 'sourceAddressPrefix', 'type': 'str'}, + 'source_port_ranges': {'key': 'sourcePortRanges', 'type': '[str]'}, } - def __init__(self, priority, access, source_address_prefix): - super(NetworkSecurityGroupRule, self).__init__() + def __init__(self, *, priority: int, access, source_address_prefix: str, source_port_ranges=None, **kwargs) -> None: + super(NetworkSecurityGroupRule, self).__init__(**kwargs) self.priority = priority self.access = access self.source_address_prefix = source_address_prefix + self.source_port_ranges = source_port_ranges + + +class NFSMountConfiguration(Model): + """NFS file system detail. + + All required parameters must be populated in order to send to Azure. + + :param source: Required. The URI of the file system to mount. + :type source: str + :param relative_mount_path: Required. The relative path on the compute + node where the file system will be mounted. All file systems are mounted + relative to the Batch mounts directory, accessible via the + AZ_BATCH_NODE_MOUNTS_DIR environment variable. + :type relative_mount_path: str + :param mount_options: Specifies various mount options that can be used. + :type mount_options: str + """ + + _validation = { + 'source': {'required': True}, + 'relative_mount_path': {'required': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'str'}, + 'relative_mount_path': {'key': 'relativeMountPath', 'type': 'str'}, + 'mount_options': {'key': 'mountOptions', 'type': 'str'}, + } + + def __init__(self, *, source: str, relative_mount_path: str, mount_options: str=None, **kwargs) -> None: + super(NFSMountConfiguration, self).__init__(**kwargs) + self.source = source + self.relative_mount_path = relative_mount_path + self.mount_options = mount_options class Operation(Model): @@ -1095,8 +1931,8 @@ class Operation(Model): 'properties': {'key': 'properties', 'type': 'object'}, } - def __init__(self, name=None, display=None, origin=None, properties=None): - super(Operation, self).__init__() + def __init__(self, *, name: str=None, display=None, origin: str=None, properties=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) self.name = name self.display = display self.origin = origin @@ -1124,40 +1960,16 @@ class OperationDisplay(Model): 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, provider=None, operation=None, resource=None, description=None): - super(OperationDisplay, self).__init__() + def __init__(self, *, provider: str=None, operation: str=None, resource: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) self.provider = provider self.operation = operation self.resource = resource self.description = description -class PoolEndpointConfiguration(Model): - """The endpoint configuration for a pool. - - :param inbound_nat_pools: A list of inbound NAT pools that can be used to - address specific ports on an individual compute node externally. The - maximum number of inbound NAT pools per Batch pool is 5. If the maximum - number of inbound NAT pools is exceeded the request fails with HTTP status - code 400. - :type inbound_nat_pools: list[~azure.mgmt.batch.models.InboundNatPool] - """ - - _validation = { - 'inbound_nat_pools': {'required': True}, - } - - _attribute_map = { - 'inbound_nat_pools': {'key': 'inboundNatPools', 'type': '[InboundNatPool]'}, - } - - def __init__(self, inbound_nat_pools): - super(PoolEndpointConfiguration, self).__init__() - self.inbound_nat_pools = inbound_nat_pools - - -class ProxyResource(Model): - """A definition of an Azure resource. +class Pool(ProxyResource): + """Contains information about a pool. Variables are only populated by the server, and will be ignored when sending a request. @@ -1170,1151 +1982,771 @@ class ProxyResource(Model): :vartype type: str :ivar etag: The ETag of the resource, used for concurrency statements. :vartype etag: str + :param display_name: The display name for the pool. The display name need + not be unique and can contain any Unicode characters up to a maximum + length of 1024. + :type display_name: str + :ivar last_modified: The last modified time of the pool. This is the last + time at which the pool level data, such as the targetDedicatedNodes or + autoScaleSettings, changed. It does not factor in node-level changes such + as a compute node changing state. + :vartype last_modified: datetime + :ivar creation_time: The creation time of the pool. + :vartype creation_time: datetime + :ivar provisioning_state: The current state of the pool. Possible values + include: 'Succeeded', 'Deleting' + :vartype provisioning_state: str or + ~azure.mgmt.batch.models.PoolProvisioningState + :ivar provisioning_state_transition_time: The time at which the pool + entered its current state. + :vartype provisioning_state_transition_time: datetime + :ivar allocation_state: Whether the pool is resizing. Possible values + include: 'Steady', 'Resizing', 'Stopping' + :vartype allocation_state: str or ~azure.mgmt.batch.models.AllocationState + :ivar allocation_state_transition_time: The time at which the pool entered + its current allocation state. + :vartype allocation_state_transition_time: datetime + :param vm_size: The size of virtual machines in the pool. All VMs in a + pool are the same size. For information about available sizes of virtual + machines for Cloud Services pools (pools created with + cloudServiceConfiguration), see Sizes for Cloud Services + (http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). + Batch supports all Cloud Services VM sizes except ExtraSmall. For + information about available VM sizes for pools using images from the + Virtual Machines Marketplace (pools created with + virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) + (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) + or Sizes for Virtual Machines (Windows) + (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). + Batch supports all Azure VM sizes except STANDARD_A0 and those with + premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). + :type vm_size: str + :param deployment_configuration: This property describes how the pool + nodes will be deployed - using Cloud Services or Virtual Machines. Using + CloudServiceConfiguration specifies that the nodes should be creating + using Azure Cloud Services (PaaS), while VirtualMachineConfiguration uses + Azure Virtual Machines (IaaS). + :type deployment_configuration: + ~azure.mgmt.batch.models.DeploymentConfiguration + :ivar current_dedicated_nodes: The number of compute nodes currently in + the pool. + :vartype current_dedicated_nodes: int + :ivar current_low_priority_nodes: The number of low priority compute nodes + currently in the pool. + :vartype current_low_priority_nodes: int + :param scale_settings: Settings which configure the number of nodes in the + pool. + :type scale_settings: ~azure.mgmt.batch.models.ScaleSettings + :ivar auto_scale_run: The results and errors from the last execution of + the autoscale formula. This property is set only if the pool automatically + scales, i.e. autoScaleSettings are used. + :vartype auto_scale_run: ~azure.mgmt.batch.models.AutoScaleRun + :param inter_node_communication: Whether the pool permits direct + communication between nodes. This imposes restrictions on which nodes can + be assigned to the pool. Enabling this value can reduce the chance of the + requested number of nodes to be allocated in the pool. If not specified, + this value defaults to 'Disabled'. Possible values include: 'Enabled', + 'Disabled' + :type inter_node_communication: str or + ~azure.mgmt.batch.models.InterNodeCommunicationState + :param network_configuration: The network configuration for the pool. + :type network_configuration: ~azure.mgmt.batch.models.NetworkConfiguration + :param max_tasks_per_node: The maximum number of tasks that can run + concurrently on a single compute node in the pool. The default value is 1. + The maximum value is the smaller of 4 times the number of cores of the + vmSize of the pool or 256. + :type max_tasks_per_node: int + :param task_scheduling_policy: How tasks are distributed across compute + nodes in a pool. If not specified, the default is spread. + :type task_scheduling_policy: + ~azure.mgmt.batch.models.TaskSchedulingPolicy + :param user_accounts: The list of user accounts to be created on each node + in the pool. + :type user_accounts: list[~azure.mgmt.batch.models.UserAccount] + :param metadata: A list of name-value pairs associated with the pool as + metadata. The Batch service does not assign any meaning to metadata; it is + solely for the use of user code. + :type metadata: list[~azure.mgmt.batch.models.MetadataItem] + :param start_task: A task specified to run on each compute node as it + joins the pool. In an PATCH (update) operation, this property can be set + to an empty object to remove the start task from the pool. + :type start_task: ~azure.mgmt.batch.models.StartTask + :param certificates: The list of certificates to be installed on each + compute node in the pool. For Windows compute nodes, the Batch service + installs the certificates to the specified certificate store and location. + For Linux compute nodes, the certificates are stored in a directory inside + the task working directory and an environment variable + AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this + location. For certificates with visibility of 'remoteUser', a 'certs' + directory is created in the user's home directory (e.g., + /home/{user-name}/certs) and certificates are placed in that directory. + :type certificates: list[~azure.mgmt.batch.models.CertificateReference] + :param application_packages: The list of application packages to be + installed on each compute node in the pool. Changes to application package + references affect all new compute nodes joining the pool, but do not + affect compute nodes that are already in the pool until they are rebooted + or reimaged. There is a maximum of 10 application package references on + any given pool. + :type application_packages: + list[~azure.mgmt.batch.models.ApplicationPackageReference] + :param application_licenses: The list of application licenses the Batch + service will make available on each compute node in the pool. The list of + application licenses must be a subset of available Batch service + application licenses. If a license is requested which is not supported, + pool creation will fail. + :type application_licenses: list[str] + :ivar resize_operation_status: Contains details about the current or last + completed resize operation. + :vartype resize_operation_status: + ~azure.mgmt.batch.models.ResizeOperationStatus + :param mount_configuration: A list of file systems to mount on each node + in the pool. This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. + :type mount_configuration: + list[~azure.mgmt.batch.models.MountConfiguration] """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - } - - def __init__(self): - super(ProxyResource, self).__init__() - self.id = None - self.name = None - self.type = None - self.etag = None - - -class ResizeError(Model): - """An error that occurred when resizing a pool. - - :param code: An identifier for the error. Codes are invariant and are - intended to be consumed programmatically. - :type code: str - :param message: A message describing the error, intended to be suitable - for display in a user interface. - :type message: str - :param details: Additional details about the error. - :type details: list[~azure.mgmt.batch.models.ResizeError] - """ - - _validation = { - 'code': {'required': True}, - 'message': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ResizeError]'}, - } - - def __init__(self, code, message, details=None): - super(ResizeError, self).__init__() - self.code = code - self.message = message - self.details = details - - -class ResizeOperationStatus(Model): - """Details about the current or last completed resize operation. - - Describes either the current operation (if the pool AllocationState is - Resizing) or the previously completed operation (if the AllocationState is - Steady). - - :param target_dedicated_nodes: The desired number of dedicated compute - nodes in the pool. - :type target_dedicated_nodes: int - :param target_low_priority_nodes: The desired number of low-priority - compute nodes in the pool. - :type target_low_priority_nodes: int - :param resize_timeout: The timeout for allocation of compute nodes to the - pool or removal of compute nodes from the pool. The default value is 15 - minutes. The minimum value is 5 minutes. If you specify a value less than - 5 minutes, the Batch service returns an error; if you are calling the REST - API directly, the HTTP status code is 400 (Bad Request). - :type resize_timeout: timedelta - :param node_deallocation_option: Determines what to do with a node and its - running task(s) if the pool size is decreasing. The default value is - requeue. Possible values include: 'Requeue', 'Terminate', - 'TaskCompletion', 'RetainedData' - :type node_deallocation_option: str or - ~azure.mgmt.batch.models.ComputeNodeDeallocationOption - :param start_time: The time when this resize operation was started. - :type start_time: datetime - :param errors: Details of any errors encountered while performing the last - resize on the pool. This property is set only if an error occurred during - the last pool resize, and only when the pool allocationState is Steady. - :type errors: list[~azure.mgmt.batch.models.ResizeError] - """ - - _attribute_map = { - 'target_dedicated_nodes': {'key': 'targetDedicatedNodes', 'type': 'int'}, - 'target_low_priority_nodes': {'key': 'targetLowPriorityNodes', 'type': 'int'}, - 'resize_timeout': {'key': 'resizeTimeout', 'type': 'duration'}, - 'node_deallocation_option': {'key': 'nodeDeallocationOption', 'type': 'ComputeNodeDeallocationOption'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'errors': {'key': 'errors', 'type': '[ResizeError]'}, - } - - def __init__(self, target_dedicated_nodes=None, target_low_priority_nodes=None, resize_timeout=None, node_deallocation_option=None, start_time=None, errors=None): - super(ResizeOperationStatus, self).__init__() - self.target_dedicated_nodes = target_dedicated_nodes - self.target_low_priority_nodes = target_low_priority_nodes - self.resize_timeout = resize_timeout - self.node_deallocation_option = node_deallocation_option - self.start_time = start_time - self.errors = errors - - -class Resource(Model): - """A definition of an Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar location: The location of the resource. - :vartype location: str - :ivar tags: The tags of the resource. - :vartype tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'tags': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self): - super(Resource, self).__init__() - self.id = None - self.name = None - self.type = None - self.location = None - self.tags = None - - -class ResourceFile(Model): - """A single file or multiple files to be downloaded to a compute node. - - :param auto_storage_container_name: The storage container name in the auto - storage account. The autoStorageContainerName, storageContainerUrl and - httpUrl properties are mutually exclusive and one of them must be - specified. - :type auto_storage_container_name: str - :param storage_container_url: The URL of the blob container within Azure - Blob Storage. The autoStorageContainerName, storageContainerUrl and - httpUrl properties are mutually exclusive and one of them must be - specified. This URL must be readable and listable using anonymous access; - that is, the Batch service does not present any credentials when - downloading blobs from the container. There are two ways to get such a URL - for a container in Azure storage: include a Shared Access Signature (SAS) - granting read and list permissions on the container, or set the ACL for - the container to allow public access. - :type storage_container_url: str - :param http_url: The URL of the file to download. The - autoStorageContainerName, storageContainerUrl and httpUrl properties are - mutually exclusive and one of them must be specified. If the URL is Azure - Blob Storage, it must be readable using anonymous access; that is, the - Batch service does not present any credentials when downloading the blob. - There are two ways to get such a URL for a blob in Azure storage: include - a Shared Access Signature (SAS) granting read permissions on the blob, or - set the ACL for the blob or its container to allow public access. - :type http_url: str - :param blob_prefix: The blob prefix to use when downloading blobs from an - Azure Storage container. Only the blobs whose names begin with the - specified prefix will be downloaded. The property is valid only when - autoStorageContainerName or storageContainerUrl is used. This prefix can - be a partial filename or a subdirectory. If a prefix is not specified, all - the files in the container will be downloaded. - :type blob_prefix: str - :param file_path: The location on the compute node to which to download - the file, relative to the task's working directory. If the httpUrl - property is specified, the filePath is required and describes the path - which the file will be downloaded to, including the filename. Otherwise, - if the autoStorageContainerName or storageContainerUrl property is - specified, filePath is optional and is the directory to download the files - to. In the case where filePath is used as a directory, any directory - structure already associated with the input data will be retained in full - and appended to the specified filePath directory. The specified relative - path cannot break out of the task's working directory (for example by - using '..'). - :type file_path: str - :param file_mode: The file permission mode attribute in octal format. This - property applies only to files being downloaded to Linux compute nodes. It - will be ignored if it is specified for a resourceFile which will be - downloaded to a Windows node. If this property is not specified for a - Linux node, then a default value of 0770 is applied to the file. - :type file_mode: str - """ - - _attribute_map = { - 'auto_storage_container_name': {'key': 'autoStorageContainerName', 'type': 'str'}, - 'storage_container_url': {'key': 'storageContainerUrl', 'type': 'str'}, - 'http_url': {'key': 'httpUrl', 'type': 'str'}, - 'blob_prefix': {'key': 'blobPrefix', 'type': 'str'}, - 'file_path': {'key': 'filePath', 'type': 'str'}, - 'file_mode': {'key': 'fileMode', 'type': 'str'}, - } - - def __init__(self, auto_storage_container_name=None, storage_container_url=None, http_url=None, blob_prefix=None, file_path=None, file_mode=None): - super(ResourceFile, self).__init__() - self.auto_storage_container_name = auto_storage_container_name - self.storage_container_url = storage_container_url - self.http_url = http_url - self.blob_prefix = blob_prefix - self.file_path = file_path - self.file_mode = file_mode - - -class ScaleSettings(Model): - """Scale settings for the pool. - - Defines the desired size of the pool. This can either be 'fixedScale' where - the requested targetDedicatedNodes is specified, or 'autoScale' which - defines a formula which is periodically reevaluated. If this property is - not specified, the pool will have a fixed scale with 0 - targetDedicatedNodes. - - :param fixed_scale: Fixed scale settings for the pool. This property and - autoScale are mutually exclusive and one of the properties must be - specified. - :type fixed_scale: ~azure.mgmt.batch.models.FixedScaleSettings - :param auto_scale: AutoScale settings for the pool. This property and - fixedScale are mutually exclusive and one of the properties must be - specified. - :type auto_scale: ~azure.mgmt.batch.models.AutoScaleSettings - """ - - _attribute_map = { - 'fixed_scale': {'key': 'fixedScale', 'type': 'FixedScaleSettings'}, - 'auto_scale': {'key': 'autoScale', 'type': 'AutoScaleSettings'}, - } - - def __init__(self, fixed_scale=None, auto_scale=None): - super(ScaleSettings, self).__init__() - self.fixed_scale = fixed_scale - self.auto_scale = auto_scale - - -class StartTask(Model): - """A task which is run when a compute node joins a pool in the Azure Batch - service, or when the compute node is rebooted or reimaged. - - :param command_line: The command line of the start task. The command line - does not run under a shell, and therefore cannot take advantage of shell - features such as environment variable expansion. If you want to take - advantage of such features, you should invoke the shell in the command - line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c - MyCommand" in Linux. Required if any other properties of the startTask are - specified. - :type command_line: str - :param resource_files: A list of files that the Batch service will - download to the compute node before running the command line. - :type resource_files: list[~azure.mgmt.batch.models.ResourceFile] - :param environment_settings: A list of environment variable settings for - the start task. - :type environment_settings: - list[~azure.mgmt.batch.models.EnvironmentSetting] - :param user_identity: The user identity under which the start task runs. - If omitted, the task runs as a non-administrative user unique to the task. - :type user_identity: ~azure.mgmt.batch.models.UserIdentity - :param max_task_retry_count: The maximum number of times the task may be - retried. The Batch service retries a task if its exit code is nonzero. - Note that this value specifically controls the number of retries. The - Batch service will try the task once, and may then retry up to this limit. - For example, if the maximum retry count is 3, Batch tries the task up to 4 - times (one initial try and 3 retries). If the maximum retry count is 0, - the Batch service does not retry the task. If the maximum retry count is - -1, the Batch service retries the task without limit. - :type max_task_retry_count: int - :param wait_for_success: Whether the Batch service should wait for the - start task to complete successfully (that is, to exit with exit code 0) - before scheduling any tasks on the compute node. If true and the start - task fails on a compute node, the Batch service retries the start task up - to its maximum retry count (maxTaskRetryCount). If the task has still not - completed successfully after all retries, then the Batch service marks the - compute node unusable, and will not schedule tasks to it. This condition - can be detected via the node state and scheduling error detail. If false, - the Batch service will not wait for the start task to complete. In this - case, other tasks can start executing on the compute node while the start - task is still running; and even if the start task fails, new tasks will - continue to be scheduled on the node. The default is false. - :type wait_for_success: bool - :param container_settings: The settings for the container under which the - start task runs. When this is specified, all directories recursively below - the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the - node) are mapped into the container, all task environment variables are - mapped into the container, and the task command line is executed in the - container. - :type container_settings: ~azure.mgmt.batch.models.TaskContainerSettings - """ - - _attribute_map = { - 'command_line': {'key': 'commandLine', 'type': 'str'}, - 'resource_files': {'key': 'resourceFiles', 'type': '[ResourceFile]'}, - 'environment_settings': {'key': 'environmentSettings', 'type': '[EnvironmentSetting]'}, - 'user_identity': {'key': 'userIdentity', 'type': 'UserIdentity'}, - 'max_task_retry_count': {'key': 'maxTaskRetryCount', 'type': 'int'}, - 'wait_for_success': {'key': 'waitForSuccess', 'type': 'bool'}, - 'container_settings': {'key': 'containerSettings', 'type': 'TaskContainerSettings'}, - } - - def __init__(self, command_line=None, resource_files=None, environment_settings=None, user_identity=None, max_task_retry_count=None, wait_for_success=None, container_settings=None): - super(StartTask, self).__init__() - self.command_line = command_line - self.resource_files = resource_files - self.environment_settings = environment_settings - self.user_identity = user_identity - self.max_task_retry_count = max_task_retry_count - self.wait_for_success = wait_for_success - self.container_settings = container_settings - - -class TaskContainerSettings(Model): - """The container settings for a task. - - :param container_run_options: Additional options to the container create - command. These additional options are supplied as arguments to the "docker - create" command, in addition to those controlled by the Batch Service. - :type container_run_options: str - :param image_name: The image to use to create the container in which the - task will run. This is the full image reference, as would be specified to - "docker pull". If no tag is provided as part of the image name, the tag - ":latest" is used as a default. - :type image_name: str - :param registry: The private registry which contains the container image. - This setting can be omitted if was already provided at pool creation. - :type registry: ~azure.mgmt.batch.models.ContainerRegistry - """ - - _validation = { - 'image_name': {'required': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'last_modified': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'provisioning_state_transition_time': {'readonly': True}, + 'allocation_state': {'readonly': True}, + 'allocation_state_transition_time': {'readonly': True}, + 'current_dedicated_nodes': {'readonly': True}, + 'current_low_priority_nodes': {'readonly': True}, + 'auto_scale_run': {'readonly': True}, + 'resize_operation_status': {'readonly': True}, } _attribute_map = { - 'container_run_options': {'key': 'containerRunOptions', 'type': 'str'}, - 'image_name': {'key': 'imageName', 'type': 'str'}, - 'registry': {'key': 'registry', 'type': 'ContainerRegistry'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'PoolProvisioningState'}, + 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, + 'allocation_state': {'key': 'properties.allocationState', 'type': 'AllocationState'}, + 'allocation_state_transition_time': {'key': 'properties.allocationStateTransitionTime', 'type': 'iso-8601'}, + 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, + 'deployment_configuration': {'key': 'properties.deploymentConfiguration', 'type': 'DeploymentConfiguration'}, + 'current_dedicated_nodes': {'key': 'properties.currentDedicatedNodes', 'type': 'int'}, + 'current_low_priority_nodes': {'key': 'properties.currentLowPriorityNodes', 'type': 'int'}, + 'scale_settings': {'key': 'properties.scaleSettings', 'type': 'ScaleSettings'}, + 'auto_scale_run': {'key': 'properties.autoScaleRun', 'type': 'AutoScaleRun'}, + 'inter_node_communication': {'key': 'properties.interNodeCommunication', 'type': 'InterNodeCommunicationState'}, + 'network_configuration': {'key': 'properties.networkConfiguration', 'type': 'NetworkConfiguration'}, + 'max_tasks_per_node': {'key': 'properties.maxTasksPerNode', 'type': 'int'}, + 'task_scheduling_policy': {'key': 'properties.taskSchedulingPolicy', 'type': 'TaskSchedulingPolicy'}, + 'user_accounts': {'key': 'properties.userAccounts', 'type': '[UserAccount]'}, + 'metadata': {'key': 'properties.metadata', 'type': '[MetadataItem]'}, + 'start_task': {'key': 'properties.startTask', 'type': 'StartTask'}, + 'certificates': {'key': 'properties.certificates', 'type': '[CertificateReference]'}, + 'application_packages': {'key': 'properties.applicationPackages', 'type': '[ApplicationPackageReference]'}, + 'application_licenses': {'key': 'properties.applicationLicenses', 'type': '[str]'}, + 'resize_operation_status': {'key': 'properties.resizeOperationStatus', 'type': 'ResizeOperationStatus'}, + 'mount_configuration': {'key': 'properties.mountConfiguration', 'type': '[MountConfiguration]'}, } - def __init__(self, image_name, container_run_options=None, registry=None): - super(TaskContainerSettings, self).__init__() - self.container_run_options = container_run_options - self.image_name = image_name - self.registry = registry + def __init__(self, *, display_name: str=None, vm_size: str=None, deployment_configuration=None, scale_settings=None, inter_node_communication=None, network_configuration=None, max_tasks_per_node: int=None, task_scheduling_policy=None, user_accounts=None, metadata=None, start_task=None, certificates=None, application_packages=None, application_licenses=None, mount_configuration=None, **kwargs) -> None: + super(Pool, self).__init__(**kwargs) + self.display_name = display_name + self.last_modified = None + self.creation_time = None + self.provisioning_state = None + self.provisioning_state_transition_time = None + self.allocation_state = None + self.allocation_state_transition_time = None + self.vm_size = vm_size + self.deployment_configuration = deployment_configuration + self.current_dedicated_nodes = None + self.current_low_priority_nodes = None + self.scale_settings = scale_settings + self.auto_scale_run = None + self.inter_node_communication = inter_node_communication + self.network_configuration = network_configuration + self.max_tasks_per_node = max_tasks_per_node + self.task_scheduling_policy = task_scheduling_policy + self.user_accounts = user_accounts + self.metadata = metadata + self.start_task = start_task + self.certificates = certificates + self.application_packages = application_packages + self.application_licenses = application_licenses + self.resize_operation_status = None + self.mount_configuration = mount_configuration -class TaskSchedulingPolicy(Model): - """Specifies how tasks should be distributed across compute nodes. +class PoolEndpointConfiguration(Model): + """The endpoint configuration for a pool. - :param node_fill_type: How tasks should be distributed across compute - nodes. Possible values include: 'Spread', 'Pack' - :type node_fill_type: str or ~azure.mgmt.batch.models.ComputeNodeFillType + All required parameters must be populated in order to send to Azure. + + :param inbound_nat_pools: Required. A list of inbound NAT pools that can + be used to address specific ports on an individual compute node + externally. The maximum number of inbound NAT pools per Batch pool is 5. + If the maximum number of inbound NAT pools is exceeded the request fails + with HTTP status code 400. + :type inbound_nat_pools: list[~azure.mgmt.batch.models.InboundNatPool] """ _validation = { - 'node_fill_type': {'required': True}, + 'inbound_nat_pools': {'required': True}, } _attribute_map = { - 'node_fill_type': {'key': 'nodeFillType', 'type': 'ComputeNodeFillType'}, + 'inbound_nat_pools': {'key': 'inboundNatPools', 'type': '[InboundNatPool]'}, } - def __init__(self, node_fill_type): - super(TaskSchedulingPolicy, self).__init__() - self.node_fill_type = node_fill_type + def __init__(self, *, inbound_nat_pools, **kwargs) -> None: + super(PoolEndpointConfiguration, self).__init__(**kwargs) + self.inbound_nat_pools = inbound_nat_pools -class UserAccount(Model): - """Properties used to create a user on an Azure Batch node. +class ResizeError(Model): + """An error that occurred when resizing a pool. - :param name: The name of the user account. - :type name: str - :param password: The password for the user account. - :type password: str - :param elevation_level: The elevation level of the user account. nonAdmin - - The auto user is a standard user without elevated access. admin - The - auto user is a user with elevated access and operates with full - Administrator permissions. The default value is nonAdmin. Possible values - include: 'NonAdmin', 'Admin' - :type elevation_level: str or ~azure.mgmt.batch.models.ElevationLevel - :param linux_user_configuration: The Linux-specific user configuration for - the user account. This property is ignored if specified on a Windows pool. - If not specified, the user is created with the default options. - :type linux_user_configuration: - ~azure.mgmt.batch.models.LinuxUserConfiguration - :param windows_user_configuration: The Windows-specific user configuration - for the user account. This property can only be specified if the user is - on a Windows pool. If not specified and on a Windows pool, the user is - created with the default options. - :type windows_user_configuration: - ~azure.mgmt.batch.models.WindowsUserConfiguration + All required parameters must be populated in order to send to Azure. + + :param code: Required. An identifier for the error. Codes are invariant + and are intended to be consumed programmatically. + :type code: str + :param message: Required. A message describing the error, intended to be + suitable for display in a user interface. + :type message: str + :param details: Additional details about the error. + :type details: list[~azure.mgmt.batch.models.ResizeError] """ _validation = { - 'name': {'required': True}, - 'password': {'required': True}, + 'code': {'required': True}, + 'message': {'required': True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, - 'elevation_level': {'key': 'elevationLevel', 'type': 'ElevationLevel'}, - 'linux_user_configuration': {'key': 'linuxUserConfiguration', 'type': 'LinuxUserConfiguration'}, - 'windows_user_configuration': {'key': 'windowsUserConfiguration', 'type': 'WindowsUserConfiguration'}, + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ResizeError]'}, } - def __init__(self, name, password, elevation_level=None, linux_user_configuration=None, windows_user_configuration=None): - super(UserAccount, self).__init__() - self.name = name - self.password = password - self.elevation_level = elevation_level - self.linux_user_configuration = linux_user_configuration - self.windows_user_configuration = windows_user_configuration + def __init__(self, *, code: str, message: str, details=None, **kwargs) -> None: + super(ResizeError, self).__init__(**kwargs) + self.code = code + self.message = message + self.details = details -class UserIdentity(Model): - """The definition of the user identity under which the task is run. +class ResizeOperationStatus(Model): + """Details about the current or last completed resize operation. - Specify either the userName or autoUser property, but not both. + Describes either the current operation (if the pool AllocationState is + Resizing) or the previously completed operation (if the AllocationState is + Steady). - :param user_name: The name of the user identity under which the task is - run. The userName and autoUser properties are mutually exclusive; you must - specify one but not both. - :type user_name: str - :param auto_user: The auto user under which the task is run. The userName - and autoUser properties are mutually exclusive; you must specify one but - not both. - :type auto_user: ~azure.mgmt.batch.models.AutoUserSpecification + :param target_dedicated_nodes: The desired number of dedicated compute + nodes in the pool. + :type target_dedicated_nodes: int + :param target_low_priority_nodes: The desired number of low-priority + compute nodes in the pool. + :type target_low_priority_nodes: int + :param resize_timeout: The timeout for allocation of compute nodes to the + pool or removal of compute nodes from the pool. The default value is 15 + minutes. The minimum value is 5 minutes. If you specify a value less than + 5 minutes, the Batch service returns an error; if you are calling the REST + API directly, the HTTP status code is 400 (Bad Request). + :type resize_timeout: timedelta + :param node_deallocation_option: Determines what to do with a node and its + running task(s) if the pool size is decreasing. The default value is + requeue. Possible values include: 'Requeue', 'Terminate', + 'TaskCompletion', 'RetainedData' + :type node_deallocation_option: str or + ~azure.mgmt.batch.models.ComputeNodeDeallocationOption + :param start_time: The time when this resize operation was started. + :type start_time: datetime + :param errors: Details of any errors encountered while performing the last + resize on the pool. This property is set only if an error occurred during + the last pool resize, and only when the pool allocationState is Steady. + :type errors: list[~azure.mgmt.batch.models.ResizeError] """ _attribute_map = { - 'user_name': {'key': 'userName', 'type': 'str'}, - 'auto_user': {'key': 'autoUser', 'type': 'AutoUserSpecification'}, + 'target_dedicated_nodes': {'key': 'targetDedicatedNodes', 'type': 'int'}, + 'target_low_priority_nodes': {'key': 'targetLowPriorityNodes', 'type': 'int'}, + 'resize_timeout': {'key': 'resizeTimeout', 'type': 'duration'}, + 'node_deallocation_option': {'key': 'nodeDeallocationOption', 'type': 'ComputeNodeDeallocationOption'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'errors': {'key': 'errors', 'type': '[ResizeError]'}, } - def __init__(self, user_name=None, auto_user=None): - super(UserIdentity, self).__init__() - self.user_name = user_name - self.auto_user = auto_user + def __init__(self, *, target_dedicated_nodes: int=None, target_low_priority_nodes: int=None, resize_timeout=None, node_deallocation_option=None, start_time=None, errors=None, **kwargs) -> None: + super(ResizeOperationStatus, self).__init__(**kwargs) + self.target_dedicated_nodes = target_dedicated_nodes + self.target_low_priority_nodes = target_low_priority_nodes + self.resize_timeout = resize_timeout + self.node_deallocation_option = node_deallocation_option + self.start_time = start_time + self.errors = errors -class VirtualMachineConfiguration(Model): - """The configuration for compute nodes in a pool based on the Azure Virtual - Machines infrastructure. +class ResourceFile(Model): + """A single file or multiple files to be downloaded to a compute node. - :param image_reference: A reference to the Azure Virtual Machines - Marketplace Image or the custom Virtual Machine Image to use. - :type image_reference: ~azure.mgmt.batch.models.ImageReference - :param node_agent_sku_id: The SKU of the Batch node agent to be - provisioned on compute nodes in the pool. The Batch node agent is a - program that runs on each node in the pool, and provides the - command-and-control interface between the node and the Batch service. - There are different implementations of the node agent, known as SKUs, for - different operating systems. You must specify a node agent SKU which - matches the selected image reference. To get the list of supported node - agent SKUs along with their list of verified image references, see the - 'List supported node agent SKUs' operation. - :type node_agent_sku_id: str - :param windows_configuration: Windows operating system settings on the - virtual machine. This property must not be specified if the imageReference - specifies a Linux OS image. - :type windows_configuration: ~azure.mgmt.batch.models.WindowsConfiguration - :param data_disks: The configuration for data disks attached to the - compute nodes in the pool. This property must be specified if the compute - nodes in the pool need to have empty data disks attached to them. - :type data_disks: list[~azure.mgmt.batch.models.DataDisk] - :param license_type: The type of on-premises license to be used when - deploying the operating system. This only applies to images that contain - the Windows operating system, and should only be used when you hold valid - on-premises licenses for the nodes which will be deployed. If omitted, no - on-premises licensing discount is applied. Values are: - Windows_Server - The on-premises license is for Windows Server. - Windows_Client - The on-premises license is for Windows Client. - :type license_type: str - :param container_configuration: The container configuration for the pool. - If specified, setup is performed on each node in the pool to allow tasks - to run in containers. All regular tasks and job manager tasks run on this - pool must specify the containerSettings property, and all other tasks may - specify it. - :type container_configuration: - ~azure.mgmt.batch.models.ContainerConfiguration + :param auto_storage_container_name: The storage container name in the auto + storage account. The autoStorageContainerName, storageContainerUrl and + httpUrl properties are mutually exclusive and one of them must be + specified. + :type auto_storage_container_name: str + :param storage_container_url: The URL of the blob container within Azure + Blob Storage. The autoStorageContainerName, storageContainerUrl and + httpUrl properties are mutually exclusive and one of them must be + specified. This URL must be readable and listable using anonymous access; + that is, the Batch service does not present any credentials when + downloading the blob. There are two ways to get such a URL for a blob in + Azure storage: include a Shared Access Signature (SAS) granting read and + list permissions on the blob, or set the ACL for the blob or its container + to allow public access. + :type storage_container_url: str + :param http_url: The URL of the file to download. The + autoStorageContainerName, storageContainerUrl and httpUrl properties are + mutually exclusive and one of them must be specified. If the URL is Azure + Blob Storage, it must be readable using anonymous access; that is, the + Batch service does not present any credentials when downloading the blob. + There are two ways to get such a URL for a blob in Azure storage: include + a Shared Access Signature (SAS) granting read permissions on the blob, or + set the ACL for the blob or its container to allow public access. + :type http_url: str + :param blob_prefix: The blob prefix to use when downloading blobs from an + Azure Storage container. Only the blobs whose names begin with the + specified prefix will be downloaded. The property is valid only when + autoStorageContainerName or storageContainerUrl is used. This prefix can + be a partial filename or a subdirectory. If a prefix is not specified, all + the files in the container will be downloaded. + :type blob_prefix: str + :param file_path: The location on the compute node to which to download + the file, relative to the task's working directory. If the httpUrl + property is specified, the filePath is required and describes the path + which the file will be downloaded to, including the filename. Otherwise, + if the autoStorageContainerName or storageContainerUrl property is + specified, filePath is optional and is the directory to download the files + to. In the case where filePath is used as a directory, any directory + structure already associated with the input data will be retained in full + and appended to the specified filePath directory. The specified relative + path cannot break out of the task's working directory (for example by + using '..'). + :type file_path: str + :param file_mode: The file permission mode attribute in octal format. This + property applies only to files being downloaded to Linux compute nodes. It + will be ignored if it is specified for a resourceFile which will be + downloaded to a Windows node. If this property is not specified for a + Linux node, then a default value of 0770 is applied to the file. + :type file_mode: str """ - _validation = { - 'image_reference': {'required': True}, - 'node_agent_sku_id': {'required': True}, - } - _attribute_map = { - 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, - 'node_agent_sku_id': {'key': 'nodeAgentSkuId', 'type': 'str'}, - 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, - 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - 'container_configuration': {'key': 'containerConfiguration', 'type': 'ContainerConfiguration'}, + 'auto_storage_container_name': {'key': 'autoStorageContainerName', 'type': 'str'}, + 'storage_container_url': {'key': 'storageContainerUrl', 'type': 'str'}, + 'http_url': {'key': 'httpUrl', 'type': 'str'}, + 'blob_prefix': {'key': 'blobPrefix', 'type': 'str'}, + 'file_path': {'key': 'filePath', 'type': 'str'}, + 'file_mode': {'key': 'fileMode', 'type': 'str'}, } - def __init__(self, image_reference, node_agent_sku_id, windows_configuration=None, data_disks=None, license_type=None, container_configuration=None): - super(VirtualMachineConfiguration, self).__init__() - self.image_reference = image_reference - self.node_agent_sku_id = node_agent_sku_id - self.windows_configuration = windows_configuration - self.data_disks = data_disks - self.license_type = license_type - self.container_configuration = container_configuration + def __init__(self, *, auto_storage_container_name: str=None, storage_container_url: str=None, http_url: str=None, blob_prefix: str=None, file_path: str=None, file_mode: str=None, **kwargs) -> None: + super(ResourceFile, self).__init__(**kwargs) + self.auto_storage_container_name = auto_storage_container_name + self.storage_container_url = storage_container_url + self.http_url = http_url + self.blob_prefix = blob_prefix + self.file_path = file_path + self.file_mode = file_mode -class WindowsConfiguration(Model): - """Windows operating system settings to apply to the virtual machine. +class ScaleSettings(Model): + """Scale settings for the pool. - :param enable_automatic_updates: Whether automatic updates are enabled on - the virtual machine. If omitted, the default value is true. - :type enable_automatic_updates: bool + Defines the desired size of the pool. This can either be 'fixedScale' where + the requested targetDedicatedNodes is specified, or 'autoScale' which + defines a formula which is periodically reevaluated. If this property is + not specified, the pool will have a fixed scale with 0 + targetDedicatedNodes. + + :param fixed_scale: Fixed scale settings for the pool. This property and + autoScale are mutually exclusive and one of the properties must be + specified. + :type fixed_scale: ~azure.mgmt.batch.models.FixedScaleSettings + :param auto_scale: AutoScale settings for the pool. This property and + fixedScale are mutually exclusive and one of the properties must be + specified. + :type auto_scale: ~azure.mgmt.batch.models.AutoScaleSettings """ _attribute_map = { - 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, + 'fixed_scale': {'key': 'fixedScale', 'type': 'FixedScaleSettings'}, + 'auto_scale': {'key': 'autoScale', 'type': 'AutoScaleSettings'}, } - def __init__(self, enable_automatic_updates=None): - super(WindowsConfiguration, self).__init__() - self.enable_automatic_updates = enable_automatic_updates + def __init__(self, *, fixed_scale=None, auto_scale=None, **kwargs) -> None: + super(ScaleSettings, self).__init__(**kwargs) + self.fixed_scale = fixed_scale + self.auto_scale = auto_scale -class WindowsUserConfiguration(Model): - """Properties used to create a user account on a Windows node. +class StartTask(Model): + """A task which is run when a compute node joins a pool in the Azure Batch + service, or when the compute node is rebooted or reimaged. - :param login_mode: Login mode for user. Specifies login mode for the user. - The default value for VirtualMachineConfiguration pools is interactive - mode and for CloudServiceConfiguration pools is batch mode. Possible - values include: 'Batch', 'Interactive' - :type login_mode: str or ~azure.mgmt.batch.models.LoginMode + In some cases the start task may be re-run even though the node was not + rebooted. Due to this, start tasks should be idempotent and exit gracefully + if the setup they're performing has already been done. Special care should + be taken to avoid start tasks which create breakaway process or + install/launch services from the start task working directory, as this will + block Batch from being able to re-run the start task. + + :param command_line: The command line of the start task. The command line + does not run under a shell, and therefore cannot take advantage of shell + features such as environment variable expansion. If you want to take + advantage of such features, you should invoke the shell in the command + line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c + MyCommand" in Linux. Required if any other properties of the startTask are + specified. + :type command_line: str + :param resource_files: A list of files that the Batch service will + download to the compute node before running the command line. + :type resource_files: list[~azure.mgmt.batch.models.ResourceFile] + :param environment_settings: A list of environment variable settings for + the start task. + :type environment_settings: + list[~azure.mgmt.batch.models.EnvironmentSetting] + :param user_identity: The user identity under which the start task runs. + If omitted, the task runs as a non-administrative user unique to the task. + :type user_identity: ~azure.mgmt.batch.models.UserIdentity + :param max_task_retry_count: The maximum number of times the task may be + retried. The Batch service retries a task if its exit code is nonzero. + Note that this value specifically controls the number of retries. The + Batch service will try the task once, and may then retry up to this limit. + For example, if the maximum retry count is 3, Batch tries the task up to 4 + times (one initial try and 3 retries). If the maximum retry count is 0, + the Batch service does not retry the task. If the maximum retry count is + -1, the Batch service retries the task without limit. + :type max_task_retry_count: int + :param wait_for_success: Whether the Batch service should wait for the + start task to complete successfully (that is, to exit with exit code 0) + before scheduling any tasks on the compute node. If true and the start + task fails on a compute node, the Batch service retries the start task up + to its maximum retry count (maxTaskRetryCount). If the task has still not + completed successfully after all retries, then the Batch service marks the + compute node unusable, and will not schedule tasks to it. This condition + can be detected via the node state and scheduling error detail. If false, + the Batch service will not wait for the start task to complete. In this + case, other tasks can start executing on the compute node while the start + task is still running; and even if the start task fails, new tasks will + continue to be scheduled on the node. The default is true. + :type wait_for_success: bool + :param container_settings: The settings for the container under which the + start task runs. When this is specified, all directories recursively below + the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the + node) are mapped into the container, all task environment variables are + mapped into the container, and the task command line is executed in the + container. + :type container_settings: ~azure.mgmt.batch.models.TaskContainerSettings """ _attribute_map = { - 'login_mode': {'key': 'loginMode', 'type': 'LoginMode'}, + 'command_line': {'key': 'commandLine', 'type': 'str'}, + 'resource_files': {'key': 'resourceFiles', 'type': '[ResourceFile]'}, + 'environment_settings': {'key': 'environmentSettings', 'type': '[EnvironmentSetting]'}, + 'user_identity': {'key': 'userIdentity', 'type': 'UserIdentity'}, + 'max_task_retry_count': {'key': 'maxTaskRetryCount', 'type': 'int'}, + 'wait_for_success': {'key': 'waitForSuccess', 'type': 'bool'}, + 'container_settings': {'key': 'containerSettings', 'type': 'TaskContainerSettings'}, } - def __init__(self, login_mode=None): - super(WindowsUserConfiguration, self).__init__() - self.login_mode = login_mode + def __init__(self, *, command_line: str=None, resource_files=None, environment_settings=None, user_identity=None, max_task_retry_count: int=None, wait_for_success: bool=None, container_settings=None, **kwargs) -> None: + super(StartTask, self).__init__(**kwargs) + self.command_line = command_line + self.resource_files = resource_files + self.environment_settings = environment_settings + self.user_identity = user_identity + self.max_task_retry_count = max_task_retry_count + self.wait_for_success = wait_for_success + self.container_settings = container_settings -class Application(ProxyResource): - """Contains information about an application in a Batch account. +class TaskContainerSettings(Model): + """The container settings for a task. - Variables are only populated by the server, and will be ignored when - sending a request. + All required parameters must be populated in order to send to Azure. - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param display_name: The display name for the application. - :type display_name: str - :param allow_updates: A value indicating whether packages within the - application may be overwritten using the same version string. - :type allow_updates: bool - :param default_version: The package to use if a client requests the - application but does not specify a version. This property can only be set - to the name of an existing package. - :type default_version: str + :param container_run_options: Additional options to the container create + command. These additional options are supplied as arguments to the "docker + create" command, in addition to those controlled by the Batch Service. + :type container_run_options: str + :param image_name: Required. The image to use to create the container in + which the task will run. This is the full image reference, as would be + specified to "docker pull". If no tag is provided as part of the image + name, the tag ":latest" is used as a default. + :type image_name: str + :param registry: The private registry which contains the container image. + This setting can be omitted if was already provided at pool creation. + :type registry: ~azure.mgmt.batch.models.ContainerRegistry + :param working_directory: A flag to indicate where the container task + working directory is. The default is 'taskWorkingDirectory'. Possible + values include: 'TaskWorkingDirectory', 'ContainerImageDefault' + :type working_directory: str or + ~azure.mgmt.batch.models.ContainerWorkingDirectory """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, + 'image_name': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'allow_updates': {'key': 'properties.allowUpdates', 'type': 'bool'}, - 'default_version': {'key': 'properties.defaultVersion', 'type': 'str'}, + 'container_run_options': {'key': 'containerRunOptions', 'type': 'str'}, + 'image_name': {'key': 'imageName', 'type': 'str'}, + 'registry': {'key': 'registry', 'type': 'ContainerRegistry'}, + 'working_directory': {'key': 'workingDirectory', 'type': 'ContainerWorkingDirectory'}, } - def __init__(self, display_name=None, allow_updates=None, default_version=None): - super(Application, self).__init__() - self.display_name = display_name - self.allow_updates = allow_updates - self.default_version = default_version + def __init__(self, *, image_name: str, container_run_options: str=None, registry=None, working_directory=None, **kwargs) -> None: + super(TaskContainerSettings, self).__init__(**kwargs) + self.container_run_options = container_run_options + self.image_name = image_name + self.registry = registry + self.working_directory = working_directory -class ApplicationPackage(ProxyResource): - """An application package which represents a particular version of an - application. +class TaskSchedulingPolicy(Model): + """Specifies how tasks should be distributed across compute nodes. - Variables are only populated by the server, and will be ignored when - sending a request. + All required parameters must be populated in order to send to Azure. - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :ivar state: The current state of the application package. Possible values - include: 'Pending', 'Active' - :vartype state: str or ~azure.mgmt.batch.models.PackageState - :ivar format: The format of the application package, if the package is - active. - :vartype format: str - :ivar storage_url: The URL for the application package in Azure Storage. - :vartype storage_url: str - :ivar storage_url_expiry: The UTC time at which the Azure Storage URL will - expire. - :vartype storage_url_expiry: datetime - :ivar last_activation_time: The time at which the package was last - activated, if the package is active. - :vartype last_activation_time: datetime + :param node_fill_type: Required. How tasks should be distributed across + compute nodes. Possible values include: 'Spread', 'Pack' + :type node_fill_type: str or ~azure.mgmt.batch.models.ComputeNodeFillType """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'state': {'readonly': True}, - 'format': {'readonly': True}, - 'storage_url': {'readonly': True}, - 'storage_url_expiry': {'readonly': True}, - 'last_activation_time': {'readonly': True}, + 'node_fill_type': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'PackageState'}, - 'format': {'key': 'properties.format', 'type': 'str'}, - 'storage_url': {'key': 'properties.storageUrl', 'type': 'str'}, - 'storage_url_expiry': {'key': 'properties.storageUrlExpiry', 'type': 'iso-8601'}, - 'last_activation_time': {'key': 'properties.lastActivationTime', 'type': 'iso-8601'}, + 'node_fill_type': {'key': 'nodeFillType', 'type': 'ComputeNodeFillType'}, } - def __init__(self): - super(ApplicationPackage, self).__init__() - self.state = None - self.format = None - self.storage_url = None - self.storage_url_expiry = None - self.last_activation_time = None + def __init__(self, *, node_fill_type, **kwargs) -> None: + super(TaskSchedulingPolicy, self).__init__(**kwargs) + self.node_fill_type = node_fill_type -class AutoStorageProperties(AutoStorageBaseProperties): - """Contains information about the auto-storage account associated with a Batch - account. +class UserAccount(Model): + """Properties used to create a user on an Azure Batch node. + + All required parameters must be populated in order to send to Azure. - :param storage_account_id: The resource ID of the storage account to be - used for auto-storage account. - :type storage_account_id: str - :param last_key_sync: The UTC time at which storage keys were last - synchronized with the Batch account. - :type last_key_sync: datetime + :param name: Required. The name of the user account. + :type name: str + :param password: Required. The password for the user account. + :type password: str + :param elevation_level: The elevation level of the user account. nonAdmin + - The auto user is a standard user without elevated access. admin - The + auto user is a user with elevated access and operates with full + Administrator permissions. The default value is nonAdmin. Possible values + include: 'NonAdmin', 'Admin' + :type elevation_level: str or ~azure.mgmt.batch.models.ElevationLevel + :param linux_user_configuration: The Linux-specific user configuration for + the user account. This property is ignored if specified on a Windows pool. + If not specified, the user is created with the default options. + :type linux_user_configuration: + ~azure.mgmt.batch.models.LinuxUserConfiguration + :param windows_user_configuration: The Windows-specific user configuration + for the user account. This property can only be specified if the user is + on a Windows pool. If not specified and on a Windows pool, the user is + created with the default options. + :type windows_user_configuration: + ~azure.mgmt.batch.models.WindowsUserConfiguration """ _validation = { - 'storage_account_id': {'required': True}, - 'last_key_sync': {'required': True}, + 'name': {'required': True}, + 'password': {'required': True}, } _attribute_map = { - 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, - 'last_key_sync': {'key': 'lastKeySync', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'elevation_level': {'key': 'elevationLevel', 'type': 'ElevationLevel'}, + 'linux_user_configuration': {'key': 'linuxUserConfiguration', 'type': 'LinuxUserConfiguration'}, + 'windows_user_configuration': {'key': 'windowsUserConfiguration', 'type': 'WindowsUserConfiguration'}, } - def __init__(self, storage_account_id, last_key_sync): - super(AutoStorageProperties, self).__init__(storage_account_id=storage_account_id) - self.last_key_sync = last_key_sync + def __init__(self, *, name: str, password: str, elevation_level=None, linux_user_configuration=None, windows_user_configuration=None, **kwargs) -> None: + super(UserAccount, self).__init__(**kwargs) + self.name = name + self.password = password + self.elevation_level = elevation_level + self.linux_user_configuration = linux_user_configuration + self.windows_user_configuration = windows_user_configuration -class BatchAccount(Resource): - """Contains information about an Azure Batch account. +class UserIdentity(Model): + """The definition of the user identity under which the task is run. - Variables are only populated by the server, and will be ignored when - sending a request. + Specify either the userName or autoUser property, but not both. - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar location: The location of the resource. - :vartype location: str - :ivar tags: The tags of the resource. - :vartype tags: dict[str, str] - :ivar account_endpoint: The account endpoint used to interact with the - Batch service. - :vartype account_endpoint: str - :ivar provisioning_state: The provisioned state of the resource. Possible - values include: 'Invalid', 'Creating', 'Deleting', 'Succeeded', 'Failed', - 'Cancelled' - :vartype provisioning_state: str or - ~azure.mgmt.batch.models.ProvisioningState - :ivar pool_allocation_mode: The allocation mode to use for creating pools - in the Batch account. Possible values include: 'BatchService', - 'UserSubscription' - :vartype pool_allocation_mode: str or - ~azure.mgmt.batch.models.PoolAllocationMode - :ivar key_vault_reference: A reference to the Azure key vault associated - with the Batch account. - :vartype key_vault_reference: ~azure.mgmt.batch.models.KeyVaultReference - :ivar auto_storage: The properties and status of any auto-storage account - associated with the Batch account. - :vartype auto_storage: ~azure.mgmt.batch.models.AutoStorageProperties - :ivar dedicated_core_quota: The dedicated core quota for this Batch - account. - :vartype dedicated_core_quota: int - :ivar low_priority_core_quota: The low-priority core quota for this Batch - account. - :vartype low_priority_core_quota: int - :ivar pool_quota: The pool quota for this Batch account. - :vartype pool_quota: int - :ivar active_job_and_job_schedule_quota: The active job and job schedule - quota for this Batch account. - :vartype active_job_and_job_schedule_quota: int + :param user_name: The name of the user identity under which the task is + run. The userName and autoUser properties are mutually exclusive; you must + specify one but not both. + :type user_name: str + :param auto_user: The auto user under which the task is run. The userName + and autoUser properties are mutually exclusive; you must specify one but + not both. + :type auto_user: ~azure.mgmt.batch.models.AutoUserSpecification """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'tags': {'readonly': True}, - 'account_endpoint': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'pool_allocation_mode': {'readonly': True}, - 'key_vault_reference': {'readonly': True}, - 'auto_storage': {'readonly': True}, - 'dedicated_core_quota': {'readonly': True}, - 'low_priority_core_quota': {'readonly': True}, - 'pool_quota': {'readonly': True}, - 'active_job_and_job_schedule_quota': {'readonly': True}, - } - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'account_endpoint': {'key': 'properties.accountEndpoint', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'}, - 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, - 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageProperties'}, - 'dedicated_core_quota': {'key': 'properties.dedicatedCoreQuota', 'type': 'int'}, - 'low_priority_core_quota': {'key': 'properties.lowPriorityCoreQuota', 'type': 'int'}, - 'pool_quota': {'key': 'properties.poolQuota', 'type': 'int'}, - 'active_job_and_job_schedule_quota': {'key': 'properties.activeJobAndJobScheduleQuota', 'type': 'int'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'auto_user': {'key': 'autoUser', 'type': 'AutoUserSpecification'}, } - def __init__(self): - super(BatchAccount, self).__init__() - self.account_endpoint = None - self.provisioning_state = None - self.pool_allocation_mode = None - self.key_vault_reference = None - self.auto_storage = None - self.dedicated_core_quota = None - self.low_priority_core_quota = None - self.pool_quota = None - self.active_job_and_job_schedule_quota = None + def __init__(self, *, user_name: str=None, auto_user=None, **kwargs) -> None: + super(UserIdentity, self).__init__(**kwargs) + self.user_name = user_name + self.auto_user = auto_user -class Certificate(ProxyResource): - """Contains information about a certificate. +class VirtualMachineConfiguration(Model): + """The configuration for compute nodes in a pool based on the Azure Virtual + Machines infrastructure. - Variables are only populated by the server, and will be ignored when - sending a request. + All required parameters must be populated in order to send to Azure. - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param thumbprint_algorithm: The algorithm of the certificate thumbprint. - This must match the first portion of the certificate name. Currently - required to be 'SHA1'. - :type thumbprint_algorithm: str - :param thumbprint: The thumbprint of the certificate. This must match the - thumbprint from the name. - :type thumbprint: str - :param format: The format of the certificate - either Pfx or Cer. If - omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' - :type format: str or ~azure.mgmt.batch.models.CertificateFormat - :ivar provisioning_state: The provisioned state of the resource. Possible - values include: 'Succeeded', 'Deleting', 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.batch.models.CertificateProvisioningState - :ivar provisioning_state_transition_time: The time at which the - certificate entered its current state. - :vartype provisioning_state_transition_time: datetime - :ivar previous_provisioning_state: The previous provisioned state of the - resource. Possible values include: 'Succeeded', 'Deleting', 'Failed' - :vartype previous_provisioning_state: str or - ~azure.mgmt.batch.models.CertificateProvisioningState - :ivar previous_provisioning_state_transition_time: The time at which the - certificate entered its previous state. - :vartype previous_provisioning_state_transition_time: datetime - :ivar public_data: The public key of the certificate. - :vartype public_data: str - :ivar delete_certificate_error: The error which occurred while deleting - the certificate. This is only returned when the certificate - provisioningState is 'Failed'. - :vartype delete_certificate_error: - ~azure.mgmt.batch.models.DeleteCertificateError + :param image_reference: Required. A reference to the Azure Virtual + Machines Marketplace Image or the custom Virtual Machine Image to use. + :type image_reference: ~azure.mgmt.batch.models.ImageReference + :param node_agent_sku_id: Required. The SKU of the Batch node agent to be + provisioned on compute nodes in the pool. The Batch node agent is a + program that runs on each node in the pool, and provides the + command-and-control interface between the node and the Batch service. + There are different implementations of the node agent, known as SKUs, for + different operating systems. You must specify a node agent SKU which + matches the selected image reference. To get the list of supported node + agent SKUs along with their list of verified image references, see the + 'List supported node agent SKUs' operation. + :type node_agent_sku_id: str + :param windows_configuration: Windows operating system settings on the + virtual machine. This property must not be specified if the imageReference + specifies a Linux OS image. + :type windows_configuration: ~azure.mgmt.batch.models.WindowsConfiguration + :param data_disks: The configuration for data disks attached to the + compute nodes in the pool. This property must be specified if the compute + nodes in the pool need to have empty data disks attached to them. + :type data_disks: list[~azure.mgmt.batch.models.DataDisk] + :param license_type: The type of on-premises license to be used when + deploying the operating system. This only applies to images that contain + the Windows operating system, and should only be used when you hold valid + on-premises licenses for the nodes which will be deployed. If omitted, no + on-premises licensing discount is applied. Values are: + Windows_Server - The on-premises license is for Windows Server. + Windows_Client - The on-premises license is for Windows Client. + :type license_type: str + :param container_configuration: The container configuration for the pool. + If specified, setup is performed on each node in the pool to allow tasks + to run in containers. All regular tasks and job manager tasks run on this + pool must specify the containerSettings property, and all other tasks may + specify it. + :type container_configuration: + ~azure.mgmt.batch.models.ContainerConfiguration """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'provisioning_state_transition_time': {'readonly': True}, - 'previous_provisioning_state': {'readonly': True}, - 'previous_provisioning_state_transition_time': {'readonly': True}, - 'public_data': {'readonly': True}, - 'delete_certificate_error': {'readonly': True}, + 'image_reference': {'required': True}, + 'node_agent_sku_id': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'CertificateProvisioningState'}, - 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, - 'previous_provisioning_state': {'key': 'properties.previousProvisioningState', 'type': 'CertificateProvisioningState'}, - 'previous_provisioning_state_transition_time': {'key': 'properties.previousProvisioningStateTransitionTime', 'type': 'iso-8601'}, - 'public_data': {'key': 'properties.publicData', 'type': 'str'}, - 'delete_certificate_error': {'key': 'properties.deleteCertificateError', 'type': 'DeleteCertificateError'}, + 'image_reference': {'key': 'imageReference', 'type': 'ImageReference'}, + 'node_agent_sku_id': {'key': 'nodeAgentSkuId', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'WindowsConfiguration'}, + 'data_disks': {'key': 'dataDisks', 'type': '[DataDisk]'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + 'container_configuration': {'key': 'containerConfiguration', 'type': 'ContainerConfiguration'}, } - def __init__(self, thumbprint_algorithm=None, thumbprint=None, format=None): - super(Certificate, self).__init__() - self.thumbprint_algorithm = thumbprint_algorithm - self.thumbprint = thumbprint - self.format = format - self.provisioning_state = None - self.provisioning_state_transition_time = None - self.previous_provisioning_state = None - self.previous_provisioning_state_transition_time = None - self.public_data = None - self.delete_certificate_error = None + def __init__(self, *, image_reference, node_agent_sku_id: str, windows_configuration=None, data_disks=None, license_type: str=None, container_configuration=None, **kwargs) -> None: + super(VirtualMachineConfiguration, self).__init__(**kwargs) + self.image_reference = image_reference + self.node_agent_sku_id = node_agent_sku_id + self.windows_configuration = windows_configuration + self.data_disks = data_disks + self.license_type = license_type + self.container_configuration = container_configuration -class CertificateCreateOrUpdateParameters(ProxyResource): - """Contains information about a certificate. +class VirtualMachineFamilyCoreQuota(Model): + """A VM Family and its associated core quota for the Batch account. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. + :ivar name: The Virtual Machine family name. :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param thumbprint_algorithm: The algorithm of the certificate thumbprint. - This must match the first portion of the certificate name. Currently - required to be 'SHA1'. - :type thumbprint_algorithm: str - :param thumbprint: The thumbprint of the certificate. This must match the - thumbprint from the name. - :type thumbprint: str - :param format: The format of the certificate - either Pfx or Cer. If - omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' - :type format: str or ~azure.mgmt.batch.models.CertificateFormat - :param data: The base64-encoded contents of the certificate. The maximum - size is 10KB. - :type data: str - :param password: The password to access the certificate's private key. - This is required if the certificate format is pfx and must be omitted if - the certificate format is cer. - :type password: str + :ivar core_quota: The core quota for the VM family for the Batch account. + :vartype core_quota: int """ _validation = { - 'id': {'readonly': True}, 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'data': {'required': True}, + 'core_quota': {'readonly': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'thumbprint_algorithm': {'key': 'properties.thumbprintAlgorithm', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'format': {'key': 'properties.format', 'type': 'CertificateFormat'}, - 'data': {'key': 'properties.data', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, + 'core_quota': {'key': 'coreQuota', 'type': 'int'}, } - def __init__(self, data, thumbprint_algorithm=None, thumbprint=None, format=None, password=None): - super(CertificateCreateOrUpdateParameters, self).__init__() - self.thumbprint_algorithm = thumbprint_algorithm - self.thumbprint = thumbprint - self.format = format - self.data = data - self.password = password - + def __init__(self, **kwargs) -> None: + super(VirtualMachineFamilyCoreQuota, self).__init__(**kwargs) + self.name = None + self.core_quota = None -class Pool(ProxyResource): - """Contains information about a pool. - Variables are only populated by the server, and will be ignored when - sending a request. +class WindowsConfiguration(Model): + """Windows operating system settings to apply to the virtual machine. - :ivar id: The ID of the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. - :vartype type: str - :ivar etag: The ETag of the resource, used for concurrency statements. - :vartype etag: str - :param display_name: The display name for the pool. The display name need - not be unique and can contain any Unicode characters up to a maximum - length of 1024. - :type display_name: str - :ivar last_modified: The last modified time of the pool. This is the last - time at which the pool level data, such as the targetDedicatedNodes or - autoScaleSettings, changed. It does not factor in node-level changes such - as a compute node changing state. - :vartype last_modified: datetime - :ivar creation_time: The creation time of the pool. - :vartype creation_time: datetime - :ivar provisioning_state: The current state of the pool. Possible values - include: 'Succeeded', 'Deleting' - :vartype provisioning_state: str or - ~azure.mgmt.batch.models.PoolProvisioningState - :ivar provisioning_state_transition_time: The time at which the pool - entered its current state. - :vartype provisioning_state_transition_time: datetime - :ivar allocation_state: Whether the pool is resizing. Possible values - include: 'Steady', 'Resizing', 'Stopping' - :vartype allocation_state: str or ~azure.mgmt.batch.models.AllocationState - :ivar allocation_state_transition_time: The time at which the pool entered - its current allocation state. - :vartype allocation_state_transition_time: datetime - :param vm_size: The size of virtual machines in the pool. All VMs in a - pool are the same size. For information about available sizes of virtual - machines for Cloud Services pools (pools created with - cloudServiceConfiguration), see Sizes for Cloud Services - (http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). - Batch supports all Cloud Services VM sizes except ExtraSmall. For - information about available VM sizes for pools using images from the - Virtual Machines Marketplace (pools created with - virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) - (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) - or Sizes for Virtual Machines (Windows) - (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). - Batch supports all Azure VM sizes except STANDARD_A0 and those with - premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). - :type vm_size: str - :param deployment_configuration: This property describes how the pool - nodes will be deployed - using Cloud Services or Virtual Machines. Using - CloudServiceConfiguration specifies that the nodes should be creating - using Azure Cloud Services (PaaS), while VirtualMachineConfiguration uses - Azure Virtual Machines (IaaS). - :type deployment_configuration: - ~azure.mgmt.batch.models.DeploymentConfiguration - :ivar current_dedicated_nodes: The number of compute nodes currently in - the pool. - :vartype current_dedicated_nodes: int - :ivar current_low_priority_nodes: The number of low priority compute nodes - currently in the pool. - :vartype current_low_priority_nodes: int - :param scale_settings: Settings which configure the number of nodes in the - pool. - :type scale_settings: ~azure.mgmt.batch.models.ScaleSettings - :ivar auto_scale_run: The results and errors from the last execution of - the autoscale formula. This property is set only if the pool automatically - scales, i.e. autoScaleSettings are used. - :vartype auto_scale_run: ~azure.mgmt.batch.models.AutoScaleRun - :param inter_node_communication: Whether the pool permits direct - communication between nodes. This imposes restrictions on which nodes can - be assigned to the pool. Enabling this value can reduce the chance of the - requested number of nodes to be allocated in the pool. If not specified, - this value defaults to 'Disabled'. Possible values include: 'Enabled', - 'Disabled' - :type inter_node_communication: str or - ~azure.mgmt.batch.models.InterNodeCommunicationState - :param network_configuration: The network configuration for the pool. - :type network_configuration: ~azure.mgmt.batch.models.NetworkConfiguration - :param max_tasks_per_node: The maximum number of tasks that can run - concurrently on a single compute node in the pool. - :type max_tasks_per_node: int - :param task_scheduling_policy: How tasks are distributed across compute - nodes in a pool. - :type task_scheduling_policy: - ~azure.mgmt.batch.models.TaskSchedulingPolicy - :param user_accounts: The list of user accounts to be created on each node - in the pool. - :type user_accounts: list[~azure.mgmt.batch.models.UserAccount] - :param metadata: A list of name-value pairs associated with the pool as - metadata. The Batch service does not assign any meaning to metadata; it is - solely for the use of user code. - :type metadata: list[~azure.mgmt.batch.models.MetadataItem] - :param start_task: A task specified to run on each compute node as it - joins the pool. In an PATCH (update) operation, this property can be set - to an empty object to remove the start task from the pool. - :type start_task: ~azure.mgmt.batch.models.StartTask - :param certificates: The list of certificates to be installed on each - compute node in the pool. For Windows compute nodes, the Batch service - installs the certificates to the specified certificate store and location. - For Linux compute nodes, the certificates are stored in a directory inside - the task working directory and an environment variable - AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this - location. For certificates with visibility of 'remoteUser', a 'certs' - directory is created in the user's home directory (e.g., - /home/{user-name}/certs) and certificates are placed in that directory. - :type certificates: list[~azure.mgmt.batch.models.CertificateReference] - :param application_packages: The list of application packages to be - installed on each compute node in the pool. Changes to application - packages affect all new compute nodes joining the pool, but do not affect - compute nodes that are already in the pool until they are rebooted or - reimaged. - :type application_packages: - list[~azure.mgmt.batch.models.ApplicationPackageReference] - :param application_licenses: The list of application licenses the Batch - service will make available on each compute node in the pool. The list of - application licenses must be a subset of available Batch service - application licenses. If a license is requested which is not supported, - pool creation will fail. - :type application_licenses: list[str] - :ivar resize_operation_status: Contains details about the current or last - completed resize operation. - :vartype resize_operation_status: - ~azure.mgmt.batch.models.ResizeOperationStatus + :param enable_automatic_updates: Whether automatic updates are enabled on + the virtual machine. If omitted, the default value is true. + :type enable_automatic_updates: bool """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'last_modified': {'readonly': True}, - 'creation_time': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'provisioning_state_transition_time': {'readonly': True}, - 'allocation_state': {'readonly': True}, - 'allocation_state_transition_time': {'readonly': True}, - 'current_dedicated_nodes': {'readonly': True}, - 'current_low_priority_nodes': {'readonly': True}, - 'auto_scale_run': {'readonly': True}, - 'resize_operation_status': {'readonly': True}, + _attribute_map = { + 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, } + def __init__(self, *, enable_automatic_updates: bool=None, **kwargs) -> None: + super(WindowsConfiguration, self).__init__(**kwargs) + self.enable_automatic_updates = enable_automatic_updates + + +class WindowsUserConfiguration(Model): + """Properties used to create a user account on a Windows node. + + :param login_mode: Login mode for user. Specifies login mode for the user. + The default value for VirtualMachineConfiguration pools is interactive + mode and for CloudServiceConfiguration pools is batch mode. Possible + values include: 'Batch', 'Interactive' + :type login_mode: str or ~azure.mgmt.batch.models.LoginMode + """ + _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'last_modified': {'key': 'properties.lastModified', 'type': 'iso-8601'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'PoolProvisioningState'}, - 'provisioning_state_transition_time': {'key': 'properties.provisioningStateTransitionTime', 'type': 'iso-8601'}, - 'allocation_state': {'key': 'properties.allocationState', 'type': 'AllocationState'}, - 'allocation_state_transition_time': {'key': 'properties.allocationStateTransitionTime', 'type': 'iso-8601'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'deployment_configuration': {'key': 'properties.deploymentConfiguration', 'type': 'DeploymentConfiguration'}, - 'current_dedicated_nodes': {'key': 'properties.currentDedicatedNodes', 'type': 'int'}, - 'current_low_priority_nodes': {'key': 'properties.currentLowPriorityNodes', 'type': 'int'}, - 'scale_settings': {'key': 'properties.scaleSettings', 'type': 'ScaleSettings'}, - 'auto_scale_run': {'key': 'properties.autoScaleRun', 'type': 'AutoScaleRun'}, - 'inter_node_communication': {'key': 'properties.interNodeCommunication', 'type': 'InterNodeCommunicationState'}, - 'network_configuration': {'key': 'properties.networkConfiguration', 'type': 'NetworkConfiguration'}, - 'max_tasks_per_node': {'key': 'properties.maxTasksPerNode', 'type': 'int'}, - 'task_scheduling_policy': {'key': 'properties.taskSchedulingPolicy', 'type': 'TaskSchedulingPolicy'}, - 'user_accounts': {'key': 'properties.userAccounts', 'type': '[UserAccount]'}, - 'metadata': {'key': 'properties.metadata', 'type': '[MetadataItem]'}, - 'start_task': {'key': 'properties.startTask', 'type': 'StartTask'}, - 'certificates': {'key': 'properties.certificates', 'type': '[CertificateReference]'}, - 'application_packages': {'key': 'properties.applicationPackages', 'type': '[ApplicationPackageReference]'}, - 'application_licenses': {'key': 'properties.applicationLicenses', 'type': '[str]'}, - 'resize_operation_status': {'key': 'properties.resizeOperationStatus', 'type': 'ResizeOperationStatus'}, + 'login_mode': {'key': 'loginMode', 'type': 'LoginMode'}, } - def __init__(self, display_name=None, vm_size=None, deployment_configuration=None, scale_settings=None, inter_node_communication=None, network_configuration=None, max_tasks_per_node=None, task_scheduling_policy=None, user_accounts=None, metadata=None, start_task=None, certificates=None, application_packages=None, application_licenses=None): - super(Pool, self).__init__() - self.display_name = display_name - self.last_modified = None - self.creation_time = None - self.provisioning_state = None - self.provisioning_state_transition_time = None - self.allocation_state = None - self.allocation_state_transition_time = None - self.vm_size = vm_size - self.deployment_configuration = deployment_configuration - self.current_dedicated_nodes = None - self.current_low_priority_nodes = None - self.scale_settings = scale_settings - self.auto_scale_run = None - self.inter_node_communication = inter_node_communication - self.network_configuration = network_configuration - self.max_tasks_per_node = max_tasks_per_node - self.task_scheduling_policy = task_scheduling_policy - self.user_accounts = user_accounts - self.metadata = metadata - self.start_task = start_task - self.certificates = certificates - self.application_packages = application_packages - self.application_licenses = application_licenses - self.resize_operation_status = None + def __init__(self, *, login_mode=None, **kwargs) -> None: + super(WindowsUserConfiguration, self).__init__(**kwargs) + self.login_mode = login_mode diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_paged_models.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_paged_models.py index 1eb94dd020cd..1865025a41f0 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_paged_models.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_paged_models.py @@ -25,8 +25,6 @@ class BatchAccountPaged(Paged): def __init__(self, *args, **kwargs): super(BatchAccountPaged, self).__init__(*args, **kwargs) - - class ApplicationPackagePaged(Paged): """ A paging container for iterating over a list of :class:`ApplicationPackage ` object @@ -40,8 +38,6 @@ class ApplicationPackagePaged(Paged): def __init__(self, *args, **kwargs): super(ApplicationPackagePaged, self).__init__(*args, **kwargs) - - class ApplicationPaged(Paged): """ A paging container for iterating over a list of :class:`Application ` object @@ -55,8 +51,6 @@ class ApplicationPaged(Paged): def __init__(self, *args, **kwargs): super(ApplicationPaged, self).__init__(*args, **kwargs) - - class OperationPaged(Paged): """ A paging container for iterating over a list of :class:`Operation ` object @@ -70,8 +64,6 @@ class OperationPaged(Paged): def __init__(self, *args, **kwargs): super(OperationPaged, self).__init__(*args, **kwargs) - - class CertificatePaged(Paged): """ A paging container for iterating over a list of :class:`Certificate ` object @@ -85,8 +77,6 @@ class CertificatePaged(Paged): def __init__(self, *args, **kwargs): super(CertificatePaged, self).__init__(*args, **kwargs) - - class PoolPaged(Paged): """ A paging container for iterating over a list of :class:`Pool ` object diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/__init__.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/__init__.py index 457cbd3470cd..818f748e2734 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/__init__.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/__init__.py @@ -9,13 +9,13 @@ # regenerated. # -------------------------------------------------------------------------- -from .batch_account_operations import BatchAccountOperations -from .application_package_operations import ApplicationPackageOperations -from .application_operations import ApplicationOperations -from .location_operations import LocationOperations -from .operations import Operations -from .certificate_operations import CertificateOperations -from .pool_operations import PoolOperations +from ._batch_account_operations import BatchAccountOperations +from ._application_package_operations import ApplicationPackageOperations +from ._application_operations import ApplicationOperations +from ._location_operations import LocationOperations +from ._operations import Operations +from ._certificate_operations import CertificateOperations +from ._pool_operations import PoolOperations __all__ = [ 'BatchAccountOperations', diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_operations.py new file mode 100644 index 000000000000..d78823852422 --- /dev/null +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_operations.py @@ -0,0 +1,389 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ApplicationOperations(object): + """ApplicationOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + + self.config = config + + def create( + self, resource_group_name, account_name, application_name, parameters=None, custom_headers=None, raw=False, **operation_config): + """Adds an application to the specified Batch account. + + :param resource_group_name: The name of the resource group that + contains the Batch account. + :type resource_group_name: str + :param account_name: The name of the Batch account. + :type account_name: str + :param application_name: The name of the application. This must be + unique within the account. + :type application_name: str + :param parameters: The parameters for the request. + :type parameters: ~azure.mgmt.batch.models.Application + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Application or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.batch.models.Application or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), + 'applicationName': self._serialize.url("application_name", application_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9_-]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if parameters is not None: + body_content = self._serialize.body(parameters, 'Application') + else: + body_content = None + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Application', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}'} + + def delete( + self, resource_group_name, account_name, application_name, custom_headers=None, raw=False, **operation_config): + """Deletes an application. + + :param resource_group_name: The name of the resource group that + contains the Batch account. + :type resource_group_name: str + :param account_name: The name of the Batch account. + :type account_name: str + :param application_name: The name of the application. This must be + unique within the account. + :type application_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), + 'applicationName': self._serialize.url("application_name", application_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9_-]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}'} + + def get( + self, resource_group_name, account_name, application_name, custom_headers=None, raw=False, **operation_config): + """Gets information about the specified application. + + :param resource_group_name: The name of the resource group that + contains the Batch account. + :type resource_group_name: str + :param account_name: The name of the Batch account. + :type account_name: str + :param application_name: The name of the application. This must be + unique within the account. + :type application_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Application or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.batch.models.Application or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), + 'applicationName': self._serialize.url("application_name", application_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9_-]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Application', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}'} + + def update( + self, resource_group_name, account_name, application_name, parameters, custom_headers=None, raw=False, **operation_config): + """Updates settings for the specified application. + + :param resource_group_name: The name of the resource group that + contains the Batch account. + :type resource_group_name: str + :param account_name: The name of the Batch account. + :type account_name: str + :param application_name: The name of the application. This must be + unique within the account. + :type application_name: str + :param parameters: The parameters for the request. + :type parameters: ~azure.mgmt.batch.models.Application + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Application or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.batch.models.Application or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), + 'applicationName': self._serialize.url("application_name", application_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9_-]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'Application') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Application', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}'} + + def list( + self, resource_group_name, account_name, maxresults=None, custom_headers=None, raw=False, **operation_config): + """Lists all of the applications in the specified account. + + :param resource_group_name: The name of the resource group that + contains the Batch account. + :type resource_group_name: str + :param account_name: The name of the Batch account. + :type account_name: str + :param maxresults: The maximum number of items to return in the + response. + :type maxresults: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Application + :rtype: + ~azure.mgmt.batch.models.ApplicationPaged[~azure.mgmt.batch.models.Application] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if maxresults is not None: + query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ApplicationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications'} diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_package_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_package_operations.py new file mode 100644 index 000000000000..6e125e1993cf --- /dev/null +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_package_operations.py @@ -0,0 +1,407 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ApplicationPackageOperations(object): + """ApplicationPackageOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + + self.config = config + + def activate( + self, resource_group_name, account_name, application_name, version_name, format, custom_headers=None, raw=False, **operation_config): + """Activates the specified application package. + + :param resource_group_name: The name of the resource group that + contains the Batch account. + :type resource_group_name: str + :param account_name: The name of the Batch account. + :type account_name: str + :param application_name: The name of the application. This must be + unique within the account. + :type application_name: str + :param version_name: The version of the application. + :type version_name: str + :param format: The format of the application package binary file. + :type format: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationPackage or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.batch.models.ApplicationPackage or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.ActivateApplicationPackageParameters(format=format) + + # Construct URL + url = self.activate.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), + 'applicationName': self._serialize.url("application_name", application_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9_-]+$'), + 'versionName': self._serialize.url("version_name", version_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9_-][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ActivateApplicationPackageParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationPackage', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + activate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions/{versionName}/activate'} + + def create( + self, resource_group_name, account_name, application_name, version_name, custom_headers=None, raw=False, **operation_config): + """Creates an application package record. + + :param resource_group_name: The name of the resource group that + contains the Batch account. + :type resource_group_name: str + :param account_name: The name of the Batch account. + :type account_name: str + :param application_name: The name of the application. This must be + unique within the account. + :type application_name: str + :param version_name: The version of the application. + :type version_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationPackage or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.batch.models.ApplicationPackage or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = None + + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), + 'applicationName': self._serialize.url("application_name", application_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9_-]+$'), + 'versionName': self._serialize.url("version_name", version_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9_-][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if parameters is not None: + body_content = self._serialize.body(parameters, 'ApplicationPackage') + else: + body_content = None + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationPackage', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions/{versionName}'} + + def delete( + self, resource_group_name, account_name, application_name, version_name, custom_headers=None, raw=False, **operation_config): + """Deletes an application package record and its associated binary file. + + :param resource_group_name: The name of the resource group that + contains the Batch account. + :type resource_group_name: str + :param account_name: The name of the Batch account. + :type account_name: str + :param application_name: The name of the application. This must be + unique within the account. + :type application_name: str + :param version_name: The version of the application. + :type version_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), + 'applicationName': self._serialize.url("application_name", application_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9_-]+$'), + 'versionName': self._serialize.url("version_name", version_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9_-][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions/{versionName}'} + + def get( + self, resource_group_name, account_name, application_name, version_name, custom_headers=None, raw=False, **operation_config): + """Gets information about the specified application package. + + :param resource_group_name: The name of the resource group that + contains the Batch account. + :type resource_group_name: str + :param account_name: The name of the Batch account. + :type account_name: str + :param application_name: The name of the application. This must be + unique within the account. + :type application_name: str + :param version_name: The version of the application. + :type version_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationPackage or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.batch.models.ApplicationPackage or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), + 'applicationName': self._serialize.url("application_name", application_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9_-]+$'), + 'versionName': self._serialize.url("version_name", version_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9_-][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationPackage', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions/{versionName}'} + + def list( + self, resource_group_name, account_name, application_name, maxresults=None, custom_headers=None, raw=False, **operation_config): + """Lists all of the application packages in the specified application. + + :param resource_group_name: The name of the resource group that + contains the Batch account. + :type resource_group_name: str + :param account_name: The name of the Batch account. + :type account_name: str + :param application_name: The name of the application. This must be + unique within the account. + :type application_name: str + :param maxresults: The maximum number of items to return in the + response. + :type maxresults: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ApplicationPackage + :rtype: + ~azure.mgmt.batch.models.ApplicationPackagePaged[~azure.mgmt.batch.models.ApplicationPackage] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), + 'applicationName': self._serialize.url("application_name", application_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9_-]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if maxresults is not None: + query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ApplicationPackagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions'} diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_batch_account_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_batch_account_operations.py new file mode 100644 index 000000000000..936fb33a68c9 --- /dev/null +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_batch_account_operations.py @@ -0,0 +1,718 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class BatchAccountOperations(object): + """BatchAccountOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + + self.config = config + + + def _create_initial( + self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'BatchAccountCreateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + header_dict = {} + + if response.status_code == 200: + deserialized = self._deserialize('BatchAccount', response) + header_dict = { + 'Location': 'str', + 'Retry-After': 'int', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + + def create( + self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates a new Batch account with the specified parameters. Existing + accounts cannot be updated with this API and should instead be updated + with the Update Batch Account API. + + :param resource_group_name: The name of the resource group that + contains the Batch account. + :type resource_group_name: str + :param account_name: A name for the Batch account which must be unique + within the region. Batch account names must be between 3 and 24 + characters in length and must use only numbers and lowercase letters. + This name is used as part of the DNS name that is used to access the + Batch service in the region in which the account is created. For + example: http://accountname.region.batch.azure.com/. + :type account_name: str + :param parameters: Additional parameters for account creation. + :type parameters: + ~azure.mgmt.batch.models.BatchAccountCreateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns BatchAccount or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.batch.models.BatchAccount] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.batch.models.BatchAccount]] + :raises: :class:`CloudError` + """ + raw_result = self._create_initial( + resource_group_name=resource_group_name, + account_name=account_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + header_dict = { + 'Location': 'str', + 'Retry-After': 'int', + } + deserialized = self._deserialize('BatchAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}'} + + def update( + self, resource_group_name, account_name, tags=None, auto_storage=None, custom_headers=None, raw=False, **operation_config): + """Updates the properties of an existing Batch account. + + :param resource_group_name: The name of the resource group that + contains the Batch account. + :type resource_group_name: str + :param account_name: The name of the Batch account. + :type account_name: str + :param tags: The user-specified tags associated with the account. + :type tags: dict[str, str] + :param auto_storage: The properties related to the auto-storage + account. + :type auto_storage: ~azure.mgmt.batch.models.AutoStorageBaseProperties + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BatchAccount or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.batch.models.BatchAccount or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.BatchAccountUpdateParameters(tags=tags, auto_storage=auto_storage) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'BatchAccountUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BatchAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}'} + + + def _delete_initial( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + header_dict = { + 'Location': 'str', + 'Retry-After': 'int', + } + client_raw_response.add_headers(header_dict) + return client_raw_response + + def delete( + self, resource_group_name, account_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the specified Batch account. + + :param resource_group_name: The name of the resource group that + contains the Batch account. + :type resource_group_name: str + :param account_name: The name of the Batch account. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + account_name=account_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'Location': 'str', + 'Retry-After': 'int', + }) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}'} + + def get( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Gets information about the specified Batch account. + + :param resource_group_name: The name of the resource group that + contains the Batch account. + :type resource_group_name: str + :param account_name: The name of the Batch account. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BatchAccount or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.batch.models.BatchAccount or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BatchAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets information about the Batch accounts associated with the + subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of BatchAccount + :rtype: + ~azure.mgmt.batch.models.BatchAccountPaged[~azure.mgmt.batch.models.BatchAccount] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.BatchAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Batch/batchAccounts'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets information about the Batch accounts associated with the specified + resource group. + + :param resource_group_name: The name of the resource group that + contains the Batch account. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of BatchAccount + :rtype: + ~azure.mgmt.batch.models.BatchAccountPaged[~azure.mgmt.batch.models.BatchAccount] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.BatchAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts'} + + def synchronize_auto_storage_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Synchronizes access keys for the auto-storage account configured for + the specified Batch account. + + :param resource_group_name: The name of the resource group that + contains the Batch account. + :type resource_group_name: str + :param account_name: The name of the Batch account. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.synchronize_auto_storage_keys.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + synchronize_auto_storage_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/syncAutoStorageKeys'} + + def regenerate_key( + self, resource_group_name, account_name, key_name, custom_headers=None, raw=False, **operation_config): + """Regenerates the specified account key for the Batch account. + + :param resource_group_name: The name of the resource group that + contains the Batch account. + :type resource_group_name: str + :param account_name: The name of the Batch account. + :type account_name: str + :param key_name: The type of account key to regenerate. Possible + values include: 'Primary', 'Secondary' + :type key_name: str or ~azure.mgmt.batch.models.AccountKeyType + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BatchAccountKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.batch.models.BatchAccountKeys or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.BatchAccountRegenerateKeyParameters(key_name=key_name) + + # Construct URL + url = self.regenerate_key.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'BatchAccountRegenerateKeyParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BatchAccountKeys', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + regenerate_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/regenerateKeys'} + + def get_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Gets the account keys for the specified Batch account. + + This operation applies only to Batch accounts created with a + poolAllocationMode of 'BatchService'. If the Batch account was created + with a poolAllocationMode of 'UserSubscription', clients cannot use + access to keys to authenticate, and must use Azure Active Directory + instead. In this case, getting the keys will fail. + + :param resource_group_name: The name of the resource group that + contains the Batch account. + :type resource_group_name: str + :param account_name: The name of the Batch account. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BatchAccountKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.batch.models.BatchAccountKeys or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_keys.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BatchAccountKeys', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/listKeys'} diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_certificate_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_certificate_operations.py new file mode 100644 index 000000000000..faea89158f23 --- /dev/null +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_certificate_operations.py @@ -0,0 +1,597 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class CertificateOperations(object): + """CertificateOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + + self.config = config + + def list_by_batch_account( + self, resource_group_name, account_name, maxresults=None, select=None, filter=None, custom_headers=None, raw=False, **operation_config): + """Lists all of the certificates in the specified account. + + :param resource_group_name: The name of the resource group that + contains the Batch account. + :type resource_group_name: str + :param account_name: The name of the Batch account. + :type account_name: str + :param maxresults: The maximum number of items to return in the + response. + :type maxresults: int + :param select: Comma separated list of properties that should be + returned. e.g. "properties/provisioningState". Only top level + properties under properties/ are valid for selection. + :type select: str + :param filter: OData filter expression. Valid properties for filtering + are "properties/provisioningState", + "properties/provisioningStateTransitionTime", "name". + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Certificate + :rtype: + ~azure.mgmt.batch.models.CertificatePaged[~azure.mgmt.batch.models.Certificate] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_batch_account.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if maxresults is not None: + query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int') + if select is not None: + query_parameters['$select'] = self._serialize.query("select", select, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_batch_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates'} + + + def _create_initial( + self, resource_group_name, account_name, certificate_name, parameters, if_match=None, if_none_match=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), + 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str', max_length=45, min_length=5, pattern=r'^[\w]+-[\w]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if if_none_match is not None: + header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'CertificateCreateOrUpdateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + header_dict = {} + + if response.status_code == 200: + deserialized = self._deserialize('Certificate', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + + def create( + self, resource_group_name, account_name, certificate_name, parameters, if_match=None, if_none_match=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates a new certificate inside the specified account. + + :param resource_group_name: The name of the resource group that + contains the Batch account. + :type resource_group_name: str + :param account_name: The name of the Batch account. + :type account_name: str + :param certificate_name: The identifier for the certificate. This must + be made up of algorithm and thumbprint separated by a dash, and must + match the certificate data in the request. For example SHA1-a3d1c5. + :type certificate_name: str + :param parameters: Additional parameters for certificate creation. + :type parameters: + ~azure.mgmt.batch.models.CertificateCreateOrUpdateParameters + :param if_match: The entity state (ETag) version of the certificate to + update. A value of "*" can be used to apply the operation only if the + certificate already exists. If omitted, this operation will always be + applied. + :type if_match: str + :param if_none_match: Set to '*' to allow a new certificate to be + created, but to prevent updating an existing certificate. Other values + will be ignored. + :type if_none_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Certificate or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.batch.models.Certificate] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.batch.models.Certificate]] + :raises: :class:`CloudError` + """ + raw_result = self._create_initial( + resource_group_name=resource_group_name, + account_name=account_name, + certificate_name=certificate_name, + parameters=parameters, + if_match=if_match, + if_none_match=if_none_match, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + header_dict = { + 'ETag': 'str', + } + deserialized = self._deserialize('Certificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}'} + + def update( + self, resource_group_name, account_name, certificate_name, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): + """Updates the properties of an existing certificate. + + :param resource_group_name: The name of the resource group that + contains the Batch account. + :type resource_group_name: str + :param account_name: The name of the Batch account. + :type account_name: str + :param certificate_name: The identifier for the certificate. This must + be made up of algorithm and thumbprint separated by a dash, and must + match the certificate data in the request. For example SHA1-a3d1c5. + :type certificate_name: str + :param parameters: Certificate entity to update. + :type parameters: + ~azure.mgmt.batch.models.CertificateCreateOrUpdateParameters + :param if_match: The entity state (ETag) version of the certificate to + update. This value can be omitted or set to "*" to apply the operation + unconditionally. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Certificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.batch.models.Certificate or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), + 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str', max_length=45, min_length=5, pattern=r'^[\w]+-[\w]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'CertificateCreateOrUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Certificate', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}'} + + + def _delete_initial( + self, resource_group_name, account_name, certificate_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), + 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str', max_length=45, min_length=5, pattern=r'^[\w]+-[\w]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + header_dict = { + 'Location': 'str', + 'Retry-After': 'int', + } + client_raw_response.add_headers(header_dict) + return client_raw_response + + def delete( + self, resource_group_name, account_name, certificate_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the specified certificate. + + :param resource_group_name: The name of the resource group that + contains the Batch account. + :type resource_group_name: str + :param account_name: The name of the Batch account. + :type account_name: str + :param certificate_name: The identifier for the certificate. This must + be made up of algorithm and thumbprint separated by a dash, and must + match the certificate data in the request. For example SHA1-a3d1c5. + :type certificate_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + account_name=account_name, + certificate_name=certificate_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'Location': 'str', + 'Retry-After': 'int', + }) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}'} + + def get( + self, resource_group_name, account_name, certificate_name, custom_headers=None, raw=False, **operation_config): + """Gets information about the specified certificate. + + :param resource_group_name: The name of the resource group that + contains the Batch account. + :type resource_group_name: str + :param account_name: The name of the Batch account. + :type account_name: str + :param certificate_name: The identifier for the certificate. This must + be made up of algorithm and thumbprint separated by a dash, and must + match the certificate data in the request. For example SHA1-a3d1c5. + :type certificate_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Certificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.batch.models.Certificate or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), + 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str', max_length=45, min_length=5, pattern=r'^[\w]+-[\w]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Certificate', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}'} + + def cancel_deletion( + self, resource_group_name, account_name, certificate_name, custom_headers=None, raw=False, **operation_config): + """Cancels a failed deletion of a certificate from the specified account. + + If you try to delete a certificate that is being used by a pool or + compute node, the status of the certificate changes to deleteFailed. If + you decide that you want to continue using the certificate, you can use + this operation to set the status of the certificate back to active. If + you intend to delete the certificate, you do not need to run this + operation after the deletion failed. You must make sure that the + certificate is not being used by any resources, and then you can try + again to delete the certificate. + + :param resource_group_name: The name of the resource group that + contains the Batch account. + :type resource_group_name: str + :param account_name: The name of the Batch account. + :type account_name: str + :param certificate_name: The identifier for the certificate. This must + be made up of algorithm and thumbprint separated by a dash, and must + match the certificate data in the request. For example SHA1-a3d1c5. + :type certificate_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Certificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.batch.models.Certificate or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.cancel_deletion.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), + 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str', max_length=45, min_length=5, pattern=r'^[\w]+-[\w]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Certificate', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + cancel_deletion.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}/cancelDelete'} diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_location_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_location_operations.py new file mode 100644 index 000000000000..c2ab551fb4eb --- /dev/null +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_location_operations.py @@ -0,0 +1,167 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class LocationOperations(object): + """LocationOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + + self.config = config + + def get_quotas( + self, location_name, custom_headers=None, raw=False, **operation_config): + """Gets the Batch service quotas for the specified subscription at the + given location. + + :param location_name: The region for which to retrieve Batch service + quotas. + :type location_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BatchLocationQuota or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.batch.models.BatchLocationQuota or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_quotas.metadata['url'] + path_format_arguments = { + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BatchLocationQuota', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_quotas.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Batch/locations/{locationName}/quotas'} + + def check_name_availability( + self, location_name, name, custom_headers=None, raw=False, **operation_config): + """Checks whether the Batch account name is available in the specified + region. + + :param location_name: The desired region for the name check. + :type location_name: str + :param name: The name to check for availability + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CheckNameAvailabilityResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.batch.models.CheckNameAvailabilityResult or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.CheckNameAvailabilityParameters(name=name) + + # Construct URL + url = self.check_name_availability.metadata['url'] + path_format_arguments = { + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'CheckNameAvailabilityParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CheckNameAvailabilityResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Batch/locations/{locationName}/checkNameAvailability'} diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_operations.py new file mode 100644 index 000000000000..2c6a2e4e32d9 --- /dev/null +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_operations.py @@ -0,0 +1,102 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class Operations(object): + """Operations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists available operations for the Microsoft.Batch provider. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Operation + :rtype: + ~azure.mgmt.batch.models.OperationPaged[~azure.mgmt.batch.models.Operation] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Batch/operations'} diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_pool_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_pool_operations.py new file mode 100644 index 000000000000..22d5a28593c6 --- /dev/null +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_pool_operations.py @@ -0,0 +1,673 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class PoolOperations(object): + """PoolOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + + self.config = config + + def list_by_batch_account( + self, resource_group_name, account_name, maxresults=None, select=None, filter=None, custom_headers=None, raw=False, **operation_config): + """Lists all of the pools in the specified account. + + :param resource_group_name: The name of the resource group that + contains the Batch account. + :type resource_group_name: str + :param account_name: The name of the Batch account. + :type account_name: str + :param maxresults: The maximum number of items to return in the + response. + :type maxresults: int + :param select: Comma separated list of properties that should be + returned. e.g. "properties/provisioningState". Only top level + properties under properties/ are valid for selection. + :type select: str + :param filter: OData filter expression. Valid properties for filtering + are: + name + properties/allocationState + properties/allocationStateTransitionTime + properties/creationTime + properties/provisioningState + properties/provisioningStateTransitionTime + properties/lastModified + properties/vmSize + properties/interNodeCommunication + properties/scaleSettings/autoScale + properties/scaleSettings/fixedScale + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Pool + :rtype: + ~azure.mgmt.batch.models.PoolPaged[~azure.mgmt.batch.models.Pool] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_batch_account.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if maxresults is not None: + query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int') + if select is not None: + query_parameters['$select'] = self._serialize.query("select", select, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PoolPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_batch_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools'} + + + def _create_initial( + self, resource_group_name, account_name, pool_name, parameters, if_match=None, if_none_match=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), + 'poolName': self._serialize.url("pool_name", pool_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9_-]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if if_none_match is not None: + header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'Pool') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + header_dict = {} + + if response.status_code == 200: + deserialized = self._deserialize('Pool', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + + def create( + self, resource_group_name, account_name, pool_name, parameters, if_match=None, if_none_match=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates a new pool inside the specified account. + + :param resource_group_name: The name of the resource group that + contains the Batch account. + :type resource_group_name: str + :param account_name: The name of the Batch account. + :type account_name: str + :param pool_name: The pool name. This must be unique within the + account. + :type pool_name: str + :param parameters: Additional parameters for pool creation. + :type parameters: ~azure.mgmt.batch.models.Pool + :param if_match: The entity state (ETag) version of the pool to + update. A value of "*" can be used to apply the operation only if the + pool already exists. If omitted, this operation will always be + applied. + :type if_match: str + :param if_none_match: Set to '*' to allow a new pool to be created, + but to prevent updating an existing pool. Other values will be + ignored. + :type if_none_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Pool or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.batch.models.Pool] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.batch.models.Pool]] + :raises: :class:`CloudError` + """ + raw_result = self._create_initial( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + parameters=parameters, + if_match=if_match, + if_none_match=if_none_match, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + header_dict = { + 'ETag': 'str', + } + deserialized = self._deserialize('Pool', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}'} + + def update( + self, resource_group_name, account_name, pool_name, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): + """Updates the properties of an existing pool. + + :param resource_group_name: The name of the resource group that + contains the Batch account. + :type resource_group_name: str + :param account_name: The name of the Batch account. + :type account_name: str + :param pool_name: The pool name. This must be unique within the + account. + :type pool_name: str + :param parameters: Pool properties that should be updated. Properties + that are supplied will be updated, any property not supplied will be + unchanged. + :type parameters: ~azure.mgmt.batch.models.Pool + :param if_match: The entity state (ETag) version of the pool to + update. This value can be omitted or set to "*" to apply the operation + unconditionally. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Pool or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.batch.models.Pool or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), + 'poolName': self._serialize.url("pool_name", pool_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9_-]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'Pool') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Pool', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}'} + + + def _delete_initial( + self, resource_group_name, account_name, pool_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), + 'poolName': self._serialize.url("pool_name", pool_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9_-]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + header_dict = { + 'Location': 'str', + 'Retry-After': 'int', + } + client_raw_response.add_headers(header_dict) + return client_raw_response + + def delete( + self, resource_group_name, account_name, pool_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the specified pool. + + :param resource_group_name: The name of the resource group that + contains the Batch account. + :type resource_group_name: str + :param account_name: The name of the Batch account. + :type account_name: str + :param pool_name: The pool name. This must be unique within the + account. + :type pool_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'Location': 'str', + 'Retry-After': 'int', + }) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}'} + + def get( + self, resource_group_name, account_name, pool_name, custom_headers=None, raw=False, **operation_config): + """Gets information about the specified pool. + + :param resource_group_name: The name of the resource group that + contains the Batch account. + :type resource_group_name: str + :param account_name: The name of the Batch account. + :type account_name: str + :param pool_name: The pool name. This must be unique within the + account. + :type pool_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Pool or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.batch.models.Pool or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), + 'poolName': self._serialize.url("pool_name", pool_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9_-]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Pool', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}'} + + def disable_auto_scale( + self, resource_group_name, account_name, pool_name, custom_headers=None, raw=False, **operation_config): + """Disables automatic scaling for a pool. + + :param resource_group_name: The name of the resource group that + contains the Batch account. + :type resource_group_name: str + :param account_name: The name of the Batch account. + :type account_name: str + :param pool_name: The pool name. This must be unique within the + account. + :type pool_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Pool or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.batch.models.Pool or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.disable_auto_scale.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), + 'poolName': self._serialize.url("pool_name", pool_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9_-]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Pool', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + disable_auto_scale.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}/disableAutoScale'} + + def stop_resize( + self, resource_group_name, account_name, pool_name, custom_headers=None, raw=False, **operation_config): + """Stops an ongoing resize operation on the pool. + + This does not restore the pool to its previous state before the resize + operation: it only stops any further changes being made, and the pool + maintains its current state. After stopping, the pool stabilizes at the + number of nodes it was at when the stop operation was done. During the + stop operation, the pool allocation state changes first to stopping and + then to steady. A resize operation need not be an explicit resize pool + request; this API can also be used to halt the initial sizing of the + pool when it is created. + + :param resource_group_name: The name of the resource group that + contains the Batch account. + :type resource_group_name: str + :param account_name: The name of the Batch account. + :type account_name: str + :param pool_name: The pool name. This must be unique within the + account. + :type pool_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Pool or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.batch.models.Pool or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.stop_resize.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), + 'poolName': self._serialize.url("pool_name", pool_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9_-]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Pool', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + stop_resize.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}/stopResize'} diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/application_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/application_operations.py deleted file mode 100644 index b447de1a57b8..000000000000 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/application_operations.py +++ /dev/null @@ -1,390 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ApplicationOperations(object): - """ApplicationOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2018-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-12-01" - - self.config = config - - def create( - self, resource_group_name, account_name, application_name, parameters=None, custom_headers=None, raw=False, **operation_config): - """Adds an application to the specified Batch account. - - :param resource_group_name: The name of the resource group that - contains the Batch account. - :type resource_group_name: str - :param account_name: The name of the Batch account. - :type account_name: str - :param application_name: The name of the application. This must be - unique within the account. - :type application_name: str - :param parameters: The parameters for the request. - :type parameters: ~azure.mgmt.batch.models.Application - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Application or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.batch.models.Application or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), - 'applicationName': self._serialize.url("application_name", application_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9_-]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if parameters is not None: - body_content = self._serialize.body(parameters, 'Application') - else: - body_content = None - - # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Application', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}'} - - def delete( - self, resource_group_name, account_name, application_name, custom_headers=None, raw=False, **operation_config): - """Deletes an application. - - :param resource_group_name: The name of the resource group that - contains the Batch account. - :type resource_group_name: str - :param account_name: The name of the Batch account. - :type account_name: str - :param application_name: The name of the application. This must be - unique within the account. - :type application_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), - 'applicationName': self._serialize.url("application_name", application_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9_-]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}'} - - def get( - self, resource_group_name, account_name, application_name, custom_headers=None, raw=False, **operation_config): - """Gets information about the specified application. - - :param resource_group_name: The name of the resource group that - contains the Batch account. - :type resource_group_name: str - :param account_name: The name of the Batch account. - :type account_name: str - :param application_name: The name of the application. This must be - unique within the account. - :type application_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Application or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.batch.models.Application or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), - 'applicationName': self._serialize.url("application_name", application_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9_-]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Application', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}'} - - def update( - self, resource_group_name, account_name, application_name, parameters, custom_headers=None, raw=False, **operation_config): - """Updates settings for the specified application. - - :param resource_group_name: The name of the resource group that - contains the Batch account. - :type resource_group_name: str - :param account_name: The name of the Batch account. - :type account_name: str - :param application_name: The name of the application. This must be - unique within the account. - :type application_name: str - :param parameters: The parameters for the request. - :type parameters: ~azure.mgmt.batch.models.Application - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Application or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.batch.models.Application or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), - 'applicationName': self._serialize.url("application_name", application_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9_-]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'Application') - - # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Application', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}'} - - def list( - self, resource_group_name, account_name, maxresults=None, custom_headers=None, raw=False, **operation_config): - """Lists all of the applications in the specified account. - - :param resource_group_name: The name of the resource group that - contains the Batch account. - :type resource_group_name: str - :param account_name: The name of the Batch account. - :type account_name: str - :param maxresults: The maximum number of items to return in the - response. - :type maxresults: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Application - :rtype: - ~azure.mgmt.batch.models.ApplicationPaged[~azure.mgmt.batch.models.Application] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if maxresults is not None: - query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ApplicationPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ApplicationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications'} diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/application_package_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/application_package_operations.py deleted file mode 100644 index 0823f92e92f0..000000000000 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/application_package_operations.py +++ /dev/null @@ -1,408 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ApplicationPackageOperations(object): - """ApplicationPackageOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2018-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-12-01" - - self.config = config - - def activate( - self, resource_group_name, account_name, application_name, version_name, format, custom_headers=None, raw=False, **operation_config): - """Activates the specified application package. - - :param resource_group_name: The name of the resource group that - contains the Batch account. - :type resource_group_name: str - :param account_name: The name of the Batch account. - :type account_name: str - :param application_name: The name of the application. This must be - unique within the account. - :type application_name: str - :param version_name: The version of the application. - :type version_name: str - :param format: The format of the application package binary file. - :type format: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationPackage or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.batch.models.ApplicationPackage or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = models.ActivateApplicationPackageParameters(format=format) - - # Construct URL - url = self.activate.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), - 'applicationName': self._serialize.url("application_name", application_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9_-]+$'), - 'versionName': self._serialize.url("version_name", version_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9_-][a-zA-Z0-9_.-]*$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ActivateApplicationPackageParameters') - - # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApplicationPackage', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - activate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions/{versionName}/activate'} - - def create( - self, resource_group_name, account_name, application_name, version_name, custom_headers=None, raw=False, **operation_config): - """Creates an application package record. - - :param resource_group_name: The name of the resource group that - contains the Batch account. - :type resource_group_name: str - :param account_name: The name of the Batch account. - :type account_name: str - :param application_name: The name of the application. This must be - unique within the account. - :type application_name: str - :param version_name: The version of the application. - :type version_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationPackage or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.batch.models.ApplicationPackage or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = None - - # Construct URL - url = self.create.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), - 'applicationName': self._serialize.url("application_name", application_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9_-]+$'), - 'versionName': self._serialize.url("version_name", version_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9_-][a-zA-Z0-9_.-]*$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if parameters is not None: - body_content = self._serialize.body(parameters, 'ApplicationPackage') - else: - body_content = None - - # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApplicationPackage', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions/{versionName}'} - - def delete( - self, resource_group_name, account_name, application_name, version_name, custom_headers=None, raw=False, **operation_config): - """Deletes an application package record and its associated binary file. - - :param resource_group_name: The name of the resource group that - contains the Batch account. - :type resource_group_name: str - :param account_name: The name of the Batch account. - :type account_name: str - :param application_name: The name of the application. This must be - unique within the account. - :type application_name: str - :param version_name: The version of the application. - :type version_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), - 'applicationName': self._serialize.url("application_name", application_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9_-]+$'), - 'versionName': self._serialize.url("version_name", version_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9_-][a-zA-Z0-9_.-]*$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions/{versionName}'} - - def get( - self, resource_group_name, account_name, application_name, version_name, custom_headers=None, raw=False, **operation_config): - """Gets information about the specified application package. - - :param resource_group_name: The name of the resource group that - contains the Batch account. - :type resource_group_name: str - :param account_name: The name of the Batch account. - :type account_name: str - :param application_name: The name of the application. This must be - unique within the account. - :type application_name: str - :param version_name: The version of the application. - :type version_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationPackage or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.batch.models.ApplicationPackage or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), - 'applicationName': self._serialize.url("application_name", application_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9_-]+$'), - 'versionName': self._serialize.url("version_name", version_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9_-][a-zA-Z0-9_.-]*$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApplicationPackage', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions/{versionName}'} - - def list( - self, resource_group_name, account_name, application_name, maxresults=None, custom_headers=None, raw=False, **operation_config): - """Lists all of the application packages in the specified application. - - :param resource_group_name: The name of the resource group that - contains the Batch account. - :type resource_group_name: str - :param account_name: The name of the Batch account. - :type account_name: str - :param application_name: The name of the application. This must be - unique within the account. - :type application_name: str - :param maxresults: The maximum number of items to return in the - response. - :type maxresults: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ApplicationPackage - :rtype: - ~azure.mgmt.batch.models.ApplicationPackagePaged[~azure.mgmt.batch.models.ApplicationPackage] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), - 'applicationName': self._serialize.url("application_name", application_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9_-]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if maxresults is not None: - query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ApplicationPackagePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ApplicationPackagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions'} diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/batch_account_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/batch_account_operations.py deleted file mode 100644 index 70fc40e1b618..000000000000 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/batch_account_operations.py +++ /dev/null @@ -1,760 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.exceptions import DeserializationError -from msrestazure.azure_operation import AzureOperationPoller - -from .. import models - - -class BatchAccountOperations(object): - """BatchAccountOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2018-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-12-01" - - self.config = config - - - def _create_initial( - self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'BatchAccountCreateParameters') - - # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('BatchAccount', response) - header_dict = { - 'Location': 'str', - 'Retry-After': 'int', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - try: - client_raw_response.add_headers(header_dict) - except DeserializationError: - pass # Deserialization of Headers here can fail - return client_raw_response - - return deserialized - - def create( - self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, **operation_config): - """Creates a new Batch account with the specified parameters. Existing - accounts cannot be updated with this API and should instead be updated - with the Update Batch Account API. - - :param resource_group_name: The name of the resource group that - contains the Batch account. - :type resource_group_name: str - :param account_name: A name for the Batch account which must be unique - within the region. Batch account names must be between 3 and 24 - characters in length and must use only numbers and lowercase letters. - This name is used as part of the DNS name that is used to access the - Batch service in the region in which the account is created. For - example: http://accountname.region.batch.azure.com/. - :type account_name: str - :param parameters: Additional parameters for account creation. - :type parameters: - ~azure.mgmt.batch.models.BatchAccountCreateParameters - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns BatchAccount - or ClientRawResponse if raw=true - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.batch.models.BatchAccount] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - raw_result = self._create_initial( - resource_group_name=resource_group_name, - account_name=account_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - header_dict = { - 'Location': 'str', - 'Retry-After': 'int', - } - deserialized = self._deserialize('BatchAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}'} - - def update( - self, resource_group_name, account_name, tags=None, auto_storage=None, custom_headers=None, raw=False, **operation_config): - """Updates the properties of an existing Batch account. - - :param resource_group_name: The name of the resource group that - contains the Batch account. - :type resource_group_name: str - :param account_name: The name of the Batch account. - :type account_name: str - :param tags: The user-specified tags associated with the account. - :type tags: dict[str, str] - :param auto_storage: The properties related to the auto-storage - account. - :type auto_storage: ~azure.mgmt.batch.models.AutoStorageBaseProperties - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BatchAccount or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.batch.models.BatchAccount or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = models.BatchAccountUpdateParameters(tags=tags, auto_storage=auto_storage) - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'BatchAccountUpdateParameters') - - # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('BatchAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}'} - - - def _delete_initial( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - header_dict = { - 'Location': 'str', - 'Retry-After': 'int', - } - client_raw_response.add_headers(header_dict) - return client_raw_response - - def delete( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Deletes the specified Batch account. - - :param resource_group_name: The name of the resource group that - contains the Batch account. - :type resource_group_name: str - :param account_name: The name of the Batch account. - :type account_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - account_name=account_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ - 'Location': 'str', - 'Retry-After': 'int', - }) - return client_raw_response - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}'} - - def get( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Gets information about the specified Batch account. - - :param resource_group_name: The name of the resource group that - contains the Batch account. - :type resource_group_name: str - :param account_name: The name of the Batch account. - :type account_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BatchAccount or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.batch.models.BatchAccount or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('BatchAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets information about the Batch accounts associated with the - subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of BatchAccount - :rtype: - ~azure.mgmt.batch.models.BatchAccountPaged[~azure.mgmt.batch.models.BatchAccount] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.BatchAccountPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.BatchAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Batch/batchAccounts'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Gets information about the Batch accounts associated with the specified - resource group. - - :param resource_group_name: The name of the resource group that - contains the Batch account. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of BatchAccount - :rtype: - ~azure.mgmt.batch.models.BatchAccountPaged[~azure.mgmt.batch.models.BatchAccount] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.BatchAccountPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.BatchAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts'} - - def synchronize_auto_storage_keys( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Synchronizes access keys for the auto-storage account configured for - the specified Batch account. - - :param resource_group_name: The name of the resource group that - contains the Batch account. - :type resource_group_name: str - :param account_name: The name of the Batch account. - :type account_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.synchronize_auto_storage_keys.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - synchronize_auto_storage_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/syncAutoStorageKeys'} - - def regenerate_key( - self, resource_group_name, account_name, key_name, custom_headers=None, raw=False, **operation_config): - """Regenerates the specified account key for the Batch account. - - :param resource_group_name: The name of the resource group that - contains the Batch account. - :type resource_group_name: str - :param account_name: The name of the Batch account. - :type account_name: str - :param key_name: The type of account key to regenerate. Possible - values include: 'Primary', 'Secondary' - :type key_name: str or ~azure.mgmt.batch.models.AccountKeyType - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BatchAccountKeys or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.batch.models.BatchAccountKeys or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = models.BatchAccountRegenerateKeyParameters(key_name=key_name) - - # Construct URL - url = self.regenerate_key.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'BatchAccountRegenerateKeyParameters') - - # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('BatchAccountKeys', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - regenerate_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/regenerateKeys'} - - def get_keys( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Gets the account keys for the specified Batch account. - - This operation applies only to Batch accounts created with a - poolAllocationMode of 'BatchService'. If the Batch account was created - with a poolAllocationMode of 'UserSubscription', clients cannot use - access to keys to authenticate, and must use Azure Active Directory - instead. In this case, getting the keys will fail. - - :param resource_group_name: The name of the resource group that - contains the Batch account. - :type resource_group_name: str - :param account_name: The name of the Batch account. - :type account_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BatchAccountKeys or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.batch.models.BatchAccountKeys or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_keys.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('BatchAccountKeys', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/listKeys'} diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/certificate_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/certificate_operations.py deleted file mode 100644 index 8db5cd991d95..000000000000 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/certificate_operations.py +++ /dev/null @@ -1,638 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.exceptions import DeserializationError -from msrestazure.azure_operation import AzureOperationPoller - -from .. import models - - -class CertificateOperations(object): - """CertificateOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2018-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-12-01" - - self.config = config - - def list_by_batch_account( - self, resource_group_name, account_name, maxresults=None, select=None, filter=None, custom_headers=None, raw=False, **operation_config): - """Lists all of the certificates in the specified account. - - :param resource_group_name: The name of the resource group that - contains the Batch account. - :type resource_group_name: str - :param account_name: The name of the Batch account. - :type account_name: str - :param maxresults: The maximum number of items to return in the - response. - :type maxresults: int - :param select: Comma separated list of properties that should be - returned. e.g. "properties/provisioningState". Only top level - properties under properties/ are valid for selection. - :type select: str - :param filter: OData filter expression. Valid properties for filtering - are "properties/provisioningState", - "properties/provisioningStateTransitionTime", "name". - :type filter: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Certificate - :rtype: - ~azure.mgmt.batch.models.CertificatePaged[~azure.mgmt.batch.models.Certificate] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_batch_account.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if maxresults is not None: - query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int') - if select is not None: - query_parameters['$select'] = self._serialize.query("select", select, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.CertificatePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.CertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_batch_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates'} - - - def _create_initial( - self, resource_group_name, account_name, certificate_name, parameters, if_match=None, if_none_match=None, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), - 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str', max_length=45, min_length=5, pattern=r'^[\w]+-[\w]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if if_none_match is not None: - header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'CertificateCreateOrUpdateParameters') - - # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('Certificate', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - try: - client_raw_response.add_headers(header_dict) - except DeserializationError: - pass # Deserialization of Headers here can fail - return client_raw_response - - return deserialized - - def create( - self, resource_group_name, account_name, certificate_name, parameters, if_match=None, if_none_match=None, custom_headers=None, raw=False, **operation_config): - """Creates a new certificate inside the specified account. - - :param resource_group_name: The name of the resource group that - contains the Batch account. - :type resource_group_name: str - :param account_name: The name of the Batch account. - :type account_name: str - :param certificate_name: The identifier for the certificate. This must - be made up of algorithm and thumbprint separated by a dash, and must - match the certificate data in the request. For example SHA1-a3d1c5. - :type certificate_name: str - :param parameters: Additional parameters for certificate creation. - :type parameters: - ~azure.mgmt.batch.models.CertificateCreateOrUpdateParameters - :param if_match: The entity state (ETag) version of the certificate to - update. A value of "*" can be used to apply the operation only if the - certificate already exists. If omitted, this operation will always be - applied. - :type if_match: str - :param if_none_match: Set to '*' to allow a new certificate to be - created, but to prevent updating an existing certificate. Other values - will be ignored. - :type if_none_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns Certificate - or ClientRawResponse if raw=true - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.batch.models.Certificate] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - raw_result = self._create_initial( - resource_group_name=resource_group_name, - account_name=account_name, - certificate_name=certificate_name, - parameters=parameters, - if_match=if_match, - if_none_match=if_none_match, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - header_dict = { - 'ETag': 'str', - } - deserialized = self._deserialize('Certificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}'} - - def update( - self, resource_group_name, account_name, certificate_name, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): - """Updates the properties of an existing certificate. - - :param resource_group_name: The name of the resource group that - contains the Batch account. - :type resource_group_name: str - :param account_name: The name of the Batch account. - :type account_name: str - :param certificate_name: The identifier for the certificate. This must - be made up of algorithm and thumbprint separated by a dash, and must - match the certificate data in the request. For example SHA1-a3d1c5. - :type certificate_name: str - :param parameters: Certificate entity to update. - :type parameters: - ~azure.mgmt.batch.models.CertificateCreateOrUpdateParameters - :param if_match: The entity state (ETag) version of the certificate to - update. This value can be omitted or set to "*" to apply the operation - unconditionally. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Certificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.batch.models.Certificate or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), - 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str', max_length=45, min_length=5, pattern=r'^[\w]+-[\w]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'CertificateCreateOrUpdateParameters') - - # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('Certificate', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}'} - - - def _delete_initial( - self, resource_group_name, account_name, certificate_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), - 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str', max_length=45, min_length=5, pattern=r'^[\w]+-[\w]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - header_dict = { - 'Location': 'str', - 'Retry-After': 'int', - } - client_raw_response.add_headers(header_dict) - return client_raw_response - - def delete( - self, resource_group_name, account_name, certificate_name, custom_headers=None, raw=False, **operation_config): - """Deletes the specified certificate. - - :param resource_group_name: The name of the resource group that - contains the Batch account. - :type resource_group_name: str - :param account_name: The name of the Batch account. - :type account_name: str - :param certificate_name: The identifier for the certificate. This must - be made up of algorithm and thumbprint separated by a dash, and must - match the certificate data in the request. For example SHA1-a3d1c5. - :type certificate_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - account_name=account_name, - certificate_name=certificate_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ - 'Location': 'str', - 'Retry-After': 'int', - }) - return client_raw_response - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}'} - - def get( - self, resource_group_name, account_name, certificate_name, custom_headers=None, raw=False, **operation_config): - """Gets information about the specified certificate. - - :param resource_group_name: The name of the resource group that - contains the Batch account. - :type resource_group_name: str - :param account_name: The name of the Batch account. - :type account_name: str - :param certificate_name: The identifier for the certificate. This must - be made up of algorithm and thumbprint separated by a dash, and must - match the certificate data in the request. For example SHA1-a3d1c5. - :type certificate_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Certificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.batch.models.Certificate or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), - 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str', max_length=45, min_length=5, pattern=r'^[\w]+-[\w]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('Certificate', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}'} - - def cancel_deletion( - self, resource_group_name, account_name, certificate_name, custom_headers=None, raw=False, **operation_config): - """Cancels a failed deletion of a certificate from the specified account. - - If you try to delete a certificate that is being used by a pool or - compute node, the status of the certificate changes to deleteFailed. If - you decide that you want to continue using the certificate, you can use - this operation to set the status of the certificate back to active. If - you intend to delete the certificate, you do not need to run this - operation after the deletion failed. You must make sure that the - certificate is not being used by any resources, and then you can try - again to delete the certificate. - - :param resource_group_name: The name of the resource group that - contains the Batch account. - :type resource_group_name: str - :param account_name: The name of the Batch account. - :type account_name: str - :param certificate_name: The identifier for the certificate. This must - be made up of algorithm and thumbprint separated by a dash, and must - match the certificate data in the request. For example SHA1-a3d1c5. - :type certificate_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Certificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.batch.models.Certificate or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.cancel_deletion.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), - 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str', max_length=45, min_length=5, pattern=r'^[\w]+-[\w]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('Certificate', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - cancel_deletion.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}/cancelDelete'} diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/location_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/location_operations.py deleted file mode 100644 index 84b9be79e2c0..000000000000 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/location_operations.py +++ /dev/null @@ -1,167 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class LocationOperations(object): - """LocationOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2018-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-12-01" - - self.config = config - - def get_quotas( - self, location_name, custom_headers=None, raw=False, **operation_config): - """Gets the Batch service quotas for the specified subscription at the - given location. - - :param location_name: The region for which to retrieve Batch service - quotas. - :type location_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BatchLocationQuota or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.batch.models.BatchLocationQuota or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_quotas.metadata['url'] - path_format_arguments = { - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('BatchLocationQuota', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_quotas.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Batch/locations/{locationName}/quotas'} - - def check_name_availability( - self, location_name, name, custom_headers=None, raw=False, **operation_config): - """Checks whether the Batch account name is available in the specified - region. - - :param location_name: The desired region for the name check. - :type location_name: str - :param name: The name to check for availability - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CheckNameAvailabilityResult or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.batch.models.CheckNameAvailabilityResult or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = models.CheckNameAvailabilityParameters(name=name) - - # Construct URL - url = self.check_name_availability.metadata['url'] - path_format_arguments = { - 'locationName': self._serialize.url("location_name", location_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'CheckNameAvailabilityParameters') - - # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('CheckNameAvailabilityResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Batch/locations/{locationName}/checkNameAvailability'} diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/operations.py deleted file mode 100644 index 4774273e7176..000000000000 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/operations.py +++ /dev/null @@ -1,99 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2018-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-12-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists available operations for the Microsoft.Batch provider. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Operation - :rtype: - ~azure.mgmt.batch.models.OperationPaged[~azure.mgmt.batch.models.Operation] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/providers/Microsoft.Batch/operations'} diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/pool_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/pool_operations.py deleted file mode 100644 index 02cab779f816..000000000000 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/pool_operations.py +++ /dev/null @@ -1,715 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.exceptions import DeserializationError -from msrestazure.azure_operation import AzureOperationPoller - -from .. import models - - -class PoolOperations(object): - """PoolOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2018-12-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-12-01" - - self.config = config - - def list_by_batch_account( - self, resource_group_name, account_name, maxresults=None, select=None, filter=None, custom_headers=None, raw=False, **operation_config): - """Lists all of the pools in the specified account. - - :param resource_group_name: The name of the resource group that - contains the Batch account. - :type resource_group_name: str - :param account_name: The name of the Batch account. - :type account_name: str - :param maxresults: The maximum number of items to return in the - response. - :type maxresults: int - :param select: Comma separated list of properties that should be - returned. e.g. "properties/provisioningState". Only top level - properties under properties/ are valid for selection. - :type select: str - :param filter: OData filter expression. Valid properties for filtering - are: - name - properties/allocationState - properties/allocationStateTransitionTime - properties/creationTime - properties/provisioningState - properties/provisioningStateTransitionTime - properties/lastModified - properties/vmSize - properties/interNodeCommunication - properties/scaleSettings/autoScale - properties/scaleSettings/fixedScale - :type filter: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Pool - :rtype: - ~azure.mgmt.batch.models.PoolPaged[~azure.mgmt.batch.models.Pool] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_batch_account.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if maxresults is not None: - query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int') - if select is not None: - query_parameters['$select'] = self._serialize.query("select", select, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.PoolPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.PoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_batch_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools'} - - - def _create_initial( - self, resource_group_name, account_name, pool_name, parameters, if_match=None, if_none_match=None, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), - 'poolName': self._serialize.url("pool_name", pool_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9_-]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if if_none_match is not None: - header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'Pool') - - # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('Pool', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - try: - client_raw_response.add_headers(header_dict) - except DeserializationError: - pass # Deserialization of Headers here can fail - return client_raw_response - - return deserialized - - def create( - self, resource_group_name, account_name, pool_name, parameters, if_match=None, if_none_match=None, custom_headers=None, raw=False, **operation_config): - """Creates a new pool inside the specified account. - - :param resource_group_name: The name of the resource group that - contains the Batch account. - :type resource_group_name: str - :param account_name: The name of the Batch account. - :type account_name: str - :param pool_name: The pool name. This must be unique within the - account. - :type pool_name: str - :param parameters: Additional parameters for pool creation. - :type parameters: ~azure.mgmt.batch.models.Pool - :param if_match: The entity state (ETag) version of the pool to - update. A value of "*" can be used to apply the operation only if the - pool already exists. If omitted, this operation will always be - applied. - :type if_match: str - :param if_none_match: Set to '*' to allow a new pool to be created, - but to prevent updating an existing pool. Other values will be - ignored. - :type if_none_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns Pool or - ClientRawResponse if raw=true - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.batch.models.Pool] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - raw_result = self._create_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - parameters=parameters, - if_match=if_match, - if_none_match=if_none_match, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - header_dict = { - 'ETag': 'str', - } - deserialized = self._deserialize('Pool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}'} - - def update( - self, resource_group_name, account_name, pool_name, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): - """Updates the properties of an existing pool. - - :param resource_group_name: The name of the resource group that - contains the Batch account. - :type resource_group_name: str - :param account_name: The name of the Batch account. - :type account_name: str - :param pool_name: The pool name. This must be unique within the - account. - :type pool_name: str - :param parameters: Pool properties that should be updated. Properties - that are supplied will be updated, any property not supplied will be - unchanged. - :type parameters: ~azure.mgmt.batch.models.Pool - :param if_match: The entity state (ETag) version of the pool to - update. This value can be omitted or set to "*" to apply the operation - unconditionally. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Pool or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.batch.models.Pool or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), - 'poolName': self._serialize.url("pool_name", pool_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9_-]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'Pool') - - # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('Pool', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}'} - - - def _delete_initial( - self, resource_group_name, account_name, pool_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), - 'poolName': self._serialize.url("pool_name", pool_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9_-]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - header_dict = { - 'Location': 'str', - 'Retry-After': 'int', - } - client_raw_response.add_headers(header_dict) - return client_raw_response - - def delete( - self, resource_group_name, account_name, pool_name, custom_headers=None, raw=False, **operation_config): - """Deletes the specified pool. - - :param resource_group_name: The name of the resource group that - contains the Batch account. - :type resource_group_name: str - :param account_name: The name of the Batch account. - :type account_name: str - :param pool_name: The pool name. This must be unique within the - account. - :type pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - account_name=account_name, - pool_name=pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ - 'Location': 'str', - 'Retry-After': 'int', - }) - return client_raw_response - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}'} - - def get( - self, resource_group_name, account_name, pool_name, custom_headers=None, raw=False, **operation_config): - """Gets information about the specified pool. - - :param resource_group_name: The name of the resource group that - contains the Batch account. - :type resource_group_name: str - :param account_name: The name of the Batch account. - :type account_name: str - :param pool_name: The pool name. This must be unique within the - account. - :type pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Pool or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.batch.models.Pool or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), - 'poolName': self._serialize.url("pool_name", pool_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9_-]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('Pool', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}'} - - def disable_auto_scale( - self, resource_group_name, account_name, pool_name, custom_headers=None, raw=False, **operation_config): - """Disables automatic scaling for a pool. - - :param resource_group_name: The name of the resource group that - contains the Batch account. - :type resource_group_name: str - :param account_name: The name of the Batch account. - :type account_name: str - :param pool_name: The pool name. This must be unique within the - account. - :type pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Pool or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.batch.models.Pool or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.disable_auto_scale.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), - 'poolName': self._serialize.url("pool_name", pool_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9_-]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('Pool', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - disable_auto_scale.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}/disableAutoScale'} - - def stop_resize( - self, resource_group_name, account_name, pool_name, custom_headers=None, raw=False, **operation_config): - """Stops an ongoing resize operation on the pool. - - This does not restore the pool to its previous state before the resize - operation: it only stops any further changes being made, and the pool - maintains its current state. After stopping, the pool stabilizes at the - number of nodes it was at when the stop operation was done. During the - stop operation, the pool allocation state changes first to stopping and - then to steady. A resize operation need not be an explicit resize pool - request; this API can also be used to halt the initial sizing of the - pool when it is created. - - :param resource_group_name: The name of the resource group that - contains the Batch account. - :type resource_group_name: str - :param account_name: The name of the Batch account. - :type account_name: str - :param pool_name: The pool name. This must be unique within the - account. - :type pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Pool or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.batch.models.Pool or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.stop_resize.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), - 'poolName': self._serialize.url("pool_name", pool_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9_-]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('Pool', response) - header_dict = { - 'ETag': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - stop_resize.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}/stopResize'} diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/__init__.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/__init__.py index 1b5232d238e3..f283c224f42c 100644 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/__init__.py +++ b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .qn_amaker_client import QnAMakerClient -from .version import VERSION +from ._configuration import QnAMakerRuntimeClientConfiguration +from ._qn_amaker_runtime_client import QnAMakerRuntimeClient +__all__ = ['QnAMakerRuntimeClient', 'QnAMakerRuntimeClientConfiguration'] -__all__ = ['QnAMakerClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/_configuration.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/_configuration.py new file mode 100644 index 000000000000..57d958a26600 --- /dev/null +++ b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/_configuration.py @@ -0,0 +1,47 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest import Configuration + +from .version import VERSION + + +class QnAMakerRuntimeClientConfiguration(Configuration): + """Configuration for QnAMakerRuntimeClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param runtime_endpoint: QnA Maker App Service endpoint (for example: + https://{qnaservice-hostname}.azurewebsites.net). + :type runtime_endpoint: str + :param credentials: Subscription credentials which uniquely identify + client subscription. + :type credentials: None + """ + + def __init__( + self, runtime_endpoint, credentials): + + if runtime_endpoint is None: + raise ValueError("Parameter 'runtime_endpoint' must not be None.") + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + base_url = '{RuntimeEndpoint}/qnamaker' + + super(QnAMakerRuntimeClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-cognitiveservices-knowledge-qnamaker/{}'.format(VERSION)) + + self.runtime_endpoint = runtime_endpoint + self.credentials = credentials diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/_qn_amaker_client.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/_qn_amaker_client.py new file mode 100644 index 000000000000..0dd860988506 --- /dev/null +++ b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/_qn_amaker_client.py @@ -0,0 +1,69 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import QnAMakerClientConfiguration +from .operations import EndpointSettingsOperations +from .operations import EndpointKeysOperations +from .operations import AlterationsOperations +from .operations import KnowledgebaseOperations +from .operations import Operations +from . import models + + +class QnAMakerClient(SDKClient): + """An API for QnAMaker Service + + :ivar config: Configuration for client. + :vartype config: QnAMakerClientConfiguration + + :ivar endpoint_settings: EndpointSettings operations + :vartype endpoint_settings: azure.cognitiveservices.knowledge.qnamaker.operations.EndpointSettingsOperations + :ivar endpoint_keys: EndpointKeys operations + :vartype endpoint_keys: azure.cognitiveservices.knowledge.qnamaker.operations.EndpointKeysOperations + :ivar alterations: Alterations operations + :vartype alterations: azure.cognitiveservices.knowledge.qnamaker.operations.AlterationsOperations + :ivar knowledgebase: Knowledgebase operations + :vartype knowledgebase: azure.cognitiveservices.knowledge.qnamaker.operations.KnowledgebaseOperations + :ivar operations: Operations operations + :vartype operations: azure.cognitiveservices.knowledge.qnamaker.operations.Operations + + :param endpoint: Supported Cognitive Services endpoints (protocol and + hostname, for example: https://westus.api.cognitive.microsoft.com). + :type endpoint: str + :param credentials: Subscription credentials which uniquely identify + client subscription. + :type credentials: None + """ + + def __init__( + self, endpoint, credentials): + + self.config = QnAMakerClientConfiguration(endpoint, credentials) + super(QnAMakerClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '4.0' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.endpoint_settings = EndpointSettingsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.endpoint_keys = EndpointKeysOperations( + self._client, self.config, self._serialize, self._deserialize) + self.alterations = AlterationsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.knowledgebase = KnowledgebaseOperations( + self._client, self.config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/_qn_amaker_runtime_client.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/_qn_amaker_runtime_client.py new file mode 100644 index 000000000000..62bf2d97b390 --- /dev/null +++ b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/_qn_amaker_runtime_client.py @@ -0,0 +1,49 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import QnAMakerRuntimeClientConfiguration +from .operations import RuntimeOperations +from . import models + + +class QnAMakerRuntimeClient(SDKClient): + """An API for QnAMaker runtime + + :ivar config: Configuration for client. + :vartype config: QnAMakerRuntimeClientConfiguration + + :ivar runtime: Runtime operations + :vartype runtime: azure.cognitiveservices.knowledge.qnamaker.operations.RuntimeOperations + + :param runtime_endpoint: QnA Maker App Service endpoint (for example: + https://{qnaservice-hostname}.azurewebsites.net). + :type runtime_endpoint: str + :param credentials: Subscription credentials which uniquely identify + client subscription. + :type credentials: None + """ + + def __init__( + self, runtime_endpoint, credentials): + + self.config = QnAMakerRuntimeClientConfiguration(runtime_endpoint, credentials) + super(QnAMakerRuntimeClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '4.0' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.runtime = RuntimeOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/__init__.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/__init__.py index b204c1cef2bf..a1181c783561 100644 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/__init__.py +++ b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/__init__.py @@ -10,101 +10,65 @@ # -------------------------------------------------------------------------- try: - from .update_kb_operation_dto_add_py3 import UpdateKbOperationDTOAdd - from .update_kb_operation_dto_delete_py3 import UpdateKbOperationDTODelete - from .update_kb_operation_dto_update_py3 import UpdateKbOperationDTOUpdate - from .update_kb_operation_dto_py3 import UpdateKbOperationDTO - from .update_qna_dto_questions_py3 import UpdateQnaDTOQuestions - from .update_qna_dto_metadata_py3 import UpdateQnaDTOMetadata - from .update_qna_dto_py3 import UpdateQnaDTO - from .update_kb_contents_dto_py3 import UpdateKbContentsDTO - from .update_questions_dto_py3 import UpdateQuestionsDTO - from .metadata_dto_py3 import MetadataDTO - from .update_metadata_dto_py3 import UpdateMetadataDTO - from .delete_kb_contents_dto_py3 import DeleteKbContentsDTO - from .qn_adto_py3 import QnADTO - from .file_dto_py3 import FileDTO - from .create_kb_input_dto_py3 import CreateKbInputDTO - from .qn_adocuments_dto_py3 import QnADocumentsDTO - from .create_kb_dto_py3 import CreateKbDTO - from .replace_kb_dto_py3 import ReplaceKbDTO - from .error_response_error_py3 import ErrorResponseError - from .error_response_py3 import ErrorResponse, ErrorResponseException - from .inner_error_model_py3 import InnerErrorModel - from .error_py3 import Error - from .operation_py3 import Operation - from .knowledgebase_dto_py3 import KnowledgebaseDTO - from .knowledgebases_dto_py3 import KnowledgebasesDTO - from .alterations_dto_py3 import AlterationsDTO - from .word_alterations_dto_py3 import WordAlterationsDTO - from .endpoint_keys_dto_py3 import EndpointKeysDTO + from ._models_py3 import ContextDTO + from ._models_py3 import Error + from ._models_py3 import ErrorResponse, ErrorResponseException + from ._models_py3 import ErrorResponseError + from ._models_py3 import FeedbackRecordDTO + from ._models_py3 import FeedbackRecordsDTO + from ._models_py3 import InnerErrorModel + from ._models_py3 import MetadataDTO + from ._models_py3 import PromptDTO + from ._models_py3 import PromptDTOQna + from ._models_py3 import QnADTO + from ._models_py3 import QnADTOContext + from ._models_py3 import QnASearchResult + from ._models_py3 import QnASearchResultContext + from ._models_py3 import QnASearchResultList + from ._models_py3 import QueryContextDTO + from ._models_py3 import QueryDTO + from ._models_py3 import QueryDTOContext except (SyntaxError, ImportError): - from .update_kb_operation_dto_add import UpdateKbOperationDTOAdd - from .update_kb_operation_dto_delete import UpdateKbOperationDTODelete - from .update_kb_operation_dto_update import UpdateKbOperationDTOUpdate - from .update_kb_operation_dto import UpdateKbOperationDTO - from .update_qna_dto_questions import UpdateQnaDTOQuestions - from .update_qna_dto_metadata import UpdateQnaDTOMetadata - from .update_qna_dto import UpdateQnaDTO - from .update_kb_contents_dto import UpdateKbContentsDTO - from .update_questions_dto import UpdateQuestionsDTO - from .metadata_dto import MetadataDTO - from .update_metadata_dto import UpdateMetadataDTO - from .delete_kb_contents_dto import DeleteKbContentsDTO - from .qn_adto import QnADTO - from .file_dto import FileDTO - from .create_kb_input_dto import CreateKbInputDTO - from .qn_adocuments_dto import QnADocumentsDTO - from .create_kb_dto import CreateKbDTO - from .replace_kb_dto import ReplaceKbDTO - from .error_response_error import ErrorResponseError - from .error_response import ErrorResponse, ErrorResponseException - from .inner_error_model import InnerErrorModel - from .error import Error - from .operation import Operation - from .knowledgebase_dto import KnowledgebaseDTO - from .knowledgebases_dto import KnowledgebasesDTO - from .alterations_dto import AlterationsDTO - from .word_alterations_dto import WordAlterationsDTO - from .endpoint_keys_dto import EndpointKeysDTO -from .qn_amaker_client_enums import ( - KnowledgebaseEnvironmentType, + from ._models import ContextDTO + from ._models import Error + from ._models import ErrorResponse, ErrorResponseException + from ._models import ErrorResponseError + from ._models import FeedbackRecordDTO + from ._models import FeedbackRecordsDTO + from ._models import InnerErrorModel + from ._models import MetadataDTO + from ._models import PromptDTO + from ._models import PromptDTOQna + from ._models import QnADTO + from ._models import QnADTOContext + from ._models import QnASearchResult + from ._models import QnASearchResultContext + from ._models import QnASearchResultList + from ._models import QueryContextDTO + from ._models import QueryDTO + from ._models import QueryDTOContext +from ._qn_amaker_runtime_client_enums import ( ErrorCodeType, - OperationStateType, - EnvironmentType, ) __all__ = [ - 'UpdateKbOperationDTOAdd', - 'UpdateKbOperationDTODelete', - 'UpdateKbOperationDTOUpdate', - 'UpdateKbOperationDTO', - 'UpdateQnaDTOQuestions', - 'UpdateQnaDTOMetadata', - 'UpdateQnaDTO', - 'UpdateKbContentsDTO', - 'UpdateQuestionsDTO', - 'MetadataDTO', - 'UpdateMetadataDTO', - 'DeleteKbContentsDTO', - 'QnADTO', - 'FileDTO', - 'CreateKbInputDTO', - 'QnADocumentsDTO', - 'CreateKbDTO', - 'ReplaceKbDTO', - 'ErrorResponseError', + 'ContextDTO', + 'Error', 'ErrorResponse', 'ErrorResponseException', + 'ErrorResponseError', + 'FeedbackRecordDTO', + 'FeedbackRecordsDTO', 'InnerErrorModel', - 'Error', - 'Operation', - 'KnowledgebaseDTO', - 'KnowledgebasesDTO', - 'AlterationsDTO', - 'WordAlterationsDTO', - 'EndpointKeysDTO', - 'KnowledgebaseEnvironmentType', + 'MetadataDTO', + 'PromptDTO', + 'PromptDTOQna', + 'QnADTO', + 'QnADTOContext', + 'QnASearchResult', + 'QnASearchResultContext', + 'QnASearchResultList', + 'QueryContextDTO', + 'QueryDTO', + 'QueryDTOContext', 'ErrorCodeType', - 'OperationStateType', - 'EnvironmentType', ] diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/_models.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/_models.py new file mode 100644 index 000000000000..346cb8ecbcbf --- /dev/null +++ b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/_models.py @@ -0,0 +1,584 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ContextDTO(Model): + """Context associated with Qna. + + :param is_context_only: To mark if a prompt is relevant only with a + previous question or not. + true - Do not include this QnA as search result for queries without + context + false - ignores context and includes this QnA in search result + :type is_context_only: bool + :param prompts: List of prompts associated with the answer. + :type prompts: + list[~azure.cognitiveservices.knowledge.qnamaker.models.PromptDTO] + """ + + _validation = { + 'prompts': {'max_items': 20}, + } + + _attribute_map = { + 'is_context_only': {'key': 'isContextOnly', 'type': 'bool'}, + 'prompts': {'key': 'prompts', 'type': '[PromptDTO]'}, + } + + def __init__(self, **kwargs): + super(ContextDTO, self).__init__(**kwargs) + self.is_context_only = kwargs.get('is_context_only', None) + self.prompts = kwargs.get('prompts', None) + + +class Error(Model): + """The error object. As per Microsoft One API guidelines - + https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. One of a server-defined set of error codes. + Possible values include: 'BadArgument', 'Forbidden', 'NotFound', + 'KbNotFound', 'Unauthorized', 'Unspecified', 'EndpointKeysError', + 'QuotaExceeded', 'QnaRuntimeError', 'SKULimitExceeded', + 'OperationNotFound', 'ServiceError', 'ValidationFailure', + 'ExtractionFailure' + :type code: str or + ~azure.cognitiveservices.knowledge.qnamaker.models.ErrorCodeType + :param message: A human-readable representation of the error. + :type message: str + :param target: The target of the error. + :type target: str + :param details: An array of details about specific errors that led to this + reported error. + :type details: + list[~azure.cognitiveservices.knowledge.qnamaker.models.Error] + :param inner_error: An object containing more specific information than + the current object about the error. + :type inner_error: + ~azure.cognitiveservices.knowledge.qnamaker.models.InnerErrorModel + """ + + _validation = { + 'code': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[Error]'}, + 'inner_error': {'key': 'innerError', 'type': 'InnerErrorModel'}, + } + + def __init__(self, **kwargs): + super(Error, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + self.inner_error = kwargs.get('inner_error', None) + + +class ErrorResponse(Model): + """Error response. As per Microsoft One API guidelines - + https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. + + :param error: The error object. + :type error: + ~azure.cognitiveservices.knowledge.qnamaker.models.ErrorResponseError + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponseError'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class ErrorResponseError(Error): + """The error object. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. One of a server-defined set of error codes. + Possible values include: 'BadArgument', 'Forbidden', 'NotFound', + 'KbNotFound', 'Unauthorized', 'Unspecified', 'EndpointKeysError', + 'QuotaExceeded', 'QnaRuntimeError', 'SKULimitExceeded', + 'OperationNotFound', 'ServiceError', 'ValidationFailure', + 'ExtractionFailure' + :type code: str or + ~azure.cognitiveservices.knowledge.qnamaker.models.ErrorCodeType + :param message: A human-readable representation of the error. + :type message: str + :param target: The target of the error. + :type target: str + :param details: An array of details about specific errors that led to this + reported error. + :type details: + list[~azure.cognitiveservices.knowledge.qnamaker.models.Error] + :param inner_error: An object containing more specific information than + the current object about the error. + :type inner_error: + ~azure.cognitiveservices.knowledge.qnamaker.models.InnerErrorModel + """ + + _validation = { + 'code': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[Error]'}, + 'inner_error': {'key': 'innerError', 'type': 'InnerErrorModel'}, + } + + def __init__(self, **kwargs): + super(ErrorResponseError, self).__init__(**kwargs) + + +class FeedbackRecordDTO(Model): + """Active learning feedback record. + + :param user_id: Unique identifier for the user. + :type user_id: str + :param user_question: The suggested question being provided as feedback. + :type user_question: str + :param qna_id: The qnaId for which the suggested question is provided as + feedback. + :type qna_id: int + """ + + _validation = { + 'user_question': {'max_length': 1000}, + } + + _attribute_map = { + 'user_id': {'key': 'userId', 'type': 'str'}, + 'user_question': {'key': 'userQuestion', 'type': 'str'}, + 'qna_id': {'key': 'qnaId', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(FeedbackRecordDTO, self).__init__(**kwargs) + self.user_id = kwargs.get('user_id', None) + self.user_question = kwargs.get('user_question', None) + self.qna_id = kwargs.get('qna_id', None) + + +class FeedbackRecordsDTO(Model): + """Active learning feedback records. + + :param feedback_records: List of feedback records. + :type feedback_records: + list[~azure.cognitiveservices.knowledge.qnamaker.models.FeedbackRecordDTO] + """ + + _attribute_map = { + 'feedback_records': {'key': 'feedbackRecords', 'type': '[FeedbackRecordDTO]'}, + } + + def __init__(self, **kwargs): + super(FeedbackRecordsDTO, self).__init__(**kwargs) + self.feedback_records = kwargs.get('feedback_records', None) + + +class InnerErrorModel(Model): + """An object containing more specific information about the error. As per + Microsoft One API guidelines - + https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. + + :param code: A more specific error code than was provided by the + containing error. + :type code: str + :param inner_error: An object containing more specific information than + the current object about the error. + :type inner_error: + ~azure.cognitiveservices.knowledge.qnamaker.models.InnerErrorModel + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'inner_error': {'key': 'innerError', 'type': 'InnerErrorModel'}, + } + + def __init__(self, **kwargs): + super(InnerErrorModel, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.inner_error = kwargs.get('inner_error', None) + + +class MetadataDTO(Model): + """Name - value pair of metadata. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Metadata name. + :type name: str + :param value: Required. Metadata value. + :type value: str + """ + + _validation = { + 'name': {'required': True, 'max_length': 100, 'min_length': 1}, + 'value': {'required': True, 'max_length': 500, 'min_length': 1}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MetadataDTO, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class PromptDTO(Model): + """Prompt for an answer. + + :param display_order: Index of the prompt - used in ordering of the + prompts + :type display_order: int + :param qna_id: Qna id corresponding to the prompt - if QnaId is present, + QnADTO object is ignored. + :type qna_id: int + :param qna: QnADTO - Either QnaId or QnADTO needs to be present in a + PromptDTO object + :type qna: ~azure.cognitiveservices.knowledge.qnamaker.models.PromptDTOQna + :param display_text: Text displayed to represent a follow up question + prompt + :type display_text: str + """ + + _validation = { + 'display_text': {'max_length': 200}, + } + + _attribute_map = { + 'display_order': {'key': 'displayOrder', 'type': 'int'}, + 'qna_id': {'key': 'qnaId', 'type': 'int'}, + 'qna': {'key': 'qna', 'type': 'PromptDTOQna'}, + 'display_text': {'key': 'displayText', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PromptDTO, self).__init__(**kwargs) + self.display_order = kwargs.get('display_order', None) + self.qna_id = kwargs.get('qna_id', None) + self.qna = kwargs.get('qna', None) + self.display_text = kwargs.get('display_text', None) + + +class QnADTO(Model): + """Q-A object. + + All required parameters must be populated in order to send to Azure. + + :param id: Unique id for the Q-A. + :type id: int + :param answer: Required. Answer text + :type answer: str + :param source: Source from which Q-A was indexed. eg. + https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs + :type source: str + :param questions: Required. List of questions associated with the answer. + :type questions: list[str] + :param metadata: List of metadata associated with the answer. + :type metadata: + list[~azure.cognitiveservices.knowledge.qnamaker.models.MetadataDTO] + :param context: Context of a QnA + :type context: + ~azure.cognitiveservices.knowledge.qnamaker.models.QnADTOContext + """ + + _validation = { + 'answer': {'required': True, 'max_length': 25000, 'min_length': 1}, + 'source': {'max_length': 300}, + 'questions': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'answer': {'key': 'answer', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'questions': {'key': 'questions', 'type': '[str]'}, + 'metadata': {'key': 'metadata', 'type': '[MetadataDTO]'}, + 'context': {'key': 'context', 'type': 'QnADTOContext'}, + } + + def __init__(self, **kwargs): + super(QnADTO, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.answer = kwargs.get('answer', None) + self.source = kwargs.get('source', None) + self.questions = kwargs.get('questions', None) + self.metadata = kwargs.get('metadata', None) + self.context = kwargs.get('context', None) + + +class PromptDTOQna(QnADTO): + """QnADTO - Either QnaId or QnADTO needs to be present in a PromptDTO object. + + All required parameters must be populated in order to send to Azure. + + :param id: Unique id for the Q-A. + :type id: int + :param answer: Required. Answer text + :type answer: str + :param source: Source from which Q-A was indexed. eg. + https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs + :type source: str + :param questions: Required. List of questions associated with the answer. + :type questions: list[str] + :param metadata: List of metadata associated with the answer. + :type metadata: + list[~azure.cognitiveservices.knowledge.qnamaker.models.MetadataDTO] + :param context: Context of a QnA + :type context: + ~azure.cognitiveservices.knowledge.qnamaker.models.QnADTOContext + """ + + _validation = { + 'answer': {'required': True, 'max_length': 25000, 'min_length': 1}, + 'source': {'max_length': 300}, + 'questions': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'answer': {'key': 'answer', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'questions': {'key': 'questions', 'type': '[str]'}, + 'metadata': {'key': 'metadata', 'type': '[MetadataDTO]'}, + 'context': {'key': 'context', 'type': 'QnADTOContext'}, + } + + def __init__(self, **kwargs): + super(PromptDTOQna, self).__init__(**kwargs) + + +class QnADTOContext(ContextDTO): + """Context of a QnA. + + :param is_context_only: To mark if a prompt is relevant only with a + previous question or not. + true - Do not include this QnA as search result for queries without + context + false - ignores context and includes this QnA in search result + :type is_context_only: bool + :param prompts: List of prompts associated with the answer. + :type prompts: + list[~azure.cognitiveservices.knowledge.qnamaker.models.PromptDTO] + """ + + _validation = { + 'prompts': {'max_items': 20}, + } + + _attribute_map = { + 'is_context_only': {'key': 'isContextOnly', 'type': 'bool'}, + 'prompts': {'key': 'prompts', 'type': '[PromptDTO]'}, + } + + def __init__(self, **kwargs): + super(QnADTOContext, self).__init__(**kwargs) + + +class QnASearchResult(Model): + """Represents Search Result. + + :param questions: List of questions. + :type questions: list[str] + :param answer: Answer. + :type answer: str + :param score: Search result score. + :type score: float + :param id: Id of the QnA result. + :type id: int + :param source: Source of QnA result. + :type source: str + :param metadata: List of metadata. + :type metadata: + list[~azure.cognitiveservices.knowledge.qnamaker.models.MetadataDTO] + :param context: Context object of the QnA + :type context: + ~azure.cognitiveservices.knowledge.qnamaker.models.QnASearchResultContext + """ + + _attribute_map = { + 'questions': {'key': 'questions', 'type': '[str]'}, + 'answer': {'key': 'answer', 'type': 'str'}, + 'score': {'key': 'score', 'type': 'float'}, + 'id': {'key': 'id', 'type': 'int'}, + 'source': {'key': 'source', 'type': 'str'}, + 'metadata': {'key': 'metadata', 'type': '[MetadataDTO]'}, + 'context': {'key': 'context', 'type': 'QnASearchResultContext'}, + } + + def __init__(self, **kwargs): + super(QnASearchResult, self).__init__(**kwargs) + self.questions = kwargs.get('questions', None) + self.answer = kwargs.get('answer', None) + self.score = kwargs.get('score', None) + self.id = kwargs.get('id', None) + self.source = kwargs.get('source', None) + self.metadata = kwargs.get('metadata', None) + self.context = kwargs.get('context', None) + + +class QnASearchResultContext(ContextDTO): + """Context object of the QnA. + + :param is_context_only: To mark if a prompt is relevant only with a + previous question or not. + true - Do not include this QnA as search result for queries without + context + false - ignores context and includes this QnA in search result + :type is_context_only: bool + :param prompts: List of prompts associated with the answer. + :type prompts: + list[~azure.cognitiveservices.knowledge.qnamaker.models.PromptDTO] + """ + + _validation = { + 'prompts': {'max_items': 20}, + } + + _attribute_map = { + 'is_context_only': {'key': 'isContextOnly', 'type': 'bool'}, + 'prompts': {'key': 'prompts', 'type': '[PromptDTO]'}, + } + + def __init__(self, **kwargs): + super(QnASearchResultContext, self).__init__(**kwargs) + + +class QnASearchResultList(Model): + """Represents List of Question Answers. + + :param answers: Represents Search Result list. + :type answers: + list[~azure.cognitiveservices.knowledge.qnamaker.models.QnASearchResult] + """ + + _attribute_map = { + 'answers': {'key': 'answers', 'type': '[QnASearchResult]'}, + } + + def __init__(self, **kwargs): + super(QnASearchResultList, self).__init__(**kwargs) + self.answers = kwargs.get('answers', None) + + +class QueryContextDTO(Model): + """Context object with previous QnA's information. + + :param previous_qna_id: Previous QnA Id - qnaId of the top result. + :type previous_qna_id: str + :param previous_user_query: Previous user query. + :type previous_user_query: str + """ + + _attribute_map = { + 'previous_qna_id': {'key': 'previousQnaId', 'type': 'str'}, + 'previous_user_query': {'key': 'previousUserQuery', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(QueryContextDTO, self).__init__(**kwargs) + self.previous_qna_id = kwargs.get('previous_qna_id', None) + self.previous_user_query = kwargs.get('previous_user_query', None) + + +class QueryDTO(Model): + """POST body schema to query the knowledgebase. + + :param qna_id: Exact qnaId to fetch from the knowledgebase, this field + takes priority over question. + :type qna_id: str + :param question: User question to query against the knowledge base. + :type question: str + :param top: Max number of answers to be returned for the question. + :type top: int + :param user_id: Unique identifier for the user. + :type user_id: str + :param is_test: Query against the test index. + :type is_test: bool + :param score_threshold: Threshold for answers returned based on score. + :type score_threshold: float + :param context: Context object with previous QnA's information. + :type context: + ~azure.cognitiveservices.knowledge.qnamaker.models.QueryDTOContext + :param strict_filters: Find only answers that contain these metadata. + :type strict_filters: + list[~azure.cognitiveservices.knowledge.qnamaker.models.MetadataDTO] + """ + + _attribute_map = { + 'qna_id': {'key': 'qnaId', 'type': 'str'}, + 'question': {'key': 'question', 'type': 'str'}, + 'top': {'key': 'top', 'type': 'int'}, + 'user_id': {'key': 'userId', 'type': 'str'}, + 'is_test': {'key': 'isTest', 'type': 'bool'}, + 'score_threshold': {'key': 'scoreThreshold', 'type': 'float'}, + 'context': {'key': 'context', 'type': 'QueryDTOContext'}, + 'strict_filters': {'key': 'strictFilters', 'type': '[MetadataDTO]'}, + } + + def __init__(self, **kwargs): + super(QueryDTO, self).__init__(**kwargs) + self.qna_id = kwargs.get('qna_id', None) + self.question = kwargs.get('question', None) + self.top = kwargs.get('top', None) + self.user_id = kwargs.get('user_id', None) + self.is_test = kwargs.get('is_test', None) + self.score_threshold = kwargs.get('score_threshold', None) + self.context = kwargs.get('context', None) + self.strict_filters = kwargs.get('strict_filters', None) + + +class QueryDTOContext(QueryContextDTO): + """Context object with previous QnA's information. + + :param previous_qna_id: Previous QnA Id - qnaId of the top result. + :type previous_qna_id: str + :param previous_user_query: Previous user query. + :type previous_user_query: str + """ + + _attribute_map = { + 'previous_qna_id': {'key': 'previousQnaId', 'type': 'str'}, + 'previous_user_query': {'key': 'previousUserQuery', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(QueryDTOContext, self).__init__(**kwargs) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/_models_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/_models_py3.py new file mode 100644 index 000000000000..f030ea4ad389 --- /dev/null +++ b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/_models_py3.py @@ -0,0 +1,584 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ContextDTO(Model): + """Context associated with Qna. + + :param is_context_only: To mark if a prompt is relevant only with a + previous question or not. + true - Do not include this QnA as search result for queries without + context + false - ignores context and includes this QnA in search result + :type is_context_only: bool + :param prompts: List of prompts associated with the answer. + :type prompts: + list[~azure.cognitiveservices.knowledge.qnamaker.models.PromptDTO] + """ + + _validation = { + 'prompts': {'max_items': 20}, + } + + _attribute_map = { + 'is_context_only': {'key': 'isContextOnly', 'type': 'bool'}, + 'prompts': {'key': 'prompts', 'type': '[PromptDTO]'}, + } + + def __init__(self, *, is_context_only: bool=None, prompts=None, **kwargs) -> None: + super(ContextDTO, self).__init__(**kwargs) + self.is_context_only = is_context_only + self.prompts = prompts + + +class Error(Model): + """The error object. As per Microsoft One API guidelines - + https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. One of a server-defined set of error codes. + Possible values include: 'BadArgument', 'Forbidden', 'NotFound', + 'KbNotFound', 'Unauthorized', 'Unspecified', 'EndpointKeysError', + 'QuotaExceeded', 'QnaRuntimeError', 'SKULimitExceeded', + 'OperationNotFound', 'ServiceError', 'ValidationFailure', + 'ExtractionFailure' + :type code: str or + ~azure.cognitiveservices.knowledge.qnamaker.models.ErrorCodeType + :param message: A human-readable representation of the error. + :type message: str + :param target: The target of the error. + :type target: str + :param details: An array of details about specific errors that led to this + reported error. + :type details: + list[~azure.cognitiveservices.knowledge.qnamaker.models.Error] + :param inner_error: An object containing more specific information than + the current object about the error. + :type inner_error: + ~azure.cognitiveservices.knowledge.qnamaker.models.InnerErrorModel + """ + + _validation = { + 'code': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[Error]'}, + 'inner_error': {'key': 'innerError', 'type': 'InnerErrorModel'}, + } + + def __init__(self, *, code, message: str=None, target: str=None, details=None, inner_error=None, **kwargs) -> None: + super(Error, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + self.inner_error = inner_error + + +class ErrorResponse(Model): + """Error response. As per Microsoft One API guidelines - + https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. + + :param error: The error object. + :type error: + ~azure.cognitiveservices.knowledge.qnamaker.models.ErrorResponseError + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponseError'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class ErrorResponseError(Error): + """The error object. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. One of a server-defined set of error codes. + Possible values include: 'BadArgument', 'Forbidden', 'NotFound', + 'KbNotFound', 'Unauthorized', 'Unspecified', 'EndpointKeysError', + 'QuotaExceeded', 'QnaRuntimeError', 'SKULimitExceeded', + 'OperationNotFound', 'ServiceError', 'ValidationFailure', + 'ExtractionFailure' + :type code: str or + ~azure.cognitiveservices.knowledge.qnamaker.models.ErrorCodeType + :param message: A human-readable representation of the error. + :type message: str + :param target: The target of the error. + :type target: str + :param details: An array of details about specific errors that led to this + reported error. + :type details: + list[~azure.cognitiveservices.knowledge.qnamaker.models.Error] + :param inner_error: An object containing more specific information than + the current object about the error. + :type inner_error: + ~azure.cognitiveservices.knowledge.qnamaker.models.InnerErrorModel + """ + + _validation = { + 'code': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[Error]'}, + 'inner_error': {'key': 'innerError', 'type': 'InnerErrorModel'}, + } + + def __init__(self, *, code, message: str=None, target: str=None, details=None, inner_error=None, **kwargs) -> None: + super(ErrorResponseError, self).__init__(code=code, message=message, target=target, details=details, inner_error=inner_error, **kwargs) + + +class FeedbackRecordDTO(Model): + """Active learning feedback record. + + :param user_id: Unique identifier for the user. + :type user_id: str + :param user_question: The suggested question being provided as feedback. + :type user_question: str + :param qna_id: The qnaId for which the suggested question is provided as + feedback. + :type qna_id: int + """ + + _validation = { + 'user_question': {'max_length': 1000}, + } + + _attribute_map = { + 'user_id': {'key': 'userId', 'type': 'str'}, + 'user_question': {'key': 'userQuestion', 'type': 'str'}, + 'qna_id': {'key': 'qnaId', 'type': 'int'}, + } + + def __init__(self, *, user_id: str=None, user_question: str=None, qna_id: int=None, **kwargs) -> None: + super(FeedbackRecordDTO, self).__init__(**kwargs) + self.user_id = user_id + self.user_question = user_question + self.qna_id = qna_id + + +class FeedbackRecordsDTO(Model): + """Active learning feedback records. + + :param feedback_records: List of feedback records. + :type feedback_records: + list[~azure.cognitiveservices.knowledge.qnamaker.models.FeedbackRecordDTO] + """ + + _attribute_map = { + 'feedback_records': {'key': 'feedbackRecords', 'type': '[FeedbackRecordDTO]'}, + } + + def __init__(self, *, feedback_records=None, **kwargs) -> None: + super(FeedbackRecordsDTO, self).__init__(**kwargs) + self.feedback_records = feedback_records + + +class InnerErrorModel(Model): + """An object containing more specific information about the error. As per + Microsoft One API guidelines - + https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. + + :param code: A more specific error code than was provided by the + containing error. + :type code: str + :param inner_error: An object containing more specific information than + the current object about the error. + :type inner_error: + ~azure.cognitiveservices.knowledge.qnamaker.models.InnerErrorModel + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'inner_error': {'key': 'innerError', 'type': 'InnerErrorModel'}, + } + + def __init__(self, *, code: str=None, inner_error=None, **kwargs) -> None: + super(InnerErrorModel, self).__init__(**kwargs) + self.code = code + self.inner_error = inner_error + + +class MetadataDTO(Model): + """Name - value pair of metadata. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Metadata name. + :type name: str + :param value: Required. Metadata value. + :type value: str + """ + + _validation = { + 'name': {'required': True, 'max_length': 100, 'min_length': 1}, + 'value': {'required': True, 'max_length': 500, 'min_length': 1}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str, value: str, **kwargs) -> None: + super(MetadataDTO, self).__init__(**kwargs) + self.name = name + self.value = value + + +class PromptDTO(Model): + """Prompt for an answer. + + :param display_order: Index of the prompt - used in ordering of the + prompts + :type display_order: int + :param qna_id: Qna id corresponding to the prompt - if QnaId is present, + QnADTO object is ignored. + :type qna_id: int + :param qna: QnADTO - Either QnaId or QnADTO needs to be present in a + PromptDTO object + :type qna: ~azure.cognitiveservices.knowledge.qnamaker.models.PromptDTOQna + :param display_text: Text displayed to represent a follow up question + prompt + :type display_text: str + """ + + _validation = { + 'display_text': {'max_length': 200}, + } + + _attribute_map = { + 'display_order': {'key': 'displayOrder', 'type': 'int'}, + 'qna_id': {'key': 'qnaId', 'type': 'int'}, + 'qna': {'key': 'qna', 'type': 'PromptDTOQna'}, + 'display_text': {'key': 'displayText', 'type': 'str'}, + } + + def __init__(self, *, display_order: int=None, qna_id: int=None, qna=None, display_text: str=None, **kwargs) -> None: + super(PromptDTO, self).__init__(**kwargs) + self.display_order = display_order + self.qna_id = qna_id + self.qna = qna + self.display_text = display_text + + +class QnADTO(Model): + """Q-A object. + + All required parameters must be populated in order to send to Azure. + + :param id: Unique id for the Q-A. + :type id: int + :param answer: Required. Answer text + :type answer: str + :param source: Source from which Q-A was indexed. eg. + https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs + :type source: str + :param questions: Required. List of questions associated with the answer. + :type questions: list[str] + :param metadata: List of metadata associated with the answer. + :type metadata: + list[~azure.cognitiveservices.knowledge.qnamaker.models.MetadataDTO] + :param context: Context of a QnA + :type context: + ~azure.cognitiveservices.knowledge.qnamaker.models.QnADTOContext + """ + + _validation = { + 'answer': {'required': True, 'max_length': 25000, 'min_length': 1}, + 'source': {'max_length': 300}, + 'questions': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'answer': {'key': 'answer', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'questions': {'key': 'questions', 'type': '[str]'}, + 'metadata': {'key': 'metadata', 'type': '[MetadataDTO]'}, + 'context': {'key': 'context', 'type': 'QnADTOContext'}, + } + + def __init__(self, *, answer: str, questions, id: int=None, source: str=None, metadata=None, context=None, **kwargs) -> None: + super(QnADTO, self).__init__(**kwargs) + self.id = id + self.answer = answer + self.source = source + self.questions = questions + self.metadata = metadata + self.context = context + + +class PromptDTOQna(QnADTO): + """QnADTO - Either QnaId or QnADTO needs to be present in a PromptDTO object. + + All required parameters must be populated in order to send to Azure. + + :param id: Unique id for the Q-A. + :type id: int + :param answer: Required. Answer text + :type answer: str + :param source: Source from which Q-A was indexed. eg. + https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs + :type source: str + :param questions: Required. List of questions associated with the answer. + :type questions: list[str] + :param metadata: List of metadata associated with the answer. + :type metadata: + list[~azure.cognitiveservices.knowledge.qnamaker.models.MetadataDTO] + :param context: Context of a QnA + :type context: + ~azure.cognitiveservices.knowledge.qnamaker.models.QnADTOContext + """ + + _validation = { + 'answer': {'required': True, 'max_length': 25000, 'min_length': 1}, + 'source': {'max_length': 300}, + 'questions': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'answer': {'key': 'answer', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'questions': {'key': 'questions', 'type': '[str]'}, + 'metadata': {'key': 'metadata', 'type': '[MetadataDTO]'}, + 'context': {'key': 'context', 'type': 'QnADTOContext'}, + } + + def __init__(self, *, answer: str, questions, id: int=None, source: str=None, metadata=None, context=None, **kwargs) -> None: + super(PromptDTOQna, self).__init__(id=id, answer=answer, source=source, questions=questions, metadata=metadata, context=context, **kwargs) + + +class QnADTOContext(ContextDTO): + """Context of a QnA. + + :param is_context_only: To mark if a prompt is relevant only with a + previous question or not. + true - Do not include this QnA as search result for queries without + context + false - ignores context and includes this QnA in search result + :type is_context_only: bool + :param prompts: List of prompts associated with the answer. + :type prompts: + list[~azure.cognitiveservices.knowledge.qnamaker.models.PromptDTO] + """ + + _validation = { + 'prompts': {'max_items': 20}, + } + + _attribute_map = { + 'is_context_only': {'key': 'isContextOnly', 'type': 'bool'}, + 'prompts': {'key': 'prompts', 'type': '[PromptDTO]'}, + } + + def __init__(self, *, is_context_only: bool=None, prompts=None, **kwargs) -> None: + super(QnADTOContext, self).__init__(is_context_only=is_context_only, prompts=prompts, **kwargs) + + +class QnASearchResult(Model): + """Represents Search Result. + + :param questions: List of questions. + :type questions: list[str] + :param answer: Answer. + :type answer: str + :param score: Search result score. + :type score: float + :param id: Id of the QnA result. + :type id: int + :param source: Source of QnA result. + :type source: str + :param metadata: List of metadata. + :type metadata: + list[~azure.cognitiveservices.knowledge.qnamaker.models.MetadataDTO] + :param context: Context object of the QnA + :type context: + ~azure.cognitiveservices.knowledge.qnamaker.models.QnASearchResultContext + """ + + _attribute_map = { + 'questions': {'key': 'questions', 'type': '[str]'}, + 'answer': {'key': 'answer', 'type': 'str'}, + 'score': {'key': 'score', 'type': 'float'}, + 'id': {'key': 'id', 'type': 'int'}, + 'source': {'key': 'source', 'type': 'str'}, + 'metadata': {'key': 'metadata', 'type': '[MetadataDTO]'}, + 'context': {'key': 'context', 'type': 'QnASearchResultContext'}, + } + + def __init__(self, *, questions=None, answer: str=None, score: float=None, id: int=None, source: str=None, metadata=None, context=None, **kwargs) -> None: + super(QnASearchResult, self).__init__(**kwargs) + self.questions = questions + self.answer = answer + self.score = score + self.id = id + self.source = source + self.metadata = metadata + self.context = context + + +class QnASearchResultContext(ContextDTO): + """Context object of the QnA. + + :param is_context_only: To mark if a prompt is relevant only with a + previous question or not. + true - Do not include this QnA as search result for queries without + context + false - ignores context and includes this QnA in search result + :type is_context_only: bool + :param prompts: List of prompts associated with the answer. + :type prompts: + list[~azure.cognitiveservices.knowledge.qnamaker.models.PromptDTO] + """ + + _validation = { + 'prompts': {'max_items': 20}, + } + + _attribute_map = { + 'is_context_only': {'key': 'isContextOnly', 'type': 'bool'}, + 'prompts': {'key': 'prompts', 'type': '[PromptDTO]'}, + } + + def __init__(self, *, is_context_only: bool=None, prompts=None, **kwargs) -> None: + super(QnASearchResultContext, self).__init__(is_context_only=is_context_only, prompts=prompts, **kwargs) + + +class QnASearchResultList(Model): + """Represents List of Question Answers. + + :param answers: Represents Search Result list. + :type answers: + list[~azure.cognitiveservices.knowledge.qnamaker.models.QnASearchResult] + """ + + _attribute_map = { + 'answers': {'key': 'answers', 'type': '[QnASearchResult]'}, + } + + def __init__(self, *, answers=None, **kwargs) -> None: + super(QnASearchResultList, self).__init__(**kwargs) + self.answers = answers + + +class QueryContextDTO(Model): + """Context object with previous QnA's information. + + :param previous_qna_id: Previous QnA Id - qnaId of the top result. + :type previous_qna_id: str + :param previous_user_query: Previous user query. + :type previous_user_query: str + """ + + _attribute_map = { + 'previous_qna_id': {'key': 'previousQnaId', 'type': 'str'}, + 'previous_user_query': {'key': 'previousUserQuery', 'type': 'str'}, + } + + def __init__(self, *, previous_qna_id: str=None, previous_user_query: str=None, **kwargs) -> None: + super(QueryContextDTO, self).__init__(**kwargs) + self.previous_qna_id = previous_qna_id + self.previous_user_query = previous_user_query + + +class QueryDTO(Model): + """POST body schema to query the knowledgebase. + + :param qna_id: Exact qnaId to fetch from the knowledgebase, this field + takes priority over question. + :type qna_id: str + :param question: User question to query against the knowledge base. + :type question: str + :param top: Max number of answers to be returned for the question. + :type top: int + :param user_id: Unique identifier for the user. + :type user_id: str + :param is_test: Query against the test index. + :type is_test: bool + :param score_threshold: Threshold for answers returned based on score. + :type score_threshold: float + :param context: Context object with previous QnA's information. + :type context: + ~azure.cognitiveservices.knowledge.qnamaker.models.QueryDTOContext + :param strict_filters: Find only answers that contain these metadata. + :type strict_filters: + list[~azure.cognitiveservices.knowledge.qnamaker.models.MetadataDTO] + """ + + _attribute_map = { + 'qna_id': {'key': 'qnaId', 'type': 'str'}, + 'question': {'key': 'question', 'type': 'str'}, + 'top': {'key': 'top', 'type': 'int'}, + 'user_id': {'key': 'userId', 'type': 'str'}, + 'is_test': {'key': 'isTest', 'type': 'bool'}, + 'score_threshold': {'key': 'scoreThreshold', 'type': 'float'}, + 'context': {'key': 'context', 'type': 'QueryDTOContext'}, + 'strict_filters': {'key': 'strictFilters', 'type': '[MetadataDTO]'}, + } + + def __init__(self, *, qna_id: str=None, question: str=None, top: int=None, user_id: str=None, is_test: bool=None, score_threshold: float=None, context=None, strict_filters=None, **kwargs) -> None: + super(QueryDTO, self).__init__(**kwargs) + self.qna_id = qna_id + self.question = question + self.top = top + self.user_id = user_id + self.is_test = is_test + self.score_threshold = score_threshold + self.context = context + self.strict_filters = strict_filters + + +class QueryDTOContext(QueryContextDTO): + """Context object with previous QnA's information. + + :param previous_qna_id: Previous QnA Id - qnaId of the top result. + :type previous_qna_id: str + :param previous_user_query: Previous user query. + :type previous_user_query: str + """ + + _attribute_map = { + 'previous_qna_id': {'key': 'previousQnaId', 'type': 'str'}, + 'previous_user_query': {'key': 'previousUserQuery', 'type': 'str'}, + } + + def __init__(self, *, previous_qna_id: str=None, previous_user_query: str=None, **kwargs) -> None: + super(QueryDTOContext, self).__init__(previous_qna_id=previous_qna_id, previous_user_query=previous_user_query, **kwargs) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/qn_amaker_client_enums.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/_qn_amaker_client_enums.py similarity index 100% rename from sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/qn_amaker_client_enums.py rename to sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/_qn_amaker_client_enums.py diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/_qn_amaker_runtime_client_enums.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/_qn_amaker_runtime_client_enums.py new file mode 100644 index 000000000000..c523cb290231 --- /dev/null +++ b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/_qn_amaker_runtime_client_enums.py @@ -0,0 +1,30 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class ErrorCodeType(str, Enum): + + bad_argument = "BadArgument" + forbidden = "Forbidden" + not_found = "NotFound" + kb_not_found = "KbNotFound" + unauthorized = "Unauthorized" + unspecified = "Unspecified" + endpoint_keys_error = "EndpointKeysError" + quota_exceeded = "QuotaExceeded" + qna_runtime_error = "QnaRuntimeError" + sku_limit_exceeded = "SKULimitExceeded" + operation_not_found = "OperationNotFound" + service_error = "ServiceError" + validation_failure = "ValidationFailure" + extraction_failure = "ExtractionFailure" diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/alterations_dto.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/alterations_dto.py deleted file mode 100644 index 35562e26932a..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/alterations_dto.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlterationsDTO(Model): - """Collection of words that are synonyms. - - All required parameters must be populated in order to send to Azure. - - :param alterations: Required. Words that are synonymous with each other. - :type alterations: list[str] - """ - - _validation = { - 'alterations': {'required': True}, - } - - _attribute_map = { - 'alterations': {'key': 'alterations', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(AlterationsDTO, self).__init__(**kwargs) - self.alterations = kwargs.get('alterations', None) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/alterations_dto_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/alterations_dto_py3.py deleted file mode 100644 index 3adbcce49bf6..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/alterations_dto_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlterationsDTO(Model): - """Collection of words that are synonyms. - - All required parameters must be populated in order to send to Azure. - - :param alterations: Required. Words that are synonymous with each other. - :type alterations: list[str] - """ - - _validation = { - 'alterations': {'required': True}, - } - - _attribute_map = { - 'alterations': {'key': 'alterations', 'type': '[str]'}, - } - - def __init__(self, *, alterations, **kwargs) -> None: - super(AlterationsDTO, self).__init__(**kwargs) - self.alterations = alterations diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/create_kb_dto.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/create_kb_dto.py deleted file mode 100644 index 0d0d47084fec..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/create_kb_dto.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CreateKbDTO(Model): - """Post body schema for CreateKb operation. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Friendly name for the knowledgebase. - :type name: str - :param qna_list: List of Q-A (QnADTO) to be added to the knowledgebase. - Q-A Ids are assigned by the service and should be omitted. - :type qna_list: - list[~azure.cognitiveservices.knowledge.qnamaker.models.QnADTO] - :param urls: List of URLs to be used for extracting Q-A. - :type urls: list[str] - :param files: List of files from which to Extract Q-A. - :type files: - list[~azure.cognitiveservices.knowledge.qnamaker.models.FileDTO] - """ - - _validation = { - 'name': {'required': True, 'max_length': 100, 'min_length': 1}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'qna_list': {'key': 'qnaList', 'type': '[QnADTO]'}, - 'urls': {'key': 'urls', 'type': '[str]'}, - 'files': {'key': 'files', 'type': '[FileDTO]'}, - } - - def __init__(self, **kwargs): - super(CreateKbDTO, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.qna_list = kwargs.get('qna_list', None) - self.urls = kwargs.get('urls', None) - self.files = kwargs.get('files', None) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/create_kb_dto_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/create_kb_dto_py3.py deleted file mode 100644 index 21bdf5214ec3..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/create_kb_dto_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CreateKbDTO(Model): - """Post body schema for CreateKb operation. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Friendly name for the knowledgebase. - :type name: str - :param qna_list: List of Q-A (QnADTO) to be added to the knowledgebase. - Q-A Ids are assigned by the service and should be omitted. - :type qna_list: - list[~azure.cognitiveservices.knowledge.qnamaker.models.QnADTO] - :param urls: List of URLs to be used for extracting Q-A. - :type urls: list[str] - :param files: List of files from which to Extract Q-A. - :type files: - list[~azure.cognitiveservices.knowledge.qnamaker.models.FileDTO] - """ - - _validation = { - 'name': {'required': True, 'max_length': 100, 'min_length': 1}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'qna_list': {'key': 'qnaList', 'type': '[QnADTO]'}, - 'urls': {'key': 'urls', 'type': '[str]'}, - 'files': {'key': 'files', 'type': '[FileDTO]'}, - } - - def __init__(self, *, name: str, qna_list=None, urls=None, files=None, **kwargs) -> None: - super(CreateKbDTO, self).__init__(**kwargs) - self.name = name - self.qna_list = qna_list - self.urls = urls - self.files = files diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/create_kb_input_dto.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/create_kb_input_dto.py deleted file mode 100644 index 78bfdf66c66c..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/create_kb_input_dto.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CreateKbInputDTO(Model): - """Input to create KB. - - :param qna_list: List of QNA to be added to the index. Ids are generated - by the service and should be omitted. - :type qna_list: - list[~azure.cognitiveservices.knowledge.qnamaker.models.QnADTO] - :param urls: List of URLs to be added to knowledgebase. - :type urls: list[str] - :param files: List of files to be added to knowledgebase. - :type files: - list[~azure.cognitiveservices.knowledge.qnamaker.models.FileDTO] - """ - - _attribute_map = { - 'qna_list': {'key': 'qnaList', 'type': '[QnADTO]'}, - 'urls': {'key': 'urls', 'type': '[str]'}, - 'files': {'key': 'files', 'type': '[FileDTO]'}, - } - - def __init__(self, **kwargs): - super(CreateKbInputDTO, self).__init__(**kwargs) - self.qna_list = kwargs.get('qna_list', None) - self.urls = kwargs.get('urls', None) - self.files = kwargs.get('files', None) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/create_kb_input_dto_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/create_kb_input_dto_py3.py deleted file mode 100644 index f052f3ba0b3b..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/create_kb_input_dto_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CreateKbInputDTO(Model): - """Input to create KB. - - :param qna_list: List of QNA to be added to the index. Ids are generated - by the service and should be omitted. - :type qna_list: - list[~azure.cognitiveservices.knowledge.qnamaker.models.QnADTO] - :param urls: List of URLs to be added to knowledgebase. - :type urls: list[str] - :param files: List of files to be added to knowledgebase. - :type files: - list[~azure.cognitiveservices.knowledge.qnamaker.models.FileDTO] - """ - - _attribute_map = { - 'qna_list': {'key': 'qnaList', 'type': '[QnADTO]'}, - 'urls': {'key': 'urls', 'type': '[str]'}, - 'files': {'key': 'files', 'type': '[FileDTO]'}, - } - - def __init__(self, *, qna_list=None, urls=None, files=None, **kwargs) -> None: - super(CreateKbInputDTO, self).__init__(**kwargs) - self.qna_list = qna_list - self.urls = urls - self.files = files diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/delete_kb_contents_dto.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/delete_kb_contents_dto.py deleted file mode 100644 index d4563cc31a8d..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/delete_kb_contents_dto.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeleteKbContentsDTO(Model): - """PATCH body schema of Delete Operation in UpdateKb. - - :param ids: List of Qna Ids to be deleted - :type ids: list[int] - :param sources: List of sources to be deleted from knowledgebase. - :type sources: list[str] - """ - - _attribute_map = { - 'ids': {'key': 'ids', 'type': '[int]'}, - 'sources': {'key': 'sources', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(DeleteKbContentsDTO, self).__init__(**kwargs) - self.ids = kwargs.get('ids', None) - self.sources = kwargs.get('sources', None) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/delete_kb_contents_dto_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/delete_kb_contents_dto_py3.py deleted file mode 100644 index 50532c441a7e..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/delete_kb_contents_dto_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeleteKbContentsDTO(Model): - """PATCH body schema of Delete Operation in UpdateKb. - - :param ids: List of Qna Ids to be deleted - :type ids: list[int] - :param sources: List of sources to be deleted from knowledgebase. - :type sources: list[str] - """ - - _attribute_map = { - 'ids': {'key': 'ids', 'type': '[int]'}, - 'sources': {'key': 'sources', 'type': '[str]'}, - } - - def __init__(self, *, ids=None, sources=None, **kwargs) -> None: - super(DeleteKbContentsDTO, self).__init__(**kwargs) - self.ids = ids - self.sources = sources diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/endpoint_keys_dto.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/endpoint_keys_dto.py deleted file mode 100644 index 1e66bd634abe..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/endpoint_keys_dto.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EndpointKeysDTO(Model): - """Schema for EndpointKeys generate/refresh operations. - - :param primary_endpoint_key: Primary Access Key. - :type primary_endpoint_key: str - :param secondary_endpoint_key: Secondary Access Key. - :type secondary_endpoint_key: str - :param installed_version: Current version of runtime. - :type installed_version: str - :param last_stable_version: Latest version of runtime. - :type last_stable_version: str - """ - - _attribute_map = { - 'primary_endpoint_key': {'key': 'primaryEndpointKey', 'type': 'str'}, - 'secondary_endpoint_key': {'key': 'secondaryEndpointKey', 'type': 'str'}, - 'installed_version': {'key': 'installedVersion', 'type': 'str'}, - 'last_stable_version': {'key': 'lastStableVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EndpointKeysDTO, self).__init__(**kwargs) - self.primary_endpoint_key = kwargs.get('primary_endpoint_key', None) - self.secondary_endpoint_key = kwargs.get('secondary_endpoint_key', None) - self.installed_version = kwargs.get('installed_version', None) - self.last_stable_version = kwargs.get('last_stable_version', None) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/endpoint_keys_dto_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/endpoint_keys_dto_py3.py deleted file mode 100644 index 97422112005d..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/endpoint_keys_dto_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EndpointKeysDTO(Model): - """Schema for EndpointKeys generate/refresh operations. - - :param primary_endpoint_key: Primary Access Key. - :type primary_endpoint_key: str - :param secondary_endpoint_key: Secondary Access Key. - :type secondary_endpoint_key: str - :param installed_version: Current version of runtime. - :type installed_version: str - :param last_stable_version: Latest version of runtime. - :type last_stable_version: str - """ - - _attribute_map = { - 'primary_endpoint_key': {'key': 'primaryEndpointKey', 'type': 'str'}, - 'secondary_endpoint_key': {'key': 'secondaryEndpointKey', 'type': 'str'}, - 'installed_version': {'key': 'installedVersion', 'type': 'str'}, - 'last_stable_version': {'key': 'lastStableVersion', 'type': 'str'}, - } - - def __init__(self, *, primary_endpoint_key: str=None, secondary_endpoint_key: str=None, installed_version: str=None, last_stable_version: str=None, **kwargs) -> None: - super(EndpointKeysDTO, self).__init__(**kwargs) - self.primary_endpoint_key = primary_endpoint_key - self.secondary_endpoint_key = secondary_endpoint_key - self.installed_version = installed_version - self.last_stable_version = last_stable_version diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/error.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/error.py deleted file mode 100644 index d54de8f71851..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/error.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Error(Model): - """The error object. As per Microsoft One API guidelines - - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. - - All required parameters must be populated in order to send to Azure. - - :param code: Required. One of a server-defined set of error codes. - Possible values include: 'BadArgument', 'Forbidden', 'NotFound', - 'KbNotFound', 'Unauthorized', 'Unspecified', 'EndpointKeysError', - 'QuotaExceeded', 'QnaRuntimeError', 'SKULimitExceeded', - 'OperationNotFound', 'ServiceError', 'ValidationFailure', - 'ExtractionFailure' - :type code: str or - ~azure.cognitiveservices.knowledge.qnamaker.models.ErrorCodeType - :param message: A human-readable representation of the error. - :type message: str - :param target: The target of the error. - :type target: str - :param details: An array of details about specific errors that led to this - reported error. - :type details: - list[~azure.cognitiveservices.knowledge.qnamaker.models.Error] - :param inner_error: An object containing more specific information than - the current object about the error. - :type inner_error: - ~azure.cognitiveservices.knowledge.qnamaker.models.InnerErrorModel - """ - - _validation = { - 'code': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[Error]'}, - 'inner_error': {'key': 'innerError', 'type': 'InnerErrorModel'}, - } - - def __init__(self, **kwargs): - super(Error, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.target = kwargs.get('target', None) - self.details = kwargs.get('details', None) - self.inner_error = kwargs.get('inner_error', None) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/error_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/error_py3.py deleted file mode 100644 index 81e33305a662..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/error_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Error(Model): - """The error object. As per Microsoft One API guidelines - - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. - - All required parameters must be populated in order to send to Azure. - - :param code: Required. One of a server-defined set of error codes. - Possible values include: 'BadArgument', 'Forbidden', 'NotFound', - 'KbNotFound', 'Unauthorized', 'Unspecified', 'EndpointKeysError', - 'QuotaExceeded', 'QnaRuntimeError', 'SKULimitExceeded', - 'OperationNotFound', 'ServiceError', 'ValidationFailure', - 'ExtractionFailure' - :type code: str or - ~azure.cognitiveservices.knowledge.qnamaker.models.ErrorCodeType - :param message: A human-readable representation of the error. - :type message: str - :param target: The target of the error. - :type target: str - :param details: An array of details about specific errors that led to this - reported error. - :type details: - list[~azure.cognitiveservices.knowledge.qnamaker.models.Error] - :param inner_error: An object containing more specific information than - the current object about the error. - :type inner_error: - ~azure.cognitiveservices.knowledge.qnamaker.models.InnerErrorModel - """ - - _validation = { - 'code': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[Error]'}, - 'inner_error': {'key': 'innerError', 'type': 'InnerErrorModel'}, - } - - def __init__(self, *, code, message: str=None, target: str=None, details=None, inner_error=None, **kwargs) -> None: - super(Error, self).__init__(**kwargs) - self.code = code - self.message = message - self.target = target - self.details = details - self.inner_error = inner_error diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/error_response.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/error_response.py deleted file mode 100644 index c74df96d50e3..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/error_response.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class ErrorResponse(Model): - """Error response. As per Microsoft One API guidelines - - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. - - :param error: The error object. - :type error: - ~azure.cognitiveservices.knowledge.qnamaker.models.ErrorResponseError - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorResponseError'}, - } - - def __init__(self, **kwargs): - super(ErrorResponse, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/error_response_error.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/error_response_error.py deleted file mode 100644 index 880ecffb2ed3..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/error_response_error.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .error import Error - - -class ErrorResponseError(Error): - """The error object. - - All required parameters must be populated in order to send to Azure. - - :param code: Required. One of a server-defined set of error codes. - Possible values include: 'BadArgument', 'Forbidden', 'NotFound', - 'KbNotFound', 'Unauthorized', 'Unspecified', 'EndpointKeysError', - 'QuotaExceeded', 'QnaRuntimeError', 'SKULimitExceeded', - 'OperationNotFound', 'ServiceError', 'ValidationFailure', - 'ExtractionFailure' - :type code: str or - ~azure.cognitiveservices.knowledge.qnamaker.models.ErrorCodeType - :param message: A human-readable representation of the error. - :type message: str - :param target: The target of the error. - :type target: str - :param details: An array of details about specific errors that led to this - reported error. - :type details: - list[~azure.cognitiveservices.knowledge.qnamaker.models.Error] - :param inner_error: An object containing more specific information than - the current object about the error. - :type inner_error: - ~azure.cognitiveservices.knowledge.qnamaker.models.InnerErrorModel - """ - - _validation = { - 'code': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[Error]'}, - 'inner_error': {'key': 'innerError', 'type': 'InnerErrorModel'}, - } - - def __init__(self, **kwargs): - super(ErrorResponseError, self).__init__(**kwargs) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/error_response_error_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/error_response_error_py3.py deleted file mode 100644 index d873ed36878a..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/error_response_error_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .error_py3 import Error - - -class ErrorResponseError(Error): - """The error object. - - All required parameters must be populated in order to send to Azure. - - :param code: Required. One of a server-defined set of error codes. - Possible values include: 'BadArgument', 'Forbidden', 'NotFound', - 'KbNotFound', 'Unauthorized', 'Unspecified', 'EndpointKeysError', - 'QuotaExceeded', 'QnaRuntimeError', 'SKULimitExceeded', - 'OperationNotFound', 'ServiceError', 'ValidationFailure', - 'ExtractionFailure' - :type code: str or - ~azure.cognitiveservices.knowledge.qnamaker.models.ErrorCodeType - :param message: A human-readable representation of the error. - :type message: str - :param target: The target of the error. - :type target: str - :param details: An array of details about specific errors that led to this - reported error. - :type details: - list[~azure.cognitiveservices.knowledge.qnamaker.models.Error] - :param inner_error: An object containing more specific information than - the current object about the error. - :type inner_error: - ~azure.cognitiveservices.knowledge.qnamaker.models.InnerErrorModel - """ - - _validation = { - 'code': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[Error]'}, - 'inner_error': {'key': 'innerError', 'type': 'InnerErrorModel'}, - } - - def __init__(self, *, code, message: str=None, target: str=None, details=None, inner_error=None, **kwargs) -> None: - super(ErrorResponseError, self).__init__(code=code, message=message, target=target, details=details, inner_error=inner_error, **kwargs) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/error_response_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/error_response_py3.py deleted file mode 100644 index c152b5a58f70..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/error_response_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class ErrorResponse(Model): - """Error response. As per Microsoft One API guidelines - - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. - - :param error: The error object. - :type error: - ~azure.cognitiveservices.knowledge.qnamaker.models.ErrorResponseError - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorResponseError'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(ErrorResponse, self).__init__(**kwargs) - self.error = error - - -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/file_dto.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/file_dto.py deleted file mode 100644 index 06b50f07d8c6..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/file_dto.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FileDTO(Model): - """DTO to hold details of uploaded files. - - All required parameters must be populated in order to send to Azure. - - :param file_name: Required. File name. Supported file types are ".tsv", - ".pdf", ".txt", ".docx", ".xlsx". - :type file_name: str - :param file_uri: Required. Public URI of the file. - :type file_uri: str - """ - - _validation = { - 'file_name': {'required': True, 'max_length': 200, 'min_length': 1}, - 'file_uri': {'required': True}, - } - - _attribute_map = { - 'file_name': {'key': 'fileName', 'type': 'str'}, - 'file_uri': {'key': 'fileUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FileDTO, self).__init__(**kwargs) - self.file_name = kwargs.get('file_name', None) - self.file_uri = kwargs.get('file_uri', None) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/file_dto_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/file_dto_py3.py deleted file mode 100644 index 4874c20c485e..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/file_dto_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FileDTO(Model): - """DTO to hold details of uploaded files. - - All required parameters must be populated in order to send to Azure. - - :param file_name: Required. File name. Supported file types are ".tsv", - ".pdf", ".txt", ".docx", ".xlsx". - :type file_name: str - :param file_uri: Required. Public URI of the file. - :type file_uri: str - """ - - _validation = { - 'file_name': {'required': True, 'max_length': 200, 'min_length': 1}, - 'file_uri': {'required': True}, - } - - _attribute_map = { - 'file_name': {'key': 'fileName', 'type': 'str'}, - 'file_uri': {'key': 'fileUri', 'type': 'str'}, - } - - def __init__(self, *, file_name: str, file_uri: str, **kwargs) -> None: - super(FileDTO, self).__init__(**kwargs) - self.file_name = file_name - self.file_uri = file_uri diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/inner_error_model.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/inner_error_model.py deleted file mode 100644 index 1d269d275710..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/inner_error_model.py +++ /dev/null @@ -1,37 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InnerErrorModel(Model): - """An object containing more specific information about the error. As per - Microsoft One API guidelines - - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. - - :param code: A more specific error code than was provided by the - containing error. - :type code: str - :param inner_error: An object containing more specific information than - the current object about the error. - :type inner_error: - ~azure.cognitiveservices.knowledge.qnamaker.models.InnerErrorModel - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'inner_error': {'key': 'innerError', 'type': 'InnerErrorModel'}, - } - - def __init__(self, **kwargs): - super(InnerErrorModel, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.inner_error = kwargs.get('inner_error', None) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/inner_error_model_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/inner_error_model_py3.py deleted file mode 100644 index cfcb2930b969..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/inner_error_model_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InnerErrorModel(Model): - """An object containing more specific information about the error. As per - Microsoft One API guidelines - - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. - - :param code: A more specific error code than was provided by the - containing error. - :type code: str - :param inner_error: An object containing more specific information than - the current object about the error. - :type inner_error: - ~azure.cognitiveservices.knowledge.qnamaker.models.InnerErrorModel - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'inner_error': {'key': 'innerError', 'type': 'InnerErrorModel'}, - } - - def __init__(self, *, code: str=None, inner_error=None, **kwargs) -> None: - super(InnerErrorModel, self).__init__(**kwargs) - self.code = code - self.inner_error = inner_error diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/knowledgebase_dto.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/knowledgebase_dto.py deleted file mode 100644 index 508ee085d1b4..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/knowledgebase_dto.py +++ /dev/null @@ -1,65 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KnowledgebaseDTO(Model): - """Response schema for CreateKb operation. - - :param id: Unique id that identifies a knowledgebase. - :type id: str - :param host_name: URL host name at which the knowledgebase is hosted. - :type host_name: str - :param last_accessed_timestamp: Time stamp at which the knowledgebase was - last accessed (UTC). - :type last_accessed_timestamp: str - :param last_changed_timestamp: Time stamp at which the knowledgebase was - last modified (UTC). - :type last_changed_timestamp: str - :param last_published_timestamp: Time stamp at which the knowledgebase was - last published (UTC). - :type last_published_timestamp: str - :param name: Friendly name of the knowledgebase. - :type name: str - :param user_id: User who created / owns the knowledgebase. - :type user_id: str - :param urls: URL sources from which Q-A were extracted and added to the - knowledgebase. - :type urls: list[str] - :param sources: Custom sources from which Q-A were extracted or explicitly - added to the knowledgebase. - :type sources: list[str] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'host_name': {'key': 'hostName', 'type': 'str'}, - 'last_accessed_timestamp': {'key': 'lastAccessedTimestamp', 'type': 'str'}, - 'last_changed_timestamp': {'key': 'lastChangedTimestamp', 'type': 'str'}, - 'last_published_timestamp': {'key': 'lastPublishedTimestamp', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'user_id': {'key': 'userId', 'type': 'str'}, - 'urls': {'key': 'urls', 'type': '[str]'}, - 'sources': {'key': 'sources', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(KnowledgebaseDTO, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.host_name = kwargs.get('host_name', None) - self.last_accessed_timestamp = kwargs.get('last_accessed_timestamp', None) - self.last_changed_timestamp = kwargs.get('last_changed_timestamp', None) - self.last_published_timestamp = kwargs.get('last_published_timestamp', None) - self.name = kwargs.get('name', None) - self.user_id = kwargs.get('user_id', None) - self.urls = kwargs.get('urls', None) - self.sources = kwargs.get('sources', None) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/knowledgebase_dto_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/knowledgebase_dto_py3.py deleted file mode 100644 index 008843eb04f5..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/knowledgebase_dto_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KnowledgebaseDTO(Model): - """Response schema for CreateKb operation. - - :param id: Unique id that identifies a knowledgebase. - :type id: str - :param host_name: URL host name at which the knowledgebase is hosted. - :type host_name: str - :param last_accessed_timestamp: Time stamp at which the knowledgebase was - last accessed (UTC). - :type last_accessed_timestamp: str - :param last_changed_timestamp: Time stamp at which the knowledgebase was - last modified (UTC). - :type last_changed_timestamp: str - :param last_published_timestamp: Time stamp at which the knowledgebase was - last published (UTC). - :type last_published_timestamp: str - :param name: Friendly name of the knowledgebase. - :type name: str - :param user_id: User who created / owns the knowledgebase. - :type user_id: str - :param urls: URL sources from which Q-A were extracted and added to the - knowledgebase. - :type urls: list[str] - :param sources: Custom sources from which Q-A were extracted or explicitly - added to the knowledgebase. - :type sources: list[str] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'host_name': {'key': 'hostName', 'type': 'str'}, - 'last_accessed_timestamp': {'key': 'lastAccessedTimestamp', 'type': 'str'}, - 'last_changed_timestamp': {'key': 'lastChangedTimestamp', 'type': 'str'}, - 'last_published_timestamp': {'key': 'lastPublishedTimestamp', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'user_id': {'key': 'userId', 'type': 'str'}, - 'urls': {'key': 'urls', 'type': '[str]'}, - 'sources': {'key': 'sources', 'type': '[str]'}, - } - - def __init__(self, *, id: str=None, host_name: str=None, last_accessed_timestamp: str=None, last_changed_timestamp: str=None, last_published_timestamp: str=None, name: str=None, user_id: str=None, urls=None, sources=None, **kwargs) -> None: - super(KnowledgebaseDTO, self).__init__(**kwargs) - self.id = id - self.host_name = host_name - self.last_accessed_timestamp = last_accessed_timestamp - self.last_changed_timestamp = last_changed_timestamp - self.last_published_timestamp = last_published_timestamp - self.name = name - self.user_id = user_id - self.urls = urls - self.sources = sources diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/knowledgebases_dto.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/knowledgebases_dto.py deleted file mode 100644 index 3fc0f26af401..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/knowledgebases_dto.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KnowledgebasesDTO(Model): - """Collection of knowledgebases owned by a user. - - :param knowledgebases: Collection of knowledgebase records. - :type knowledgebases: - list[~azure.cognitiveservices.knowledge.qnamaker.models.KnowledgebaseDTO] - """ - - _attribute_map = { - 'knowledgebases': {'key': 'knowledgebases', 'type': '[KnowledgebaseDTO]'}, - } - - def __init__(self, **kwargs): - super(KnowledgebasesDTO, self).__init__(**kwargs) - self.knowledgebases = kwargs.get('knowledgebases', None) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/knowledgebases_dto_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/knowledgebases_dto_py3.py deleted file mode 100644 index 600df122f63e..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/knowledgebases_dto_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KnowledgebasesDTO(Model): - """Collection of knowledgebases owned by a user. - - :param knowledgebases: Collection of knowledgebase records. - :type knowledgebases: - list[~azure.cognitiveservices.knowledge.qnamaker.models.KnowledgebaseDTO] - """ - - _attribute_map = { - 'knowledgebases': {'key': 'knowledgebases', 'type': '[KnowledgebaseDTO]'}, - } - - def __init__(self, *, knowledgebases=None, **kwargs) -> None: - super(KnowledgebasesDTO, self).__init__(**kwargs) - self.knowledgebases = knowledgebases diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/metadata_dto.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/metadata_dto.py deleted file mode 100644 index ad81d7a694a1..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/metadata_dto.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetadataDTO(Model): - """Name - value pair of metadata. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Metadata name. - :type name: str - :param value: Required. Metadata value. - :type value: str - """ - - _validation = { - 'name': {'required': True, 'max_length': 100, 'min_length': 1}, - 'value': {'required': True, 'max_length': 500, 'min_length': 1}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MetadataDTO, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/metadata_dto_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/metadata_dto_py3.py deleted file mode 100644 index da4c1d010f8c..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/metadata_dto_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetadataDTO(Model): - """Name - value pair of metadata. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Metadata name. - :type name: str - :param value: Required. Metadata value. - :type value: str - """ - - _validation = { - 'name': {'required': True, 'max_length': 100, 'min_length': 1}, - 'value': {'required': True, 'max_length': 500, 'min_length': 1}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str, value: str, **kwargs) -> None: - super(MetadataDTO, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/operation.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/operation.py deleted file mode 100644 index 2c86977bbe02..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/operation.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """Record to track long running operation. - - :param operation_state: Operation state. Possible values include: - 'Failed', 'NotStarted', 'Running', 'Succeeded' - :type operation_state: str or - ~azure.cognitiveservices.knowledge.qnamaker.models.OperationStateType - :param created_timestamp: Timestamp when the operation was created. - :type created_timestamp: str - :param last_action_timestamp: Timestamp when the current state was - entered. - :type last_action_timestamp: str - :param resource_location: Relative URI to the target resource location for - completed resources. - :type resource_location: str - :param user_id: User Id - :type user_id: str - :param operation_id: Operation Id. - :type operation_id: str - :param error_response: Error details in case of failures. - :type error_response: - ~azure.cognitiveservices.knowledge.qnamaker.models.ErrorResponse - """ - - _attribute_map = { - 'operation_state': {'key': 'operationState', 'type': 'str'}, - 'created_timestamp': {'key': 'createdTimestamp', 'type': 'str'}, - 'last_action_timestamp': {'key': 'lastActionTimestamp', 'type': 'str'}, - 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, - 'user_id': {'key': 'userId', 'type': 'str'}, - 'operation_id': {'key': 'operationId', 'type': 'str'}, - 'error_response': {'key': 'errorResponse', 'type': 'ErrorResponse'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.operation_state = kwargs.get('operation_state', None) - self.created_timestamp = kwargs.get('created_timestamp', None) - self.last_action_timestamp = kwargs.get('last_action_timestamp', None) - self.resource_location = kwargs.get('resource_location', None) - self.user_id = kwargs.get('user_id', None) - self.operation_id = kwargs.get('operation_id', None) - self.error_response = kwargs.get('error_response', None) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/operation_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/operation_py3.py deleted file mode 100644 index 2190cc96a8c9..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/operation_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """Record to track long running operation. - - :param operation_state: Operation state. Possible values include: - 'Failed', 'NotStarted', 'Running', 'Succeeded' - :type operation_state: str or - ~azure.cognitiveservices.knowledge.qnamaker.models.OperationStateType - :param created_timestamp: Timestamp when the operation was created. - :type created_timestamp: str - :param last_action_timestamp: Timestamp when the current state was - entered. - :type last_action_timestamp: str - :param resource_location: Relative URI to the target resource location for - completed resources. - :type resource_location: str - :param user_id: User Id - :type user_id: str - :param operation_id: Operation Id. - :type operation_id: str - :param error_response: Error details in case of failures. - :type error_response: - ~azure.cognitiveservices.knowledge.qnamaker.models.ErrorResponse - """ - - _attribute_map = { - 'operation_state': {'key': 'operationState', 'type': 'str'}, - 'created_timestamp': {'key': 'createdTimestamp', 'type': 'str'}, - 'last_action_timestamp': {'key': 'lastActionTimestamp', 'type': 'str'}, - 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, - 'user_id': {'key': 'userId', 'type': 'str'}, - 'operation_id': {'key': 'operationId', 'type': 'str'}, - 'error_response': {'key': 'errorResponse', 'type': 'ErrorResponse'}, - } - - def __init__(self, *, operation_state=None, created_timestamp: str=None, last_action_timestamp: str=None, resource_location: str=None, user_id: str=None, operation_id: str=None, error_response=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.operation_state = operation_state - self.created_timestamp = created_timestamp - self.last_action_timestamp = last_action_timestamp - self.resource_location = resource_location - self.user_id = user_id - self.operation_id = operation_id - self.error_response = error_response diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/qn_adocuments_dto.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/qn_adocuments_dto.py deleted file mode 100644 index a8a77b520f14..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/qn_adocuments_dto.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QnADocumentsDTO(Model): - """List of QnADTO. - - :param qna_documents: List of answers. - :type qna_documents: - list[~azure.cognitiveservices.knowledge.qnamaker.models.QnADTO] - """ - - _attribute_map = { - 'qna_documents': {'key': 'qnaDocuments', 'type': '[QnADTO]'}, - } - - def __init__(self, **kwargs): - super(QnADocumentsDTO, self).__init__(**kwargs) - self.qna_documents = kwargs.get('qna_documents', None) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/qn_adocuments_dto_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/qn_adocuments_dto_py3.py deleted file mode 100644 index 45b0ba89a64e..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/qn_adocuments_dto_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QnADocumentsDTO(Model): - """List of QnADTO. - - :param qna_documents: List of answers. - :type qna_documents: - list[~azure.cognitiveservices.knowledge.qnamaker.models.QnADTO] - """ - - _attribute_map = { - 'qna_documents': {'key': 'qnaDocuments', 'type': '[QnADTO]'}, - } - - def __init__(self, *, qna_documents=None, **kwargs) -> None: - super(QnADocumentsDTO, self).__init__(**kwargs) - self.qna_documents = qna_documents diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/qn_adto.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/qn_adto.py deleted file mode 100644 index 41436a02cd6d..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/qn_adto.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QnADTO(Model): - """Q-A object. - - All required parameters must be populated in order to send to Azure. - - :param id: Unique id for the Q-A. - :type id: int - :param answer: Required. Answer text - :type answer: str - :param source: Source from which Q-A was indexed. eg. - https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs - :type source: str - :param questions: Required. List of questions associated with the answer. - :type questions: list[str] - :param metadata: List of metadata associated with the answer. - :type metadata: - list[~azure.cognitiveservices.knowledge.qnamaker.models.MetadataDTO] - """ - - _validation = { - 'answer': {'required': True, 'max_length': 25000, 'min_length': 1}, - 'source': {'max_length': 300}, - 'questions': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'int'}, - 'answer': {'key': 'answer', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'questions': {'key': 'questions', 'type': '[str]'}, - 'metadata': {'key': 'metadata', 'type': '[MetadataDTO]'}, - } - - def __init__(self, **kwargs): - super(QnADTO, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.answer = kwargs.get('answer', None) - self.source = kwargs.get('source', None) - self.questions = kwargs.get('questions', None) - self.metadata = kwargs.get('metadata', None) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/qn_adto_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/qn_adto_py3.py deleted file mode 100644 index b3e56678a49b..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/qn_adto_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QnADTO(Model): - """Q-A object. - - All required parameters must be populated in order to send to Azure. - - :param id: Unique id for the Q-A. - :type id: int - :param answer: Required. Answer text - :type answer: str - :param source: Source from which Q-A was indexed. eg. - https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs - :type source: str - :param questions: Required. List of questions associated with the answer. - :type questions: list[str] - :param metadata: List of metadata associated with the answer. - :type metadata: - list[~azure.cognitiveservices.knowledge.qnamaker.models.MetadataDTO] - """ - - _validation = { - 'answer': {'required': True, 'max_length': 25000, 'min_length': 1}, - 'source': {'max_length': 300}, - 'questions': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'int'}, - 'answer': {'key': 'answer', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'questions': {'key': 'questions', 'type': '[str]'}, - 'metadata': {'key': 'metadata', 'type': '[MetadataDTO]'}, - } - - def __init__(self, *, answer: str, questions, id: int=None, source: str=None, metadata=None, **kwargs) -> None: - super(QnADTO, self).__init__(**kwargs) - self.id = id - self.answer = answer - self.source = source - self.questions = questions - self.metadata = metadata diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/replace_kb_dto.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/replace_kb_dto.py deleted file mode 100644 index 7b8314981fc0..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/replace_kb_dto.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReplaceKbDTO(Model): - """Post body schema for Replace KB operation. - - All required parameters must be populated in order to send to Azure. - - :param qn_alist: Required. List of Q-A (QnADTO) to be added to the - knowledgebase. Q-A Ids are assigned by the service and should be omitted. - :type qn_alist: - list[~azure.cognitiveservices.knowledge.qnamaker.models.QnADTO] - """ - - _validation = { - 'qn_alist': {'required': True}, - } - - _attribute_map = { - 'qn_alist': {'key': 'qnAList', 'type': '[QnADTO]'}, - } - - def __init__(self, **kwargs): - super(ReplaceKbDTO, self).__init__(**kwargs) - self.qn_alist = kwargs.get('qn_alist', None) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/replace_kb_dto_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/replace_kb_dto_py3.py deleted file mode 100644 index 722ddc597b5c..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/replace_kb_dto_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReplaceKbDTO(Model): - """Post body schema for Replace KB operation. - - All required parameters must be populated in order to send to Azure. - - :param qn_alist: Required. List of Q-A (QnADTO) to be added to the - knowledgebase. Q-A Ids are assigned by the service and should be omitted. - :type qn_alist: - list[~azure.cognitiveservices.knowledge.qnamaker.models.QnADTO] - """ - - _validation = { - 'qn_alist': {'required': True}, - } - - _attribute_map = { - 'qn_alist': {'key': 'qnAList', 'type': '[QnADTO]'}, - } - - def __init__(self, *, qn_alist, **kwargs) -> None: - super(ReplaceKbDTO, self).__init__(**kwargs) - self.qn_alist = qn_alist diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_kb_contents_dto.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_kb_contents_dto.py deleted file mode 100644 index b0fdfdc33775..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_kb_contents_dto.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateKbContentsDTO(Model): - """PATCH body schema for Update operation in Update Kb. - - :param name: Friendly name for the knowledgebase. - :type name: str - :param qna_list: List of Q-A (UpdateQnaDTO) to be added to the - knowledgebase. - :type qna_list: - list[~azure.cognitiveservices.knowledge.qnamaker.models.UpdateQnaDTO] - :param urls: List of existing URLs to be refreshed. The content will be - extracted again and re-indexed. - :type urls: list[str] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'qna_list': {'key': 'qnaList', 'type': '[UpdateQnaDTO]'}, - 'urls': {'key': 'urls', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(UpdateKbContentsDTO, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.qna_list = kwargs.get('qna_list', None) - self.urls = kwargs.get('urls', None) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_kb_contents_dto_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_kb_contents_dto_py3.py deleted file mode 100644 index 1981c3af3824..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_kb_contents_dto_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateKbContentsDTO(Model): - """PATCH body schema for Update operation in Update Kb. - - :param name: Friendly name for the knowledgebase. - :type name: str - :param qna_list: List of Q-A (UpdateQnaDTO) to be added to the - knowledgebase. - :type qna_list: - list[~azure.cognitiveservices.knowledge.qnamaker.models.UpdateQnaDTO] - :param urls: List of existing URLs to be refreshed. The content will be - extracted again and re-indexed. - :type urls: list[str] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'qna_list': {'key': 'qnaList', 'type': '[UpdateQnaDTO]'}, - 'urls': {'key': 'urls', 'type': '[str]'}, - } - - def __init__(self, *, name: str=None, qna_list=None, urls=None, **kwargs) -> None: - super(UpdateKbContentsDTO, self).__init__(**kwargs) - self.name = name - self.qna_list = qna_list - self.urls = urls diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_kb_operation_dto.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_kb_operation_dto.py deleted file mode 100644 index 747b085ed336..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_kb_operation_dto.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateKbOperationDTO(Model): - """Contains list of QnAs to be updated. - - :param add: An instance of CreateKbInputDTO for add operation - :type add: - ~azure.cognitiveservices.knowledge.qnamaker.models.UpdateKbOperationDTOAdd - :param delete: An instance of DeleteKbContentsDTO for delete Operation - :type delete: - ~azure.cognitiveservices.knowledge.qnamaker.models.UpdateKbOperationDTODelete - :param update: An instance of UpdateKbContentsDTO for Update Operation - :type update: - ~azure.cognitiveservices.knowledge.qnamaker.models.UpdateKbOperationDTOUpdate - """ - - _attribute_map = { - 'add': {'key': 'add', 'type': 'UpdateKbOperationDTOAdd'}, - 'delete': {'key': 'delete', 'type': 'UpdateKbOperationDTODelete'}, - 'update': {'key': 'update', 'type': 'UpdateKbOperationDTOUpdate'}, - } - - def __init__(self, **kwargs): - super(UpdateKbOperationDTO, self).__init__(**kwargs) - self.add = kwargs.get('add', None) - self.delete = kwargs.get('delete', None) - self.update = kwargs.get('update', None) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_kb_operation_dto_add.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_kb_operation_dto_add.py deleted file mode 100644 index ac8ec6f8c794..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_kb_operation_dto_add.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .create_kb_input_dto import CreateKbInputDTO - - -class UpdateKbOperationDTOAdd(CreateKbInputDTO): - """An instance of CreateKbInputDTO for add operation. - - :param qna_list: List of QNA to be added to the index. Ids are generated - by the service and should be omitted. - :type qna_list: - list[~azure.cognitiveservices.knowledge.qnamaker.models.QnADTO] - :param urls: List of URLs to be added to knowledgebase. - :type urls: list[str] - :param files: List of files to be added to knowledgebase. - :type files: - list[~azure.cognitiveservices.knowledge.qnamaker.models.FileDTO] - """ - - _attribute_map = { - 'qna_list': {'key': 'qnaList', 'type': '[QnADTO]'}, - 'urls': {'key': 'urls', 'type': '[str]'}, - 'files': {'key': 'files', 'type': '[FileDTO]'}, - } - - def __init__(self, **kwargs): - super(UpdateKbOperationDTOAdd, self).__init__(**kwargs) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_kb_operation_dto_add_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_kb_operation_dto_add_py3.py deleted file mode 100644 index b9c135e727ba..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_kb_operation_dto_add_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .create_kb_input_dto_py3 import CreateKbInputDTO - - -class UpdateKbOperationDTOAdd(CreateKbInputDTO): - """An instance of CreateKbInputDTO for add operation. - - :param qna_list: List of QNA to be added to the index. Ids are generated - by the service and should be omitted. - :type qna_list: - list[~azure.cognitiveservices.knowledge.qnamaker.models.QnADTO] - :param urls: List of URLs to be added to knowledgebase. - :type urls: list[str] - :param files: List of files to be added to knowledgebase. - :type files: - list[~azure.cognitiveservices.knowledge.qnamaker.models.FileDTO] - """ - - _attribute_map = { - 'qna_list': {'key': 'qnaList', 'type': '[QnADTO]'}, - 'urls': {'key': 'urls', 'type': '[str]'}, - 'files': {'key': 'files', 'type': '[FileDTO]'}, - } - - def __init__(self, *, qna_list=None, urls=None, files=None, **kwargs) -> None: - super(UpdateKbOperationDTOAdd, self).__init__(qna_list=qna_list, urls=urls, files=files, **kwargs) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_kb_operation_dto_delete.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_kb_operation_dto_delete.py deleted file mode 100644 index fb62e5bf659c..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_kb_operation_dto_delete.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .delete_kb_contents_dto import DeleteKbContentsDTO - - -class UpdateKbOperationDTODelete(DeleteKbContentsDTO): - """An instance of DeleteKbContentsDTO for delete Operation. - - :param ids: List of Qna Ids to be deleted - :type ids: list[int] - :param sources: List of sources to be deleted from knowledgebase. - :type sources: list[str] - """ - - _attribute_map = { - 'ids': {'key': 'ids', 'type': '[int]'}, - 'sources': {'key': 'sources', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(UpdateKbOperationDTODelete, self).__init__(**kwargs) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_kb_operation_dto_delete_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_kb_operation_dto_delete_py3.py deleted file mode 100644 index 67628e63b0a3..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_kb_operation_dto_delete_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .delete_kb_contents_dto_py3 import DeleteKbContentsDTO - - -class UpdateKbOperationDTODelete(DeleteKbContentsDTO): - """An instance of DeleteKbContentsDTO for delete Operation. - - :param ids: List of Qna Ids to be deleted - :type ids: list[int] - :param sources: List of sources to be deleted from knowledgebase. - :type sources: list[str] - """ - - _attribute_map = { - 'ids': {'key': 'ids', 'type': '[int]'}, - 'sources': {'key': 'sources', 'type': '[str]'}, - } - - def __init__(self, *, ids=None, sources=None, **kwargs) -> None: - super(UpdateKbOperationDTODelete, self).__init__(ids=ids, sources=sources, **kwargs) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_kb_operation_dto_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_kb_operation_dto_py3.py deleted file mode 100644 index a183b668114b..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_kb_operation_dto_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateKbOperationDTO(Model): - """Contains list of QnAs to be updated. - - :param add: An instance of CreateKbInputDTO for add operation - :type add: - ~azure.cognitiveservices.knowledge.qnamaker.models.UpdateKbOperationDTOAdd - :param delete: An instance of DeleteKbContentsDTO for delete Operation - :type delete: - ~azure.cognitiveservices.knowledge.qnamaker.models.UpdateKbOperationDTODelete - :param update: An instance of UpdateKbContentsDTO for Update Operation - :type update: - ~azure.cognitiveservices.knowledge.qnamaker.models.UpdateKbOperationDTOUpdate - """ - - _attribute_map = { - 'add': {'key': 'add', 'type': 'UpdateKbOperationDTOAdd'}, - 'delete': {'key': 'delete', 'type': 'UpdateKbOperationDTODelete'}, - 'update': {'key': 'update', 'type': 'UpdateKbOperationDTOUpdate'}, - } - - def __init__(self, *, add=None, delete=None, update=None, **kwargs) -> None: - super(UpdateKbOperationDTO, self).__init__(**kwargs) - self.add = add - self.delete = delete - self.update = update diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_kb_operation_dto_update.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_kb_operation_dto_update.py deleted file mode 100644 index 8a80527b451a..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_kb_operation_dto_update.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_kb_contents_dto import UpdateKbContentsDTO - - -class UpdateKbOperationDTOUpdate(UpdateKbContentsDTO): - """An instance of UpdateKbContentsDTO for Update Operation. - - :param name: Friendly name for the knowledgebase. - :type name: str - :param qna_list: List of Q-A (UpdateQnaDTO) to be added to the - knowledgebase. - :type qna_list: - list[~azure.cognitiveservices.knowledge.qnamaker.models.UpdateQnaDTO] - :param urls: List of existing URLs to be refreshed. The content will be - extracted again and re-indexed. - :type urls: list[str] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'qna_list': {'key': 'qnaList', 'type': '[UpdateQnaDTO]'}, - 'urls': {'key': 'urls', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(UpdateKbOperationDTOUpdate, self).__init__(**kwargs) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_kb_operation_dto_update_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_kb_operation_dto_update_py3.py deleted file mode 100644 index ccb2faf4b8f9..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_kb_operation_dto_update_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_kb_contents_dto_py3 import UpdateKbContentsDTO - - -class UpdateKbOperationDTOUpdate(UpdateKbContentsDTO): - """An instance of UpdateKbContentsDTO for Update Operation. - - :param name: Friendly name for the knowledgebase. - :type name: str - :param qna_list: List of Q-A (UpdateQnaDTO) to be added to the - knowledgebase. - :type qna_list: - list[~azure.cognitiveservices.knowledge.qnamaker.models.UpdateQnaDTO] - :param urls: List of existing URLs to be refreshed. The content will be - extracted again and re-indexed. - :type urls: list[str] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'qna_list': {'key': 'qnaList', 'type': '[UpdateQnaDTO]'}, - 'urls': {'key': 'urls', 'type': '[str]'}, - } - - def __init__(self, *, name: str=None, qna_list=None, urls=None, **kwargs) -> None: - super(UpdateKbOperationDTOUpdate, self).__init__(name=name, qna_list=qna_list, urls=urls, **kwargs) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_metadata_dto.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_metadata_dto.py deleted file mode 100644 index de526f59d55f..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_metadata_dto.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateMetadataDTO(Model): - """PATCH Body schema to represent list of Metadata to be updated. - - :param delete: List of Metadata associated with answer to be deleted - :type delete: - list[~azure.cognitiveservices.knowledge.qnamaker.models.MetadataDTO] - :param add: List of metadata associated with answer to be added - :type add: - list[~azure.cognitiveservices.knowledge.qnamaker.models.MetadataDTO] - """ - - _attribute_map = { - 'delete': {'key': 'delete', 'type': '[MetadataDTO]'}, - 'add': {'key': 'add', 'type': '[MetadataDTO]'}, - } - - def __init__(self, **kwargs): - super(UpdateMetadataDTO, self).__init__(**kwargs) - self.delete = kwargs.get('delete', None) - self.add = kwargs.get('add', None) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_metadata_dto_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_metadata_dto_py3.py deleted file mode 100644 index 50327dff6578..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_metadata_dto_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateMetadataDTO(Model): - """PATCH Body schema to represent list of Metadata to be updated. - - :param delete: List of Metadata associated with answer to be deleted - :type delete: - list[~azure.cognitiveservices.knowledge.qnamaker.models.MetadataDTO] - :param add: List of metadata associated with answer to be added - :type add: - list[~azure.cognitiveservices.knowledge.qnamaker.models.MetadataDTO] - """ - - _attribute_map = { - 'delete': {'key': 'delete', 'type': '[MetadataDTO]'}, - 'add': {'key': 'add', 'type': '[MetadataDTO]'}, - } - - def __init__(self, *, delete=None, add=None, **kwargs) -> None: - super(UpdateMetadataDTO, self).__init__(**kwargs) - self.delete = delete - self.add = add diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_qna_dto.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_qna_dto.py deleted file mode 100644 index 186d111365ae..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_qna_dto.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateQnaDTO(Model): - """PATCH Body schema for Update Qna List. - - :param id: Unique id for the Q-A - :type id: int - :param answer: Answer text - :type answer: str - :param source: Source from which Q-A was indexed. eg. - https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs - :type source: str - :param questions: List of questions associated with the answer. - :type questions: - ~azure.cognitiveservices.knowledge.qnamaker.models.UpdateQnaDTOQuestions - :param metadata: List of metadata associated with the answer to be updated - :type metadata: - ~azure.cognitiveservices.knowledge.qnamaker.models.UpdateQnaDTOMetadata - """ - - _validation = { - 'id': {'maximum': 2147483647, 'minimum': 0}, - 'source': {'max_length': 300}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'int'}, - 'answer': {'key': 'answer', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'questions': {'key': 'questions', 'type': 'UpdateQnaDTOQuestions'}, - 'metadata': {'key': 'metadata', 'type': 'UpdateQnaDTOMetadata'}, - } - - def __init__(self, **kwargs): - super(UpdateQnaDTO, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.answer = kwargs.get('answer', None) - self.source = kwargs.get('source', None) - self.questions = kwargs.get('questions', None) - self.metadata = kwargs.get('metadata', None) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_qna_dto_metadata.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_qna_dto_metadata.py deleted file mode 100644 index ae18bff232e4..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_qna_dto_metadata.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_metadata_dto import UpdateMetadataDTO - - -class UpdateQnaDTOMetadata(UpdateMetadataDTO): - """List of metadata associated with the answer to be updated. - - :param delete: List of Metadata associated with answer to be deleted - :type delete: - list[~azure.cognitiveservices.knowledge.qnamaker.models.MetadataDTO] - :param add: List of metadata associated with answer to be added - :type add: - list[~azure.cognitiveservices.knowledge.qnamaker.models.MetadataDTO] - """ - - _attribute_map = { - 'delete': {'key': 'delete', 'type': '[MetadataDTO]'}, - 'add': {'key': 'add', 'type': '[MetadataDTO]'}, - } - - def __init__(self, **kwargs): - super(UpdateQnaDTOMetadata, self).__init__(**kwargs) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_qna_dto_metadata_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_qna_dto_metadata_py3.py deleted file mode 100644 index 64d8384af6e4..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_qna_dto_metadata_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_metadata_dto_py3 import UpdateMetadataDTO - - -class UpdateQnaDTOMetadata(UpdateMetadataDTO): - """List of metadata associated with the answer to be updated. - - :param delete: List of Metadata associated with answer to be deleted - :type delete: - list[~azure.cognitiveservices.knowledge.qnamaker.models.MetadataDTO] - :param add: List of metadata associated with answer to be added - :type add: - list[~azure.cognitiveservices.knowledge.qnamaker.models.MetadataDTO] - """ - - _attribute_map = { - 'delete': {'key': 'delete', 'type': '[MetadataDTO]'}, - 'add': {'key': 'add', 'type': '[MetadataDTO]'}, - } - - def __init__(self, *, delete=None, add=None, **kwargs) -> None: - super(UpdateQnaDTOMetadata, self).__init__(delete=delete, add=add, **kwargs) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_qna_dto_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_qna_dto_py3.py deleted file mode 100644 index 6ccad503fd2c..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_qna_dto_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateQnaDTO(Model): - """PATCH Body schema for Update Qna List. - - :param id: Unique id for the Q-A - :type id: int - :param answer: Answer text - :type answer: str - :param source: Source from which Q-A was indexed. eg. - https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs - :type source: str - :param questions: List of questions associated with the answer. - :type questions: - ~azure.cognitiveservices.knowledge.qnamaker.models.UpdateQnaDTOQuestions - :param metadata: List of metadata associated with the answer to be updated - :type metadata: - ~azure.cognitiveservices.knowledge.qnamaker.models.UpdateQnaDTOMetadata - """ - - _validation = { - 'id': {'maximum': 2147483647, 'minimum': 0}, - 'source': {'max_length': 300}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'int'}, - 'answer': {'key': 'answer', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'questions': {'key': 'questions', 'type': 'UpdateQnaDTOQuestions'}, - 'metadata': {'key': 'metadata', 'type': 'UpdateQnaDTOMetadata'}, - } - - def __init__(self, *, id: int=None, answer: str=None, source: str=None, questions=None, metadata=None, **kwargs) -> None: - super(UpdateQnaDTO, self).__init__(**kwargs) - self.id = id - self.answer = answer - self.source = source - self.questions = questions - self.metadata = metadata diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_qna_dto_questions.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_qna_dto_questions.py deleted file mode 100644 index c30d3c4c3a43..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_qna_dto_questions.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_questions_dto import UpdateQuestionsDTO - - -class UpdateQnaDTOQuestions(UpdateQuestionsDTO): - """List of questions associated with the answer. - - :param add: List of questions to be added - :type add: list[str] - :param delete: List of questions to be deleted. - :type delete: list[str] - """ - - _attribute_map = { - 'add': {'key': 'add', 'type': '[str]'}, - 'delete': {'key': 'delete', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(UpdateQnaDTOQuestions, self).__init__(**kwargs) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_qna_dto_questions_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_qna_dto_questions_py3.py deleted file mode 100644 index 833f6036ef74..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_qna_dto_questions_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .update_questions_dto_py3 import UpdateQuestionsDTO - - -class UpdateQnaDTOQuestions(UpdateQuestionsDTO): - """List of questions associated with the answer. - - :param add: List of questions to be added - :type add: list[str] - :param delete: List of questions to be deleted. - :type delete: list[str] - """ - - _attribute_map = { - 'add': {'key': 'add', 'type': '[str]'}, - 'delete': {'key': 'delete', 'type': '[str]'}, - } - - def __init__(self, *, add=None, delete=None, **kwargs) -> None: - super(UpdateQnaDTOQuestions, self).__init__(add=add, delete=delete, **kwargs) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_questions_dto.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_questions_dto.py deleted file mode 100644 index 66d9acf04081..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_questions_dto.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateQuestionsDTO(Model): - """PATCH Body schema for Update Kb which contains list of questions to be - added and deleted. - - :param add: List of questions to be added - :type add: list[str] - :param delete: List of questions to be deleted. - :type delete: list[str] - """ - - _attribute_map = { - 'add': {'key': 'add', 'type': '[str]'}, - 'delete': {'key': 'delete', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(UpdateQuestionsDTO, self).__init__(**kwargs) - self.add = kwargs.get('add', None) - self.delete = kwargs.get('delete', None) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_questions_dto_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_questions_dto_py3.py deleted file mode 100644 index bfed42c94bc6..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/update_questions_dto_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateQuestionsDTO(Model): - """PATCH Body schema for Update Kb which contains list of questions to be - added and deleted. - - :param add: List of questions to be added - :type add: list[str] - :param delete: List of questions to be deleted. - :type delete: list[str] - """ - - _attribute_map = { - 'add': {'key': 'add', 'type': '[str]'}, - 'delete': {'key': 'delete', 'type': '[str]'}, - } - - def __init__(self, *, add=None, delete=None, **kwargs) -> None: - super(UpdateQuestionsDTO, self).__init__(**kwargs) - self.add = add - self.delete = delete diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/word_alterations_dto.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/word_alterations_dto.py deleted file mode 100644 index cf28a19ff53f..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/word_alterations_dto.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WordAlterationsDTO(Model): - """Collection of word alterations. - - All required parameters must be populated in order to send to Azure. - - :param word_alterations: Required. Collection of word alterations. - :type word_alterations: - list[~azure.cognitiveservices.knowledge.qnamaker.models.AlterationsDTO] - """ - - _validation = { - 'word_alterations': {'required': True}, - } - - _attribute_map = { - 'word_alterations': {'key': 'wordAlterations', 'type': '[AlterationsDTO]'}, - } - - def __init__(self, **kwargs): - super(WordAlterationsDTO, self).__init__(**kwargs) - self.word_alterations = kwargs.get('word_alterations', None) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/word_alterations_dto_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/word_alterations_dto_py3.py deleted file mode 100644 index 579706cdbbdf..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/word_alterations_dto_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WordAlterationsDTO(Model): - """Collection of word alterations. - - All required parameters must be populated in order to send to Azure. - - :param word_alterations: Required. Collection of word alterations. - :type word_alterations: - list[~azure.cognitiveservices.knowledge.qnamaker.models.AlterationsDTO] - """ - - _validation = { - 'word_alterations': {'required': True}, - } - - _attribute_map = { - 'word_alterations': {'key': 'wordAlterations', 'type': '[AlterationsDTO]'}, - } - - def __init__(self, *, word_alterations, **kwargs) -> None: - super(WordAlterationsDTO, self).__init__(**kwargs) - self.word_alterations = word_alterations diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/operations/__init__.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/operations/__init__.py index 4302a4938a28..712a6199a8da 100644 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/operations/__init__.py +++ b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/operations/__init__.py @@ -9,14 +9,8 @@ # regenerated. # -------------------------------------------------------------------------- -from .endpoint_keys_operations import EndpointKeysOperations -from .alterations_operations import AlterationsOperations -from .knowledgebase_operations import KnowledgebaseOperations -from .operations import Operations +from ._runtime_operations import RuntimeOperations __all__ = [ - 'EndpointKeysOperations', - 'AlterationsOperations', - 'KnowledgebaseOperations', - 'Operations', + 'RuntimeOperations', ] diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/operations/_alterations_operations.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/operations/_alterations_operations.py new file mode 100644 index 000000000000..746b60fa0fba --- /dev/null +++ b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/operations/_alterations_operations.py @@ -0,0 +1,136 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class AlterationsOperations(object): + """AlterationsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + + self.config = config + + def get( + self, custom_headers=None, raw=False, **operation_config): + """Download alterations from runtime. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WordAlterationsDTO or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.knowledge.qnamaker.models.WordAlterationsDTO + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WordAlterationsDTO', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/alterations'} + + def replace( + self, word_alterations, custom_headers=None, raw=False, **operation_config): + """Replace alterations data. + + :param word_alterations: Collection of word alterations. + :type word_alterations: + list[~azure.cognitiveservices.knowledge.qnamaker.models.AlterationsDTO] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + word_alterations1 = models.WordAlterationsDTO(word_alterations=word_alterations) + + # Construct URL + url = self.replace.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(word_alterations1, 'WordAlterationsDTO') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + replace.metadata = {'url': '/alterations'} diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/operations/_endpoint_keys_operations.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/operations/_endpoint_keys_operations.py new file mode 100644 index 000000000000..f4a81d641161 --- /dev/null +++ b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/operations/_endpoint_keys_operations.py @@ -0,0 +1,139 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class EndpointKeysOperations(object): + """EndpointKeysOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + + self.config = config + + def get_keys( + self, custom_headers=None, raw=False, **operation_config): + """Gets endpoint keys for an endpoint. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: EndpointKeysDTO or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.knowledge.qnamaker.models.EndpointKeysDTO or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_keys.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('EndpointKeysDTO', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_keys.metadata = {'url': '/endpointkeys'} + + def refresh_keys( + self, key_type, custom_headers=None, raw=False, **operation_config): + """Re-generates an endpoint key. + + :param key_type: Type of Key + :type key_type: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: EndpointKeysDTO or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.knowledge.qnamaker.models.EndpointKeysDTO or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.refresh_keys.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'keyType': self._serialize.url("key_type", key_type, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('EndpointKeysDTO', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + refresh_keys.metadata = {'url': '/endpointkeys/{keyType}'} diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/operations/_endpoint_settings_operations.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/operations/_endpoint_settings_operations.py new file mode 100644 index 000000000000..ac76218ced6d --- /dev/null +++ b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/operations/_endpoint_settings_operations.py @@ -0,0 +1,143 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class EndpointSettingsOperations(object): + """EndpointSettingsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + + self.config = config + + def get_settings( + self, custom_headers=None, raw=False, **operation_config): + """Gets endpoint settings for an endpoint. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: EndpointSettingsDTO or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.knowledge.qnamaker.models.EndpointSettingsDTO + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_settings.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('EndpointSettingsDTO', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_settings.metadata = {'url': '/endpointSettings'} + + def update_settings( + self, active_learning=None, custom_headers=None, raw=False, **operation_config): + """Updates endpoint settings for an endpoint. + + :param active_learning: Active Learning settings of the endpoint. + :type active_learning: + ~azure.cognitiveservices.knowledge.qnamaker.models.EndpointSettingsDTOActiveLearning + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + endpoint_settings_payload = models.EndpointSettingsDTO(active_learning=active_learning) + + # Construct URL + url = self.update_settings.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(endpoint_settings_payload, 'EndpointSettingsDTO') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_settings.metadata = {'url': '/endpointSettings'} diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/operations/_knowledgebase_operations.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/operations/_knowledgebase_operations.py new file mode 100644 index 000000000000..d993687140fb --- /dev/null +++ b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/operations/_knowledgebase_operations.py @@ -0,0 +1,461 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class KnowledgebaseOperations(object): + """KnowledgebaseOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + + self.config = config + + def list_all( + self, custom_headers=None, raw=False, **operation_config): + """Gets all knowledgebases for a user. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: KnowledgebasesDTO or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.knowledge.qnamaker.models.KnowledgebasesDTO + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_all.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('KnowledgebasesDTO', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_all.metadata = {'url': '/knowledgebases'} + + def get_details( + self, kb_id, custom_headers=None, raw=False, **operation_config): + """Gets details of a specific knowledgebase. + + :param kb_id: Knowledgebase id. + :type kb_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: KnowledgebaseDTO or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.knowledge.qnamaker.models.KnowledgebaseDTO or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_details.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'kbId': self._serialize.url("kb_id", kb_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('KnowledgebaseDTO', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_details.metadata = {'url': '/knowledgebases/{kbId}'} + + def delete( + self, kb_id, custom_headers=None, raw=False, **operation_config): + """Deletes the knowledgebase and all its data. + + :param kb_id: Knowledgebase id. + :type kb_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'kbId': self._serialize.url("kb_id", kb_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/knowledgebases/{kbId}'} + + def publish( + self, kb_id, custom_headers=None, raw=False, **operation_config): + """Publishes all changes in test index of a knowledgebase to its prod + index. + + :param kb_id: Knowledgebase id. + :type kb_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.publish.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'kbId': self._serialize.url("kb_id", kb_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + publish.metadata = {'url': '/knowledgebases/{kbId}'} + + def replace( + self, kb_id, qn_alist, custom_headers=None, raw=False, **operation_config): + """Replace knowledgebase contents. + + :param kb_id: Knowledgebase id. + :type kb_id: str + :param qn_alist: List of Q-A (QnADTO) to be added to the + knowledgebase. Q-A Ids are assigned by the service and should be + omitted. + :type qn_alist: + list[~azure.cognitiveservices.knowledge.qnamaker.models.QnADTO] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + replace_kb = models.ReplaceKbDTO(qn_alist=qn_alist) + + # Construct URL + url = self.replace.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'kbId': self._serialize.url("kb_id", kb_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(replace_kb, 'ReplaceKbDTO') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + replace.metadata = {'url': '/knowledgebases/{kbId}'} + + def update( + self, kb_id, update_kb, custom_headers=None, raw=False, **operation_config): + """Asynchronous operation to modify a knowledgebase. + + :param kb_id: Knowledgebase id. + :type kb_id: str + :param update_kb: Post body of the request. + :type update_kb: + ~azure.cognitiveservices.knowledge.qnamaker.models.UpdateKbOperationDTO + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Operation or ClientRawResponse if raw=true + :rtype: ~azure.cognitiveservices.knowledge.qnamaker.models.Operation + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'kbId': self._serialize.url("kb_id", kb_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(update_kb, 'UpdateKbOperationDTO') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 202: + deserialized = self._deserialize('Operation', response) + header_dict = { + 'Location': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + update.metadata = {'url': '/knowledgebases/{kbId}'} + + def create( + self, create_kb_payload, custom_headers=None, raw=False, **operation_config): + """Asynchronous operation to create a new knowledgebase. + + :param create_kb_payload: Post body of the request. + :type create_kb_payload: + ~azure.cognitiveservices.knowledge.qnamaker.models.CreateKbDTO + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Operation or ClientRawResponse if raw=true + :rtype: ~azure.cognitiveservices.knowledge.qnamaker.models.Operation + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(create_kb_payload, 'CreateKbDTO') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 202: + deserialized = self._deserialize('Operation', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create.metadata = {'url': '/knowledgebases/create'} + + def download( + self, kb_id, environment, custom_headers=None, raw=False, **operation_config): + """Download the knowledgebase. + + :param kb_id: Knowledgebase id. + :type kb_id: str + :param environment: Specifies whether environment is Test or Prod. + Possible values include: 'Prod', 'Test' + :type environment: str or + ~azure.cognitiveservices.knowledge.qnamaker.models.EnvironmentType + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: QnADocumentsDTO or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.knowledge.qnamaker.models.QnADocumentsDTO or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.download.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'kbId': self._serialize.url("kb_id", kb_id, 'str'), + 'environment': self._serialize.url("environment", environment, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('QnADocumentsDTO', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + download.metadata = {'url': '/knowledgebases/{kbId}/{environment}/qna'} diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/operations/_operations.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/operations/_operations.py new file mode 100644 index 000000000000..7de5bac1fd48 --- /dev/null +++ b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/operations/_operations.py @@ -0,0 +1,93 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class Operations(object): + """Operations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + + self.config = config + + def get_details( + self, operation_id, custom_headers=None, raw=False, **operation_config): + """Gets details of a specific long running operation. + + :param operation_id: Operation id. + :type operation_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Operation or ClientRawResponse if raw=true + :rtype: ~azure.cognitiveservices.knowledge.qnamaker.models.Operation + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_details.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'operationId': self._serialize.url("operation_id", operation_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Operation', response) + header_dict = { + 'RetryAfter': 'int', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get_details.metadata = {'url': '/operations/{operationId}'} diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/operations/_runtime_operations.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/operations/_runtime_operations.py new file mode 100644 index 000000000000..0dc3448da41a --- /dev/null +++ b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/operations/_runtime_operations.py @@ -0,0 +1,149 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class RuntimeOperations(object): + """RuntimeOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + + self.config = config + + def generate_answer( + self, kb_id, generate_answer_payload, custom_headers=None, raw=False, **operation_config): + """GenerateAnswer call to query the knowledgebase. + + :param kb_id: Knowledgebase id. + :type kb_id: str + :param generate_answer_payload: Post body of the request. + :type generate_answer_payload: + ~azure.cognitiveservices.knowledge.qnamaker.models.QueryDTO + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: QnASearchResultList or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.knowledge.qnamaker.models.QnASearchResultList + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.generate_answer.metadata['url'] + path_format_arguments = { + 'RuntimeEndpoint': self._serialize.url("self.config.runtime_endpoint", self.config.runtime_endpoint, 'str', skip_quote=True), + 'kbId': self._serialize.url("kb_id", kb_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(generate_answer_payload, 'QueryDTO') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('QnASearchResultList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + generate_answer.metadata = {'url': '/knowledgebases/{kbId}/generateAnswer'} + + def train( + self, kb_id, feedback_records=None, custom_headers=None, raw=False, **operation_config): + """Train call to add suggestions to the knowledgebase. + + :param kb_id: Knowledgebase id. + :type kb_id: str + :param feedback_records: List of feedback records. + :type feedback_records: + list[~azure.cognitiveservices.knowledge.qnamaker.models.FeedbackRecordDTO] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + train_payload = models.FeedbackRecordsDTO(feedback_records=feedback_records) + + # Construct URL + url = self.train.metadata['url'] + path_format_arguments = { + 'RuntimeEndpoint': self._serialize.url("self.config.runtime_endpoint", self.config.runtime_endpoint, 'str', skip_quote=True), + 'kbId': self._serialize.url("kb_id", kb_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(train_payload, 'FeedbackRecordsDTO') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + train.metadata = {'url': '/knowledgebases/{kbId}/train'} diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/operations/alterations_operations.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/operations/alterations_operations.py deleted file mode 100644 index 66b7a53e27c2..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/operations/alterations_operations.py +++ /dev/null @@ -1,135 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class AlterationsOperations(object): - """AlterationsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - - self.config = config - - def get( - self, custom_headers=None, raw=False, **operation_config): - """Download alterations from runtime. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WordAlterationsDTO or ClientRawResponse if raw=true - :rtype: - ~azure.cognitiveservices.knowledge.qnamaker.models.WordAlterationsDTO - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if custom_headers: - header_parameters.update(custom_headers) - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WordAlterationsDTO', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/alterations'} - - def replace( - self, word_alterations, custom_headers=None, raw=False, **operation_config): - """Replace alterations data. - - :param word_alterations: Collection of word alterations. - :type word_alterations: - list[~azure.cognitiveservices.knowledge.qnamaker.models.AlterationsDTO] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - word_alterations1 = models.WordAlterationsDTO(word_alterations=word_alterations) - - # Construct URL - url = self.replace.metadata['url'] - path_format_arguments = { - 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if custom_headers: - header_parameters.update(custom_headers) - - # Construct body - body_content = self._serialize.body(word_alterations1, 'WordAlterationsDTO') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - replace.metadata = {'url': '/alterations'} diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/operations/endpoint_keys_operations.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/operations/endpoint_keys_operations.py deleted file mode 100644 index 0112cd1b9cd2..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/operations/endpoint_keys_operations.py +++ /dev/null @@ -1,139 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class EndpointKeysOperations(object): - """EndpointKeysOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - - self.config = config - - def get_keys( - self, custom_headers=None, raw=False, **operation_config): - """Gets endpoint keys for an endpoint. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: EndpointKeysDTO or ClientRawResponse if raw=true - :rtype: - ~azure.cognitiveservices.knowledge.qnamaker.models.EndpointKeysDTO or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_keys.metadata['url'] - path_format_arguments = { - 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if custom_headers: - header_parameters.update(custom_headers) - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('EndpointKeysDTO', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_keys.metadata = {'url': '/endpointkeys'} - - def refresh_keys( - self, key_type, custom_headers=None, raw=False, **operation_config): - """Re-generates an endpoint key. - - :param key_type: Type of Key - :type key_type: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: EndpointKeysDTO or ClientRawResponse if raw=true - :rtype: - ~azure.cognitiveservices.knowledge.qnamaker.models.EndpointKeysDTO or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.refresh_keys.metadata['url'] - path_format_arguments = { - 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), - 'keyType': self._serialize.url("key_type", key_type, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if custom_headers: - header_parameters.update(custom_headers) - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('EndpointKeysDTO', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - refresh_keys.metadata = {'url': '/endpointkeys/{keyType}'} diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/operations/knowledgebase_operations.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/operations/knowledgebase_operations.py deleted file mode 100644 index 50b3ee460c40..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/operations/knowledgebase_operations.py +++ /dev/null @@ -1,464 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class KnowledgebaseOperations(object): - """KnowledgebaseOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - - self.config = config - - def list_all( - self, custom_headers=None, raw=False, **operation_config): - """Gets all knowledgebases for a user. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: KnowledgebasesDTO or ClientRawResponse if raw=true - :rtype: - ~azure.cognitiveservices.knowledge.qnamaker.models.KnowledgebasesDTO - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.list_all.metadata['url'] - path_format_arguments = { - 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if custom_headers: - header_parameters.update(custom_headers) - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('KnowledgebasesDTO', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_all.metadata = {'url': '/knowledgebases'} - - def get_details( - self, kb_id, custom_headers=None, raw=False, **operation_config): - """Gets details of a specific knowledgebase. - - :param kb_id: Knowledgebase id. - :type kb_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: KnowledgebaseDTO or ClientRawResponse if raw=true - :rtype: - ~azure.cognitiveservices.knowledge.qnamaker.models.KnowledgebaseDTO or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_details.metadata['url'] - path_format_arguments = { - 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), - 'kbId': self._serialize.url("kb_id", kb_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if custom_headers: - header_parameters.update(custom_headers) - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('KnowledgebaseDTO', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_details.metadata = {'url': '/knowledgebases/{kbId}'} - - def delete( - self, kb_id, custom_headers=None, raw=False, **operation_config): - """Deletes the knowledgebase and all its data. - - :param kb_id: Knowledgebase id. - :type kb_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), - 'kbId': self._serialize.url("kb_id", kb_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - - # Construct headers - header_parameters = {} - if custom_headers: - header_parameters.update(custom_headers) - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/knowledgebases/{kbId}'} - - def publish( - self, kb_id, custom_headers=None, raw=False, **operation_config): - """Publishes all changes in test index of a knowledgebase to its prod - index. - - :param kb_id: Knowledgebase id. - :type kb_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.publish.metadata['url'] - path_format_arguments = { - 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), - 'kbId': self._serialize.url("kb_id", kb_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - - # Construct headers - header_parameters = {} - if custom_headers: - header_parameters.update(custom_headers) - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - publish.metadata = {'url': '/knowledgebases/{kbId}'} - - def replace( - self, kb_id, qn_alist, custom_headers=None, raw=False, **operation_config): - """Replace knowledgebase contents. - - :param kb_id: Knowledgebase id. - :type kb_id: str - :param qn_alist: List of Q-A (QnADTO) to be added to the - knowledgebase. Q-A Ids are assigned by the service and should be - omitted. - :type qn_alist: - list[~azure.cognitiveservices.knowledge.qnamaker.models.QnADTO] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - replace_kb = models.ReplaceKbDTO(qn_alist=qn_alist) - - # Construct URL - url = self.replace.metadata['url'] - path_format_arguments = { - 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), - 'kbId': self._serialize.url("kb_id", kb_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if custom_headers: - header_parameters.update(custom_headers) - - # Construct body - body_content = self._serialize.body(replace_kb, 'ReplaceKbDTO') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - replace.metadata = {'url': '/knowledgebases/{kbId}'} - - def update( - self, kb_id, update_kb, custom_headers=None, raw=False, **operation_config): - """Asynchronous operation to modify a knowledgebase. - - :param kb_id: Knowledgebase id. - :type kb_id: str - :param update_kb: Post body of the request. - :type update_kb: - ~azure.cognitiveservices.knowledge.qnamaker.models.UpdateKbOperationDTO - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Operation or ClientRawResponse if raw=true - :rtype: ~azure.cognitiveservices.knowledge.qnamaker.models.Operation - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), - 'kbId': self._serialize.url("kb_id", kb_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if custom_headers: - header_parameters.update(custom_headers) - - # Construct body - body_content = self._serialize.body(update_kb, 'UpdateKbOperationDTO') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 202: - deserialized = self._deserialize('Operation', response) - header_dict = { - 'Location': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - update.metadata = {'url': '/knowledgebases/{kbId}'} - - def create( - self, create_kb_payload, custom_headers=None, raw=False, **operation_config): - """Asynchronous operation to create a new knowledgebase. - - :param create_kb_payload: Post body of the request. - :type create_kb_payload: - ~azure.cognitiveservices.knowledge.qnamaker.models.CreateKbDTO - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Operation or ClientRawResponse if raw=true - :rtype: ~azure.cognitiveservices.knowledge.qnamaker.models.Operation - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.create.metadata['url'] - path_format_arguments = { - 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if custom_headers: - header_parameters.update(custom_headers) - - # Construct body - body_content = self._serialize.body(create_kb_payload, 'CreateKbDTO') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 202: - deserialized = self._deserialize('Operation', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create.metadata = {'url': '/knowledgebases/create'} - - def download( - self, kb_id, environment, custom_headers=None, raw=False, **operation_config): - """Download the knowledgebase. - - :param kb_id: Knowledgebase id. - :type kb_id: str - :param environment: Specifies whether environment is Test or Prod. - Possible values include: 'Prod', 'Test' - :type environment: str or - ~azure.cognitiveservices.knowledge.qnamaker.models.EnvironmentType - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: QnADocumentsDTO or ClientRawResponse if raw=true - :rtype: - ~azure.cognitiveservices.knowledge.qnamaker.models.QnADocumentsDTO or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.download.metadata['url'] - path_format_arguments = { - 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), - 'kbId': self._serialize.url("kb_id", kb_id, 'str'), - 'environment': self._serialize.url("environment", environment, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if custom_headers: - header_parameters.update(custom_headers) - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('QnADocumentsDTO', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - download.metadata = {'url': '/knowledgebases/{kbId}/{environment}/qna'} diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/operations/operations.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/operations/operations.py deleted file mode 100644 index 7fc2c8c360dc..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/operations/operations.py +++ /dev/null @@ -1,92 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class Operations(object): - """Operations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - - self.config = config - - def get_details( - self, operation_id, custom_headers=None, raw=False, **operation_config): - """Gets details of a specific long running operation. - - :param operation_id: Operation id. - :type operation_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Operation or ClientRawResponse if raw=true - :rtype: ~azure.cognitiveservices.knowledge.qnamaker.models.Operation - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_details.metadata['url'] - path_format_arguments = { - 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), - 'operationId': self._serialize.url("operation_id", operation_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if custom_headers: - header_parameters.update(custom_headers) - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('Operation', response) - header_dict = { - 'RetryAfter': 'int', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get_details.metadata = {'url': '/operations/{operationId}'} diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/qn_amaker_client.py b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/qn_amaker_client.py deleted file mode 100644 index aef5f6b21336..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/qn_amaker_client.py +++ /dev/null @@ -1,93 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Configuration, Serializer, Deserializer -from .version import VERSION -from .operations.endpoint_keys_operations import EndpointKeysOperations -from .operations.alterations_operations import AlterationsOperations -from .operations.knowledgebase_operations import KnowledgebaseOperations -from .operations.operations import Operations -from . import models - - -class QnAMakerClientConfiguration(Configuration): - """Configuration for QnAMakerClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param endpoint: Supported Cognitive Services endpoints (protocol and - hostname, for example: https://westus.api.cognitive.microsoft.com). - :type endpoint: str - :param credentials: Subscription credentials which uniquely identify - client subscription. - :type credentials: None - """ - - def __init__( - self, endpoint, credentials): - - if endpoint is None: - raise ValueError("Parameter 'endpoint' must not be None.") - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - base_url = '{Endpoint}/qnamaker/v4.0' - - super(QnAMakerClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-cognitiveservices-knowledge-qnamaker/{}'.format(VERSION)) - - self.endpoint = endpoint - self.credentials = credentials - - -class QnAMakerClient(SDKClient): - """An API for QnAMaker Service - - :ivar config: Configuration for client. - :vartype config: QnAMakerClientConfiguration - - :ivar endpoint_keys: EndpointKeys operations - :vartype endpoint_keys: azure.cognitiveservices.knowledge.qnamaker.operations.EndpointKeysOperations - :ivar alterations: Alterations operations - :vartype alterations: azure.cognitiveservices.knowledge.qnamaker.operations.AlterationsOperations - :ivar knowledgebase: Knowledgebase operations - :vartype knowledgebase: azure.cognitiveservices.knowledge.qnamaker.operations.KnowledgebaseOperations - :ivar operations: Operations operations - :vartype operations: azure.cognitiveservices.knowledge.qnamaker.operations.Operations - - :param endpoint: Supported Cognitive Services endpoints (protocol and - hostname, for example: https://westus.api.cognitive.microsoft.com). - :type endpoint: str - :param credentials: Subscription credentials which uniquely identify - client subscription. - :type credentials: None - """ - - def __init__( - self, endpoint, credentials): - - self.config = QnAMakerClientConfiguration(endpoint, credentials) - super(QnAMakerClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '4.0' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.endpoint_keys = EndpointKeysOperations( - self._client, self.config, self._serialize, self._deserialize) - self.alterations = AlterationsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.knowledgebase = KnowledgebaseOperations( - self._client, self.config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models.py index 96dc4655ae34..12291b05dde4 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models.py @@ -801,7 +801,7 @@ class DedicatedHostGroup(Resource): host group. :vartype hosts: list[~azure.mgmt.compute.v2019_03_01.models.SubResourceReadOnly] - :param zones: Availability Zone to use for this host group � only single + :param zones: Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone. @@ -853,7 +853,7 @@ class DedicatedHostGroupUpdate(UpdateResource): host group. :vartype hosts: list[~azure.mgmt.compute.v2019_03_01.models.SubResourceReadOnly] - :param zones: Availability Zone to use for this host group � only single + :param zones: Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models_py3.py index 8a6625117983..f7d01ae1d2d7 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models_py3.py @@ -801,7 +801,7 @@ class DedicatedHostGroup(Resource): host group. :vartype hosts: list[~azure.mgmt.compute.v2019_03_01.models.SubResourceReadOnly] - :param zones: Availability Zone to use for this host group � only single + :param zones: Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone. @@ -853,7 +853,7 @@ class DedicatedHostGroupUpdate(UpdateResource): host group. :vartype hosts: list[~azure.mgmt.compute.v2019_03_01.models.SubResourceReadOnly] - :param zones: Availability Zone to use for this host group � only single + :param zones: Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone. diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/__init__.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/__init__.py index 184b8ddbd0f6..5e2a225f4cbe 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/__init__.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .consumption_management_client import ConsumptionManagementClient -from .version import VERSION +from ._configuration import ConsumptionManagementClientConfiguration +from ._consumption_management_client import ConsumptionManagementClient +__all__ = ['ConsumptionManagementClient', 'ConsumptionManagementClientConfiguration'] -__all__ = ['ConsumptionManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_configuration.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_configuration.py new file mode 100644 index 000000000000..eb9e99e2d39a --- /dev/null +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_configuration.py @@ -0,0 +1,48 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class ConsumptionManagementClientConfiguration(AzureConfiguration): + """Configuration for ConsumptionManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure Subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(ConsumptionManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-consumption/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_consumption_management_client.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_consumption_management_client.py new file mode 100644 index 000000000000..999644e0cefd --- /dev/null +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_consumption_management_client.py @@ -0,0 +1,109 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import ConsumptionManagementClientConfiguration +from .operations import UsageDetailsOperations +from .operations import MarketplacesOperations +from .operations import BudgetsOperations +from .operations import TagsOperations +from .operations import ChargesOperations +from .operations import BalancesOperations +from .operations import ReservationsSummariesOperations +from .operations import ReservationsDetailsOperations +from .operations import ReservationRecommendationsOperations +from .operations import PriceSheetOperations +from .operations import ForecastsOperations +from .operations import Operations +from .operations import AggregatedCostOperations +from . import models + + +class ConsumptionManagementClient(SDKClient): + """Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions. + + :ivar config: Configuration for client. + :vartype config: ConsumptionManagementClientConfiguration + + :ivar usage_details: UsageDetails operations + :vartype usage_details: azure.mgmt.consumption.operations.UsageDetailsOperations + :ivar marketplaces: Marketplaces operations + :vartype marketplaces: azure.mgmt.consumption.operations.MarketplacesOperations + :ivar budgets: Budgets operations + :vartype budgets: azure.mgmt.consumption.operations.BudgetsOperations + :ivar tags: Tags operations + :vartype tags: azure.mgmt.consumption.operations.TagsOperations + :ivar charges: Charges operations + :vartype charges: azure.mgmt.consumption.operations.ChargesOperations + :ivar balances: Balances operations + :vartype balances: azure.mgmt.consumption.operations.BalancesOperations + :ivar reservations_summaries: ReservationsSummaries operations + :vartype reservations_summaries: azure.mgmt.consumption.operations.ReservationsSummariesOperations + :ivar reservations_details: ReservationsDetails operations + :vartype reservations_details: azure.mgmt.consumption.operations.ReservationsDetailsOperations + :ivar reservation_recommendations: ReservationRecommendations operations + :vartype reservation_recommendations: azure.mgmt.consumption.operations.ReservationRecommendationsOperations + :ivar price_sheet: PriceSheet operations + :vartype price_sheet: azure.mgmt.consumption.operations.PriceSheetOperations + :ivar forecasts: Forecasts operations + :vartype forecasts: azure.mgmt.consumption.operations.ForecastsOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.consumption.operations.Operations + :ivar aggregated_cost: AggregatedCost operations + :vartype aggregated_cost: azure.mgmt.consumption.operations.AggregatedCostOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure Subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = ConsumptionManagementClientConfiguration(credentials, subscription_id, base_url) + super(ConsumptionManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2019-05-01-preview' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.usage_details = UsageDetailsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.marketplaces = MarketplacesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.budgets = BudgetsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.tags = TagsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.charges = ChargesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.balances = BalancesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.reservations_summaries = ReservationsSummariesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.reservations_details = ReservationsDetailsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.reservation_recommendations = ReservationRecommendationsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.price_sheet = PriceSheetOperations( + self._client, self.config, self._serialize, self._deserialize) + self.forecasts = ForecastsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.aggregated_cost = AggregatedCostOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/consumption_management_client.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/consumption_management_client.py deleted file mode 100644 index b3a48986494c..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/consumption_management_client.py +++ /dev/null @@ -1,141 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.usage_details_operations import UsageDetailsOperations -from .operations.marketplaces_operations import MarketplacesOperations -from .operations.budgets_operations import BudgetsOperations -from .operations.tags_operations import TagsOperations -from .operations.charges_operations import ChargesOperations -from .operations.balances_operations import BalancesOperations -from .operations.reservations_summaries_operations import ReservationsSummariesOperations -from .operations.reservations_details_operations import ReservationsDetailsOperations -from .operations.reservation_recommendations_operations import ReservationRecommendationsOperations -from .operations.price_sheet_operations import PriceSheetOperations -from .operations.forecasts_operations import ForecastsOperations -from .operations.operations import Operations -from .operations.aggregated_cost_operations import AggregatedCostOperations -from . import models - - -class ConsumptionManagementClientConfiguration(AzureConfiguration): - """Configuration for ConsumptionManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure Subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ConsumptionManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-consumption/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class ConsumptionManagementClient(SDKClient): - """Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions. - - :ivar config: Configuration for client. - :vartype config: ConsumptionManagementClientConfiguration - - :ivar usage_details: UsageDetails operations - :vartype usage_details: azure.mgmt.consumption.operations.UsageDetailsOperations - :ivar marketplaces: Marketplaces operations - :vartype marketplaces: azure.mgmt.consumption.operations.MarketplacesOperations - :ivar budgets: Budgets operations - :vartype budgets: azure.mgmt.consumption.operations.BudgetsOperations - :ivar tags: Tags operations - :vartype tags: azure.mgmt.consumption.operations.TagsOperations - :ivar charges: Charges operations - :vartype charges: azure.mgmt.consumption.operations.ChargesOperations - :ivar balances: Balances operations - :vartype balances: azure.mgmt.consumption.operations.BalancesOperations - :ivar reservations_summaries: ReservationsSummaries operations - :vartype reservations_summaries: azure.mgmt.consumption.operations.ReservationsSummariesOperations - :ivar reservations_details: ReservationsDetails operations - :vartype reservations_details: azure.mgmt.consumption.operations.ReservationsDetailsOperations - :ivar reservation_recommendations: ReservationRecommendations operations - :vartype reservation_recommendations: azure.mgmt.consumption.operations.ReservationRecommendationsOperations - :ivar price_sheet: PriceSheet operations - :vartype price_sheet: azure.mgmt.consumption.operations.PriceSheetOperations - :ivar forecasts: Forecasts operations - :vartype forecasts: azure.mgmt.consumption.operations.ForecastsOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.consumption.operations.Operations - :ivar aggregated_cost: AggregatedCost operations - :vartype aggregated_cost: azure.mgmt.consumption.operations.AggregatedCostOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure Subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = ConsumptionManagementClientConfiguration(credentials, subscription_id, base_url) - super(ConsumptionManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2019-04-01-preview' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.usage_details = UsageDetailsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.marketplaces = MarketplacesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.budgets = BudgetsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.tags = TagsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.charges = ChargesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.balances = BalancesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.reservations_summaries = ReservationsSummariesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.reservations_details = ReservationsDetailsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.reservation_recommendations = ReservationRecommendationsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.price_sheet = PriceSheetOperations( - self._client, self.config, self._serialize, self._deserialize) - self.forecasts = ForecastsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.aggregated_cost = AggregatedCostOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/__init__.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/__init__.py index b9815d6ee2d5..a4d4f0fdbd22 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/__init__.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/__init__.py @@ -10,80 +10,80 @@ # -------------------------------------------------------------------------- try: - from .meter_details_py3 import MeterDetails - from .meter_details_response_py3 import MeterDetailsResponse - from .usage_detail_py3 import UsageDetail - from .usage_details_download_response_py3 import UsageDetailsDownloadResponse - from .marketplace_py3 import Marketplace - from .balance_properties_new_purchases_details_item_py3 import BalancePropertiesNewPurchasesDetailsItem - from .balance_properties_adjustment_details_item_py3 import BalancePropertiesAdjustmentDetailsItem - from .balance_py3 import Balance - from .reservation_summary_py3 import ReservationSummary - from .reservation_detail_py3 import ReservationDetail - from .reservation_recommendation_py3 import ReservationRecommendation - from .tag_py3 import Tag - from .tags_result_py3 import TagsResult - from .budget_time_period_py3 import BudgetTimePeriod - from .filters_py3 import Filters - from .current_spend_py3 import CurrentSpend - from .notification_py3 import Notification - from .budget_py3 import Budget - from .price_sheet_properties_py3 import PriceSheetProperties - from .price_sheet_result_py3 import PriceSheetResult - from .forecast_properties_confidence_levels_item_py3 import ForecastPropertiesConfidenceLevelsItem - from .forecast_py3 import Forecast - from .management_group_aggregated_cost_result_py3 import ManagementGroupAggregatedCostResult - from .charge_summary_py3 import ChargeSummary - from .charges_list_result_py3 import ChargesListResult - from .error_details_py3 import ErrorDetails - from .error_response_py3 import ErrorResponse, ErrorResponseException - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .resource_py3 import Resource - from .resource_attributes_py3 import ResourceAttributes - from .proxy_resource_py3 import ProxyResource + from ._models_py3 import Balance + from ._models_py3 import BalancePropertiesAdjustmentDetailsItem + from ._models_py3 import BalancePropertiesNewPurchasesDetailsItem + from ._models_py3 import Budget + from ._models_py3 import BudgetTimePeriod + from ._models_py3 import ChargesListResult + from ._models_py3 import ChargeSummary + from ._models_py3 import CurrentSpend + from ._models_py3 import ErrorDetails + from ._models_py3 import ErrorResponse, ErrorResponseException + from ._models_py3 import Filters + from ._models_py3 import Forecast + from ._models_py3 import ForecastPropertiesConfidenceLevelsItem + from ._models_py3 import ManagementGroupAggregatedCostResult + from ._models_py3 import Marketplace + from ._models_py3 import MeterDetails + from ._models_py3 import MeterDetailsResponse + from ._models_py3 import Notification + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import PriceSheetProperties + from ._models_py3 import PriceSheetResult + from ._models_py3 import ProxyResource + from ._models_py3 import ReservationDetail + from ._models_py3 import ReservationRecommendation + from ._models_py3 import ReservationSummary + from ._models_py3 import Resource + from ._models_py3 import ResourceAttributes + from ._models_py3 import Tag + from ._models_py3 import TagsResult + from ._models_py3 import UsageDetail + from ._models_py3 import UsageDetailsDownloadResponse except (SyntaxError, ImportError): - from .meter_details import MeterDetails - from .meter_details_response import MeterDetailsResponse - from .usage_detail import UsageDetail - from .usage_details_download_response import UsageDetailsDownloadResponse - from .marketplace import Marketplace - from .balance_properties_new_purchases_details_item import BalancePropertiesNewPurchasesDetailsItem - from .balance_properties_adjustment_details_item import BalancePropertiesAdjustmentDetailsItem - from .balance import Balance - from .reservation_summary import ReservationSummary - from .reservation_detail import ReservationDetail - from .reservation_recommendation import ReservationRecommendation - from .tag import Tag - from .tags_result import TagsResult - from .budget_time_period import BudgetTimePeriod - from .filters import Filters - from .current_spend import CurrentSpend - from .notification import Notification - from .budget import Budget - from .price_sheet_properties import PriceSheetProperties - from .price_sheet_result import PriceSheetResult - from .forecast_properties_confidence_levels_item import ForecastPropertiesConfidenceLevelsItem - from .forecast import Forecast - from .management_group_aggregated_cost_result import ManagementGroupAggregatedCostResult - from .charge_summary import ChargeSummary - from .charges_list_result import ChargesListResult - from .error_details import ErrorDetails - from .error_response import ErrorResponse, ErrorResponseException - from .operation_display import OperationDisplay - from .operation import Operation - from .resource import Resource - from .resource_attributes import ResourceAttributes - from .proxy_resource import ProxyResource -from .usage_detail_paged import UsageDetailPaged -from .marketplace_paged import MarketplacePaged -from .budget_paged import BudgetPaged -from .reservation_summary_paged import ReservationSummaryPaged -from .reservation_detail_paged import ReservationDetailPaged -from .reservation_recommendation_paged import ReservationRecommendationPaged -from .forecast_paged import ForecastPaged -from .operation_paged import OperationPaged -from .consumption_management_client_enums import ( + from ._models import Balance + from ._models import BalancePropertiesAdjustmentDetailsItem + from ._models import BalancePropertiesNewPurchasesDetailsItem + from ._models import Budget + from ._models import BudgetTimePeriod + from ._models import ChargesListResult + from ._models import ChargeSummary + from ._models import CurrentSpend + from ._models import ErrorDetails + from ._models import ErrorResponse, ErrorResponseException + from ._models import Filters + from ._models import Forecast + from ._models import ForecastPropertiesConfidenceLevelsItem + from ._models import ManagementGroupAggregatedCostResult + from ._models import Marketplace + from ._models import MeterDetails + from ._models import MeterDetailsResponse + from ._models import Notification + from ._models import Operation + from ._models import OperationDisplay + from ._models import PriceSheetProperties + from ._models import PriceSheetResult + from ._models import ProxyResource + from ._models import ReservationDetail + from ._models import ReservationRecommendation + from ._models import ReservationSummary + from ._models import Resource + from ._models import ResourceAttributes + from ._models import Tag + from ._models import TagsResult + from ._models import UsageDetail + from ._models import UsageDetailsDownloadResponse +from ._paged_models import BudgetPaged +from ._paged_models import ForecastPaged +from ._paged_models import MarketplacePaged +from ._paged_models import OperationPaged +from ._paged_models import ReservationDetailPaged +from ._paged_models import ReservationRecommendationPaged +from ._paged_models import ReservationSummaryPaged +from ._paged_models import UsageDetailPaged +from ._consumption_management_client_enums import ( BillingFrequency, CategoryType, TimeGrainType, @@ -96,38 +96,38 @@ ) __all__ = [ - 'MeterDetails', - 'MeterDetailsResponse', - 'UsageDetail', - 'UsageDetailsDownloadResponse', - 'Marketplace', - 'BalancePropertiesNewPurchasesDetailsItem', - 'BalancePropertiesAdjustmentDetailsItem', 'Balance', - 'ReservationSummary', - 'ReservationDetail', - 'ReservationRecommendation', - 'Tag', - 'TagsResult', - 'BudgetTimePeriod', - 'Filters', - 'CurrentSpend', - 'Notification', + 'BalancePropertiesAdjustmentDetailsItem', + 'BalancePropertiesNewPurchasesDetailsItem', 'Budget', - 'PriceSheetProperties', - 'PriceSheetResult', - 'ForecastPropertiesConfidenceLevelsItem', - 'Forecast', - 'ManagementGroupAggregatedCostResult', - 'ChargeSummary', + 'BudgetTimePeriod', 'ChargesListResult', + 'ChargeSummary', + 'CurrentSpend', 'ErrorDetails', 'ErrorResponse', 'ErrorResponseException', - 'OperationDisplay', + 'Filters', + 'Forecast', + 'ForecastPropertiesConfidenceLevelsItem', + 'ManagementGroupAggregatedCostResult', + 'Marketplace', + 'MeterDetails', + 'MeterDetailsResponse', + 'Notification', 'Operation', + 'OperationDisplay', + 'PriceSheetProperties', + 'PriceSheetResult', + 'ProxyResource', + 'ReservationDetail', + 'ReservationRecommendation', + 'ReservationSummary', 'Resource', 'ResourceAttributes', - 'ProxyResource', + 'Tag', + 'TagsResult', + 'UsageDetail', + 'UsageDetailsDownloadResponse', 'UsageDetailPaged', 'MarketplacePaged', 'BudgetPaged', diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/consumption_management_client_enums.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/_consumption_management_client_enums.py similarity index 100% rename from sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/consumption_management_client_enums.py rename to sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/_consumption_management_client_enums.py diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/_models.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/_models.py new file mode 100644 index 000000000000..6e71da4b787d --- /dev/null +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/_models.py @@ -0,0 +1,1958 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class Resource(Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = None + + +class Balance(Resource): + """A balance resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar currency: The ISO currency in which the meter is charged, for + example, USD. + :vartype currency: str + :ivar beginning_balance: The beginning balance for the billing period. + :vartype beginning_balance: decimal.Decimal + :ivar ending_balance: The ending balance for the billing period (for open + periods this will be updated daily). + :vartype ending_balance: decimal.Decimal + :ivar new_purchases: Total new purchase amount. + :vartype new_purchases: decimal.Decimal + :ivar adjustments: Total adjustment amount. + :vartype adjustments: decimal.Decimal + :ivar utilized: Total Commitment usage. + :vartype utilized: decimal.Decimal + :ivar service_overage: Overage for Azure services. + :vartype service_overage: decimal.Decimal + :ivar charges_billed_separately: Charges Billed separately. + :vartype charges_billed_separately: decimal.Decimal + :ivar total_overage: serviceOverage + chargesBilledSeparately. + :vartype total_overage: decimal.Decimal + :ivar total_usage: Azure service commitment + total Overage. + :vartype total_usage: decimal.Decimal + :ivar azure_marketplace_service_charges: Total charges for Azure + Marketplace. + :vartype azure_marketplace_service_charges: decimal.Decimal + :param billing_frequency: The billing frequency. Possible values include: + 'Month', 'Quarter', 'Year' + :type billing_frequency: str or + ~azure.mgmt.consumption.models.BillingFrequency + :ivar price_hidden: Price is hidden or not. + :vartype price_hidden: bool + :ivar new_purchases_details: List of new purchases. + :vartype new_purchases_details: + list[~azure.mgmt.consumption.models.BalancePropertiesNewPurchasesDetailsItem] + :ivar adjustment_details: List of Adjustments (Promo credit, SIE credit + etc.). + :vartype adjustment_details: + list[~azure.mgmt.consumption.models.BalancePropertiesAdjustmentDetailsItem] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'currency': {'readonly': True}, + 'beginning_balance': {'readonly': True}, + 'ending_balance': {'readonly': True}, + 'new_purchases': {'readonly': True}, + 'adjustments': {'readonly': True}, + 'utilized': {'readonly': True}, + 'service_overage': {'readonly': True}, + 'charges_billed_separately': {'readonly': True}, + 'total_overage': {'readonly': True}, + 'total_usage': {'readonly': True}, + 'azure_marketplace_service_charges': {'readonly': True}, + 'price_hidden': {'readonly': True}, + 'new_purchases_details': {'readonly': True}, + 'adjustment_details': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'currency': {'key': 'properties.currency', 'type': 'str'}, + 'beginning_balance': {'key': 'properties.beginningBalance', 'type': 'decimal'}, + 'ending_balance': {'key': 'properties.endingBalance', 'type': 'decimal'}, + 'new_purchases': {'key': 'properties.newPurchases', 'type': 'decimal'}, + 'adjustments': {'key': 'properties.adjustments', 'type': 'decimal'}, + 'utilized': {'key': 'properties.utilized', 'type': 'decimal'}, + 'service_overage': {'key': 'properties.serviceOverage', 'type': 'decimal'}, + 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'decimal'}, + 'total_overage': {'key': 'properties.totalOverage', 'type': 'decimal'}, + 'total_usage': {'key': 'properties.totalUsage', 'type': 'decimal'}, + 'azure_marketplace_service_charges': {'key': 'properties.azureMarketplaceServiceCharges', 'type': 'decimal'}, + 'billing_frequency': {'key': 'properties.billingFrequency', 'type': 'str'}, + 'price_hidden': {'key': 'properties.priceHidden', 'type': 'bool'}, + 'new_purchases_details': {'key': 'properties.newPurchasesDetails', 'type': '[BalancePropertiesNewPurchasesDetailsItem]'}, + 'adjustment_details': {'key': 'properties.adjustmentDetails', 'type': '[BalancePropertiesAdjustmentDetailsItem]'}, + } + + def __init__(self, **kwargs): + super(Balance, self).__init__(**kwargs) + self.currency = None + self.beginning_balance = None + self.ending_balance = None + self.new_purchases = None + self.adjustments = None + self.utilized = None + self.service_overage = None + self.charges_billed_separately = None + self.total_overage = None + self.total_usage = None + self.azure_marketplace_service_charges = None + self.billing_frequency = kwargs.get('billing_frequency', None) + self.price_hidden = None + self.new_purchases_details = None + self.adjustment_details = None + + +class BalancePropertiesAdjustmentDetailsItem(Model): + """BalancePropertiesAdjustmentDetailsItem. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: the name of new adjustment. + :vartype name: str + :ivar value: the value of new adjustment. + :vartype value: decimal.Decimal + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'decimal'}, + } + + def __init__(self, **kwargs): + super(BalancePropertiesAdjustmentDetailsItem, self).__init__(**kwargs) + self.name = None + self.value = None + + +class BalancePropertiesNewPurchasesDetailsItem(Model): + """BalancePropertiesNewPurchasesDetailsItem. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: the name of new purchase. + :vartype name: str + :ivar value: the value of new purchase. + :vartype value: decimal.Decimal + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'decimal'}, + } + + def __init__(self, **kwargs): + super(BalancePropertiesNewPurchasesDetailsItem, self).__init__(**kwargs) + self.name = None + self.value = None + + +class ProxyResource(Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param e_tag: eTag of the resource. To handle concurrent update scenario, + this field will be used to determine whether the user is updating the + latest version or not. + :type e_tag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProxyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.e_tag = kwargs.get('e_tag', None) + + +class Budget(ProxyResource): + """A budget resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param e_tag: eTag of the resource. To handle concurrent update scenario, + this field will be used to determine whether the user is updating the + latest version or not. + :type e_tag: str + :param category: Required. The category of the budget, whether the budget + tracks cost or usage. Possible values include: 'Cost', 'Usage' + :type category: str or ~azure.mgmt.consumption.models.CategoryType + :param amount: Required. The total amount of cost to track with the budget + :type amount: decimal.Decimal + :param time_grain: Required. The time covered by a budget. Tracking of the + amount will be reset based on the time grain. Possible values include: + 'Monthly', 'Quarterly', 'Annually' + :type time_grain: str or ~azure.mgmt.consumption.models.TimeGrainType + :param time_period: Required. Has start and end date of the budget. The + start date must be first of the month and should be less than the end + date. Budget start date must be on or after June 1, 2017. Future start + date should not be more than three months. Past start date should be + selected within the timegrain period. There are no restrictions on the end + date. + :type time_period: ~azure.mgmt.consumption.models.BudgetTimePeriod + :param filters: May be used to filter budgets by resource group, resource, + or meter. + :type filters: ~azure.mgmt.consumption.models.Filters + :ivar current_spend: The current amount of cost which is being tracked for + a budget. + :vartype current_spend: ~azure.mgmt.consumption.models.CurrentSpend + :param notifications: Dictionary of notifications associated with the + budget. Budget can have up to five notifications. + :type notifications: dict[str, + ~azure.mgmt.consumption.models.Notification] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'category': {'required': True}, + 'amount': {'required': True}, + 'time_grain': {'required': True}, + 'time_period': {'required': True}, + 'current_spend': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'category': {'key': 'properties.category', 'type': 'str'}, + 'amount': {'key': 'properties.amount', 'type': 'decimal'}, + 'time_grain': {'key': 'properties.timeGrain', 'type': 'str'}, + 'time_period': {'key': 'properties.timePeriod', 'type': 'BudgetTimePeriod'}, + 'filters': {'key': 'properties.filters', 'type': 'Filters'}, + 'current_spend': {'key': 'properties.currentSpend', 'type': 'CurrentSpend'}, + 'notifications': {'key': 'properties.notifications', 'type': '{Notification}'}, + } + + def __init__(self, **kwargs): + super(Budget, self).__init__(**kwargs) + self.category = kwargs.get('category', None) + self.amount = kwargs.get('amount', None) + self.time_grain = kwargs.get('time_grain', None) + self.time_period = kwargs.get('time_period', None) + self.filters = kwargs.get('filters', None) + self.current_spend = None + self.notifications = kwargs.get('notifications', None) + + +class BudgetTimePeriod(Model): + """The start and end date for a budget. + + All required parameters must be populated in order to send to Azure. + + :param start_date: Required. The start date for the budget. + :type start_date: datetime + :param end_date: The end date for the budget. If not provided, we default + this to 10 years from the start date. + :type end_date: datetime + """ + + _validation = { + 'start_date': {'required': True}, + } + + _attribute_map = { + 'start_date': {'key': 'startDate', 'type': 'iso-8601'}, + 'end_date': {'key': 'endDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(BudgetTimePeriod, self).__init__(**kwargs) + self.start_date = kwargs.get('start_date', None) + self.end_date = kwargs.get('end_date', None) + + +class ChargesListResult(Model): + """Result of listing charge summary. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The list of charge summary + :vartype value: list[~azure.mgmt.consumption.models.ChargeSummary] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ChargeSummary]'}, + } + + def __init__(self, **kwargs): + super(ChargesListResult, self).__init__(**kwargs) + self.value = None + + +class ChargeSummary(Resource): + """A charge summary resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar billing_period_id: The id of the billing period resource that the + charge belongs to. + :vartype billing_period_id: str + :ivar usage_start: Usage start date. + :vartype usage_start: str + :ivar usage_end: Usage end date. + :vartype usage_end: str + :ivar azure_charges: Azure Charges. + :vartype azure_charges: decimal.Decimal + :ivar charges_billed_separately: Charges Billed separately. + :vartype charges_billed_separately: decimal.Decimal + :ivar marketplace_charges: Marketplace Charges. + :vartype marketplace_charges: decimal.Decimal + :ivar currency: Currency Code + :vartype currency: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'billing_period_id': {'readonly': True}, + 'usage_start': {'readonly': True}, + 'usage_end': {'readonly': True}, + 'azure_charges': {'readonly': True}, + 'charges_billed_separately': {'readonly': True}, + 'marketplace_charges': {'readonly': True}, + 'currency': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, + 'usage_start': {'key': 'properties.usageStart', 'type': 'str'}, + 'usage_end': {'key': 'properties.usageEnd', 'type': 'str'}, + 'azure_charges': {'key': 'properties.azureCharges', 'type': 'decimal'}, + 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'decimal'}, + 'marketplace_charges': {'key': 'properties.marketplaceCharges', 'type': 'decimal'}, + 'currency': {'key': 'properties.currency', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ChargeSummary, self).__init__(**kwargs) + self.billing_period_id = None + self.usage_start = None + self.usage_end = None + self.azure_charges = None + self.charges_billed_separately = None + self.marketplace_charges = None + self.currency = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class CurrentSpend(Model): + """The current amount of cost which is being tracked for a budget. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar amount: The total amount of cost which is being tracked by the + budget. + :vartype amount: decimal.Decimal + :ivar unit: The unit of measure for the budget amount. + :vartype unit: str + """ + + _validation = { + 'amount': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'amount': {'key': 'amount', 'type': 'decimal'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CurrentSpend, self).__init__(**kwargs) + self.amount = None + self.unit = None + + +class ErrorDetails(Model): + """The details of the error. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Error code. + :vartype code: str + :ivar message: Error message indicating why the operation failed. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorDetails, self).__init__(**kwargs) + self.code = None + self.message = None + + +class ErrorResponse(Model): + """Error response indicates that the service is not able to process the + incoming request. The reason is provided in the error message. + + :param error: The details of the error. + :type error: ~azure.mgmt.consumption.models.ErrorDetails + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetails'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class Filters(Model): + """May be used to filter budgets by resource group, resource, or meter. + + :param resource_groups: The list of filters on resource groups, allowed at + subscription level only. + :type resource_groups: list[str] + :param resources: The list of filters on resources. + :type resources: list[str] + :param meters: The list of filters on meters (GUID), mandatory for budgets + of usage category. + :type meters: list[str] + :param tags: The dictionary of filters on tags. + :type tags: dict[str, list[str]] + """ + + _validation = { + 'resource_groups': {'max_items': 10, 'min_items': 0}, + 'resources': {'max_items': 10, 'min_items': 0}, + 'meters': {'max_items': 10, 'min_items': 0}, + } + + _attribute_map = { + 'resource_groups': {'key': 'resourceGroups', 'type': '[str]'}, + 'resources': {'key': 'resources', 'type': '[str]'}, + 'meters': {'key': 'meters', 'type': '[str]'}, + 'tags': {'key': 'tags', 'type': '{[str]}'}, + } + + def __init__(self, **kwargs): + super(Filters, self).__init__(**kwargs) + self.resource_groups = kwargs.get('resource_groups', None) + self.resources = kwargs.get('resources', None) + self.meters = kwargs.get('meters', None) + self.tags = kwargs.get('tags', None) + + +class Forecast(Resource): + """A forecast resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar usage_date: The usage date of the forecast. + :vartype usage_date: str + :param grain: The granularity of forecast. Possible values include: + 'Daily', 'Monthly', 'Yearly' + :type grain: str or ~azure.mgmt.consumption.models.Grain + :ivar charge: The amount of charge + :vartype charge: decimal.Decimal + :ivar currency: The ISO currency in which the meter is charged, for + example, USD. + :vartype currency: str + :param charge_type: The type of the charge. Could be actual or forecast. + Possible values include: 'Actual', 'Forecast' + :type charge_type: str or ~azure.mgmt.consumption.models.ChargeType + :ivar confidence_levels: The details about the forecast confidence levels. + This is populated only when chargeType is Forecast. + :vartype confidence_levels: + list[~azure.mgmt.consumption.models.ForecastPropertiesConfidenceLevelsItem] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'usage_date': {'readonly': True}, + 'charge': {'readonly': True}, + 'currency': {'readonly': True}, + 'confidence_levels': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'usage_date': {'key': 'properties.usageDate', 'type': 'str'}, + 'grain': {'key': 'properties.grain', 'type': 'str'}, + 'charge': {'key': 'properties.charge', 'type': 'decimal'}, + 'currency': {'key': 'properties.currency', 'type': 'str'}, + 'charge_type': {'key': 'properties.chargeType', 'type': 'str'}, + 'confidence_levels': {'key': 'properties.confidenceLevels', 'type': '[ForecastPropertiesConfidenceLevelsItem]'}, + } + + def __init__(self, **kwargs): + super(Forecast, self).__init__(**kwargs) + self.usage_date = None + self.grain = kwargs.get('grain', None) + self.charge = None + self.currency = None + self.charge_type = kwargs.get('charge_type', None) + self.confidence_levels = None + + +class ForecastPropertiesConfidenceLevelsItem(Model): + """ForecastPropertiesConfidenceLevelsItem. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar percentage: The percentage level of the confidence + :vartype percentage: decimal.Decimal + :param bound: The boundary of the percentage, values could be 'Upper' or + 'Lower'. Possible values include: 'Upper', 'Lower' + :type bound: str or ~azure.mgmt.consumption.models.Bound + :ivar value: The amount of forecast within the percentage level + :vartype value: decimal.Decimal + """ + + _validation = { + 'percentage': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'percentage': {'key': 'percentage', 'type': 'decimal'}, + 'bound': {'key': 'bound', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'decimal'}, + } + + def __init__(self, **kwargs): + super(ForecastPropertiesConfidenceLevelsItem, self).__init__(**kwargs) + self.percentage = None + self.bound = kwargs.get('bound', None) + self.value = None + + +class ManagementGroupAggregatedCostResult(Resource): + """A management group aggregated cost resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar billing_period_id: The id of the billing period resource that the + aggregated cost belongs to. + :vartype billing_period_id: str + :ivar usage_start: The start of the date time range covered by aggregated + cost. + :vartype usage_start: datetime + :ivar usage_end: The end of the date time range covered by the aggregated + cost. + :vartype usage_end: datetime + :ivar azure_charges: Azure Charges. + :vartype azure_charges: decimal.Decimal + :ivar marketplace_charges: Marketplace Charges. + :vartype marketplace_charges: decimal.Decimal + :ivar charges_billed_separately: Charges Billed Separately. + :vartype charges_billed_separately: decimal.Decimal + :ivar currency: The ISO currency in which the meter is charged, for + example, USD. + :vartype currency: str + :param children: Children of a management group + :type children: + list[~azure.mgmt.consumption.models.ManagementGroupAggregatedCostResult] + :param included_subscriptions: List of subscription Guids included in the + calculation of aggregated cost + :type included_subscriptions: list[str] + :param excluded_subscriptions: List of subscription Guids excluded from + the calculation of aggregated cost + :type excluded_subscriptions: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'billing_period_id': {'readonly': True}, + 'usage_start': {'readonly': True}, + 'usage_end': {'readonly': True}, + 'azure_charges': {'readonly': True}, + 'marketplace_charges': {'readonly': True}, + 'charges_billed_separately': {'readonly': True}, + 'currency': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, + 'usage_start': {'key': 'properties.usageStart', 'type': 'iso-8601'}, + 'usage_end': {'key': 'properties.usageEnd', 'type': 'iso-8601'}, + 'azure_charges': {'key': 'properties.azureCharges', 'type': 'decimal'}, + 'marketplace_charges': {'key': 'properties.marketplaceCharges', 'type': 'decimal'}, + 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'decimal'}, + 'currency': {'key': 'properties.currency', 'type': 'str'}, + 'children': {'key': 'properties.children', 'type': '[ManagementGroupAggregatedCostResult]'}, + 'included_subscriptions': {'key': 'properties.includedSubscriptions', 'type': '[str]'}, + 'excluded_subscriptions': {'key': 'properties.excludedSubscriptions', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ManagementGroupAggregatedCostResult, self).__init__(**kwargs) + self.billing_period_id = None + self.usage_start = None + self.usage_end = None + self.azure_charges = None + self.marketplace_charges = None + self.charges_billed_separately = None + self.currency = None + self.children = kwargs.get('children', None) + self.included_subscriptions = kwargs.get('included_subscriptions', None) + self.excluded_subscriptions = kwargs.get('excluded_subscriptions', None) + + +class Marketplace(Resource): + """An marketplace resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar billing_period_id: The id of the billing period resource that the + usage belongs to. + :vartype billing_period_id: str + :ivar usage_start: The start of the date time range covered by the usage + detail. + :vartype usage_start: datetime + :ivar usage_end: The end of the date time range covered by the usage + detail. + :vartype usage_end: datetime + :ivar resource_rate: The marketplace resource rate. + :vartype resource_rate: decimal.Decimal + :ivar offer_name: The type of offer. + :vartype offer_name: str + :ivar resource_group: The name of resource group. + :vartype resource_group: str + :ivar order_number: The order number. + :vartype order_number: str + :ivar instance_name: The name of the resource instance that the usage is + about. + :vartype instance_name: str + :ivar instance_id: The uri of the resource instance that the usage is + about. + :vartype instance_id: str + :ivar currency: The ISO currency in which the meter is charged, for + example, USD. + :vartype currency: str + :ivar consumed_quantity: The quantity of usage. + :vartype consumed_quantity: decimal.Decimal + :ivar unit_of_measure: The unit of measure. + :vartype unit_of_measure: str + :ivar pretax_cost: The amount of cost before tax. + :vartype pretax_cost: decimal.Decimal + :ivar is_estimated: The estimated usage is subject to change. + :vartype is_estimated: bool + :ivar meter_id: The meter id (GUID). + :vartype meter_id: str + :ivar subscription_guid: Subscription guid. + :vartype subscription_guid: str + :ivar subscription_name: Subscription name. + :vartype subscription_name: str + :ivar account_name: Account name. + :vartype account_name: str + :ivar department_name: Department name. + :vartype department_name: str + :ivar consumed_service: Consumed service name. + :vartype consumed_service: str + :ivar cost_center: The cost center of this department if it is a + department and a costcenter exists + :vartype cost_center: str + :ivar additional_properties: Additional details of this usage item. By + default this is not populated, unless it's specified in $expand. + :vartype additional_properties: str + :ivar publisher_name: The name of publisher. + :vartype publisher_name: str + :ivar plan_name: The name of plan. + :vartype plan_name: str + :ivar is_recurring_charge: Flag indicating whether this is a recurring + charge or not. + :vartype is_recurring_charge: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'billing_period_id': {'readonly': True}, + 'usage_start': {'readonly': True}, + 'usage_end': {'readonly': True}, + 'resource_rate': {'readonly': True}, + 'offer_name': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'order_number': {'readonly': True}, + 'instance_name': {'readonly': True}, + 'instance_id': {'readonly': True}, + 'currency': {'readonly': True}, + 'consumed_quantity': {'readonly': True}, + 'unit_of_measure': {'readonly': True}, + 'pretax_cost': {'readonly': True}, + 'is_estimated': {'readonly': True}, + 'meter_id': {'readonly': True}, + 'subscription_guid': {'readonly': True}, + 'subscription_name': {'readonly': True}, + 'account_name': {'readonly': True}, + 'department_name': {'readonly': True}, + 'consumed_service': {'readonly': True}, + 'cost_center': {'readonly': True}, + 'additional_properties': {'readonly': True}, + 'publisher_name': {'readonly': True}, + 'plan_name': {'readonly': True}, + 'is_recurring_charge': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, + 'usage_start': {'key': 'properties.usageStart', 'type': 'iso-8601'}, + 'usage_end': {'key': 'properties.usageEnd', 'type': 'iso-8601'}, + 'resource_rate': {'key': 'properties.resourceRate', 'type': 'decimal'}, + 'offer_name': {'key': 'properties.offerName', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'order_number': {'key': 'properties.orderNumber', 'type': 'str'}, + 'instance_name': {'key': 'properties.instanceName', 'type': 'str'}, + 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, + 'currency': {'key': 'properties.currency', 'type': 'str'}, + 'consumed_quantity': {'key': 'properties.consumedQuantity', 'type': 'decimal'}, + 'unit_of_measure': {'key': 'properties.unitOfMeasure', 'type': 'str'}, + 'pretax_cost': {'key': 'properties.pretaxCost', 'type': 'decimal'}, + 'is_estimated': {'key': 'properties.isEstimated', 'type': 'bool'}, + 'meter_id': {'key': 'properties.meterId', 'type': 'str'}, + 'subscription_guid': {'key': 'properties.subscriptionGuid', 'type': 'str'}, + 'subscription_name': {'key': 'properties.subscriptionName', 'type': 'str'}, + 'account_name': {'key': 'properties.accountName', 'type': 'str'}, + 'department_name': {'key': 'properties.departmentName', 'type': 'str'}, + 'consumed_service': {'key': 'properties.consumedService', 'type': 'str'}, + 'cost_center': {'key': 'properties.costCenter', 'type': 'str'}, + 'additional_properties': {'key': 'properties.additionalProperties', 'type': 'str'}, + 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, + 'plan_name': {'key': 'properties.planName', 'type': 'str'}, + 'is_recurring_charge': {'key': 'properties.isRecurringCharge', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(Marketplace, self).__init__(**kwargs) + self.billing_period_id = None + self.usage_start = None + self.usage_end = None + self.resource_rate = None + self.offer_name = None + self.resource_group = None + self.order_number = None + self.instance_name = None + self.instance_id = None + self.currency = None + self.consumed_quantity = None + self.unit_of_measure = None + self.pretax_cost = None + self.is_estimated = None + self.meter_id = None + self.subscription_guid = None + self.subscription_name = None + self.account_name = None + self.department_name = None + self.consumed_service = None + self.cost_center = None + self.additional_properties = None + self.publisher_name = None + self.plan_name = None + self.is_recurring_charge = None + + +class MeterDetails(Model): + """The properties of the meter detail. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar meter_name: The name of the meter, within the given meter category + :vartype meter_name: str + :ivar meter_category: The category of the meter, for example, 'Cloud + services', 'Networking', etc.. + :vartype meter_category: str + :ivar meter_sub_category: The subcategory of the meter, for example, 'A6 + Cloud services', 'ExpressRoute (IXP)', etc.. + :vartype meter_sub_category: str + :ivar unit: The unit in which the meter consumption is charged, for + example, 'Hours', 'GB', etc. + :vartype unit: str + :ivar meter_location: The location in which the Azure service is + available. + :vartype meter_location: str + :ivar total_included_quantity: The total included quantity associated with + the offer. + :vartype total_included_quantity: decimal.Decimal + :ivar pretax_standard_rate: The pretax listing price. + :vartype pretax_standard_rate: decimal.Decimal + :ivar service_name: The name of the service. + :vartype service_name: str + :ivar service_tier: The service tier. + :vartype service_tier: str + """ + + _validation = { + 'meter_name': {'readonly': True}, + 'meter_category': {'readonly': True}, + 'meter_sub_category': {'readonly': True}, + 'unit': {'readonly': True}, + 'meter_location': {'readonly': True}, + 'total_included_quantity': {'readonly': True}, + 'pretax_standard_rate': {'readonly': True}, + 'service_name': {'readonly': True}, + 'service_tier': {'readonly': True}, + } + + _attribute_map = { + 'meter_name': {'key': 'meterName', 'type': 'str'}, + 'meter_category': {'key': 'meterCategory', 'type': 'str'}, + 'meter_sub_category': {'key': 'meterSubCategory', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'meter_location': {'key': 'meterLocation', 'type': 'str'}, + 'total_included_quantity': {'key': 'totalIncludedQuantity', 'type': 'decimal'}, + 'pretax_standard_rate': {'key': 'pretaxStandardRate', 'type': 'decimal'}, + 'service_name': {'key': 'serviceName', 'type': 'str'}, + 'service_tier': {'key': 'serviceTier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MeterDetails, self).__init__(**kwargs) + self.meter_name = None + self.meter_category = None + self.meter_sub_category = None + self.unit = None + self.meter_location = None + self.total_included_quantity = None + self.pretax_standard_rate = None + self.service_name = None + self.service_tier = None + + +class MeterDetailsResponse(Model): + """The properties of the meter detail. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar meter_name: The name of the meter, within the given meter category + :vartype meter_name: str + :ivar meter_category: The category of the meter, for example, 'Cloud + services', 'Networking', etc.. + :vartype meter_category: str + :ivar meter_sub_category: The subcategory of the meter, for example, 'A6 + Cloud services', 'ExpressRoute (IXP)', etc.. + :vartype meter_sub_category: str + :ivar unit_of_measure: The unit in which the meter consumption is charged, + for example, 'Hours', 'GB', etc. + :vartype unit_of_measure: str + :ivar service_family: The service family. + :vartype service_family: str + """ + + _validation = { + 'meter_name': {'readonly': True}, + 'meter_category': {'readonly': True}, + 'meter_sub_category': {'readonly': True}, + 'unit_of_measure': {'readonly': True}, + 'service_family': {'readonly': True}, + } + + _attribute_map = { + 'meter_name': {'key': 'meterName', 'type': 'str'}, + 'meter_category': {'key': 'meterCategory', 'type': 'str'}, + 'meter_sub_category': {'key': 'meterSubCategory', 'type': 'str'}, + 'unit_of_measure': {'key': 'unitOfMeasure', 'type': 'str'}, + 'service_family': {'key': 'serviceFamily', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MeterDetailsResponse, self).__init__(**kwargs) + self.meter_name = None + self.meter_category = None + self.meter_sub_category = None + self.unit_of_measure = None + self.service_family = None + + +class Notification(Model): + """The notification associated with a budget. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. The notification is enabled or not. + :type enabled: bool + :param operator: Required. The comparison operator. Possible values + include: 'EqualTo', 'GreaterThan', 'GreaterThanOrEqualTo' + :type operator: str or ~azure.mgmt.consumption.models.OperatorType + :param threshold: Required. Threshold value associated with a + notification. Notification is sent when the cost exceeded the threshold. + It is always percent and has to be between 0 and 1000. + :type threshold: decimal.Decimal + :param contact_emails: Required. Email addresses to send the budget + notification to when the threshold is exceeded. + :type contact_emails: list[str] + :param contact_roles: Contact roles to send the budget notification to + when the threshold is exceeded. + :type contact_roles: list[str] + :param contact_groups: Action groups to send the budget notification to + when the threshold is exceeded. + :type contact_groups: list[str] + """ + + _validation = { + 'enabled': {'required': True}, + 'operator': {'required': True}, + 'threshold': {'required': True}, + 'contact_emails': {'required': True, 'max_items': 50, 'min_items': 1}, + 'contact_groups': {'max_items': 50, 'min_items': 0}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'threshold': {'key': 'threshold', 'type': 'decimal'}, + 'contact_emails': {'key': 'contactEmails', 'type': '[str]'}, + 'contact_roles': {'key': 'contactRoles', 'type': '[str]'}, + 'contact_groups': {'key': 'contactGroups', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(Notification, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.operator = kwargs.get('operator', None) + self.threshold = kwargs.get('threshold', None) + self.contact_emails = kwargs.get('contact_emails', None) + self.contact_roles = kwargs.get('contact_roles', None) + self.contact_groups = kwargs.get('contact_groups', None) + + +class Operation(Model): + """A Consumption REST API operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation name: {provider}/{resource}/{operation}. + :vartype name: str + :param display: The object that represents the operation. + :type display: ~azure.mgmt.consumption.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = kwargs.get('display', None) + + +class OperationDisplay(Model): + """The object that represents the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: Service provider: Microsoft.Consumption. + :vartype provider: str + :ivar resource: Resource on which the operation is performed: UsageDetail, + etc. + :vartype resource: str + :ivar operation: Operation type: Read, write, delete, etc. + :vartype operation: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + + +class PriceSheetProperties(Model): + """The properties of the price sheet. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar billing_period_id: The id of the billing period resource that the + usage belongs to. + :vartype billing_period_id: str + :ivar meter_id: The meter id (GUID) + :vartype meter_id: str + :ivar meter_details: The details about the meter. By default this is not + populated, unless it's specified in $expand. + :vartype meter_details: ~azure.mgmt.consumption.models.MeterDetails + :ivar unit_of_measure: Unit of measure + :vartype unit_of_measure: str + :ivar included_quantity: Included quality for an offer + :vartype included_quantity: decimal.Decimal + :ivar part_number: Part Number + :vartype part_number: str + :ivar unit_price: Unit Price + :vartype unit_price: decimal.Decimal + :ivar currency_code: Currency Code + :vartype currency_code: str + :ivar offer_id: Offer Id + :vartype offer_id: str + """ + + _validation = { + 'billing_period_id': {'readonly': True}, + 'meter_id': {'readonly': True}, + 'meter_details': {'readonly': True}, + 'unit_of_measure': {'readonly': True}, + 'included_quantity': {'readonly': True}, + 'part_number': {'readonly': True}, + 'unit_price': {'readonly': True}, + 'currency_code': {'readonly': True}, + 'offer_id': {'readonly': True}, + } + + _attribute_map = { + 'billing_period_id': {'key': 'billingPeriodId', 'type': 'str'}, + 'meter_id': {'key': 'meterId', 'type': 'str'}, + 'meter_details': {'key': 'meterDetails', 'type': 'MeterDetails'}, + 'unit_of_measure': {'key': 'unitOfMeasure', 'type': 'str'}, + 'included_quantity': {'key': 'includedQuantity', 'type': 'decimal'}, + 'part_number': {'key': 'partNumber', 'type': 'str'}, + 'unit_price': {'key': 'unitPrice', 'type': 'decimal'}, + 'currency_code': {'key': 'currencyCode', 'type': 'str'}, + 'offer_id': {'key': 'offerId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PriceSheetProperties, self).__init__(**kwargs) + self.billing_period_id = None + self.meter_id = None + self.meter_details = None + self.unit_of_measure = None + self.included_quantity = None + self.part_number = None + self.unit_price = None + self.currency_code = None + self.offer_id = None + + +class PriceSheetResult(Resource): + """An pricesheet resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar pricesheets: Price sheet + :vartype pricesheets: + list[~azure.mgmt.consumption.models.PriceSheetProperties] + :ivar next_link: The link (url) to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'pricesheets': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'pricesheets': {'key': 'properties.pricesheets', 'type': '[PriceSheetProperties]'}, + 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PriceSheetResult, self).__init__(**kwargs) + self.pricesheets = None + self.next_link = None + + +class ReservationDetail(Resource): + """reservation detail resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar reservation_order_id: The reservation order ID is the identifier for + a reservation purchase. Each reservation order ID represents a single + purchase transaction. A reservation order contains reservations. The + reservation order specifies the VM size and region for the reservations. + :vartype reservation_order_id: str + :ivar reservation_id: The reservation ID is the identifier of a + reservation within a reservation order. Each reservation is the grouping + for applying the benefit scope and also specifies the number of instances + to which the reservation benefit can be applied to. + :vartype reservation_id: str + :ivar sku_name: This is the ARM Sku name. It can be used to join with the + serviceType field in additional info in usage records. + :vartype sku_name: str + :ivar reserved_hours: This is the total hours reserved for the day. E.g. + if reservation for 1 instance was made on 1 PM, this will be 11 hours for + that day and 24 hours from subsequent days. + :vartype reserved_hours: decimal.Decimal + :ivar usage_date: The date on which consumption occurred. + :vartype usage_date: datetime + :ivar used_hours: This is the total hours used by the instance. + :vartype used_hours: decimal.Decimal + :ivar instance_id: This identifier is the name of the resource or the + fully qualified Resource ID. + :vartype instance_id: str + :ivar total_reserved_quantity: This is the total count of instances that + are reserved for the reservationId. + :vartype total_reserved_quantity: decimal.Decimal + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'reservation_order_id': {'readonly': True}, + 'reservation_id': {'readonly': True}, + 'sku_name': {'readonly': True}, + 'reserved_hours': {'readonly': True}, + 'usage_date': {'readonly': True}, + 'used_hours': {'readonly': True}, + 'instance_id': {'readonly': True}, + 'total_reserved_quantity': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'reservation_order_id': {'key': 'properties.reservationOrderId', 'type': 'str'}, + 'reservation_id': {'key': 'properties.reservationId', 'type': 'str'}, + 'sku_name': {'key': 'properties.skuName', 'type': 'str'}, + 'reserved_hours': {'key': 'properties.reservedHours', 'type': 'decimal'}, + 'usage_date': {'key': 'properties.usageDate', 'type': 'iso-8601'}, + 'used_hours': {'key': 'properties.usedHours', 'type': 'decimal'}, + 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, + 'total_reserved_quantity': {'key': 'properties.totalReservedQuantity', 'type': 'decimal'}, + } + + def __init__(self, **kwargs): + super(ReservationDetail, self).__init__(**kwargs) + self.reservation_order_id = None + self.reservation_id = None + self.sku_name = None + self.reserved_hours = None + self.usage_date = None + self.used_hours = None + self.instance_id = None + self.total_reserved_quantity = None + + +class ReservationRecommendation(Model): + """Reservation recommendation resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: Resource location + :vartype location: str + :ivar sku: Resource sku + :vartype sku: str + :ivar look_back_period: The number of days of usage to look back for + recommendation. + :vartype look_back_period: str + :ivar meter_id: The meter id (GUID) + :vartype meter_id: str + :ivar term: RI recommendations in one or three year terms. + :vartype term: str + :ivar cost_with_no_reserved_instances: The total amount of cost without + reserved instances. + :vartype cost_with_no_reserved_instances: decimal.Decimal + :ivar recommended_quantity: Recommended quality for reserved instances. + :vartype recommended_quantity: decimal.Decimal + :ivar total_cost_with_reserved_instances: The total amount of cost with + reserved instances. + :vartype total_cost_with_reserved_instances: decimal.Decimal + :ivar net_savings: Total estimated savings with reserved instances. + :vartype net_savings: decimal.Decimal + :ivar first_usage_date: The usage date for looking back. + :vartype first_usage_date: datetime + :ivar scope: Shared or single recommendation. + :vartype scope: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'location': {'readonly': True}, + 'sku': {'readonly': True}, + 'look_back_period': {'readonly': True}, + 'meter_id': {'readonly': True}, + 'term': {'readonly': True}, + 'cost_with_no_reserved_instances': {'readonly': True}, + 'recommended_quantity': {'readonly': True}, + 'total_cost_with_reserved_instances': {'readonly': True}, + 'net_savings': {'readonly': True}, + 'first_usage_date': {'readonly': True}, + 'scope': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'look_back_period': {'key': 'properties.lookBackPeriod', 'type': 'str'}, + 'meter_id': {'key': 'properties.meterId', 'type': 'str'}, + 'term': {'key': 'properties.term', 'type': 'str'}, + 'cost_with_no_reserved_instances': {'key': 'properties.costWithNoReservedInstances', 'type': 'decimal'}, + 'recommended_quantity': {'key': 'properties.recommendedQuantity', 'type': 'decimal'}, + 'total_cost_with_reserved_instances': {'key': 'properties.totalCostWithReservedInstances', 'type': 'decimal'}, + 'net_savings': {'key': 'properties.netSavings', 'type': 'decimal'}, + 'first_usage_date': {'key': 'properties.firstUsageDate', 'type': 'iso-8601'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ReservationRecommendation, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = None + self.location = None + self.sku = None + self.look_back_period = None + self.meter_id = None + self.term = None + self.cost_with_no_reserved_instances = None + self.recommended_quantity = None + self.total_cost_with_reserved_instances = None + self.net_savings = None + self.first_usage_date = None + self.scope = None + + +class ReservationSummary(Resource): + """reservation summary resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar reservation_order_id: The reservation order ID is the identifier for + a reservation purchase. Each reservation order ID represents a single + purchase transaction. A reservation order contains reservations. The + reservation order specifies the VM size and region for the reservations. + :vartype reservation_order_id: str + :ivar reservation_id: The reservation ID is the identifier of a + reservation within a reservation order. Each reservation is the grouping + for applying the benefit scope and also specifies the number of instances + to which the reservation benefit can be applied to. + :vartype reservation_id: str + :ivar sku_name: This is the ARM Sku name. It can be used to join with the + serviceType field in additional info in usage records. + :vartype sku_name: str + :ivar reserved_hours: This is the total hours reserved. E.g. if + reservation for 1 instance was made on 1 PM, this will be 11 hours for + that day and 24 hours from subsequent days + :vartype reserved_hours: decimal.Decimal + :ivar usage_date: Data corresponding to the utilization record. If the + grain of data is monthly, it will be first day of month. + :vartype usage_date: datetime + :ivar used_hours: Total used hours by the reservation + :vartype used_hours: decimal.Decimal + :ivar min_utilization_percentage: This is the minimum hourly utilization + in the usage time (day or month). E.g. if usage record corresponds to + 12/10/2017 and on that for hour 4 and 5, utilization was 10%, this field + will return 10% for that day + :vartype min_utilization_percentage: decimal.Decimal + :ivar avg_utilization_percentage: This is average utilization for the + entire time range. (day or month depending on the grain) + :vartype avg_utilization_percentage: decimal.Decimal + :ivar max_utilization_percentage: This is the maximum hourly utilization + in the usage time (day or month). E.g. if usage record corresponds to + 12/10/2017 and on that for hour 4 and 5, utilization was 100%, this field + will return 100% for that day. + :vartype max_utilization_percentage: decimal.Decimal + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'reservation_order_id': {'readonly': True}, + 'reservation_id': {'readonly': True}, + 'sku_name': {'readonly': True}, + 'reserved_hours': {'readonly': True}, + 'usage_date': {'readonly': True}, + 'used_hours': {'readonly': True}, + 'min_utilization_percentage': {'readonly': True}, + 'avg_utilization_percentage': {'readonly': True}, + 'max_utilization_percentage': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'reservation_order_id': {'key': 'properties.reservationOrderId', 'type': 'str'}, + 'reservation_id': {'key': 'properties.reservationId', 'type': 'str'}, + 'sku_name': {'key': 'properties.skuName', 'type': 'str'}, + 'reserved_hours': {'key': 'properties.reservedHours', 'type': 'decimal'}, + 'usage_date': {'key': 'properties.usageDate', 'type': 'iso-8601'}, + 'used_hours': {'key': 'properties.usedHours', 'type': 'decimal'}, + 'min_utilization_percentage': {'key': 'properties.minUtilizationPercentage', 'type': 'decimal'}, + 'avg_utilization_percentage': {'key': 'properties.avgUtilizationPercentage', 'type': 'decimal'}, + 'max_utilization_percentage': {'key': 'properties.maxUtilizationPercentage', 'type': 'decimal'}, + } + + def __init__(self, **kwargs): + super(ReservationSummary, self).__init__(**kwargs) + self.reservation_order_id = None + self.reservation_id = None + self.sku_name = None + self.reserved_hours = None + self.usage_date = None + self.used_hours = None + self.min_utilization_percentage = None + self.avg_utilization_percentage = None + self.max_utilization_percentage = None + + +class ResourceAttributes(Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar location: Resource location + :vartype location: str + :ivar sku: Resource sku + :vartype sku: str + """ + + _validation = { + 'location': {'readonly': True}, + 'sku': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceAttributes, self).__init__(**kwargs) + self.location = None + self.sku = None + + +class Tag(Model): + """The tag resource. + + :param key: Tag key. + :type key: str + """ + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Tag, self).__init__(**kwargs) + self.key = kwargs.get('key', None) + + +class TagsResult(ProxyResource): + """A resource listing all tags. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param e_tag: eTag of the resource. To handle concurrent update scenario, + this field will be used to determine whether the user is updating the + latest version or not. + :type e_tag: str + :param tags: A list of Tag. + :type tags: list[~azure.mgmt.consumption.models.Tag] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'tags': {'key': 'properties.tags', 'type': '[Tag]'}, + } + + def __init__(self, **kwargs): + super(TagsResult, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class UsageDetail(Resource): + """An usage detail resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar billing_account_id: Billing Account identifier. + :vartype billing_account_id: str + :ivar billing_account_name: Billing Account Name. + :vartype billing_account_name: str + :ivar billing_period_start_date: The billing period start date. + :vartype billing_period_start_date: datetime + :ivar billing_period_end_date: The billing period end date. + :vartype billing_period_end_date: datetime + :ivar billing_profile_id: Billing Profile identifier. + :vartype billing_profile_id: str + :ivar billing_profile_name: Billing Profile Name. + :vartype billing_profile_name: str + :ivar account_owner_id: Account Owner Id. + :vartype account_owner_id: str + :ivar account_name: Account Name. + :vartype account_name: str + :ivar subscription_id: Subscription guid. + :vartype subscription_id: str + :ivar subscription_name: Subscription name. + :vartype subscription_name: str + :ivar date_property: Date for the usage record. + :vartype date_property: datetime + :ivar product: Product name for the consumed service or purchase. Not + available for Marketplace. + :vartype product: str + :ivar part_number: Part Number of the service used. Can be used to join + with the price sheet. Not available for marketplace. + :vartype part_number: str + :ivar meter_id: The meter id (GUID). Not available for marketplace. For + reserved instance this represents the primary meter for which the + reservation was purchased. For the actual VM Size for which the + reservation is purchased see productOrderName. + :vartype meter_id: str + :ivar meter_details: The details about the meter. By default this is not + populated, unless it's specified in $expand. + :vartype meter_details: + ~azure.mgmt.consumption.models.MeterDetailsResponse + :ivar quantity: The usage quantity. + :vartype quantity: decimal.Decimal + :ivar effective_price: Effective Price that’s charged for the usage. + :vartype effective_price: decimal.Decimal + :ivar cost: The amount of cost before tax. + :vartype cost: decimal.Decimal + :ivar unit_price: Unit Price is the price applicable to you. (your EA or + other contract price). + :vartype unit_price: decimal.Decimal + :ivar billing_currency: Billing Currency. + :vartype billing_currency: str + :ivar resource_location: Resource Location. + :vartype resource_location: str + :ivar consumed_service: Consumed service name. Name of the azure resource + provider that emits the usage or was purchased. This value is not provided + for marketplace usage. + :vartype consumed_service: str + :ivar resource_id: Azure resource manager resource identifier. + :vartype resource_id: str + :ivar resource_name: Resource Name. + :vartype resource_name: str + :ivar service_info1: Service Info 1. + :vartype service_info1: str + :ivar service_info2: Service Info 2. + :vartype service_info2: str + :ivar additional_info: Additional details of this usage item. By default + this is not populated, unless it's specified in $expand. Use this field to + get usage line item specific details such as the actual VM Size + (ServiceType) or the ratio in which the reservation discount is applied. + :vartype additional_info: str + :ivar invoice_section: Invoice Section Name. + :vartype invoice_section: str + :ivar cost_center: The cost center of this department if it is a + department and a cost center is provided. + :vartype cost_center: str + :ivar resource_group: Resource Group Name. + :vartype resource_group: str + :ivar reservation_id: ARM resource id of the reservation. Only applies to + records relevant to reservations. + :vartype reservation_id: str + :ivar reservation_name: User provided display name of the reservation. + Last known name for a particular day is populated in the daily data. Only + applies to records relevant to reservations. + :vartype reservation_name: str + :ivar product_order_id: Product Order Id. For reservations this is the + Reservation Order ID. + :vartype product_order_id: str + :ivar product_order_name: Product Order Name. For reservations this is the + SKU that was purchased. + :vartype product_order_name: str + :ivar offer_id: Offer Id. Ex: MS-AZR-0017P, MS-AZR-0148P. + :vartype offer_id: str + :ivar is_azure_credit_eligible: Is Azure Credit Eligible. + :vartype is_azure_credit_eligible: bool + :ivar term: Term (in months). 1 month for monthly recurring purchase. 12 + months for a 1 year reservation. 36 months for a 3 year reservation. + :vartype term: str + :ivar publisher_name: Publisher Name. + :vartype publisher_name: str + :ivar publisher_type: Publisher Type. + :vartype publisher_type: str + :ivar plan_name: Plan Name. + :vartype plan_name: str + :ivar charge_type: Indicates a charge represents credits, usage, a + Marketplace purchase, a reservation fee, or a refund. + :vartype charge_type: str + :ivar frequency: Indicates how frequently this charge will occur. OneTime + for purchases which only happen once, Monthly for fees which recur every + month, and UsageBased for charges based on how much a service is used. + :vartype frequency: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'billing_account_id': {'readonly': True}, + 'billing_account_name': {'readonly': True}, + 'billing_period_start_date': {'readonly': True}, + 'billing_period_end_date': {'readonly': True}, + 'billing_profile_id': {'readonly': True}, + 'billing_profile_name': {'readonly': True}, + 'account_owner_id': {'readonly': True}, + 'account_name': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'subscription_name': {'readonly': True}, + 'date_property': {'readonly': True}, + 'product': {'readonly': True}, + 'part_number': {'readonly': True}, + 'meter_id': {'readonly': True}, + 'meter_details': {'readonly': True}, + 'quantity': {'readonly': True}, + 'effective_price': {'readonly': True}, + 'cost': {'readonly': True}, + 'unit_price': {'readonly': True}, + 'billing_currency': {'readonly': True}, + 'resource_location': {'readonly': True}, + 'consumed_service': {'readonly': True}, + 'resource_id': {'readonly': True}, + 'resource_name': {'readonly': True}, + 'service_info1': {'readonly': True}, + 'service_info2': {'readonly': True}, + 'additional_info': {'readonly': True}, + 'invoice_section': {'readonly': True}, + 'cost_center': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'reservation_id': {'readonly': True}, + 'reservation_name': {'readonly': True}, + 'product_order_id': {'readonly': True}, + 'product_order_name': {'readonly': True}, + 'offer_id': {'readonly': True}, + 'is_azure_credit_eligible': {'readonly': True}, + 'term': {'readonly': True}, + 'publisher_name': {'readonly': True}, + 'publisher_type': {'readonly': True}, + 'plan_name': {'readonly': True}, + 'charge_type': {'readonly': True}, + 'frequency': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'billing_account_id': {'key': 'properties.billingAccountId', 'type': 'str'}, + 'billing_account_name': {'key': 'properties.billingAccountName', 'type': 'str'}, + 'billing_period_start_date': {'key': 'properties.billingPeriodStartDate', 'type': 'iso-8601'}, + 'billing_period_end_date': {'key': 'properties.billingPeriodEndDate', 'type': 'iso-8601'}, + 'billing_profile_id': {'key': 'properties.billingProfileId', 'type': 'str'}, + 'billing_profile_name': {'key': 'properties.billingProfileName', 'type': 'str'}, + 'account_owner_id': {'key': 'properties.accountOwnerId', 'type': 'str'}, + 'account_name': {'key': 'properties.accountName', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'subscription_name': {'key': 'properties.subscriptionName', 'type': 'str'}, + 'date_property': {'key': 'properties.date', 'type': 'iso-8601'}, + 'product': {'key': 'properties.product', 'type': 'str'}, + 'part_number': {'key': 'properties.partNumber', 'type': 'str'}, + 'meter_id': {'key': 'properties.meterId', 'type': 'str'}, + 'meter_details': {'key': 'properties.meterDetails', 'type': 'MeterDetailsResponse'}, + 'quantity': {'key': 'properties.quantity', 'type': 'decimal'}, + 'effective_price': {'key': 'properties.effectivePrice', 'type': 'decimal'}, + 'cost': {'key': 'properties.cost', 'type': 'decimal'}, + 'unit_price': {'key': 'properties.unitPrice', 'type': 'decimal'}, + 'billing_currency': {'key': 'properties.billingCurrency', 'type': 'str'}, + 'resource_location': {'key': 'properties.resourceLocation', 'type': 'str'}, + 'consumed_service': {'key': 'properties.consumedService', 'type': 'str'}, + 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, + 'resource_name': {'key': 'properties.resourceName', 'type': 'str'}, + 'service_info1': {'key': 'properties.serviceInfo1', 'type': 'str'}, + 'service_info2': {'key': 'properties.serviceInfo2', 'type': 'str'}, + 'additional_info': {'key': 'properties.additionalInfo', 'type': 'str'}, + 'invoice_section': {'key': 'properties.invoiceSection', 'type': 'str'}, + 'cost_center': {'key': 'properties.costCenter', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'reservation_id': {'key': 'properties.reservationId', 'type': 'str'}, + 'reservation_name': {'key': 'properties.reservationName', 'type': 'str'}, + 'product_order_id': {'key': 'properties.productOrderId', 'type': 'str'}, + 'product_order_name': {'key': 'properties.productOrderName', 'type': 'str'}, + 'offer_id': {'key': 'properties.offerId', 'type': 'str'}, + 'is_azure_credit_eligible': {'key': 'properties.isAzureCreditEligible', 'type': 'bool'}, + 'term': {'key': 'properties.term', 'type': 'str'}, + 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, + 'publisher_type': {'key': 'properties.publisherType', 'type': 'str'}, + 'plan_name': {'key': 'properties.planName', 'type': 'str'}, + 'charge_type': {'key': 'properties.chargeType', 'type': 'str'}, + 'frequency': {'key': 'properties.frequency', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UsageDetail, self).__init__(**kwargs) + self.billing_account_id = None + self.billing_account_name = None + self.billing_period_start_date = None + self.billing_period_end_date = None + self.billing_profile_id = None + self.billing_profile_name = None + self.account_owner_id = None + self.account_name = None + self.subscription_id = None + self.subscription_name = None + self.date_property = None + self.product = None + self.part_number = None + self.meter_id = None + self.meter_details = None + self.quantity = None + self.effective_price = None + self.cost = None + self.unit_price = None + self.billing_currency = None + self.resource_location = None + self.consumed_service = None + self.resource_id = None + self.resource_name = None + self.service_info1 = None + self.service_info2 = None + self.additional_info = None + self.invoice_section = None + self.cost_center = None + self.resource_group = None + self.reservation_id = None + self.reservation_name = None + self.product_order_id = None + self.product_order_name = None + self.offer_id = None + self.is_azure_credit_eligible = None + self.term = None + self.publisher_name = None + self.publisher_type = None + self.plan_name = None + self.charge_type = None + self.frequency = None + + +class UsageDetailsDownloadResponse(Resource): + """Download response of Usage Details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar download_url: The URL to the csv file. + :vartype download_url: str + :ivar valid_till: The time in UTC at which this download URL will expire. + :vartype valid_till: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'download_url': {'readonly': True}, + 'valid_till': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'download_url': {'key': 'properties.downloadUrl', 'type': 'str'}, + 'valid_till': {'key': 'properties.validTill', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UsageDetailsDownloadResponse, self).__init__(**kwargs) + self.download_url = None + self.valid_till = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/_models_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/_models_py3.py new file mode 100644 index 000000000000..c68339913f98 --- /dev/null +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/_models_py3.py @@ -0,0 +1,1958 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class Resource(Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = None + + +class Balance(Resource): + """A balance resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar currency: The ISO currency in which the meter is charged, for + example, USD. + :vartype currency: str + :ivar beginning_balance: The beginning balance for the billing period. + :vartype beginning_balance: decimal.Decimal + :ivar ending_balance: The ending balance for the billing period (for open + periods this will be updated daily). + :vartype ending_balance: decimal.Decimal + :ivar new_purchases: Total new purchase amount. + :vartype new_purchases: decimal.Decimal + :ivar adjustments: Total adjustment amount. + :vartype adjustments: decimal.Decimal + :ivar utilized: Total Commitment usage. + :vartype utilized: decimal.Decimal + :ivar service_overage: Overage for Azure services. + :vartype service_overage: decimal.Decimal + :ivar charges_billed_separately: Charges Billed separately. + :vartype charges_billed_separately: decimal.Decimal + :ivar total_overage: serviceOverage + chargesBilledSeparately. + :vartype total_overage: decimal.Decimal + :ivar total_usage: Azure service commitment + total Overage. + :vartype total_usage: decimal.Decimal + :ivar azure_marketplace_service_charges: Total charges for Azure + Marketplace. + :vartype azure_marketplace_service_charges: decimal.Decimal + :param billing_frequency: The billing frequency. Possible values include: + 'Month', 'Quarter', 'Year' + :type billing_frequency: str or + ~azure.mgmt.consumption.models.BillingFrequency + :ivar price_hidden: Price is hidden or not. + :vartype price_hidden: bool + :ivar new_purchases_details: List of new purchases. + :vartype new_purchases_details: + list[~azure.mgmt.consumption.models.BalancePropertiesNewPurchasesDetailsItem] + :ivar adjustment_details: List of Adjustments (Promo credit, SIE credit + etc.). + :vartype adjustment_details: + list[~azure.mgmt.consumption.models.BalancePropertiesAdjustmentDetailsItem] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'currency': {'readonly': True}, + 'beginning_balance': {'readonly': True}, + 'ending_balance': {'readonly': True}, + 'new_purchases': {'readonly': True}, + 'adjustments': {'readonly': True}, + 'utilized': {'readonly': True}, + 'service_overage': {'readonly': True}, + 'charges_billed_separately': {'readonly': True}, + 'total_overage': {'readonly': True}, + 'total_usage': {'readonly': True}, + 'azure_marketplace_service_charges': {'readonly': True}, + 'price_hidden': {'readonly': True}, + 'new_purchases_details': {'readonly': True}, + 'adjustment_details': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'currency': {'key': 'properties.currency', 'type': 'str'}, + 'beginning_balance': {'key': 'properties.beginningBalance', 'type': 'decimal'}, + 'ending_balance': {'key': 'properties.endingBalance', 'type': 'decimal'}, + 'new_purchases': {'key': 'properties.newPurchases', 'type': 'decimal'}, + 'adjustments': {'key': 'properties.adjustments', 'type': 'decimal'}, + 'utilized': {'key': 'properties.utilized', 'type': 'decimal'}, + 'service_overage': {'key': 'properties.serviceOverage', 'type': 'decimal'}, + 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'decimal'}, + 'total_overage': {'key': 'properties.totalOverage', 'type': 'decimal'}, + 'total_usage': {'key': 'properties.totalUsage', 'type': 'decimal'}, + 'azure_marketplace_service_charges': {'key': 'properties.azureMarketplaceServiceCharges', 'type': 'decimal'}, + 'billing_frequency': {'key': 'properties.billingFrequency', 'type': 'str'}, + 'price_hidden': {'key': 'properties.priceHidden', 'type': 'bool'}, + 'new_purchases_details': {'key': 'properties.newPurchasesDetails', 'type': '[BalancePropertiesNewPurchasesDetailsItem]'}, + 'adjustment_details': {'key': 'properties.adjustmentDetails', 'type': '[BalancePropertiesAdjustmentDetailsItem]'}, + } + + def __init__(self, *, billing_frequency=None, **kwargs) -> None: + super(Balance, self).__init__(**kwargs) + self.currency = None + self.beginning_balance = None + self.ending_balance = None + self.new_purchases = None + self.adjustments = None + self.utilized = None + self.service_overage = None + self.charges_billed_separately = None + self.total_overage = None + self.total_usage = None + self.azure_marketplace_service_charges = None + self.billing_frequency = billing_frequency + self.price_hidden = None + self.new_purchases_details = None + self.adjustment_details = None + + +class BalancePropertiesAdjustmentDetailsItem(Model): + """BalancePropertiesAdjustmentDetailsItem. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: the name of new adjustment. + :vartype name: str + :ivar value: the value of new adjustment. + :vartype value: decimal.Decimal + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'decimal'}, + } + + def __init__(self, **kwargs) -> None: + super(BalancePropertiesAdjustmentDetailsItem, self).__init__(**kwargs) + self.name = None + self.value = None + + +class BalancePropertiesNewPurchasesDetailsItem(Model): + """BalancePropertiesNewPurchasesDetailsItem. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: the name of new purchase. + :vartype name: str + :ivar value: the value of new purchase. + :vartype value: decimal.Decimal + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'decimal'}, + } + + def __init__(self, **kwargs) -> None: + super(BalancePropertiesNewPurchasesDetailsItem, self).__init__(**kwargs) + self.name = None + self.value = None + + +class ProxyResource(Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param e_tag: eTag of the resource. To handle concurrent update scenario, + this field will be used to determine whether the user is updating the + latest version or not. + :type e_tag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + } + + def __init__(self, *, e_tag: str=None, **kwargs) -> None: + super(ProxyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.e_tag = e_tag + + +class Budget(ProxyResource): + """A budget resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param e_tag: eTag of the resource. To handle concurrent update scenario, + this field will be used to determine whether the user is updating the + latest version or not. + :type e_tag: str + :param category: Required. The category of the budget, whether the budget + tracks cost or usage. Possible values include: 'Cost', 'Usage' + :type category: str or ~azure.mgmt.consumption.models.CategoryType + :param amount: Required. The total amount of cost to track with the budget + :type amount: decimal.Decimal + :param time_grain: Required. The time covered by a budget. Tracking of the + amount will be reset based on the time grain. Possible values include: + 'Monthly', 'Quarterly', 'Annually' + :type time_grain: str or ~azure.mgmt.consumption.models.TimeGrainType + :param time_period: Required. Has start and end date of the budget. The + start date must be first of the month and should be less than the end + date. Budget start date must be on or after June 1, 2017. Future start + date should not be more than three months. Past start date should be + selected within the timegrain period. There are no restrictions on the end + date. + :type time_period: ~azure.mgmt.consumption.models.BudgetTimePeriod + :param filters: May be used to filter budgets by resource group, resource, + or meter. + :type filters: ~azure.mgmt.consumption.models.Filters + :ivar current_spend: The current amount of cost which is being tracked for + a budget. + :vartype current_spend: ~azure.mgmt.consumption.models.CurrentSpend + :param notifications: Dictionary of notifications associated with the + budget. Budget can have up to five notifications. + :type notifications: dict[str, + ~azure.mgmt.consumption.models.Notification] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'category': {'required': True}, + 'amount': {'required': True}, + 'time_grain': {'required': True}, + 'time_period': {'required': True}, + 'current_spend': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'category': {'key': 'properties.category', 'type': 'str'}, + 'amount': {'key': 'properties.amount', 'type': 'decimal'}, + 'time_grain': {'key': 'properties.timeGrain', 'type': 'str'}, + 'time_period': {'key': 'properties.timePeriod', 'type': 'BudgetTimePeriod'}, + 'filters': {'key': 'properties.filters', 'type': 'Filters'}, + 'current_spend': {'key': 'properties.currentSpend', 'type': 'CurrentSpend'}, + 'notifications': {'key': 'properties.notifications', 'type': '{Notification}'}, + } + + def __init__(self, *, category, amount, time_grain, time_period, e_tag: str=None, filters=None, notifications=None, **kwargs) -> None: + super(Budget, self).__init__(e_tag=e_tag, **kwargs) + self.category = category + self.amount = amount + self.time_grain = time_grain + self.time_period = time_period + self.filters = filters + self.current_spend = None + self.notifications = notifications + + +class BudgetTimePeriod(Model): + """The start and end date for a budget. + + All required parameters must be populated in order to send to Azure. + + :param start_date: Required. The start date for the budget. + :type start_date: datetime + :param end_date: The end date for the budget. If not provided, we default + this to 10 years from the start date. + :type end_date: datetime + """ + + _validation = { + 'start_date': {'required': True}, + } + + _attribute_map = { + 'start_date': {'key': 'startDate', 'type': 'iso-8601'}, + 'end_date': {'key': 'endDate', 'type': 'iso-8601'}, + } + + def __init__(self, *, start_date, end_date=None, **kwargs) -> None: + super(BudgetTimePeriod, self).__init__(**kwargs) + self.start_date = start_date + self.end_date = end_date + + +class ChargesListResult(Model): + """Result of listing charge summary. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The list of charge summary + :vartype value: list[~azure.mgmt.consumption.models.ChargeSummary] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ChargeSummary]'}, + } + + def __init__(self, **kwargs) -> None: + super(ChargesListResult, self).__init__(**kwargs) + self.value = None + + +class ChargeSummary(Resource): + """A charge summary resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar billing_period_id: The id of the billing period resource that the + charge belongs to. + :vartype billing_period_id: str + :ivar usage_start: Usage start date. + :vartype usage_start: str + :ivar usage_end: Usage end date. + :vartype usage_end: str + :ivar azure_charges: Azure Charges. + :vartype azure_charges: decimal.Decimal + :ivar charges_billed_separately: Charges Billed separately. + :vartype charges_billed_separately: decimal.Decimal + :ivar marketplace_charges: Marketplace Charges. + :vartype marketplace_charges: decimal.Decimal + :ivar currency: Currency Code + :vartype currency: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'billing_period_id': {'readonly': True}, + 'usage_start': {'readonly': True}, + 'usage_end': {'readonly': True}, + 'azure_charges': {'readonly': True}, + 'charges_billed_separately': {'readonly': True}, + 'marketplace_charges': {'readonly': True}, + 'currency': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, + 'usage_start': {'key': 'properties.usageStart', 'type': 'str'}, + 'usage_end': {'key': 'properties.usageEnd', 'type': 'str'}, + 'azure_charges': {'key': 'properties.azureCharges', 'type': 'decimal'}, + 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'decimal'}, + 'marketplace_charges': {'key': 'properties.marketplaceCharges', 'type': 'decimal'}, + 'currency': {'key': 'properties.currency', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ChargeSummary, self).__init__(**kwargs) + self.billing_period_id = None + self.usage_start = None + self.usage_end = None + self.azure_charges = None + self.charges_billed_separately = None + self.marketplace_charges = None + self.currency = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class CurrentSpend(Model): + """The current amount of cost which is being tracked for a budget. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar amount: The total amount of cost which is being tracked by the + budget. + :vartype amount: decimal.Decimal + :ivar unit: The unit of measure for the budget amount. + :vartype unit: str + """ + + _validation = { + 'amount': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'amount': {'key': 'amount', 'type': 'decimal'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CurrentSpend, self).__init__(**kwargs) + self.amount = None + self.unit = None + + +class ErrorDetails(Model): + """The details of the error. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Error code. + :vartype code: str + :ivar message: Error message indicating why the operation failed. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ErrorDetails, self).__init__(**kwargs) + self.code = None + self.message = None + + +class ErrorResponse(Model): + """Error response indicates that the service is not able to process the + incoming request. The reason is provided in the error message. + + :param error: The details of the error. + :type error: ~azure.mgmt.consumption.models.ErrorDetails + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetails'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class Filters(Model): + """May be used to filter budgets by resource group, resource, or meter. + + :param resource_groups: The list of filters on resource groups, allowed at + subscription level only. + :type resource_groups: list[str] + :param resources: The list of filters on resources. + :type resources: list[str] + :param meters: The list of filters on meters (GUID), mandatory for budgets + of usage category. + :type meters: list[str] + :param tags: The dictionary of filters on tags. + :type tags: dict[str, list[str]] + """ + + _validation = { + 'resource_groups': {'max_items': 10, 'min_items': 0}, + 'resources': {'max_items': 10, 'min_items': 0}, + 'meters': {'max_items': 10, 'min_items': 0}, + } + + _attribute_map = { + 'resource_groups': {'key': 'resourceGroups', 'type': '[str]'}, + 'resources': {'key': 'resources', 'type': '[str]'}, + 'meters': {'key': 'meters', 'type': '[str]'}, + 'tags': {'key': 'tags', 'type': '{[str]}'}, + } + + def __init__(self, *, resource_groups=None, resources=None, meters=None, tags=None, **kwargs) -> None: + super(Filters, self).__init__(**kwargs) + self.resource_groups = resource_groups + self.resources = resources + self.meters = meters + self.tags = tags + + +class Forecast(Resource): + """A forecast resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar usage_date: The usage date of the forecast. + :vartype usage_date: str + :param grain: The granularity of forecast. Possible values include: + 'Daily', 'Monthly', 'Yearly' + :type grain: str or ~azure.mgmt.consumption.models.Grain + :ivar charge: The amount of charge + :vartype charge: decimal.Decimal + :ivar currency: The ISO currency in which the meter is charged, for + example, USD. + :vartype currency: str + :param charge_type: The type of the charge. Could be actual or forecast. + Possible values include: 'Actual', 'Forecast' + :type charge_type: str or ~azure.mgmt.consumption.models.ChargeType + :ivar confidence_levels: The details about the forecast confidence levels. + This is populated only when chargeType is Forecast. + :vartype confidence_levels: + list[~azure.mgmt.consumption.models.ForecastPropertiesConfidenceLevelsItem] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'usage_date': {'readonly': True}, + 'charge': {'readonly': True}, + 'currency': {'readonly': True}, + 'confidence_levels': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'usage_date': {'key': 'properties.usageDate', 'type': 'str'}, + 'grain': {'key': 'properties.grain', 'type': 'str'}, + 'charge': {'key': 'properties.charge', 'type': 'decimal'}, + 'currency': {'key': 'properties.currency', 'type': 'str'}, + 'charge_type': {'key': 'properties.chargeType', 'type': 'str'}, + 'confidence_levels': {'key': 'properties.confidenceLevels', 'type': '[ForecastPropertiesConfidenceLevelsItem]'}, + } + + def __init__(self, *, grain=None, charge_type=None, **kwargs) -> None: + super(Forecast, self).__init__(**kwargs) + self.usage_date = None + self.grain = grain + self.charge = None + self.currency = None + self.charge_type = charge_type + self.confidence_levels = None + + +class ForecastPropertiesConfidenceLevelsItem(Model): + """ForecastPropertiesConfidenceLevelsItem. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar percentage: The percentage level of the confidence + :vartype percentage: decimal.Decimal + :param bound: The boundary of the percentage, values could be 'Upper' or + 'Lower'. Possible values include: 'Upper', 'Lower' + :type bound: str or ~azure.mgmt.consumption.models.Bound + :ivar value: The amount of forecast within the percentage level + :vartype value: decimal.Decimal + """ + + _validation = { + 'percentage': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'percentage': {'key': 'percentage', 'type': 'decimal'}, + 'bound': {'key': 'bound', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'decimal'}, + } + + def __init__(self, *, bound=None, **kwargs) -> None: + super(ForecastPropertiesConfidenceLevelsItem, self).__init__(**kwargs) + self.percentage = None + self.bound = bound + self.value = None + + +class ManagementGroupAggregatedCostResult(Resource): + """A management group aggregated cost resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar billing_period_id: The id of the billing period resource that the + aggregated cost belongs to. + :vartype billing_period_id: str + :ivar usage_start: The start of the date time range covered by aggregated + cost. + :vartype usage_start: datetime + :ivar usage_end: The end of the date time range covered by the aggregated + cost. + :vartype usage_end: datetime + :ivar azure_charges: Azure Charges. + :vartype azure_charges: decimal.Decimal + :ivar marketplace_charges: Marketplace Charges. + :vartype marketplace_charges: decimal.Decimal + :ivar charges_billed_separately: Charges Billed Separately. + :vartype charges_billed_separately: decimal.Decimal + :ivar currency: The ISO currency in which the meter is charged, for + example, USD. + :vartype currency: str + :param children: Children of a management group + :type children: + list[~azure.mgmt.consumption.models.ManagementGroupAggregatedCostResult] + :param included_subscriptions: List of subscription Guids included in the + calculation of aggregated cost + :type included_subscriptions: list[str] + :param excluded_subscriptions: List of subscription Guids excluded from + the calculation of aggregated cost + :type excluded_subscriptions: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'billing_period_id': {'readonly': True}, + 'usage_start': {'readonly': True}, + 'usage_end': {'readonly': True}, + 'azure_charges': {'readonly': True}, + 'marketplace_charges': {'readonly': True}, + 'charges_billed_separately': {'readonly': True}, + 'currency': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, + 'usage_start': {'key': 'properties.usageStart', 'type': 'iso-8601'}, + 'usage_end': {'key': 'properties.usageEnd', 'type': 'iso-8601'}, + 'azure_charges': {'key': 'properties.azureCharges', 'type': 'decimal'}, + 'marketplace_charges': {'key': 'properties.marketplaceCharges', 'type': 'decimal'}, + 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'decimal'}, + 'currency': {'key': 'properties.currency', 'type': 'str'}, + 'children': {'key': 'properties.children', 'type': '[ManagementGroupAggregatedCostResult]'}, + 'included_subscriptions': {'key': 'properties.includedSubscriptions', 'type': '[str]'}, + 'excluded_subscriptions': {'key': 'properties.excludedSubscriptions', 'type': '[str]'}, + } + + def __init__(self, *, children=None, included_subscriptions=None, excluded_subscriptions=None, **kwargs) -> None: + super(ManagementGroupAggregatedCostResult, self).__init__(**kwargs) + self.billing_period_id = None + self.usage_start = None + self.usage_end = None + self.azure_charges = None + self.marketplace_charges = None + self.charges_billed_separately = None + self.currency = None + self.children = children + self.included_subscriptions = included_subscriptions + self.excluded_subscriptions = excluded_subscriptions + + +class Marketplace(Resource): + """An marketplace resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar billing_period_id: The id of the billing period resource that the + usage belongs to. + :vartype billing_period_id: str + :ivar usage_start: The start of the date time range covered by the usage + detail. + :vartype usage_start: datetime + :ivar usage_end: The end of the date time range covered by the usage + detail. + :vartype usage_end: datetime + :ivar resource_rate: The marketplace resource rate. + :vartype resource_rate: decimal.Decimal + :ivar offer_name: The type of offer. + :vartype offer_name: str + :ivar resource_group: The name of resource group. + :vartype resource_group: str + :ivar order_number: The order number. + :vartype order_number: str + :ivar instance_name: The name of the resource instance that the usage is + about. + :vartype instance_name: str + :ivar instance_id: The uri of the resource instance that the usage is + about. + :vartype instance_id: str + :ivar currency: The ISO currency in which the meter is charged, for + example, USD. + :vartype currency: str + :ivar consumed_quantity: The quantity of usage. + :vartype consumed_quantity: decimal.Decimal + :ivar unit_of_measure: The unit of measure. + :vartype unit_of_measure: str + :ivar pretax_cost: The amount of cost before tax. + :vartype pretax_cost: decimal.Decimal + :ivar is_estimated: The estimated usage is subject to change. + :vartype is_estimated: bool + :ivar meter_id: The meter id (GUID). + :vartype meter_id: str + :ivar subscription_guid: Subscription guid. + :vartype subscription_guid: str + :ivar subscription_name: Subscription name. + :vartype subscription_name: str + :ivar account_name: Account name. + :vartype account_name: str + :ivar department_name: Department name. + :vartype department_name: str + :ivar consumed_service: Consumed service name. + :vartype consumed_service: str + :ivar cost_center: The cost center of this department if it is a + department and a costcenter exists + :vartype cost_center: str + :ivar additional_properties: Additional details of this usage item. By + default this is not populated, unless it's specified in $expand. + :vartype additional_properties: str + :ivar publisher_name: The name of publisher. + :vartype publisher_name: str + :ivar plan_name: The name of plan. + :vartype plan_name: str + :ivar is_recurring_charge: Flag indicating whether this is a recurring + charge or not. + :vartype is_recurring_charge: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'billing_period_id': {'readonly': True}, + 'usage_start': {'readonly': True}, + 'usage_end': {'readonly': True}, + 'resource_rate': {'readonly': True}, + 'offer_name': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'order_number': {'readonly': True}, + 'instance_name': {'readonly': True}, + 'instance_id': {'readonly': True}, + 'currency': {'readonly': True}, + 'consumed_quantity': {'readonly': True}, + 'unit_of_measure': {'readonly': True}, + 'pretax_cost': {'readonly': True}, + 'is_estimated': {'readonly': True}, + 'meter_id': {'readonly': True}, + 'subscription_guid': {'readonly': True}, + 'subscription_name': {'readonly': True}, + 'account_name': {'readonly': True}, + 'department_name': {'readonly': True}, + 'consumed_service': {'readonly': True}, + 'cost_center': {'readonly': True}, + 'additional_properties': {'readonly': True}, + 'publisher_name': {'readonly': True}, + 'plan_name': {'readonly': True}, + 'is_recurring_charge': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, + 'usage_start': {'key': 'properties.usageStart', 'type': 'iso-8601'}, + 'usage_end': {'key': 'properties.usageEnd', 'type': 'iso-8601'}, + 'resource_rate': {'key': 'properties.resourceRate', 'type': 'decimal'}, + 'offer_name': {'key': 'properties.offerName', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'order_number': {'key': 'properties.orderNumber', 'type': 'str'}, + 'instance_name': {'key': 'properties.instanceName', 'type': 'str'}, + 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, + 'currency': {'key': 'properties.currency', 'type': 'str'}, + 'consumed_quantity': {'key': 'properties.consumedQuantity', 'type': 'decimal'}, + 'unit_of_measure': {'key': 'properties.unitOfMeasure', 'type': 'str'}, + 'pretax_cost': {'key': 'properties.pretaxCost', 'type': 'decimal'}, + 'is_estimated': {'key': 'properties.isEstimated', 'type': 'bool'}, + 'meter_id': {'key': 'properties.meterId', 'type': 'str'}, + 'subscription_guid': {'key': 'properties.subscriptionGuid', 'type': 'str'}, + 'subscription_name': {'key': 'properties.subscriptionName', 'type': 'str'}, + 'account_name': {'key': 'properties.accountName', 'type': 'str'}, + 'department_name': {'key': 'properties.departmentName', 'type': 'str'}, + 'consumed_service': {'key': 'properties.consumedService', 'type': 'str'}, + 'cost_center': {'key': 'properties.costCenter', 'type': 'str'}, + 'additional_properties': {'key': 'properties.additionalProperties', 'type': 'str'}, + 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, + 'plan_name': {'key': 'properties.planName', 'type': 'str'}, + 'is_recurring_charge': {'key': 'properties.isRecurringCharge', 'type': 'bool'}, + } + + def __init__(self, **kwargs) -> None: + super(Marketplace, self).__init__(**kwargs) + self.billing_period_id = None + self.usage_start = None + self.usage_end = None + self.resource_rate = None + self.offer_name = None + self.resource_group = None + self.order_number = None + self.instance_name = None + self.instance_id = None + self.currency = None + self.consumed_quantity = None + self.unit_of_measure = None + self.pretax_cost = None + self.is_estimated = None + self.meter_id = None + self.subscription_guid = None + self.subscription_name = None + self.account_name = None + self.department_name = None + self.consumed_service = None + self.cost_center = None + self.additional_properties = None + self.publisher_name = None + self.plan_name = None + self.is_recurring_charge = None + + +class MeterDetails(Model): + """The properties of the meter detail. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar meter_name: The name of the meter, within the given meter category + :vartype meter_name: str + :ivar meter_category: The category of the meter, for example, 'Cloud + services', 'Networking', etc.. + :vartype meter_category: str + :ivar meter_sub_category: The subcategory of the meter, for example, 'A6 + Cloud services', 'ExpressRoute (IXP)', etc.. + :vartype meter_sub_category: str + :ivar unit: The unit in which the meter consumption is charged, for + example, 'Hours', 'GB', etc. + :vartype unit: str + :ivar meter_location: The location in which the Azure service is + available. + :vartype meter_location: str + :ivar total_included_quantity: The total included quantity associated with + the offer. + :vartype total_included_quantity: decimal.Decimal + :ivar pretax_standard_rate: The pretax listing price. + :vartype pretax_standard_rate: decimal.Decimal + :ivar service_name: The name of the service. + :vartype service_name: str + :ivar service_tier: The service tier. + :vartype service_tier: str + """ + + _validation = { + 'meter_name': {'readonly': True}, + 'meter_category': {'readonly': True}, + 'meter_sub_category': {'readonly': True}, + 'unit': {'readonly': True}, + 'meter_location': {'readonly': True}, + 'total_included_quantity': {'readonly': True}, + 'pretax_standard_rate': {'readonly': True}, + 'service_name': {'readonly': True}, + 'service_tier': {'readonly': True}, + } + + _attribute_map = { + 'meter_name': {'key': 'meterName', 'type': 'str'}, + 'meter_category': {'key': 'meterCategory', 'type': 'str'}, + 'meter_sub_category': {'key': 'meterSubCategory', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'meter_location': {'key': 'meterLocation', 'type': 'str'}, + 'total_included_quantity': {'key': 'totalIncludedQuantity', 'type': 'decimal'}, + 'pretax_standard_rate': {'key': 'pretaxStandardRate', 'type': 'decimal'}, + 'service_name': {'key': 'serviceName', 'type': 'str'}, + 'service_tier': {'key': 'serviceTier', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(MeterDetails, self).__init__(**kwargs) + self.meter_name = None + self.meter_category = None + self.meter_sub_category = None + self.unit = None + self.meter_location = None + self.total_included_quantity = None + self.pretax_standard_rate = None + self.service_name = None + self.service_tier = None + + +class MeterDetailsResponse(Model): + """The properties of the meter detail. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar meter_name: The name of the meter, within the given meter category + :vartype meter_name: str + :ivar meter_category: The category of the meter, for example, 'Cloud + services', 'Networking', etc.. + :vartype meter_category: str + :ivar meter_sub_category: The subcategory of the meter, for example, 'A6 + Cloud services', 'ExpressRoute (IXP)', etc.. + :vartype meter_sub_category: str + :ivar unit_of_measure: The unit in which the meter consumption is charged, + for example, 'Hours', 'GB', etc. + :vartype unit_of_measure: str + :ivar service_family: The service family. + :vartype service_family: str + """ + + _validation = { + 'meter_name': {'readonly': True}, + 'meter_category': {'readonly': True}, + 'meter_sub_category': {'readonly': True}, + 'unit_of_measure': {'readonly': True}, + 'service_family': {'readonly': True}, + } + + _attribute_map = { + 'meter_name': {'key': 'meterName', 'type': 'str'}, + 'meter_category': {'key': 'meterCategory', 'type': 'str'}, + 'meter_sub_category': {'key': 'meterSubCategory', 'type': 'str'}, + 'unit_of_measure': {'key': 'unitOfMeasure', 'type': 'str'}, + 'service_family': {'key': 'serviceFamily', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(MeterDetailsResponse, self).__init__(**kwargs) + self.meter_name = None + self.meter_category = None + self.meter_sub_category = None + self.unit_of_measure = None + self.service_family = None + + +class Notification(Model): + """The notification associated with a budget. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. The notification is enabled or not. + :type enabled: bool + :param operator: Required. The comparison operator. Possible values + include: 'EqualTo', 'GreaterThan', 'GreaterThanOrEqualTo' + :type operator: str or ~azure.mgmt.consumption.models.OperatorType + :param threshold: Required. Threshold value associated with a + notification. Notification is sent when the cost exceeded the threshold. + It is always percent and has to be between 0 and 1000. + :type threshold: decimal.Decimal + :param contact_emails: Required. Email addresses to send the budget + notification to when the threshold is exceeded. + :type contact_emails: list[str] + :param contact_roles: Contact roles to send the budget notification to + when the threshold is exceeded. + :type contact_roles: list[str] + :param contact_groups: Action groups to send the budget notification to + when the threshold is exceeded. + :type contact_groups: list[str] + """ + + _validation = { + 'enabled': {'required': True}, + 'operator': {'required': True}, + 'threshold': {'required': True}, + 'contact_emails': {'required': True, 'max_items': 50, 'min_items': 1}, + 'contact_groups': {'max_items': 50, 'min_items': 0}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'threshold': {'key': 'threshold', 'type': 'decimal'}, + 'contact_emails': {'key': 'contactEmails', 'type': '[str]'}, + 'contact_roles': {'key': 'contactRoles', 'type': '[str]'}, + 'contact_groups': {'key': 'contactGroups', 'type': '[str]'}, + } + + def __init__(self, *, enabled: bool, operator, threshold, contact_emails, contact_roles=None, contact_groups=None, **kwargs) -> None: + super(Notification, self).__init__(**kwargs) + self.enabled = enabled + self.operator = operator + self.threshold = threshold + self.contact_emails = contact_emails + self.contact_roles = contact_roles + self.contact_groups = contact_groups + + +class Operation(Model): + """A Consumption REST API operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation name: {provider}/{resource}/{operation}. + :vartype name: str + :param display: The object that represents the operation. + :type display: ~azure.mgmt.consumption.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = display + + +class OperationDisplay(Model): + """The object that represents the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: Service provider: Microsoft.Consumption. + :vartype provider: str + :ivar resource: Resource on which the operation is performed: UsageDetail, + etc. + :vartype resource: str + :ivar operation: Operation type: Read, write, delete, etc. + :vartype operation: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + + +class PriceSheetProperties(Model): + """The properties of the price sheet. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar billing_period_id: The id of the billing period resource that the + usage belongs to. + :vartype billing_period_id: str + :ivar meter_id: The meter id (GUID) + :vartype meter_id: str + :ivar meter_details: The details about the meter. By default this is not + populated, unless it's specified in $expand. + :vartype meter_details: ~azure.mgmt.consumption.models.MeterDetails + :ivar unit_of_measure: Unit of measure + :vartype unit_of_measure: str + :ivar included_quantity: Included quality for an offer + :vartype included_quantity: decimal.Decimal + :ivar part_number: Part Number + :vartype part_number: str + :ivar unit_price: Unit Price + :vartype unit_price: decimal.Decimal + :ivar currency_code: Currency Code + :vartype currency_code: str + :ivar offer_id: Offer Id + :vartype offer_id: str + """ + + _validation = { + 'billing_period_id': {'readonly': True}, + 'meter_id': {'readonly': True}, + 'meter_details': {'readonly': True}, + 'unit_of_measure': {'readonly': True}, + 'included_quantity': {'readonly': True}, + 'part_number': {'readonly': True}, + 'unit_price': {'readonly': True}, + 'currency_code': {'readonly': True}, + 'offer_id': {'readonly': True}, + } + + _attribute_map = { + 'billing_period_id': {'key': 'billingPeriodId', 'type': 'str'}, + 'meter_id': {'key': 'meterId', 'type': 'str'}, + 'meter_details': {'key': 'meterDetails', 'type': 'MeterDetails'}, + 'unit_of_measure': {'key': 'unitOfMeasure', 'type': 'str'}, + 'included_quantity': {'key': 'includedQuantity', 'type': 'decimal'}, + 'part_number': {'key': 'partNumber', 'type': 'str'}, + 'unit_price': {'key': 'unitPrice', 'type': 'decimal'}, + 'currency_code': {'key': 'currencyCode', 'type': 'str'}, + 'offer_id': {'key': 'offerId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(PriceSheetProperties, self).__init__(**kwargs) + self.billing_period_id = None + self.meter_id = None + self.meter_details = None + self.unit_of_measure = None + self.included_quantity = None + self.part_number = None + self.unit_price = None + self.currency_code = None + self.offer_id = None + + +class PriceSheetResult(Resource): + """An pricesheet resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar pricesheets: Price sheet + :vartype pricesheets: + list[~azure.mgmt.consumption.models.PriceSheetProperties] + :ivar next_link: The link (url) to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'pricesheets': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'pricesheets': {'key': 'properties.pricesheets', 'type': '[PriceSheetProperties]'}, + 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(PriceSheetResult, self).__init__(**kwargs) + self.pricesheets = None + self.next_link = None + + +class ReservationDetail(Resource): + """reservation detail resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar reservation_order_id: The reservation order ID is the identifier for + a reservation purchase. Each reservation order ID represents a single + purchase transaction. A reservation order contains reservations. The + reservation order specifies the VM size and region for the reservations. + :vartype reservation_order_id: str + :ivar reservation_id: The reservation ID is the identifier of a + reservation within a reservation order. Each reservation is the grouping + for applying the benefit scope and also specifies the number of instances + to which the reservation benefit can be applied to. + :vartype reservation_id: str + :ivar sku_name: This is the ARM Sku name. It can be used to join with the + serviceType field in additional info in usage records. + :vartype sku_name: str + :ivar reserved_hours: This is the total hours reserved for the day. E.g. + if reservation for 1 instance was made on 1 PM, this will be 11 hours for + that day and 24 hours from subsequent days. + :vartype reserved_hours: decimal.Decimal + :ivar usage_date: The date on which consumption occurred. + :vartype usage_date: datetime + :ivar used_hours: This is the total hours used by the instance. + :vartype used_hours: decimal.Decimal + :ivar instance_id: This identifier is the name of the resource or the + fully qualified Resource ID. + :vartype instance_id: str + :ivar total_reserved_quantity: This is the total count of instances that + are reserved for the reservationId. + :vartype total_reserved_quantity: decimal.Decimal + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'reservation_order_id': {'readonly': True}, + 'reservation_id': {'readonly': True}, + 'sku_name': {'readonly': True}, + 'reserved_hours': {'readonly': True}, + 'usage_date': {'readonly': True}, + 'used_hours': {'readonly': True}, + 'instance_id': {'readonly': True}, + 'total_reserved_quantity': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'reservation_order_id': {'key': 'properties.reservationOrderId', 'type': 'str'}, + 'reservation_id': {'key': 'properties.reservationId', 'type': 'str'}, + 'sku_name': {'key': 'properties.skuName', 'type': 'str'}, + 'reserved_hours': {'key': 'properties.reservedHours', 'type': 'decimal'}, + 'usage_date': {'key': 'properties.usageDate', 'type': 'iso-8601'}, + 'used_hours': {'key': 'properties.usedHours', 'type': 'decimal'}, + 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, + 'total_reserved_quantity': {'key': 'properties.totalReservedQuantity', 'type': 'decimal'}, + } + + def __init__(self, **kwargs) -> None: + super(ReservationDetail, self).__init__(**kwargs) + self.reservation_order_id = None + self.reservation_id = None + self.sku_name = None + self.reserved_hours = None + self.usage_date = None + self.used_hours = None + self.instance_id = None + self.total_reserved_quantity = None + + +class ReservationRecommendation(Model): + """Reservation recommendation resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: Resource location + :vartype location: str + :ivar sku: Resource sku + :vartype sku: str + :ivar look_back_period: The number of days of usage to look back for + recommendation. + :vartype look_back_period: str + :ivar meter_id: The meter id (GUID) + :vartype meter_id: str + :ivar term: RI recommendations in one or three year terms. + :vartype term: str + :ivar cost_with_no_reserved_instances: The total amount of cost without + reserved instances. + :vartype cost_with_no_reserved_instances: decimal.Decimal + :ivar recommended_quantity: Recommended quality for reserved instances. + :vartype recommended_quantity: decimal.Decimal + :ivar total_cost_with_reserved_instances: The total amount of cost with + reserved instances. + :vartype total_cost_with_reserved_instances: decimal.Decimal + :ivar net_savings: Total estimated savings with reserved instances. + :vartype net_savings: decimal.Decimal + :ivar first_usage_date: The usage date for looking back. + :vartype first_usage_date: datetime + :ivar scope: Shared or single recommendation. + :vartype scope: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'location': {'readonly': True}, + 'sku': {'readonly': True}, + 'look_back_period': {'readonly': True}, + 'meter_id': {'readonly': True}, + 'term': {'readonly': True}, + 'cost_with_no_reserved_instances': {'readonly': True}, + 'recommended_quantity': {'readonly': True}, + 'total_cost_with_reserved_instances': {'readonly': True}, + 'net_savings': {'readonly': True}, + 'first_usage_date': {'readonly': True}, + 'scope': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'look_back_period': {'key': 'properties.lookBackPeriod', 'type': 'str'}, + 'meter_id': {'key': 'properties.meterId', 'type': 'str'}, + 'term': {'key': 'properties.term', 'type': 'str'}, + 'cost_with_no_reserved_instances': {'key': 'properties.costWithNoReservedInstances', 'type': 'decimal'}, + 'recommended_quantity': {'key': 'properties.recommendedQuantity', 'type': 'decimal'}, + 'total_cost_with_reserved_instances': {'key': 'properties.totalCostWithReservedInstances', 'type': 'decimal'}, + 'net_savings': {'key': 'properties.netSavings', 'type': 'decimal'}, + 'first_usage_date': {'key': 'properties.firstUsageDate', 'type': 'iso-8601'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ReservationRecommendation, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = None + self.location = None + self.sku = None + self.look_back_period = None + self.meter_id = None + self.term = None + self.cost_with_no_reserved_instances = None + self.recommended_quantity = None + self.total_cost_with_reserved_instances = None + self.net_savings = None + self.first_usage_date = None + self.scope = None + + +class ReservationSummary(Resource): + """reservation summary resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar reservation_order_id: The reservation order ID is the identifier for + a reservation purchase. Each reservation order ID represents a single + purchase transaction. A reservation order contains reservations. The + reservation order specifies the VM size and region for the reservations. + :vartype reservation_order_id: str + :ivar reservation_id: The reservation ID is the identifier of a + reservation within a reservation order. Each reservation is the grouping + for applying the benefit scope and also specifies the number of instances + to which the reservation benefit can be applied to. + :vartype reservation_id: str + :ivar sku_name: This is the ARM Sku name. It can be used to join with the + serviceType field in additional info in usage records. + :vartype sku_name: str + :ivar reserved_hours: This is the total hours reserved. E.g. if + reservation for 1 instance was made on 1 PM, this will be 11 hours for + that day and 24 hours from subsequent days + :vartype reserved_hours: decimal.Decimal + :ivar usage_date: Data corresponding to the utilization record. If the + grain of data is monthly, it will be first day of month. + :vartype usage_date: datetime + :ivar used_hours: Total used hours by the reservation + :vartype used_hours: decimal.Decimal + :ivar min_utilization_percentage: This is the minimum hourly utilization + in the usage time (day or month). E.g. if usage record corresponds to + 12/10/2017 and on that for hour 4 and 5, utilization was 10%, this field + will return 10% for that day + :vartype min_utilization_percentage: decimal.Decimal + :ivar avg_utilization_percentage: This is average utilization for the + entire time range. (day or month depending on the grain) + :vartype avg_utilization_percentage: decimal.Decimal + :ivar max_utilization_percentage: This is the maximum hourly utilization + in the usage time (day or month). E.g. if usage record corresponds to + 12/10/2017 and on that for hour 4 and 5, utilization was 100%, this field + will return 100% for that day. + :vartype max_utilization_percentage: decimal.Decimal + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'reservation_order_id': {'readonly': True}, + 'reservation_id': {'readonly': True}, + 'sku_name': {'readonly': True}, + 'reserved_hours': {'readonly': True}, + 'usage_date': {'readonly': True}, + 'used_hours': {'readonly': True}, + 'min_utilization_percentage': {'readonly': True}, + 'avg_utilization_percentage': {'readonly': True}, + 'max_utilization_percentage': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'reservation_order_id': {'key': 'properties.reservationOrderId', 'type': 'str'}, + 'reservation_id': {'key': 'properties.reservationId', 'type': 'str'}, + 'sku_name': {'key': 'properties.skuName', 'type': 'str'}, + 'reserved_hours': {'key': 'properties.reservedHours', 'type': 'decimal'}, + 'usage_date': {'key': 'properties.usageDate', 'type': 'iso-8601'}, + 'used_hours': {'key': 'properties.usedHours', 'type': 'decimal'}, + 'min_utilization_percentage': {'key': 'properties.minUtilizationPercentage', 'type': 'decimal'}, + 'avg_utilization_percentage': {'key': 'properties.avgUtilizationPercentage', 'type': 'decimal'}, + 'max_utilization_percentage': {'key': 'properties.maxUtilizationPercentage', 'type': 'decimal'}, + } + + def __init__(self, **kwargs) -> None: + super(ReservationSummary, self).__init__(**kwargs) + self.reservation_order_id = None + self.reservation_id = None + self.sku_name = None + self.reserved_hours = None + self.usage_date = None + self.used_hours = None + self.min_utilization_percentage = None + self.avg_utilization_percentage = None + self.max_utilization_percentage = None + + +class ResourceAttributes(Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar location: Resource location + :vartype location: str + :ivar sku: Resource sku + :vartype sku: str + """ + + _validation = { + 'location': {'readonly': True}, + 'sku': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceAttributes, self).__init__(**kwargs) + self.location = None + self.sku = None + + +class Tag(Model): + """The tag resource. + + :param key: Tag key. + :type key: str + """ + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + } + + def __init__(self, *, key: str=None, **kwargs) -> None: + super(Tag, self).__init__(**kwargs) + self.key = key + + +class TagsResult(ProxyResource): + """A resource listing all tags. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param e_tag: eTag of the resource. To handle concurrent update scenario, + this field will be used to determine whether the user is updating the + latest version or not. + :type e_tag: str + :param tags: A list of Tag. + :type tags: list[~azure.mgmt.consumption.models.Tag] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'tags': {'key': 'properties.tags', 'type': '[Tag]'}, + } + + def __init__(self, *, e_tag: str=None, tags=None, **kwargs) -> None: + super(TagsResult, self).__init__(e_tag=e_tag, **kwargs) + self.tags = tags + + +class UsageDetail(Resource): + """An usage detail resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar billing_account_id: Billing Account identifier. + :vartype billing_account_id: str + :ivar billing_account_name: Billing Account Name. + :vartype billing_account_name: str + :ivar billing_period_start_date: The billing period start date. + :vartype billing_period_start_date: datetime + :ivar billing_period_end_date: The billing period end date. + :vartype billing_period_end_date: datetime + :ivar billing_profile_id: Billing Profile identifier. + :vartype billing_profile_id: str + :ivar billing_profile_name: Billing Profile Name. + :vartype billing_profile_name: str + :ivar account_owner_id: Account Owner Id. + :vartype account_owner_id: str + :ivar account_name: Account Name. + :vartype account_name: str + :ivar subscription_id: Subscription guid. + :vartype subscription_id: str + :ivar subscription_name: Subscription name. + :vartype subscription_name: str + :ivar date_property: Date for the usage record. + :vartype date_property: datetime + :ivar product: Product name for the consumed service or purchase. Not + available for Marketplace. + :vartype product: str + :ivar part_number: Part Number of the service used. Can be used to join + with the price sheet. Not available for marketplace. + :vartype part_number: str + :ivar meter_id: The meter id (GUID). Not available for marketplace. For + reserved instance this represents the primary meter for which the + reservation was purchased. For the actual VM Size for which the + reservation is purchased see productOrderName. + :vartype meter_id: str + :ivar meter_details: The details about the meter. By default this is not + populated, unless it's specified in $expand. + :vartype meter_details: + ~azure.mgmt.consumption.models.MeterDetailsResponse + :ivar quantity: The usage quantity. + :vartype quantity: decimal.Decimal + :ivar effective_price: Effective Price that’s charged for the usage. + :vartype effective_price: decimal.Decimal + :ivar cost: The amount of cost before tax. + :vartype cost: decimal.Decimal + :ivar unit_price: Unit Price is the price applicable to you. (your EA or + other contract price). + :vartype unit_price: decimal.Decimal + :ivar billing_currency: Billing Currency. + :vartype billing_currency: str + :ivar resource_location: Resource Location. + :vartype resource_location: str + :ivar consumed_service: Consumed service name. Name of the azure resource + provider that emits the usage or was purchased. This value is not provided + for marketplace usage. + :vartype consumed_service: str + :ivar resource_id: Azure resource manager resource identifier. + :vartype resource_id: str + :ivar resource_name: Resource Name. + :vartype resource_name: str + :ivar service_info1: Service Info 1. + :vartype service_info1: str + :ivar service_info2: Service Info 2. + :vartype service_info2: str + :ivar additional_info: Additional details of this usage item. By default + this is not populated, unless it's specified in $expand. Use this field to + get usage line item specific details such as the actual VM Size + (ServiceType) or the ratio in which the reservation discount is applied. + :vartype additional_info: str + :ivar invoice_section: Invoice Section Name. + :vartype invoice_section: str + :ivar cost_center: The cost center of this department if it is a + department and a cost center is provided. + :vartype cost_center: str + :ivar resource_group: Resource Group Name. + :vartype resource_group: str + :ivar reservation_id: ARM resource id of the reservation. Only applies to + records relevant to reservations. + :vartype reservation_id: str + :ivar reservation_name: User provided display name of the reservation. + Last known name for a particular day is populated in the daily data. Only + applies to records relevant to reservations. + :vartype reservation_name: str + :ivar product_order_id: Product Order Id. For reservations this is the + Reservation Order ID. + :vartype product_order_id: str + :ivar product_order_name: Product Order Name. For reservations this is the + SKU that was purchased. + :vartype product_order_name: str + :ivar offer_id: Offer Id. Ex: MS-AZR-0017P, MS-AZR-0148P. + :vartype offer_id: str + :ivar is_azure_credit_eligible: Is Azure Credit Eligible. + :vartype is_azure_credit_eligible: bool + :ivar term: Term (in months). 1 month for monthly recurring purchase. 12 + months for a 1 year reservation. 36 months for a 3 year reservation. + :vartype term: str + :ivar publisher_name: Publisher Name. + :vartype publisher_name: str + :ivar publisher_type: Publisher Type. + :vartype publisher_type: str + :ivar plan_name: Plan Name. + :vartype plan_name: str + :ivar charge_type: Indicates a charge represents credits, usage, a + Marketplace purchase, a reservation fee, or a refund. + :vartype charge_type: str + :ivar frequency: Indicates how frequently this charge will occur. OneTime + for purchases which only happen once, Monthly for fees which recur every + month, and UsageBased for charges based on how much a service is used. + :vartype frequency: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'billing_account_id': {'readonly': True}, + 'billing_account_name': {'readonly': True}, + 'billing_period_start_date': {'readonly': True}, + 'billing_period_end_date': {'readonly': True}, + 'billing_profile_id': {'readonly': True}, + 'billing_profile_name': {'readonly': True}, + 'account_owner_id': {'readonly': True}, + 'account_name': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'subscription_name': {'readonly': True}, + 'date_property': {'readonly': True}, + 'product': {'readonly': True}, + 'part_number': {'readonly': True}, + 'meter_id': {'readonly': True}, + 'meter_details': {'readonly': True}, + 'quantity': {'readonly': True}, + 'effective_price': {'readonly': True}, + 'cost': {'readonly': True}, + 'unit_price': {'readonly': True}, + 'billing_currency': {'readonly': True}, + 'resource_location': {'readonly': True}, + 'consumed_service': {'readonly': True}, + 'resource_id': {'readonly': True}, + 'resource_name': {'readonly': True}, + 'service_info1': {'readonly': True}, + 'service_info2': {'readonly': True}, + 'additional_info': {'readonly': True}, + 'invoice_section': {'readonly': True}, + 'cost_center': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'reservation_id': {'readonly': True}, + 'reservation_name': {'readonly': True}, + 'product_order_id': {'readonly': True}, + 'product_order_name': {'readonly': True}, + 'offer_id': {'readonly': True}, + 'is_azure_credit_eligible': {'readonly': True}, + 'term': {'readonly': True}, + 'publisher_name': {'readonly': True}, + 'publisher_type': {'readonly': True}, + 'plan_name': {'readonly': True}, + 'charge_type': {'readonly': True}, + 'frequency': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'billing_account_id': {'key': 'properties.billingAccountId', 'type': 'str'}, + 'billing_account_name': {'key': 'properties.billingAccountName', 'type': 'str'}, + 'billing_period_start_date': {'key': 'properties.billingPeriodStartDate', 'type': 'iso-8601'}, + 'billing_period_end_date': {'key': 'properties.billingPeriodEndDate', 'type': 'iso-8601'}, + 'billing_profile_id': {'key': 'properties.billingProfileId', 'type': 'str'}, + 'billing_profile_name': {'key': 'properties.billingProfileName', 'type': 'str'}, + 'account_owner_id': {'key': 'properties.accountOwnerId', 'type': 'str'}, + 'account_name': {'key': 'properties.accountName', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'subscription_name': {'key': 'properties.subscriptionName', 'type': 'str'}, + 'date_property': {'key': 'properties.date', 'type': 'iso-8601'}, + 'product': {'key': 'properties.product', 'type': 'str'}, + 'part_number': {'key': 'properties.partNumber', 'type': 'str'}, + 'meter_id': {'key': 'properties.meterId', 'type': 'str'}, + 'meter_details': {'key': 'properties.meterDetails', 'type': 'MeterDetailsResponse'}, + 'quantity': {'key': 'properties.quantity', 'type': 'decimal'}, + 'effective_price': {'key': 'properties.effectivePrice', 'type': 'decimal'}, + 'cost': {'key': 'properties.cost', 'type': 'decimal'}, + 'unit_price': {'key': 'properties.unitPrice', 'type': 'decimal'}, + 'billing_currency': {'key': 'properties.billingCurrency', 'type': 'str'}, + 'resource_location': {'key': 'properties.resourceLocation', 'type': 'str'}, + 'consumed_service': {'key': 'properties.consumedService', 'type': 'str'}, + 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, + 'resource_name': {'key': 'properties.resourceName', 'type': 'str'}, + 'service_info1': {'key': 'properties.serviceInfo1', 'type': 'str'}, + 'service_info2': {'key': 'properties.serviceInfo2', 'type': 'str'}, + 'additional_info': {'key': 'properties.additionalInfo', 'type': 'str'}, + 'invoice_section': {'key': 'properties.invoiceSection', 'type': 'str'}, + 'cost_center': {'key': 'properties.costCenter', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'reservation_id': {'key': 'properties.reservationId', 'type': 'str'}, + 'reservation_name': {'key': 'properties.reservationName', 'type': 'str'}, + 'product_order_id': {'key': 'properties.productOrderId', 'type': 'str'}, + 'product_order_name': {'key': 'properties.productOrderName', 'type': 'str'}, + 'offer_id': {'key': 'properties.offerId', 'type': 'str'}, + 'is_azure_credit_eligible': {'key': 'properties.isAzureCreditEligible', 'type': 'bool'}, + 'term': {'key': 'properties.term', 'type': 'str'}, + 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, + 'publisher_type': {'key': 'properties.publisherType', 'type': 'str'}, + 'plan_name': {'key': 'properties.planName', 'type': 'str'}, + 'charge_type': {'key': 'properties.chargeType', 'type': 'str'}, + 'frequency': {'key': 'properties.frequency', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(UsageDetail, self).__init__(**kwargs) + self.billing_account_id = None + self.billing_account_name = None + self.billing_period_start_date = None + self.billing_period_end_date = None + self.billing_profile_id = None + self.billing_profile_name = None + self.account_owner_id = None + self.account_name = None + self.subscription_id = None + self.subscription_name = None + self.date_property = None + self.product = None + self.part_number = None + self.meter_id = None + self.meter_details = None + self.quantity = None + self.effective_price = None + self.cost = None + self.unit_price = None + self.billing_currency = None + self.resource_location = None + self.consumed_service = None + self.resource_id = None + self.resource_name = None + self.service_info1 = None + self.service_info2 = None + self.additional_info = None + self.invoice_section = None + self.cost_center = None + self.resource_group = None + self.reservation_id = None + self.reservation_name = None + self.product_order_id = None + self.product_order_name = None + self.offer_id = None + self.is_azure_credit_eligible = None + self.term = None + self.publisher_name = None + self.publisher_type = None + self.plan_name = None + self.charge_type = None + self.frequency = None + + +class UsageDetailsDownloadResponse(Resource): + """Download response of Usage Details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar download_url: The URL to the csv file. + :vartype download_url: str + :ivar valid_till: The time in UTC at which this download URL will expire. + :vartype valid_till: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'download_url': {'readonly': True}, + 'valid_till': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'download_url': {'key': 'properties.downloadUrl', 'type': 'str'}, + 'valid_till': {'key': 'properties.validTill', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(UsageDetailsDownloadResponse, self).__init__(**kwargs) + self.download_url = None + self.valid_till = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/_paged_models.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/_paged_models.py new file mode 100644 index 000000000000..2c0606caa0d9 --- /dev/null +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/_paged_models.py @@ -0,0 +1,118 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class UsageDetailPaged(Paged): + """ + A paging container for iterating over a list of :class:`UsageDetail ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[UsageDetail]'} + } + + def __init__(self, *args, **kwargs): + + super(UsageDetailPaged, self).__init__(*args, **kwargs) +class MarketplacePaged(Paged): + """ + A paging container for iterating over a list of :class:`Marketplace ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Marketplace]'} + } + + def __init__(self, *args, **kwargs): + + super(MarketplacePaged, self).__init__(*args, **kwargs) +class BudgetPaged(Paged): + """ + A paging container for iterating over a list of :class:`Budget ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Budget]'} + } + + def __init__(self, *args, **kwargs): + + super(BudgetPaged, self).__init__(*args, **kwargs) +class ReservationSummaryPaged(Paged): + """ + A paging container for iterating over a list of :class:`ReservationSummary ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ReservationSummary]'} + } + + def __init__(self, *args, **kwargs): + + super(ReservationSummaryPaged, self).__init__(*args, **kwargs) +class ReservationDetailPaged(Paged): + """ + A paging container for iterating over a list of :class:`ReservationDetail ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ReservationDetail]'} + } + + def __init__(self, *args, **kwargs): + + super(ReservationDetailPaged, self).__init__(*args, **kwargs) +class ReservationRecommendationPaged(Paged): + """ + A paging container for iterating over a list of :class:`ReservationRecommendation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ReservationRecommendation]'} + } + + def __init__(self, *args, **kwargs): + + super(ReservationRecommendationPaged, self).__init__(*args, **kwargs) +class ForecastPaged(Paged): + """ + A paging container for iterating over a list of :class:`Forecast ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Forecast]'} + } + + def __init__(self, *args, **kwargs): + + super(ForecastPaged, self).__init__(*args, **kwargs) +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/balance.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/balance.py deleted file mode 100644 index 88be1e0fa0a5..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/balance.py +++ /dev/null @@ -1,128 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Balance(Resource): - """A balance resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar currency: The ISO currency in which the meter is charged, for - example, USD. - :vartype currency: str - :ivar beginning_balance: The beginning balance for the billing period. - :vartype beginning_balance: decimal.Decimal - :ivar ending_balance: The ending balance for the billing period (for open - periods this will be updated daily). - :vartype ending_balance: decimal.Decimal - :ivar new_purchases: Total new purchase amount. - :vartype new_purchases: decimal.Decimal - :ivar adjustments: Total adjustment amount. - :vartype adjustments: decimal.Decimal - :ivar utilized: Total Commitment usage. - :vartype utilized: decimal.Decimal - :ivar service_overage: Overage for Azure services. - :vartype service_overage: decimal.Decimal - :ivar charges_billed_separately: Charges Billed separately. - :vartype charges_billed_separately: decimal.Decimal - :ivar total_overage: serviceOverage + chargesBilledSeparately. - :vartype total_overage: decimal.Decimal - :ivar total_usage: Azure service commitment + total Overage. - :vartype total_usage: decimal.Decimal - :ivar azure_marketplace_service_charges: Total charges for Azure - Marketplace. - :vartype azure_marketplace_service_charges: decimal.Decimal - :param billing_frequency: The billing frequency. Possible values include: - 'Month', 'Quarter', 'Year' - :type billing_frequency: str or - ~azure.mgmt.consumption.models.BillingFrequency - :ivar price_hidden: Price is hidden or not. - :vartype price_hidden: bool - :ivar new_purchases_details: List of new purchases. - :vartype new_purchases_details: - list[~azure.mgmt.consumption.models.BalancePropertiesNewPurchasesDetailsItem] - :ivar adjustment_details: List of Adjustments (Promo credit, SIE credit - etc.). - :vartype adjustment_details: - list[~azure.mgmt.consumption.models.BalancePropertiesAdjustmentDetailsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'currency': {'readonly': True}, - 'beginning_balance': {'readonly': True}, - 'ending_balance': {'readonly': True}, - 'new_purchases': {'readonly': True}, - 'adjustments': {'readonly': True}, - 'utilized': {'readonly': True}, - 'service_overage': {'readonly': True}, - 'charges_billed_separately': {'readonly': True}, - 'total_overage': {'readonly': True}, - 'total_usage': {'readonly': True}, - 'azure_marketplace_service_charges': {'readonly': True}, - 'price_hidden': {'readonly': True}, - 'new_purchases_details': {'readonly': True}, - 'adjustment_details': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'currency': {'key': 'properties.currency', 'type': 'str'}, - 'beginning_balance': {'key': 'properties.beginningBalance', 'type': 'decimal'}, - 'ending_balance': {'key': 'properties.endingBalance', 'type': 'decimal'}, - 'new_purchases': {'key': 'properties.newPurchases', 'type': 'decimal'}, - 'adjustments': {'key': 'properties.adjustments', 'type': 'decimal'}, - 'utilized': {'key': 'properties.utilized', 'type': 'decimal'}, - 'service_overage': {'key': 'properties.serviceOverage', 'type': 'decimal'}, - 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'decimal'}, - 'total_overage': {'key': 'properties.totalOverage', 'type': 'decimal'}, - 'total_usage': {'key': 'properties.totalUsage', 'type': 'decimal'}, - 'azure_marketplace_service_charges': {'key': 'properties.azureMarketplaceServiceCharges', 'type': 'decimal'}, - 'billing_frequency': {'key': 'properties.billingFrequency', 'type': 'str'}, - 'price_hidden': {'key': 'properties.priceHidden', 'type': 'bool'}, - 'new_purchases_details': {'key': 'properties.newPurchasesDetails', 'type': '[BalancePropertiesNewPurchasesDetailsItem]'}, - 'adjustment_details': {'key': 'properties.adjustmentDetails', 'type': '[BalancePropertiesAdjustmentDetailsItem]'}, - } - - def __init__(self, **kwargs): - super(Balance, self).__init__(**kwargs) - self.currency = None - self.beginning_balance = None - self.ending_balance = None - self.new_purchases = None - self.adjustments = None - self.utilized = None - self.service_overage = None - self.charges_billed_separately = None - self.total_overage = None - self.total_usage = None - self.azure_marketplace_service_charges = None - self.billing_frequency = kwargs.get('billing_frequency', None) - self.price_hidden = None - self.new_purchases_details = None - self.adjustment_details = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_properties_adjustment_details_item.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_properties_adjustment_details_item.py deleted file mode 100644 index a0b9af41285c..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_properties_adjustment_details_item.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BalancePropertiesAdjustmentDetailsItem(Model): - """BalancePropertiesAdjustmentDetailsItem. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: the name of new adjustment. - :vartype name: str - :ivar value: the value of new adjustment. - :vartype value: decimal.Decimal - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'decimal'}, - } - - def __init__(self, **kwargs): - super(BalancePropertiesAdjustmentDetailsItem, self).__init__(**kwargs) - self.name = None - self.value = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_properties_adjustment_details_item_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_properties_adjustment_details_item_py3.py deleted file mode 100644 index 0fc6b3b377fc..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_properties_adjustment_details_item_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BalancePropertiesAdjustmentDetailsItem(Model): - """BalancePropertiesAdjustmentDetailsItem. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: the name of new adjustment. - :vartype name: str - :ivar value: the value of new adjustment. - :vartype value: decimal.Decimal - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'decimal'}, - } - - def __init__(self, **kwargs) -> None: - super(BalancePropertiesAdjustmentDetailsItem, self).__init__(**kwargs) - self.name = None - self.value = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_properties_new_purchases_details_item.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_properties_new_purchases_details_item.py deleted file mode 100644 index c50e5ad24216..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_properties_new_purchases_details_item.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BalancePropertiesNewPurchasesDetailsItem(Model): - """BalancePropertiesNewPurchasesDetailsItem. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: the name of new purchase. - :vartype name: str - :ivar value: the value of new purchase. - :vartype value: decimal.Decimal - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'decimal'}, - } - - def __init__(self, **kwargs): - super(BalancePropertiesNewPurchasesDetailsItem, self).__init__(**kwargs) - self.name = None - self.value = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_properties_new_purchases_details_item_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_properties_new_purchases_details_item_py3.py deleted file mode 100644 index 278a07609ebf..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_properties_new_purchases_details_item_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BalancePropertiesNewPurchasesDetailsItem(Model): - """BalancePropertiesNewPurchasesDetailsItem. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: the name of new purchase. - :vartype name: str - :ivar value: the value of new purchase. - :vartype value: decimal.Decimal - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'decimal'}, - } - - def __init__(self, **kwargs) -> None: - super(BalancePropertiesNewPurchasesDetailsItem, self).__init__(**kwargs) - self.name = None - self.value = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_py3.py deleted file mode 100644 index 8208ab5e2150..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_py3.py +++ /dev/null @@ -1,128 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Balance(Resource): - """A balance resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar currency: The ISO currency in which the meter is charged, for - example, USD. - :vartype currency: str - :ivar beginning_balance: The beginning balance for the billing period. - :vartype beginning_balance: decimal.Decimal - :ivar ending_balance: The ending balance for the billing period (for open - periods this will be updated daily). - :vartype ending_balance: decimal.Decimal - :ivar new_purchases: Total new purchase amount. - :vartype new_purchases: decimal.Decimal - :ivar adjustments: Total adjustment amount. - :vartype adjustments: decimal.Decimal - :ivar utilized: Total Commitment usage. - :vartype utilized: decimal.Decimal - :ivar service_overage: Overage for Azure services. - :vartype service_overage: decimal.Decimal - :ivar charges_billed_separately: Charges Billed separately. - :vartype charges_billed_separately: decimal.Decimal - :ivar total_overage: serviceOverage + chargesBilledSeparately. - :vartype total_overage: decimal.Decimal - :ivar total_usage: Azure service commitment + total Overage. - :vartype total_usage: decimal.Decimal - :ivar azure_marketplace_service_charges: Total charges for Azure - Marketplace. - :vartype azure_marketplace_service_charges: decimal.Decimal - :param billing_frequency: The billing frequency. Possible values include: - 'Month', 'Quarter', 'Year' - :type billing_frequency: str or - ~azure.mgmt.consumption.models.BillingFrequency - :ivar price_hidden: Price is hidden or not. - :vartype price_hidden: bool - :ivar new_purchases_details: List of new purchases. - :vartype new_purchases_details: - list[~azure.mgmt.consumption.models.BalancePropertiesNewPurchasesDetailsItem] - :ivar adjustment_details: List of Adjustments (Promo credit, SIE credit - etc.). - :vartype adjustment_details: - list[~azure.mgmt.consumption.models.BalancePropertiesAdjustmentDetailsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'currency': {'readonly': True}, - 'beginning_balance': {'readonly': True}, - 'ending_balance': {'readonly': True}, - 'new_purchases': {'readonly': True}, - 'adjustments': {'readonly': True}, - 'utilized': {'readonly': True}, - 'service_overage': {'readonly': True}, - 'charges_billed_separately': {'readonly': True}, - 'total_overage': {'readonly': True}, - 'total_usage': {'readonly': True}, - 'azure_marketplace_service_charges': {'readonly': True}, - 'price_hidden': {'readonly': True}, - 'new_purchases_details': {'readonly': True}, - 'adjustment_details': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'currency': {'key': 'properties.currency', 'type': 'str'}, - 'beginning_balance': {'key': 'properties.beginningBalance', 'type': 'decimal'}, - 'ending_balance': {'key': 'properties.endingBalance', 'type': 'decimal'}, - 'new_purchases': {'key': 'properties.newPurchases', 'type': 'decimal'}, - 'adjustments': {'key': 'properties.adjustments', 'type': 'decimal'}, - 'utilized': {'key': 'properties.utilized', 'type': 'decimal'}, - 'service_overage': {'key': 'properties.serviceOverage', 'type': 'decimal'}, - 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'decimal'}, - 'total_overage': {'key': 'properties.totalOverage', 'type': 'decimal'}, - 'total_usage': {'key': 'properties.totalUsage', 'type': 'decimal'}, - 'azure_marketplace_service_charges': {'key': 'properties.azureMarketplaceServiceCharges', 'type': 'decimal'}, - 'billing_frequency': {'key': 'properties.billingFrequency', 'type': 'str'}, - 'price_hidden': {'key': 'properties.priceHidden', 'type': 'bool'}, - 'new_purchases_details': {'key': 'properties.newPurchasesDetails', 'type': '[BalancePropertiesNewPurchasesDetailsItem]'}, - 'adjustment_details': {'key': 'properties.adjustmentDetails', 'type': '[BalancePropertiesAdjustmentDetailsItem]'}, - } - - def __init__(self, *, billing_frequency=None, **kwargs) -> None: - super(Balance, self).__init__(**kwargs) - self.currency = None - self.beginning_balance = None - self.ending_balance = None - self.new_purchases = None - self.adjustments = None - self.utilized = None - self.service_overage = None - self.charges_billed_separately = None - self.total_overage = None - self.total_usage = None - self.azure_marketplace_service_charges = None - self.billing_frequency = billing_frequency - self.price_hidden = None - self.new_purchases_details = None - self.adjustment_details = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/budget.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/budget.py deleted file mode 100644 index 320d185716fc..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/budget.py +++ /dev/null @@ -1,94 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class Budget(ProxyResource): - """A budget resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param e_tag: eTag of the resource. To handle concurrent update scenario, - this field will be used to determine whether the user is updating the - latest version or not. - :type e_tag: str - :param category: Required. The category of the budget, whether the budget - tracks cost or usage. Possible values include: 'Cost', 'Usage' - :type category: str or ~azure.mgmt.consumption.models.CategoryType - :param amount: Required. The total amount of cost to track with the budget - :type amount: decimal.Decimal - :param time_grain: Required. The time covered by a budget. Tracking of the - amount will be reset based on the time grain. Possible values include: - 'Monthly', 'Quarterly', 'Annually' - :type time_grain: str or ~azure.mgmt.consumption.models.TimeGrainType - :param time_period: Required. Has start and end date of the budget. The - start date must be first of the month and should be less than the end - date. Budget start date must be on or after June 1, 2017. Future start - date should not be more than three months. Past start date should be - selected within the timegrain period. There are no restrictions on the end - date. - :type time_period: ~azure.mgmt.consumption.models.BudgetTimePeriod - :param filters: May be used to filter budgets by resource group, resource, - or meter. - :type filters: ~azure.mgmt.consumption.models.Filters - :ivar current_spend: The current amount of cost which is being tracked for - a budget. - :vartype current_spend: ~azure.mgmt.consumption.models.CurrentSpend - :param notifications: Dictionary of notifications associated with the - budget. Budget can have up to five notifications. - :type notifications: dict[str, - ~azure.mgmt.consumption.models.Notification] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'category': {'required': True}, - 'amount': {'required': True}, - 'time_grain': {'required': True}, - 'time_period': {'required': True}, - 'current_spend': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'category': {'key': 'properties.category', 'type': 'str'}, - 'amount': {'key': 'properties.amount', 'type': 'decimal'}, - 'time_grain': {'key': 'properties.timeGrain', 'type': 'str'}, - 'time_period': {'key': 'properties.timePeriod', 'type': 'BudgetTimePeriod'}, - 'filters': {'key': 'properties.filters', 'type': 'Filters'}, - 'current_spend': {'key': 'properties.currentSpend', 'type': 'CurrentSpend'}, - 'notifications': {'key': 'properties.notifications', 'type': '{Notification}'}, - } - - def __init__(self, **kwargs): - super(Budget, self).__init__(**kwargs) - self.category = kwargs.get('category', None) - self.amount = kwargs.get('amount', None) - self.time_grain = kwargs.get('time_grain', None) - self.time_period = kwargs.get('time_period', None) - self.filters = kwargs.get('filters', None) - self.current_spend = None - self.notifications = kwargs.get('notifications', None) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/budget_paged.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/budget_paged.py deleted file mode 100644 index 2668382253e2..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/budget_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class BudgetPaged(Paged): - """ - A paging container for iterating over a list of :class:`Budget ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Budget]'} - } - - def __init__(self, *args, **kwargs): - - super(BudgetPaged, self).__init__(*args, **kwargs) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/budget_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/budget_py3.py deleted file mode 100644 index 522ea98b4572..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/budget_py3.py +++ /dev/null @@ -1,94 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class Budget(ProxyResource): - """A budget resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param e_tag: eTag of the resource. To handle concurrent update scenario, - this field will be used to determine whether the user is updating the - latest version or not. - :type e_tag: str - :param category: Required. The category of the budget, whether the budget - tracks cost or usage. Possible values include: 'Cost', 'Usage' - :type category: str or ~azure.mgmt.consumption.models.CategoryType - :param amount: Required. The total amount of cost to track with the budget - :type amount: decimal.Decimal - :param time_grain: Required. The time covered by a budget. Tracking of the - amount will be reset based on the time grain. Possible values include: - 'Monthly', 'Quarterly', 'Annually' - :type time_grain: str or ~azure.mgmt.consumption.models.TimeGrainType - :param time_period: Required. Has start and end date of the budget. The - start date must be first of the month and should be less than the end - date. Budget start date must be on or after June 1, 2017. Future start - date should not be more than three months. Past start date should be - selected within the timegrain period. There are no restrictions on the end - date. - :type time_period: ~azure.mgmt.consumption.models.BudgetTimePeriod - :param filters: May be used to filter budgets by resource group, resource, - or meter. - :type filters: ~azure.mgmt.consumption.models.Filters - :ivar current_spend: The current amount of cost which is being tracked for - a budget. - :vartype current_spend: ~azure.mgmt.consumption.models.CurrentSpend - :param notifications: Dictionary of notifications associated with the - budget. Budget can have up to five notifications. - :type notifications: dict[str, - ~azure.mgmt.consumption.models.Notification] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'category': {'required': True}, - 'amount': {'required': True}, - 'time_grain': {'required': True}, - 'time_period': {'required': True}, - 'current_spend': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'category': {'key': 'properties.category', 'type': 'str'}, - 'amount': {'key': 'properties.amount', 'type': 'decimal'}, - 'time_grain': {'key': 'properties.timeGrain', 'type': 'str'}, - 'time_period': {'key': 'properties.timePeriod', 'type': 'BudgetTimePeriod'}, - 'filters': {'key': 'properties.filters', 'type': 'Filters'}, - 'current_spend': {'key': 'properties.currentSpend', 'type': 'CurrentSpend'}, - 'notifications': {'key': 'properties.notifications', 'type': '{Notification}'}, - } - - def __init__(self, *, category, amount, time_grain, time_period, e_tag: str=None, filters=None, notifications=None, **kwargs) -> None: - super(Budget, self).__init__(e_tag=e_tag, **kwargs) - self.category = category - self.amount = amount - self.time_grain = time_grain - self.time_period = time_period - self.filters = filters - self.current_spend = None - self.notifications = notifications diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/budget_time_period.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/budget_time_period.py deleted file mode 100644 index a0fe9658a07f..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/budget_time_period.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BudgetTimePeriod(Model): - """The start and end date for a budget. - - All required parameters must be populated in order to send to Azure. - - :param start_date: Required. The start date for the budget. - :type start_date: datetime - :param end_date: The end date for the budget. If not provided, we default - this to 10 years from the start date. - :type end_date: datetime - """ - - _validation = { - 'start_date': {'required': True}, - } - - _attribute_map = { - 'start_date': {'key': 'startDate', 'type': 'iso-8601'}, - 'end_date': {'key': 'endDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(BudgetTimePeriod, self).__init__(**kwargs) - self.start_date = kwargs.get('start_date', None) - self.end_date = kwargs.get('end_date', None) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/budget_time_period_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/budget_time_period_py3.py deleted file mode 100644 index de0258c1d63f..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/budget_time_period_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BudgetTimePeriod(Model): - """The start and end date for a budget. - - All required parameters must be populated in order to send to Azure. - - :param start_date: Required. The start date for the budget. - :type start_date: datetime - :param end_date: The end date for the budget. If not provided, we default - this to 10 years from the start date. - :type end_date: datetime - """ - - _validation = { - 'start_date': {'required': True}, - } - - _attribute_map = { - 'start_date': {'key': 'startDate', 'type': 'iso-8601'}, - 'end_date': {'key': 'endDate', 'type': 'iso-8601'}, - } - - def __init__(self, *, start_date, end_date=None, **kwargs) -> None: - super(BudgetTimePeriod, self).__init__(**kwargs) - self.start_date = start_date - self.end_date = end_date diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary.py deleted file mode 100644 index d3a3bbaaa8b0..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary.py +++ /dev/null @@ -1,82 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ChargeSummary(Resource): - """A charge summary resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar billing_period_id: The id of the billing period resource that the - charge belongs to. - :vartype billing_period_id: str - :ivar usage_start: Usage start date. - :vartype usage_start: str - :ivar usage_end: Usage end date. - :vartype usage_end: str - :ivar azure_charges: Azure Charges. - :vartype azure_charges: decimal.Decimal - :ivar charges_billed_separately: Charges Billed separately. - :vartype charges_billed_separately: decimal.Decimal - :ivar marketplace_charges: Marketplace Charges. - :vartype marketplace_charges: decimal.Decimal - :ivar currency: Currency Code - :vartype currency: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'billing_period_id': {'readonly': True}, - 'usage_start': {'readonly': True}, - 'usage_end': {'readonly': True}, - 'azure_charges': {'readonly': True}, - 'charges_billed_separately': {'readonly': True}, - 'marketplace_charges': {'readonly': True}, - 'currency': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, - 'usage_start': {'key': 'properties.usageStart', 'type': 'str'}, - 'usage_end': {'key': 'properties.usageEnd', 'type': 'str'}, - 'azure_charges': {'key': 'properties.azureCharges', 'type': 'decimal'}, - 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'decimal'}, - 'marketplace_charges': {'key': 'properties.marketplaceCharges', 'type': 'decimal'}, - 'currency': {'key': 'properties.currency', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ChargeSummary, self).__init__(**kwargs) - self.billing_period_id = None - self.usage_start = None - self.usage_end = None - self.azure_charges = None - self.charges_billed_separately = None - self.marketplace_charges = None - self.currency = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_py3.py deleted file mode 100644 index 1f6031eed7c4..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_py3.py +++ /dev/null @@ -1,82 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ChargeSummary(Resource): - """A charge summary resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar billing_period_id: The id of the billing period resource that the - charge belongs to. - :vartype billing_period_id: str - :ivar usage_start: Usage start date. - :vartype usage_start: str - :ivar usage_end: Usage end date. - :vartype usage_end: str - :ivar azure_charges: Azure Charges. - :vartype azure_charges: decimal.Decimal - :ivar charges_billed_separately: Charges Billed separately. - :vartype charges_billed_separately: decimal.Decimal - :ivar marketplace_charges: Marketplace Charges. - :vartype marketplace_charges: decimal.Decimal - :ivar currency: Currency Code - :vartype currency: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'billing_period_id': {'readonly': True}, - 'usage_start': {'readonly': True}, - 'usage_end': {'readonly': True}, - 'azure_charges': {'readonly': True}, - 'charges_billed_separately': {'readonly': True}, - 'marketplace_charges': {'readonly': True}, - 'currency': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, - 'usage_start': {'key': 'properties.usageStart', 'type': 'str'}, - 'usage_end': {'key': 'properties.usageEnd', 'type': 'str'}, - 'azure_charges': {'key': 'properties.azureCharges', 'type': 'decimal'}, - 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'decimal'}, - 'marketplace_charges': {'key': 'properties.marketplaceCharges', 'type': 'decimal'}, - 'currency': {'key': 'properties.currency', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ChargeSummary, self).__init__(**kwargs) - self.billing_period_id = None - self.usage_start = None - self.usage_end = None - self.azure_charges = None - self.charges_billed_separately = None - self.marketplace_charges = None - self.currency = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_result.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_result.py deleted file mode 100644 index 7d968d08a465..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_result.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ChargesListResult(Model): - """Result of listing charge summary. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: The list of charge summary - :vartype value: list[~azure.mgmt.consumption.models.ChargeSummary] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ChargeSummary]'}, - } - - def __init__(self, **kwargs): - super(ChargesListResult, self).__init__(**kwargs) - self.value = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_result_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_result_py3.py deleted file mode 100644 index 3c6e3404673b..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_result_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ChargesListResult(Model): - """Result of listing charge summary. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: The list of charge summary - :vartype value: list[~azure.mgmt.consumption.models.ChargeSummary] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ChargeSummary]'}, - } - - def __init__(self, **kwargs) -> None: - super(ChargesListResult, self).__init__(**kwargs) - self.value = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/current_spend.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/current_spend.py deleted file mode 100644 index 42724a3aa6c6..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/current_spend.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CurrentSpend(Model): - """The current amount of cost which is being tracked for a budget. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar amount: The total amount of cost which is being tracked by the - budget. - :vartype amount: decimal.Decimal - :ivar unit: The unit of measure for the budget amount. - :vartype unit: str - """ - - _validation = { - 'amount': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'amount': {'key': 'amount', 'type': 'decimal'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CurrentSpend, self).__init__(**kwargs) - self.amount = None - self.unit = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/current_spend_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/current_spend_py3.py deleted file mode 100644 index 87a5fc0bcc1d..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/current_spend_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CurrentSpend(Model): - """The current amount of cost which is being tracked for a budget. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar amount: The total amount of cost which is being tracked by the - budget. - :vartype amount: decimal.Decimal - :ivar unit: The unit of measure for the budget amount. - :vartype unit: str - """ - - _validation = { - 'amount': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'amount': {'key': 'amount', 'type': 'decimal'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(CurrentSpend, self).__init__(**kwargs) - self.amount = None - self.unit = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/error_details.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/error_details.py deleted file mode 100644 index 03f3e23d2153..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/error_details.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ErrorDetails(Model): - """The details of the error. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Error code. - :vartype code: str - :ivar message: Error message indicating why the operation failed. - :vartype message: str - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ErrorDetails, self).__init__(**kwargs) - self.code = None - self.message = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/error_details_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/error_details_py3.py deleted file mode 100644 index f9e1adeac9fe..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/error_details_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ErrorDetails(Model): - """The details of the error. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Error code. - :vartype code: str - :ivar message: Error message indicating why the operation failed. - :vartype message: str - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ErrorDetails, self).__init__(**kwargs) - self.code = None - self.message = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/error_response.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/error_response.py deleted file mode 100644 index 4bd88fdd8421..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/error_response.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class ErrorResponse(Model): - """Error response indicates that the service is not able to process the - incoming request. The reason is provided in the error message. - - :param error: The details of the error. - :type error: ~azure.mgmt.consumption.models.ErrorDetails - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorDetails'}, - } - - def __init__(self, **kwargs): - super(ErrorResponse, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/error_response_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/error_response_py3.py deleted file mode 100644 index 7ee8c9325c20..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/error_response_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class ErrorResponse(Model): - """Error response indicates that the service is not able to process the - incoming request. The reason is provided in the error message. - - :param error: The details of the error. - :type error: ~azure.mgmt.consumption.models.ErrorDetails - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorDetails'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(ErrorResponse, self).__init__(**kwargs) - self.error = error - - -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/filters.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/filters.py deleted file mode 100644 index 42c5f41c6412..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/filters.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Filters(Model): - """May be used to filter budgets by resource group, resource, or meter. - - :param resource_groups: The list of filters on resource groups, allowed at - subscription level only. - :type resource_groups: list[str] - :param resources: The list of filters on resources. - :type resources: list[str] - :param meters: The list of filters on meters (GUID), mandatory for budgets - of usage category. - :type meters: list[str] - :param tags: The dictionary of filters on tags. - :type tags: dict[str, list[str]] - """ - - _validation = { - 'resource_groups': {'max_items': 10, 'min_items': 0}, - 'resources': {'max_items': 10, 'min_items': 0}, - 'meters': {'max_items': 10, 'min_items': 0}, - } - - _attribute_map = { - 'resource_groups': {'key': 'resourceGroups', 'type': '[str]'}, - 'resources': {'key': 'resources', 'type': '[str]'}, - 'meters': {'key': 'meters', 'type': '[str]'}, - 'tags': {'key': 'tags', 'type': '{[str]}'}, - } - - def __init__(self, **kwargs): - super(Filters, self).__init__(**kwargs) - self.resource_groups = kwargs.get('resource_groups', None) - self.resources = kwargs.get('resources', None) - self.meters = kwargs.get('meters', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/filters_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/filters_py3.py deleted file mode 100644 index c478858ccf1b..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/filters_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Filters(Model): - """May be used to filter budgets by resource group, resource, or meter. - - :param resource_groups: The list of filters on resource groups, allowed at - subscription level only. - :type resource_groups: list[str] - :param resources: The list of filters on resources. - :type resources: list[str] - :param meters: The list of filters on meters (GUID), mandatory for budgets - of usage category. - :type meters: list[str] - :param tags: The dictionary of filters on tags. - :type tags: dict[str, list[str]] - """ - - _validation = { - 'resource_groups': {'max_items': 10, 'min_items': 0}, - 'resources': {'max_items': 10, 'min_items': 0}, - 'meters': {'max_items': 10, 'min_items': 0}, - } - - _attribute_map = { - 'resource_groups': {'key': 'resourceGroups', 'type': '[str]'}, - 'resources': {'key': 'resources', 'type': '[str]'}, - 'meters': {'key': 'meters', 'type': '[str]'}, - 'tags': {'key': 'tags', 'type': '{[str]}'}, - } - - def __init__(self, *, resource_groups=None, resources=None, meters=None, tags=None, **kwargs) -> None: - super(Filters, self).__init__(**kwargs) - self.resource_groups = resource_groups - self.resources = resources - self.meters = meters - self.tags = tags diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast.py deleted file mode 100644 index 4cfb731f0b17..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast.py +++ /dev/null @@ -1,79 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Forecast(Resource): - """A forecast resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar usage_date: The usage date of the forecast. - :vartype usage_date: str - :param grain: The granularity of forecast. Possible values include: - 'Daily', 'Monthly', 'Yearly' - :type grain: str or ~azure.mgmt.consumption.models.Grain - :ivar charge: The amount of charge - :vartype charge: decimal.Decimal - :ivar currency: The ISO currency in which the meter is charged, for - example, USD. - :vartype currency: str - :param charge_type: The type of the charge. Could be actual or forecast. - Possible values include: 'Actual', 'Forecast' - :type charge_type: str or ~azure.mgmt.consumption.models.ChargeType - :ivar confidence_levels: The details about the forecast confidence levels. - This is populated only when chargeType is Forecast. - :vartype confidence_levels: - list[~azure.mgmt.consumption.models.ForecastPropertiesConfidenceLevelsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'usage_date': {'readonly': True}, - 'charge': {'readonly': True}, - 'currency': {'readonly': True}, - 'confidence_levels': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'usage_date': {'key': 'properties.usageDate', 'type': 'str'}, - 'grain': {'key': 'properties.grain', 'type': 'str'}, - 'charge': {'key': 'properties.charge', 'type': 'decimal'}, - 'currency': {'key': 'properties.currency', 'type': 'str'}, - 'charge_type': {'key': 'properties.chargeType', 'type': 'str'}, - 'confidence_levels': {'key': 'properties.confidenceLevels', 'type': '[ForecastPropertiesConfidenceLevelsItem]'}, - } - - def __init__(self, **kwargs): - super(Forecast, self).__init__(**kwargs) - self.usage_date = None - self.grain = kwargs.get('grain', None) - self.charge = None - self.currency = None - self.charge_type = kwargs.get('charge_type', None) - self.confidence_levels = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast_paged.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast_paged.py deleted file mode 100644 index 68cef39c6140..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ForecastPaged(Paged): - """ - A paging container for iterating over a list of :class:`Forecast ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Forecast]'} - } - - def __init__(self, *args, **kwargs): - - super(ForecastPaged, self).__init__(*args, **kwargs) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast_properties_confidence_levels_item.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast_properties_confidence_levels_item.py deleted file mode 100644 index 803026660dd3..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast_properties_confidence_levels_item.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ForecastPropertiesConfidenceLevelsItem(Model): - """ForecastPropertiesConfidenceLevelsItem. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar percentage: The percentage level of the confidence - :vartype percentage: decimal.Decimal - :param bound: The boundary of the percentage, values could be 'Upper' or - 'Lower'. Possible values include: 'Upper', 'Lower' - :type bound: str or ~azure.mgmt.consumption.models.Bound - :ivar value: The amount of forecast within the percentage level - :vartype value: decimal.Decimal - """ - - _validation = { - 'percentage': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'percentage': {'key': 'percentage', 'type': 'decimal'}, - 'bound': {'key': 'bound', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'decimal'}, - } - - def __init__(self, **kwargs): - super(ForecastPropertiesConfidenceLevelsItem, self).__init__(**kwargs) - self.percentage = None - self.bound = kwargs.get('bound', None) - self.value = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast_properties_confidence_levels_item_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast_properties_confidence_levels_item_py3.py deleted file mode 100644 index ddbe8d8bb5df..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast_properties_confidence_levels_item_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ForecastPropertiesConfidenceLevelsItem(Model): - """ForecastPropertiesConfidenceLevelsItem. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar percentage: The percentage level of the confidence - :vartype percentage: decimal.Decimal - :param bound: The boundary of the percentage, values could be 'Upper' or - 'Lower'. Possible values include: 'Upper', 'Lower' - :type bound: str or ~azure.mgmt.consumption.models.Bound - :ivar value: The amount of forecast within the percentage level - :vartype value: decimal.Decimal - """ - - _validation = { - 'percentage': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'percentage': {'key': 'percentage', 'type': 'decimal'}, - 'bound': {'key': 'bound', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'decimal'}, - } - - def __init__(self, *, bound=None, **kwargs) -> None: - super(ForecastPropertiesConfidenceLevelsItem, self).__init__(**kwargs) - self.percentage = None - self.bound = bound - self.value = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast_py3.py deleted file mode 100644 index ea3f5550f507..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast_py3.py +++ /dev/null @@ -1,79 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Forecast(Resource): - """A forecast resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar usage_date: The usage date of the forecast. - :vartype usage_date: str - :param grain: The granularity of forecast. Possible values include: - 'Daily', 'Monthly', 'Yearly' - :type grain: str or ~azure.mgmt.consumption.models.Grain - :ivar charge: The amount of charge - :vartype charge: decimal.Decimal - :ivar currency: The ISO currency in which the meter is charged, for - example, USD. - :vartype currency: str - :param charge_type: The type of the charge. Could be actual or forecast. - Possible values include: 'Actual', 'Forecast' - :type charge_type: str or ~azure.mgmt.consumption.models.ChargeType - :ivar confidence_levels: The details about the forecast confidence levels. - This is populated only when chargeType is Forecast. - :vartype confidence_levels: - list[~azure.mgmt.consumption.models.ForecastPropertiesConfidenceLevelsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'usage_date': {'readonly': True}, - 'charge': {'readonly': True}, - 'currency': {'readonly': True}, - 'confidence_levels': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'usage_date': {'key': 'properties.usageDate', 'type': 'str'}, - 'grain': {'key': 'properties.grain', 'type': 'str'}, - 'charge': {'key': 'properties.charge', 'type': 'decimal'}, - 'currency': {'key': 'properties.currency', 'type': 'str'}, - 'charge_type': {'key': 'properties.chargeType', 'type': 'str'}, - 'confidence_levels': {'key': 'properties.confidenceLevels', 'type': '[ForecastPropertiesConfidenceLevelsItem]'}, - } - - def __init__(self, *, grain=None, charge_type=None, **kwargs) -> None: - super(Forecast, self).__init__(**kwargs) - self.usage_date = None - self.grain = grain - self.charge = None - self.currency = None - self.charge_type = charge_type - self.confidence_levels = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/management_group_aggregated_cost_result.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/management_group_aggregated_cost_result.py deleted file mode 100644 index d44e542a0468..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/management_group_aggregated_cost_result.py +++ /dev/null @@ -1,100 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ManagementGroupAggregatedCostResult(Resource): - """A management group aggregated cost resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar billing_period_id: The id of the billing period resource that the - aggregated cost belongs to. - :vartype billing_period_id: str - :ivar usage_start: The start of the date time range covered by aggregated - cost. - :vartype usage_start: datetime - :ivar usage_end: The end of the date time range covered by the aggregated - cost. - :vartype usage_end: datetime - :ivar azure_charges: Azure Charges. - :vartype azure_charges: decimal.Decimal - :ivar marketplace_charges: Marketplace Charges. - :vartype marketplace_charges: decimal.Decimal - :ivar charges_billed_separately: Charges Billed Separately. - :vartype charges_billed_separately: decimal.Decimal - :ivar currency: The ISO currency in which the meter is charged, for - example, USD. - :vartype currency: str - :param children: Children of a management group - :type children: - list[~azure.mgmt.consumption.models.ManagementGroupAggregatedCostResult] - :param included_subscriptions: List of subscription Guids included in the - calculation of aggregated cost - :type included_subscriptions: list[str] - :param excluded_subscriptions: List of subscription Guids excluded from - the calculation of aggregated cost - :type excluded_subscriptions: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'billing_period_id': {'readonly': True}, - 'usage_start': {'readonly': True}, - 'usage_end': {'readonly': True}, - 'azure_charges': {'readonly': True}, - 'marketplace_charges': {'readonly': True}, - 'charges_billed_separately': {'readonly': True}, - 'currency': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, - 'usage_start': {'key': 'properties.usageStart', 'type': 'iso-8601'}, - 'usage_end': {'key': 'properties.usageEnd', 'type': 'iso-8601'}, - 'azure_charges': {'key': 'properties.azureCharges', 'type': 'decimal'}, - 'marketplace_charges': {'key': 'properties.marketplaceCharges', 'type': 'decimal'}, - 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'decimal'}, - 'currency': {'key': 'properties.currency', 'type': 'str'}, - 'children': {'key': 'properties.children', 'type': '[ManagementGroupAggregatedCostResult]'}, - 'included_subscriptions': {'key': 'properties.includedSubscriptions', 'type': '[str]'}, - 'excluded_subscriptions': {'key': 'properties.excludedSubscriptions', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ManagementGroupAggregatedCostResult, self).__init__(**kwargs) - self.billing_period_id = None - self.usage_start = None - self.usage_end = None - self.azure_charges = None - self.marketplace_charges = None - self.charges_billed_separately = None - self.currency = None - self.children = kwargs.get('children', None) - self.included_subscriptions = kwargs.get('included_subscriptions', None) - self.excluded_subscriptions = kwargs.get('excluded_subscriptions', None) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/management_group_aggregated_cost_result_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/management_group_aggregated_cost_result_py3.py deleted file mode 100644 index efd01f65232e..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/management_group_aggregated_cost_result_py3.py +++ /dev/null @@ -1,100 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ManagementGroupAggregatedCostResult(Resource): - """A management group aggregated cost resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar billing_period_id: The id of the billing period resource that the - aggregated cost belongs to. - :vartype billing_period_id: str - :ivar usage_start: The start of the date time range covered by aggregated - cost. - :vartype usage_start: datetime - :ivar usage_end: The end of the date time range covered by the aggregated - cost. - :vartype usage_end: datetime - :ivar azure_charges: Azure Charges. - :vartype azure_charges: decimal.Decimal - :ivar marketplace_charges: Marketplace Charges. - :vartype marketplace_charges: decimal.Decimal - :ivar charges_billed_separately: Charges Billed Separately. - :vartype charges_billed_separately: decimal.Decimal - :ivar currency: The ISO currency in which the meter is charged, for - example, USD. - :vartype currency: str - :param children: Children of a management group - :type children: - list[~azure.mgmt.consumption.models.ManagementGroupAggregatedCostResult] - :param included_subscriptions: List of subscription Guids included in the - calculation of aggregated cost - :type included_subscriptions: list[str] - :param excluded_subscriptions: List of subscription Guids excluded from - the calculation of aggregated cost - :type excluded_subscriptions: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'billing_period_id': {'readonly': True}, - 'usage_start': {'readonly': True}, - 'usage_end': {'readonly': True}, - 'azure_charges': {'readonly': True}, - 'marketplace_charges': {'readonly': True}, - 'charges_billed_separately': {'readonly': True}, - 'currency': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, - 'usage_start': {'key': 'properties.usageStart', 'type': 'iso-8601'}, - 'usage_end': {'key': 'properties.usageEnd', 'type': 'iso-8601'}, - 'azure_charges': {'key': 'properties.azureCharges', 'type': 'decimal'}, - 'marketplace_charges': {'key': 'properties.marketplaceCharges', 'type': 'decimal'}, - 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'decimal'}, - 'currency': {'key': 'properties.currency', 'type': 'str'}, - 'children': {'key': 'properties.children', 'type': '[ManagementGroupAggregatedCostResult]'}, - 'included_subscriptions': {'key': 'properties.includedSubscriptions', 'type': '[str]'}, - 'excluded_subscriptions': {'key': 'properties.excludedSubscriptions', 'type': '[str]'}, - } - - def __init__(self, *, children=None, included_subscriptions=None, excluded_subscriptions=None, **kwargs) -> None: - super(ManagementGroupAggregatedCostResult, self).__init__(**kwargs) - self.billing_period_id = None - self.usage_start = None - self.usage_end = None - self.azure_charges = None - self.marketplace_charges = None - self.charges_billed_separately = None - self.currency = None - self.children = children - self.included_subscriptions = included_subscriptions - self.excluded_subscriptions = excluded_subscriptions diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace.py deleted file mode 100644 index 638fba19f244..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace.py +++ /dev/null @@ -1,180 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Marketplace(Resource): - """An marketplace resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar billing_period_id: The id of the billing period resource that the - usage belongs to. - :vartype billing_period_id: str - :ivar usage_start: The start of the date time range covered by the usage - detail. - :vartype usage_start: datetime - :ivar usage_end: The end of the date time range covered by the usage - detail. - :vartype usage_end: datetime - :ivar resource_rate: The marketplace resource rate. - :vartype resource_rate: decimal.Decimal - :ivar offer_name: The type of offer. - :vartype offer_name: str - :ivar resource_group: The name of resource group. - :vartype resource_group: str - :ivar order_number: The order number. - :vartype order_number: str - :ivar instance_name: The name of the resource instance that the usage is - about. - :vartype instance_name: str - :ivar instance_id: The uri of the resource instance that the usage is - about. - :vartype instance_id: str - :ivar currency: The ISO currency in which the meter is charged, for - example, USD. - :vartype currency: str - :ivar consumed_quantity: The quantity of usage. - :vartype consumed_quantity: decimal.Decimal - :ivar unit_of_measure: The unit of measure. - :vartype unit_of_measure: str - :ivar pretax_cost: The amount of cost before tax. - :vartype pretax_cost: decimal.Decimal - :ivar is_estimated: The estimated usage is subject to change. - :vartype is_estimated: bool - :ivar meter_id: The meter id (GUID). - :vartype meter_id: str - :ivar subscription_guid: Subscription guid. - :vartype subscription_guid: str - :ivar subscription_name: Subscription name. - :vartype subscription_name: str - :ivar account_name: Account name. - :vartype account_name: str - :ivar department_name: Department name. - :vartype department_name: str - :ivar consumed_service: Consumed service name. - :vartype consumed_service: str - :ivar cost_center: The cost center of this department if it is a - department and a costcenter exists - :vartype cost_center: str - :ivar additional_properties: Additional details of this usage item. By - default this is not populated, unless it's specified in $expand. - :vartype additional_properties: str - :ivar publisher_name: The name of publisher. - :vartype publisher_name: str - :ivar plan_name: The name of plan. - :vartype plan_name: str - :ivar is_recurring_charge: Flag indicating whether this is a recurring - charge or not. - :vartype is_recurring_charge: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'billing_period_id': {'readonly': True}, - 'usage_start': {'readonly': True}, - 'usage_end': {'readonly': True}, - 'resource_rate': {'readonly': True}, - 'offer_name': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'order_number': {'readonly': True}, - 'instance_name': {'readonly': True}, - 'instance_id': {'readonly': True}, - 'currency': {'readonly': True}, - 'consumed_quantity': {'readonly': True}, - 'unit_of_measure': {'readonly': True}, - 'pretax_cost': {'readonly': True}, - 'is_estimated': {'readonly': True}, - 'meter_id': {'readonly': True}, - 'subscription_guid': {'readonly': True}, - 'subscription_name': {'readonly': True}, - 'account_name': {'readonly': True}, - 'department_name': {'readonly': True}, - 'consumed_service': {'readonly': True}, - 'cost_center': {'readonly': True}, - 'additional_properties': {'readonly': True}, - 'publisher_name': {'readonly': True}, - 'plan_name': {'readonly': True}, - 'is_recurring_charge': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, - 'usage_start': {'key': 'properties.usageStart', 'type': 'iso-8601'}, - 'usage_end': {'key': 'properties.usageEnd', 'type': 'iso-8601'}, - 'resource_rate': {'key': 'properties.resourceRate', 'type': 'decimal'}, - 'offer_name': {'key': 'properties.offerName', 'type': 'str'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'order_number': {'key': 'properties.orderNumber', 'type': 'str'}, - 'instance_name': {'key': 'properties.instanceName', 'type': 'str'}, - 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, - 'currency': {'key': 'properties.currency', 'type': 'str'}, - 'consumed_quantity': {'key': 'properties.consumedQuantity', 'type': 'decimal'}, - 'unit_of_measure': {'key': 'properties.unitOfMeasure', 'type': 'str'}, - 'pretax_cost': {'key': 'properties.pretaxCost', 'type': 'decimal'}, - 'is_estimated': {'key': 'properties.isEstimated', 'type': 'bool'}, - 'meter_id': {'key': 'properties.meterId', 'type': 'str'}, - 'subscription_guid': {'key': 'properties.subscriptionGuid', 'type': 'str'}, - 'subscription_name': {'key': 'properties.subscriptionName', 'type': 'str'}, - 'account_name': {'key': 'properties.accountName', 'type': 'str'}, - 'department_name': {'key': 'properties.departmentName', 'type': 'str'}, - 'consumed_service': {'key': 'properties.consumedService', 'type': 'str'}, - 'cost_center': {'key': 'properties.costCenter', 'type': 'str'}, - 'additional_properties': {'key': 'properties.additionalProperties', 'type': 'str'}, - 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, - 'plan_name': {'key': 'properties.planName', 'type': 'str'}, - 'is_recurring_charge': {'key': 'properties.isRecurringCharge', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(Marketplace, self).__init__(**kwargs) - self.billing_period_id = None - self.usage_start = None - self.usage_end = None - self.resource_rate = None - self.offer_name = None - self.resource_group = None - self.order_number = None - self.instance_name = None - self.instance_id = None - self.currency = None - self.consumed_quantity = None - self.unit_of_measure = None - self.pretax_cost = None - self.is_estimated = None - self.meter_id = None - self.subscription_guid = None - self.subscription_name = None - self.account_name = None - self.department_name = None - self.consumed_service = None - self.cost_center = None - self.additional_properties = None - self.publisher_name = None - self.plan_name = None - self.is_recurring_charge = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace_paged.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace_paged.py deleted file mode 100644 index d360761aca55..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class MarketplacePaged(Paged): - """ - A paging container for iterating over a list of :class:`Marketplace ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Marketplace]'} - } - - def __init__(self, *args, **kwargs): - - super(MarketplacePaged, self).__init__(*args, **kwargs) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace_py3.py deleted file mode 100644 index 776cec56d753..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace_py3.py +++ /dev/null @@ -1,180 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Marketplace(Resource): - """An marketplace resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar billing_period_id: The id of the billing period resource that the - usage belongs to. - :vartype billing_period_id: str - :ivar usage_start: The start of the date time range covered by the usage - detail. - :vartype usage_start: datetime - :ivar usage_end: The end of the date time range covered by the usage - detail. - :vartype usage_end: datetime - :ivar resource_rate: The marketplace resource rate. - :vartype resource_rate: decimal.Decimal - :ivar offer_name: The type of offer. - :vartype offer_name: str - :ivar resource_group: The name of resource group. - :vartype resource_group: str - :ivar order_number: The order number. - :vartype order_number: str - :ivar instance_name: The name of the resource instance that the usage is - about. - :vartype instance_name: str - :ivar instance_id: The uri of the resource instance that the usage is - about. - :vartype instance_id: str - :ivar currency: The ISO currency in which the meter is charged, for - example, USD. - :vartype currency: str - :ivar consumed_quantity: The quantity of usage. - :vartype consumed_quantity: decimal.Decimal - :ivar unit_of_measure: The unit of measure. - :vartype unit_of_measure: str - :ivar pretax_cost: The amount of cost before tax. - :vartype pretax_cost: decimal.Decimal - :ivar is_estimated: The estimated usage is subject to change. - :vartype is_estimated: bool - :ivar meter_id: The meter id (GUID). - :vartype meter_id: str - :ivar subscription_guid: Subscription guid. - :vartype subscription_guid: str - :ivar subscription_name: Subscription name. - :vartype subscription_name: str - :ivar account_name: Account name. - :vartype account_name: str - :ivar department_name: Department name. - :vartype department_name: str - :ivar consumed_service: Consumed service name. - :vartype consumed_service: str - :ivar cost_center: The cost center of this department if it is a - department and a costcenter exists - :vartype cost_center: str - :ivar additional_properties: Additional details of this usage item. By - default this is not populated, unless it's specified in $expand. - :vartype additional_properties: str - :ivar publisher_name: The name of publisher. - :vartype publisher_name: str - :ivar plan_name: The name of plan. - :vartype plan_name: str - :ivar is_recurring_charge: Flag indicating whether this is a recurring - charge or not. - :vartype is_recurring_charge: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'billing_period_id': {'readonly': True}, - 'usage_start': {'readonly': True}, - 'usage_end': {'readonly': True}, - 'resource_rate': {'readonly': True}, - 'offer_name': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'order_number': {'readonly': True}, - 'instance_name': {'readonly': True}, - 'instance_id': {'readonly': True}, - 'currency': {'readonly': True}, - 'consumed_quantity': {'readonly': True}, - 'unit_of_measure': {'readonly': True}, - 'pretax_cost': {'readonly': True}, - 'is_estimated': {'readonly': True}, - 'meter_id': {'readonly': True}, - 'subscription_guid': {'readonly': True}, - 'subscription_name': {'readonly': True}, - 'account_name': {'readonly': True}, - 'department_name': {'readonly': True}, - 'consumed_service': {'readonly': True}, - 'cost_center': {'readonly': True}, - 'additional_properties': {'readonly': True}, - 'publisher_name': {'readonly': True}, - 'plan_name': {'readonly': True}, - 'is_recurring_charge': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, - 'usage_start': {'key': 'properties.usageStart', 'type': 'iso-8601'}, - 'usage_end': {'key': 'properties.usageEnd', 'type': 'iso-8601'}, - 'resource_rate': {'key': 'properties.resourceRate', 'type': 'decimal'}, - 'offer_name': {'key': 'properties.offerName', 'type': 'str'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'order_number': {'key': 'properties.orderNumber', 'type': 'str'}, - 'instance_name': {'key': 'properties.instanceName', 'type': 'str'}, - 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, - 'currency': {'key': 'properties.currency', 'type': 'str'}, - 'consumed_quantity': {'key': 'properties.consumedQuantity', 'type': 'decimal'}, - 'unit_of_measure': {'key': 'properties.unitOfMeasure', 'type': 'str'}, - 'pretax_cost': {'key': 'properties.pretaxCost', 'type': 'decimal'}, - 'is_estimated': {'key': 'properties.isEstimated', 'type': 'bool'}, - 'meter_id': {'key': 'properties.meterId', 'type': 'str'}, - 'subscription_guid': {'key': 'properties.subscriptionGuid', 'type': 'str'}, - 'subscription_name': {'key': 'properties.subscriptionName', 'type': 'str'}, - 'account_name': {'key': 'properties.accountName', 'type': 'str'}, - 'department_name': {'key': 'properties.departmentName', 'type': 'str'}, - 'consumed_service': {'key': 'properties.consumedService', 'type': 'str'}, - 'cost_center': {'key': 'properties.costCenter', 'type': 'str'}, - 'additional_properties': {'key': 'properties.additionalProperties', 'type': 'str'}, - 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, - 'plan_name': {'key': 'properties.planName', 'type': 'str'}, - 'is_recurring_charge': {'key': 'properties.isRecurringCharge', 'type': 'bool'}, - } - - def __init__(self, **kwargs) -> None: - super(Marketplace, self).__init__(**kwargs) - self.billing_period_id = None - self.usage_start = None - self.usage_end = None - self.resource_rate = None - self.offer_name = None - self.resource_group = None - self.order_number = None - self.instance_name = None - self.instance_id = None - self.currency = None - self.consumed_quantity = None - self.unit_of_measure = None - self.pretax_cost = None - self.is_estimated = None - self.meter_id = None - self.subscription_guid = None - self.subscription_name = None - self.account_name = None - self.department_name = None - self.consumed_service = None - self.cost_center = None - self.additional_properties = None - self.publisher_name = None - self.plan_name = None - self.is_recurring_charge = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/meter_details.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/meter_details.py deleted file mode 100644 index c0cdb32756b0..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/meter_details.py +++ /dev/null @@ -1,80 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MeterDetails(Model): - """The properties of the meter detail. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar meter_name: The name of the meter, within the given meter category - :vartype meter_name: str - :ivar meter_category: The category of the meter, for example, 'Cloud - services', 'Networking', etc.. - :vartype meter_category: str - :ivar meter_sub_category: The subcategory of the meter, for example, 'A6 - Cloud services', 'ExpressRoute (IXP)', etc.. - :vartype meter_sub_category: str - :ivar unit: The unit in which the meter consumption is charged, for - example, 'Hours', 'GB', etc. - :vartype unit: str - :ivar meter_location: The location in which the Azure service is - available. - :vartype meter_location: str - :ivar total_included_quantity: The total included quantity associated with - the offer. - :vartype total_included_quantity: decimal.Decimal - :ivar pretax_standard_rate: The pretax listing price. - :vartype pretax_standard_rate: decimal.Decimal - :ivar service_name: The name of the service. - :vartype service_name: str - :ivar service_tier: The service tier. - :vartype service_tier: str - """ - - _validation = { - 'meter_name': {'readonly': True}, - 'meter_category': {'readonly': True}, - 'meter_sub_category': {'readonly': True}, - 'unit': {'readonly': True}, - 'meter_location': {'readonly': True}, - 'total_included_quantity': {'readonly': True}, - 'pretax_standard_rate': {'readonly': True}, - 'service_name': {'readonly': True}, - 'service_tier': {'readonly': True}, - } - - _attribute_map = { - 'meter_name': {'key': 'meterName', 'type': 'str'}, - 'meter_category': {'key': 'meterCategory', 'type': 'str'}, - 'meter_sub_category': {'key': 'meterSubCategory', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'meter_location': {'key': 'meterLocation', 'type': 'str'}, - 'total_included_quantity': {'key': 'totalIncludedQuantity', 'type': 'decimal'}, - 'pretax_standard_rate': {'key': 'pretaxStandardRate', 'type': 'decimal'}, - 'service_name': {'key': 'serviceName', 'type': 'str'}, - 'service_tier': {'key': 'serviceTier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MeterDetails, self).__init__(**kwargs) - self.meter_name = None - self.meter_category = None - self.meter_sub_category = None - self.unit = None - self.meter_location = None - self.total_included_quantity = None - self.pretax_standard_rate = None - self.service_name = None - self.service_tier = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/meter_details_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/meter_details_py3.py deleted file mode 100644 index c7b6c8a43a47..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/meter_details_py3.py +++ /dev/null @@ -1,80 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MeterDetails(Model): - """The properties of the meter detail. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar meter_name: The name of the meter, within the given meter category - :vartype meter_name: str - :ivar meter_category: The category of the meter, for example, 'Cloud - services', 'Networking', etc.. - :vartype meter_category: str - :ivar meter_sub_category: The subcategory of the meter, for example, 'A6 - Cloud services', 'ExpressRoute (IXP)', etc.. - :vartype meter_sub_category: str - :ivar unit: The unit in which the meter consumption is charged, for - example, 'Hours', 'GB', etc. - :vartype unit: str - :ivar meter_location: The location in which the Azure service is - available. - :vartype meter_location: str - :ivar total_included_quantity: The total included quantity associated with - the offer. - :vartype total_included_quantity: decimal.Decimal - :ivar pretax_standard_rate: The pretax listing price. - :vartype pretax_standard_rate: decimal.Decimal - :ivar service_name: The name of the service. - :vartype service_name: str - :ivar service_tier: The service tier. - :vartype service_tier: str - """ - - _validation = { - 'meter_name': {'readonly': True}, - 'meter_category': {'readonly': True}, - 'meter_sub_category': {'readonly': True}, - 'unit': {'readonly': True}, - 'meter_location': {'readonly': True}, - 'total_included_quantity': {'readonly': True}, - 'pretax_standard_rate': {'readonly': True}, - 'service_name': {'readonly': True}, - 'service_tier': {'readonly': True}, - } - - _attribute_map = { - 'meter_name': {'key': 'meterName', 'type': 'str'}, - 'meter_category': {'key': 'meterCategory', 'type': 'str'}, - 'meter_sub_category': {'key': 'meterSubCategory', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'meter_location': {'key': 'meterLocation', 'type': 'str'}, - 'total_included_quantity': {'key': 'totalIncludedQuantity', 'type': 'decimal'}, - 'pretax_standard_rate': {'key': 'pretaxStandardRate', 'type': 'decimal'}, - 'service_name': {'key': 'serviceName', 'type': 'str'}, - 'service_tier': {'key': 'serviceTier', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MeterDetails, self).__init__(**kwargs) - self.meter_name = None - self.meter_category = None - self.meter_sub_category = None - self.unit = None - self.meter_location = None - self.total_included_quantity = None - self.pretax_standard_rate = None - self.service_name = None - self.service_tier = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/meter_details_response.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/meter_details_response.py deleted file mode 100644 index 2b7625a1587d..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/meter_details_response.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MeterDetailsResponse(Model): - """The properties of the meter detail. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar meter_name: The name of the meter, within the given meter category - :vartype meter_name: str - :ivar meter_category: The category of the meter, for example, 'Cloud - services', 'Networking', etc.. - :vartype meter_category: str - :ivar meter_sub_category: The subcategory of the meter, for example, 'A6 - Cloud services', 'ExpressRoute (IXP)', etc.. - :vartype meter_sub_category: str - :ivar unit_of_measure: The unit in which the meter consumption is charged, - for example, 'Hours', 'GB', etc. - :vartype unit_of_measure: str - :ivar service_family: The service family. - :vartype service_family: str - """ - - _validation = { - 'meter_name': {'readonly': True}, - 'meter_category': {'readonly': True}, - 'meter_sub_category': {'readonly': True}, - 'unit_of_measure': {'readonly': True}, - 'service_family': {'readonly': True}, - } - - _attribute_map = { - 'meter_name': {'key': 'meterName', 'type': 'str'}, - 'meter_category': {'key': 'meterCategory', 'type': 'str'}, - 'meter_sub_category': {'key': 'meterSubCategory', 'type': 'str'}, - 'unit_of_measure': {'key': 'unitOfMeasure', 'type': 'str'}, - 'service_family': {'key': 'serviceFamily', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MeterDetailsResponse, self).__init__(**kwargs) - self.meter_name = None - self.meter_category = None - self.meter_sub_category = None - self.unit_of_measure = None - self.service_family = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/meter_details_response_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/meter_details_response_py3.py deleted file mode 100644 index 37f55c450ded..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/meter_details_response_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MeterDetailsResponse(Model): - """The properties of the meter detail. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar meter_name: The name of the meter, within the given meter category - :vartype meter_name: str - :ivar meter_category: The category of the meter, for example, 'Cloud - services', 'Networking', etc.. - :vartype meter_category: str - :ivar meter_sub_category: The subcategory of the meter, for example, 'A6 - Cloud services', 'ExpressRoute (IXP)', etc.. - :vartype meter_sub_category: str - :ivar unit_of_measure: The unit in which the meter consumption is charged, - for example, 'Hours', 'GB', etc. - :vartype unit_of_measure: str - :ivar service_family: The service family. - :vartype service_family: str - """ - - _validation = { - 'meter_name': {'readonly': True}, - 'meter_category': {'readonly': True}, - 'meter_sub_category': {'readonly': True}, - 'unit_of_measure': {'readonly': True}, - 'service_family': {'readonly': True}, - } - - _attribute_map = { - 'meter_name': {'key': 'meterName', 'type': 'str'}, - 'meter_category': {'key': 'meterCategory', 'type': 'str'}, - 'meter_sub_category': {'key': 'meterSubCategory', 'type': 'str'}, - 'unit_of_measure': {'key': 'unitOfMeasure', 'type': 'str'}, - 'service_family': {'key': 'serviceFamily', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MeterDetailsResponse, self).__init__(**kwargs) - self.meter_name = None - self.meter_category = None - self.meter_sub_category = None - self.unit_of_measure = None - self.service_family = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/notification.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/notification.py deleted file mode 100644 index c50dc6aa4dc2..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/notification.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Notification(Model): - """The notification associated with a budget. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. The notification is enabled or not. - :type enabled: bool - :param operator: Required. The comparison operator. Possible values - include: 'EqualTo', 'GreaterThan', 'GreaterThanOrEqualTo' - :type operator: str or ~azure.mgmt.consumption.models.OperatorType - :param threshold: Required. Threshold value associated with a - notification. Notification is sent when the cost exceeded the threshold. - It is always percent and has to be between 0 and 1000. - :type threshold: decimal.Decimal - :param contact_emails: Required. Email addresses to send the budget - notification to when the threshold is exceeded. - :type contact_emails: list[str] - :param contact_roles: Contact roles to send the budget notification to - when the threshold is exceeded. - :type contact_roles: list[str] - :param contact_groups: Action groups to send the budget notification to - when the threshold is exceeded. - :type contact_groups: list[str] - """ - - _validation = { - 'enabled': {'required': True}, - 'operator': {'required': True}, - 'threshold': {'required': True}, - 'contact_emails': {'required': True, 'max_items': 50, 'min_items': 1}, - 'contact_groups': {'max_items': 50, 'min_items': 0}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'operator': {'key': 'operator', 'type': 'str'}, - 'threshold': {'key': 'threshold', 'type': 'decimal'}, - 'contact_emails': {'key': 'contactEmails', 'type': '[str]'}, - 'contact_roles': {'key': 'contactRoles', 'type': '[str]'}, - 'contact_groups': {'key': 'contactGroups', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(Notification, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.operator = kwargs.get('operator', None) - self.threshold = kwargs.get('threshold', None) - self.contact_emails = kwargs.get('contact_emails', None) - self.contact_roles = kwargs.get('contact_roles', None) - self.contact_groups = kwargs.get('contact_groups', None) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/notification_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/notification_py3.py deleted file mode 100644 index 6dfc794e2477..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/notification_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Notification(Model): - """The notification associated with a budget. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. The notification is enabled or not. - :type enabled: bool - :param operator: Required. The comparison operator. Possible values - include: 'EqualTo', 'GreaterThan', 'GreaterThanOrEqualTo' - :type operator: str or ~azure.mgmt.consumption.models.OperatorType - :param threshold: Required. Threshold value associated with a - notification. Notification is sent when the cost exceeded the threshold. - It is always percent and has to be between 0 and 1000. - :type threshold: decimal.Decimal - :param contact_emails: Required. Email addresses to send the budget - notification to when the threshold is exceeded. - :type contact_emails: list[str] - :param contact_roles: Contact roles to send the budget notification to - when the threshold is exceeded. - :type contact_roles: list[str] - :param contact_groups: Action groups to send the budget notification to - when the threshold is exceeded. - :type contact_groups: list[str] - """ - - _validation = { - 'enabled': {'required': True}, - 'operator': {'required': True}, - 'threshold': {'required': True}, - 'contact_emails': {'required': True, 'max_items': 50, 'min_items': 1}, - 'contact_groups': {'max_items': 50, 'min_items': 0}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'operator': {'key': 'operator', 'type': 'str'}, - 'threshold': {'key': 'threshold', 'type': 'decimal'}, - 'contact_emails': {'key': 'contactEmails', 'type': '[str]'}, - 'contact_roles': {'key': 'contactRoles', 'type': '[str]'}, - 'contact_groups': {'key': 'contactGroups', 'type': '[str]'}, - } - - def __init__(self, *, enabled: bool, operator, threshold, contact_emails, contact_roles=None, contact_groups=None, **kwargs) -> None: - super(Notification, self).__init__(**kwargs) - self.enabled = enabled - self.operator = operator - self.threshold = threshold - self.contact_emails = contact_emails - self.contact_roles = contact_roles - self.contact_groups = contact_groups diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/operation.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/operation.py deleted file mode 100644 index 4c9c35d9d03e..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/operation.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """A Consumption REST API operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Operation name: {provider}/{resource}/{operation}. - :vartype name: str - :param display: The object that represents the operation. - :type display: ~azure.mgmt.consumption.models.OperationDisplay - """ - - _validation = { - 'name': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = kwargs.get('display', None) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/operation_display.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/operation_display.py deleted file mode 100644 index 5a1143b805e0..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/operation_display.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """The object that represents the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: Service provider: Microsoft.Consumption. - :vartype provider: str - :ivar resource: Resource on which the operation is performed: UsageDetail, - etc. - :vartype resource: str - :ivar operation: Operation type: Read, write, delete, etc. - :vartype operation: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/operation_display_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/operation_display_py3.py deleted file mode 100644 index c5fe954f04a4..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/operation_display_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """The object that represents the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: Service provider: Microsoft.Consumption. - :vartype provider: str - :ivar resource: Resource on which the operation is performed: UsageDetail, - etc. - :vartype resource: str - :ivar operation: Operation type: Read, write, delete, etc. - :vartype operation: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/operation_paged.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/operation_paged.py deleted file mode 100644 index 5d69a3bf3ca3..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/operation_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/operation_py3.py deleted file mode 100644 index 93b8aa1bebad..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/operation_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """A Consumption REST API operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Operation name: {provider}/{resource}/{operation}. - :vartype name: str - :param display: The object that represents the operation. - :type display: ~azure.mgmt.consumption.models.OperationDisplay - """ - - _validation = { - 'name': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, *, display=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = display diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/price_sheet_properties.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/price_sheet_properties.py deleted file mode 100644 index 7bf1bc6b770d..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/price_sheet_properties.py +++ /dev/null @@ -1,77 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PriceSheetProperties(Model): - """The properties of the price sheet. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar billing_period_id: The id of the billing period resource that the - usage belongs to. - :vartype billing_period_id: str - :ivar meter_id: The meter id (GUID) - :vartype meter_id: str - :ivar meter_details: The details about the meter. By default this is not - populated, unless it's specified in $expand. - :vartype meter_details: ~azure.mgmt.consumption.models.MeterDetails - :ivar unit_of_measure: Unit of measure - :vartype unit_of_measure: str - :ivar included_quantity: Included quality for an offer - :vartype included_quantity: decimal.Decimal - :ivar part_number: Part Number - :vartype part_number: str - :ivar unit_price: Unit Price - :vartype unit_price: decimal.Decimal - :ivar currency_code: Currency Code - :vartype currency_code: str - :ivar offer_id: Offer Id - :vartype offer_id: str - """ - - _validation = { - 'billing_period_id': {'readonly': True}, - 'meter_id': {'readonly': True}, - 'meter_details': {'readonly': True}, - 'unit_of_measure': {'readonly': True}, - 'included_quantity': {'readonly': True}, - 'part_number': {'readonly': True}, - 'unit_price': {'readonly': True}, - 'currency_code': {'readonly': True}, - 'offer_id': {'readonly': True}, - } - - _attribute_map = { - 'billing_period_id': {'key': 'billingPeriodId', 'type': 'str'}, - 'meter_id': {'key': 'meterId', 'type': 'str'}, - 'meter_details': {'key': 'meterDetails', 'type': 'MeterDetails'}, - 'unit_of_measure': {'key': 'unitOfMeasure', 'type': 'str'}, - 'included_quantity': {'key': 'includedQuantity', 'type': 'decimal'}, - 'part_number': {'key': 'partNumber', 'type': 'str'}, - 'unit_price': {'key': 'unitPrice', 'type': 'decimal'}, - 'currency_code': {'key': 'currencyCode', 'type': 'str'}, - 'offer_id': {'key': 'offerId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PriceSheetProperties, self).__init__(**kwargs) - self.billing_period_id = None - self.meter_id = None - self.meter_details = None - self.unit_of_measure = None - self.included_quantity = None - self.part_number = None - self.unit_price = None - self.currency_code = None - self.offer_id = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/price_sheet_properties_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/price_sheet_properties_py3.py deleted file mode 100644 index eef5a80d3d23..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/price_sheet_properties_py3.py +++ /dev/null @@ -1,77 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PriceSheetProperties(Model): - """The properties of the price sheet. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar billing_period_id: The id of the billing period resource that the - usage belongs to. - :vartype billing_period_id: str - :ivar meter_id: The meter id (GUID) - :vartype meter_id: str - :ivar meter_details: The details about the meter. By default this is not - populated, unless it's specified in $expand. - :vartype meter_details: ~azure.mgmt.consumption.models.MeterDetails - :ivar unit_of_measure: Unit of measure - :vartype unit_of_measure: str - :ivar included_quantity: Included quality for an offer - :vartype included_quantity: decimal.Decimal - :ivar part_number: Part Number - :vartype part_number: str - :ivar unit_price: Unit Price - :vartype unit_price: decimal.Decimal - :ivar currency_code: Currency Code - :vartype currency_code: str - :ivar offer_id: Offer Id - :vartype offer_id: str - """ - - _validation = { - 'billing_period_id': {'readonly': True}, - 'meter_id': {'readonly': True}, - 'meter_details': {'readonly': True}, - 'unit_of_measure': {'readonly': True}, - 'included_quantity': {'readonly': True}, - 'part_number': {'readonly': True}, - 'unit_price': {'readonly': True}, - 'currency_code': {'readonly': True}, - 'offer_id': {'readonly': True}, - } - - _attribute_map = { - 'billing_period_id': {'key': 'billingPeriodId', 'type': 'str'}, - 'meter_id': {'key': 'meterId', 'type': 'str'}, - 'meter_details': {'key': 'meterDetails', 'type': 'MeterDetails'}, - 'unit_of_measure': {'key': 'unitOfMeasure', 'type': 'str'}, - 'included_quantity': {'key': 'includedQuantity', 'type': 'decimal'}, - 'part_number': {'key': 'partNumber', 'type': 'str'}, - 'unit_price': {'key': 'unitPrice', 'type': 'decimal'}, - 'currency_code': {'key': 'currencyCode', 'type': 'str'}, - 'offer_id': {'key': 'offerId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(PriceSheetProperties, self).__init__(**kwargs) - self.billing_period_id = None - self.meter_id = None - self.meter_details = None - self.unit_of_measure = None - self.included_quantity = None - self.part_number = None - self.unit_price = None - self.currency_code = None - self.offer_id = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/price_sheet_result.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/price_sheet_result.py deleted file mode 100644 index e4b536b687b7..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/price_sheet_result.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class PriceSheetResult(Resource): - """An pricesheet resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar pricesheets: Price sheet - :vartype pricesheets: - list[~azure.mgmt.consumption.models.PriceSheetProperties] - :ivar next_link: The link (url) to the next page of results. - :vartype next_link: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'pricesheets': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'pricesheets': {'key': 'properties.pricesheets', 'type': '[PriceSheetProperties]'}, - 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PriceSheetResult, self).__init__(**kwargs) - self.pricesheets = None - self.next_link = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/price_sheet_result_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/price_sheet_result_py3.py deleted file mode 100644 index aef94bda9c36..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/price_sheet_result_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class PriceSheetResult(Resource): - """An pricesheet resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar pricesheets: Price sheet - :vartype pricesheets: - list[~azure.mgmt.consumption.models.PriceSheetProperties] - :ivar next_link: The link (url) to the next page of results. - :vartype next_link: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'pricesheets': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'pricesheets': {'key': 'properties.pricesheets', 'type': '[PriceSheetProperties]'}, - 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(PriceSheetResult, self).__init__(**kwargs) - self.pricesheets = None - self.next_link = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/proxy_resource.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/proxy_resource.py deleted file mode 100644 index fd2230311017..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/proxy_resource.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ProxyResource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param e_tag: eTag of the resource. To handle concurrent update scenario, - this field will be used to determine whether the user is updating the - latest version or not. - :type e_tag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ProxyResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.e_tag = kwargs.get('e_tag', None) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/proxy_resource_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/proxy_resource_py3.py deleted file mode 100644 index 7fc6bf7e970c..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/proxy_resource_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ProxyResource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param e_tag: eTag of the resource. To handle concurrent update scenario, - this field will be used to determine whether the user is updating the - latest version or not. - :type e_tag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - } - - def __init__(self, *, e_tag: str=None, **kwargs) -> None: - super(ProxyResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.e_tag = e_tag diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_detail.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_detail.py deleted file mode 100644 index 434326f37c82..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_detail.py +++ /dev/null @@ -1,97 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ReservationDetail(Resource): - """reservation detail resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar reservation_order_id: The reservation order ID is the identifier for - a reservation purchase. Each reservation order ID represents a single - purchase transaction. A reservation order contains reservations. The - reservation order specifies the VM size and region for the reservations. - :vartype reservation_order_id: str - :ivar reservation_id: The reservation ID is the identifier of a - reservation within a reservation order. Each reservation is the grouping - for applying the benefit scope and also specifies the number of instances - to which the reservation benefit can be applied to. - :vartype reservation_id: str - :ivar sku_name: This is the ARM Sku name. It can be used to join with the - serviceType field in additional info in usage records. - :vartype sku_name: str - :ivar reserved_hours: This is the total hours reserved for the day. E.g. - if reservation for 1 instance was made on 1 PM, this will be 11 hours for - that day and 24 hours from subsequent days. - :vartype reserved_hours: decimal.Decimal - :ivar usage_date: The date on which consumption occurred. - :vartype usage_date: datetime - :ivar used_hours: This is the total hours used by the instance. - :vartype used_hours: decimal.Decimal - :ivar instance_id: This identifier is the name of the resource or the - fully qualified Resource ID. - :vartype instance_id: str - :ivar total_reserved_quantity: This is the total count of instances that - are reserved for the reservationId. - :vartype total_reserved_quantity: decimal.Decimal - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'reservation_order_id': {'readonly': True}, - 'reservation_id': {'readonly': True}, - 'sku_name': {'readonly': True}, - 'reserved_hours': {'readonly': True}, - 'usage_date': {'readonly': True}, - 'used_hours': {'readonly': True}, - 'instance_id': {'readonly': True}, - 'total_reserved_quantity': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'reservation_order_id': {'key': 'properties.reservationOrderId', 'type': 'str'}, - 'reservation_id': {'key': 'properties.reservationId', 'type': 'str'}, - 'sku_name': {'key': 'properties.skuName', 'type': 'str'}, - 'reserved_hours': {'key': 'properties.reservedHours', 'type': 'decimal'}, - 'usage_date': {'key': 'properties.usageDate', 'type': 'iso-8601'}, - 'used_hours': {'key': 'properties.usedHours', 'type': 'decimal'}, - 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, - 'total_reserved_quantity': {'key': 'properties.totalReservedQuantity', 'type': 'decimal'}, - } - - def __init__(self, **kwargs): - super(ReservationDetail, self).__init__(**kwargs) - self.reservation_order_id = None - self.reservation_id = None - self.sku_name = None - self.reserved_hours = None - self.usage_date = None - self.used_hours = None - self.instance_id = None - self.total_reserved_quantity = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_detail_paged.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_detail_paged.py deleted file mode 100644 index 5b596c3df721..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_detail_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ReservationDetailPaged(Paged): - """ - A paging container for iterating over a list of :class:`ReservationDetail ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ReservationDetail]'} - } - - def __init__(self, *args, **kwargs): - - super(ReservationDetailPaged, self).__init__(*args, **kwargs) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_detail_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_detail_py3.py deleted file mode 100644 index b88fccac1663..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_detail_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ReservationDetail(Resource): - """reservation detail resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar reservation_order_id: The reservation order ID is the identifier for - a reservation purchase. Each reservation order ID represents a single - purchase transaction. A reservation order contains reservations. The - reservation order specifies the VM size and region for the reservations. - :vartype reservation_order_id: str - :ivar reservation_id: The reservation ID is the identifier of a - reservation within a reservation order. Each reservation is the grouping - for applying the benefit scope and also specifies the number of instances - to which the reservation benefit can be applied to. - :vartype reservation_id: str - :ivar sku_name: This is the ARM Sku name. It can be used to join with the - serviceType field in additional info in usage records. - :vartype sku_name: str - :ivar reserved_hours: This is the total hours reserved for the day. E.g. - if reservation for 1 instance was made on 1 PM, this will be 11 hours for - that day and 24 hours from subsequent days. - :vartype reserved_hours: decimal.Decimal - :ivar usage_date: The date on which consumption occurred. - :vartype usage_date: datetime - :ivar used_hours: This is the total hours used by the instance. - :vartype used_hours: decimal.Decimal - :ivar instance_id: This identifier is the name of the resource or the - fully qualified Resource ID. - :vartype instance_id: str - :ivar total_reserved_quantity: This is the total count of instances that - are reserved for the reservationId. - :vartype total_reserved_quantity: decimal.Decimal - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'reservation_order_id': {'readonly': True}, - 'reservation_id': {'readonly': True}, - 'sku_name': {'readonly': True}, - 'reserved_hours': {'readonly': True}, - 'usage_date': {'readonly': True}, - 'used_hours': {'readonly': True}, - 'instance_id': {'readonly': True}, - 'total_reserved_quantity': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'reservation_order_id': {'key': 'properties.reservationOrderId', 'type': 'str'}, - 'reservation_id': {'key': 'properties.reservationId', 'type': 'str'}, - 'sku_name': {'key': 'properties.skuName', 'type': 'str'}, - 'reserved_hours': {'key': 'properties.reservedHours', 'type': 'decimal'}, - 'usage_date': {'key': 'properties.usageDate', 'type': 'iso-8601'}, - 'used_hours': {'key': 'properties.usedHours', 'type': 'decimal'}, - 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, - 'total_reserved_quantity': {'key': 'properties.totalReservedQuantity', 'type': 'decimal'}, - } - - def __init__(self, **kwargs) -> None: - super(ReservationDetail, self).__init__(**kwargs) - self.reservation_order_id = None - self.reservation_id = None - self.sku_name = None - self.reserved_hours = None - self.usage_date = None - self.used_hours = None - self.instance_id = None - self.total_reserved_quantity = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendation.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendation.py deleted file mode 100644 index 45a36151f6f8..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendation.py +++ /dev/null @@ -1,108 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReservationRecommendation(Model): - """Reservation recommendation resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: Resource location - :vartype location: str - :ivar sku: Resource sku - :vartype sku: str - :ivar look_back_period: The number of days of usage to look back for - recommendation. - :vartype look_back_period: str - :ivar meter_id: The meter id (GUID) - :vartype meter_id: str - :ivar term: RI recommendations in one or three year terms. - :vartype term: str - :ivar cost_with_no_reserved_instances: The total amount of cost without - reserved instances. - :vartype cost_with_no_reserved_instances: decimal.Decimal - :ivar recommended_quantity: Recommended quality for reserved instances. - :vartype recommended_quantity: decimal.Decimal - :ivar total_cost_with_reserved_instances: The total amount of cost with - reserved instances. - :vartype total_cost_with_reserved_instances: decimal.Decimal - :ivar net_savings: Total estimated savings with reserved instances. - :vartype net_savings: decimal.Decimal - :ivar first_usage_date: The usage date for looking back. - :vartype first_usage_date: datetime - :ivar scope: Shared or single recommendation. - :vartype scope: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'location': {'readonly': True}, - 'sku': {'readonly': True}, - 'look_back_period': {'readonly': True}, - 'meter_id': {'readonly': True}, - 'term': {'readonly': True}, - 'cost_with_no_reserved_instances': {'readonly': True}, - 'recommended_quantity': {'readonly': True}, - 'total_cost_with_reserved_instances': {'readonly': True}, - 'net_savings': {'readonly': True}, - 'first_usage_date': {'readonly': True}, - 'scope': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'look_back_period': {'key': 'properties.lookBackPeriod', 'type': 'str'}, - 'meter_id': {'key': 'properties.meterId', 'type': 'str'}, - 'term': {'key': 'properties.term', 'type': 'str'}, - 'cost_with_no_reserved_instances': {'key': 'properties.costWithNoReservedInstances', 'type': 'decimal'}, - 'recommended_quantity': {'key': 'properties.recommendedQuantity', 'type': 'decimal'}, - 'total_cost_with_reserved_instances': {'key': 'properties.totalCostWithReservedInstances', 'type': 'decimal'}, - 'net_savings': {'key': 'properties.netSavings', 'type': 'decimal'}, - 'first_usage_date': {'key': 'properties.firstUsageDate', 'type': 'iso-8601'}, - 'scope': {'key': 'properties.scope', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ReservationRecommendation, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.tags = None - self.location = None - self.sku = None - self.look_back_period = None - self.meter_id = None - self.term = None - self.cost_with_no_reserved_instances = None - self.recommended_quantity = None - self.total_cost_with_reserved_instances = None - self.net_savings = None - self.first_usage_date = None - self.scope = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendation_paged.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendation_paged.py deleted file mode 100644 index db7d155ade36..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ReservationRecommendationPaged(Paged): - """ - A paging container for iterating over a list of :class:`ReservationRecommendation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ReservationRecommendation]'} - } - - def __init__(self, *args, **kwargs): - - super(ReservationRecommendationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendation_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendation_py3.py deleted file mode 100644 index 267d8195d4a1..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendation_py3.py +++ /dev/null @@ -1,108 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReservationRecommendation(Model): - """Reservation recommendation resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: Resource location - :vartype location: str - :ivar sku: Resource sku - :vartype sku: str - :ivar look_back_period: The number of days of usage to look back for - recommendation. - :vartype look_back_period: str - :ivar meter_id: The meter id (GUID) - :vartype meter_id: str - :ivar term: RI recommendations in one or three year terms. - :vartype term: str - :ivar cost_with_no_reserved_instances: The total amount of cost without - reserved instances. - :vartype cost_with_no_reserved_instances: decimal.Decimal - :ivar recommended_quantity: Recommended quality for reserved instances. - :vartype recommended_quantity: decimal.Decimal - :ivar total_cost_with_reserved_instances: The total amount of cost with - reserved instances. - :vartype total_cost_with_reserved_instances: decimal.Decimal - :ivar net_savings: Total estimated savings with reserved instances. - :vartype net_savings: decimal.Decimal - :ivar first_usage_date: The usage date for looking back. - :vartype first_usage_date: datetime - :ivar scope: Shared or single recommendation. - :vartype scope: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'location': {'readonly': True}, - 'sku': {'readonly': True}, - 'look_back_period': {'readonly': True}, - 'meter_id': {'readonly': True}, - 'term': {'readonly': True}, - 'cost_with_no_reserved_instances': {'readonly': True}, - 'recommended_quantity': {'readonly': True}, - 'total_cost_with_reserved_instances': {'readonly': True}, - 'net_savings': {'readonly': True}, - 'first_usage_date': {'readonly': True}, - 'scope': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'look_back_period': {'key': 'properties.lookBackPeriod', 'type': 'str'}, - 'meter_id': {'key': 'properties.meterId', 'type': 'str'}, - 'term': {'key': 'properties.term', 'type': 'str'}, - 'cost_with_no_reserved_instances': {'key': 'properties.costWithNoReservedInstances', 'type': 'decimal'}, - 'recommended_quantity': {'key': 'properties.recommendedQuantity', 'type': 'decimal'}, - 'total_cost_with_reserved_instances': {'key': 'properties.totalCostWithReservedInstances', 'type': 'decimal'}, - 'net_savings': {'key': 'properties.netSavings', 'type': 'decimal'}, - 'first_usage_date': {'key': 'properties.firstUsageDate', 'type': 'iso-8601'}, - 'scope': {'key': 'properties.scope', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ReservationRecommendation, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.tags = None - self.location = None - self.sku = None - self.look_back_period = None - self.meter_id = None - self.term = None - self.cost_with_no_reserved_instances = None - self.recommended_quantity = None - self.total_cost_with_reserved_instances = None - self.net_savings = None - self.first_usage_date = None - self.scope = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_summary.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_summary.py deleted file mode 100644 index 3d60ffb73ba0..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_summary.py +++ /dev/null @@ -1,108 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ReservationSummary(Resource): - """reservation summary resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar reservation_order_id: The reservation order ID is the identifier for - a reservation purchase. Each reservation order ID represents a single - purchase transaction. A reservation order contains reservations. The - reservation order specifies the VM size and region for the reservations. - :vartype reservation_order_id: str - :ivar reservation_id: The reservation ID is the identifier of a - reservation within a reservation order. Each reservation is the grouping - for applying the benefit scope and also specifies the number of instances - to which the reservation benefit can be applied to. - :vartype reservation_id: str - :ivar sku_name: This is the ARM Sku name. It can be used to join with the - serviceType field in additional info in usage records. - :vartype sku_name: str - :ivar reserved_hours: This is the total hours reserved. E.g. if - reservation for 1 instance was made on 1 PM, this will be 11 hours for - that day and 24 hours from subsequent days - :vartype reserved_hours: decimal.Decimal - :ivar usage_date: Data corresponding to the utilization record. If the - grain of data is monthly, it will be first day of month. - :vartype usage_date: datetime - :ivar used_hours: Total used hours by the reservation - :vartype used_hours: decimal.Decimal - :ivar min_utilization_percentage: This is the minimum hourly utilization - in the usage time (day or month). E.g. if usage record corresponds to - 12/10/2017 and on that for hour 4 and 5, utilization was 10%, this field - will return 10% for that day - :vartype min_utilization_percentage: decimal.Decimal - :ivar avg_utilization_percentage: This is average utilization for the - entire time range. (day or month depending on the grain) - :vartype avg_utilization_percentage: decimal.Decimal - :ivar max_utilization_percentage: This is the maximum hourly utilization - in the usage time (day or month). E.g. if usage record corresponds to - 12/10/2017 and on that for hour 4 and 5, utilization was 100%, this field - will return 100% for that day. - :vartype max_utilization_percentage: decimal.Decimal - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'reservation_order_id': {'readonly': True}, - 'reservation_id': {'readonly': True}, - 'sku_name': {'readonly': True}, - 'reserved_hours': {'readonly': True}, - 'usage_date': {'readonly': True}, - 'used_hours': {'readonly': True}, - 'min_utilization_percentage': {'readonly': True}, - 'avg_utilization_percentage': {'readonly': True}, - 'max_utilization_percentage': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'reservation_order_id': {'key': 'properties.reservationOrderId', 'type': 'str'}, - 'reservation_id': {'key': 'properties.reservationId', 'type': 'str'}, - 'sku_name': {'key': 'properties.skuName', 'type': 'str'}, - 'reserved_hours': {'key': 'properties.reservedHours', 'type': 'decimal'}, - 'usage_date': {'key': 'properties.usageDate', 'type': 'iso-8601'}, - 'used_hours': {'key': 'properties.usedHours', 'type': 'decimal'}, - 'min_utilization_percentage': {'key': 'properties.minUtilizationPercentage', 'type': 'decimal'}, - 'avg_utilization_percentage': {'key': 'properties.avgUtilizationPercentage', 'type': 'decimal'}, - 'max_utilization_percentage': {'key': 'properties.maxUtilizationPercentage', 'type': 'decimal'}, - } - - def __init__(self, **kwargs): - super(ReservationSummary, self).__init__(**kwargs) - self.reservation_order_id = None - self.reservation_id = None - self.sku_name = None - self.reserved_hours = None - self.usage_date = None - self.used_hours = None - self.min_utilization_percentage = None - self.avg_utilization_percentage = None - self.max_utilization_percentage = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_summary_paged.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_summary_paged.py deleted file mode 100644 index 5b2e1ee931ae..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_summary_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ReservationSummaryPaged(Paged): - """ - A paging container for iterating over a list of :class:`ReservationSummary ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ReservationSummary]'} - } - - def __init__(self, *args, **kwargs): - - super(ReservationSummaryPaged, self).__init__(*args, **kwargs) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_summary_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_summary_py3.py deleted file mode 100644 index 45d46e82b876..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_summary_py3.py +++ /dev/null @@ -1,108 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ReservationSummary(Resource): - """reservation summary resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar reservation_order_id: The reservation order ID is the identifier for - a reservation purchase. Each reservation order ID represents a single - purchase transaction. A reservation order contains reservations. The - reservation order specifies the VM size and region for the reservations. - :vartype reservation_order_id: str - :ivar reservation_id: The reservation ID is the identifier of a - reservation within a reservation order. Each reservation is the grouping - for applying the benefit scope and also specifies the number of instances - to which the reservation benefit can be applied to. - :vartype reservation_id: str - :ivar sku_name: This is the ARM Sku name. It can be used to join with the - serviceType field in additional info in usage records. - :vartype sku_name: str - :ivar reserved_hours: This is the total hours reserved. E.g. if - reservation for 1 instance was made on 1 PM, this will be 11 hours for - that day and 24 hours from subsequent days - :vartype reserved_hours: decimal.Decimal - :ivar usage_date: Data corresponding to the utilization record. If the - grain of data is monthly, it will be first day of month. - :vartype usage_date: datetime - :ivar used_hours: Total used hours by the reservation - :vartype used_hours: decimal.Decimal - :ivar min_utilization_percentage: This is the minimum hourly utilization - in the usage time (day or month). E.g. if usage record corresponds to - 12/10/2017 and on that for hour 4 and 5, utilization was 10%, this field - will return 10% for that day - :vartype min_utilization_percentage: decimal.Decimal - :ivar avg_utilization_percentage: This is average utilization for the - entire time range. (day or month depending on the grain) - :vartype avg_utilization_percentage: decimal.Decimal - :ivar max_utilization_percentage: This is the maximum hourly utilization - in the usage time (day or month). E.g. if usage record corresponds to - 12/10/2017 and on that for hour 4 and 5, utilization was 100%, this field - will return 100% for that day. - :vartype max_utilization_percentage: decimal.Decimal - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'reservation_order_id': {'readonly': True}, - 'reservation_id': {'readonly': True}, - 'sku_name': {'readonly': True}, - 'reserved_hours': {'readonly': True}, - 'usage_date': {'readonly': True}, - 'used_hours': {'readonly': True}, - 'min_utilization_percentage': {'readonly': True}, - 'avg_utilization_percentage': {'readonly': True}, - 'max_utilization_percentage': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'reservation_order_id': {'key': 'properties.reservationOrderId', 'type': 'str'}, - 'reservation_id': {'key': 'properties.reservationId', 'type': 'str'}, - 'sku_name': {'key': 'properties.skuName', 'type': 'str'}, - 'reserved_hours': {'key': 'properties.reservedHours', 'type': 'decimal'}, - 'usage_date': {'key': 'properties.usageDate', 'type': 'iso-8601'}, - 'used_hours': {'key': 'properties.usedHours', 'type': 'decimal'}, - 'min_utilization_percentage': {'key': 'properties.minUtilizationPercentage', 'type': 'decimal'}, - 'avg_utilization_percentage': {'key': 'properties.avgUtilizationPercentage', 'type': 'decimal'}, - 'max_utilization_percentage': {'key': 'properties.maxUtilizationPercentage', 'type': 'decimal'}, - } - - def __init__(self, **kwargs) -> None: - super(ReservationSummary, self).__init__(**kwargs) - self.reservation_order_id = None - self.reservation_id = None - self.sku_name = None - self.reserved_hours = None - self.usage_date = None - self.used_hours = None - self.min_utilization_percentage = None - self.avg_utilization_percentage = None - self.max_utilization_percentage = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/resource.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/resource.py deleted file mode 100644 index 08e36f3f8091..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/resource.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.tags = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/resource_attributes.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/resource_attributes.py deleted file mode 100644 index fa0c45ddf7a8..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/resource_attributes.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceAttributes(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar location: Resource location - :vartype location: str - :ivar sku: Resource sku - :vartype sku: str - """ - - _validation = { - 'location': {'readonly': True}, - 'sku': {'readonly': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceAttributes, self).__init__(**kwargs) - self.location = None - self.sku = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/resource_attributes_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/resource_attributes_py3.py deleted file mode 100644 index 273cab9005d4..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/resource_attributes_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceAttributes(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar location: Resource location - :vartype location: str - :ivar sku: Resource sku - :vartype sku: str - """ - - _validation = { - 'location': {'readonly': True}, - 'sku': {'readonly': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ResourceAttributes, self).__init__(**kwargs) - self.location = None - self.sku = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/resource_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/resource_py3.py deleted file mode 100644 index 38b4ca3ee6af..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/resource_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.tags = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/tag.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/tag.py deleted file mode 100644 index f52e1c5671ad..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/tag.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Tag(Model): - """The tag resource. - - :param key: Tag key. - :type key: str - """ - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Tag, self).__init__(**kwargs) - self.key = kwargs.get('key', None) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/tag_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/tag_py3.py deleted file mode 100644 index fca156d8312c..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/tag_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Tag(Model): - """The tag resource. - - :param key: Tag key. - :type key: str - """ - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - } - - def __init__(self, *, key: str=None, **kwargs) -> None: - super(Tag, self).__init__(**kwargs) - self.key = key diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/tags_result.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/tags_result.py deleted file mode 100644 index b202a33c77de..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/tags_result.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class TagsResult(ProxyResource): - """A resource listing all tags. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param e_tag: eTag of the resource. To handle concurrent update scenario, - this field will be used to determine whether the user is updating the - latest version or not. - :type e_tag: str - :param tags: A list of Tag. - :type tags: list[~azure.mgmt.consumption.models.Tag] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'tags': {'key': 'properties.tags', 'type': '[Tag]'}, - } - - def __init__(self, **kwargs): - super(TagsResult, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/tags_result_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/tags_result_py3.py deleted file mode 100644 index e817c5180ccc..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/tags_result_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class TagsResult(ProxyResource): - """A resource listing all tags. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param e_tag: eTag of the resource. To handle concurrent update scenario, - this field will be used to determine whether the user is updating the - latest version or not. - :type e_tag: str - :param tags: A list of Tag. - :type tags: list[~azure.mgmt.consumption.models.Tag] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'tags': {'key': 'properties.tags', 'type': '[Tag]'}, - } - - def __init__(self, *, e_tag: str=None, tags=None, **kwargs) -> None: - super(TagsResult, self).__init__(e_tag=e_tag, **kwargs) - self.tags = tags diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/usage_detail.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/usage_detail.py deleted file mode 100644 index 46fc3c6ae87b..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/usage_detail.py +++ /dev/null @@ -1,279 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class UsageDetail(Resource): - """An usage detail resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar billing_account_id: Billing Account identifier. - :vartype billing_account_id: str - :ivar billing_account_name: Billing Account Name. - :vartype billing_account_name: str - :ivar billing_period_start_date: The billing period start date. - :vartype billing_period_start_date: datetime - :ivar billing_period_end_date: The billing period end date. - :vartype billing_period_end_date: datetime - :ivar billing_profile_id: Billing Profile identifier. - :vartype billing_profile_id: str - :ivar billing_profile_name: Billing Profile Name. - :vartype billing_profile_name: str - :ivar account_owner_id: Account Owner Id. - :vartype account_owner_id: str - :ivar account_name: Account Name. - :vartype account_name: str - :ivar subscription_id: Subscription guid. - :vartype subscription_id: str - :ivar subscription_name: Subscription name. - :vartype subscription_name: str - :ivar date_property: Date for the usage record. - :vartype date_property: datetime - :ivar product: Product name for the consumed service or purchase. Not - available for Marketplace. - :vartype product: str - :ivar part_number: Part Number of the service used. Can be used to join - with the price sheet. Not available for marketplace. - :vartype part_number: str - :ivar meter_id: The meter id (GUID). Not available for marketplace. For - reserved instance this represents the primary meter for which the - reservation was purchased. For the actual VM Size for which the - reservation is purchased see productOrderName. - :vartype meter_id: str - :ivar meter_details: The details about the meter. By default this is not - populated, unless it's specified in $expand. - :vartype meter_details: - ~azure.mgmt.consumption.models.MeterDetailsResponse - :ivar quantity: The usage quantity. - :vartype quantity: decimal.Decimal - :ivar effective_price: Effective Price that’s charged for the usage. - :vartype effective_price: decimal.Decimal - :ivar cost: The amount of cost before tax. - :vartype cost: decimal.Decimal - :ivar unit_price: Unit Price is the price applicable to you. (your EA or - other contract price). - :vartype unit_price: decimal.Decimal - :ivar billing_currency: Billing Currency. - :vartype billing_currency: str - :ivar resource_location: Resource Location. - :vartype resource_location: str - :ivar consumed_service: Consumed service name. Name of the azure resource - provider that emits the usage or was purchased. This value is not provided - for marketplace usage. - :vartype consumed_service: str - :ivar resource_id: Azure resource manager resource identifier. - :vartype resource_id: str - :ivar resource_name: Resource Name. - :vartype resource_name: str - :ivar service_info1: Service Info 1. - :vartype service_info1: str - :ivar service_info2: Service Info 2. - :vartype service_info2: str - :ivar additional_info: Additional details of this usage item. By default - this is not populated, unless it's specified in $expand. Use this field to - get usage line item specific details such as the actual VM Size - (ServiceType) or the ratio in which the reservation discount is applied. - :vartype additional_info: str - :ivar invoice_section: Invoice Section Name. - :vartype invoice_section: str - :ivar cost_center: The cost center of this department if it is a - department and a cost center is provided. - :vartype cost_center: str - :ivar resource_group: Resource Group Name. - :vartype resource_group: str - :ivar reservation_id: ARM resource id of the reservation. Only applies to - records relevant to reservations. - :vartype reservation_id: str - :ivar reservation_name: User provided display name of the reservation. - Last known name for a particular day is populated in the daily data. Only - applies to records relevant to reservations. - :vartype reservation_name: str - :ivar product_order_id: Product Order Id. For reservations this is the - Reservation Order ID. - :vartype product_order_id: str - :ivar product_order_name: Product Order Name. For reservations this is the - SKU that was purchased. - :vartype product_order_name: str - :ivar offer_id: Offer Id. Ex: MS-AZR-0017P, MS-AZR-0148P. - :vartype offer_id: str - :ivar is_azure_credit_eligible: Is Azure Credit Eligible. - :vartype is_azure_credit_eligible: bool - :ivar term: Term (in months). 1 month for monthly recurring purchase. 12 - months for a 1 year reservation. 36 months for a 3 year reservation. - :vartype term: str - :ivar publisher_name: Publisher Name. - :vartype publisher_name: str - :ivar publisher_type: Publisher Type. - :vartype publisher_type: str - :ivar plan_name: Plan Name. - :vartype plan_name: str - :ivar charge_type: Indicates a charge represents credits, usage, a - Marketplace purchase, a reservation fee, or a refund. - :vartype charge_type: str - :ivar frequency: Indicates how frequently this charge will occur. OneTime - for purchases which only happen once, Monthly for fees which recur every - month, and UsageBased for charges based on how much a service is used. - :vartype frequency: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'billing_account_id': {'readonly': True}, - 'billing_account_name': {'readonly': True}, - 'billing_period_start_date': {'readonly': True}, - 'billing_period_end_date': {'readonly': True}, - 'billing_profile_id': {'readonly': True}, - 'billing_profile_name': {'readonly': True}, - 'account_owner_id': {'readonly': True}, - 'account_name': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'subscription_name': {'readonly': True}, - 'date_property': {'readonly': True}, - 'product': {'readonly': True}, - 'part_number': {'readonly': True}, - 'meter_id': {'readonly': True}, - 'meter_details': {'readonly': True}, - 'quantity': {'readonly': True}, - 'effective_price': {'readonly': True}, - 'cost': {'readonly': True}, - 'unit_price': {'readonly': True}, - 'billing_currency': {'readonly': True}, - 'resource_location': {'readonly': True}, - 'consumed_service': {'readonly': True}, - 'resource_id': {'readonly': True}, - 'resource_name': {'readonly': True}, - 'service_info1': {'readonly': True}, - 'service_info2': {'readonly': True}, - 'additional_info': {'readonly': True}, - 'invoice_section': {'readonly': True}, - 'cost_center': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'reservation_id': {'readonly': True}, - 'reservation_name': {'readonly': True}, - 'product_order_id': {'readonly': True}, - 'product_order_name': {'readonly': True}, - 'offer_id': {'readonly': True}, - 'is_azure_credit_eligible': {'readonly': True}, - 'term': {'readonly': True}, - 'publisher_name': {'readonly': True}, - 'publisher_type': {'readonly': True}, - 'plan_name': {'readonly': True}, - 'charge_type': {'readonly': True}, - 'frequency': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'billing_account_id': {'key': 'properties.billingAccountId', 'type': 'str'}, - 'billing_account_name': {'key': 'properties.billingAccountName', 'type': 'str'}, - 'billing_period_start_date': {'key': 'properties.billingPeriodStartDate', 'type': 'iso-8601'}, - 'billing_period_end_date': {'key': 'properties.billingPeriodEndDate', 'type': 'iso-8601'}, - 'billing_profile_id': {'key': 'properties.billingProfileId', 'type': 'str'}, - 'billing_profile_name': {'key': 'properties.billingProfileName', 'type': 'str'}, - 'account_owner_id': {'key': 'properties.accountOwnerId', 'type': 'str'}, - 'account_name': {'key': 'properties.accountName', 'type': 'str'}, - 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, - 'subscription_name': {'key': 'properties.subscriptionName', 'type': 'str'}, - 'date_property': {'key': 'properties.date', 'type': 'iso-8601'}, - 'product': {'key': 'properties.product', 'type': 'str'}, - 'part_number': {'key': 'properties.partNumber', 'type': 'str'}, - 'meter_id': {'key': 'properties.meterId', 'type': 'str'}, - 'meter_details': {'key': 'properties.meterDetails', 'type': 'MeterDetailsResponse'}, - 'quantity': {'key': 'properties.quantity', 'type': 'decimal'}, - 'effective_price': {'key': 'properties.effectivePrice', 'type': 'decimal'}, - 'cost': {'key': 'properties.cost', 'type': 'decimal'}, - 'unit_price': {'key': 'properties.unitPrice', 'type': 'decimal'}, - 'billing_currency': {'key': 'properties.billingCurrency', 'type': 'str'}, - 'resource_location': {'key': 'properties.resourceLocation', 'type': 'str'}, - 'consumed_service': {'key': 'properties.consumedService', 'type': 'str'}, - 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, - 'resource_name': {'key': 'properties.resourceName', 'type': 'str'}, - 'service_info1': {'key': 'properties.serviceInfo1', 'type': 'str'}, - 'service_info2': {'key': 'properties.serviceInfo2', 'type': 'str'}, - 'additional_info': {'key': 'properties.additionalInfo', 'type': 'str'}, - 'invoice_section': {'key': 'properties.invoiceSection', 'type': 'str'}, - 'cost_center': {'key': 'properties.costCenter', 'type': 'str'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'reservation_id': {'key': 'properties.reservationId', 'type': 'str'}, - 'reservation_name': {'key': 'properties.reservationName', 'type': 'str'}, - 'product_order_id': {'key': 'properties.productOrderId', 'type': 'str'}, - 'product_order_name': {'key': 'properties.productOrderName', 'type': 'str'}, - 'offer_id': {'key': 'properties.offerId', 'type': 'str'}, - 'is_azure_credit_eligible': {'key': 'properties.isAzureCreditEligible', 'type': 'bool'}, - 'term': {'key': 'properties.term', 'type': 'str'}, - 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, - 'publisher_type': {'key': 'properties.publisherType', 'type': 'str'}, - 'plan_name': {'key': 'properties.planName', 'type': 'str'}, - 'charge_type': {'key': 'properties.chargeType', 'type': 'str'}, - 'frequency': {'key': 'properties.frequency', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UsageDetail, self).__init__(**kwargs) - self.billing_account_id = None - self.billing_account_name = None - self.billing_period_start_date = None - self.billing_period_end_date = None - self.billing_profile_id = None - self.billing_profile_name = None - self.account_owner_id = None - self.account_name = None - self.subscription_id = None - self.subscription_name = None - self.date_property = None - self.product = None - self.part_number = None - self.meter_id = None - self.meter_details = None - self.quantity = None - self.effective_price = None - self.cost = None - self.unit_price = None - self.billing_currency = None - self.resource_location = None - self.consumed_service = None - self.resource_id = None - self.resource_name = None - self.service_info1 = None - self.service_info2 = None - self.additional_info = None - self.invoice_section = None - self.cost_center = None - self.resource_group = None - self.reservation_id = None - self.reservation_name = None - self.product_order_id = None - self.product_order_name = None - self.offer_id = None - self.is_azure_credit_eligible = None - self.term = None - self.publisher_name = None - self.publisher_type = None - self.plan_name = None - self.charge_type = None - self.frequency = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/usage_detail_paged.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/usage_detail_paged.py deleted file mode 100644 index ae15d28a276e..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/usage_detail_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class UsageDetailPaged(Paged): - """ - A paging container for iterating over a list of :class:`UsageDetail ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[UsageDetail]'} - } - - def __init__(self, *args, **kwargs): - - super(UsageDetailPaged, self).__init__(*args, **kwargs) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/usage_detail_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/usage_detail_py3.py deleted file mode 100644 index 131dadc0be5d..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/usage_detail_py3.py +++ /dev/null @@ -1,279 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class UsageDetail(Resource): - """An usage detail resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar billing_account_id: Billing Account identifier. - :vartype billing_account_id: str - :ivar billing_account_name: Billing Account Name. - :vartype billing_account_name: str - :ivar billing_period_start_date: The billing period start date. - :vartype billing_period_start_date: datetime - :ivar billing_period_end_date: The billing period end date. - :vartype billing_period_end_date: datetime - :ivar billing_profile_id: Billing Profile identifier. - :vartype billing_profile_id: str - :ivar billing_profile_name: Billing Profile Name. - :vartype billing_profile_name: str - :ivar account_owner_id: Account Owner Id. - :vartype account_owner_id: str - :ivar account_name: Account Name. - :vartype account_name: str - :ivar subscription_id: Subscription guid. - :vartype subscription_id: str - :ivar subscription_name: Subscription name. - :vartype subscription_name: str - :ivar date_property: Date for the usage record. - :vartype date_property: datetime - :ivar product: Product name for the consumed service or purchase. Not - available for Marketplace. - :vartype product: str - :ivar part_number: Part Number of the service used. Can be used to join - with the price sheet. Not available for marketplace. - :vartype part_number: str - :ivar meter_id: The meter id (GUID). Not available for marketplace. For - reserved instance this represents the primary meter for which the - reservation was purchased. For the actual VM Size for which the - reservation is purchased see productOrderName. - :vartype meter_id: str - :ivar meter_details: The details about the meter. By default this is not - populated, unless it's specified in $expand. - :vartype meter_details: - ~azure.mgmt.consumption.models.MeterDetailsResponse - :ivar quantity: The usage quantity. - :vartype quantity: decimal.Decimal - :ivar effective_price: Effective Price that’s charged for the usage. - :vartype effective_price: decimal.Decimal - :ivar cost: The amount of cost before tax. - :vartype cost: decimal.Decimal - :ivar unit_price: Unit Price is the price applicable to you. (your EA or - other contract price). - :vartype unit_price: decimal.Decimal - :ivar billing_currency: Billing Currency. - :vartype billing_currency: str - :ivar resource_location: Resource Location. - :vartype resource_location: str - :ivar consumed_service: Consumed service name. Name of the azure resource - provider that emits the usage or was purchased. This value is not provided - for marketplace usage. - :vartype consumed_service: str - :ivar resource_id: Azure resource manager resource identifier. - :vartype resource_id: str - :ivar resource_name: Resource Name. - :vartype resource_name: str - :ivar service_info1: Service Info 1. - :vartype service_info1: str - :ivar service_info2: Service Info 2. - :vartype service_info2: str - :ivar additional_info: Additional details of this usage item. By default - this is not populated, unless it's specified in $expand. Use this field to - get usage line item specific details such as the actual VM Size - (ServiceType) or the ratio in which the reservation discount is applied. - :vartype additional_info: str - :ivar invoice_section: Invoice Section Name. - :vartype invoice_section: str - :ivar cost_center: The cost center of this department if it is a - department and a cost center is provided. - :vartype cost_center: str - :ivar resource_group: Resource Group Name. - :vartype resource_group: str - :ivar reservation_id: ARM resource id of the reservation. Only applies to - records relevant to reservations. - :vartype reservation_id: str - :ivar reservation_name: User provided display name of the reservation. - Last known name for a particular day is populated in the daily data. Only - applies to records relevant to reservations. - :vartype reservation_name: str - :ivar product_order_id: Product Order Id. For reservations this is the - Reservation Order ID. - :vartype product_order_id: str - :ivar product_order_name: Product Order Name. For reservations this is the - SKU that was purchased. - :vartype product_order_name: str - :ivar offer_id: Offer Id. Ex: MS-AZR-0017P, MS-AZR-0148P. - :vartype offer_id: str - :ivar is_azure_credit_eligible: Is Azure Credit Eligible. - :vartype is_azure_credit_eligible: bool - :ivar term: Term (in months). 1 month for monthly recurring purchase. 12 - months for a 1 year reservation. 36 months for a 3 year reservation. - :vartype term: str - :ivar publisher_name: Publisher Name. - :vartype publisher_name: str - :ivar publisher_type: Publisher Type. - :vartype publisher_type: str - :ivar plan_name: Plan Name. - :vartype plan_name: str - :ivar charge_type: Indicates a charge represents credits, usage, a - Marketplace purchase, a reservation fee, or a refund. - :vartype charge_type: str - :ivar frequency: Indicates how frequently this charge will occur. OneTime - for purchases which only happen once, Monthly for fees which recur every - month, and UsageBased for charges based on how much a service is used. - :vartype frequency: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'billing_account_id': {'readonly': True}, - 'billing_account_name': {'readonly': True}, - 'billing_period_start_date': {'readonly': True}, - 'billing_period_end_date': {'readonly': True}, - 'billing_profile_id': {'readonly': True}, - 'billing_profile_name': {'readonly': True}, - 'account_owner_id': {'readonly': True}, - 'account_name': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'subscription_name': {'readonly': True}, - 'date_property': {'readonly': True}, - 'product': {'readonly': True}, - 'part_number': {'readonly': True}, - 'meter_id': {'readonly': True}, - 'meter_details': {'readonly': True}, - 'quantity': {'readonly': True}, - 'effective_price': {'readonly': True}, - 'cost': {'readonly': True}, - 'unit_price': {'readonly': True}, - 'billing_currency': {'readonly': True}, - 'resource_location': {'readonly': True}, - 'consumed_service': {'readonly': True}, - 'resource_id': {'readonly': True}, - 'resource_name': {'readonly': True}, - 'service_info1': {'readonly': True}, - 'service_info2': {'readonly': True}, - 'additional_info': {'readonly': True}, - 'invoice_section': {'readonly': True}, - 'cost_center': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'reservation_id': {'readonly': True}, - 'reservation_name': {'readonly': True}, - 'product_order_id': {'readonly': True}, - 'product_order_name': {'readonly': True}, - 'offer_id': {'readonly': True}, - 'is_azure_credit_eligible': {'readonly': True}, - 'term': {'readonly': True}, - 'publisher_name': {'readonly': True}, - 'publisher_type': {'readonly': True}, - 'plan_name': {'readonly': True}, - 'charge_type': {'readonly': True}, - 'frequency': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'billing_account_id': {'key': 'properties.billingAccountId', 'type': 'str'}, - 'billing_account_name': {'key': 'properties.billingAccountName', 'type': 'str'}, - 'billing_period_start_date': {'key': 'properties.billingPeriodStartDate', 'type': 'iso-8601'}, - 'billing_period_end_date': {'key': 'properties.billingPeriodEndDate', 'type': 'iso-8601'}, - 'billing_profile_id': {'key': 'properties.billingProfileId', 'type': 'str'}, - 'billing_profile_name': {'key': 'properties.billingProfileName', 'type': 'str'}, - 'account_owner_id': {'key': 'properties.accountOwnerId', 'type': 'str'}, - 'account_name': {'key': 'properties.accountName', 'type': 'str'}, - 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, - 'subscription_name': {'key': 'properties.subscriptionName', 'type': 'str'}, - 'date_property': {'key': 'properties.date', 'type': 'iso-8601'}, - 'product': {'key': 'properties.product', 'type': 'str'}, - 'part_number': {'key': 'properties.partNumber', 'type': 'str'}, - 'meter_id': {'key': 'properties.meterId', 'type': 'str'}, - 'meter_details': {'key': 'properties.meterDetails', 'type': 'MeterDetailsResponse'}, - 'quantity': {'key': 'properties.quantity', 'type': 'decimal'}, - 'effective_price': {'key': 'properties.effectivePrice', 'type': 'decimal'}, - 'cost': {'key': 'properties.cost', 'type': 'decimal'}, - 'unit_price': {'key': 'properties.unitPrice', 'type': 'decimal'}, - 'billing_currency': {'key': 'properties.billingCurrency', 'type': 'str'}, - 'resource_location': {'key': 'properties.resourceLocation', 'type': 'str'}, - 'consumed_service': {'key': 'properties.consumedService', 'type': 'str'}, - 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, - 'resource_name': {'key': 'properties.resourceName', 'type': 'str'}, - 'service_info1': {'key': 'properties.serviceInfo1', 'type': 'str'}, - 'service_info2': {'key': 'properties.serviceInfo2', 'type': 'str'}, - 'additional_info': {'key': 'properties.additionalInfo', 'type': 'str'}, - 'invoice_section': {'key': 'properties.invoiceSection', 'type': 'str'}, - 'cost_center': {'key': 'properties.costCenter', 'type': 'str'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'reservation_id': {'key': 'properties.reservationId', 'type': 'str'}, - 'reservation_name': {'key': 'properties.reservationName', 'type': 'str'}, - 'product_order_id': {'key': 'properties.productOrderId', 'type': 'str'}, - 'product_order_name': {'key': 'properties.productOrderName', 'type': 'str'}, - 'offer_id': {'key': 'properties.offerId', 'type': 'str'}, - 'is_azure_credit_eligible': {'key': 'properties.isAzureCreditEligible', 'type': 'bool'}, - 'term': {'key': 'properties.term', 'type': 'str'}, - 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, - 'publisher_type': {'key': 'properties.publisherType', 'type': 'str'}, - 'plan_name': {'key': 'properties.planName', 'type': 'str'}, - 'charge_type': {'key': 'properties.chargeType', 'type': 'str'}, - 'frequency': {'key': 'properties.frequency', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(UsageDetail, self).__init__(**kwargs) - self.billing_account_id = None - self.billing_account_name = None - self.billing_period_start_date = None - self.billing_period_end_date = None - self.billing_profile_id = None - self.billing_profile_name = None - self.account_owner_id = None - self.account_name = None - self.subscription_id = None - self.subscription_name = None - self.date_property = None - self.product = None - self.part_number = None - self.meter_id = None - self.meter_details = None - self.quantity = None - self.effective_price = None - self.cost = None - self.unit_price = None - self.billing_currency = None - self.resource_location = None - self.consumed_service = None - self.resource_id = None - self.resource_name = None - self.service_info1 = None - self.service_info2 = None - self.additional_info = None - self.invoice_section = None - self.cost_center = None - self.resource_group = None - self.reservation_id = None - self.reservation_name = None - self.product_order_id = None - self.product_order_name = None - self.offer_id = None - self.is_azure_credit_eligible = None - self.term = None - self.publisher_name = None - self.publisher_type = None - self.plan_name = None - self.charge_type = None - self.frequency = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/usage_details_download_response.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/usage_details_download_response.py deleted file mode 100644 index c009f116b3c7..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/usage_details_download_response.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class UsageDetailsDownloadResponse(Resource): - """Download response of Usage Details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar download_url: The URL to the csv file. - :vartype download_url: str - :ivar valid_till: The time in UTC at which this download URL will expire. - :vartype valid_till: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'download_url': {'readonly': True}, - 'valid_till': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'download_url': {'key': 'properties.downloadUrl', 'type': 'str'}, - 'valid_till': {'key': 'properties.validTill', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UsageDetailsDownloadResponse, self).__init__(**kwargs) - self.download_url = None - self.valid_till = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/usage_details_download_response_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/usage_details_download_response_py3.py deleted file mode 100644 index baaae11b4345..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/usage_details_download_response_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class UsageDetailsDownloadResponse(Resource): - """Download response of Usage Details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar download_url: The URL to the csv file. - :vartype download_url: str - :ivar valid_till: The time in UTC at which this download URL will expire. - :vartype valid_till: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'download_url': {'readonly': True}, - 'valid_till': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'download_url': {'key': 'properties.downloadUrl', 'type': 'str'}, - 'valid_till': {'key': 'properties.validTill', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(UsageDetailsDownloadResponse, self).__init__(**kwargs) - self.download_url = None - self.valid_till = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/__init__.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/__init__.py index f778b44f0171..af902995b4f8 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/__init__.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/__init__.py @@ -9,19 +9,19 @@ # regenerated. # -------------------------------------------------------------------------- -from .usage_details_operations import UsageDetailsOperations -from .marketplaces_operations import MarketplacesOperations -from .budgets_operations import BudgetsOperations -from .tags_operations import TagsOperations -from .charges_operations import ChargesOperations -from .balances_operations import BalancesOperations -from .reservations_summaries_operations import ReservationsSummariesOperations -from .reservations_details_operations import ReservationsDetailsOperations -from .reservation_recommendations_operations import ReservationRecommendationsOperations -from .price_sheet_operations import PriceSheetOperations -from .forecasts_operations import ForecastsOperations -from .operations import Operations -from .aggregated_cost_operations import AggregatedCostOperations +from ._usage_details_operations import UsageDetailsOperations +from ._marketplaces_operations import MarketplacesOperations +from ._budgets_operations import BudgetsOperations +from ._tags_operations import TagsOperations +from ._charges_operations import ChargesOperations +from ._balances_operations import BalancesOperations +from ._reservations_summaries_operations import ReservationsSummariesOperations +from ._reservations_details_operations import ReservationsDetailsOperations +from ._reservation_recommendations_operations import ReservationRecommendationsOperations +from ._price_sheet_operations import PriceSheetOperations +from ._forecasts_operations import ForecastsOperations +from ._operations import Operations +from ._aggregated_cost_operations import AggregatedCostOperations __all__ = [ 'UsageDetailsOperations', diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_aggregated_cost_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_aggregated_cost_operations.py new file mode 100644 index 000000000000..e0a53cdf7d24 --- /dev/null +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_aggregated_cost_operations.py @@ -0,0 +1,168 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class AggregatedCostOperations(object): + """AggregatedCostOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-05-01-preview. Constant value: "2019-05-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-05-01-preview" + + self.config = config + + def get_by_management_group( + self, management_group_id, filter=None, custom_headers=None, raw=False, **operation_config): + """Provides the aggregate cost of a management group and all child + management groups by current billing period. + + :param management_group_id: Azure Management Group ID. + :type management_group_id: str + :param filter: May be used to filter aggregated cost by + properties/usageStart (Utc time), properties/usageEnd (Utc time). The + filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not + currently support 'ne', 'or', or 'not'. Tag filter is a key value pair + string where key and value is separated by a colon (:). + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ManagementGroupAggregatedCostResult or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.consumption.models.ManagementGroupAggregatedCostResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_by_management_group.metadata['url'] + path_format_arguments = { + 'managementGroupId': self._serialize.url("management_group_id", management_group_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ManagementGroupAggregatedCostResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_by_management_group.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Consumption/aggregatedcost'} + + def get_for_billing_period_by_management_group( + self, management_group_id, billing_period_name, custom_headers=None, raw=False, **operation_config): + """Provides the aggregate cost of a management group and all child + management groups by specified billing period. + + :param management_group_id: Azure Management Group ID. + :type management_group_id: str + :param billing_period_name: Billing Period Name. + :type billing_period_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ManagementGroupAggregatedCostResult or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.consumption.models.ManagementGroupAggregatedCostResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_for_billing_period_by_management_group.metadata['url'] + path_format_arguments = { + 'managementGroupId': self._serialize.url("management_group_id", management_group_id, 'str'), + 'billingPeriodName': self._serialize.url("billing_period_name", billing_period_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ManagementGroupAggregatedCostResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_for_billing_period_by_management_group.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/Microsoft.Consumption/aggregatedcost'} diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_balances_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_balances_operations.py new file mode 100644 index 000000000000..b67f712aca9d --- /dev/null +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_balances_operations.py @@ -0,0 +1,156 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class BalancesOperations(object): + """BalancesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-05-01-preview. Constant value: "2019-05-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-05-01-preview" + + self.config = config + + def get_by_billing_account( + self, billing_account_id, custom_headers=None, raw=False, **operation_config): + """Gets the balances for a scope by billingAccountId. Balances are + available via this API only for May 1, 2014 or later. + + :param billing_account_id: BillingAccount ID + :type billing_account_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Balance or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.consumption.models.Balance or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_by_billing_account.metadata['url'] + path_format_arguments = { + 'billingAccountId': self._serialize.url("billing_account_id", billing_account_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Balance', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_by_billing_account.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/balances'} + + def get_for_billing_period_by_billing_account( + self, billing_account_id, billing_period_name, custom_headers=None, raw=False, **operation_config): + """Gets the balances for a scope by billing period and billingAccountId. + Balances are available via this API only for May 1, 2014 or later. + + :param billing_account_id: BillingAccount ID + :type billing_account_id: str + :param billing_period_name: Billing Period Name. + :type billing_period_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Balance or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.consumption.models.Balance or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_for_billing_period_by_billing_account.metadata['url'] + path_format_arguments = { + 'billingAccountId': self._serialize.url("billing_account_id", billing_account_id, 'str'), + 'billingPeriodName': self._serialize.url("billing_period_name", billing_period_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Balance', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_for_billing_period_by_billing_account.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/balances'} diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_budgets_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_budgets_operations.py new file mode 100644 index 000000000000..f85e9eb492aa --- /dev/null +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_budgets_operations.py @@ -0,0 +1,346 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class BudgetsOperations(object): + """BudgetsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-05-01-preview. Constant value: "2019-05-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-05-01-preview" + + self.config = config + + def list( + self, scope, custom_headers=None, raw=False, **operation_config): + """Lists all budgets for the defined scope. + + :param scope: The scope associated with budget operations. This + includes '/subscriptions/{subscriptionId}/' for subscription scope, + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' + for resourceGroup scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for + Billing Account scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' + for Department scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope, + '/providers/Microsoft.Management/managementGroups/{managementGroupId}' + for Management Group scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope. + :type scope: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Budget + :rtype: + ~azure.mgmt.consumption.models.BudgetPaged[~azure.mgmt.consumption.models.Budget] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.BudgetPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/{scope}/providers/Microsoft.Consumption/budgets'} + + def get( + self, scope, budget_name, custom_headers=None, raw=False, **operation_config): + """Gets the budget for the scope by budget name. + + :param scope: The scope associated with budget operations. This + includes '/subscriptions/{subscriptionId}/' for subscription scope, + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' + for resourceGroup scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for + Billing Account scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' + for Department scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope, + '/providers/Microsoft.Management/managementGroups/{managementGroupId}' + for Management Group scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope. + :type scope: str + :param budget_name: Budget Name. + :type budget_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Budget or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.consumption.models.Budget or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + 'budgetName': self._serialize.url("budget_name", budget_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Budget', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}'} + + def create_or_update( + self, scope, budget_name, parameters, custom_headers=None, raw=False, **operation_config): + """The operation to create or update a budget. Update operation requires + latest eTag to be set in the request mandatorily. You may obtain the + latest eTag by performing a get operation. Create operation does not + require eTag. + + :param scope: The scope associated with budget operations. This + includes '/subscriptions/{subscriptionId}/' for subscription scope, + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' + for resourceGroup scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for + Billing Account scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' + for Department scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope, + '/providers/Microsoft.Management/managementGroups/{managementGroupId}' + for Management Group scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope. + :type scope: str + :param budget_name: Budget Name. + :type budget_name: str + :param parameters: Parameters supplied to the Create Budget operation. + :type parameters: ~azure.mgmt.consumption.models.Budget + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Budget or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.consumption.models.Budget or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + 'budgetName': self._serialize.url("budget_name", budget_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'Budget') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Budget', response) + if response.status_code == 201: + deserialized = self._deserialize('Budget', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}'} + + def delete( + self, scope, budget_name, custom_headers=None, raw=False, **operation_config): + """The operation to delete a budget. + + :param scope: The scope associated with budget operations. This + includes '/subscriptions/{subscriptionId}/' for subscription scope, + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' + for resourceGroup scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for + Billing Account scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' + for Department scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope, + '/providers/Microsoft.Management/managementGroups/{managementGroupId}' + for Management Group scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope. + :type scope: str + :param budget_name: Budget Name. + :type budget_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + 'budgetName': self._serialize.url("budget_name", budget_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}'} diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_charges_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_charges_operations.py new file mode 100644 index 000000000000..f22ad599fb45 --- /dev/null +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_charges_operations.py @@ -0,0 +1,112 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ChargesOperations(object): + """ChargesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-05-01-preview. Constant value: "2019-05-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-05-01-preview" + + self.config = config + + def list_by_scope( + self, scope, filter=None, custom_headers=None, raw=False, **operation_config): + """Lists the charges based for the defined scope. + + :param scope: The scope associated with usage details operations. This + includes + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' + for Department scope and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope. For department and enrollment accounts, + you can also add billing period to the scope using + '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For + e.g. to specify billing period at department scope use + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' + :type scope: str + :param filter: May be used to filter charges by properties/usageEnd + (Utc time), properties/usageStart (Utc time). The filter supports + 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support + 'ne', 'or', or 'not'. Tag filter is a key value pair string where key + and value is separated by a colon (:). + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ChargeSummary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.consumption.models.ChargeSummary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_by_scope.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ChargeSummary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_by_scope.metadata = {'url': '/{scope}/providers/Microsoft.Consumption/charges'} diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_forecasts_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_forecasts_operations.py new file mode 100644 index 000000000000..ee088efc5c6f --- /dev/null +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_forecasts_operations.py @@ -0,0 +1,111 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ForecastsOperations(object): + """ForecastsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-05-01-preview. Constant value: "2019-05-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-05-01-preview" + + self.config = config + + def list( + self, filter=None, custom_headers=None, raw=False, **operation_config): + """Lists the forecast charges by subscriptionId. + + :param filter: May be used to filter forecasts by properties/usageDate + (Utc time), properties/chargeType or properties/grain. The filter + supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not + currently support 'ne', 'or', or 'not'. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Forecast + :rtype: + ~azure.mgmt.consumption.models.ForecastPaged[~azure.mgmt.consumption.models.Forecast] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ForecastPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/forecasts'} diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_marketplaces_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_marketplaces_operations.py new file mode 100644 index 000000000000..f523fabee4a4 --- /dev/null +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_marketplaces_operations.py @@ -0,0 +1,143 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class MarketplacesOperations(object): + """MarketplacesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-05-01-preview. Constant value: "2019-05-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-05-01-preview" + + self.config = config + + def list( + self, scope, filter=None, top=None, skiptoken=None, custom_headers=None, raw=False, **operation_config): + """Lists the marketplaces for a scope at the defined scope. Marketplaces + are available via this API only for May 1, 2014 or later. + + :param scope: The scope associated with marketplace operations. This + includes '/subscriptions/{subscriptionId}/' for subscription scope, + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' + for resourceGroup scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for + Billing Account scope, + '/providers/Microsoft.Billing/departments/{departmentId}' for + Department scope, + '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope and + '/providers/Microsoft.Management/managementGroups/{managementGroupId}' + for Management Group scope. For subscription, billing account, + department, enrollment account and ManagementGroup, you can also add + billing period to the scope using + '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For + e.g. to specify billing period at department scope use + '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' + :type scope: str + :param filter: May be used to filter marketplaces by + properties/usageEnd (Utc time), properties/usageStart (Utc time), + properties/resourceGroup, properties/instanceName or + properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', + 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. + :type filter: str + :param top: May be used to limit the number of results to the most + recent N marketplaces. + :type top: int + :param skiptoken: Skiptoken is only used if a previous operation + returned a partial result. If a previous response contains a nextLink + element, the value of the nextLink element will include a skiptoken + parameter that specifies a starting point to use for subsequent calls. + :type skiptoken: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Marketplace + :rtype: + ~azure.mgmt.consumption.models.MarketplacePaged[~azure.mgmt.consumption.models.Marketplace] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=1000, minimum=1) + if skiptoken is not None: + query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.MarketplacePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/{scope}/providers/Microsoft.Consumption/marketplaces'} diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_operations.py new file mode 100644 index 000000000000..2a483e8acae7 --- /dev/null +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_operations.py @@ -0,0 +1,100 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class Operations(object): + """Operations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-05-01-preview. Constant value: "2019-05-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-05-01-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the available consumption REST API operations. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Operation + :rtype: + ~azure.mgmt.consumption.models.OperationPaged[~azure.mgmt.consumption.models.Operation] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Consumption/operations'} diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_price_sheet_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_price_sheet_operations.py new file mode 100644 index 000000000000..179888a894e3 --- /dev/null +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_price_sheet_operations.py @@ -0,0 +1,188 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class PriceSheetOperations(object): + """PriceSheetOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-05-01-preview. Constant value: "2019-05-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-05-01-preview" + + self.config = config + + def get( + self, expand=None, skiptoken=None, top=None, custom_headers=None, raw=False, **operation_config): + """Gets the price sheet for a scope by subscriptionId. Price sheet is + available via this API only for May 1, 2014 or later. + + :param expand: May be used to expand the properties/meterDetails + within a price sheet. By default, these fields are not included when + returning price sheet. + :type expand: str + :param skiptoken: Skiptoken is only used if a previous operation + returned a partial result. If a previous response contains a nextLink + element, the value of the nextLink element will include a skiptoken + parameter that specifies a starting point to use for subsequent calls. + :type skiptoken: str + :param top: May be used to limit the number of results to the top N + results. + :type top: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PriceSheetResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.consumption.models.PriceSheetResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + if skiptoken is not None: + query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=1000, minimum=1) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PriceSheetResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/pricesheets/default'} + + def get_by_billing_period( + self, billing_period_name, expand=None, skiptoken=None, top=None, custom_headers=None, raw=False, **operation_config): + """Get the price sheet for a scope by subscriptionId and billing period. + Price sheet is available via this API only for May 1, 2014 or later. + + :param billing_period_name: Billing Period Name. + :type billing_period_name: str + :param expand: May be used to expand the properties/meterDetails + within a price sheet. By default, these fields are not included when + returning price sheet. + :type expand: str + :param skiptoken: Skiptoken is only used if a previous operation + returned a partial result. If a previous response contains a nextLink + element, the value of the nextLink element will include a skiptoken + parameter that specifies a starting point to use for subsequent calls. + :type skiptoken: str + :param top: May be used to limit the number of results to the top N + results. + :type top: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PriceSheetResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.consumption.models.PriceSheetResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_by_billing_period.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'billingPeriodName': self._serialize.url("billing_period_name", billing_period_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + if skiptoken is not None: + query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=1000, minimum=1) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PriceSheetResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_by_billing_period.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/pricesheets/default'} diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservation_recommendations_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservation_recommendations_operations.py new file mode 100644 index 000000000000..4e562cf45220 --- /dev/null +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservation_recommendations_operations.py @@ -0,0 +1,109 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ReservationRecommendationsOperations(object): + """ReservationRecommendationsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-05-01-preview. Constant value: "2019-05-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-05-01-preview" + + self.config = config + + def list( + self, filter=None, custom_headers=None, raw=False, **operation_config): + """List of recommendations for purchasing reserved instances. + + :param filter: May be used to filter reservationRecommendations by + properties/scope and properties/lookBackPeriod. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ReservationRecommendation + :rtype: + ~azure.mgmt.consumption.models.ReservationRecommendationPaged[~azure.mgmt.consumption.models.ReservationRecommendation] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ReservationRecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/reservationRecommendations'} diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservations_details_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservations_details_operations.py new file mode 100644 index 000000000000..dc3f87d3d538 --- /dev/null +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservations_details_operations.py @@ -0,0 +1,186 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ReservationsDetailsOperations(object): + """ReservationsDetailsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-05-01-preview. Constant value: "2019-05-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-05-01-preview" + + self.config = config + + def list_by_reservation_order( + self, reservation_order_id, filter, custom_headers=None, raw=False, **operation_config): + """Lists the reservations details for provided date range. + + :param reservation_order_id: Order Id of the reservation + :type reservation_order_id: str + :param filter: Filter reservation details by date range. The + properties/UsageDate for start date and end date. The filter supports + 'le' and 'ge' + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ReservationDetail + :rtype: + ~azure.mgmt.consumption.models.ReservationDetailPaged[~azure.mgmt.consumption.models.ReservationDetail] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_reservation_order.metadata['url'] + path_format_arguments = { + 'reservationOrderId': self._serialize.url("reservation_order_id", reservation_order_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ReservationDetailPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_reservation_order.metadata = {'url': '/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/providers/Microsoft.Consumption/reservationDetails'} + + def list_by_reservation_order_and_reservation( + self, reservation_order_id, reservation_id, filter, custom_headers=None, raw=False, **operation_config): + """Lists the reservations details for provided date range. + + :param reservation_order_id: Order Id of the reservation + :type reservation_order_id: str + :param reservation_id: Id of the reservation + :type reservation_id: str + :param filter: Filter reservation details by date range. The + properties/UsageDate for start date and end date. The filter supports + 'le' and 'ge' + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ReservationDetail + :rtype: + ~azure.mgmt.consumption.models.ReservationDetailPaged[~azure.mgmt.consumption.models.ReservationDetail] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_reservation_order_and_reservation.metadata['url'] + path_format_arguments = { + 'reservationOrderId': self._serialize.url("reservation_order_id", reservation_order_id, 'str'), + 'reservationId': self._serialize.url("reservation_id", reservation_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ReservationDetailPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_reservation_order_and_reservation.metadata = {'url': '/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/reservations/{reservationId}/providers/Microsoft.Consumption/reservationDetails'} diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservations_summaries_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservations_summaries_operations.py new file mode 100644 index 000000000000..4e2ef7394684 --- /dev/null +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservations_summaries_operations.py @@ -0,0 +1,194 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ReservationsSummariesOperations(object): + """ReservationsSummariesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-05-01-preview. Constant value: "2019-05-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-05-01-preview" + + self.config = config + + def list_by_reservation_order( + self, reservation_order_id, grain, filter=None, custom_headers=None, raw=False, **operation_config): + """Lists the reservations summaries for daily or monthly grain. + + :param reservation_order_id: Order Id of the reservation + :type reservation_order_id: str + :param grain: Can be daily or monthly. Possible values include: + 'DailyGrain', 'MonthlyGrain' + :type grain: str or ~azure.mgmt.consumption.models.Datagrain + :param filter: Required only for daily grain. The properties/UsageDate + for start date and end date. The filter supports 'le' and 'ge' + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ReservationSummary + :rtype: + ~azure.mgmt.consumption.models.ReservationSummaryPaged[~azure.mgmt.consumption.models.ReservationSummary] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_reservation_order.metadata['url'] + path_format_arguments = { + 'reservationOrderId': self._serialize.url("reservation_order_id", reservation_order_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['grain'] = self._serialize.query("grain", grain, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ReservationSummaryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_reservation_order.metadata = {'url': '/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/providers/Microsoft.Consumption/reservationSummaries'} + + def list_by_reservation_order_and_reservation( + self, reservation_order_id, reservation_id, grain, filter=None, custom_headers=None, raw=False, **operation_config): + """Lists the reservations summaries for daily or monthly grain. + + :param reservation_order_id: Order Id of the reservation + :type reservation_order_id: str + :param reservation_id: Id of the reservation + :type reservation_id: str + :param grain: Can be daily or monthly. Possible values include: + 'DailyGrain', 'MonthlyGrain' + :type grain: str or ~azure.mgmt.consumption.models.Datagrain + :param filter: Required only for daily grain. The properties/UsageDate + for start date and end date. The filter supports 'le' and 'ge' + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ReservationSummary + :rtype: + ~azure.mgmt.consumption.models.ReservationSummaryPaged[~azure.mgmt.consumption.models.ReservationSummary] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_reservation_order_and_reservation.metadata['url'] + path_format_arguments = { + 'reservationOrderId': self._serialize.url("reservation_order_id", reservation_order_id, 'str'), + 'reservationId': self._serialize.url("reservation_id", reservation_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['grain'] = self._serialize.query("grain", grain, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ReservationSummaryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_reservation_order_and_reservation.metadata = {'url': '/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/reservations/{reservationId}/providers/Microsoft.Consumption/reservationSummaries'} diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_tags_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_tags_operations.py new file mode 100644 index 000000000000..45d3c9fcbce7 --- /dev/null +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_tags_operations.py @@ -0,0 +1,106 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class TagsOperations(object): + """TagsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-05-01-preview. Constant value: "2019-05-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-05-01-preview" + + self.config = config + + def get( + self, scope, custom_headers=None, raw=False, **operation_config): + """Get all available tag keys for the defined scope. + + :param scope: The scope associated with tags operations. This includes + '/subscriptions/{subscriptionId}/' for subscription scope, + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' + for resourceGroup scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for + Billing Account scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' + for Department scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope and + '/providers/Microsoft.Management/managementGroups/{managementGroupId}' + for Management Group scope.. + :type scope: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TagsResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.consumption.models.TagsResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TagsResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/{scope}/providers/Microsoft.Consumption/tags'} diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_usage_details_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_usage_details_operations.py new file mode 100644 index 000000000000..6a75ad5237f0 --- /dev/null +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_usage_details_operations.py @@ -0,0 +1,298 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class UsageDetailsOperations(object): + """UsageDetailsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-05-01-preview. Constant value: "2019-05-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-05-01-preview" + + self.config = config + + def list( + self, scope, expand=None, filter=None, skiptoken=None, top=None, metric=None, custom_headers=None, raw=False, **operation_config): + """Lists the usage details for the defined scope. Usage details are + available via this API only for May 1, 2014 or later. + + :param scope: The scope associated with usage details operations. This + includes '/subscriptions/{subscriptionId}/' for subscription scope, + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' + for resourceGroup scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for + Billing Account scope, + '/providers/Microsoft.Billing/departments/{departmentId}' for + Department scope, + '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope and + '/providers/Microsoft.Management/managementGroups/{managementGroupId}' + for Management Group scope. For subscription, billing account, + department, enrollment account and management group, you can also add + billing period to the scope using + '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For + e.g. to specify billing period at department scope use + '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' + :type scope: str + :param expand: May be used to expand the properties/additionalInfo or + properties/meterDetails within a list of usage details. By default, + these fields are not included when listing usage details. + :type expand: str + :param filter: May be used to filter usageDetails by + properties/resourceGroup, properties/resourceName, + properties/resourceId, properties/chargeType, + properties/reservationId, properties/publisherType or tags. The filter + supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not + currently support 'ne', 'or', or 'not'. Tag filter is a key value pair + string where key and value is separated by a colon (:). PublisherType + Filter accepts two values azure and marketplace and it is currently + supported for Web Direct Offer Type + :type filter: str + :param skiptoken: Skiptoken is only used if a previous operation + returned a partial result. If a previous response contains a nextLink + element, the value of the nextLink element will include a skiptoken + parameter that specifies a starting point to use for subsequent calls. + :type skiptoken: str + :param top: May be used to limit the number of results to the most + recent N usageDetails. + :type top: int + :param metric: Allows to select different type of cost/usage records. + Possible values include: 'ActualCostMetricType', + 'AmortizedCostMetricType', 'UsageMetricType' + :type metric: str or ~azure.mgmt.consumption.models.Metrictype + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of UsageDetail + :rtype: + ~azure.mgmt.consumption.models.UsageDetailPaged[~azure.mgmt.consumption.models.UsageDetail] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if skiptoken is not None: + query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=1000, minimum=1) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if metric is not None: + query_parameters['metric'] = self._serialize.query("metric", metric, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UsageDetailPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/{scope}/providers/Microsoft.Consumption/usageDetails'} + + + def _download_initial( + self, scope, metric=None, filter=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.download.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if metric is not None: + query_parameters['metric'] = self._serialize.query("metric", metric, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + header_dict = {} + + if response.status_code == 200: + deserialized = self._deserialize('UsageDetailsDownloadResponse', response) + header_dict = { + 'Location': 'str', + 'Retry-After': 'str', + 'Azure-AsyncOperation': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + + def download( + self, scope, metric=None, filter=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Download usage details data. + + :param scope: The scope associated with usage details operations. This + includes '/subscriptions/{subscriptionId}/' for subscription scope, + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' + for resourceGroup scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for + Billing Account scope, + '/providers/Microsoft.Billing/departments/{departmentId}' for + Department scope, + '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope and + '/providers/Microsoft.Management/managementGroups/{managementGroupId}' + for Management Group scope. For subscription, billing account, + department, enrollment account and management group, you can also add + billing period to the scope using + '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For + e.g. to specify billing period at department scope use + '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' + :type scope: str + :param metric: Allows to select different type of cost/usage records. + Possible values include: 'ActualCostMetricType', + 'AmortizedCostMetricType', 'UsageMetricType' + :type metric: str or ~azure.mgmt.consumption.models.Metrictype + :param filter: May be used to filter usageDetails by + properties/resourceGroup, properties/resourceName, + properties/resourceId, properties/chargeType, + properties/reservationId, properties/publisherType or tags. The filter + supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not + currently support 'ne', 'or', or 'not'. Tag filter is a key value pair + string where key and value is separated by a colon (:). PublisherType + Filter accepts two values azure and marketplace and it is currently + supported for Web Direct Offer Type + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + UsageDetailsDownloadResponse or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.consumption.models.UsageDetailsDownloadResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.consumption.models.UsageDetailsDownloadResponse]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._download_initial( + scope=scope, + metric=metric, + filter=filter, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + header_dict = { + 'Location': 'str', + 'Retry-After': 'str', + 'Azure-AsyncOperation': 'str', + } + deserialized = self._deserialize('UsageDetailsDownloadResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + download.metadata = {'url': '/{scope}/providers/Microsoft.Consumption/usageDetails/download'} diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/aggregated_cost_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/aggregated_cost_operations.py deleted file mode 100644 index 699821161f53..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/aggregated_cost_operations.py +++ /dev/null @@ -1,168 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class AggregatedCostOperations(object): - """AggregatedCostOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-04-01-preview. Constant value: "2019-04-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-04-01-preview" - - self.config = config - - def get_by_management_group( - self, management_group_id, filter=None, custom_headers=None, raw=False, **operation_config): - """Provides the aggregate cost of a management group and all child - management groups by current billing period. - - :param management_group_id: Azure Management Group ID. - :type management_group_id: str - :param filter: May be used to filter aggregated cost by - properties/usageStart (Utc time), properties/usageEnd (Utc time). The - filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not - currently support 'ne', 'or', or 'not'. Tag filter is a key value pair - string where key and value is separated by a colon (:). - :type filter: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagementGroupAggregatedCostResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.consumption.models.ManagementGroupAggregatedCostResult or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_by_management_group.metadata['url'] - path_format_arguments = { - 'managementGroupId': self._serialize.url("management_group_id", management_group_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagementGroupAggregatedCostResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_by_management_group.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Consumption/aggregatedcost'} - - def get_for_billing_period_by_management_group( - self, management_group_id, billing_period_name, custom_headers=None, raw=False, **operation_config): - """Provides the aggregate cost of a management group and all child - management groups by specified billing period. - - :param management_group_id: Azure Management Group ID. - :type management_group_id: str - :param billing_period_name: Billing Period Name. - :type billing_period_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagementGroupAggregatedCostResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.consumption.models.ManagementGroupAggregatedCostResult or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_for_billing_period_by_management_group.metadata['url'] - path_format_arguments = { - 'managementGroupId': self._serialize.url("management_group_id", management_group_id, 'str'), - 'billingPeriodName': self._serialize.url("billing_period_name", billing_period_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagementGroupAggregatedCostResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_for_billing_period_by_management_group.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/Microsoft.Consumption/aggregatedcost'} diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/balances_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/balances_operations.py deleted file mode 100644 index ed6f60699c50..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/balances_operations.py +++ /dev/null @@ -1,156 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class BalancesOperations(object): - """BalancesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-04-01-preview. Constant value: "2019-04-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-04-01-preview" - - self.config = config - - def get_by_billing_account( - self, billing_account_id, custom_headers=None, raw=False, **operation_config): - """Gets the balances for a scope by billingAccountId. Balances are - available via this API only for May 1, 2014 or later. - - :param billing_account_id: BillingAccount ID - :type billing_account_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Balance or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.consumption.models.Balance or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_by_billing_account.metadata['url'] - path_format_arguments = { - 'billingAccountId': self._serialize.url("billing_account_id", billing_account_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Balance', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_by_billing_account.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/balances'} - - def get_for_billing_period_by_billing_account( - self, billing_account_id, billing_period_name, custom_headers=None, raw=False, **operation_config): - """Gets the balances for a scope by billing period and billingAccountId. - Balances are available via this API only for May 1, 2014 or later. - - :param billing_account_id: BillingAccount ID - :type billing_account_id: str - :param billing_period_name: Billing Period Name. - :type billing_period_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Balance or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.consumption.models.Balance or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_for_billing_period_by_billing_account.metadata['url'] - path_format_arguments = { - 'billingAccountId': self._serialize.url("billing_account_id", billing_account_id, 'str'), - 'billingPeriodName': self._serialize.url("billing_period_name", billing_period_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Balance', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_for_billing_period_by_billing_account.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/balances'} diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/budgets_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/budgets_operations.py deleted file mode 100644 index 54a54997449f..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/budgets_operations.py +++ /dev/null @@ -1,344 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class BudgetsOperations(object): - """BudgetsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-04-01-preview. Constant value: "2019-04-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-04-01-preview" - - self.config = config - - def list( - self, scope, custom_headers=None, raw=False, **operation_config): - """Lists all budgets for the defined scope. - - :param scope: The scope associated with budget operations. This - includes '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' - for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for - Billing Account scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId}' - for Management Group scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope. - :type scope: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Budget - :rtype: - ~azure.mgmt.consumption.models.BudgetPaged[~azure.mgmt.consumption.models.Budget] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.BudgetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.BudgetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/{scope}/providers/Microsoft.Consumption/budgets'} - - def get( - self, scope, budget_name, custom_headers=None, raw=False, **operation_config): - """Gets the budget for the scope by budget name. - - :param scope: The scope associated with budget operations. This - includes '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' - for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for - Billing Account scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId}' - for Management Group scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope. - :type scope: str - :param budget_name: Budget Name. - :type budget_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Budget or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.consumption.models.Budget or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), - 'budgetName': self._serialize.url("budget_name", budget_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Budget', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}'} - - def create_or_update( - self, scope, budget_name, parameters, custom_headers=None, raw=False, **operation_config): - """The operation to create or update a budget. Update operation requires - latest eTag to be set in the request mandatorily. You may obtain the - latest eTag by performing a get operation. Create operation does not - require eTag. - - :param scope: The scope associated with budget operations. This - includes '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' - for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for - Billing Account scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId}' - for Management Group scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope. - :type scope: str - :param budget_name: Budget Name. - :type budget_name: str - :param parameters: Parameters supplied to the Create Budget operation. - :type parameters: ~azure.mgmt.consumption.models.Budget - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Budget or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.consumption.models.Budget or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), - 'budgetName': self._serialize.url("budget_name", budget_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'Budget') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Budget', response) - if response.status_code == 201: - deserialized = self._deserialize('Budget', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}'} - - def delete( - self, scope, budget_name, custom_headers=None, raw=False, **operation_config): - """The operation to delete a budget. - - :param scope: The scope associated with budget operations. This - includes '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' - for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for - Billing Account scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId}' - for Management Group scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope. - :type scope: str - :param budget_name: Budget Name. - :type budget_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), - 'budgetName': self._serialize.url("budget_name", budget_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}'} diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/charges_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/charges_operations.py deleted file mode 100644 index afec159b31b1..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/charges_operations.py +++ /dev/null @@ -1,111 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ChargesOperations(object): - """ChargesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-04-01-preview. Constant value: "2019-04-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-04-01-preview" - - self.config = config - - def list_by_scope( - self, scope, filter=None, custom_headers=None, raw=False, **operation_config): - """Lists the charges based for the defined scope. - - :param scope: The scope associated with usage details operations. This - includes - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope. For department and enrollment accounts, - you can also add billing period to the scope using - '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For - e.g. to specify billing period at department scope use - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' - :type scope: str - :param filter: May be used to filter charges by properties/usageEnd - (Utc time), properties/usageStart (Utc time). The filter supports - 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support - 'ne', 'or', or 'not'. Tag filter is a key value pair string where key - and value is separated by a colon (:). - :type filter: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ChargeSummary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.consumption.models.ChargeSummary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.list_by_scope.metadata['url'] - path_format_arguments = { - 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ChargeSummary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_by_scope.metadata = {'url': '/{scope}/providers/Microsoft.Consumption/charges'} diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/forecasts_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/forecasts_operations.py deleted file mode 100644 index c868e8e3586f..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/forecasts_operations.py +++ /dev/null @@ -1,107 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ForecastsOperations(object): - """ForecastsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-04-01-preview. Constant value: "2019-04-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-04-01-preview" - - self.config = config - - def list( - self, filter=None, custom_headers=None, raw=False, **operation_config): - """Lists the forecast charges by subscriptionId. - - :param filter: May be used to filter forecasts by properties/usageDate - (Utc time), properties/chargeType or properties/grain. The filter - supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not - currently support 'ne', 'or', or 'not'. - :type filter: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Forecast - :rtype: - ~azure.mgmt.consumption.models.ForecastPaged[~azure.mgmt.consumption.models.Forecast] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.ForecastPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ForecastPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/forecasts'} diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/marketplaces_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/marketplaces_operations.py deleted file mode 100644 index b090d9105b19..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/marketplaces_operations.py +++ /dev/null @@ -1,139 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class MarketplacesOperations(object): - """MarketplacesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-04-01-preview. Constant value: "2019-04-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-04-01-preview" - - self.config = config - - def list( - self, scope, filter=None, top=None, skiptoken=None, custom_headers=None, raw=False, **operation_config): - """Lists the marketplaces for a scope at the defined scope. Marketplaces - are available via this API only for May 1, 2014 or later. - - :param scope: The scope associated with marketplace operations. This - includes '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' - for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for - Billing Account scope, - '/providers/Microsoft.Billing/departments/{departmentId}' for - Department scope, - '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope and - '/providers/Microsoft.Management/managementGroups/{managementGroupId}' - for Management Group scope. For subscription, billing account, - department, enrollment account and ManagementGroup, you can also add - billing period to the scope using - '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For - e.g. to specify billing period at department scope use - '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' - :type scope: str - :param filter: May be used to filter marketplaces by - properties/usageEnd (Utc time), properties/usageStart (Utc time), - properties/resourceGroup, properties/instanceName or - properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', - 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. - :type filter: str - :param top: May be used to limit the number of results to the most - recent N marketplaces. - :type top: int - :param skiptoken: Skiptoken is only used if a previous operation - returned a partial result. If a previous response contains a nextLink - element, the value of the nextLink element will include a skiptoken - parameter that specifies a starting point to use for subsequent calls. - :type skiptoken: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Marketplace - :rtype: - ~azure.mgmt.consumption.models.MarketplacePaged[~azure.mgmt.consumption.models.Marketplace] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=1000, minimum=1) - if skiptoken is not None: - query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.MarketplacePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.MarketplacePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/{scope}/providers/Microsoft.Consumption/marketplaces'} diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/operations.py deleted file mode 100644 index b271b1472121..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/operations.py +++ /dev/null @@ -1,96 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class Operations(object): - """Operations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-04-01-preview. Constant value: "2019-04-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-04-01-preview" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all of the available consumption REST API operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Operation - :rtype: - ~azure.mgmt.consumption.models.OperationPaged[~azure.mgmt.consumption.models.Operation] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/providers/Microsoft.Consumption/operations'} diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/price_sheet_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/price_sheet_operations.py deleted file mode 100644 index edd7edfec9ee..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/price_sheet_operations.py +++ /dev/null @@ -1,188 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class PriceSheetOperations(object): - """PriceSheetOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-04-01-preview. Constant value: "2019-04-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-04-01-preview" - - self.config = config - - def get( - self, expand=None, skiptoken=None, top=None, custom_headers=None, raw=False, **operation_config): - """Gets the price sheet for a scope by subscriptionId. Price sheet is - available via this API only for May 1, 2014 or later. - - :param expand: May be used to expand the properties/meterDetails - within a price sheet. By default, these fields are not included when - returning price sheet. - :type expand: str - :param skiptoken: Skiptoken is only used if a previous operation - returned a partial result. If a previous response contains a nextLink - element, the value of the nextLink element will include a skiptoken - parameter that specifies a starting point to use for subsequent calls. - :type skiptoken: str - :param top: May be used to limit the number of results to the top N - results. - :type top: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PriceSheetResult or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.consumption.models.PriceSheetResult or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - if skiptoken is not None: - query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=1000, minimum=1) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('PriceSheetResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/pricesheets/default'} - - def get_by_billing_period( - self, billing_period_name, expand=None, skiptoken=None, top=None, custom_headers=None, raw=False, **operation_config): - """Get the price sheet for a scope by subscriptionId and billing period. - Price sheet is available via this API only for May 1, 2014 or later. - - :param billing_period_name: Billing Period Name. - :type billing_period_name: str - :param expand: May be used to expand the properties/meterDetails - within a price sheet. By default, these fields are not included when - returning price sheet. - :type expand: str - :param skiptoken: Skiptoken is only used if a previous operation - returned a partial result. If a previous response contains a nextLink - element, the value of the nextLink element will include a skiptoken - parameter that specifies a starting point to use for subsequent calls. - :type skiptoken: str - :param top: May be used to limit the number of results to the top N - results. - :type top: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PriceSheetResult or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.consumption.models.PriceSheetResult or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_by_billing_period.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'billingPeriodName': self._serialize.url("billing_period_name", billing_period_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - if skiptoken is not None: - query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=1000, minimum=1) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('PriceSheetResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_by_billing_period.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/pricesheets/default'} diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservation_recommendations_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservation_recommendations_operations.py deleted file mode 100644 index ba412e904860..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservation_recommendations_operations.py +++ /dev/null @@ -1,105 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ReservationRecommendationsOperations(object): - """ReservationRecommendationsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-04-01-preview. Constant value: "2019-04-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-04-01-preview" - - self.config = config - - def list( - self, filter=None, custom_headers=None, raw=False, **operation_config): - """List of recommendations for purchasing reserved instances. - - :param filter: May be used to filter reservationRecommendations by - properties/scope and properties/lookBackPeriod. - :type filter: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ReservationRecommendation - :rtype: - ~azure.mgmt.consumption.models.ReservationRecommendationPaged[~azure.mgmt.consumption.models.ReservationRecommendation] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.ReservationRecommendationPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ReservationRecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/reservationRecommendations'} diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservations_details_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservations_details_operations.py deleted file mode 100644 index 9e36876afa25..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservations_details_operations.py +++ /dev/null @@ -1,180 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ReservationsDetailsOperations(object): - """ReservationsDetailsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-04-01-preview. Constant value: "2019-04-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-04-01-preview" - - self.config = config - - def list_by_reservation_order( - self, reservation_order_id, filter, custom_headers=None, raw=False, **operation_config): - """Lists the reservations details for provided date range. - - :param reservation_order_id: Order Id of the reservation - :type reservation_order_id: str - :param filter: Filter reservation details by date range. The - properties/UsageDate for start date and end date. The filter supports - 'le' and 'ge' - :type filter: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ReservationDetail - :rtype: - ~azure.mgmt.consumption.models.ReservationDetailPaged[~azure.mgmt.consumption.models.ReservationDetail] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_reservation_order.metadata['url'] - path_format_arguments = { - 'reservationOrderId': self._serialize.url("reservation_order_id", reservation_order_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.ReservationDetailPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ReservationDetailPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_reservation_order.metadata = {'url': '/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/providers/Microsoft.Consumption/reservationDetails'} - - def list_by_reservation_order_and_reservation( - self, reservation_order_id, reservation_id, filter, custom_headers=None, raw=False, **operation_config): - """Lists the reservations details for provided date range. - - :param reservation_order_id: Order Id of the reservation - :type reservation_order_id: str - :param reservation_id: Id of the reservation - :type reservation_id: str - :param filter: Filter reservation details by date range. The - properties/UsageDate for start date and end date. The filter supports - 'le' and 'ge' - :type filter: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ReservationDetail - :rtype: - ~azure.mgmt.consumption.models.ReservationDetailPaged[~azure.mgmt.consumption.models.ReservationDetail] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_reservation_order_and_reservation.metadata['url'] - path_format_arguments = { - 'reservationOrderId': self._serialize.url("reservation_order_id", reservation_order_id, 'str'), - 'reservationId': self._serialize.url("reservation_id", reservation_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.ReservationDetailPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ReservationDetailPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_reservation_order_and_reservation.metadata = {'url': '/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/reservations/{reservationId}/providers/Microsoft.Consumption/reservationDetails'} diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservations_summaries_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservations_summaries_operations.py deleted file mode 100644 index 3ec7d771804e..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservations_summaries_operations.py +++ /dev/null @@ -1,188 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ReservationsSummariesOperations(object): - """ReservationsSummariesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-04-01-preview. Constant value: "2019-04-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-04-01-preview" - - self.config = config - - def list_by_reservation_order( - self, reservation_order_id, grain, filter=None, custom_headers=None, raw=False, **operation_config): - """Lists the reservations summaries for daily or monthly grain. - - :param reservation_order_id: Order Id of the reservation - :type reservation_order_id: str - :param grain: Can be daily or monthly. Possible values include: - 'DailyGrain', 'MonthlyGrain' - :type grain: str or ~azure.mgmt.consumption.models.Datagrain - :param filter: Required only for daily grain. The properties/UsageDate - for start date and end date. The filter supports 'le' and 'ge' - :type filter: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ReservationSummary - :rtype: - ~azure.mgmt.consumption.models.ReservationSummaryPaged[~azure.mgmt.consumption.models.ReservationSummary] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_reservation_order.metadata['url'] - path_format_arguments = { - 'reservationOrderId': self._serialize.url("reservation_order_id", reservation_order_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['grain'] = self._serialize.query("grain", grain, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.ReservationSummaryPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ReservationSummaryPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_reservation_order.metadata = {'url': '/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/providers/Microsoft.Consumption/reservationSummaries'} - - def list_by_reservation_order_and_reservation( - self, reservation_order_id, reservation_id, grain, filter=None, custom_headers=None, raw=False, **operation_config): - """Lists the reservations summaries for daily or monthly grain. - - :param reservation_order_id: Order Id of the reservation - :type reservation_order_id: str - :param reservation_id: Id of the reservation - :type reservation_id: str - :param grain: Can be daily or monthly. Possible values include: - 'DailyGrain', 'MonthlyGrain' - :type grain: str or ~azure.mgmt.consumption.models.Datagrain - :param filter: Required only for daily grain. The properties/UsageDate - for start date and end date. The filter supports 'le' and 'ge' - :type filter: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ReservationSummary - :rtype: - ~azure.mgmt.consumption.models.ReservationSummaryPaged[~azure.mgmt.consumption.models.ReservationSummary] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_reservation_order_and_reservation.metadata['url'] - path_format_arguments = { - 'reservationOrderId': self._serialize.url("reservation_order_id", reservation_order_id, 'str'), - 'reservationId': self._serialize.url("reservation_id", reservation_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['grain'] = self._serialize.query("grain", grain, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.ReservationSummaryPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ReservationSummaryPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_reservation_order_and_reservation.metadata = {'url': '/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/reservations/{reservationId}/providers/Microsoft.Consumption/reservationSummaries'} diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/tags_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/tags_operations.py deleted file mode 100644 index bd200f98a583..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/tags_operations.py +++ /dev/null @@ -1,105 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class TagsOperations(object): - """TagsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-04-01-preview. Constant value: "2019-04-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-04-01-preview" - - self.config = config - - def get( - self, scope, custom_headers=None, raw=False, **operation_config): - """Get all available tag keys for the defined scope. - - :param scope: The scope associated with tags operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' - for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for - Billing Account scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope and - '/providers/Microsoft.Management/managementGroups/{managementGroupId}' - for Management Group scope.. - :type scope: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TagsResult or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.consumption.models.TagsResult or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('TagsResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/{scope}/providers/Microsoft.Consumption/tags'} diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/usage_details_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/usage_details_operations.py deleted file mode 100644 index 44fa3a96b4cd..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/usage_details_operations.py +++ /dev/null @@ -1,278 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class UsageDetailsOperations(object): - """UsageDetailsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-04-01-preview. Constant value: "2019-04-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-04-01-preview" - - self.config = config - - def list( - self, scope, expand=None, filter=None, skiptoken=None, top=None, metric=None, custom_headers=None, raw=False, **operation_config): - """Lists the usage details for the defined scope. Usage details are - available via this API only for May 1, 2014 or later. - - :param scope: The scope associated with usage details operations. This - includes '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' - for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for - Billing Account scope, - '/providers/Microsoft.Billing/departments/{departmentId}' for - Department scope, - '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope and - '/providers/Microsoft.Management/managementGroups/{managementGroupId}' - for Management Group scope. For subscription, billing account, - department, enrollment account and management group, you can also add - billing period to the scope using - '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For - e.g. to specify billing period at department scope use - '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' - :type scope: str - :param expand: May be used to expand the properties/additionalInfo or - properties/meterDetails within a list of usage details. By default, - these fields are not included when listing usage details. - :type expand: str - :param filter: May be used to filter usageDetails by - properties/resourceGroup, properties/resourceName, - properties/resourceId, properties/chargeType, properties/reservationId - or tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. - It does not currently support 'ne', 'or', or 'not'. Tag filter is a - key value pair string where key and value is separated by a colon (:). - :type filter: str - :param skiptoken: Skiptoken is only used if a previous operation - returned a partial result. If a previous response contains a nextLink - element, the value of the nextLink element will include a skiptoken - parameter that specifies a starting point to use for subsequent calls. - :type skiptoken: str - :param top: May be used to limit the number of results to the most - recent N usageDetails. - :type top: int - :param metric: Allows to select different type of cost/usage records. - Possible values include: 'ActualCostMetricType', - 'AmortizedCostMetricType', 'UsageMetricType' - :type metric: str or ~azure.mgmt.consumption.models.Metrictype - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of UsageDetail - :rtype: - ~azure.mgmt.consumption.models.UsageDetailPaged[~azure.mgmt.consumption.models.UsageDetail] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if skiptoken is not None: - query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=1000, minimum=1) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if metric is not None: - query_parameters['metric'] = self._serialize.query("metric", metric, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.UsageDetailPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.UsageDetailPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/{scope}/providers/Microsoft.Consumption/usageDetails'} - - - def _download_initial( - self, scope, metric=None, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.download.metadata['url'] - path_format_arguments = { - 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if metric is not None: - query_parameters['metric'] = self._serialize.query("metric", metric, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('UsageDetailsDownloadResponse', response) - header_dict = { - 'Location': 'str', - 'Retry-After': 'str', - 'Azure-AsyncOperation': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - - def download( - self, scope, metric=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Download usage details data. - - :param scope: The scope associated with usage details operations. This - includes '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' - for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for - Billing Account scope, - '/providers/Microsoft.Billing/departments/{departmentId}' for - Department scope, - '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope and - '/providers/Microsoft.Management/managementGroups/{managementGroupId}' - for Management Group scope. For subscription, billing account, - department, enrollment account and management group, you can also add - billing period to the scope using - '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For - e.g. to specify billing period at department scope use - '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' - :type scope: str - :param metric: Allows to select different type of cost/usage records. - Possible values include: 'ActualCostMetricType', - 'AmortizedCostMetricType', 'UsageMetricType' - :type metric: str or ~azure.mgmt.consumption.models.Metrictype - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - UsageDetailsDownloadResponse or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.consumption.models.UsageDetailsDownloadResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.consumption.models.UsageDetailsDownloadResponse]] - :raises: - :class:`ErrorResponseException` - """ - raw_result = self._download_initial( - scope=scope, - metric=metric, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - header_dict = { - 'Location': 'str', - 'Retry-After': 'str', - 'Azure-AsyncOperation': 'str', - } - deserialized = self._deserialize('UsageDetailsDownloadResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - download.metadata = {'url': '/{scope}/providers/Microsoft.Consumption/usageDetails/download'} diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/__init__.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/__init__.py index db14f5d7f4f6..5ab3f5226cb2 100644 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/__init__.py +++ b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .data_factory_management_client import DataFactoryManagementClient -from .version import VERSION +from ._configuration import DataFactoryManagementClientConfiguration +from ._data_factory_management_client import DataFactoryManagementClient +__all__ = ['DataFactoryManagementClient', 'DataFactoryManagementClientConfiguration'] -__all__ = ['DataFactoryManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/_configuration.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/_configuration.py new file mode 100644 index 000000000000..80666808edb1 --- /dev/null +++ b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/_configuration.py @@ -0,0 +1,48 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class DataFactoryManagementClientConfiguration(AzureConfiguration): + """Configuration for DataFactoryManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The subscription identifier. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(DataFactoryManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-datafactory/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/_data_factory_management_client.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/_data_factory_management_client.py new file mode 100644 index 000000000000..376c508c9b54 --- /dev/null +++ b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/_data_factory_management_client.py @@ -0,0 +1,114 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import DataFactoryManagementClientConfiguration +from .operations import Operations +from .operations import FactoriesOperations +from .operations import ExposureControlOperations +from .operations import IntegrationRuntimesOperations +from .operations import IntegrationRuntimeObjectMetadataOperations +from .operations import IntegrationRuntimeNodesOperations +from .operations import LinkedServicesOperations +from .operations import DatasetsOperations +from .operations import PipelinesOperations +from .operations import PipelineRunsOperations +from .operations import ActivityRunsOperations +from .operations import TriggersOperations +from .operations import RerunTriggersOperations +from .operations import TriggerRunsOperations +from . import models + + +class DataFactoryManagementClient(SDKClient): + """The Azure Data Factory V2 management API provides a RESTful set of web services that interact with Azure Data Factory V2 services. + + :ivar config: Configuration for client. + :vartype config: DataFactoryManagementClientConfiguration + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.datafactory.operations.Operations + :ivar factories: Factories operations + :vartype factories: azure.mgmt.datafactory.operations.FactoriesOperations + :ivar exposure_control: ExposureControl operations + :vartype exposure_control: azure.mgmt.datafactory.operations.ExposureControlOperations + :ivar integration_runtimes: IntegrationRuntimes operations + :vartype integration_runtimes: azure.mgmt.datafactory.operations.IntegrationRuntimesOperations + :ivar integration_runtime_object_metadata: IntegrationRuntimeObjectMetadata operations + :vartype integration_runtime_object_metadata: azure.mgmt.datafactory.operations.IntegrationRuntimeObjectMetadataOperations + :ivar integration_runtime_nodes: IntegrationRuntimeNodes operations + :vartype integration_runtime_nodes: azure.mgmt.datafactory.operations.IntegrationRuntimeNodesOperations + :ivar linked_services: LinkedServices operations + :vartype linked_services: azure.mgmt.datafactory.operations.LinkedServicesOperations + :ivar datasets: Datasets operations + :vartype datasets: azure.mgmt.datafactory.operations.DatasetsOperations + :ivar pipelines: Pipelines operations + :vartype pipelines: azure.mgmt.datafactory.operations.PipelinesOperations + :ivar pipeline_runs: PipelineRuns operations + :vartype pipeline_runs: azure.mgmt.datafactory.operations.PipelineRunsOperations + :ivar activity_runs: ActivityRuns operations + :vartype activity_runs: azure.mgmt.datafactory.operations.ActivityRunsOperations + :ivar triggers: Triggers operations + :vartype triggers: azure.mgmt.datafactory.operations.TriggersOperations + :ivar rerun_triggers: RerunTriggers operations + :vartype rerun_triggers: azure.mgmt.datafactory.operations.RerunTriggersOperations + :ivar trigger_runs: TriggerRuns operations + :vartype trigger_runs: azure.mgmt.datafactory.operations.TriggerRunsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The subscription identifier. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = DataFactoryManagementClientConfiguration(credentials, subscription_id, base_url) + super(DataFactoryManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2018-06-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.factories = FactoriesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.exposure_control = ExposureControlOperations( + self._client, self.config, self._serialize, self._deserialize) + self.integration_runtimes = IntegrationRuntimesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.integration_runtime_object_metadata = IntegrationRuntimeObjectMetadataOperations( + self._client, self.config, self._serialize, self._deserialize) + self.integration_runtime_nodes = IntegrationRuntimeNodesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.linked_services = LinkedServicesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.datasets = DatasetsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.pipelines = PipelinesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.pipeline_runs = PipelineRunsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.activity_runs = ActivityRunsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.triggers = TriggersOperations( + self._client, self.config, self._serialize, self._deserialize) + self.rerun_triggers = RerunTriggersOperations( + self._client, self.config, self._serialize, self._deserialize) + self.trigger_runs = TriggerRunsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/data_factory_management_client.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/data_factory_management_client.py deleted file mode 100644 index e49abccce72a..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/data_factory_management_client.py +++ /dev/null @@ -1,146 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.operations import Operations -from .operations.factories_operations import FactoriesOperations -from .operations.exposure_control_operations import ExposureControlOperations -from .operations.integration_runtimes_operations import IntegrationRuntimesOperations -from .operations.integration_runtime_object_metadata_operations import IntegrationRuntimeObjectMetadataOperations -from .operations.integration_runtime_nodes_operations import IntegrationRuntimeNodesOperations -from .operations.linked_services_operations import LinkedServicesOperations -from .operations.datasets_operations import DatasetsOperations -from .operations.pipelines_operations import PipelinesOperations -from .operations.pipeline_runs_operations import PipelineRunsOperations -from .operations.activity_runs_operations import ActivityRunsOperations -from .operations.triggers_operations import TriggersOperations -from .operations.rerun_triggers_operations import RerunTriggersOperations -from .operations.trigger_runs_operations import TriggerRunsOperations -from . import models - - -class DataFactoryManagementClientConfiguration(AzureConfiguration): - """Configuration for DataFactoryManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The subscription identifier. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(DataFactoryManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-datafactory/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class DataFactoryManagementClient(SDKClient): - """The Azure Data Factory V2 management API provides a RESTful set of web services that interact with Azure Data Factory V2 services. - - :ivar config: Configuration for client. - :vartype config: DataFactoryManagementClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.datafactory.operations.Operations - :ivar factories: Factories operations - :vartype factories: azure.mgmt.datafactory.operations.FactoriesOperations - :ivar exposure_control: ExposureControl operations - :vartype exposure_control: azure.mgmt.datafactory.operations.ExposureControlOperations - :ivar integration_runtimes: IntegrationRuntimes operations - :vartype integration_runtimes: azure.mgmt.datafactory.operations.IntegrationRuntimesOperations - :ivar integration_runtime_object_metadata: IntegrationRuntimeObjectMetadata operations - :vartype integration_runtime_object_metadata: azure.mgmt.datafactory.operations.IntegrationRuntimeObjectMetadataOperations - :ivar integration_runtime_nodes: IntegrationRuntimeNodes operations - :vartype integration_runtime_nodes: azure.mgmt.datafactory.operations.IntegrationRuntimeNodesOperations - :ivar linked_services: LinkedServices operations - :vartype linked_services: azure.mgmt.datafactory.operations.LinkedServicesOperations - :ivar datasets: Datasets operations - :vartype datasets: azure.mgmt.datafactory.operations.DatasetsOperations - :ivar pipelines: Pipelines operations - :vartype pipelines: azure.mgmt.datafactory.operations.PipelinesOperations - :ivar pipeline_runs: PipelineRuns operations - :vartype pipeline_runs: azure.mgmt.datafactory.operations.PipelineRunsOperations - :ivar activity_runs: ActivityRuns operations - :vartype activity_runs: azure.mgmt.datafactory.operations.ActivityRunsOperations - :ivar triggers: Triggers operations - :vartype triggers: azure.mgmt.datafactory.operations.TriggersOperations - :ivar rerun_triggers: RerunTriggers operations - :vartype rerun_triggers: azure.mgmt.datafactory.operations.RerunTriggersOperations - :ivar trigger_runs: TriggerRuns operations - :vartype trigger_runs: azure.mgmt.datafactory.operations.TriggerRunsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The subscription identifier. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = DataFactoryManagementClientConfiguration(credentials, subscription_id, base_url) - super(DataFactoryManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2018-06-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.factories = FactoriesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.exposure_control = ExposureControlOperations( - self._client, self.config, self._serialize, self._deserialize) - self.integration_runtimes = IntegrationRuntimesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.integration_runtime_object_metadata = IntegrationRuntimeObjectMetadataOperations( - self._client, self.config, self._serialize, self._deserialize) - self.integration_runtime_nodes = IntegrationRuntimeNodesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.linked_services = LinkedServicesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.datasets = DatasetsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.pipelines = PipelinesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.pipeline_runs = PipelineRunsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.activity_runs = ActivityRunsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.triggers = TriggersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.rerun_triggers = RerunTriggersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.trigger_runs = TriggerRunsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/__init__.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/__init__.py index 46e9bf12bf1a..10646482de6f 100644 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/__init__.py +++ b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/__init__.py @@ -10,744 +10,1030 @@ # -------------------------------------------------------------------------- try: - from .resource_py3 import Resource - from .sub_resource_py3 import SubResource - from .expression_py3 import Expression - from .secure_string_py3 import SecureString - from .linked_service_reference_py3 import LinkedServiceReference - from .azure_key_vault_secret_reference_py3 import AzureKeyVaultSecretReference - from .secret_base_py3 import SecretBase - from .factory_identity_py3 import FactoryIdentity - from .factory_repo_configuration_py3 import FactoryRepoConfiguration - from .factory_py3 import Factory - from .integration_runtime_py3 import IntegrationRuntime - from .integration_runtime_resource_py3 import IntegrationRuntimeResource - from .integration_runtime_reference_py3 import IntegrationRuntimeReference - from .integration_runtime_status_py3 import IntegrationRuntimeStatus - from .integration_runtime_status_response_py3 import IntegrationRuntimeStatusResponse - from .integration_runtime_status_list_response_py3 import IntegrationRuntimeStatusListResponse - from .update_integration_runtime_request_py3 import UpdateIntegrationRuntimeRequest - from .update_integration_runtime_node_request_py3 import UpdateIntegrationRuntimeNodeRequest - from .linked_integration_runtime_request_py3 import LinkedIntegrationRuntimeRequest - from .create_linked_integration_runtime_request_py3 import CreateLinkedIntegrationRuntimeRequest - from .parameter_specification_py3 import ParameterSpecification - from .linked_service_py3 import LinkedService - from .linked_service_resource_py3 import LinkedServiceResource - from .dataset_folder_py3 import DatasetFolder - from .dataset_py3 import Dataset - from .dataset_resource_py3 import DatasetResource - from .activity_dependency_py3 import ActivityDependency - from .user_property_py3 import UserProperty - from .activity_py3 import Activity - from .variable_specification_py3 import VariableSpecification - from .pipeline_folder_py3 import PipelineFolder - from .pipeline_resource_py3 import PipelineResource - from .trigger_py3 import Trigger - from .trigger_resource_py3 import TriggerResource - from .create_run_response_py3 import CreateRunResponse - from .factory_vsts_configuration_py3 import FactoryVSTSConfiguration - from .factory_git_hub_configuration_py3 import FactoryGitHubConfiguration - from .factory_repo_update_py3 import FactoryRepoUpdate - from .git_hub_access_token_request_py3 import GitHubAccessTokenRequest - from .git_hub_access_token_response_py3 import GitHubAccessTokenResponse - from .user_access_policy_py3 import UserAccessPolicy - from .access_policy_response_py3 import AccessPolicyResponse - from .pipeline_reference_py3 import PipelineReference - from .trigger_pipeline_reference_py3 import TriggerPipelineReference - from .factory_update_parameters_py3 import FactoryUpdateParameters - from .dataset_reference_py3 import DatasetReference - from .run_query_filter_py3 import RunQueryFilter - from .run_query_order_by_py3 import RunQueryOrderBy - from .run_filter_parameters_py3 import RunFilterParameters - from .pipeline_run_invoked_by_py3 import PipelineRunInvokedBy - from .pipeline_run_py3 import PipelineRun - from .pipeline_runs_query_response_py3 import PipelineRunsQueryResponse - from .activity_run_py3 import ActivityRun - from .activity_runs_query_response_py3 import ActivityRunsQueryResponse - from .trigger_run_py3 import TriggerRun - from .trigger_runs_query_response_py3 import TriggerRunsQueryResponse - from .rerun_tumbling_window_trigger_action_parameters_py3 import RerunTumblingWindowTriggerActionParameters - from .rerun_tumbling_window_trigger_py3 import RerunTumblingWindowTrigger - from .rerun_trigger_resource_py3 import RerunTriggerResource - from .operation_display_py3 import OperationDisplay - from .operation_log_specification_py3 import OperationLogSpecification - from .operation_metric_availability_py3 import OperationMetricAvailability - from .operation_metric_dimension_py3 import OperationMetricDimension - from .operation_metric_specification_py3 import OperationMetricSpecification - from .operation_service_specification_py3 import OperationServiceSpecification - from .operation_py3 import Operation - from .get_ssis_object_metadata_request_py3 import GetSsisObjectMetadataRequest - from .ssis_object_metadata_status_response_py3 import SsisObjectMetadataStatusResponse - from .exposure_control_request_py3 import ExposureControlRequest - from .exposure_control_response_py3 import ExposureControlResponse - from .self_dependency_tumbling_window_trigger_reference_py3 import SelfDependencyTumblingWindowTriggerReference - from .trigger_reference_py3 import TriggerReference - from .tumbling_window_trigger_dependency_reference_py3 import TumblingWindowTriggerDependencyReference - from .trigger_dependency_reference_py3 import TriggerDependencyReference - from .dependency_reference_py3 import DependencyReference - from .retry_policy_py3 import RetryPolicy - from .tumbling_window_trigger_py3 import TumblingWindowTrigger - from .blob_events_trigger_py3 import BlobEventsTrigger - from .blob_trigger_py3 import BlobTrigger - from .recurrence_schedule_occurrence_py3 import RecurrenceScheduleOccurrence - from .recurrence_schedule_py3 import RecurrenceSchedule - from .schedule_trigger_recurrence_py3 import ScheduleTriggerRecurrence - from .schedule_trigger_py3 import ScheduleTrigger - from .multiple_pipeline_trigger_py3 import MultiplePipelineTrigger - from .azure_function_linked_service_py3 import AzureFunctionLinkedService - from .responsys_linked_service_py3 import ResponsysLinkedService - from .azure_databricks_linked_service_py3 import AzureDatabricksLinkedService - from .azure_data_lake_analytics_linked_service_py3 import AzureDataLakeAnalyticsLinkedService - from .script_action_py3 import ScriptAction - from .hd_insight_on_demand_linked_service_py3 import HDInsightOnDemandLinkedService - from .salesforce_marketing_cloud_linked_service_py3 import SalesforceMarketingCloudLinkedService - from .netezza_linked_service_py3 import NetezzaLinkedService - from .vertica_linked_service_py3 import VerticaLinkedService - from .zoho_linked_service_py3 import ZohoLinkedService - from .xero_linked_service_py3 import XeroLinkedService - from .square_linked_service_py3 import SquareLinkedService - from .spark_linked_service_py3 import SparkLinkedService - from .shopify_linked_service_py3 import ShopifyLinkedService - from .service_now_linked_service_py3 import ServiceNowLinkedService - from .quick_books_linked_service_py3 import QuickBooksLinkedService - from .presto_linked_service_py3 import PrestoLinkedService - from .phoenix_linked_service_py3 import PhoenixLinkedService - from .paypal_linked_service_py3 import PaypalLinkedService - from .marketo_linked_service_py3 import MarketoLinkedService - from .maria_db_linked_service_py3 import MariaDBLinkedService - from .magento_linked_service_py3 import MagentoLinkedService - from .jira_linked_service_py3 import JiraLinkedService - from .impala_linked_service_py3 import ImpalaLinkedService - from .hubspot_linked_service_py3 import HubspotLinkedService - from .hive_linked_service_py3 import HiveLinkedService - from .hbase_linked_service_py3 import HBaseLinkedService - from .greenplum_linked_service_py3 import GreenplumLinkedService - from .google_big_query_linked_service_py3 import GoogleBigQueryLinkedService - from .eloqua_linked_service_py3 import EloquaLinkedService - from .drill_linked_service_py3 import DrillLinkedService - from .couchbase_linked_service_py3 import CouchbaseLinkedService - from .concur_linked_service_py3 import ConcurLinkedService - from .azure_postgre_sql_linked_service_py3 import AzurePostgreSqlLinkedService - from .amazon_mws_linked_service_py3 import AmazonMWSLinkedService - from .sap_hana_linked_service_py3 import SapHanaLinkedService - from .sap_bw_linked_service_py3 import SapBWLinkedService - from .sftp_server_linked_service_py3 import SftpServerLinkedService - from .ftp_server_linked_service_py3 import FtpServerLinkedService - from .http_linked_service_py3 import HttpLinkedService - from .azure_search_linked_service_py3 import AzureSearchLinkedService - from .custom_data_source_linked_service_py3 import CustomDataSourceLinkedService - from .amazon_redshift_linked_service_py3 import AmazonRedshiftLinkedService - from .amazon_s3_linked_service_py3 import AmazonS3LinkedService - from .sap_ecc_linked_service_py3 import SapEccLinkedService - from .sap_cloud_for_customer_linked_service_py3 import SapCloudForCustomerLinkedService - from .salesforce_linked_service_py3 import SalesforceLinkedService - from .azure_data_lake_store_linked_service_py3 import AzureDataLakeStoreLinkedService - from .mongo_db_linked_service_py3 import MongoDbLinkedService - from .cassandra_linked_service_py3 import CassandraLinkedService - from .web_client_certificate_authentication_py3 import WebClientCertificateAuthentication - from .web_basic_authentication_py3 import WebBasicAuthentication - from .web_anonymous_authentication_py3 import WebAnonymousAuthentication - from .web_linked_service_type_properties_py3 import WebLinkedServiceTypeProperties - from .web_linked_service_py3 import WebLinkedService - from .odata_linked_service_py3 import ODataLinkedService - from .hdfs_linked_service_py3 import HdfsLinkedService - from .odbc_linked_service_py3 import OdbcLinkedService - from .azure_ml_linked_service_py3 import AzureMLLinkedService - from .teradata_linked_service_py3 import TeradataLinkedService - from .db2_linked_service_py3 import Db2LinkedService - from .sybase_linked_service_py3 import SybaseLinkedService - from .postgre_sql_linked_service_py3 import PostgreSqlLinkedService - from .my_sql_linked_service_py3 import MySqlLinkedService - from .azure_my_sql_linked_service_py3 import AzureMySqlLinkedService - from .oracle_linked_service_py3 import OracleLinkedService - from .file_server_linked_service_py3 import FileServerLinkedService - from .hd_insight_linked_service_py3 import HDInsightLinkedService - from .dynamics_linked_service_py3 import DynamicsLinkedService - from .cosmos_db_linked_service_py3 import CosmosDbLinkedService - from .azure_key_vault_linked_service_py3 import AzureKeyVaultLinkedService - from .azure_batch_linked_service_py3 import AzureBatchLinkedService - from .azure_sql_database_linked_service_py3 import AzureSqlDatabaseLinkedService - from .sql_server_linked_service_py3 import SqlServerLinkedService - from .azure_sql_dw_linked_service_py3 import AzureSqlDWLinkedService - from .azure_table_storage_linked_service_py3 import AzureTableStorageLinkedService - from .azure_blob_storage_linked_service_py3 import AzureBlobStorageLinkedService - from .azure_storage_linked_service_py3 import AzureStorageLinkedService - from .responsys_object_dataset_py3 import ResponsysObjectDataset - from .salesforce_marketing_cloud_object_dataset_py3 import SalesforceMarketingCloudObjectDataset - from .vertica_table_dataset_py3 import VerticaTableDataset - from .netezza_table_dataset_py3 import NetezzaTableDataset - from .zoho_object_dataset_py3 import ZohoObjectDataset - from .xero_object_dataset_py3 import XeroObjectDataset - from .square_object_dataset_py3 import SquareObjectDataset - from .spark_object_dataset_py3 import SparkObjectDataset - from .shopify_object_dataset_py3 import ShopifyObjectDataset - from .service_now_object_dataset_py3 import ServiceNowObjectDataset - from .quick_books_object_dataset_py3 import QuickBooksObjectDataset - from .presto_object_dataset_py3 import PrestoObjectDataset - from .phoenix_object_dataset_py3 import PhoenixObjectDataset - from .paypal_object_dataset_py3 import PaypalObjectDataset - from .marketo_object_dataset_py3 import MarketoObjectDataset - from .maria_db_table_dataset_py3 import MariaDBTableDataset - from .magento_object_dataset_py3 import MagentoObjectDataset - from .jira_object_dataset_py3 import JiraObjectDataset - from .impala_object_dataset_py3 import ImpalaObjectDataset - from .hubspot_object_dataset_py3 import HubspotObjectDataset - from .hive_object_dataset_py3 import HiveObjectDataset - from .hbase_object_dataset_py3 import HBaseObjectDataset - from .greenplum_table_dataset_py3 import GreenplumTableDataset - from .google_big_query_object_dataset_py3 import GoogleBigQueryObjectDataset - from .eloqua_object_dataset_py3 import EloquaObjectDataset - from .drill_table_dataset_py3 import DrillTableDataset - from .couchbase_table_dataset_py3 import CouchbaseTableDataset - from .concur_object_dataset_py3 import ConcurObjectDataset - from .azure_postgre_sql_table_dataset_py3 import AzurePostgreSqlTableDataset - from .amazon_mws_object_dataset_py3 import AmazonMWSObjectDataset - from .dataset_zip_deflate_compression_py3 import DatasetZipDeflateCompression - from .dataset_deflate_compression_py3 import DatasetDeflateCompression - from .dataset_gzip_compression_py3 import DatasetGZipCompression - from .dataset_bzip2_compression_py3 import DatasetBZip2Compression - from .dataset_compression_py3 import DatasetCompression - from .parquet_format_py3 import ParquetFormat - from .orc_format_py3 import OrcFormat - from .avro_format_py3 import AvroFormat - from .json_format_py3 import JsonFormat - from .text_format_py3 import TextFormat - from .dataset_storage_format_py3 import DatasetStorageFormat - from .http_dataset_py3 import HttpDataset - from .azure_search_index_dataset_py3 import AzureSearchIndexDataset - from .web_table_dataset_py3 import WebTableDataset - from .sql_server_table_dataset_py3 import SqlServerTableDataset - from .sap_ecc_resource_dataset_py3 import SapEccResourceDataset - from .sap_cloud_for_customer_resource_dataset_py3 import SapCloudForCustomerResourceDataset - from .salesforce_object_dataset_py3 import SalesforceObjectDataset - from .relational_table_dataset_py3 import RelationalTableDataset - from .azure_my_sql_table_dataset_py3 import AzureMySqlTableDataset - from .oracle_table_dataset_py3 import OracleTableDataset - from .odata_resource_dataset_py3 import ODataResourceDataset - from .mongo_db_collection_dataset_py3 import MongoDbCollectionDataset - from .file_share_dataset_py3 import FileShareDataset - from .azure_data_lake_store_dataset_py3 import AzureDataLakeStoreDataset - from .dynamics_entity_dataset_py3 import DynamicsEntityDataset - from .document_db_collection_dataset_py3 import DocumentDbCollectionDataset - from .custom_dataset_py3 import CustomDataset - from .cassandra_table_dataset_py3 import CassandraTableDataset - from .azure_sql_dw_table_dataset_py3 import AzureSqlDWTableDataset - from .azure_sql_table_dataset_py3 import AzureSqlTableDataset - from .azure_table_dataset_py3 import AzureTableDataset - from .azure_blob_dataset_py3 import AzureBlobDataset - from .amazon_s3_dataset_py3 import AmazonS3Dataset - from .activity_policy_py3 import ActivityPolicy - from .azure_function_activity_py3 import AzureFunctionActivity - from .databricks_spark_python_activity_py3 import DatabricksSparkPythonActivity - from .databricks_spark_jar_activity_py3 import DatabricksSparkJarActivity - from .databricks_notebook_activity_py3 import DatabricksNotebookActivity - from .data_lake_analytics_usql_activity_py3 import DataLakeAnalyticsUSQLActivity - from .azure_ml_update_resource_activity_py3 import AzureMLUpdateResourceActivity - from .azure_ml_web_service_file_py3 import AzureMLWebServiceFile - from .azure_ml_batch_execution_activity_py3 import AzureMLBatchExecutionActivity - from .get_metadata_activity_py3 import GetMetadataActivity - from .web_activity_authentication_py3 import WebActivityAuthentication - from .web_activity_py3 import WebActivity - from .redshift_unload_settings_py3 import RedshiftUnloadSettings - from .amazon_redshift_source_py3 import AmazonRedshiftSource - from .responsys_source_py3 import ResponsysSource - from .salesforce_marketing_cloud_source_py3 import SalesforceMarketingCloudSource - from .vertica_source_py3 import VerticaSource - from .netezza_source_py3 import NetezzaSource - from .zoho_source_py3 import ZohoSource - from .xero_source_py3 import XeroSource - from .square_source_py3 import SquareSource - from .spark_source_py3 import SparkSource - from .shopify_source_py3 import ShopifySource - from .service_now_source_py3 import ServiceNowSource - from .quick_books_source_py3 import QuickBooksSource - from .presto_source_py3 import PrestoSource - from .phoenix_source_py3 import PhoenixSource - from .paypal_source_py3 import PaypalSource - from .marketo_source_py3 import MarketoSource - from .maria_db_source_py3 import MariaDBSource - from .magento_source_py3 import MagentoSource - from .jira_source_py3 import JiraSource - from .impala_source_py3 import ImpalaSource - from .hubspot_source_py3 import HubspotSource - from .hive_source_py3 import HiveSource - from .hbase_source_py3 import HBaseSource - from .greenplum_source_py3 import GreenplumSource - from .google_big_query_source_py3 import GoogleBigQuerySource - from .eloqua_source_py3 import EloquaSource - from .drill_source_py3 import DrillSource - from .couchbase_source_py3 import CouchbaseSource - from .concur_source_py3 import ConcurSource - from .azure_postgre_sql_source_py3 import AzurePostgreSqlSource - from .amazon_mws_source_py3 import AmazonMWSSource - from .http_source_py3 import HttpSource - from .azure_data_lake_store_source_py3 import AzureDataLakeStoreSource - from .mongo_db_source_py3 import MongoDbSource - from .cassandra_source_py3 import CassandraSource - from .web_source_py3 import WebSource - from .oracle_source_py3 import OracleSource - from .azure_my_sql_source_py3 import AzureMySqlSource - from .distcp_settings_py3 import DistcpSettings - from .hdfs_source_py3 import HdfsSource - from .file_system_source_py3 import FileSystemSource - from .sql_dw_source_py3 import SqlDWSource - from .stored_procedure_parameter_py3 import StoredProcedureParameter - from .sql_source_py3 import SqlSource - from .sap_ecc_source_py3 import SapEccSource - from .sap_cloud_for_customer_source_py3 import SapCloudForCustomerSource - from .salesforce_source_py3 import SalesforceSource - from .relational_source_py3 import RelationalSource - from .dynamics_source_py3 import DynamicsSource - from .document_db_collection_source_py3 import DocumentDbCollectionSource - from .blob_source_py3 import BlobSource - from .azure_table_source_py3 import AzureTableSource - from .copy_source_py3 import CopySource - from .lookup_activity_py3 import LookupActivity - from .log_storage_settings_py3 import LogStorageSettings - from .delete_activity_py3 import DeleteActivity - from .sql_server_stored_procedure_activity_py3 import SqlServerStoredProcedureActivity - from .custom_activity_reference_object_py3 import CustomActivityReferenceObject - from .custom_activity_py3 import CustomActivity - from .ssis_property_override_py3 import SSISPropertyOverride - from .ssis_execution_parameter_py3 import SSISExecutionParameter - from .ssis_execution_credential_py3 import SSISExecutionCredential - from .ssis_package_location_py3 import SSISPackageLocation - from .execute_ssis_package_activity_py3 import ExecuteSSISPackageActivity - from .hd_insight_spark_activity_py3 import HDInsightSparkActivity - from .hd_insight_streaming_activity_py3 import HDInsightStreamingActivity - from .hd_insight_map_reduce_activity_py3 import HDInsightMapReduceActivity - from .hd_insight_pig_activity_py3 import HDInsightPigActivity - from .hd_insight_hive_activity_py3 import HDInsightHiveActivity - from .redirect_incompatible_row_settings_py3 import RedirectIncompatibleRowSettings - from .staging_settings_py3 import StagingSettings - from .tabular_translator_py3 import TabularTranslator - from .copy_translator_py3 import CopyTranslator - from .salesforce_sink_py3 import SalesforceSink - from .dynamics_sink_py3 import DynamicsSink - from .odbc_sink_py3 import OdbcSink - from .azure_search_index_sink_py3 import AzureSearchIndexSink - from .azure_data_lake_store_sink_py3 import AzureDataLakeStoreSink - from .oracle_sink_py3 import OracleSink - from .polybase_settings_py3 import PolybaseSettings - from .sql_dw_sink_py3 import SqlDWSink - from .sql_sink_py3 import SqlSink - from .document_db_collection_sink_py3 import DocumentDbCollectionSink - from .file_system_sink_py3 import FileSystemSink - from .blob_sink_py3 import BlobSink - from .azure_table_sink_py3 import AzureTableSink - from .azure_queue_sink_py3 import AzureQueueSink - from .sap_cloud_for_customer_sink_py3 import SapCloudForCustomerSink - from .copy_sink_py3 import CopySink - from .copy_activity_py3 import CopyActivity - from .execution_activity_py3 import ExecutionActivity - from .append_variable_activity_py3 import AppendVariableActivity - from .set_variable_activity_py3 import SetVariableActivity - from .filter_activity_py3 import FilterActivity - from .until_activity_py3 import UntilActivity - from .wait_activity_py3 import WaitActivity - from .for_each_activity_py3 import ForEachActivity - from .if_condition_activity_py3 import IfConditionActivity - from .execute_pipeline_activity_py3 import ExecutePipelineActivity - from .control_activity_py3 import ControlActivity - from .linked_integration_runtime_py3 import LinkedIntegrationRuntime - from .self_hosted_integration_runtime_node_py3 import SelfHostedIntegrationRuntimeNode - from .self_hosted_integration_runtime_status_py3 import SelfHostedIntegrationRuntimeStatus - from .managed_integration_runtime_operation_result_py3 import ManagedIntegrationRuntimeOperationResult - from .managed_integration_runtime_error_py3 import ManagedIntegrationRuntimeError - from .managed_integration_runtime_node_py3 import ManagedIntegrationRuntimeNode - from .managed_integration_runtime_status_py3 import ManagedIntegrationRuntimeStatus - from .linked_integration_runtime_rbac_authorization_py3 import LinkedIntegrationRuntimeRbacAuthorization - from .linked_integration_runtime_key_authorization_py3 import LinkedIntegrationRuntimeKeyAuthorization - from .linked_integration_runtime_type_py3 import LinkedIntegrationRuntimeType - from .self_hosted_integration_runtime_py3 import SelfHostedIntegrationRuntime - from .integration_runtime_custom_setup_script_properties_py3 import IntegrationRuntimeCustomSetupScriptProperties - from .integration_runtime_ssis_catalog_info_py3 import IntegrationRuntimeSsisCatalogInfo - from .integration_runtime_ssis_properties_py3 import IntegrationRuntimeSsisProperties - from .integration_runtime_vnet_properties_py3 import IntegrationRuntimeVNetProperties - from .integration_runtime_compute_properties_py3 import IntegrationRuntimeComputeProperties - from .managed_integration_runtime_py3 import ManagedIntegrationRuntime - from .integration_runtime_node_ip_address_py3 import IntegrationRuntimeNodeIpAddress - from .ssis_object_metadata_py3 import SsisObjectMetadata - from .ssis_object_metadata_list_response_py3 import SsisObjectMetadataListResponse - from .integration_runtime_node_monitoring_data_py3 import IntegrationRuntimeNodeMonitoringData - from .integration_runtime_monitoring_data_py3 import IntegrationRuntimeMonitoringData - from .integration_runtime_auth_keys_py3 import IntegrationRuntimeAuthKeys - from .integration_runtime_regenerate_key_parameters_py3 import IntegrationRuntimeRegenerateKeyParameters - from .integration_runtime_connection_info_py3 import IntegrationRuntimeConnectionInfo + from ._models_py3 import AccessPolicyResponse + from ._models_py3 import Activity + from ._models_py3 import ActivityDependency + from ._models_py3 import ActivityPolicy + from ._models_py3 import ActivityRun + from ._models_py3 import ActivityRunsQueryResponse + from ._models_py3 import AmazonMWSLinkedService + from ._models_py3 import AmazonMWSObjectDataset + from ._models_py3 import AmazonMWSSource + from ._models_py3 import AmazonRedshiftLinkedService + from ._models_py3 import AmazonRedshiftSource + from ._models_py3 import AmazonS3Dataset + from ._models_py3 import AmazonS3LinkedService + from ._models_py3 import AmazonS3Location + from ._models_py3 import AmazonS3ReadSettings + from ._models_py3 import AppendVariableActivity + from ._models_py3 import AvroDataset + from ._models_py3 import AvroFormat + from ._models_py3 import AvroSink + from ._models_py3 import AvroSource + from ._models_py3 import AvroWriteSettings + from ._models_py3 import AzureBatchLinkedService + from ._models_py3 import AzureBlobDataset + from ._models_py3 import AzureBlobFSDataset + from ._models_py3 import AzureBlobFSLinkedService + from ._models_py3 import AzureBlobFSLocation + from ._models_py3 import AzureBlobFSReadSettings + from ._models_py3 import AzureBlobFSSink + from ._models_py3 import AzureBlobFSSource + from ._models_py3 import AzureBlobFSWriteSettings + from ._models_py3 import AzureBlobStorageLinkedService + from ._models_py3 import AzureBlobStorageLocation + from ._models_py3 import AzureBlobStorageReadSettings + from ._models_py3 import AzureBlobStorageWriteSettings + from ._models_py3 import AzureDatabricksLinkedService + from ._models_py3 import AzureDataExplorerCommandActivity + from ._models_py3 import AzureDataExplorerLinkedService + from ._models_py3 import AzureDataExplorerSink + from ._models_py3 import AzureDataExplorerSource + from ._models_py3 import AzureDataExplorerTableDataset + from ._models_py3 import AzureDataLakeAnalyticsLinkedService + from ._models_py3 import AzureDataLakeStoreDataset + from ._models_py3 import AzureDataLakeStoreLinkedService + from ._models_py3 import AzureDataLakeStoreLocation + from ._models_py3 import AzureDataLakeStoreReadSettings + from ._models_py3 import AzureDataLakeStoreSink + from ._models_py3 import AzureDataLakeStoreSource + from ._models_py3 import AzureDataLakeStoreWriteSettings + from ._models_py3 import AzureFunctionActivity + from ._models_py3 import AzureFunctionLinkedService + from ._models_py3 import AzureKeyVaultLinkedService + from ._models_py3 import AzureKeyVaultSecretReference + from ._models_py3 import AzureMariaDBLinkedService + from ._models_py3 import AzureMariaDBSource + from ._models_py3 import AzureMariaDBTableDataset + from ._models_py3 import AzureMLBatchExecutionActivity + from ._models_py3 import AzureMLLinkedService + from ._models_py3 import AzureMLUpdateResourceActivity + from ._models_py3 import AzureMLWebServiceFile + from ._models_py3 import AzureMySqlLinkedService + from ._models_py3 import AzureMySqlSource + from ._models_py3 import AzureMySqlTableDataset + from ._models_py3 import AzurePostgreSqlLinkedService + from ._models_py3 import AzurePostgreSqlSink + from ._models_py3 import AzurePostgreSqlSource + from ._models_py3 import AzurePostgreSqlTableDataset + from ._models_py3 import AzureQueueSink + from ._models_py3 import AzureSearchIndexDataset + from ._models_py3 import AzureSearchIndexSink + from ._models_py3 import AzureSearchLinkedService + from ._models_py3 import AzureSqlDatabaseLinkedService + from ._models_py3 import AzureSqlDWLinkedService + from ._models_py3 import AzureSqlDWTableDataset + from ._models_py3 import AzureSqlMILinkedService + from ._models_py3 import AzureSqlMITableDataset + from ._models_py3 import AzureSqlSink + from ._models_py3 import AzureSqlSource + from ._models_py3 import AzureSqlTableDataset + from ._models_py3 import AzureStorageLinkedService + from ._models_py3 import AzureTableDataset + from ._models_py3 import AzureTableSink + from ._models_py3 import AzureTableSource + from ._models_py3 import AzureTableStorageLinkedService + from ._models_py3 import BinaryDataset + from ._models_py3 import BinarySink + from ._models_py3 import BinarySource + from ._models_py3 import BlobEventsTrigger + from ._models_py3 import BlobSink + from ._models_py3 import BlobSource + from ._models_py3 import BlobTrigger + from ._models_py3 import CassandraLinkedService + from ._models_py3 import CassandraSource + from ._models_py3 import CassandraTableDataset + from ._models_py3 import CommonDataServiceForAppsEntityDataset + from ._models_py3 import CommonDataServiceForAppsLinkedService + from ._models_py3 import CommonDataServiceForAppsSink + from ._models_py3 import CommonDataServiceForAppsSource + from ._models_py3 import ConcurLinkedService + from ._models_py3 import ConcurObjectDataset + from ._models_py3 import ConcurSource + from ._models_py3 import ControlActivity + from ._models_py3 import CopyActivity + from ._models_py3 import CopySink + from ._models_py3 import CopySource + from ._models_py3 import CosmosDbLinkedService + from ._models_py3 import CosmosDbMongoDbApiCollectionDataset + from ._models_py3 import CosmosDbMongoDbApiLinkedService + from ._models_py3 import CosmosDbMongoDbApiSink + from ._models_py3 import CosmosDbMongoDbApiSource + from ._models_py3 import CouchbaseLinkedService + from ._models_py3 import CouchbaseSource + from ._models_py3 import CouchbaseTableDataset + from ._models_py3 import CreateLinkedIntegrationRuntimeRequest + from ._models_py3 import CreateRunResponse + from ._models_py3 import CustomActivity + from ._models_py3 import CustomActivityReferenceObject + from ._models_py3 import CustomDataset + from ._models_py3 import CustomDataSourceLinkedService + from ._models_py3 import DatabricksNotebookActivity + from ._models_py3 import DatabricksSparkJarActivity + from ._models_py3 import DatabricksSparkPythonActivity + from ._models_py3 import DataLakeAnalyticsUSQLActivity + from ._models_py3 import Dataset + from ._models_py3 import DatasetBZip2Compression + from ._models_py3 import DatasetCompression + from ._models_py3 import DatasetDeflateCompression + from ._models_py3 import DatasetFolder + from ._models_py3 import DatasetGZipCompression + from ._models_py3 import DatasetLocation + from ._models_py3 import DatasetReference + from ._models_py3 import DatasetResource + from ._models_py3 import DatasetStorageFormat + from ._models_py3 import DatasetZipDeflateCompression + from ._models_py3 import Db2LinkedService + from ._models_py3 import Db2Source + from ._models_py3 import DeleteActivity + from ._models_py3 import DelimitedTextDataset + from ._models_py3 import DelimitedTextReadSettings + from ._models_py3 import DelimitedTextSink + from ._models_py3 import DelimitedTextSource + from ._models_py3 import DelimitedTextWriteSettings + from ._models_py3 import DependencyReference + from ._models_py3 import DistcpSettings + from ._models_py3 import DocumentDbCollectionDataset + from ._models_py3 import DocumentDbCollectionSink + from ._models_py3 import DocumentDbCollectionSource + from ._models_py3 import DrillLinkedService + from ._models_py3 import DrillSource + from ._models_py3 import DrillTableDataset + from ._models_py3 import DynamicsAXLinkedService + from ._models_py3 import DynamicsAXResourceDataset + from ._models_py3 import DynamicsAXSource + from ._models_py3 import DynamicsCrmEntityDataset + from ._models_py3 import DynamicsCrmLinkedService + from ._models_py3 import DynamicsCrmSink + from ._models_py3 import DynamicsCrmSource + from ._models_py3 import DynamicsEntityDataset + from ._models_py3 import DynamicsLinkedService + from ._models_py3 import DynamicsSink + from ._models_py3 import DynamicsSource + from ._models_py3 import EloquaLinkedService + from ._models_py3 import EloquaObjectDataset + from ._models_py3 import EloquaSource + from ._models_py3 import EntityReference + from ._models_py3 import ExecutePipelineActivity + from ._models_py3 import ExecuteSSISPackageActivity + from ._models_py3 import ExecutionActivity + from ._models_py3 import ExposureControlRequest + from ._models_py3 import ExposureControlResponse + from ._models_py3 import Expression + from ._models_py3 import Factory + from ._models_py3 import FactoryGitHubConfiguration + from ._models_py3 import FactoryIdentity + from ._models_py3 import FactoryRepoConfiguration + from ._models_py3 import FactoryRepoUpdate + from ._models_py3 import FactoryUpdateParameters + from ._models_py3 import FactoryVSTSConfiguration + from ._models_py3 import FileServerLinkedService + from ._models_py3 import FileServerLocation + from ._models_py3 import FileServerReadSettings + from ._models_py3 import FileServerWriteSettings + from ._models_py3 import FileShareDataset + from ._models_py3 import FileSystemSink + from ._models_py3 import FileSystemSource + from ._models_py3 import FilterActivity + from ._models_py3 import ForEachActivity + from ._models_py3 import FormatReadSettings + from ._models_py3 import FormatWriteSettings + from ._models_py3 import FtpReadSettings + from ._models_py3 import FtpServerLinkedService + from ._models_py3 import FtpServerLocation + from ._models_py3 import GetMetadataActivity + from ._models_py3 import GetSsisObjectMetadataRequest + from ._models_py3 import GitHubAccessTokenRequest + from ._models_py3 import GitHubAccessTokenResponse + from ._models_py3 import GoogleAdWordsLinkedService + from ._models_py3 import GoogleAdWordsObjectDataset + from ._models_py3 import GoogleAdWordsSource + from ._models_py3 import GoogleBigQueryLinkedService + from ._models_py3 import GoogleBigQueryObjectDataset + from ._models_py3 import GoogleBigQuerySource + from ._models_py3 import GreenplumLinkedService + from ._models_py3 import GreenplumSource + from ._models_py3 import GreenplumTableDataset + from ._models_py3 import HBaseLinkedService + from ._models_py3 import HBaseObjectDataset + from ._models_py3 import HBaseSource + from ._models_py3 import HdfsLinkedService + from ._models_py3 import HdfsLocation + from ._models_py3 import HdfsReadSettings + from ._models_py3 import HdfsSource + from ._models_py3 import HDInsightHiveActivity + from ._models_py3 import HDInsightLinkedService + from ._models_py3 import HDInsightMapReduceActivity + from ._models_py3 import HDInsightOnDemandLinkedService + from ._models_py3 import HDInsightPigActivity + from ._models_py3 import HDInsightSparkActivity + from ._models_py3 import HDInsightStreamingActivity + from ._models_py3 import HiveLinkedService + from ._models_py3 import HiveObjectDataset + from ._models_py3 import HiveSource + from ._models_py3 import HttpDataset + from ._models_py3 import HttpLinkedService + from ._models_py3 import HttpReadSettings + from ._models_py3 import HttpServerLocation + from ._models_py3 import HttpSource + from ._models_py3 import HubspotLinkedService + from ._models_py3 import HubspotObjectDataset + from ._models_py3 import HubspotSource + from ._models_py3 import IfConditionActivity + from ._models_py3 import ImpalaLinkedService + from ._models_py3 import ImpalaObjectDataset + from ._models_py3 import ImpalaSource + from ._models_py3 import InformixLinkedService + from ._models_py3 import InformixSink + from ._models_py3 import InformixSource + from ._models_py3 import InformixTableDataset + from ._models_py3 import IntegrationRuntime + from ._models_py3 import IntegrationRuntimeAuthKeys + from ._models_py3 import IntegrationRuntimeComputeProperties + from ._models_py3 import IntegrationRuntimeConnectionInfo + from ._models_py3 import IntegrationRuntimeCustomSetupScriptProperties + from ._models_py3 import IntegrationRuntimeDataProxyProperties + from ._models_py3 import IntegrationRuntimeMonitoringData + from ._models_py3 import IntegrationRuntimeNodeIpAddress + from ._models_py3 import IntegrationRuntimeNodeMonitoringData + from ._models_py3 import IntegrationRuntimeReference + from ._models_py3 import IntegrationRuntimeRegenerateKeyParameters + from ._models_py3 import IntegrationRuntimeResource + from ._models_py3 import IntegrationRuntimeSsisCatalogInfo + from ._models_py3 import IntegrationRuntimeSsisProperties + from ._models_py3 import IntegrationRuntimeStatus + from ._models_py3 import IntegrationRuntimeStatusListResponse + from ._models_py3 import IntegrationRuntimeStatusResponse + from ._models_py3 import IntegrationRuntimeVNetProperties + from ._models_py3 import JiraLinkedService + from ._models_py3 import JiraObjectDataset + from ._models_py3 import JiraSource + from ._models_py3 import JsonFormat + from ._models_py3 import LinkedIntegrationRuntime + from ._models_py3 import LinkedIntegrationRuntimeKeyAuthorization + from ._models_py3 import LinkedIntegrationRuntimeRbacAuthorization + from ._models_py3 import LinkedIntegrationRuntimeRequest + from ._models_py3 import LinkedIntegrationRuntimeType + from ._models_py3 import LinkedService + from ._models_py3 import LinkedServiceReference + from ._models_py3 import LinkedServiceResource + from ._models_py3 import LogStorageSettings + from ._models_py3 import LookupActivity + from ._models_py3 import MagentoLinkedService + from ._models_py3 import MagentoObjectDataset + from ._models_py3 import MagentoSource + from ._models_py3 import ManagedIntegrationRuntime + from ._models_py3 import ManagedIntegrationRuntimeError + from ._models_py3 import ManagedIntegrationRuntimeNode + from ._models_py3 import ManagedIntegrationRuntimeOperationResult + from ._models_py3 import ManagedIntegrationRuntimeStatus + from ._models_py3 import MariaDBLinkedService + from ._models_py3 import MariaDBSource + from ._models_py3 import MariaDBTableDataset + from ._models_py3 import MarketoLinkedService + from ._models_py3 import MarketoObjectDataset + from ._models_py3 import MarketoSource + from ._models_py3 import MicrosoftAccessLinkedService + from ._models_py3 import MicrosoftAccessSink + from ._models_py3 import MicrosoftAccessSource + from ._models_py3 import MicrosoftAccessTableDataset + from ._models_py3 import MongoDbCollectionDataset + from ._models_py3 import MongoDbCursorMethodsProperties + from ._models_py3 import MongoDbLinkedService + from ._models_py3 import MongoDbSource + from ._models_py3 import MongoDbV2CollectionDataset + from ._models_py3 import MongoDbV2LinkedService + from ._models_py3 import MongoDbV2Source + from ._models_py3 import MultiplePipelineTrigger + from ._models_py3 import MySqlLinkedService + from ._models_py3 import MySqlSource + from ._models_py3 import MySqlTableDataset + from ._models_py3 import NetezzaLinkedService + from ._models_py3 import NetezzaPartitionSettings + from ._models_py3 import NetezzaSource + from ._models_py3 import NetezzaTableDataset + from ._models_py3 import ODataLinkedService + from ._models_py3 import ODataResourceDataset + from ._models_py3 import ODataSource + from ._models_py3 import OdbcLinkedService + from ._models_py3 import OdbcSink + from ._models_py3 import OdbcSource + from ._models_py3 import OdbcTableDataset + from ._models_py3 import Office365Dataset + from ._models_py3 import Office365LinkedService + from ._models_py3 import Office365Source + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import OperationLogSpecification + from ._models_py3 import OperationMetricAvailability + from ._models_py3 import OperationMetricDimension + from ._models_py3 import OperationMetricSpecification + from ._models_py3 import OperationServiceSpecification + from ._models_py3 import OracleLinkedService + from ._models_py3 import OraclePartitionSettings + from ._models_py3 import OracleServiceCloudLinkedService + from ._models_py3 import OracleServiceCloudObjectDataset + from ._models_py3 import OracleServiceCloudSource + from ._models_py3 import OracleSink + from ._models_py3 import OracleSource + from ._models_py3 import OracleTableDataset + from ._models_py3 import OrcFormat + from ._models_py3 import ParameterSpecification + from ._models_py3 import ParquetDataset + from ._models_py3 import ParquetFormat + from ._models_py3 import ParquetSink + from ._models_py3 import ParquetSource + from ._models_py3 import PaypalLinkedService + from ._models_py3 import PaypalObjectDataset + from ._models_py3 import PaypalSource + from ._models_py3 import PhoenixLinkedService + from ._models_py3 import PhoenixObjectDataset + from ._models_py3 import PhoenixSource + from ._models_py3 import PipelineFolder + from ._models_py3 import PipelineReference + from ._models_py3 import PipelineResource + from ._models_py3 import PipelineRun + from ._models_py3 import PipelineRunInvokedBy + from ._models_py3 import PipelineRunsQueryResponse + from ._models_py3 import PolybaseSettings + from ._models_py3 import PostgreSqlLinkedService + from ._models_py3 import PostgreSqlSource + from ._models_py3 import PostgreSqlTableDataset + from ._models_py3 import PrestoLinkedService + from ._models_py3 import PrestoObjectDataset + from ._models_py3 import PrestoSource + from ._models_py3 import QuickBooksLinkedService + from ._models_py3 import QuickBooksObjectDataset + from ._models_py3 import QuickBooksSource + from ._models_py3 import RecurrenceSchedule + from ._models_py3 import RecurrenceScheduleOccurrence + from ._models_py3 import RedirectIncompatibleRowSettings + from ._models_py3 import RedshiftUnloadSettings + from ._models_py3 import RelationalSource + from ._models_py3 import RelationalTableDataset + from ._models_py3 import RerunTriggerResource + from ._models_py3 import RerunTumblingWindowTrigger + from ._models_py3 import RerunTumblingWindowTriggerActionParameters + from ._models_py3 import Resource + from ._models_py3 import ResponsysLinkedService + from ._models_py3 import ResponsysObjectDataset + from ._models_py3 import ResponsysSource + from ._models_py3 import RestResourceDataset + from ._models_py3 import RestServiceLinkedService + from ._models_py3 import RestSource + from ._models_py3 import RetryPolicy + from ._models_py3 import RunFilterParameters + from ._models_py3 import RunQueryFilter + from ._models_py3 import RunQueryOrderBy + from ._models_py3 import SalesforceLinkedService + from ._models_py3 import SalesforceMarketingCloudLinkedService + from ._models_py3 import SalesforceMarketingCloudObjectDataset + from ._models_py3 import SalesforceMarketingCloudSource + from ._models_py3 import SalesforceObjectDataset + from ._models_py3 import SalesforceServiceCloudLinkedService + from ._models_py3 import SalesforceServiceCloudObjectDataset + from ._models_py3 import SalesforceServiceCloudSink + from ._models_py3 import SalesforceServiceCloudSource + from ._models_py3 import SalesforceSink + from ._models_py3 import SalesforceSource + from ._models_py3 import SapBwCubeDataset + from ._models_py3 import SapBWLinkedService + from ._models_py3 import SapBwSource + from ._models_py3 import SapCloudForCustomerLinkedService + from ._models_py3 import SapCloudForCustomerResourceDataset + from ._models_py3 import SapCloudForCustomerSink + from ._models_py3 import SapCloudForCustomerSource + from ._models_py3 import SapEccLinkedService + from ._models_py3 import SapEccResourceDataset + from ._models_py3 import SapEccSource + from ._models_py3 import SapHanaLinkedService + from ._models_py3 import SapHanaSource + from ._models_py3 import SapHanaTableDataset + from ._models_py3 import SapOpenHubLinkedService + from ._models_py3 import SapOpenHubSource + from ._models_py3 import SapOpenHubTableDataset + from ._models_py3 import SapTableLinkedService + from ._models_py3 import SapTablePartitionSettings + from ._models_py3 import SapTableResourceDataset + from ._models_py3 import SapTableSource + from ._models_py3 import ScheduleTrigger + from ._models_py3 import ScheduleTriggerRecurrence + from ._models_py3 import ScriptAction + from ._models_py3 import SecretBase + from ._models_py3 import SecureString + from ._models_py3 import SelfDependencyTumblingWindowTriggerReference + from ._models_py3 import SelfHostedIntegrationRuntime + from ._models_py3 import SelfHostedIntegrationRuntimeNode + from ._models_py3 import SelfHostedIntegrationRuntimeStatus + from ._models_py3 import ServiceNowLinkedService + from ._models_py3 import ServiceNowObjectDataset + from ._models_py3 import ServiceNowSource + from ._models_py3 import SetVariableActivity + from ._models_py3 import SftpLocation + from ._models_py3 import SftpReadSettings + from ._models_py3 import SftpServerLinkedService + from ._models_py3 import ShopifyLinkedService + from ._models_py3 import ShopifyObjectDataset + from ._models_py3 import ShopifySource + from ._models_py3 import SparkLinkedService + from ._models_py3 import SparkObjectDataset + from ._models_py3 import SparkSource + from ._models_py3 import SqlDWSink + from ._models_py3 import SqlDWSource + from ._models_py3 import SqlMISink + from ._models_py3 import SqlMISource + from ._models_py3 import SqlServerLinkedService + from ._models_py3 import SqlServerSink + from ._models_py3 import SqlServerSource + from ._models_py3 import SqlServerStoredProcedureActivity + from ._models_py3 import SqlServerTableDataset + from ._models_py3 import SqlSink + from ._models_py3 import SqlSource + from ._models_py3 import SquareLinkedService + from ._models_py3 import SquareObjectDataset + from ._models_py3 import SquareSource + from ._models_py3 import SSISAccessCredential + from ._models_py3 import SsisEnvironment + from ._models_py3 import SsisEnvironmentReference + from ._models_py3 import SSISExecutionCredential + from ._models_py3 import SSISExecutionParameter + from ._models_py3 import SsisFolder + from ._models_py3 import SSISLogLocation + from ._models_py3 import SsisObjectMetadata + from ._models_py3 import SsisObjectMetadataListResponse + from ._models_py3 import SsisObjectMetadataStatusResponse + from ._models_py3 import SsisPackage + from ._models_py3 import SSISPackageLocation + from ._models_py3 import SsisParameter + from ._models_py3 import SsisProject + from ._models_py3 import SSISPropertyOverride + from ._models_py3 import SsisVariable + from ._models_py3 import StagingSettings + from ._models_py3 import StoredProcedureParameter + from ._models_py3 import StoreReadSettings + from ._models_py3 import StoreWriteSettings + from ._models_py3 import SubResource + from ._models_py3 import SybaseLinkedService + from ._models_py3 import SybaseSource + from ._models_py3 import SybaseTableDataset + from ._models_py3 import TeradataLinkedService + from ._models_py3 import TeradataPartitionSettings + from ._models_py3 import TeradataSource + from ._models_py3 import TeradataTableDataset + from ._models_py3 import TextFormat + from ._models_py3 import Trigger + from ._models_py3 import TriggerDependencyReference + from ._models_py3 import TriggerPipelineReference + from ._models_py3 import TriggerReference + from ._models_py3 import TriggerResource + from ._models_py3 import TriggerRun + from ._models_py3 import TriggerRunsQueryResponse + from ._models_py3 import TumblingWindowTrigger + from ._models_py3 import TumblingWindowTriggerDependencyReference + from ._models_py3 import UntilActivity + from ._models_py3 import UpdateIntegrationRuntimeNodeRequest + from ._models_py3 import UpdateIntegrationRuntimeRequest + from ._models_py3 import UserAccessPolicy + from ._models_py3 import UserProperty + from ._models_py3 import ValidationActivity + from ._models_py3 import VariableSpecification + from ._models_py3 import VerticaLinkedService + from ._models_py3 import VerticaSource + from ._models_py3 import VerticaTableDataset + from ._models_py3 import WaitActivity + from ._models_py3 import WebActivity + from ._models_py3 import WebActivityAuthentication + from ._models_py3 import WebAnonymousAuthentication + from ._models_py3 import WebBasicAuthentication + from ._models_py3 import WebClientCertificateAuthentication + from ._models_py3 import WebHookActivity + from ._models_py3 import WebLinkedService + from ._models_py3 import WebLinkedServiceTypeProperties + from ._models_py3 import WebSource + from ._models_py3 import WebTableDataset + from ._models_py3 import XeroLinkedService + from ._models_py3 import XeroObjectDataset + from ._models_py3 import XeroSource + from ._models_py3 import ZohoLinkedService + from ._models_py3 import ZohoObjectDataset + from ._models_py3 import ZohoSource except (SyntaxError, ImportError): - from .resource import Resource - from .sub_resource import SubResource - from .expression import Expression - from .secure_string import SecureString - from .linked_service_reference import LinkedServiceReference - from .azure_key_vault_secret_reference import AzureKeyVaultSecretReference - from .secret_base import SecretBase - from .factory_identity import FactoryIdentity - from .factory_repo_configuration import FactoryRepoConfiguration - from .factory import Factory - from .integration_runtime import IntegrationRuntime - from .integration_runtime_resource import IntegrationRuntimeResource - from .integration_runtime_reference import IntegrationRuntimeReference - from .integration_runtime_status import IntegrationRuntimeStatus - from .integration_runtime_status_response import IntegrationRuntimeStatusResponse - from .integration_runtime_status_list_response import IntegrationRuntimeStatusListResponse - from .update_integration_runtime_request import UpdateIntegrationRuntimeRequest - from .update_integration_runtime_node_request import UpdateIntegrationRuntimeNodeRequest - from .linked_integration_runtime_request import LinkedIntegrationRuntimeRequest - from .create_linked_integration_runtime_request import CreateLinkedIntegrationRuntimeRequest - from .parameter_specification import ParameterSpecification - from .linked_service import LinkedService - from .linked_service_resource import LinkedServiceResource - from .dataset_folder import DatasetFolder - from .dataset import Dataset - from .dataset_resource import DatasetResource - from .activity_dependency import ActivityDependency - from .user_property import UserProperty - from .activity import Activity - from .variable_specification import VariableSpecification - from .pipeline_folder import PipelineFolder - from .pipeline_resource import PipelineResource - from .trigger import Trigger - from .trigger_resource import TriggerResource - from .create_run_response import CreateRunResponse - from .factory_vsts_configuration import FactoryVSTSConfiguration - from .factory_git_hub_configuration import FactoryGitHubConfiguration - from .factory_repo_update import FactoryRepoUpdate - from .git_hub_access_token_request import GitHubAccessTokenRequest - from .git_hub_access_token_response import GitHubAccessTokenResponse - from .user_access_policy import UserAccessPolicy - from .access_policy_response import AccessPolicyResponse - from .pipeline_reference import PipelineReference - from .trigger_pipeline_reference import TriggerPipelineReference - from .factory_update_parameters import FactoryUpdateParameters - from .dataset_reference import DatasetReference - from .run_query_filter import RunQueryFilter - from .run_query_order_by import RunQueryOrderBy - from .run_filter_parameters import RunFilterParameters - from .pipeline_run_invoked_by import PipelineRunInvokedBy - from .pipeline_run import PipelineRun - from .pipeline_runs_query_response import PipelineRunsQueryResponse - from .activity_run import ActivityRun - from .activity_runs_query_response import ActivityRunsQueryResponse - from .trigger_run import TriggerRun - from .trigger_runs_query_response import TriggerRunsQueryResponse - from .rerun_tumbling_window_trigger_action_parameters import RerunTumblingWindowTriggerActionParameters - from .rerun_tumbling_window_trigger import RerunTumblingWindowTrigger - from .rerun_trigger_resource import RerunTriggerResource - from .operation_display import OperationDisplay - from .operation_log_specification import OperationLogSpecification - from .operation_metric_availability import OperationMetricAvailability - from .operation_metric_dimension import OperationMetricDimension - from .operation_metric_specification import OperationMetricSpecification - from .operation_service_specification import OperationServiceSpecification - from .operation import Operation - from .get_ssis_object_metadata_request import GetSsisObjectMetadataRequest - from .ssis_object_metadata_status_response import SsisObjectMetadataStatusResponse - from .exposure_control_request import ExposureControlRequest - from .exposure_control_response import ExposureControlResponse - from .self_dependency_tumbling_window_trigger_reference import SelfDependencyTumblingWindowTriggerReference - from .trigger_reference import TriggerReference - from .tumbling_window_trigger_dependency_reference import TumblingWindowTriggerDependencyReference - from .trigger_dependency_reference import TriggerDependencyReference - from .dependency_reference import DependencyReference - from .retry_policy import RetryPolicy - from .tumbling_window_trigger import TumblingWindowTrigger - from .blob_events_trigger import BlobEventsTrigger - from .blob_trigger import BlobTrigger - from .recurrence_schedule_occurrence import RecurrenceScheduleOccurrence - from .recurrence_schedule import RecurrenceSchedule - from .schedule_trigger_recurrence import ScheduleTriggerRecurrence - from .schedule_trigger import ScheduleTrigger - from .multiple_pipeline_trigger import MultiplePipelineTrigger - from .azure_function_linked_service import AzureFunctionLinkedService - from .responsys_linked_service import ResponsysLinkedService - from .azure_databricks_linked_service import AzureDatabricksLinkedService - from .azure_data_lake_analytics_linked_service import AzureDataLakeAnalyticsLinkedService - from .script_action import ScriptAction - from .hd_insight_on_demand_linked_service import HDInsightOnDemandLinkedService - from .salesforce_marketing_cloud_linked_service import SalesforceMarketingCloudLinkedService - from .netezza_linked_service import NetezzaLinkedService - from .vertica_linked_service import VerticaLinkedService - from .zoho_linked_service import ZohoLinkedService - from .xero_linked_service import XeroLinkedService - from .square_linked_service import SquareLinkedService - from .spark_linked_service import SparkLinkedService - from .shopify_linked_service import ShopifyLinkedService - from .service_now_linked_service import ServiceNowLinkedService - from .quick_books_linked_service import QuickBooksLinkedService - from .presto_linked_service import PrestoLinkedService - from .phoenix_linked_service import PhoenixLinkedService - from .paypal_linked_service import PaypalLinkedService - from .marketo_linked_service import MarketoLinkedService - from .maria_db_linked_service import MariaDBLinkedService - from .magento_linked_service import MagentoLinkedService - from .jira_linked_service import JiraLinkedService - from .impala_linked_service import ImpalaLinkedService - from .hubspot_linked_service import HubspotLinkedService - from .hive_linked_service import HiveLinkedService - from .hbase_linked_service import HBaseLinkedService - from .greenplum_linked_service import GreenplumLinkedService - from .google_big_query_linked_service import GoogleBigQueryLinkedService - from .eloqua_linked_service import EloquaLinkedService - from .drill_linked_service import DrillLinkedService - from .couchbase_linked_service import CouchbaseLinkedService - from .concur_linked_service import ConcurLinkedService - from .azure_postgre_sql_linked_service import AzurePostgreSqlLinkedService - from .amazon_mws_linked_service import AmazonMWSLinkedService - from .sap_hana_linked_service import SapHanaLinkedService - from .sap_bw_linked_service import SapBWLinkedService - from .sftp_server_linked_service import SftpServerLinkedService - from .ftp_server_linked_service import FtpServerLinkedService - from .http_linked_service import HttpLinkedService - from .azure_search_linked_service import AzureSearchLinkedService - from .custom_data_source_linked_service import CustomDataSourceLinkedService - from .amazon_redshift_linked_service import AmazonRedshiftLinkedService - from .amazon_s3_linked_service import AmazonS3LinkedService - from .sap_ecc_linked_service import SapEccLinkedService - from .sap_cloud_for_customer_linked_service import SapCloudForCustomerLinkedService - from .salesforce_linked_service import SalesforceLinkedService - from .azure_data_lake_store_linked_service import AzureDataLakeStoreLinkedService - from .mongo_db_linked_service import MongoDbLinkedService - from .cassandra_linked_service import CassandraLinkedService - from .web_client_certificate_authentication import WebClientCertificateAuthentication - from .web_basic_authentication import WebBasicAuthentication - from .web_anonymous_authentication import WebAnonymousAuthentication - from .web_linked_service_type_properties import WebLinkedServiceTypeProperties - from .web_linked_service import WebLinkedService - from .odata_linked_service import ODataLinkedService - from .hdfs_linked_service import HdfsLinkedService - from .odbc_linked_service import OdbcLinkedService - from .azure_ml_linked_service import AzureMLLinkedService - from .teradata_linked_service import TeradataLinkedService - from .db2_linked_service import Db2LinkedService - from .sybase_linked_service import SybaseLinkedService - from .postgre_sql_linked_service import PostgreSqlLinkedService - from .my_sql_linked_service import MySqlLinkedService - from .azure_my_sql_linked_service import AzureMySqlLinkedService - from .oracle_linked_service import OracleLinkedService - from .file_server_linked_service import FileServerLinkedService - from .hd_insight_linked_service import HDInsightLinkedService - from .dynamics_linked_service import DynamicsLinkedService - from .cosmos_db_linked_service import CosmosDbLinkedService - from .azure_key_vault_linked_service import AzureKeyVaultLinkedService - from .azure_batch_linked_service import AzureBatchLinkedService - from .azure_sql_database_linked_service import AzureSqlDatabaseLinkedService - from .sql_server_linked_service import SqlServerLinkedService - from .azure_sql_dw_linked_service import AzureSqlDWLinkedService - from .azure_table_storage_linked_service import AzureTableStorageLinkedService - from .azure_blob_storage_linked_service import AzureBlobStorageLinkedService - from .azure_storage_linked_service import AzureStorageLinkedService - from .responsys_object_dataset import ResponsysObjectDataset - from .salesforce_marketing_cloud_object_dataset import SalesforceMarketingCloudObjectDataset - from .vertica_table_dataset import VerticaTableDataset - from .netezza_table_dataset import NetezzaTableDataset - from .zoho_object_dataset import ZohoObjectDataset - from .xero_object_dataset import XeroObjectDataset - from .square_object_dataset import SquareObjectDataset - from .spark_object_dataset import SparkObjectDataset - from .shopify_object_dataset import ShopifyObjectDataset - from .service_now_object_dataset import ServiceNowObjectDataset - from .quick_books_object_dataset import QuickBooksObjectDataset - from .presto_object_dataset import PrestoObjectDataset - from .phoenix_object_dataset import PhoenixObjectDataset - from .paypal_object_dataset import PaypalObjectDataset - from .marketo_object_dataset import MarketoObjectDataset - from .maria_db_table_dataset import MariaDBTableDataset - from .magento_object_dataset import MagentoObjectDataset - from .jira_object_dataset import JiraObjectDataset - from .impala_object_dataset import ImpalaObjectDataset - from .hubspot_object_dataset import HubspotObjectDataset - from .hive_object_dataset import HiveObjectDataset - from .hbase_object_dataset import HBaseObjectDataset - from .greenplum_table_dataset import GreenplumTableDataset - from .google_big_query_object_dataset import GoogleBigQueryObjectDataset - from .eloqua_object_dataset import EloquaObjectDataset - from .drill_table_dataset import DrillTableDataset - from .couchbase_table_dataset import CouchbaseTableDataset - from .concur_object_dataset import ConcurObjectDataset - from .azure_postgre_sql_table_dataset import AzurePostgreSqlTableDataset - from .amazon_mws_object_dataset import AmazonMWSObjectDataset - from .dataset_zip_deflate_compression import DatasetZipDeflateCompression - from .dataset_deflate_compression import DatasetDeflateCompression - from .dataset_gzip_compression import DatasetGZipCompression - from .dataset_bzip2_compression import DatasetBZip2Compression - from .dataset_compression import DatasetCompression - from .parquet_format import ParquetFormat - from .orc_format import OrcFormat - from .avro_format import AvroFormat - from .json_format import JsonFormat - from .text_format import TextFormat - from .dataset_storage_format import DatasetStorageFormat - from .http_dataset import HttpDataset - from .azure_search_index_dataset import AzureSearchIndexDataset - from .web_table_dataset import WebTableDataset - from .sql_server_table_dataset import SqlServerTableDataset - from .sap_ecc_resource_dataset import SapEccResourceDataset - from .sap_cloud_for_customer_resource_dataset import SapCloudForCustomerResourceDataset - from .salesforce_object_dataset import SalesforceObjectDataset - from .relational_table_dataset import RelationalTableDataset - from .azure_my_sql_table_dataset import AzureMySqlTableDataset - from .oracle_table_dataset import OracleTableDataset - from .odata_resource_dataset import ODataResourceDataset - from .mongo_db_collection_dataset import MongoDbCollectionDataset - from .file_share_dataset import FileShareDataset - from .azure_data_lake_store_dataset import AzureDataLakeStoreDataset - from .dynamics_entity_dataset import DynamicsEntityDataset - from .document_db_collection_dataset import DocumentDbCollectionDataset - from .custom_dataset import CustomDataset - from .cassandra_table_dataset import CassandraTableDataset - from .azure_sql_dw_table_dataset import AzureSqlDWTableDataset - from .azure_sql_table_dataset import AzureSqlTableDataset - from .azure_table_dataset import AzureTableDataset - from .azure_blob_dataset import AzureBlobDataset - from .amazon_s3_dataset import AmazonS3Dataset - from .activity_policy import ActivityPolicy - from .azure_function_activity import AzureFunctionActivity - from .databricks_spark_python_activity import DatabricksSparkPythonActivity - from .databricks_spark_jar_activity import DatabricksSparkJarActivity - from .databricks_notebook_activity import DatabricksNotebookActivity - from .data_lake_analytics_usql_activity import DataLakeAnalyticsUSQLActivity - from .azure_ml_update_resource_activity import AzureMLUpdateResourceActivity - from .azure_ml_web_service_file import AzureMLWebServiceFile - from .azure_ml_batch_execution_activity import AzureMLBatchExecutionActivity - from .get_metadata_activity import GetMetadataActivity - from .web_activity_authentication import WebActivityAuthentication - from .web_activity import WebActivity - from .redshift_unload_settings import RedshiftUnloadSettings - from .amazon_redshift_source import AmazonRedshiftSource - from .responsys_source import ResponsysSource - from .salesforce_marketing_cloud_source import SalesforceMarketingCloudSource - from .vertica_source import VerticaSource - from .netezza_source import NetezzaSource - from .zoho_source import ZohoSource - from .xero_source import XeroSource - from .square_source import SquareSource - from .spark_source import SparkSource - from .shopify_source import ShopifySource - from .service_now_source import ServiceNowSource - from .quick_books_source import QuickBooksSource - from .presto_source import PrestoSource - from .phoenix_source import PhoenixSource - from .paypal_source import PaypalSource - from .marketo_source import MarketoSource - from .maria_db_source import MariaDBSource - from .magento_source import MagentoSource - from .jira_source import JiraSource - from .impala_source import ImpalaSource - from .hubspot_source import HubspotSource - from .hive_source import HiveSource - from .hbase_source import HBaseSource - from .greenplum_source import GreenplumSource - from .google_big_query_source import GoogleBigQuerySource - from .eloqua_source import EloquaSource - from .drill_source import DrillSource - from .couchbase_source import CouchbaseSource - from .concur_source import ConcurSource - from .azure_postgre_sql_source import AzurePostgreSqlSource - from .amazon_mws_source import AmazonMWSSource - from .http_source import HttpSource - from .azure_data_lake_store_source import AzureDataLakeStoreSource - from .mongo_db_source import MongoDbSource - from .cassandra_source import CassandraSource - from .web_source import WebSource - from .oracle_source import OracleSource - from .azure_my_sql_source import AzureMySqlSource - from .distcp_settings import DistcpSettings - from .hdfs_source import HdfsSource - from .file_system_source import FileSystemSource - from .sql_dw_source import SqlDWSource - from .stored_procedure_parameter import StoredProcedureParameter - from .sql_source import SqlSource - from .sap_ecc_source import SapEccSource - from .sap_cloud_for_customer_source import SapCloudForCustomerSource - from .salesforce_source import SalesforceSource - from .relational_source import RelationalSource - from .dynamics_source import DynamicsSource - from .document_db_collection_source import DocumentDbCollectionSource - from .blob_source import BlobSource - from .azure_table_source import AzureTableSource - from .copy_source import CopySource - from .lookup_activity import LookupActivity - from .log_storage_settings import LogStorageSettings - from .delete_activity import DeleteActivity - from .sql_server_stored_procedure_activity import SqlServerStoredProcedureActivity - from .custom_activity_reference_object import CustomActivityReferenceObject - from .custom_activity import CustomActivity - from .ssis_property_override import SSISPropertyOverride - from .ssis_execution_parameter import SSISExecutionParameter - from .ssis_execution_credential import SSISExecutionCredential - from .ssis_package_location import SSISPackageLocation - from .execute_ssis_package_activity import ExecuteSSISPackageActivity - from .hd_insight_spark_activity import HDInsightSparkActivity - from .hd_insight_streaming_activity import HDInsightStreamingActivity - from .hd_insight_map_reduce_activity import HDInsightMapReduceActivity - from .hd_insight_pig_activity import HDInsightPigActivity - from .hd_insight_hive_activity import HDInsightHiveActivity - from .redirect_incompatible_row_settings import RedirectIncompatibleRowSettings - from .staging_settings import StagingSettings - from .tabular_translator import TabularTranslator - from .copy_translator import CopyTranslator - from .salesforce_sink import SalesforceSink - from .dynamics_sink import DynamicsSink - from .odbc_sink import OdbcSink - from .azure_search_index_sink import AzureSearchIndexSink - from .azure_data_lake_store_sink import AzureDataLakeStoreSink - from .oracle_sink import OracleSink - from .polybase_settings import PolybaseSettings - from .sql_dw_sink import SqlDWSink - from .sql_sink import SqlSink - from .document_db_collection_sink import DocumentDbCollectionSink - from .file_system_sink import FileSystemSink - from .blob_sink import BlobSink - from .azure_table_sink import AzureTableSink - from .azure_queue_sink import AzureQueueSink - from .sap_cloud_for_customer_sink import SapCloudForCustomerSink - from .copy_sink import CopySink - from .copy_activity import CopyActivity - from .execution_activity import ExecutionActivity - from .append_variable_activity import AppendVariableActivity - from .set_variable_activity import SetVariableActivity - from .filter_activity import FilterActivity - from .until_activity import UntilActivity - from .wait_activity import WaitActivity - from .for_each_activity import ForEachActivity - from .if_condition_activity import IfConditionActivity - from .execute_pipeline_activity import ExecutePipelineActivity - from .control_activity import ControlActivity - from .linked_integration_runtime import LinkedIntegrationRuntime - from .self_hosted_integration_runtime_node import SelfHostedIntegrationRuntimeNode - from .self_hosted_integration_runtime_status import SelfHostedIntegrationRuntimeStatus - from .managed_integration_runtime_operation_result import ManagedIntegrationRuntimeOperationResult - from .managed_integration_runtime_error import ManagedIntegrationRuntimeError - from .managed_integration_runtime_node import ManagedIntegrationRuntimeNode - from .managed_integration_runtime_status import ManagedIntegrationRuntimeStatus - from .linked_integration_runtime_rbac_authorization import LinkedIntegrationRuntimeRbacAuthorization - from .linked_integration_runtime_key_authorization import LinkedIntegrationRuntimeKeyAuthorization - from .linked_integration_runtime_type import LinkedIntegrationRuntimeType - from .self_hosted_integration_runtime import SelfHostedIntegrationRuntime - from .integration_runtime_custom_setup_script_properties import IntegrationRuntimeCustomSetupScriptProperties - from .integration_runtime_ssis_catalog_info import IntegrationRuntimeSsisCatalogInfo - from .integration_runtime_ssis_properties import IntegrationRuntimeSsisProperties - from .integration_runtime_vnet_properties import IntegrationRuntimeVNetProperties - from .integration_runtime_compute_properties import IntegrationRuntimeComputeProperties - from .managed_integration_runtime import ManagedIntegrationRuntime - from .integration_runtime_node_ip_address import IntegrationRuntimeNodeIpAddress - from .ssis_object_metadata import SsisObjectMetadata - from .ssis_object_metadata_list_response import SsisObjectMetadataListResponse - from .integration_runtime_node_monitoring_data import IntegrationRuntimeNodeMonitoringData - from .integration_runtime_monitoring_data import IntegrationRuntimeMonitoringData - from .integration_runtime_auth_keys import IntegrationRuntimeAuthKeys - from .integration_runtime_regenerate_key_parameters import IntegrationRuntimeRegenerateKeyParameters - from .integration_runtime_connection_info import IntegrationRuntimeConnectionInfo -from .operation_paged import OperationPaged -from .factory_paged import FactoryPaged -from .integration_runtime_resource_paged import IntegrationRuntimeResourcePaged -from .linked_service_resource_paged import LinkedServiceResourcePaged -from .dataset_resource_paged import DatasetResourcePaged -from .pipeline_resource_paged import PipelineResourcePaged -from .trigger_resource_paged import TriggerResourcePaged -from .rerun_trigger_resource_paged import RerunTriggerResourcePaged -from .data_factory_management_client_enums import ( + from ._models import AccessPolicyResponse + from ._models import Activity + from ._models import ActivityDependency + from ._models import ActivityPolicy + from ._models import ActivityRun + from ._models import ActivityRunsQueryResponse + from ._models import AmazonMWSLinkedService + from ._models import AmazonMWSObjectDataset + from ._models import AmazonMWSSource + from ._models import AmazonRedshiftLinkedService + from ._models import AmazonRedshiftSource + from ._models import AmazonS3Dataset + from ._models import AmazonS3LinkedService + from ._models import AmazonS3Location + from ._models import AmazonS3ReadSettings + from ._models import AppendVariableActivity + from ._models import AvroDataset + from ._models import AvroFormat + from ._models import AvroSink + from ._models import AvroSource + from ._models import AvroWriteSettings + from ._models import AzureBatchLinkedService + from ._models import AzureBlobDataset + from ._models import AzureBlobFSDataset + from ._models import AzureBlobFSLinkedService + from ._models import AzureBlobFSLocation + from ._models import AzureBlobFSReadSettings + from ._models import AzureBlobFSSink + from ._models import AzureBlobFSSource + from ._models import AzureBlobFSWriteSettings + from ._models import AzureBlobStorageLinkedService + from ._models import AzureBlobStorageLocation + from ._models import AzureBlobStorageReadSettings + from ._models import AzureBlobStorageWriteSettings + from ._models import AzureDatabricksLinkedService + from ._models import AzureDataExplorerCommandActivity + from ._models import AzureDataExplorerLinkedService + from ._models import AzureDataExplorerSink + from ._models import AzureDataExplorerSource + from ._models import AzureDataExplorerTableDataset + from ._models import AzureDataLakeAnalyticsLinkedService + from ._models import AzureDataLakeStoreDataset + from ._models import AzureDataLakeStoreLinkedService + from ._models import AzureDataLakeStoreLocation + from ._models import AzureDataLakeStoreReadSettings + from ._models import AzureDataLakeStoreSink + from ._models import AzureDataLakeStoreSource + from ._models import AzureDataLakeStoreWriteSettings + from ._models import AzureFunctionActivity + from ._models import AzureFunctionLinkedService + from ._models import AzureKeyVaultLinkedService + from ._models import AzureKeyVaultSecretReference + from ._models import AzureMariaDBLinkedService + from ._models import AzureMariaDBSource + from ._models import AzureMariaDBTableDataset + from ._models import AzureMLBatchExecutionActivity + from ._models import AzureMLLinkedService + from ._models import AzureMLUpdateResourceActivity + from ._models import AzureMLWebServiceFile + from ._models import AzureMySqlLinkedService + from ._models import AzureMySqlSource + from ._models import AzureMySqlTableDataset + from ._models import AzurePostgreSqlLinkedService + from ._models import AzurePostgreSqlSink + from ._models import AzurePostgreSqlSource + from ._models import AzurePostgreSqlTableDataset + from ._models import AzureQueueSink + from ._models import AzureSearchIndexDataset + from ._models import AzureSearchIndexSink + from ._models import AzureSearchLinkedService + from ._models import AzureSqlDatabaseLinkedService + from ._models import AzureSqlDWLinkedService + from ._models import AzureSqlDWTableDataset + from ._models import AzureSqlMILinkedService + from ._models import AzureSqlMITableDataset + from ._models import AzureSqlSink + from ._models import AzureSqlSource + from ._models import AzureSqlTableDataset + from ._models import AzureStorageLinkedService + from ._models import AzureTableDataset + from ._models import AzureTableSink + from ._models import AzureTableSource + from ._models import AzureTableStorageLinkedService + from ._models import BinaryDataset + from ._models import BinarySink + from ._models import BinarySource + from ._models import BlobEventsTrigger + from ._models import BlobSink + from ._models import BlobSource + from ._models import BlobTrigger + from ._models import CassandraLinkedService + from ._models import CassandraSource + from ._models import CassandraTableDataset + from ._models import CommonDataServiceForAppsEntityDataset + from ._models import CommonDataServiceForAppsLinkedService + from ._models import CommonDataServiceForAppsSink + from ._models import CommonDataServiceForAppsSource + from ._models import ConcurLinkedService + from ._models import ConcurObjectDataset + from ._models import ConcurSource + from ._models import ControlActivity + from ._models import CopyActivity + from ._models import CopySink + from ._models import CopySource + from ._models import CosmosDbLinkedService + from ._models import CosmosDbMongoDbApiCollectionDataset + from ._models import CosmosDbMongoDbApiLinkedService + from ._models import CosmosDbMongoDbApiSink + from ._models import CosmosDbMongoDbApiSource + from ._models import CouchbaseLinkedService + from ._models import CouchbaseSource + from ._models import CouchbaseTableDataset + from ._models import CreateLinkedIntegrationRuntimeRequest + from ._models import CreateRunResponse + from ._models import CustomActivity + from ._models import CustomActivityReferenceObject + from ._models import CustomDataset + from ._models import CustomDataSourceLinkedService + from ._models import DatabricksNotebookActivity + from ._models import DatabricksSparkJarActivity + from ._models import DatabricksSparkPythonActivity + from ._models import DataLakeAnalyticsUSQLActivity + from ._models import Dataset + from ._models import DatasetBZip2Compression + from ._models import DatasetCompression + from ._models import DatasetDeflateCompression + from ._models import DatasetFolder + from ._models import DatasetGZipCompression + from ._models import DatasetLocation + from ._models import DatasetReference + from ._models import DatasetResource + from ._models import DatasetStorageFormat + from ._models import DatasetZipDeflateCompression + from ._models import Db2LinkedService + from ._models import Db2Source + from ._models import DeleteActivity + from ._models import DelimitedTextDataset + from ._models import DelimitedTextReadSettings + from ._models import DelimitedTextSink + from ._models import DelimitedTextSource + from ._models import DelimitedTextWriteSettings + from ._models import DependencyReference + from ._models import DistcpSettings + from ._models import DocumentDbCollectionDataset + from ._models import DocumentDbCollectionSink + from ._models import DocumentDbCollectionSource + from ._models import DrillLinkedService + from ._models import DrillSource + from ._models import DrillTableDataset + from ._models import DynamicsAXLinkedService + from ._models import DynamicsAXResourceDataset + from ._models import DynamicsAXSource + from ._models import DynamicsCrmEntityDataset + from ._models import DynamicsCrmLinkedService + from ._models import DynamicsCrmSink + from ._models import DynamicsCrmSource + from ._models import DynamicsEntityDataset + from ._models import DynamicsLinkedService + from ._models import DynamicsSink + from ._models import DynamicsSource + from ._models import EloquaLinkedService + from ._models import EloquaObjectDataset + from ._models import EloquaSource + from ._models import EntityReference + from ._models import ExecutePipelineActivity + from ._models import ExecuteSSISPackageActivity + from ._models import ExecutionActivity + from ._models import ExposureControlRequest + from ._models import ExposureControlResponse + from ._models import Expression + from ._models import Factory + from ._models import FactoryGitHubConfiguration + from ._models import FactoryIdentity + from ._models import FactoryRepoConfiguration + from ._models import FactoryRepoUpdate + from ._models import FactoryUpdateParameters + from ._models import FactoryVSTSConfiguration + from ._models import FileServerLinkedService + from ._models import FileServerLocation + from ._models import FileServerReadSettings + from ._models import FileServerWriteSettings + from ._models import FileShareDataset + from ._models import FileSystemSink + from ._models import FileSystemSource + from ._models import FilterActivity + from ._models import ForEachActivity + from ._models import FormatReadSettings + from ._models import FormatWriteSettings + from ._models import FtpReadSettings + from ._models import FtpServerLinkedService + from ._models import FtpServerLocation + from ._models import GetMetadataActivity + from ._models import GetSsisObjectMetadataRequest + from ._models import GitHubAccessTokenRequest + from ._models import GitHubAccessTokenResponse + from ._models import GoogleAdWordsLinkedService + from ._models import GoogleAdWordsObjectDataset + from ._models import GoogleAdWordsSource + from ._models import GoogleBigQueryLinkedService + from ._models import GoogleBigQueryObjectDataset + from ._models import GoogleBigQuerySource + from ._models import GreenplumLinkedService + from ._models import GreenplumSource + from ._models import GreenplumTableDataset + from ._models import HBaseLinkedService + from ._models import HBaseObjectDataset + from ._models import HBaseSource + from ._models import HdfsLinkedService + from ._models import HdfsLocation + from ._models import HdfsReadSettings + from ._models import HdfsSource + from ._models import HDInsightHiveActivity + from ._models import HDInsightLinkedService + from ._models import HDInsightMapReduceActivity + from ._models import HDInsightOnDemandLinkedService + from ._models import HDInsightPigActivity + from ._models import HDInsightSparkActivity + from ._models import HDInsightStreamingActivity + from ._models import HiveLinkedService + from ._models import HiveObjectDataset + from ._models import HiveSource + from ._models import HttpDataset + from ._models import HttpLinkedService + from ._models import HttpReadSettings + from ._models import HttpServerLocation + from ._models import HttpSource + from ._models import HubspotLinkedService + from ._models import HubspotObjectDataset + from ._models import HubspotSource + from ._models import IfConditionActivity + from ._models import ImpalaLinkedService + from ._models import ImpalaObjectDataset + from ._models import ImpalaSource + from ._models import InformixLinkedService + from ._models import InformixSink + from ._models import InformixSource + from ._models import InformixTableDataset + from ._models import IntegrationRuntime + from ._models import IntegrationRuntimeAuthKeys + from ._models import IntegrationRuntimeComputeProperties + from ._models import IntegrationRuntimeConnectionInfo + from ._models import IntegrationRuntimeCustomSetupScriptProperties + from ._models import IntegrationRuntimeDataProxyProperties + from ._models import IntegrationRuntimeMonitoringData + from ._models import IntegrationRuntimeNodeIpAddress + from ._models import IntegrationRuntimeNodeMonitoringData + from ._models import IntegrationRuntimeReference + from ._models import IntegrationRuntimeRegenerateKeyParameters + from ._models import IntegrationRuntimeResource + from ._models import IntegrationRuntimeSsisCatalogInfo + from ._models import IntegrationRuntimeSsisProperties + from ._models import IntegrationRuntimeStatus + from ._models import IntegrationRuntimeStatusListResponse + from ._models import IntegrationRuntimeStatusResponse + from ._models import IntegrationRuntimeVNetProperties + from ._models import JiraLinkedService + from ._models import JiraObjectDataset + from ._models import JiraSource + from ._models import JsonFormat + from ._models import LinkedIntegrationRuntime + from ._models import LinkedIntegrationRuntimeKeyAuthorization + from ._models import LinkedIntegrationRuntimeRbacAuthorization + from ._models import LinkedIntegrationRuntimeRequest + from ._models import LinkedIntegrationRuntimeType + from ._models import LinkedService + from ._models import LinkedServiceReference + from ._models import LinkedServiceResource + from ._models import LogStorageSettings + from ._models import LookupActivity + from ._models import MagentoLinkedService + from ._models import MagentoObjectDataset + from ._models import MagentoSource + from ._models import ManagedIntegrationRuntime + from ._models import ManagedIntegrationRuntimeError + from ._models import ManagedIntegrationRuntimeNode + from ._models import ManagedIntegrationRuntimeOperationResult + from ._models import ManagedIntegrationRuntimeStatus + from ._models import MariaDBLinkedService + from ._models import MariaDBSource + from ._models import MariaDBTableDataset + from ._models import MarketoLinkedService + from ._models import MarketoObjectDataset + from ._models import MarketoSource + from ._models import MicrosoftAccessLinkedService + from ._models import MicrosoftAccessSink + from ._models import MicrosoftAccessSource + from ._models import MicrosoftAccessTableDataset + from ._models import MongoDbCollectionDataset + from ._models import MongoDbCursorMethodsProperties + from ._models import MongoDbLinkedService + from ._models import MongoDbSource + from ._models import MongoDbV2CollectionDataset + from ._models import MongoDbV2LinkedService + from ._models import MongoDbV2Source + from ._models import MultiplePipelineTrigger + from ._models import MySqlLinkedService + from ._models import MySqlSource + from ._models import MySqlTableDataset + from ._models import NetezzaLinkedService + from ._models import NetezzaPartitionSettings + from ._models import NetezzaSource + from ._models import NetezzaTableDataset + from ._models import ODataLinkedService + from ._models import ODataResourceDataset + from ._models import ODataSource + from ._models import OdbcLinkedService + from ._models import OdbcSink + from ._models import OdbcSource + from ._models import OdbcTableDataset + from ._models import Office365Dataset + from ._models import Office365LinkedService + from ._models import Office365Source + from ._models import Operation + from ._models import OperationDisplay + from ._models import OperationLogSpecification + from ._models import OperationMetricAvailability + from ._models import OperationMetricDimension + from ._models import OperationMetricSpecification + from ._models import OperationServiceSpecification + from ._models import OracleLinkedService + from ._models import OraclePartitionSettings + from ._models import OracleServiceCloudLinkedService + from ._models import OracleServiceCloudObjectDataset + from ._models import OracleServiceCloudSource + from ._models import OracleSink + from ._models import OracleSource + from ._models import OracleTableDataset + from ._models import OrcFormat + from ._models import ParameterSpecification + from ._models import ParquetDataset + from ._models import ParquetFormat + from ._models import ParquetSink + from ._models import ParquetSource + from ._models import PaypalLinkedService + from ._models import PaypalObjectDataset + from ._models import PaypalSource + from ._models import PhoenixLinkedService + from ._models import PhoenixObjectDataset + from ._models import PhoenixSource + from ._models import PipelineFolder + from ._models import PipelineReference + from ._models import PipelineResource + from ._models import PipelineRun + from ._models import PipelineRunInvokedBy + from ._models import PipelineRunsQueryResponse + from ._models import PolybaseSettings + from ._models import PostgreSqlLinkedService + from ._models import PostgreSqlSource + from ._models import PostgreSqlTableDataset + from ._models import PrestoLinkedService + from ._models import PrestoObjectDataset + from ._models import PrestoSource + from ._models import QuickBooksLinkedService + from ._models import QuickBooksObjectDataset + from ._models import QuickBooksSource + from ._models import RecurrenceSchedule + from ._models import RecurrenceScheduleOccurrence + from ._models import RedirectIncompatibleRowSettings + from ._models import RedshiftUnloadSettings + from ._models import RelationalSource + from ._models import RelationalTableDataset + from ._models import RerunTriggerResource + from ._models import RerunTumblingWindowTrigger + from ._models import RerunTumblingWindowTriggerActionParameters + from ._models import Resource + from ._models import ResponsysLinkedService + from ._models import ResponsysObjectDataset + from ._models import ResponsysSource + from ._models import RestResourceDataset + from ._models import RestServiceLinkedService + from ._models import RestSource + from ._models import RetryPolicy + from ._models import RunFilterParameters + from ._models import RunQueryFilter + from ._models import RunQueryOrderBy + from ._models import SalesforceLinkedService + from ._models import SalesforceMarketingCloudLinkedService + from ._models import SalesforceMarketingCloudObjectDataset + from ._models import SalesforceMarketingCloudSource + from ._models import SalesforceObjectDataset + from ._models import SalesforceServiceCloudLinkedService + from ._models import SalesforceServiceCloudObjectDataset + from ._models import SalesforceServiceCloudSink + from ._models import SalesforceServiceCloudSource + from ._models import SalesforceSink + from ._models import SalesforceSource + from ._models import SapBwCubeDataset + from ._models import SapBWLinkedService + from ._models import SapBwSource + from ._models import SapCloudForCustomerLinkedService + from ._models import SapCloudForCustomerResourceDataset + from ._models import SapCloudForCustomerSink + from ._models import SapCloudForCustomerSource + from ._models import SapEccLinkedService + from ._models import SapEccResourceDataset + from ._models import SapEccSource + from ._models import SapHanaLinkedService + from ._models import SapHanaSource + from ._models import SapHanaTableDataset + from ._models import SapOpenHubLinkedService + from ._models import SapOpenHubSource + from ._models import SapOpenHubTableDataset + from ._models import SapTableLinkedService + from ._models import SapTablePartitionSettings + from ._models import SapTableResourceDataset + from ._models import SapTableSource + from ._models import ScheduleTrigger + from ._models import ScheduleTriggerRecurrence + from ._models import ScriptAction + from ._models import SecretBase + from ._models import SecureString + from ._models import SelfDependencyTumblingWindowTriggerReference + from ._models import SelfHostedIntegrationRuntime + from ._models import SelfHostedIntegrationRuntimeNode + from ._models import SelfHostedIntegrationRuntimeStatus + from ._models import ServiceNowLinkedService + from ._models import ServiceNowObjectDataset + from ._models import ServiceNowSource + from ._models import SetVariableActivity + from ._models import SftpLocation + from ._models import SftpReadSettings + from ._models import SftpServerLinkedService + from ._models import ShopifyLinkedService + from ._models import ShopifyObjectDataset + from ._models import ShopifySource + from ._models import SparkLinkedService + from ._models import SparkObjectDataset + from ._models import SparkSource + from ._models import SqlDWSink + from ._models import SqlDWSource + from ._models import SqlMISink + from ._models import SqlMISource + from ._models import SqlServerLinkedService + from ._models import SqlServerSink + from ._models import SqlServerSource + from ._models import SqlServerStoredProcedureActivity + from ._models import SqlServerTableDataset + from ._models import SqlSink + from ._models import SqlSource + from ._models import SquareLinkedService + from ._models import SquareObjectDataset + from ._models import SquareSource + from ._models import SSISAccessCredential + from ._models import SsisEnvironment + from ._models import SsisEnvironmentReference + from ._models import SSISExecutionCredential + from ._models import SSISExecutionParameter + from ._models import SsisFolder + from ._models import SSISLogLocation + from ._models import SsisObjectMetadata + from ._models import SsisObjectMetadataListResponse + from ._models import SsisObjectMetadataStatusResponse + from ._models import SsisPackage + from ._models import SSISPackageLocation + from ._models import SsisParameter + from ._models import SsisProject + from ._models import SSISPropertyOverride + from ._models import SsisVariable + from ._models import StagingSettings + from ._models import StoredProcedureParameter + from ._models import StoreReadSettings + from ._models import StoreWriteSettings + from ._models import SubResource + from ._models import SybaseLinkedService + from ._models import SybaseSource + from ._models import SybaseTableDataset + from ._models import TeradataLinkedService + from ._models import TeradataPartitionSettings + from ._models import TeradataSource + from ._models import TeradataTableDataset + from ._models import TextFormat + from ._models import Trigger + from ._models import TriggerDependencyReference + from ._models import TriggerPipelineReference + from ._models import TriggerReference + from ._models import TriggerResource + from ._models import TriggerRun + from ._models import TriggerRunsQueryResponse + from ._models import TumblingWindowTrigger + from ._models import TumblingWindowTriggerDependencyReference + from ._models import UntilActivity + from ._models import UpdateIntegrationRuntimeNodeRequest + from ._models import UpdateIntegrationRuntimeRequest + from ._models import UserAccessPolicy + from ._models import UserProperty + from ._models import ValidationActivity + from ._models import VariableSpecification + from ._models import VerticaLinkedService + from ._models import VerticaSource + from ._models import VerticaTableDataset + from ._models import WaitActivity + from ._models import WebActivity + from ._models import WebActivityAuthentication + from ._models import WebAnonymousAuthentication + from ._models import WebBasicAuthentication + from ._models import WebClientCertificateAuthentication + from ._models import WebHookActivity + from ._models import WebLinkedService + from ._models import WebLinkedServiceTypeProperties + from ._models import WebSource + from ._models import WebTableDataset + from ._models import XeroLinkedService + from ._models import XeroObjectDataset + from ._models import XeroSource + from ._models import ZohoLinkedService + from ._models import ZohoObjectDataset + from ._models import ZohoSource +from ._paged_models import DatasetResourcePaged +from ._paged_models import FactoryPaged +from ._paged_models import IntegrationRuntimeResourcePaged +from ._paged_models import LinkedServiceResourcePaged +from ._paged_models import OperationPaged +from ._paged_models import PipelineResourcePaged +from ._paged_models import RerunTriggerResourcePaged +from ._paged_models import TriggerResourcePaged +from ._data_factory_management_client_enums import ( IntegrationRuntimeState, IntegrationRuntimeAutoUpdate, ParameterType, @@ -764,6 +1050,7 @@ DayOfWeek, DaysOfWeek, RecurrenceFrequency, + GoogleAdWordsAuthenticationType, SparkServerType, SparkThriftTransportProtocol, SparkAuthenticationType, @@ -780,29 +1067,38 @@ SftpAuthenticationType, FtpAuthenticationType, HttpAuthenticationType, + RestServiceAuthenticationType, MongoDbAuthenticationType, ODataAuthenticationType, + ODataAadServicePrincipalCredentialType, TeradataAuthenticationType, Db2AuthenticationType, SybaseAuthenticationType, - DatasetCompressionLevel, - JsonFormatFilePattern, + DynamicsDeploymentType, + DynamicsAuthenticationType, + AvroCompressionCodec, AzureFunctionActivityMethod, WebActivityMethod, + NetezzaPartitionOption, CassandraSourceReadConsistencyLevels, + TeradataPartitionOption, + OraclePartitionOption, StoredProcedureParameterType, + SapTablePartitionOption, SalesforceSourceReadBehavior, + SsisPackageLocationType, HDInsightActivityDebugInfoOption, SalesforceSinkWriteBehavior, AzureSearchIndexWriteBehaviorType, - CopyBehaviorType, PolybaseSettingsRejectType, SapCloudForCustomerSinkWriteBehavior, + WebHookActivityMethod, IntegrationRuntimeType, SelfHostedIntegrationRuntimeNodeStatus, IntegrationRuntimeUpdateResult, IntegrationRuntimeInternalChannelEncryptionMode, ManagedIntegrationRuntimeNodeStatus, + IntegrationRuntimeEntityReferenceType, IntegrationRuntimeSsisCatalogPricingTier, IntegrationRuntimeLicenseType, IntegrationRuntimeEdition, @@ -811,370 +1107,513 @@ ) __all__ = [ - 'Resource', - 'SubResource', - 'Expression', - 'SecureString', - 'LinkedServiceReference', - 'AzureKeyVaultSecretReference', - 'SecretBase', - 'FactoryIdentity', - 'FactoryRepoConfiguration', - 'Factory', - 'IntegrationRuntime', - 'IntegrationRuntimeResource', - 'IntegrationRuntimeReference', - 'IntegrationRuntimeStatus', - 'IntegrationRuntimeStatusResponse', - 'IntegrationRuntimeStatusListResponse', - 'UpdateIntegrationRuntimeRequest', - 'UpdateIntegrationRuntimeNodeRequest', - 'LinkedIntegrationRuntimeRequest', - 'CreateLinkedIntegrationRuntimeRequest', - 'ParameterSpecification', - 'LinkedService', - 'LinkedServiceResource', - 'DatasetFolder', - 'Dataset', - 'DatasetResource', - 'ActivityDependency', - 'UserProperty', - 'Activity', - 'VariableSpecification', - 'PipelineFolder', - 'PipelineResource', - 'Trigger', - 'TriggerResource', - 'CreateRunResponse', - 'FactoryVSTSConfiguration', - 'FactoryGitHubConfiguration', - 'FactoryRepoUpdate', - 'GitHubAccessTokenRequest', - 'GitHubAccessTokenResponse', - 'UserAccessPolicy', 'AccessPolicyResponse', - 'PipelineReference', - 'TriggerPipelineReference', - 'FactoryUpdateParameters', - 'DatasetReference', - 'RunQueryFilter', - 'RunQueryOrderBy', - 'RunFilterParameters', - 'PipelineRunInvokedBy', - 'PipelineRun', - 'PipelineRunsQueryResponse', + 'Activity', + 'ActivityDependency', + 'ActivityPolicy', 'ActivityRun', 'ActivityRunsQueryResponse', - 'TriggerRun', - 'TriggerRunsQueryResponse', - 'RerunTumblingWindowTriggerActionParameters', - 'RerunTumblingWindowTrigger', - 'RerunTriggerResource', - 'OperationDisplay', - 'OperationLogSpecification', - 'OperationMetricAvailability', - 'OperationMetricDimension', - 'OperationMetricSpecification', - 'OperationServiceSpecification', - 'Operation', - 'GetSsisObjectMetadataRequest', - 'SsisObjectMetadataStatusResponse', - 'ExposureControlRequest', - 'ExposureControlResponse', - 'SelfDependencyTumblingWindowTriggerReference', - 'TriggerReference', - 'TumblingWindowTriggerDependencyReference', - 'TriggerDependencyReference', - 'DependencyReference', - 'RetryPolicy', - 'TumblingWindowTrigger', - 'BlobEventsTrigger', - 'BlobTrigger', - 'RecurrenceScheduleOccurrence', - 'RecurrenceSchedule', - 'ScheduleTriggerRecurrence', - 'ScheduleTrigger', - 'MultiplePipelineTrigger', - 'AzureFunctionLinkedService', - 'ResponsysLinkedService', - 'AzureDatabricksLinkedService', - 'AzureDataLakeAnalyticsLinkedService', - 'ScriptAction', - 'HDInsightOnDemandLinkedService', - 'SalesforceMarketingCloudLinkedService', - 'NetezzaLinkedService', - 'VerticaLinkedService', - 'ZohoLinkedService', - 'XeroLinkedService', - 'SquareLinkedService', - 'SparkLinkedService', - 'ShopifyLinkedService', - 'ServiceNowLinkedService', - 'QuickBooksLinkedService', - 'PrestoLinkedService', - 'PhoenixLinkedService', - 'PaypalLinkedService', - 'MarketoLinkedService', - 'MariaDBLinkedService', - 'MagentoLinkedService', - 'JiraLinkedService', - 'ImpalaLinkedService', - 'HubspotLinkedService', - 'HiveLinkedService', - 'HBaseLinkedService', - 'GreenplumLinkedService', - 'GoogleBigQueryLinkedService', - 'EloquaLinkedService', - 'DrillLinkedService', - 'CouchbaseLinkedService', - 'ConcurLinkedService', - 'AzurePostgreSqlLinkedService', 'AmazonMWSLinkedService', - 'SapHanaLinkedService', - 'SapBWLinkedService', - 'SftpServerLinkedService', - 'FtpServerLinkedService', - 'HttpLinkedService', - 'AzureSearchLinkedService', - 'CustomDataSourceLinkedService', + 'AmazonMWSObjectDataset', + 'AmazonMWSSource', 'AmazonRedshiftLinkedService', + 'AmazonRedshiftSource', + 'AmazonS3Dataset', 'AmazonS3LinkedService', - 'SapEccLinkedService', - 'SapCloudForCustomerLinkedService', - 'SalesforceLinkedService', + 'AmazonS3Location', + 'AmazonS3ReadSettings', + 'AppendVariableActivity', + 'AvroDataset', + 'AvroFormat', + 'AvroSink', + 'AvroSource', + 'AvroWriteSettings', + 'AzureBatchLinkedService', + 'AzureBlobDataset', + 'AzureBlobFSDataset', + 'AzureBlobFSLinkedService', + 'AzureBlobFSLocation', + 'AzureBlobFSReadSettings', + 'AzureBlobFSSink', + 'AzureBlobFSSource', + 'AzureBlobFSWriteSettings', + 'AzureBlobStorageLinkedService', + 'AzureBlobStorageLocation', + 'AzureBlobStorageReadSettings', + 'AzureBlobStorageWriteSettings', + 'AzureDatabricksLinkedService', + 'AzureDataExplorerCommandActivity', + 'AzureDataExplorerLinkedService', + 'AzureDataExplorerSink', + 'AzureDataExplorerSource', + 'AzureDataExplorerTableDataset', + 'AzureDataLakeAnalyticsLinkedService', + 'AzureDataLakeStoreDataset', 'AzureDataLakeStoreLinkedService', - 'MongoDbLinkedService', - 'CassandraLinkedService', - 'WebClientCertificateAuthentication', - 'WebBasicAuthentication', - 'WebAnonymousAuthentication', - 'WebLinkedServiceTypeProperties', - 'WebLinkedService', - 'ODataLinkedService', - 'HdfsLinkedService', - 'OdbcLinkedService', + 'AzureDataLakeStoreLocation', + 'AzureDataLakeStoreReadSettings', + 'AzureDataLakeStoreSink', + 'AzureDataLakeStoreSource', + 'AzureDataLakeStoreWriteSettings', + 'AzureFunctionActivity', + 'AzureFunctionLinkedService', + 'AzureKeyVaultLinkedService', + 'AzureKeyVaultSecretReference', + 'AzureMariaDBLinkedService', + 'AzureMariaDBSource', + 'AzureMariaDBTableDataset', + 'AzureMLBatchExecutionActivity', 'AzureMLLinkedService', - 'TeradataLinkedService', - 'Db2LinkedService', - 'SybaseLinkedService', - 'PostgreSqlLinkedService', - 'MySqlLinkedService', + 'AzureMLUpdateResourceActivity', + 'AzureMLWebServiceFile', 'AzureMySqlLinkedService', - 'OracleLinkedService', - 'FileServerLinkedService', - 'HDInsightLinkedService', - 'DynamicsLinkedService', - 'CosmosDbLinkedService', - 'AzureKeyVaultLinkedService', - 'AzureBatchLinkedService', + 'AzureMySqlSource', + 'AzureMySqlTableDataset', + 'AzurePostgreSqlLinkedService', + 'AzurePostgreSqlSink', + 'AzurePostgreSqlSource', + 'AzurePostgreSqlTableDataset', + 'AzureQueueSink', + 'AzureSearchIndexDataset', + 'AzureSearchIndexSink', + 'AzureSearchLinkedService', 'AzureSqlDatabaseLinkedService', - 'SqlServerLinkedService', 'AzureSqlDWLinkedService', - 'AzureTableStorageLinkedService', - 'AzureBlobStorageLinkedService', + 'AzureSqlDWTableDataset', + 'AzureSqlMILinkedService', + 'AzureSqlMITableDataset', + 'AzureSqlSink', + 'AzureSqlSource', + 'AzureSqlTableDataset', 'AzureStorageLinkedService', - 'ResponsysObjectDataset', - 'SalesforceMarketingCloudObjectDataset', - 'VerticaTableDataset', - 'NetezzaTableDataset', - 'ZohoObjectDataset', - 'XeroObjectDataset', - 'SquareObjectDataset', - 'SparkObjectDataset', - 'ShopifyObjectDataset', - 'ServiceNowObjectDataset', - 'QuickBooksObjectDataset', - 'PrestoObjectDataset', - 'PhoenixObjectDataset', - 'PaypalObjectDataset', - 'MarketoObjectDataset', - 'MariaDBTableDataset', - 'MagentoObjectDataset', - 'JiraObjectDataset', - 'ImpalaObjectDataset', - 'HubspotObjectDataset', - 'HiveObjectDataset', - 'HBaseObjectDataset', - 'GreenplumTableDataset', - 'GoogleBigQueryObjectDataset', - 'EloquaObjectDataset', - 'DrillTableDataset', - 'CouchbaseTableDataset', + 'AzureTableDataset', + 'AzureTableSink', + 'AzureTableSource', + 'AzureTableStorageLinkedService', + 'BinaryDataset', + 'BinarySink', + 'BinarySource', + 'BlobEventsTrigger', + 'BlobSink', + 'BlobSource', + 'BlobTrigger', + 'CassandraLinkedService', + 'CassandraSource', + 'CassandraTableDataset', + 'CommonDataServiceForAppsEntityDataset', + 'CommonDataServiceForAppsLinkedService', + 'CommonDataServiceForAppsSink', + 'CommonDataServiceForAppsSource', + 'ConcurLinkedService', 'ConcurObjectDataset', - 'AzurePostgreSqlTableDataset', - 'AmazonMWSObjectDataset', - 'DatasetZipDeflateCompression', - 'DatasetDeflateCompression', - 'DatasetGZipCompression', + 'ConcurSource', + 'ControlActivity', + 'CopyActivity', + 'CopySink', + 'CopySource', + 'CosmosDbLinkedService', + 'CosmosDbMongoDbApiCollectionDataset', + 'CosmosDbMongoDbApiLinkedService', + 'CosmosDbMongoDbApiSink', + 'CosmosDbMongoDbApiSource', + 'CouchbaseLinkedService', + 'CouchbaseSource', + 'CouchbaseTableDataset', + 'CreateLinkedIntegrationRuntimeRequest', + 'CreateRunResponse', + 'CustomActivity', + 'CustomActivityReferenceObject', + 'CustomDataset', + 'CustomDataSourceLinkedService', + 'DatabricksNotebookActivity', + 'DatabricksSparkJarActivity', + 'DatabricksSparkPythonActivity', + 'DataLakeAnalyticsUSQLActivity', + 'Dataset', 'DatasetBZip2Compression', 'DatasetCompression', - 'ParquetFormat', - 'OrcFormat', - 'AvroFormat', - 'JsonFormat', - 'TextFormat', - 'DatasetStorageFormat', - 'HttpDataset', - 'AzureSearchIndexDataset', - 'WebTableDataset', - 'SqlServerTableDataset', - 'SapEccResourceDataset', - 'SapCloudForCustomerResourceDataset', - 'SalesforceObjectDataset', - 'RelationalTableDataset', - 'AzureMySqlTableDataset', - 'OracleTableDataset', - 'ODataResourceDataset', - 'MongoDbCollectionDataset', - 'FileShareDataset', - 'AzureDataLakeStoreDataset', - 'DynamicsEntityDataset', + 'DatasetDeflateCompression', + 'DatasetFolder', + 'DatasetGZipCompression', + 'DatasetLocation', + 'DatasetReference', + 'DatasetResource', + 'DatasetStorageFormat', + 'DatasetZipDeflateCompression', + 'Db2LinkedService', + 'Db2Source', + 'DeleteActivity', + 'DelimitedTextDataset', + 'DelimitedTextReadSettings', + 'DelimitedTextSink', + 'DelimitedTextSource', + 'DelimitedTextWriteSettings', + 'DependencyReference', + 'DistcpSettings', 'DocumentDbCollectionDataset', - 'CustomDataset', - 'CassandraTableDataset', - 'AzureSqlDWTableDataset', - 'AzureSqlTableDataset', - 'AzureTableDataset', - 'AzureBlobDataset', - 'AmazonS3Dataset', - 'ActivityPolicy', - 'AzureFunctionActivity', - 'DatabricksSparkPythonActivity', - 'DatabricksSparkJarActivity', - 'DatabricksNotebookActivity', - 'DataLakeAnalyticsUSQLActivity', - 'AzureMLUpdateResourceActivity', - 'AzureMLWebServiceFile', - 'AzureMLBatchExecutionActivity', - 'GetMetadataActivity', - 'WebActivityAuthentication', - 'WebActivity', - 'RedshiftUnloadSettings', - 'AmazonRedshiftSource', - 'ResponsysSource', - 'SalesforceMarketingCloudSource', - 'VerticaSource', - 'NetezzaSource', - 'ZohoSource', - 'XeroSource', - 'SquareSource', - 'SparkSource', - 'ShopifySource', - 'ServiceNowSource', - 'QuickBooksSource', - 'PrestoSource', - 'PhoenixSource', - 'PaypalSource', - 'MarketoSource', - 'MariaDBSource', - 'MagentoSource', - 'JiraSource', - 'ImpalaSource', - 'HubspotSource', - 'HiveSource', - 'HBaseSource', - 'GreenplumSource', - 'GoogleBigQuerySource', - 'EloquaSource', + 'DocumentDbCollectionSink', + 'DocumentDbCollectionSource', + 'DrillLinkedService', 'DrillSource', - 'CouchbaseSource', - 'ConcurSource', - 'AzurePostgreSqlSource', - 'AmazonMWSSource', - 'HttpSource', - 'AzureDataLakeStoreSource', - 'MongoDbSource', - 'CassandraSource', - 'WebSource', - 'OracleSource', - 'AzureMySqlSource', - 'DistcpSettings', - 'HdfsSource', - 'FileSystemSource', - 'SqlDWSource', - 'StoredProcedureParameter', - 'SqlSource', - 'SapEccSource', - 'SapCloudForCustomerSource', - 'SalesforceSource', - 'RelationalSource', + 'DrillTableDataset', + 'DynamicsAXLinkedService', + 'DynamicsAXResourceDataset', + 'DynamicsAXSource', + 'DynamicsCrmEntityDataset', + 'DynamicsCrmLinkedService', + 'DynamicsCrmSink', + 'DynamicsCrmSource', + 'DynamicsEntityDataset', + 'DynamicsLinkedService', + 'DynamicsSink', 'DynamicsSource', - 'DocumentDbCollectionSource', - 'BlobSource', - 'AzureTableSource', - 'CopySource', - 'LookupActivity', - 'LogStorageSettings', - 'DeleteActivity', - 'SqlServerStoredProcedureActivity', - 'CustomActivityReferenceObject', - 'CustomActivity', - 'SSISPropertyOverride', - 'SSISExecutionParameter', - 'SSISExecutionCredential', - 'SSISPackageLocation', + 'EloquaLinkedService', + 'EloquaObjectDataset', + 'EloquaSource', + 'EntityReference', + 'ExecutePipelineActivity', 'ExecuteSSISPackageActivity', - 'HDInsightSparkActivity', - 'HDInsightStreamingActivity', - 'HDInsightMapReduceActivity', - 'HDInsightPigActivity', - 'HDInsightHiveActivity', - 'RedirectIncompatibleRowSettings', - 'StagingSettings', - 'TabularTranslator', - 'CopyTranslator', - 'SalesforceSink', - 'DynamicsSink', - 'OdbcSink', - 'AzureSearchIndexSink', - 'AzureDataLakeStoreSink', - 'OracleSink', - 'PolybaseSettings', - 'SqlDWSink', - 'SqlSink', - 'DocumentDbCollectionSink', - 'FileSystemSink', - 'BlobSink', - 'AzureTableSink', - 'AzureQueueSink', - 'SapCloudForCustomerSink', - 'CopySink', - 'CopyActivity', 'ExecutionActivity', - 'AppendVariableActivity', - 'SetVariableActivity', + 'ExposureControlRequest', + 'ExposureControlResponse', + 'Expression', + 'Factory', + 'FactoryGitHubConfiguration', + 'FactoryIdentity', + 'FactoryRepoConfiguration', + 'FactoryRepoUpdate', + 'FactoryUpdateParameters', + 'FactoryVSTSConfiguration', + 'FileServerLinkedService', + 'FileServerLocation', + 'FileServerReadSettings', + 'FileServerWriteSettings', + 'FileShareDataset', + 'FileSystemSink', + 'FileSystemSource', 'FilterActivity', - 'UntilActivity', - 'WaitActivity', 'ForEachActivity', + 'FormatReadSettings', + 'FormatWriteSettings', + 'FtpReadSettings', + 'FtpServerLinkedService', + 'FtpServerLocation', + 'GetMetadataActivity', + 'GetSsisObjectMetadataRequest', + 'GitHubAccessTokenRequest', + 'GitHubAccessTokenResponse', + 'GoogleAdWordsLinkedService', + 'GoogleAdWordsObjectDataset', + 'GoogleAdWordsSource', + 'GoogleBigQueryLinkedService', + 'GoogleBigQueryObjectDataset', + 'GoogleBigQuerySource', + 'GreenplumLinkedService', + 'GreenplumSource', + 'GreenplumTableDataset', + 'HBaseLinkedService', + 'HBaseObjectDataset', + 'HBaseSource', + 'HdfsLinkedService', + 'HdfsLocation', + 'HdfsReadSettings', + 'HdfsSource', + 'HDInsightHiveActivity', + 'HDInsightLinkedService', + 'HDInsightMapReduceActivity', + 'HDInsightOnDemandLinkedService', + 'HDInsightPigActivity', + 'HDInsightSparkActivity', + 'HDInsightStreamingActivity', + 'HiveLinkedService', + 'HiveObjectDataset', + 'HiveSource', + 'HttpDataset', + 'HttpLinkedService', + 'HttpReadSettings', + 'HttpServerLocation', + 'HttpSource', + 'HubspotLinkedService', + 'HubspotObjectDataset', + 'HubspotSource', 'IfConditionActivity', - 'ExecutePipelineActivity', - 'ControlActivity', - 'LinkedIntegrationRuntime', - 'SelfHostedIntegrationRuntimeNode', - 'SelfHostedIntegrationRuntimeStatus', - 'ManagedIntegrationRuntimeOperationResult', - 'ManagedIntegrationRuntimeError', - 'ManagedIntegrationRuntimeNode', - 'ManagedIntegrationRuntimeStatus', - 'LinkedIntegrationRuntimeRbacAuthorization', - 'LinkedIntegrationRuntimeKeyAuthorization', - 'LinkedIntegrationRuntimeType', - 'SelfHostedIntegrationRuntime', + 'ImpalaLinkedService', + 'ImpalaObjectDataset', + 'ImpalaSource', + 'InformixLinkedService', + 'InformixSink', + 'InformixSource', + 'InformixTableDataset', + 'IntegrationRuntime', + 'IntegrationRuntimeAuthKeys', + 'IntegrationRuntimeComputeProperties', + 'IntegrationRuntimeConnectionInfo', 'IntegrationRuntimeCustomSetupScriptProperties', + 'IntegrationRuntimeDataProxyProperties', + 'IntegrationRuntimeMonitoringData', + 'IntegrationRuntimeNodeIpAddress', + 'IntegrationRuntimeNodeMonitoringData', + 'IntegrationRuntimeReference', + 'IntegrationRuntimeRegenerateKeyParameters', + 'IntegrationRuntimeResource', 'IntegrationRuntimeSsisCatalogInfo', 'IntegrationRuntimeSsisProperties', + 'IntegrationRuntimeStatus', + 'IntegrationRuntimeStatusListResponse', + 'IntegrationRuntimeStatusResponse', 'IntegrationRuntimeVNetProperties', - 'IntegrationRuntimeComputeProperties', + 'JiraLinkedService', + 'JiraObjectDataset', + 'JiraSource', + 'JsonFormat', + 'LinkedIntegrationRuntime', + 'LinkedIntegrationRuntimeKeyAuthorization', + 'LinkedIntegrationRuntimeRbacAuthorization', + 'LinkedIntegrationRuntimeRequest', + 'LinkedIntegrationRuntimeType', + 'LinkedService', + 'LinkedServiceReference', + 'LinkedServiceResource', + 'LogStorageSettings', + 'LookupActivity', + 'MagentoLinkedService', + 'MagentoObjectDataset', + 'MagentoSource', 'ManagedIntegrationRuntime', - 'IntegrationRuntimeNodeIpAddress', + 'ManagedIntegrationRuntimeError', + 'ManagedIntegrationRuntimeNode', + 'ManagedIntegrationRuntimeOperationResult', + 'ManagedIntegrationRuntimeStatus', + 'MariaDBLinkedService', + 'MariaDBSource', + 'MariaDBTableDataset', + 'MarketoLinkedService', + 'MarketoObjectDataset', + 'MarketoSource', + 'MicrosoftAccessLinkedService', + 'MicrosoftAccessSink', + 'MicrosoftAccessSource', + 'MicrosoftAccessTableDataset', + 'MongoDbCollectionDataset', + 'MongoDbCursorMethodsProperties', + 'MongoDbLinkedService', + 'MongoDbSource', + 'MongoDbV2CollectionDataset', + 'MongoDbV2LinkedService', + 'MongoDbV2Source', + 'MultiplePipelineTrigger', + 'MySqlLinkedService', + 'MySqlSource', + 'MySqlTableDataset', + 'NetezzaLinkedService', + 'NetezzaPartitionSettings', + 'NetezzaSource', + 'NetezzaTableDataset', + 'ODataLinkedService', + 'ODataResourceDataset', + 'ODataSource', + 'OdbcLinkedService', + 'OdbcSink', + 'OdbcSource', + 'OdbcTableDataset', + 'Office365Dataset', + 'Office365LinkedService', + 'Office365Source', + 'Operation', + 'OperationDisplay', + 'OperationLogSpecification', + 'OperationMetricAvailability', + 'OperationMetricDimension', + 'OperationMetricSpecification', + 'OperationServiceSpecification', + 'OracleLinkedService', + 'OraclePartitionSettings', + 'OracleServiceCloudLinkedService', + 'OracleServiceCloudObjectDataset', + 'OracleServiceCloudSource', + 'OracleSink', + 'OracleSource', + 'OracleTableDataset', + 'OrcFormat', + 'ParameterSpecification', + 'ParquetDataset', + 'ParquetFormat', + 'ParquetSink', + 'ParquetSource', + 'PaypalLinkedService', + 'PaypalObjectDataset', + 'PaypalSource', + 'PhoenixLinkedService', + 'PhoenixObjectDataset', + 'PhoenixSource', + 'PipelineFolder', + 'PipelineReference', + 'PipelineResource', + 'PipelineRun', + 'PipelineRunInvokedBy', + 'PipelineRunsQueryResponse', + 'PolybaseSettings', + 'PostgreSqlLinkedService', + 'PostgreSqlSource', + 'PostgreSqlTableDataset', + 'PrestoLinkedService', + 'PrestoObjectDataset', + 'PrestoSource', + 'QuickBooksLinkedService', + 'QuickBooksObjectDataset', + 'QuickBooksSource', + 'RecurrenceSchedule', + 'RecurrenceScheduleOccurrence', + 'RedirectIncompatibleRowSettings', + 'RedshiftUnloadSettings', + 'RelationalSource', + 'RelationalTableDataset', + 'RerunTriggerResource', + 'RerunTumblingWindowTrigger', + 'RerunTumblingWindowTriggerActionParameters', + 'Resource', + 'ResponsysLinkedService', + 'ResponsysObjectDataset', + 'ResponsysSource', + 'RestResourceDataset', + 'RestServiceLinkedService', + 'RestSource', + 'RetryPolicy', + 'RunFilterParameters', + 'RunQueryFilter', + 'RunQueryOrderBy', + 'SalesforceLinkedService', + 'SalesforceMarketingCloudLinkedService', + 'SalesforceMarketingCloudObjectDataset', + 'SalesforceMarketingCloudSource', + 'SalesforceObjectDataset', + 'SalesforceServiceCloudLinkedService', + 'SalesforceServiceCloudObjectDataset', + 'SalesforceServiceCloudSink', + 'SalesforceServiceCloudSource', + 'SalesforceSink', + 'SalesforceSource', + 'SapBwCubeDataset', + 'SapBWLinkedService', + 'SapBwSource', + 'SapCloudForCustomerLinkedService', + 'SapCloudForCustomerResourceDataset', + 'SapCloudForCustomerSink', + 'SapCloudForCustomerSource', + 'SapEccLinkedService', + 'SapEccResourceDataset', + 'SapEccSource', + 'SapHanaLinkedService', + 'SapHanaSource', + 'SapHanaTableDataset', + 'SapOpenHubLinkedService', + 'SapOpenHubSource', + 'SapOpenHubTableDataset', + 'SapTableLinkedService', + 'SapTablePartitionSettings', + 'SapTableResourceDataset', + 'SapTableSource', + 'ScheduleTrigger', + 'ScheduleTriggerRecurrence', + 'ScriptAction', + 'SecretBase', + 'SecureString', + 'SelfDependencyTumblingWindowTriggerReference', + 'SelfHostedIntegrationRuntime', + 'SelfHostedIntegrationRuntimeNode', + 'SelfHostedIntegrationRuntimeStatus', + 'ServiceNowLinkedService', + 'ServiceNowObjectDataset', + 'ServiceNowSource', + 'SetVariableActivity', + 'SftpLocation', + 'SftpReadSettings', + 'SftpServerLinkedService', + 'ShopifyLinkedService', + 'ShopifyObjectDataset', + 'ShopifySource', + 'SparkLinkedService', + 'SparkObjectDataset', + 'SparkSource', + 'SqlDWSink', + 'SqlDWSource', + 'SqlMISink', + 'SqlMISource', + 'SqlServerLinkedService', + 'SqlServerSink', + 'SqlServerSource', + 'SqlServerStoredProcedureActivity', + 'SqlServerTableDataset', + 'SqlSink', + 'SqlSource', + 'SquareLinkedService', + 'SquareObjectDataset', + 'SquareSource', + 'SSISAccessCredential', + 'SsisEnvironment', + 'SsisEnvironmentReference', + 'SSISExecutionCredential', + 'SSISExecutionParameter', + 'SsisFolder', + 'SSISLogLocation', 'SsisObjectMetadata', 'SsisObjectMetadataListResponse', - 'IntegrationRuntimeNodeMonitoringData', - 'IntegrationRuntimeMonitoringData', - 'IntegrationRuntimeAuthKeys', - 'IntegrationRuntimeRegenerateKeyParameters', - 'IntegrationRuntimeConnectionInfo', + 'SsisObjectMetadataStatusResponse', + 'SsisPackage', + 'SSISPackageLocation', + 'SsisParameter', + 'SsisProject', + 'SSISPropertyOverride', + 'SsisVariable', + 'StagingSettings', + 'StoredProcedureParameter', + 'StoreReadSettings', + 'StoreWriteSettings', + 'SubResource', + 'SybaseLinkedService', + 'SybaseSource', + 'SybaseTableDataset', + 'TeradataLinkedService', + 'TeradataPartitionSettings', + 'TeradataSource', + 'TeradataTableDataset', + 'TextFormat', + 'Trigger', + 'TriggerDependencyReference', + 'TriggerPipelineReference', + 'TriggerReference', + 'TriggerResource', + 'TriggerRun', + 'TriggerRunsQueryResponse', + 'TumblingWindowTrigger', + 'TumblingWindowTriggerDependencyReference', + 'UntilActivity', + 'UpdateIntegrationRuntimeNodeRequest', + 'UpdateIntegrationRuntimeRequest', + 'UserAccessPolicy', + 'UserProperty', + 'ValidationActivity', + 'VariableSpecification', + 'VerticaLinkedService', + 'VerticaSource', + 'VerticaTableDataset', + 'WaitActivity', + 'WebActivity', + 'WebActivityAuthentication', + 'WebAnonymousAuthentication', + 'WebBasicAuthentication', + 'WebClientCertificateAuthentication', + 'WebHookActivity', + 'WebLinkedService', + 'WebLinkedServiceTypeProperties', + 'WebSource', + 'WebTableDataset', + 'XeroLinkedService', + 'XeroObjectDataset', + 'XeroSource', + 'ZohoLinkedService', + 'ZohoObjectDataset', + 'ZohoSource', 'OperationPaged', 'FactoryPaged', 'IntegrationRuntimeResourcePaged', @@ -1199,6 +1638,7 @@ 'DayOfWeek', 'DaysOfWeek', 'RecurrenceFrequency', + 'GoogleAdWordsAuthenticationType', 'SparkServerType', 'SparkThriftTransportProtocol', 'SparkAuthenticationType', @@ -1215,29 +1655,38 @@ 'SftpAuthenticationType', 'FtpAuthenticationType', 'HttpAuthenticationType', + 'RestServiceAuthenticationType', 'MongoDbAuthenticationType', 'ODataAuthenticationType', + 'ODataAadServicePrincipalCredentialType', 'TeradataAuthenticationType', 'Db2AuthenticationType', 'SybaseAuthenticationType', - 'DatasetCompressionLevel', - 'JsonFormatFilePattern', + 'DynamicsDeploymentType', + 'DynamicsAuthenticationType', + 'AvroCompressionCodec', 'AzureFunctionActivityMethod', 'WebActivityMethod', + 'NetezzaPartitionOption', 'CassandraSourceReadConsistencyLevels', + 'TeradataPartitionOption', + 'OraclePartitionOption', 'StoredProcedureParameterType', + 'SapTablePartitionOption', 'SalesforceSourceReadBehavior', + 'SsisPackageLocationType', 'HDInsightActivityDebugInfoOption', 'SalesforceSinkWriteBehavior', 'AzureSearchIndexWriteBehaviorType', - 'CopyBehaviorType', 'PolybaseSettingsRejectType', 'SapCloudForCustomerSinkWriteBehavior', + 'WebHookActivityMethod', 'IntegrationRuntimeType', 'SelfHostedIntegrationRuntimeNodeStatus', 'IntegrationRuntimeUpdateResult', 'IntegrationRuntimeInternalChannelEncryptionMode', 'ManagedIntegrationRuntimeNodeStatus', + 'IntegrationRuntimeEntityReferenceType', 'IntegrationRuntimeSsisCatalogPricingTier', 'IntegrationRuntimeLicenseType', 'IntegrationRuntimeEdition', diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/_data_factory_management_client_enums.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/_data_factory_management_client_enums.py new file mode 100644 index 000000000000..45448073f831 --- /dev/null +++ b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/_data_factory_management_client_enums.py @@ -0,0 +1,544 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class IntegrationRuntimeState(str, Enum): + + initial = "Initial" + stopped = "Stopped" + started = "Started" + starting = "Starting" + stopping = "Stopping" + need_registration = "NeedRegistration" + online = "Online" + limited = "Limited" + offline = "Offline" + access_denied = "AccessDenied" + + +class IntegrationRuntimeAutoUpdate(str, Enum): + + on = "On" + off = "Off" + + +class ParameterType(str, Enum): + + object_enum = "Object" + string = "String" + int_enum = "Int" + float_enum = "Float" + bool_enum = "Bool" + array = "Array" + secure_string = "SecureString" + + +class DependencyCondition(str, Enum): + + succeeded = "Succeeded" + failed = "Failed" + skipped = "Skipped" + completed = "Completed" + + +class VariableType(str, Enum): + + string = "String" + bool_enum = "Bool" + array = "Array" + + +class TriggerRuntimeState(str, Enum): + + started = "Started" + stopped = "Stopped" + disabled = "Disabled" + + +class RunQueryFilterOperand(str, Enum): + + pipeline_name = "PipelineName" + status = "Status" + run_start = "RunStart" + run_end = "RunEnd" + activity_name = "ActivityName" + activity_run_start = "ActivityRunStart" + activity_run_end = "ActivityRunEnd" + activity_type = "ActivityType" + trigger_name = "TriggerName" + trigger_run_timestamp = "TriggerRunTimestamp" + run_group_id = "RunGroupId" + latest_only = "LatestOnly" + + +class RunQueryFilterOperator(str, Enum): + + equals = "Equals" + not_equals = "NotEquals" + in_enum = "In" + not_in = "NotIn" + + +class RunQueryOrderByField(str, Enum): + + run_start = "RunStart" + run_end = "RunEnd" + pipeline_name = "PipelineName" + status = "Status" + activity_name = "ActivityName" + activity_run_start = "ActivityRunStart" + activity_run_end = "ActivityRunEnd" + trigger_name = "TriggerName" + trigger_run_timestamp = "TriggerRunTimestamp" + + +class RunQueryOrder(str, Enum): + + asc = "ASC" + desc = "DESC" + + +class TriggerRunStatus(str, Enum): + + succeeded = "Succeeded" + failed = "Failed" + inprogress = "Inprogress" + + +class TumblingWindowFrequency(str, Enum): + + minute = "Minute" + hour = "Hour" + + +class BlobEventTypes(str, Enum): + + microsoft_storage_blob_created = "Microsoft.Storage.BlobCreated" + microsoft_storage_blob_deleted = "Microsoft.Storage.BlobDeleted" + + +class DayOfWeek(str, Enum): + + sunday = "Sunday" + monday = "Monday" + tuesday = "Tuesday" + wednesday = "Wednesday" + thursday = "Thursday" + friday = "Friday" + saturday = "Saturday" + + +class DaysOfWeek(str, Enum): + + sunday = "Sunday" + monday = "Monday" + tuesday = "Tuesday" + wednesday = "Wednesday" + thursday = "Thursday" + friday = "Friday" + saturday = "Saturday" + + +class RecurrenceFrequency(str, Enum): + + not_specified = "NotSpecified" + minute = "Minute" + hour = "Hour" + day = "Day" + week = "Week" + month = "Month" + year = "Year" + + +class GoogleAdWordsAuthenticationType(str, Enum): + + service_authentication = "ServiceAuthentication" + user_authentication = "UserAuthentication" + + +class SparkServerType(str, Enum): + + shark_server = "SharkServer" + shark_server2 = "SharkServer2" + spark_thrift_server = "SparkThriftServer" + + +class SparkThriftTransportProtocol(str, Enum): + + binary = "Binary" + sasl = "SASL" + http = "HTTP " + + +class SparkAuthenticationType(str, Enum): + + anonymous = "Anonymous" + username = "Username" + username_and_password = "UsernameAndPassword" + windows_azure_hd_insight_service = "WindowsAzureHDInsightService" + + +class ServiceNowAuthenticationType(str, Enum): + + basic = "Basic" + oauth2 = "OAuth2" + + +class PrestoAuthenticationType(str, Enum): + + anonymous = "Anonymous" + ldap = "LDAP" + + +class PhoenixAuthenticationType(str, Enum): + + anonymous = "Anonymous" + username_and_password = "UsernameAndPassword" + windows_azure_hd_insight_service = "WindowsAzureHDInsightService" + + +class ImpalaAuthenticationType(str, Enum): + + anonymous = "Anonymous" + sasl_username = "SASLUsername" + username_and_password = "UsernameAndPassword" + + +class HiveServerType(str, Enum): + + hive_server1 = "HiveServer1" + hive_server2 = "HiveServer2" + hive_thrift_server = "HiveThriftServer" + + +class HiveThriftTransportProtocol(str, Enum): + + binary = "Binary" + sasl = "SASL" + http = "HTTP " + + +class HiveAuthenticationType(str, Enum): + + anonymous = "Anonymous" + username = "Username" + username_and_password = "UsernameAndPassword" + windows_azure_hd_insight_service = "WindowsAzureHDInsightService" + + +class HBaseAuthenticationType(str, Enum): + + anonymous = "Anonymous" + basic = "Basic" + + +class GoogleBigQueryAuthenticationType(str, Enum): + + service_authentication = "ServiceAuthentication" + user_authentication = "UserAuthentication" + + +class SapHanaAuthenticationType(str, Enum): + + basic = "Basic" + windows = "Windows" + + +class SftpAuthenticationType(str, Enum): + + basic = "Basic" + ssh_public_key = "SshPublicKey" + + +class FtpAuthenticationType(str, Enum): + + basic = "Basic" + anonymous = "Anonymous" + + +class HttpAuthenticationType(str, Enum): + + basic = "Basic" + anonymous = "Anonymous" + digest = "Digest" + windows = "Windows" + client_certificate = "ClientCertificate" + + +class RestServiceAuthenticationType(str, Enum): + + anonymous = "Anonymous" + basic = "Basic" + aad_service_principal = "AadServicePrincipal" + managed_service_identity = "ManagedServiceIdentity" + + +class MongoDbAuthenticationType(str, Enum): + + basic = "Basic" + anonymous = "Anonymous" + + +class ODataAuthenticationType(str, Enum): + + basic = "Basic" + anonymous = "Anonymous" + windows = "Windows" + aad_service_principal = "AadServicePrincipal" + managed_service_identity = "ManagedServiceIdentity" + + +class ODataAadServicePrincipalCredentialType(str, Enum): + + service_principal_key = "ServicePrincipalKey" + service_principal_cert = "ServicePrincipalCert" + + +class TeradataAuthenticationType(str, Enum): + + basic = "Basic" + windows = "Windows" + + +class Db2AuthenticationType(str, Enum): + + basic = "Basic" + + +class SybaseAuthenticationType(str, Enum): + + basic = "Basic" + windows = "Windows" + + +class DynamicsDeploymentType(str, Enum): + + online = "Online" + on_premises_with_ifd = "OnPremisesWithIfd" + + +class DynamicsAuthenticationType(str, Enum): + + office365 = "Office365" + ifd = "Ifd" + + +class AvroCompressionCodec(str, Enum): + + none = "none" + deflate = "deflate" + snappy = "snappy" + xz = "xz" + bzip2 = "bzip2" + + +class AzureFunctionActivityMethod(str, Enum): + + get = "GET" + post = "POST" + put = "PUT" + delete = "DELETE" + options = "OPTIONS" + head = "HEAD" + trace = "TRACE" + + +class WebActivityMethod(str, Enum): + + get = "GET" + post = "POST" + put = "PUT" + delete = "DELETE" + + +class NetezzaPartitionOption(str, Enum): + + none = "None" + data_slice = "DataSlice" + dynamic_range = "DynamicRange" + + +class CassandraSourceReadConsistencyLevels(str, Enum): + + all = "ALL" + each_quorum = "EACH_QUORUM" + quorum = "QUORUM" + local_quorum = "LOCAL_QUORUM" + one = "ONE" + two = "TWO" + three = "THREE" + local_one = "LOCAL_ONE" + serial = "SERIAL" + local_serial = "LOCAL_SERIAL" + + +class TeradataPartitionOption(str, Enum): + + none = "None" + hash = "Hash" + dynamic_range = "DynamicRange" + + +class OraclePartitionOption(str, Enum): + + none = "None" + physical_partitions_of_table = "PhysicalPartitionsOfTable" + dynamic_range = "DynamicRange" + + +class StoredProcedureParameterType(str, Enum): + + string = "String" + int_enum = "Int" + int64 = "Int64" + decimal_enum = "Decimal" + guid = "Guid" + boolean = "Boolean" + date_enum = "Date" + + +class SapTablePartitionOption(str, Enum): + + none = "None" + partition_on_int = "PartitionOnInt" + partition_on_calendar_year = "PartitionOnCalendarYear" + partition_on_calendar_month = "PartitionOnCalendarMonth" + partition_on_calendar_date = "PartitionOnCalendarDate" + partition_on_time = "PartitionOnTime" + + +class SalesforceSourceReadBehavior(str, Enum): + + query = "Query" + query_all = "QueryAll" + + +class SsisPackageLocationType(str, Enum): + + ssisdb = "SSISDB" + file = "File" + + +class HDInsightActivityDebugInfoOption(str, Enum): + + none = "None" + always = "Always" + failure = "Failure" + + +class SalesforceSinkWriteBehavior(str, Enum): + + insert = "Insert" + upsert = "Upsert" + + +class AzureSearchIndexWriteBehaviorType(str, Enum): + + merge = "Merge" + upload = "Upload" + + +class PolybaseSettingsRejectType(str, Enum): + + value = "value" + percentage = "percentage" + + +class SapCloudForCustomerSinkWriteBehavior(str, Enum): + + insert = "Insert" + update = "Update" + + +class WebHookActivityMethod(str, Enum): + + post = "POST" + + +class IntegrationRuntimeType(str, Enum): + + managed = "Managed" + self_hosted = "SelfHosted" + + +class SelfHostedIntegrationRuntimeNodeStatus(str, Enum): + + need_registration = "NeedRegistration" + online = "Online" + limited = "Limited" + offline = "Offline" + upgrading = "Upgrading" + initializing = "Initializing" + initialize_failed = "InitializeFailed" + + +class IntegrationRuntimeUpdateResult(str, Enum): + + none = "None" + succeed = "Succeed" + fail = "Fail" + + +class IntegrationRuntimeInternalChannelEncryptionMode(str, Enum): + + not_set = "NotSet" + ssl_encrypted = "SslEncrypted" + not_encrypted = "NotEncrypted" + + +class ManagedIntegrationRuntimeNodeStatus(str, Enum): + + starting = "Starting" + available = "Available" + recycling = "Recycling" + unavailable = "Unavailable" + + +class IntegrationRuntimeEntityReferenceType(str, Enum): + + integration_runtime_reference = "IntegrationRuntimeReference" + linked_service_reference = "LinkedServiceReference" + + +class IntegrationRuntimeSsisCatalogPricingTier(str, Enum): + + basic = "Basic" + standard = "Standard" + premium = "Premium" + premium_rs = "PremiumRS" + + +class IntegrationRuntimeLicenseType(str, Enum): + + base_price = "BasePrice" + license_included = "LicenseIncluded" + + +class IntegrationRuntimeEdition(str, Enum): + + standard = "Standard" + enterprise = "Enterprise" + + +class SsisObjectMetadataType(str, Enum): + + folder = "Folder" + project = "Project" + package = "Package" + environment = "Environment" + + +class IntegrationRuntimeAuthKeyName(str, Enum): + + auth_key1 = "authKey1" + auth_key2 = "authKey2" diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/_models.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/_models.py new file mode 100644 index 000000000000..1b3d84183142 --- /dev/null +++ b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/_models.py @@ -0,0 +1,28514 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AccessPolicyResponse(Model): + """Get Data Plane read only token response definition. + + :param policy: The user access policy. + :type policy: ~azure.mgmt.datafactory.models.UserAccessPolicy + :param access_token: Data Plane read only access token. + :type access_token: str + :param data_plane_url: Data Plane service base URL. + :type data_plane_url: str + """ + + _attribute_map = { + 'policy': {'key': 'policy', 'type': 'UserAccessPolicy'}, + 'access_token': {'key': 'accessToken', 'type': 'str'}, + 'data_plane_url': {'key': 'dataPlaneUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AccessPolicyResponse, self).__init__(**kwargs) + self.policy = kwargs.get('policy', None) + self.access_token = kwargs.get('access_token', None) + self.data_plane_url = kwargs.get('data_plane_url', None) + + +class Activity(Model): + """A pipeline activity. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ExecutionActivity, ControlActivity + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'Execution': 'ExecutionActivity', 'Container': 'ControlActivity'} + } + + def __init__(self, **kwargs): + super(Activity, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.depends_on = kwargs.get('depends_on', None) + self.user_properties = kwargs.get('user_properties', None) + self.type = None + + +class ActivityDependency(Model): + """Activity dependency information. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param activity: Required. Activity name. + :type activity: str + :param dependency_conditions: Required. Match-Condition for the + dependency. + :type dependency_conditions: list[str or + ~azure.mgmt.datafactory.models.DependencyCondition] + """ + + _validation = { + 'activity': {'required': True}, + 'dependency_conditions': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'activity': {'key': 'activity', 'type': 'str'}, + 'dependency_conditions': {'key': 'dependencyConditions', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ActivityDependency, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.activity = kwargs.get('activity', None) + self.dependency_conditions = kwargs.get('dependency_conditions', None) + + +class ActivityPolicy(Model): + """Execution policy for an activity. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param timeout: Specifies the timeout for the activity to run. The default + timeout is 7 days. Type: string (or Expression with resultType string), + pattern: ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type timeout: object + :param retry: Maximum ordinary retry attempts. Default is 0. Type: integer + (or Expression with resultType integer), minimum: 0. + :type retry: object + :param retry_interval_in_seconds: Interval between each retry attempt (in + seconds). The default is 30 sec. + :type retry_interval_in_seconds: int + :param secure_input: When set to true, Input from activity is considered + as secure and will not be logged to monitoring. + :type secure_input: bool + :param secure_output: When set to true, Output from activity is considered + as secure and will not be logged to monitoring. + :type secure_output: bool + """ + + _validation = { + 'retry_interval_in_seconds': {'maximum': 86400, 'minimum': 30}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'timeout': {'key': 'timeout', 'type': 'object'}, + 'retry': {'key': 'retry', 'type': 'object'}, + 'retry_interval_in_seconds': {'key': 'retryIntervalInSeconds', 'type': 'int'}, + 'secure_input': {'key': 'secureInput', 'type': 'bool'}, + 'secure_output': {'key': 'secureOutput', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ActivityPolicy, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.timeout = kwargs.get('timeout', None) + self.retry = kwargs.get('retry', None) + self.retry_interval_in_seconds = kwargs.get('retry_interval_in_seconds', None) + self.secure_input = kwargs.get('secure_input', None) + self.secure_output = kwargs.get('secure_output', None) + + +class ActivityRun(Model): + """Information about an activity run in a pipeline. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar pipeline_name: The name of the pipeline. + :vartype pipeline_name: str + :ivar pipeline_run_id: The id of the pipeline run. + :vartype pipeline_run_id: str + :ivar activity_name: The name of the activity. + :vartype activity_name: str + :ivar activity_type: The type of the activity. + :vartype activity_type: str + :ivar activity_run_id: The id of the activity run. + :vartype activity_run_id: str + :ivar linked_service_name: The name of the compute linked service. + :vartype linked_service_name: str + :ivar status: The status of the activity run. + :vartype status: str + :ivar activity_run_start: The start time of the activity run in 'ISO 8601' + format. + :vartype activity_run_start: datetime + :ivar activity_run_end: The end time of the activity run in 'ISO 8601' + format. + :vartype activity_run_end: datetime + :ivar duration_in_ms: The duration of the activity run. + :vartype duration_in_ms: int + :ivar input: The input for the activity. + :vartype input: object + :ivar output: The output for the activity. + :vartype output: object + :ivar error: The error if any from the activity run. + :vartype error: object + """ + + _validation = { + 'pipeline_name': {'readonly': True}, + 'pipeline_run_id': {'readonly': True}, + 'activity_name': {'readonly': True}, + 'activity_type': {'readonly': True}, + 'activity_run_id': {'readonly': True}, + 'linked_service_name': {'readonly': True}, + 'status': {'readonly': True}, + 'activity_run_start': {'readonly': True}, + 'activity_run_end': {'readonly': True}, + 'duration_in_ms': {'readonly': True}, + 'input': {'readonly': True}, + 'output': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'pipeline_name': {'key': 'pipelineName', 'type': 'str'}, + 'pipeline_run_id': {'key': 'pipelineRunId', 'type': 'str'}, + 'activity_name': {'key': 'activityName', 'type': 'str'}, + 'activity_type': {'key': 'activityType', 'type': 'str'}, + 'activity_run_id': {'key': 'activityRunId', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'activity_run_start': {'key': 'activityRunStart', 'type': 'iso-8601'}, + 'activity_run_end': {'key': 'activityRunEnd', 'type': 'iso-8601'}, + 'duration_in_ms': {'key': 'durationInMs', 'type': 'int'}, + 'input': {'key': 'input', 'type': 'object'}, + 'output': {'key': 'output', 'type': 'object'}, + 'error': {'key': 'error', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ActivityRun, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.pipeline_name = None + self.pipeline_run_id = None + self.activity_name = None + self.activity_type = None + self.activity_run_id = None + self.linked_service_name = None + self.status = None + self.activity_run_start = None + self.activity_run_end = None + self.duration_in_ms = None + self.input = None + self.output = None + self.error = None + + +class ActivityRunsQueryResponse(Model): + """A list activity runs. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of activity runs. + :type value: list[~azure.mgmt.datafactory.models.ActivityRun] + :param continuation_token: The continuation token for getting the next + page of results, if any remaining results exist, null otherwise. + :type continuation_token: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ActivityRun]'}, + 'continuation_token': {'key': 'continuationToken', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ActivityRunsQueryResponse, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.continuation_token = kwargs.get('continuation_token', None) + + +class LinkedService(Model): + """The Azure Data Factory nested object which contains the information and + credential which can be used to connect with related store or compute + resource. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureFunctionLinkedService, + AzureDataExplorerLinkedService, SapTableLinkedService, + GoogleAdWordsLinkedService, OracleServiceCloudLinkedService, + DynamicsAXLinkedService, ResponsysLinkedService, + AzureDatabricksLinkedService, AzureDataLakeAnalyticsLinkedService, + HDInsightOnDemandLinkedService, SalesforceMarketingCloudLinkedService, + NetezzaLinkedService, VerticaLinkedService, ZohoLinkedService, + XeroLinkedService, SquareLinkedService, SparkLinkedService, + ShopifyLinkedService, ServiceNowLinkedService, QuickBooksLinkedService, + PrestoLinkedService, PhoenixLinkedService, PaypalLinkedService, + MarketoLinkedService, AzureMariaDBLinkedService, MariaDBLinkedService, + MagentoLinkedService, JiraLinkedService, ImpalaLinkedService, + HubspotLinkedService, HiveLinkedService, HBaseLinkedService, + GreenplumLinkedService, GoogleBigQueryLinkedService, EloquaLinkedService, + DrillLinkedService, CouchbaseLinkedService, ConcurLinkedService, + AzurePostgreSqlLinkedService, AmazonMWSLinkedService, SapHanaLinkedService, + SapBWLinkedService, SftpServerLinkedService, FtpServerLinkedService, + HttpLinkedService, AzureSearchLinkedService, CustomDataSourceLinkedService, + AmazonRedshiftLinkedService, AmazonS3LinkedService, + RestServiceLinkedService, SapOpenHubLinkedService, SapEccLinkedService, + SapCloudForCustomerLinkedService, SalesforceServiceCloudLinkedService, + SalesforceLinkedService, Office365LinkedService, AzureBlobFSLinkedService, + AzureDataLakeStoreLinkedService, CosmosDbMongoDbApiLinkedService, + MongoDbV2LinkedService, MongoDbLinkedService, CassandraLinkedService, + WebLinkedService, ODataLinkedService, HdfsLinkedService, + MicrosoftAccessLinkedService, InformixLinkedService, OdbcLinkedService, + AzureMLLinkedService, TeradataLinkedService, Db2LinkedService, + SybaseLinkedService, PostgreSqlLinkedService, MySqlLinkedService, + AzureMySqlLinkedService, OracleLinkedService, FileServerLinkedService, + HDInsightLinkedService, CommonDataServiceForAppsLinkedService, + DynamicsCrmLinkedService, DynamicsLinkedService, CosmosDbLinkedService, + AzureKeyVaultLinkedService, AzureBatchLinkedService, + AzureSqlMILinkedService, AzureSqlDatabaseLinkedService, + SqlServerLinkedService, AzureSqlDWLinkedService, + AzureTableStorageLinkedService, AzureBlobStorageLinkedService, + AzureStorageLinkedService + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'AzureFunction': 'AzureFunctionLinkedService', 'AzureDataExplorer': 'AzureDataExplorerLinkedService', 'SapTable': 'SapTableLinkedService', 'GoogleAdWords': 'GoogleAdWordsLinkedService', 'OracleServiceCloud': 'OracleServiceCloudLinkedService', 'DynamicsAX': 'DynamicsAXLinkedService', 'Responsys': 'ResponsysLinkedService', 'AzureDatabricks': 'AzureDatabricksLinkedService', 'AzureDataLakeAnalytics': 'AzureDataLakeAnalyticsLinkedService', 'HDInsightOnDemand': 'HDInsightOnDemandLinkedService', 'SalesforceMarketingCloud': 'SalesforceMarketingCloudLinkedService', 'Netezza': 'NetezzaLinkedService', 'Vertica': 'VerticaLinkedService', 'Zoho': 'ZohoLinkedService', 'Xero': 'XeroLinkedService', 'Square': 'SquareLinkedService', 'Spark': 'SparkLinkedService', 'Shopify': 'ShopifyLinkedService', 'ServiceNow': 'ServiceNowLinkedService', 'QuickBooks': 'QuickBooksLinkedService', 'Presto': 'PrestoLinkedService', 'Phoenix': 'PhoenixLinkedService', 'Paypal': 'PaypalLinkedService', 'Marketo': 'MarketoLinkedService', 'AzureMariaDB': 'AzureMariaDBLinkedService', 'MariaDB': 'MariaDBLinkedService', 'Magento': 'MagentoLinkedService', 'Jira': 'JiraLinkedService', 'Impala': 'ImpalaLinkedService', 'Hubspot': 'HubspotLinkedService', 'Hive': 'HiveLinkedService', 'HBase': 'HBaseLinkedService', 'Greenplum': 'GreenplumLinkedService', 'GoogleBigQuery': 'GoogleBigQueryLinkedService', 'Eloqua': 'EloquaLinkedService', 'Drill': 'DrillLinkedService', 'Couchbase': 'CouchbaseLinkedService', 'Concur': 'ConcurLinkedService', 'AzurePostgreSql': 'AzurePostgreSqlLinkedService', 'AmazonMWS': 'AmazonMWSLinkedService', 'SapHana': 'SapHanaLinkedService', 'SapBW': 'SapBWLinkedService', 'Sftp': 'SftpServerLinkedService', 'FtpServer': 'FtpServerLinkedService', 'HttpServer': 'HttpLinkedService', 'AzureSearch': 'AzureSearchLinkedService', 'CustomDataSource': 'CustomDataSourceLinkedService', 'AmazonRedshift': 'AmazonRedshiftLinkedService', 'AmazonS3': 'AmazonS3LinkedService', 'RestService': 'RestServiceLinkedService', 'SapOpenHub': 'SapOpenHubLinkedService', 'SapEcc': 'SapEccLinkedService', 'SapCloudForCustomer': 'SapCloudForCustomerLinkedService', 'SalesforceServiceCloud': 'SalesforceServiceCloudLinkedService', 'Salesforce': 'SalesforceLinkedService', 'Office365': 'Office365LinkedService', 'AzureBlobFS': 'AzureBlobFSLinkedService', 'AzureDataLakeStore': 'AzureDataLakeStoreLinkedService', 'CosmosDbMongoDbApi': 'CosmosDbMongoDbApiLinkedService', 'MongoDbV2': 'MongoDbV2LinkedService', 'MongoDb': 'MongoDbLinkedService', 'Cassandra': 'CassandraLinkedService', 'Web': 'WebLinkedService', 'OData': 'ODataLinkedService', 'Hdfs': 'HdfsLinkedService', 'MicrosoftAccess': 'MicrosoftAccessLinkedService', 'Informix': 'InformixLinkedService', 'Odbc': 'OdbcLinkedService', 'AzureML': 'AzureMLLinkedService', 'Teradata': 'TeradataLinkedService', 'Db2': 'Db2LinkedService', 'Sybase': 'SybaseLinkedService', 'PostgreSql': 'PostgreSqlLinkedService', 'MySql': 'MySqlLinkedService', 'AzureMySql': 'AzureMySqlLinkedService', 'Oracle': 'OracleLinkedService', 'FileServer': 'FileServerLinkedService', 'HDInsight': 'HDInsightLinkedService', 'CommonDataServiceForApps': 'CommonDataServiceForAppsLinkedService', 'DynamicsCrm': 'DynamicsCrmLinkedService', 'Dynamics': 'DynamicsLinkedService', 'CosmosDb': 'CosmosDbLinkedService', 'AzureKeyVault': 'AzureKeyVaultLinkedService', 'AzureBatch': 'AzureBatchLinkedService', 'AzureSqlMI': 'AzureSqlMILinkedService', 'AzureSqlDatabase': 'AzureSqlDatabaseLinkedService', 'SqlServer': 'SqlServerLinkedService', 'AzureSqlDW': 'AzureSqlDWLinkedService', 'AzureTableStorage': 'AzureTableStorageLinkedService', 'AzureBlobStorage': 'AzureBlobStorageLinkedService', 'AzureStorage': 'AzureStorageLinkedService'} + } + + def __init__(self, **kwargs): + super(LinkedService, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.connect_via = kwargs.get('connect_via', None) + self.description = kwargs.get('description', None) + self.parameters = kwargs.get('parameters', None) + self.annotations = kwargs.get('annotations', None) + self.type = None + + +class AmazonMWSLinkedService(LinkedService): + """Amazon Marketplace Web Service linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param endpoint: Required. The endpoint of the Amazon MWS server, (i.e. + mws.amazonservices.com) + :type endpoint: object + :param marketplace_id: Required. The Amazon Marketplace ID you want to + retrieve data from. To retrieve data from multiple Marketplace IDs, + separate them with a comma (,). (i.e. A2EUQ1WTGCTBG2) + :type marketplace_id: object + :param seller_id: Required. The Amazon seller ID. + :type seller_id: object + :param mws_auth_token: The Amazon MWS authentication token. + :type mws_auth_token: ~azure.mgmt.datafactory.models.SecretBase + :param access_key_id: Required. The access key id used to access data. + :type access_key_id: object + :param secret_key: The secret key used to access data. + :type secret_key: ~azure.mgmt.datafactory.models.SecretBase + :param use_encrypted_endpoints: Specifies whether the data source + endpoints are encrypted using HTTPS. The default value is true. + :type use_encrypted_endpoints: object + :param use_host_verification: Specifies whether to require the host name + in the server's certificate to match the host name of the server when + connecting over SSL. The default value is true. + :type use_host_verification: object + :param use_peer_verification: Specifies whether to verify the identity of + the server when connecting over SSL. The default value is true. + :type use_peer_verification: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'endpoint': {'required': True}, + 'marketplace_id': {'required': True}, + 'seller_id': {'required': True}, + 'access_key_id': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'endpoint': {'key': 'typeProperties.endpoint', 'type': 'object'}, + 'marketplace_id': {'key': 'typeProperties.marketplaceID', 'type': 'object'}, + 'seller_id': {'key': 'typeProperties.sellerID', 'type': 'object'}, + 'mws_auth_token': {'key': 'typeProperties.mwsAuthToken', 'type': 'SecretBase'}, + 'access_key_id': {'key': 'typeProperties.accessKeyId', 'type': 'object'}, + 'secret_key': {'key': 'typeProperties.secretKey', 'type': 'SecretBase'}, + 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, + 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, + 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AmazonMWSLinkedService, self).__init__(**kwargs) + self.endpoint = kwargs.get('endpoint', None) + self.marketplace_id = kwargs.get('marketplace_id', None) + self.seller_id = kwargs.get('seller_id', None) + self.mws_auth_token = kwargs.get('mws_auth_token', None) + self.access_key_id = kwargs.get('access_key_id', None) + self.secret_key = kwargs.get('secret_key', None) + self.use_encrypted_endpoints = kwargs.get('use_encrypted_endpoints', None) + self.use_host_verification = kwargs.get('use_host_verification', None) + self.use_peer_verification = kwargs.get('use_peer_verification', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'AmazonMWS' + + +class Dataset(Model): + """The Azure Data Factory nested object which identifies data within different + data stores, such as tables, files, folders, and documents. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: GoogleAdWordsObjectDataset, AzureDataExplorerTableDataset, + OracleServiceCloudObjectDataset, DynamicsAXResourceDataset, + ResponsysObjectDataset, SalesforceMarketingCloudObjectDataset, + VerticaTableDataset, NetezzaTableDataset, ZohoObjectDataset, + XeroObjectDataset, SquareObjectDataset, SparkObjectDataset, + ShopifyObjectDataset, ServiceNowObjectDataset, QuickBooksObjectDataset, + PrestoObjectDataset, PhoenixObjectDataset, PaypalObjectDataset, + MarketoObjectDataset, AzureMariaDBTableDataset, MariaDBTableDataset, + MagentoObjectDataset, JiraObjectDataset, ImpalaObjectDataset, + HubspotObjectDataset, HiveObjectDataset, HBaseObjectDataset, + GreenplumTableDataset, GoogleBigQueryObjectDataset, EloquaObjectDataset, + DrillTableDataset, CouchbaseTableDataset, ConcurObjectDataset, + AzurePostgreSqlTableDataset, AmazonMWSObjectDataset, HttpDataset, + AzureSearchIndexDataset, WebTableDataset, SapTableResourceDataset, + RestResourceDataset, SqlServerTableDataset, SapOpenHubTableDataset, + SapHanaTableDataset, SapEccResourceDataset, + SapCloudForCustomerResourceDataset, SapBwCubeDataset, SybaseTableDataset, + SalesforceServiceCloudObjectDataset, SalesforceObjectDataset, + MicrosoftAccessTableDataset, PostgreSqlTableDataset, MySqlTableDataset, + OdbcTableDataset, InformixTableDataset, RelationalTableDataset, + AzureMySqlTableDataset, TeradataTableDataset, OracleTableDataset, + ODataResourceDataset, CosmosDbMongoDbApiCollectionDataset, + MongoDbV2CollectionDataset, MongoDbCollectionDataset, FileShareDataset, + Office365Dataset, AzureBlobFSDataset, AzureDataLakeStoreDataset, + CommonDataServiceForAppsEntityDataset, DynamicsCrmEntityDataset, + DynamicsEntityDataset, DocumentDbCollectionDataset, CustomDataset, + CassandraTableDataset, AzureSqlDWTableDataset, AzureSqlMITableDataset, + AzureSqlTableDataset, AzureTableDataset, AzureBlobDataset, BinaryDataset, + DelimitedTextDataset, ParquetDataset, AvroDataset, AmazonS3Dataset + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'GoogleAdWordsObject': 'GoogleAdWordsObjectDataset', 'AzureDataExplorerTable': 'AzureDataExplorerTableDataset', 'OracleServiceCloudObject': 'OracleServiceCloudObjectDataset', 'DynamicsAXResource': 'DynamicsAXResourceDataset', 'ResponsysObject': 'ResponsysObjectDataset', 'SalesforceMarketingCloudObject': 'SalesforceMarketingCloudObjectDataset', 'VerticaTable': 'VerticaTableDataset', 'NetezzaTable': 'NetezzaTableDataset', 'ZohoObject': 'ZohoObjectDataset', 'XeroObject': 'XeroObjectDataset', 'SquareObject': 'SquareObjectDataset', 'SparkObject': 'SparkObjectDataset', 'ShopifyObject': 'ShopifyObjectDataset', 'ServiceNowObject': 'ServiceNowObjectDataset', 'QuickBooksObject': 'QuickBooksObjectDataset', 'PrestoObject': 'PrestoObjectDataset', 'PhoenixObject': 'PhoenixObjectDataset', 'PaypalObject': 'PaypalObjectDataset', 'MarketoObject': 'MarketoObjectDataset', 'AzureMariaDBTable': 'AzureMariaDBTableDataset', 'MariaDBTable': 'MariaDBTableDataset', 'MagentoObject': 'MagentoObjectDataset', 'JiraObject': 'JiraObjectDataset', 'ImpalaObject': 'ImpalaObjectDataset', 'HubspotObject': 'HubspotObjectDataset', 'HiveObject': 'HiveObjectDataset', 'HBaseObject': 'HBaseObjectDataset', 'GreenplumTable': 'GreenplumTableDataset', 'GoogleBigQueryObject': 'GoogleBigQueryObjectDataset', 'EloquaObject': 'EloquaObjectDataset', 'DrillTable': 'DrillTableDataset', 'CouchbaseTable': 'CouchbaseTableDataset', 'ConcurObject': 'ConcurObjectDataset', 'AzurePostgreSqlTable': 'AzurePostgreSqlTableDataset', 'AmazonMWSObject': 'AmazonMWSObjectDataset', 'HttpFile': 'HttpDataset', 'AzureSearchIndex': 'AzureSearchIndexDataset', 'WebTable': 'WebTableDataset', 'SapTableResource': 'SapTableResourceDataset', 'RestResource': 'RestResourceDataset', 'SqlServerTable': 'SqlServerTableDataset', 'SapOpenHubTable': 'SapOpenHubTableDataset', 'SapHanaTable': 'SapHanaTableDataset', 'SapEccResource': 'SapEccResourceDataset', 'SapCloudForCustomerResource': 'SapCloudForCustomerResourceDataset', 'SapBwCube': 'SapBwCubeDataset', 'SybaseTable': 'SybaseTableDataset', 'SalesforceServiceCloudObject': 'SalesforceServiceCloudObjectDataset', 'SalesforceObject': 'SalesforceObjectDataset', 'MicrosoftAccessTable': 'MicrosoftAccessTableDataset', 'PostgreSqlTable': 'PostgreSqlTableDataset', 'MySqlTable': 'MySqlTableDataset', 'OdbcTable': 'OdbcTableDataset', 'InformixTable': 'InformixTableDataset', 'RelationalTable': 'RelationalTableDataset', 'AzureMySqlTable': 'AzureMySqlTableDataset', 'TeradataTable': 'TeradataTableDataset', 'OracleTable': 'OracleTableDataset', 'ODataResource': 'ODataResourceDataset', 'CosmosDbMongoDbApiCollection': 'CosmosDbMongoDbApiCollectionDataset', 'MongoDbV2Collection': 'MongoDbV2CollectionDataset', 'MongoDbCollection': 'MongoDbCollectionDataset', 'FileShare': 'FileShareDataset', 'Office365Table': 'Office365Dataset', 'AzureBlobFSFile': 'AzureBlobFSDataset', 'AzureDataLakeStoreFile': 'AzureDataLakeStoreDataset', 'CommonDataServiceForAppsEntity': 'CommonDataServiceForAppsEntityDataset', 'DynamicsCrmEntity': 'DynamicsCrmEntityDataset', 'DynamicsEntity': 'DynamicsEntityDataset', 'DocumentDbCollection': 'DocumentDbCollectionDataset', 'CustomDataset': 'CustomDataset', 'CassandraTable': 'CassandraTableDataset', 'AzureSqlDWTable': 'AzureSqlDWTableDataset', 'AzureSqlMITable': 'AzureSqlMITableDataset', 'AzureSqlTable': 'AzureSqlTableDataset', 'AzureTable': 'AzureTableDataset', 'AzureBlob': 'AzureBlobDataset', 'Binary': 'BinaryDataset', 'DelimitedText': 'DelimitedTextDataset', 'Parquet': 'ParquetDataset', 'Avro': 'AvroDataset', 'AmazonS3Object': 'AmazonS3Dataset'} + } + + def __init__(self, **kwargs): + super(Dataset, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.description = kwargs.get('description', None) + self.structure = kwargs.get('structure', None) + self.schema = kwargs.get('schema', None) + self.linked_service_name = kwargs.get('linked_service_name', None) + self.parameters = kwargs.get('parameters', None) + self.annotations = kwargs.get('annotations', None) + self.folder = kwargs.get('folder', None) + self.type = None + + +class AmazonMWSObjectDataset(Dataset): + """Amazon Marketplace Web Service dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AmazonMWSObjectDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.type = 'AmazonMWSObject' + + +class CopySource(Model): + """A copy activity source. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AmazonRedshiftSource, GoogleAdWordsSource, + OracleServiceCloudSource, DynamicsAXSource, ResponsysSource, + SalesforceMarketingCloudSource, VerticaSource, NetezzaSource, ZohoSource, + XeroSource, SquareSource, SparkSource, ShopifySource, ServiceNowSource, + QuickBooksSource, PrestoSource, PhoenixSource, PaypalSource, MarketoSource, + AzureMariaDBSource, MariaDBSource, MagentoSource, JiraSource, ImpalaSource, + HubspotSource, HiveSource, HBaseSource, GreenplumSource, + GoogleBigQuerySource, EloquaSource, DrillSource, CouchbaseSource, + ConcurSource, AzurePostgreSqlSource, AmazonMWSSource, HttpSource, + AzureBlobFSSource, AzureDataLakeStoreSource, Office365Source, + CosmosDbMongoDbApiSource, MongoDbV2Source, MongoDbSource, CassandraSource, + WebSource, TeradataSource, OracleSource, AzureDataExplorerSource, + AzureMySqlSource, HdfsSource, FileSystemSource, SqlDWSource, SqlMISource, + AzureSqlSource, SqlServerSource, SqlSource, RestSource, SapTableSource, + SapOpenHubSource, SapHanaSource, SapEccSource, SapCloudForCustomerSource, + SalesforceServiceCloudSource, SalesforceSource, ODataSource, SapBwSource, + SybaseSource, PostgreSqlSource, MySqlSource, OdbcSource, Db2Source, + MicrosoftAccessSource, InformixSource, RelationalSource, + CommonDataServiceForAppsSource, DynamicsCrmSource, DynamicsSource, + DocumentDbCollectionSource, BlobSource, AzureTableSource, BinarySource, + DelimitedTextSource, ParquetSource, AvroSource + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'AmazonRedshiftSource': 'AmazonRedshiftSource', 'GoogleAdWordsSource': 'GoogleAdWordsSource', 'OracleServiceCloudSource': 'OracleServiceCloudSource', 'DynamicsAXSource': 'DynamicsAXSource', 'ResponsysSource': 'ResponsysSource', 'SalesforceMarketingCloudSource': 'SalesforceMarketingCloudSource', 'VerticaSource': 'VerticaSource', 'NetezzaSource': 'NetezzaSource', 'ZohoSource': 'ZohoSource', 'XeroSource': 'XeroSource', 'SquareSource': 'SquareSource', 'SparkSource': 'SparkSource', 'ShopifySource': 'ShopifySource', 'ServiceNowSource': 'ServiceNowSource', 'QuickBooksSource': 'QuickBooksSource', 'PrestoSource': 'PrestoSource', 'PhoenixSource': 'PhoenixSource', 'PaypalSource': 'PaypalSource', 'MarketoSource': 'MarketoSource', 'AzureMariaDBSource': 'AzureMariaDBSource', 'MariaDBSource': 'MariaDBSource', 'MagentoSource': 'MagentoSource', 'JiraSource': 'JiraSource', 'ImpalaSource': 'ImpalaSource', 'HubspotSource': 'HubspotSource', 'HiveSource': 'HiveSource', 'HBaseSource': 'HBaseSource', 'GreenplumSource': 'GreenplumSource', 'GoogleBigQuerySource': 'GoogleBigQuerySource', 'EloquaSource': 'EloquaSource', 'DrillSource': 'DrillSource', 'CouchbaseSource': 'CouchbaseSource', 'ConcurSource': 'ConcurSource', 'AzurePostgreSqlSource': 'AzurePostgreSqlSource', 'AmazonMWSSource': 'AmazonMWSSource', 'HttpSource': 'HttpSource', 'AzureBlobFSSource': 'AzureBlobFSSource', 'AzureDataLakeStoreSource': 'AzureDataLakeStoreSource', 'Office365Source': 'Office365Source', 'CosmosDbMongoDbApiSource': 'CosmosDbMongoDbApiSource', 'MongoDbV2Source': 'MongoDbV2Source', 'MongoDbSource': 'MongoDbSource', 'CassandraSource': 'CassandraSource', 'WebSource': 'WebSource', 'TeradataSource': 'TeradataSource', 'OracleSource': 'OracleSource', 'AzureDataExplorerSource': 'AzureDataExplorerSource', 'AzureMySqlSource': 'AzureMySqlSource', 'HdfsSource': 'HdfsSource', 'FileSystemSource': 'FileSystemSource', 'SqlDWSource': 'SqlDWSource', 'SqlMISource': 'SqlMISource', 'AzureSqlSource': 'AzureSqlSource', 'SqlServerSource': 'SqlServerSource', 'SqlSource': 'SqlSource', 'RestSource': 'RestSource', 'SapTableSource': 'SapTableSource', 'SapOpenHubSource': 'SapOpenHubSource', 'SapHanaSource': 'SapHanaSource', 'SapEccSource': 'SapEccSource', 'SapCloudForCustomerSource': 'SapCloudForCustomerSource', 'SalesforceServiceCloudSource': 'SalesforceServiceCloudSource', 'SalesforceSource': 'SalesforceSource', 'ODataSource': 'ODataSource', 'SapBwSource': 'SapBwSource', 'SybaseSource': 'SybaseSource', 'PostgreSqlSource': 'PostgreSqlSource', 'MySqlSource': 'MySqlSource', 'OdbcSource': 'OdbcSource', 'Db2Source': 'Db2Source', 'MicrosoftAccessSource': 'MicrosoftAccessSource', 'InformixSource': 'InformixSource', 'RelationalSource': 'RelationalSource', 'CommonDataServiceForAppsSource': 'CommonDataServiceForAppsSource', 'DynamicsCrmSource': 'DynamicsCrmSource', 'DynamicsSource': 'DynamicsSource', 'DocumentDbCollectionSource': 'DocumentDbCollectionSource', 'BlobSource': 'BlobSource', 'AzureTableSource': 'AzureTableSource', 'BinarySource': 'BinarySource', 'DelimitedTextSource': 'DelimitedTextSource', 'ParquetSource': 'ParquetSource', 'AvroSource': 'AvroSource'} + } + + def __init__(self, **kwargs): + super(CopySource, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.source_retry_count = kwargs.get('source_retry_count', None) + self.source_retry_wait = kwargs.get('source_retry_wait', None) + self.max_concurrent_connections = kwargs.get('max_concurrent_connections', None) + self.type = None + + +class AmazonMWSSource(CopySource): + """A copy activity Amazon Marketplace Web Service source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AmazonMWSSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'AmazonMWSSource' + + +class AmazonRedshiftLinkedService(LinkedService): + """Linked service for Amazon Redshift. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param server: Required. The name of the Amazon Redshift server. Type: + string (or Expression with resultType string). + :type server: object + :param username: The username of the Amazon Redshift source. Type: string + (or Expression with resultType string). + :type username: object + :param password: The password of the Amazon Redshift source. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param database: Required. The database name of the Amazon Redshift + source. Type: string (or Expression with resultType string). + :type database: object + :param port: The TCP port number that the Amazon Redshift server uses to + listen for client connections. The default value is 5439. Type: integer + (or Expression with resultType integer). + :type port: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'server': {'required': True}, + 'database': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server': {'key': 'typeProperties.server', 'type': 'object'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'database': {'key': 'typeProperties.database', 'type': 'object'}, + 'port': {'key': 'typeProperties.port', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AmazonRedshiftLinkedService, self).__init__(**kwargs) + self.server = kwargs.get('server', None) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + self.database = kwargs.get('database', None) + self.port = kwargs.get('port', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'AmazonRedshift' + + +class AmazonRedshiftSource(CopySource): + """A copy activity source for Amazon Redshift Source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: Database query. Type: string (or Expression with resultType + string). + :type query: object + :param redshift_unload_settings: The Amazon S3 settings needed for the + interim Amazon S3 when copying from Amazon Redshift with unload. With + this, data from Amazon Redshift source will be unloaded into S3 first and + then copied into the targeted sink from the interim S3. + :type redshift_unload_settings: + ~azure.mgmt.datafactory.models.RedshiftUnloadSettings + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + 'redshift_unload_settings': {'key': 'redshiftUnloadSettings', 'type': 'RedshiftUnloadSettings'}, + } + + def __init__(self, **kwargs): + super(AmazonRedshiftSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.redshift_unload_settings = kwargs.get('redshift_unload_settings', None) + self.type = 'AmazonRedshiftSource' + + +class AmazonS3Dataset(Dataset): + """A single Amazon Simple Storage Service (S3) object or a set of S3 objects. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param bucket_name: Required. The name of the Amazon S3 bucket. Type: + string (or Expression with resultType string). + :type bucket_name: object + :param key: The key of the Amazon S3 object. Type: string (or Expression + with resultType string). + :type key: object + :param prefix: The prefix filter for the S3 object name. Type: string (or + Expression with resultType string). + :type prefix: object + :param version: The version for the S3 object. Type: string (or Expression + with resultType string). + :type version: object + :param modified_datetime_start: The start of S3 object's modified + datetime. Type: string (or Expression with resultType string). + :type modified_datetime_start: object + :param modified_datetime_end: The end of S3 object's modified datetime. + Type: string (or Expression with resultType string). + :type modified_datetime_end: object + :param format: The format of files. + :type format: ~azure.mgmt.datafactory.models.DatasetStorageFormat + :param compression: The data compression method used for the Amazon S3 + object. + :type compression: ~azure.mgmt.datafactory.models.DatasetCompression + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + 'bucket_name': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'bucket_name': {'key': 'typeProperties.bucketName', 'type': 'object'}, + 'key': {'key': 'typeProperties.key', 'type': 'object'}, + 'prefix': {'key': 'typeProperties.prefix', 'type': 'object'}, + 'version': {'key': 'typeProperties.version', 'type': 'object'}, + 'modified_datetime_start': {'key': 'typeProperties.modifiedDatetimeStart', 'type': 'object'}, + 'modified_datetime_end': {'key': 'typeProperties.modifiedDatetimeEnd', 'type': 'object'}, + 'format': {'key': 'typeProperties.format', 'type': 'DatasetStorageFormat'}, + 'compression': {'key': 'typeProperties.compression', 'type': 'DatasetCompression'}, + } + + def __init__(self, **kwargs): + super(AmazonS3Dataset, self).__init__(**kwargs) + self.bucket_name = kwargs.get('bucket_name', None) + self.key = kwargs.get('key', None) + self.prefix = kwargs.get('prefix', None) + self.version = kwargs.get('version', None) + self.modified_datetime_start = kwargs.get('modified_datetime_start', None) + self.modified_datetime_end = kwargs.get('modified_datetime_end', None) + self.format = kwargs.get('format', None) + self.compression = kwargs.get('compression', None) + self.type = 'AmazonS3Object' + + +class AmazonS3LinkedService(LinkedService): + """Linked service for Amazon S3. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param access_key_id: The access key identifier of the Amazon S3 Identity + and Access Management (IAM) user. Type: string (or Expression with + resultType string). + :type access_key_id: object + :param secret_access_key: The secret access key of the Amazon S3 Identity + and Access Management (IAM) user. + :type secret_access_key: ~azure.mgmt.datafactory.models.SecretBase + :param service_url: This value specifies the endpoint to access with the + S3 Connector. This is an optional property; change it only if you want to + try a different service endpoint or want to switch between https and http. + Type: string (or Expression with resultType string). + :type service_url: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'access_key_id': {'key': 'typeProperties.accessKeyId', 'type': 'object'}, + 'secret_access_key': {'key': 'typeProperties.secretAccessKey', 'type': 'SecretBase'}, + 'service_url': {'key': 'typeProperties.serviceUrl', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AmazonS3LinkedService, self).__init__(**kwargs) + self.access_key_id = kwargs.get('access_key_id', None) + self.secret_access_key = kwargs.get('secret_access_key', None) + self.service_url = kwargs.get('service_url', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'AmazonS3' + + +class DatasetLocation(Model): + """Dataset location. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. Type of dataset storage location. + :type type: str + :param folder_path: Specify the folder path of dataset. Type: string (or + Expression with resultType string) + :type folder_path: object + :param file_name: Specify the file name of dataset. Type: string (or + Expression with resultType string). + :type file_name: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'folder_path': {'key': 'folderPath', 'type': 'object'}, + 'file_name': {'key': 'fileName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(DatasetLocation, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.type = kwargs.get('type', None) + self.folder_path = kwargs.get('folder_path', None) + self.file_name = kwargs.get('file_name', None) + + +class AmazonS3Location(DatasetLocation): + """The location of amazon S3 dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. Type of dataset storage location. + :type type: str + :param folder_path: Specify the folder path of dataset. Type: string (or + Expression with resultType string) + :type folder_path: object + :param file_name: Specify the file name of dataset. Type: string (or + Expression with resultType string). + :type file_name: object + :param bucket_name: Specify the bucketName of amazon S3. Type: string (or + Expression with resultType string) + :type bucket_name: object + :param version: Specify the version of amazon S3. Type: string (or + Expression with resultType string). + :type version: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'folder_path': {'key': 'folderPath', 'type': 'object'}, + 'file_name': {'key': 'fileName', 'type': 'object'}, + 'bucket_name': {'key': 'bucketName', 'type': 'object'}, + 'version': {'key': 'version', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AmazonS3Location, self).__init__(**kwargs) + self.bucket_name = kwargs.get('bucket_name', None) + self.version = kwargs.get('version', None) + + +class StoreReadSettings(Model): + """Connector read setting. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The read setting type. + :type type: str + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(StoreReadSettings, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.type = kwargs.get('type', None) + self.max_concurrent_connections = kwargs.get('max_concurrent_connections', None) + + +class AmazonS3ReadSettings(StoreReadSettings): + """Azure data lake store read settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The read setting type. + :type type: str + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param recursive: If true, files under the folder path will be read + recursively. Default is true. Type: boolean (or Expression with resultType + boolean). + :type recursive: object + :param wildcard_folder_path: AmazonS3 wildcardFolderPath. Type: string (or + Expression with resultType string). + :type wildcard_folder_path: object + :param wildcard_file_name: AmazonS3 wildcardFileName. Type: string (or + Expression with resultType string). + :type wildcard_file_name: object + :param prefix: The prefix filter for the S3 object name. Type: string (or + Expression with resultType string). + :type prefix: object + :param enable_partition_discovery: Indicates whether to enable partition + discovery. + :type enable_partition_discovery: bool + :param modified_datetime_start: The start of file's modified datetime. + Type: string (or Expression with resultType string). + :type modified_datetime_start: object + :param modified_datetime_end: The end of file's modified datetime. Type: + string (or Expression with resultType string). + :type modified_datetime_end: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'recursive': {'key': 'recursive', 'type': 'object'}, + 'wildcard_folder_path': {'key': 'wildcardFolderPath', 'type': 'object'}, + 'wildcard_file_name': {'key': 'wildcardFileName', 'type': 'object'}, + 'prefix': {'key': 'prefix', 'type': 'object'}, + 'enable_partition_discovery': {'key': 'enablePartitionDiscovery', 'type': 'bool'}, + 'modified_datetime_start': {'key': 'modifiedDatetimeStart', 'type': 'object'}, + 'modified_datetime_end': {'key': 'modifiedDatetimeEnd', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AmazonS3ReadSettings, self).__init__(**kwargs) + self.recursive = kwargs.get('recursive', None) + self.wildcard_folder_path = kwargs.get('wildcard_folder_path', None) + self.wildcard_file_name = kwargs.get('wildcard_file_name', None) + self.prefix = kwargs.get('prefix', None) + self.enable_partition_discovery = kwargs.get('enable_partition_discovery', None) + self.modified_datetime_start = kwargs.get('modified_datetime_start', None) + self.modified_datetime_end = kwargs.get('modified_datetime_end', None) + + +class ControlActivity(Activity): + """Base class for all control activities like IfCondition, ForEach , Until. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: WebHookActivity, AppendVariableActivity, + SetVariableActivity, FilterActivity, ValidationActivity, UntilActivity, + WaitActivity, ForEachActivity, IfConditionActivity, ExecutePipelineActivity + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'WebHook': 'WebHookActivity', 'AppendVariable': 'AppendVariableActivity', 'SetVariable': 'SetVariableActivity', 'Filter': 'FilterActivity', 'Validation': 'ValidationActivity', 'Until': 'UntilActivity', 'Wait': 'WaitActivity', 'ForEach': 'ForEachActivity', 'IfCondition': 'IfConditionActivity', 'ExecutePipeline': 'ExecutePipelineActivity'} + } + + def __init__(self, **kwargs): + super(ControlActivity, self).__init__(**kwargs) + self.type = 'Container' + + +class AppendVariableActivity(ControlActivity): + """Append value for a Variable of type Array. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param variable_name: Name of the variable whose value needs to be + appended to. + :type variable_name: str + :param value: Value to be appended. Could be a static value or Expression + :type value: object + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'variable_name': {'key': 'typeProperties.variableName', 'type': 'str'}, + 'value': {'key': 'typeProperties.value', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AppendVariableActivity, self).__init__(**kwargs) + self.variable_name = kwargs.get('variable_name', None) + self.value = kwargs.get('value', None) + self.type = 'AppendVariable' + + +class AvroDataset(Dataset): + """Avro dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param location: Required. The location of the avro storage. + :type location: ~azure.mgmt.datafactory.models.DatasetLocation + :param avro_compression_codec: Possible values include: 'none', 'deflate', + 'snappy', 'xz', 'bzip2' + :type avro_compression_codec: str or + ~azure.mgmt.datafactory.models.AvroCompressionCodec + :param avro_compression_level: + :type avro_compression_level: int + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + 'location': {'required': True}, + 'avro_compression_level': {'maximum': 9, 'minimum': 1}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'typeProperties.location', 'type': 'DatasetLocation'}, + 'avro_compression_codec': {'key': 'typeProperties.avroCompressionCodec', 'type': 'str'}, + 'avro_compression_level': {'key': 'typeProperties.avroCompressionLevel', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(AvroDataset, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.avro_compression_codec = kwargs.get('avro_compression_codec', None) + self.avro_compression_level = kwargs.get('avro_compression_level', None) + self.type = 'Avro' + + +class DatasetStorageFormat(Model): + """The format definition of a storage. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ParquetFormat, OrcFormat, AvroFormat, JsonFormat, + TextFormat + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param serializer: Serializer. Type: string (or Expression with resultType + string). + :type serializer: object + :param deserializer: Deserializer. Type: string (or Expression with + resultType string). + :type deserializer: object + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'serializer': {'key': 'serializer', 'type': 'object'}, + 'deserializer': {'key': 'deserializer', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'ParquetFormat': 'ParquetFormat', 'OrcFormat': 'OrcFormat', 'AvroFormat': 'AvroFormat', 'JsonFormat': 'JsonFormat', 'TextFormat': 'TextFormat'} + } + + def __init__(self, **kwargs): + super(DatasetStorageFormat, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.serializer = kwargs.get('serializer', None) + self.deserializer = kwargs.get('deserializer', None) + self.type = None + + +class AvroFormat(DatasetStorageFormat): + """The data stored in Avro format. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param serializer: Serializer. Type: string (or Expression with resultType + string). + :type serializer: object + :param deserializer: Deserializer. Type: string (or Expression with + resultType string). + :type deserializer: object + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'serializer': {'key': 'serializer', 'type': 'object'}, + 'deserializer': {'key': 'deserializer', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AvroFormat, self).__init__(**kwargs) + self.type = 'AvroFormat' + + +class CopySink(Model): + """A copy activity sink. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CosmosDbMongoDbApiSink, SalesforceServiceCloudSink, + SalesforceSink, AzureDataExplorerSink, CommonDataServiceForAppsSink, + DynamicsCrmSink, DynamicsSink, MicrosoftAccessSink, InformixSink, OdbcSink, + AzureSearchIndexSink, AzureBlobFSSink, AzureDataLakeStoreSink, OracleSink, + SqlDWSink, SqlMISink, AzureSqlSink, SqlServerSink, SqlSink, + DocumentDbCollectionSink, FileSystemSink, BlobSink, BinarySink, + ParquetSink, AvroSink, AzureTableSink, AzureQueueSink, + SapCloudForCustomerSink, AzurePostgreSqlSink, DelimitedTextSink + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'CosmosDbMongoDbApiSink': 'CosmosDbMongoDbApiSink', 'SalesforceServiceCloudSink': 'SalesforceServiceCloudSink', 'SalesforceSink': 'SalesforceSink', 'AzureDataExplorerSink': 'AzureDataExplorerSink', 'CommonDataServiceForAppsSink': 'CommonDataServiceForAppsSink', 'DynamicsCrmSink': 'DynamicsCrmSink', 'DynamicsSink': 'DynamicsSink', 'MicrosoftAccessSink': 'MicrosoftAccessSink', 'InformixSink': 'InformixSink', 'OdbcSink': 'OdbcSink', 'AzureSearchIndexSink': 'AzureSearchIndexSink', 'AzureBlobFSSink': 'AzureBlobFSSink', 'AzureDataLakeStoreSink': 'AzureDataLakeStoreSink', 'OracleSink': 'OracleSink', 'SqlDWSink': 'SqlDWSink', 'SqlMISink': 'SqlMISink', 'AzureSqlSink': 'AzureSqlSink', 'SqlServerSink': 'SqlServerSink', 'SqlSink': 'SqlSink', 'DocumentDbCollectionSink': 'DocumentDbCollectionSink', 'FileSystemSink': 'FileSystemSink', 'BlobSink': 'BlobSink', 'BinarySink': 'BinarySink', 'ParquetSink': 'ParquetSink', 'AvroSink': 'AvroSink', 'AzureTableSink': 'AzureTableSink', 'AzureQueueSink': 'AzureQueueSink', 'SapCloudForCustomerSink': 'SapCloudForCustomerSink', 'AzurePostgreSqlSink': 'AzurePostgreSqlSink', 'DelimitedTextSink': 'DelimitedTextSink'} + } + + def __init__(self, **kwargs): + super(CopySink, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.write_batch_size = kwargs.get('write_batch_size', None) + self.write_batch_timeout = kwargs.get('write_batch_timeout', None) + self.sink_retry_count = kwargs.get('sink_retry_count', None) + self.sink_retry_wait = kwargs.get('sink_retry_wait', None) + self.max_concurrent_connections = kwargs.get('max_concurrent_connections', None) + self.type = None + + +class AvroSink(CopySink): + """A copy activity Avro sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param store_settings: Avro store settings. + :type store_settings: ~azure.mgmt.datafactory.models.StoreWriteSettings + :param format_settings: Avro format settings. + :type format_settings: ~azure.mgmt.datafactory.models.AvroWriteSettings + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'store_settings': {'key': 'storeSettings', 'type': 'StoreWriteSettings'}, + 'format_settings': {'key': 'formatSettings', 'type': 'AvroWriteSettings'}, + } + + def __init__(self, **kwargs): + super(AvroSink, self).__init__(**kwargs) + self.store_settings = kwargs.get('store_settings', None) + self.format_settings = kwargs.get('format_settings', None) + self.type = 'AvroSink' + + +class AvroSource(CopySource): + """A copy activity Avro source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param store_settings: Avro store settings. + :type store_settings: ~azure.mgmt.datafactory.models.StoreReadSettings + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'store_settings': {'key': 'storeSettings', 'type': 'StoreReadSettings'}, + } + + def __init__(self, **kwargs): + super(AvroSource, self).__init__(**kwargs) + self.store_settings = kwargs.get('store_settings', None) + self.type = 'AvroSource' + + +class FormatWriteSettings(Model): + """Format write settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The write setting type. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FormatWriteSettings, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.type = kwargs.get('type', None) + + +class AvroWriteSettings(FormatWriteSettings): + """Avro write settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The write setting type. + :type type: str + :param record_name: Top level record name in write result, which is + required in AVRO spec. + :type record_name: str + :param record_namespace: Record namespace in the write result. + :type record_namespace: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'record_name': {'key': 'recordName', 'type': 'str'}, + 'record_namespace': {'key': 'recordNamespace', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AvroWriteSettings, self).__init__(**kwargs) + self.record_name = kwargs.get('record_name', None) + self.record_namespace = kwargs.get('record_namespace', None) + + +class AzureBatchLinkedService(LinkedService): + """Azure Batch linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param account_name: Required. The Azure Batch account name. Type: string + (or Expression with resultType string). + :type account_name: object + :param access_key: The Azure Batch account access key. + :type access_key: ~azure.mgmt.datafactory.models.SecretBase + :param batch_uri: Required. The Azure Batch URI. Type: string (or + Expression with resultType string). + :type batch_uri: object + :param pool_name: Required. The Azure Batch pool name. Type: string (or + Expression with resultType string). + :type pool_name: object + :param linked_service_name: Required. The Azure Storage linked service + reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'account_name': {'required': True}, + 'batch_uri': {'required': True}, + 'pool_name': {'required': True}, + 'linked_service_name': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'account_name': {'key': 'typeProperties.accountName', 'type': 'object'}, + 'access_key': {'key': 'typeProperties.accessKey', 'type': 'SecretBase'}, + 'batch_uri': {'key': 'typeProperties.batchUri', 'type': 'object'}, + 'pool_name': {'key': 'typeProperties.poolName', 'type': 'object'}, + 'linked_service_name': {'key': 'typeProperties.linkedServiceName', 'type': 'LinkedServiceReference'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureBatchLinkedService, self).__init__(**kwargs) + self.account_name = kwargs.get('account_name', None) + self.access_key = kwargs.get('access_key', None) + self.batch_uri = kwargs.get('batch_uri', None) + self.pool_name = kwargs.get('pool_name', None) + self.linked_service_name = kwargs.get('linked_service_name', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'AzureBatch' + + +class AzureBlobDataset(Dataset): + """The Azure Blob storage. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param folder_path: The path of the Azure Blob storage. Type: string (or + Expression with resultType string). + :type folder_path: object + :param table_root_location: The root of blob path. Type: string (or + Expression with resultType string). + :type table_root_location: object + :param file_name: The name of the Azure Blob. Type: string (or Expression + with resultType string). + :type file_name: object + :param modified_datetime_start: The start of Azure Blob's modified + datetime. Type: string (or Expression with resultType string). + :type modified_datetime_start: object + :param modified_datetime_end: The end of Azure Blob's modified datetime. + Type: string (or Expression with resultType string). + :type modified_datetime_end: object + :param format: The format of the Azure Blob storage. + :type format: ~azure.mgmt.datafactory.models.DatasetStorageFormat + :param compression: The data compression method used for the blob storage. + :type compression: ~azure.mgmt.datafactory.models.DatasetCompression + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'folder_path': {'key': 'typeProperties.folderPath', 'type': 'object'}, + 'table_root_location': {'key': 'typeProperties.tableRootLocation', 'type': 'object'}, + 'file_name': {'key': 'typeProperties.fileName', 'type': 'object'}, + 'modified_datetime_start': {'key': 'typeProperties.modifiedDatetimeStart', 'type': 'object'}, + 'modified_datetime_end': {'key': 'typeProperties.modifiedDatetimeEnd', 'type': 'object'}, + 'format': {'key': 'typeProperties.format', 'type': 'DatasetStorageFormat'}, + 'compression': {'key': 'typeProperties.compression', 'type': 'DatasetCompression'}, + } + + def __init__(self, **kwargs): + super(AzureBlobDataset, self).__init__(**kwargs) + self.folder_path = kwargs.get('folder_path', None) + self.table_root_location = kwargs.get('table_root_location', None) + self.file_name = kwargs.get('file_name', None) + self.modified_datetime_start = kwargs.get('modified_datetime_start', None) + self.modified_datetime_end = kwargs.get('modified_datetime_end', None) + self.format = kwargs.get('format', None) + self.compression = kwargs.get('compression', None) + self.type = 'AzureBlob' + + +class AzureBlobFSDataset(Dataset): + """The Azure Data Lake Storage Gen2 storage. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param folder_path: The path of the Azure Data Lake Storage Gen2 storage. + Type: string (or Expression with resultType string). + :type folder_path: object + :param file_name: The name of the Azure Data Lake Storage Gen2. Type: + string (or Expression with resultType string). + :type file_name: object + :param format: The format of the Azure Data Lake Storage Gen2 storage. + :type format: ~azure.mgmt.datafactory.models.DatasetStorageFormat + :param compression: The data compression method used for the blob storage. + :type compression: ~azure.mgmt.datafactory.models.DatasetCompression + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'folder_path': {'key': 'typeProperties.folderPath', 'type': 'object'}, + 'file_name': {'key': 'typeProperties.fileName', 'type': 'object'}, + 'format': {'key': 'typeProperties.format', 'type': 'DatasetStorageFormat'}, + 'compression': {'key': 'typeProperties.compression', 'type': 'DatasetCompression'}, + } + + def __init__(self, **kwargs): + super(AzureBlobFSDataset, self).__init__(**kwargs) + self.folder_path = kwargs.get('folder_path', None) + self.file_name = kwargs.get('file_name', None) + self.format = kwargs.get('format', None) + self.compression = kwargs.get('compression', None) + self.type = 'AzureBlobFSFile' + + +class AzureBlobFSLinkedService(LinkedService): + """Azure Data Lake Storage Gen2 linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param url: Required. Endpoint for the Azure Data Lake Storage Gen2 + service. Type: string (or Expression with resultType string). + :type url: object + :param account_key: Account key for the Azure Data Lake Storage Gen2 + service. Type: string (or Expression with resultType string). + :type account_key: object + :param service_principal_id: The ID of the application used to + authenticate against the Azure Data Lake Storage Gen2 account. Type: + string (or Expression with resultType string). + :type service_principal_id: object + :param service_principal_key: The Key of the application used to + authenticate against the Azure Data Lake Storage Gen2 account. + :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase + :param tenant: The name or ID of the tenant to which the service principal + belongs. Type: string (or Expression with resultType string). + :type tenant: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'url': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'url': {'key': 'typeProperties.url', 'type': 'object'}, + 'account_key': {'key': 'typeProperties.accountKey', 'type': 'object'}, + 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, + 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, + 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureBlobFSLinkedService, self).__init__(**kwargs) + self.url = kwargs.get('url', None) + self.account_key = kwargs.get('account_key', None) + self.service_principal_id = kwargs.get('service_principal_id', None) + self.service_principal_key = kwargs.get('service_principal_key', None) + self.tenant = kwargs.get('tenant', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'AzureBlobFS' + + +class AzureBlobFSLocation(DatasetLocation): + """The location of azure blobFS dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. Type of dataset storage location. + :type type: str + :param folder_path: Specify the folder path of dataset. Type: string (or + Expression with resultType string) + :type folder_path: object + :param file_name: Specify the file name of dataset. Type: string (or + Expression with resultType string). + :type file_name: object + :param file_system: Specify the fileSystem of azure blobFS. Type: string + (or Expression with resultType string). + :type file_system: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'folder_path': {'key': 'folderPath', 'type': 'object'}, + 'file_name': {'key': 'fileName', 'type': 'object'}, + 'file_system': {'key': 'fileSystem', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureBlobFSLocation, self).__init__(**kwargs) + self.file_system = kwargs.get('file_system', None) + + +class AzureBlobFSReadSettings(StoreReadSettings): + """Azure blobFS read settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The read setting type. + :type type: str + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param recursive: If true, files under the folder path will be read + recursively. Default is true. Type: boolean (or Expression with resultType + boolean). + :type recursive: object + :param wildcard_folder_path: Azure blobFS wildcardFolderPath. Type: string + (or Expression with resultType string). + :type wildcard_folder_path: object + :param wildcard_file_name: Azure blobFS wildcardFileName. Type: string (or + Expression with resultType string). + :type wildcard_file_name: object + :param enable_partition_discovery: Indicates whether to enable partition + discovery. + :type enable_partition_discovery: bool + :param modified_datetime_start: The start of file's modified datetime. + Type: string (or Expression with resultType string). + :type modified_datetime_start: object + :param modified_datetime_end: The end of file's modified datetime. Type: + string (or Expression with resultType string). + :type modified_datetime_end: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'recursive': {'key': 'recursive', 'type': 'object'}, + 'wildcard_folder_path': {'key': 'wildcardFolderPath', 'type': 'object'}, + 'wildcard_file_name': {'key': 'wildcardFileName', 'type': 'object'}, + 'enable_partition_discovery': {'key': 'enablePartitionDiscovery', 'type': 'bool'}, + 'modified_datetime_start': {'key': 'modifiedDatetimeStart', 'type': 'object'}, + 'modified_datetime_end': {'key': 'modifiedDatetimeEnd', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureBlobFSReadSettings, self).__init__(**kwargs) + self.recursive = kwargs.get('recursive', None) + self.wildcard_folder_path = kwargs.get('wildcard_folder_path', None) + self.wildcard_file_name = kwargs.get('wildcard_file_name', None) + self.enable_partition_discovery = kwargs.get('enable_partition_discovery', None) + self.modified_datetime_start = kwargs.get('modified_datetime_start', None) + self.modified_datetime_end = kwargs.get('modified_datetime_end', None) + + +class AzureBlobFSSink(CopySink): + """A copy activity Azure Data Lake Storage Gen2 sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param copy_behavior: The type of copy behavior for copy sink. + :type copy_behavior: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'copy_behavior': {'key': 'copyBehavior', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureBlobFSSink, self).__init__(**kwargs) + self.copy_behavior = kwargs.get('copy_behavior', None) + self.type = 'AzureBlobFSSink' + + +class AzureBlobFSSource(CopySource): + """A copy activity Azure BlobFS source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param treat_empty_as_null: Treat empty as null. Type: boolean (or + Expression with resultType boolean). + :type treat_empty_as_null: object + :param skip_header_line_count: Number of header lines to skip from each + blob. Type: integer (or Expression with resultType integer). + :type skip_header_line_count: object + :param recursive: If true, files under the folder path will be read + recursively. Default is true. Type: boolean (or Expression with resultType + boolean). + :type recursive: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'treat_empty_as_null': {'key': 'treatEmptyAsNull', 'type': 'object'}, + 'skip_header_line_count': {'key': 'skipHeaderLineCount', 'type': 'object'}, + 'recursive': {'key': 'recursive', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureBlobFSSource, self).__init__(**kwargs) + self.treat_empty_as_null = kwargs.get('treat_empty_as_null', None) + self.skip_header_line_count = kwargs.get('skip_header_line_count', None) + self.recursive = kwargs.get('recursive', None) + self.type = 'AzureBlobFSSource' + + +class StoreWriteSettings(Model): + """Connector write settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The write setting type. + :type type: str + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param copy_behavior: The type of copy behavior for copy sink. + :type copy_behavior: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'copy_behavior': {'key': 'copyBehavior', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(StoreWriteSettings, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.type = kwargs.get('type', None) + self.max_concurrent_connections = kwargs.get('max_concurrent_connections', None) + self.copy_behavior = kwargs.get('copy_behavior', None) + + +class AzureBlobFSWriteSettings(StoreWriteSettings): + """Azure blobFS write settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The write setting type. + :type type: str + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param copy_behavior: The type of copy behavior for copy sink. + :type copy_behavior: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'copy_behavior': {'key': 'copyBehavior', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureBlobFSWriteSettings, self).__init__(**kwargs) + + +class AzureBlobStorageLinkedService(LinkedService): + """The azure blob storage linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: The connection string. It is mutually exclusive + with sasUri, serviceEndpoint property. Type: string, SecureString or + AzureKeyVaultSecretReference. + :type connection_string: object + :param account_key: The Azure key vault secret reference of accountKey in + connection string. + :type account_key: + ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param sas_uri: SAS URI of the Azure Blob Storage resource. It is mutually + exclusive with connectionString, serviceEndpoint property. Type: string, + SecureString or AzureKeyVaultSecretReference. + :type sas_uri: object + :param sas_token: The Azure key vault secret reference of sasToken in sas + uri. + :type sas_token: + ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param service_endpoint: Blob service endpoint of the Azure Blob Storage + resource. It is mutually exclusive with connectionString, sasUri property. + :type service_endpoint: str + :param service_principal_id: The ID of the service principal used to + authenticate against Azure SQL Data Warehouse. Type: string (or Expression + with resultType string). + :type service_principal_id: object + :param service_principal_key: The key of the service principal used to + authenticate against Azure SQL Data Warehouse. + :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase + :param tenant: The name or ID of the tenant to which the service principal + belongs. Type: string (or Expression with resultType string). + :type tenant: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'account_key': {'key': 'typeProperties.accountKey', 'type': 'AzureKeyVaultSecretReference'}, + 'sas_uri': {'key': 'typeProperties.sasUri', 'type': 'object'}, + 'sas_token': {'key': 'typeProperties.sasToken', 'type': 'AzureKeyVaultSecretReference'}, + 'service_endpoint': {'key': 'typeProperties.serviceEndpoint', 'type': 'str'}, + 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, + 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, + 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureBlobStorageLinkedService, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.account_key = kwargs.get('account_key', None) + self.sas_uri = kwargs.get('sas_uri', None) + self.sas_token = kwargs.get('sas_token', None) + self.service_endpoint = kwargs.get('service_endpoint', None) + self.service_principal_id = kwargs.get('service_principal_id', None) + self.service_principal_key = kwargs.get('service_principal_key', None) + self.tenant = kwargs.get('tenant', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'AzureBlobStorage' + + +class AzureBlobStorageLocation(DatasetLocation): + """The location of azure blob dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. Type of dataset storage location. + :type type: str + :param folder_path: Specify the folder path of dataset. Type: string (or + Expression with resultType string) + :type folder_path: object + :param file_name: Specify the file name of dataset. Type: string (or + Expression with resultType string). + :type file_name: object + :param container: Specify the container of azure blob. Type: string (or + Expression with resultType string). + :type container: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'folder_path': {'key': 'folderPath', 'type': 'object'}, + 'file_name': {'key': 'fileName', 'type': 'object'}, + 'container': {'key': 'container', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureBlobStorageLocation, self).__init__(**kwargs) + self.container = kwargs.get('container', None) + + +class AzureBlobStorageReadSettings(StoreReadSettings): + """Azure blob read settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The read setting type. + :type type: str + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param recursive: If true, files under the folder path will be read + recursively. Default is true. Type: boolean (or Expression with resultType + boolean). + :type recursive: object + :param wildcard_folder_path: Azure blob wildcardFolderPath. Type: string + (or Expression with resultType string). + :type wildcard_folder_path: object + :param wildcard_file_name: Azure blob wildcardFileName. Type: string (or + Expression with resultType string). + :type wildcard_file_name: object + :param enable_partition_discovery: Indicates whether to enable partition + discovery. + :type enable_partition_discovery: bool + :param modified_datetime_start: The start of file's modified datetime. + Type: string (or Expression with resultType string). + :type modified_datetime_start: object + :param modified_datetime_end: The end of file's modified datetime. Type: + string (or Expression with resultType string). + :type modified_datetime_end: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'recursive': {'key': 'recursive', 'type': 'object'}, + 'wildcard_folder_path': {'key': 'wildcardFolderPath', 'type': 'object'}, + 'wildcard_file_name': {'key': 'wildcardFileName', 'type': 'object'}, + 'enable_partition_discovery': {'key': 'enablePartitionDiscovery', 'type': 'bool'}, + 'modified_datetime_start': {'key': 'modifiedDatetimeStart', 'type': 'object'}, + 'modified_datetime_end': {'key': 'modifiedDatetimeEnd', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureBlobStorageReadSettings, self).__init__(**kwargs) + self.recursive = kwargs.get('recursive', None) + self.wildcard_folder_path = kwargs.get('wildcard_folder_path', None) + self.wildcard_file_name = kwargs.get('wildcard_file_name', None) + self.enable_partition_discovery = kwargs.get('enable_partition_discovery', None) + self.modified_datetime_start = kwargs.get('modified_datetime_start', None) + self.modified_datetime_end = kwargs.get('modified_datetime_end', None) + + +class AzureBlobStorageWriteSettings(StoreWriteSettings): + """Azure blob write settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The write setting type. + :type type: str + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param copy_behavior: The type of copy behavior for copy sink. + :type copy_behavior: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'copy_behavior': {'key': 'copyBehavior', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureBlobStorageWriteSettings, self).__init__(**kwargs) + + +class AzureDatabricksLinkedService(LinkedService): + """Azure Databricks linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param domain: Required. .azuredatabricks.net, domain name of your + Databricks deployment. Type: string (or Expression with resultType + string). + :type domain: object + :param access_token: Required. Access token for databricks REST API. Refer + to https://docs.azuredatabricks.net/api/latest/authentication.html. Type: + string (or Expression with resultType string). + :type access_token: ~azure.mgmt.datafactory.models.SecretBase + :param existing_cluster_id: The id of an existing cluster that will be + used for all runs of this job. Type: string (or Expression with resultType + string). + :type existing_cluster_id: object + :param new_cluster_version: The Spark version of new cluster. Type: string + (or Expression with resultType string). + :type new_cluster_version: object + :param new_cluster_num_of_worker: Number of worker nodes that new cluster + should have. A string formatted Int32, like '1' means numOfWorker is 1 or + '1:10' means auto-scale from 1 as min and 10 as max. Type: string (or + Expression with resultType string). + :type new_cluster_num_of_worker: object + :param new_cluster_node_type: The node types of new cluster. Type: string + (or Expression with resultType string). + :type new_cluster_node_type: object + :param new_cluster_spark_conf: A set of optional, user-specified Spark + configuration key-value pairs. + :type new_cluster_spark_conf: dict[str, object] + :param new_cluster_spark_env_vars: A set of optional, user-specified Spark + environment variables key-value pairs. + :type new_cluster_spark_env_vars: dict[str, object] + :param new_cluster_custom_tags: Additional tags for cluster resources. + :type new_cluster_custom_tags: dict[str, object] + :param new_cluster_driver_node_type: The driver node type for the new + cluster. Type: string (or Expression with resultType string). + :type new_cluster_driver_node_type: object + :param new_cluster_init_scripts: User-defined initialization scripts for + the new cluster. Type: array of strings (or Expression with resultType + array of strings). + :type new_cluster_init_scripts: object + :param new_cluster_enable_elastic_disk: Enable the elastic disk on the new + cluster. Type: boolean (or Expression with resultType boolean). + :type new_cluster_enable_elastic_disk: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'domain': {'required': True}, + 'access_token': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'domain': {'key': 'typeProperties.domain', 'type': 'object'}, + 'access_token': {'key': 'typeProperties.accessToken', 'type': 'SecretBase'}, + 'existing_cluster_id': {'key': 'typeProperties.existingClusterId', 'type': 'object'}, + 'new_cluster_version': {'key': 'typeProperties.newClusterVersion', 'type': 'object'}, + 'new_cluster_num_of_worker': {'key': 'typeProperties.newClusterNumOfWorker', 'type': 'object'}, + 'new_cluster_node_type': {'key': 'typeProperties.newClusterNodeType', 'type': 'object'}, + 'new_cluster_spark_conf': {'key': 'typeProperties.newClusterSparkConf', 'type': '{object}'}, + 'new_cluster_spark_env_vars': {'key': 'typeProperties.newClusterSparkEnvVars', 'type': '{object}'}, + 'new_cluster_custom_tags': {'key': 'typeProperties.newClusterCustomTags', 'type': '{object}'}, + 'new_cluster_driver_node_type': {'key': 'typeProperties.newClusterDriverNodeType', 'type': 'object'}, + 'new_cluster_init_scripts': {'key': 'typeProperties.newClusterInitScripts', 'type': 'object'}, + 'new_cluster_enable_elastic_disk': {'key': 'typeProperties.newClusterEnableElasticDisk', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureDatabricksLinkedService, self).__init__(**kwargs) + self.domain = kwargs.get('domain', None) + self.access_token = kwargs.get('access_token', None) + self.existing_cluster_id = kwargs.get('existing_cluster_id', None) + self.new_cluster_version = kwargs.get('new_cluster_version', None) + self.new_cluster_num_of_worker = kwargs.get('new_cluster_num_of_worker', None) + self.new_cluster_node_type = kwargs.get('new_cluster_node_type', None) + self.new_cluster_spark_conf = kwargs.get('new_cluster_spark_conf', None) + self.new_cluster_spark_env_vars = kwargs.get('new_cluster_spark_env_vars', None) + self.new_cluster_custom_tags = kwargs.get('new_cluster_custom_tags', None) + self.new_cluster_driver_node_type = kwargs.get('new_cluster_driver_node_type', None) + self.new_cluster_init_scripts = kwargs.get('new_cluster_init_scripts', None) + self.new_cluster_enable_elastic_disk = kwargs.get('new_cluster_enable_elastic_disk', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'AzureDatabricks' + + +class ExecutionActivity(Activity): + """Base class for all execution activities. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureFunctionActivity, DatabricksSparkPythonActivity, + DatabricksSparkJarActivity, DatabricksNotebookActivity, + DataLakeAnalyticsUSQLActivity, AzureMLUpdateResourceActivity, + AzureMLBatchExecutionActivity, GetMetadataActivity, WebActivity, + LookupActivity, AzureDataExplorerCommandActivity, DeleteActivity, + SqlServerStoredProcedureActivity, CustomActivity, + ExecuteSSISPackageActivity, HDInsightSparkActivity, + HDInsightStreamingActivity, HDInsightMapReduceActivity, + HDInsightPigActivity, HDInsightHiveActivity, CopyActivity + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + } + + _subtype_map = { + 'type': {'AzureFunctionActivity': 'AzureFunctionActivity', 'DatabricksSparkPython': 'DatabricksSparkPythonActivity', 'DatabricksSparkJar': 'DatabricksSparkJarActivity', 'DatabricksNotebook': 'DatabricksNotebookActivity', 'DataLakeAnalyticsU-SQL': 'DataLakeAnalyticsUSQLActivity', 'AzureMLUpdateResource': 'AzureMLUpdateResourceActivity', 'AzureMLBatchExecution': 'AzureMLBatchExecutionActivity', 'GetMetadata': 'GetMetadataActivity', 'WebActivity': 'WebActivity', 'Lookup': 'LookupActivity', 'AzureDataExplorerCommand': 'AzureDataExplorerCommandActivity', 'Delete': 'DeleteActivity', 'SqlServerStoredProcedure': 'SqlServerStoredProcedureActivity', 'Custom': 'CustomActivity', 'ExecuteSSISPackage': 'ExecuteSSISPackageActivity', 'HDInsightSpark': 'HDInsightSparkActivity', 'HDInsightStreaming': 'HDInsightStreamingActivity', 'HDInsightMapReduce': 'HDInsightMapReduceActivity', 'HDInsightPig': 'HDInsightPigActivity', 'HDInsightHive': 'HDInsightHiveActivity', 'Copy': 'CopyActivity'} + } + + def __init__(self, **kwargs): + super(ExecutionActivity, self).__init__(**kwargs) + self.linked_service_name = kwargs.get('linked_service_name', None) + self.policy = kwargs.get('policy', None) + self.type = 'Execution' + + +class AzureDataExplorerCommandActivity(ExecutionActivity): + """Azure Data Explorer command activity. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param command: Required. A control command, according to the Azure Data + Explorer command syntax. Type: string (or Expression with resultType + string). + :type command: object + :param command_timeout: Control command timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9]))..) + :type command_timeout: object + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'command': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'command': {'key': 'typeProperties.command', 'type': 'object'}, + 'command_timeout': {'key': 'typeProperties.commandTimeout', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureDataExplorerCommandActivity, self).__init__(**kwargs) + self.command = kwargs.get('command', None) + self.command_timeout = kwargs.get('command_timeout', None) + self.type = 'AzureDataExplorerCommand' + + +class AzureDataExplorerLinkedService(LinkedService): + """Azure Data Explorer (Kusto) linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param endpoint: Required. The endpoint of Azure Data Explorer (the + engine's endpoint). URL will be in the format + https://..kusto.windows.net. Type: string (or + Expression with resultType string) + :type endpoint: object + :param service_principal_id: Required. The ID of the service principal + used to authenticate against Azure Data Explorer. Type: string (or + Expression with resultType string). + :type service_principal_id: object + :param service_principal_key: Required. The key of the service principal + used to authenticate against Kusto. + :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase + :param database: Required. Database name for connection. Type: string (or + Expression with resultType string). + :type database: object + :param tenant: Required. The name or ID of the tenant to which the service + principal belongs. Type: string (or Expression with resultType string). + :type tenant: object + """ + + _validation = { + 'type': {'required': True}, + 'endpoint': {'required': True}, + 'service_principal_id': {'required': True}, + 'service_principal_key': {'required': True}, + 'database': {'required': True}, + 'tenant': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'endpoint': {'key': 'typeProperties.endpoint', 'type': 'object'}, + 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, + 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, + 'database': {'key': 'typeProperties.database', 'type': 'object'}, + 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureDataExplorerLinkedService, self).__init__(**kwargs) + self.endpoint = kwargs.get('endpoint', None) + self.service_principal_id = kwargs.get('service_principal_id', None) + self.service_principal_key = kwargs.get('service_principal_key', None) + self.database = kwargs.get('database', None) + self.tenant = kwargs.get('tenant', None) + self.type = 'AzureDataExplorer' + + +class AzureDataExplorerSink(CopySink): + """A copy activity Azure Data Explorer sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param ingestion_mapping_name: A name of a pre-created csv mapping that + was defined on the target Kusto table. Type: string. + :type ingestion_mapping_name: object + :param ingestion_mapping_as_json: An explicit column mapping description + provided in a json format. Type: string. + :type ingestion_mapping_as_json: object + :param flush_immediately: If set to true, any aggregation will be skipped. + Default is false. Type: boolean. + :type flush_immediately: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'ingestion_mapping_name': {'key': 'ingestionMappingName', 'type': 'object'}, + 'ingestion_mapping_as_json': {'key': 'ingestionMappingAsJson', 'type': 'object'}, + 'flush_immediately': {'key': 'flushImmediately', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureDataExplorerSink, self).__init__(**kwargs) + self.ingestion_mapping_name = kwargs.get('ingestion_mapping_name', None) + self.ingestion_mapping_as_json = kwargs.get('ingestion_mapping_as_json', None) + self.flush_immediately = kwargs.get('flush_immediately', None) + self.type = 'AzureDataExplorerSink' + + +class AzureDataExplorerSource(CopySource): + """A copy activity Azure Data Explorer (Kusto) source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: Required. Database query. Should be a Kusto Query Language + (KQL) query. Type: string (or Expression with resultType string). + :type query: object + :param no_truncation: The name of the Boolean option that controls whether + truncation is applied to result-sets that go beyond a certain row-count + limit. + :type no_truncation: object + :param query_timeout: Query timeout. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])).. + :type query_timeout: object + """ + + _validation = { + 'type': {'required': True}, + 'query': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + 'no_truncation': {'key': 'noTruncation', 'type': 'object'}, + 'query_timeout': {'key': 'queryTimeout', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureDataExplorerSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.no_truncation = kwargs.get('no_truncation', None) + self.query_timeout = kwargs.get('query_timeout', None) + self.type = 'AzureDataExplorerSource' + + +class AzureDataExplorerTableDataset(Dataset): + """The Azure Data Explorer (Kusto) dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table: The table name of the Azure Data Explorer database. Type: + string (or Expression with resultType string). + :type table: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table': {'key': 'typeProperties.table', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureDataExplorerTableDataset, self).__init__(**kwargs) + self.table = kwargs.get('table', None) + self.type = 'AzureDataExplorerTable' + + +class AzureDataLakeAnalyticsLinkedService(LinkedService): + """Azure Data Lake Analytics linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param account_name: Required. The Azure Data Lake Analytics account name. + Type: string (or Expression with resultType string). + :type account_name: object + :param service_principal_id: The ID of the application used to + authenticate against the Azure Data Lake Analytics account. Type: string + (or Expression with resultType string). + :type service_principal_id: object + :param service_principal_key: The Key of the application used to + authenticate against the Azure Data Lake Analytics account. + :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase + :param tenant: Required. The name or ID of the tenant to which the service + principal belongs. Type: string (or Expression with resultType string). + :type tenant: object + :param subscription_id: Data Lake Analytics account subscription ID (if + different from Data Factory account). Type: string (or Expression with + resultType string). + :type subscription_id: object + :param resource_group_name: Data Lake Analytics account resource group + name (if different from Data Factory account). Type: string (or Expression + with resultType string). + :type resource_group_name: object + :param data_lake_analytics_uri: Azure Data Lake Analytics URI Type: string + (or Expression with resultType string). + :type data_lake_analytics_uri: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'account_name': {'required': True}, + 'tenant': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'account_name': {'key': 'typeProperties.accountName', 'type': 'object'}, + 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, + 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, + 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, + 'subscription_id': {'key': 'typeProperties.subscriptionId', 'type': 'object'}, + 'resource_group_name': {'key': 'typeProperties.resourceGroupName', 'type': 'object'}, + 'data_lake_analytics_uri': {'key': 'typeProperties.dataLakeAnalyticsUri', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureDataLakeAnalyticsLinkedService, self).__init__(**kwargs) + self.account_name = kwargs.get('account_name', None) + self.service_principal_id = kwargs.get('service_principal_id', None) + self.service_principal_key = kwargs.get('service_principal_key', None) + self.tenant = kwargs.get('tenant', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group_name = kwargs.get('resource_group_name', None) + self.data_lake_analytics_uri = kwargs.get('data_lake_analytics_uri', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'AzureDataLakeAnalytics' + + +class AzureDataLakeStoreDataset(Dataset): + """Azure Data Lake Store dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param folder_path: Path to the folder in the Azure Data Lake Store. Type: + string (or Expression with resultType string). + :type folder_path: object + :param file_name: The name of the file in the Azure Data Lake Store. Type: + string (or Expression with resultType string). + :type file_name: object + :param format: The format of the Data Lake Store. + :type format: ~azure.mgmt.datafactory.models.DatasetStorageFormat + :param compression: The data compression method used for the item(s) in + the Azure Data Lake Store. + :type compression: ~azure.mgmt.datafactory.models.DatasetCompression + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'folder_path': {'key': 'typeProperties.folderPath', 'type': 'object'}, + 'file_name': {'key': 'typeProperties.fileName', 'type': 'object'}, + 'format': {'key': 'typeProperties.format', 'type': 'DatasetStorageFormat'}, + 'compression': {'key': 'typeProperties.compression', 'type': 'DatasetCompression'}, + } + + def __init__(self, **kwargs): + super(AzureDataLakeStoreDataset, self).__init__(**kwargs) + self.folder_path = kwargs.get('folder_path', None) + self.file_name = kwargs.get('file_name', None) + self.format = kwargs.get('format', None) + self.compression = kwargs.get('compression', None) + self.type = 'AzureDataLakeStoreFile' + + +class AzureDataLakeStoreLinkedService(LinkedService): + """Azure Data Lake Store linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param data_lake_store_uri: Required. Data Lake Store service URI. Type: + string (or Expression with resultType string). + :type data_lake_store_uri: object + :param service_principal_id: The ID of the application used to + authenticate against the Azure Data Lake Store account. Type: string (or + Expression with resultType string). + :type service_principal_id: object + :param service_principal_key: The Key of the application used to + authenticate against the Azure Data Lake Store account. + :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase + :param tenant: The name or ID of the tenant to which the service principal + belongs. Type: string (or Expression with resultType string). + :type tenant: object + :param account_name: Data Lake Store account name. Type: string (or + Expression with resultType string). + :type account_name: object + :param subscription_id: Data Lake Store account subscription ID (if + different from Data Factory account). Type: string (or Expression with + resultType string). + :type subscription_id: object + :param resource_group_name: Data Lake Store account resource group name + (if different from Data Factory account). Type: string (or Expression with + resultType string). + :type resource_group_name: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'data_lake_store_uri': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data_lake_store_uri': {'key': 'typeProperties.dataLakeStoreUri', 'type': 'object'}, + 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, + 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, + 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, + 'account_name': {'key': 'typeProperties.accountName', 'type': 'object'}, + 'subscription_id': {'key': 'typeProperties.subscriptionId', 'type': 'object'}, + 'resource_group_name': {'key': 'typeProperties.resourceGroupName', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureDataLakeStoreLinkedService, self).__init__(**kwargs) + self.data_lake_store_uri = kwargs.get('data_lake_store_uri', None) + self.service_principal_id = kwargs.get('service_principal_id', None) + self.service_principal_key = kwargs.get('service_principal_key', None) + self.tenant = kwargs.get('tenant', None) + self.account_name = kwargs.get('account_name', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group_name = kwargs.get('resource_group_name', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'AzureDataLakeStore' + + +class AzureDataLakeStoreLocation(DatasetLocation): + """The location of azure data lake store dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. Type of dataset storage location. + :type type: str + :param folder_path: Specify the folder path of dataset. Type: string (or + Expression with resultType string) + :type folder_path: object + :param file_name: Specify the file name of dataset. Type: string (or + Expression with resultType string). + :type file_name: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'folder_path': {'key': 'folderPath', 'type': 'object'}, + 'file_name': {'key': 'fileName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureDataLakeStoreLocation, self).__init__(**kwargs) + + +class AzureDataLakeStoreReadSettings(StoreReadSettings): + """Azure data lake store read settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The read setting type. + :type type: str + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param recursive: If true, files under the folder path will be read + recursively. Default is true. Type: boolean (or Expression with resultType + boolean). + :type recursive: object + :param wildcard_folder_path: ADLS wildcardFolderPath. Type: string (or + Expression with resultType string). + :type wildcard_folder_path: object + :param wildcard_file_name: ADLS wildcardFileName. Type: string (or + Expression with resultType string). + :type wildcard_file_name: object + :param enable_partition_discovery: Indicates whether to enable partition + discovery. + :type enable_partition_discovery: bool + :param modified_datetime_start: The start of file's modified datetime. + Type: string (or Expression with resultType string). + :type modified_datetime_start: object + :param modified_datetime_end: The end of file's modified datetime. Type: + string (or Expression with resultType string). + :type modified_datetime_end: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'recursive': {'key': 'recursive', 'type': 'object'}, + 'wildcard_folder_path': {'key': 'wildcardFolderPath', 'type': 'object'}, + 'wildcard_file_name': {'key': 'wildcardFileName', 'type': 'object'}, + 'enable_partition_discovery': {'key': 'enablePartitionDiscovery', 'type': 'bool'}, + 'modified_datetime_start': {'key': 'modifiedDatetimeStart', 'type': 'object'}, + 'modified_datetime_end': {'key': 'modifiedDatetimeEnd', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureDataLakeStoreReadSettings, self).__init__(**kwargs) + self.recursive = kwargs.get('recursive', None) + self.wildcard_folder_path = kwargs.get('wildcard_folder_path', None) + self.wildcard_file_name = kwargs.get('wildcard_file_name', None) + self.enable_partition_discovery = kwargs.get('enable_partition_discovery', None) + self.modified_datetime_start = kwargs.get('modified_datetime_start', None) + self.modified_datetime_end = kwargs.get('modified_datetime_end', None) + + +class AzureDataLakeStoreSink(CopySink): + """A copy activity Azure Data Lake Store sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param copy_behavior: The type of copy behavior for copy sink. + :type copy_behavior: object + :param enable_adls_single_file_parallel: Single File Parallel. + :type enable_adls_single_file_parallel: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'copy_behavior': {'key': 'copyBehavior', 'type': 'object'}, + 'enable_adls_single_file_parallel': {'key': 'enableAdlsSingleFileParallel', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureDataLakeStoreSink, self).__init__(**kwargs) + self.copy_behavior = kwargs.get('copy_behavior', None) + self.enable_adls_single_file_parallel = kwargs.get('enable_adls_single_file_parallel', None) + self.type = 'AzureDataLakeStoreSink' + + +class AzureDataLakeStoreSource(CopySource): + """A copy activity Azure Data Lake source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param recursive: If true, files under the folder path will be read + recursively. Default is true. Type: boolean (or Expression with resultType + boolean). + :type recursive: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'recursive': {'key': 'recursive', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureDataLakeStoreSource, self).__init__(**kwargs) + self.recursive = kwargs.get('recursive', None) + self.type = 'AzureDataLakeStoreSource' + + +class AzureDataLakeStoreWriteSettings(StoreWriteSettings): + """Azure data lake store write settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The write setting type. + :type type: str + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param copy_behavior: The type of copy behavior for copy sink. + :type copy_behavior: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'copy_behavior': {'key': 'copyBehavior', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureDataLakeStoreWriteSettings, self).__init__(**kwargs) + + +class AzureFunctionActivity(ExecutionActivity): + """Azure Function activity. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param method: Required. Rest API method for target endpoint. Possible + values include: 'GET', 'POST', 'PUT', 'DELETE', 'OPTIONS', 'HEAD', 'TRACE' + :type method: str or + ~azure.mgmt.datafactory.models.AzureFunctionActivityMethod + :param function_name: Required. Name of the Function that the Azure + Function Activity will call. Type: string (or Expression with resultType + string) + :type function_name: object + :param headers: Represents the headers that will be sent to the request. + For example, to set the language and type on a request: "headers" : { + "Accept-Language": "en-us", "Content-Type": "application/json" }. Type: + string (or Expression with resultType string). + :type headers: object + :param body: Represents the payload that will be sent to the endpoint. + Required for POST/PUT method, not allowed for GET method Type: string (or + Expression with resultType string). + :type body: object + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'method': {'required': True}, + 'function_name': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'method': {'key': 'typeProperties.method', 'type': 'str'}, + 'function_name': {'key': 'typeProperties.functionName', 'type': 'object'}, + 'headers': {'key': 'typeProperties.headers', 'type': 'object'}, + 'body': {'key': 'typeProperties.body', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureFunctionActivity, self).__init__(**kwargs) + self.method = kwargs.get('method', None) + self.function_name = kwargs.get('function_name', None) + self.headers = kwargs.get('headers', None) + self.body = kwargs.get('body', None) + self.type = 'AzureFunctionActivity' + + +class AzureFunctionLinkedService(LinkedService): + """Azure Function linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param function_app_url: Required. The endpoint of the Azure Function App. + URL will be in the format https://.azurewebsites.net. + :type function_app_url: object + :param function_key: Function or Host key for Azure Function App. + :type function_key: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'function_app_url': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'function_app_url': {'key': 'typeProperties.functionAppUrl', 'type': 'object'}, + 'function_key': {'key': 'typeProperties.functionKey', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureFunctionLinkedService, self).__init__(**kwargs) + self.function_app_url = kwargs.get('function_app_url', None) + self.function_key = kwargs.get('function_key', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'AzureFunction' + + +class AzureKeyVaultLinkedService(LinkedService): + """Azure Key Vault linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param base_url: Required. The base URL of the Azure Key Vault. e.g. + https://myakv.vault.azure.net Type: string (or Expression with resultType + string). + :type base_url: object + """ + + _validation = { + 'type': {'required': True}, + 'base_url': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'base_url': {'key': 'typeProperties.baseUrl', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureKeyVaultLinkedService, self).__init__(**kwargs) + self.base_url = kwargs.get('base_url', None) + self.type = 'AzureKeyVault' + + +class SecretBase(Model): + """The base definition of a secret type. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SecureString, AzureKeyVaultSecretReference + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'SecureString': 'SecureString', 'AzureKeyVaultSecret': 'AzureKeyVaultSecretReference'} + } + + def __init__(self, **kwargs): + super(SecretBase, self).__init__(**kwargs) + self.type = None + + +class AzureKeyVaultSecretReference(SecretBase): + """Azure Key Vault secret reference. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param store: Required. The Azure Key Vault linked service reference. + :type store: ~azure.mgmt.datafactory.models.LinkedServiceReference + :param secret_name: Required. The name of the secret in Azure Key Vault. + Type: string (or Expression with resultType string). + :type secret_name: object + :param secret_version: The version of the secret in Azure Key Vault. The + default value is the latest version of the secret. Type: string (or + Expression with resultType string). + :type secret_version: object + """ + + _validation = { + 'type': {'required': True}, + 'store': {'required': True}, + 'secret_name': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'store': {'key': 'store', 'type': 'LinkedServiceReference'}, + 'secret_name': {'key': 'secretName', 'type': 'object'}, + 'secret_version': {'key': 'secretVersion', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureKeyVaultSecretReference, self).__init__(**kwargs) + self.store = kwargs.get('store', None) + self.secret_name = kwargs.get('secret_name', None) + self.secret_version = kwargs.get('secret_version', None) + self.type = 'AzureKeyVaultSecret' + + +class AzureMariaDBLinkedService(LinkedService): + """Azure Database for MariaDB linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: An ODBC connection string. Type: string, + SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param pwd: The Azure key vault secret reference of password in connection + string. + :type pwd: ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'pwd': {'key': 'typeProperties.pwd', 'type': 'AzureKeyVaultSecretReference'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureMariaDBLinkedService, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.pwd = kwargs.get('pwd', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'AzureMariaDB' + + +class AzureMariaDBSource(CopySource): + """A copy activity Azure MariaDB source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureMariaDBSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'AzureMariaDBSource' + + +class AzureMariaDBTableDataset(Dataset): + """Azure Database for MariaDB dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureMariaDBTableDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.type = 'AzureMariaDBTable' + + +class AzureMLBatchExecutionActivity(ExecutionActivity): + """Azure ML Batch Execution activity. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param global_parameters: Key,Value pairs to be passed to the Azure ML + Batch Execution Service endpoint. Keys must match the names of web service + parameters defined in the published Azure ML web service. Values will be + passed in the GlobalParameters property of the Azure ML batch execution + request. + :type global_parameters: dict[str, object] + :param web_service_outputs: Key,Value pairs, mapping the names of Azure ML + endpoint's Web Service Outputs to AzureMLWebServiceFile objects specifying + the output Blob locations. This information will be passed in the + WebServiceOutputs property of the Azure ML batch execution request. + :type web_service_outputs: dict[str, + ~azure.mgmt.datafactory.models.AzureMLWebServiceFile] + :param web_service_inputs: Key,Value pairs, mapping the names of Azure ML + endpoint's Web Service Inputs to AzureMLWebServiceFile objects specifying + the input Blob locations.. This information will be passed in the + WebServiceInputs property of the Azure ML batch execution request. + :type web_service_inputs: dict[str, + ~azure.mgmt.datafactory.models.AzureMLWebServiceFile] + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'global_parameters': {'key': 'typeProperties.globalParameters', 'type': '{object}'}, + 'web_service_outputs': {'key': 'typeProperties.webServiceOutputs', 'type': '{AzureMLWebServiceFile}'}, + 'web_service_inputs': {'key': 'typeProperties.webServiceInputs', 'type': '{AzureMLWebServiceFile}'}, + } + + def __init__(self, **kwargs): + super(AzureMLBatchExecutionActivity, self).__init__(**kwargs) + self.global_parameters = kwargs.get('global_parameters', None) + self.web_service_outputs = kwargs.get('web_service_outputs', None) + self.web_service_inputs = kwargs.get('web_service_inputs', None) + self.type = 'AzureMLBatchExecution' + + +class AzureMLLinkedService(LinkedService): + """Azure ML Web Service linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param ml_endpoint: Required. The Batch Execution REST URL for an Azure ML + Web Service endpoint. Type: string (or Expression with resultType string). + :type ml_endpoint: object + :param api_key: Required. The API key for accessing the Azure ML model + endpoint. + :type api_key: ~azure.mgmt.datafactory.models.SecretBase + :param update_resource_endpoint: The Update Resource REST URL for an Azure + ML Web Service endpoint. Type: string (or Expression with resultType + string). + :type update_resource_endpoint: object + :param service_principal_id: The ID of the service principal used to + authenticate against the ARM-based updateResourceEndpoint of an Azure ML + web service. Type: string (or Expression with resultType string). + :type service_principal_id: object + :param service_principal_key: The key of the service principal used to + authenticate against the ARM-based updateResourceEndpoint of an Azure ML + web service. + :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase + :param tenant: The name or ID of the tenant to which the service principal + belongs. Type: string (or Expression with resultType string). + :type tenant: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'ml_endpoint': {'required': True}, + 'api_key': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'ml_endpoint': {'key': 'typeProperties.mlEndpoint', 'type': 'object'}, + 'api_key': {'key': 'typeProperties.apiKey', 'type': 'SecretBase'}, + 'update_resource_endpoint': {'key': 'typeProperties.updateResourceEndpoint', 'type': 'object'}, + 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, + 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, + 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureMLLinkedService, self).__init__(**kwargs) + self.ml_endpoint = kwargs.get('ml_endpoint', None) + self.api_key = kwargs.get('api_key', None) + self.update_resource_endpoint = kwargs.get('update_resource_endpoint', None) + self.service_principal_id = kwargs.get('service_principal_id', None) + self.service_principal_key = kwargs.get('service_principal_key', None) + self.tenant = kwargs.get('tenant', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'AzureML' + + +class AzureMLUpdateResourceActivity(ExecutionActivity): + """Azure ML Update Resource management activity. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param trained_model_name: Required. Name of the Trained Model module in + the Web Service experiment to be updated. Type: string (or Expression with + resultType string). + :type trained_model_name: object + :param trained_model_linked_service_name: Required. Name of Azure Storage + linked service holding the .ilearner file that will be uploaded by the + update operation. + :type trained_model_linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param trained_model_file_path: Required. The relative file path in + trainedModelLinkedService to represent the .ilearner file that will be + uploaded by the update operation. Type: string (or Expression with + resultType string). + :type trained_model_file_path: object + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'trained_model_name': {'required': True}, + 'trained_model_linked_service_name': {'required': True}, + 'trained_model_file_path': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'trained_model_name': {'key': 'typeProperties.trainedModelName', 'type': 'object'}, + 'trained_model_linked_service_name': {'key': 'typeProperties.trainedModelLinkedServiceName', 'type': 'LinkedServiceReference'}, + 'trained_model_file_path': {'key': 'typeProperties.trainedModelFilePath', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureMLUpdateResourceActivity, self).__init__(**kwargs) + self.trained_model_name = kwargs.get('trained_model_name', None) + self.trained_model_linked_service_name = kwargs.get('trained_model_linked_service_name', None) + self.trained_model_file_path = kwargs.get('trained_model_file_path', None) + self.type = 'AzureMLUpdateResource' + + +class AzureMLWebServiceFile(Model): + """Azure ML WebService Input/Output file. + + All required parameters must be populated in order to send to Azure. + + :param file_path: Required. The relative file path, including container + name, in the Azure Blob Storage specified by the LinkedService. Type: + string (or Expression with resultType string). + :type file_path: object + :param linked_service_name: Required. Reference to an Azure Storage + LinkedService, where Azure ML WebService Input/Output file located. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + """ + + _validation = { + 'file_path': {'required': True}, + 'linked_service_name': {'required': True}, + } + + _attribute_map = { + 'file_path': {'key': 'filePath', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + } + + def __init__(self, **kwargs): + super(AzureMLWebServiceFile, self).__init__(**kwargs) + self.file_path = kwargs.get('file_path', None) + self.linked_service_name = kwargs.get('linked_service_name', None) + + +class AzureMySqlLinkedService(LinkedService): + """Azure MySQL database linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: Required. The connection string. Type: string, + SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param password: The Azure key vault secret reference of password in + connection string. + :type password: + ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'connection_string': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'AzureKeyVaultSecretReference'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureMySqlLinkedService, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.password = kwargs.get('password', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'AzureMySql' + + +class AzureMySqlSource(CopySource): + """A copy activity Azure MySQL source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: Database query. Type: string (or Expression with resultType + string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureMySqlSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'AzureMySqlSource' + + +class AzureMySqlTableDataset(Dataset): + """The Azure MySQL database dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The Azure MySQL database table name. Type: string (or + Expression with resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureMySqlTableDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.type = 'AzureMySqlTable' + + +class AzurePostgreSqlLinkedService(LinkedService): + """Azure PostgreSQL linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: An ODBC connection string. Type: string, + SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param password: The Azure key vault secret reference of password in + connection string. + :type password: + ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'AzureKeyVaultSecretReference'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzurePostgreSqlLinkedService, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.password = kwargs.get('password', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'AzurePostgreSql' + + +class AzurePostgreSqlSink(CopySink): + """A copy activity Azure PostgreSQL sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param pre_copy_script: A query to execute before starting the copy. Type: + string (or Expression with resultType string). + :type pre_copy_script: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'pre_copy_script': {'key': 'preCopyScript', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzurePostgreSqlSink, self).__init__(**kwargs) + self.pre_copy_script = kwargs.get('pre_copy_script', None) + self.type = 'AzurePostgreSqlSink' + + +class AzurePostgreSqlSource(CopySource): + """A copy activity Azure PostgreSQL source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzurePostgreSqlSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'AzurePostgreSqlSource' + + +class AzurePostgreSqlTableDataset(Dataset): + """Azure PostgreSQL dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name of the Azure PostgreSQL database which + includes both schema and table. Type: string (or Expression with + resultType string). + :type table_name: object + :param table: The table name of the Azure PostgreSQL database. Type: + string (or Expression with resultType string). + :type table: object + :param azure_postgre_sql_table_dataset_schema: The schema name of the + Azure PostgreSQL database. Type: string (or Expression with resultType + string). + :type azure_postgre_sql_table_dataset_schema: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + 'table': {'key': 'typeProperties.table', 'type': 'object'}, + 'azure_postgre_sql_table_dataset_schema': {'key': 'typeProperties.schema', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzurePostgreSqlTableDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.table = kwargs.get('table', None) + self.azure_postgre_sql_table_dataset_schema = kwargs.get('azure_postgre_sql_table_dataset_schema', None) + self.type = 'AzurePostgreSqlTable' + + +class AzureQueueSink(CopySink): + """A copy activity Azure Queue sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureQueueSink, self).__init__(**kwargs) + self.type = 'AzureQueueSink' + + +class AzureSearchIndexDataset(Dataset): + """The Azure Search Index. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param index_name: Required. The name of the Azure Search Index. Type: + string (or Expression with resultType string). + :type index_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + 'index_name': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'index_name': {'key': 'typeProperties.indexName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureSearchIndexDataset, self).__init__(**kwargs) + self.index_name = kwargs.get('index_name', None) + self.type = 'AzureSearchIndex' + + +class AzureSearchIndexSink(CopySink): + """A copy activity Azure Search Index sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param write_behavior: Specify the write behavior when upserting documents + into Azure Search Index. Possible values include: 'Merge', 'Upload' + :type write_behavior: str or + ~azure.mgmt.datafactory.models.AzureSearchIndexWriteBehaviorType + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'write_behavior': {'key': 'writeBehavior', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureSearchIndexSink, self).__init__(**kwargs) + self.write_behavior = kwargs.get('write_behavior', None) + self.type = 'AzureSearchIndexSink' + + +class AzureSearchLinkedService(LinkedService): + """Linked service for Windows Azure Search Service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param url: Required. URL for Azure Search service. Type: string (or + Expression with resultType string). + :type url: object + :param key: Admin Key for Azure Search service + :type key: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'url': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'url': {'key': 'typeProperties.url', 'type': 'object'}, + 'key': {'key': 'typeProperties.key', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureSearchLinkedService, self).__init__(**kwargs) + self.url = kwargs.get('url', None) + self.key = kwargs.get('key', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'AzureSearch' + + +class AzureSqlDatabaseLinkedService(LinkedService): + """Microsoft Azure SQL Database linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: Required. The connection string. Type: string, + SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param password: The Azure key vault secret reference of password in + connection string. + :type password: + ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param service_principal_id: The ID of the service principal used to + authenticate against Azure SQL Database. Type: string (or Expression with + resultType string). + :type service_principal_id: object + :param service_principal_key: The key of the service principal used to + authenticate against Azure SQL Database. + :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase + :param tenant: The name or ID of the tenant to which the service principal + belongs. Type: string (or Expression with resultType string). + :type tenant: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'connection_string': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'AzureKeyVaultSecretReference'}, + 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, + 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, + 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureSqlDatabaseLinkedService, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.password = kwargs.get('password', None) + self.service_principal_id = kwargs.get('service_principal_id', None) + self.service_principal_key = kwargs.get('service_principal_key', None) + self.tenant = kwargs.get('tenant', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'AzureSqlDatabase' + + +class AzureSqlDWLinkedService(LinkedService): + """Azure SQL Data Warehouse linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: Required. The connection string. Type: string, + SecureString or AzureKeyVaultSecretReference. Type: string, SecureString + or AzureKeyVaultSecretReference. + :type connection_string: object + :param password: The Azure key vault secret reference of password in + connection string. + :type password: + ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param service_principal_id: The ID of the service principal used to + authenticate against Azure SQL Data Warehouse. Type: string (or Expression + with resultType string). + :type service_principal_id: object + :param service_principal_key: The key of the service principal used to + authenticate against Azure SQL Data Warehouse. + :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase + :param tenant: The name or ID of the tenant to which the service principal + belongs. Type: string (or Expression with resultType string). + :type tenant: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'connection_string': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'AzureKeyVaultSecretReference'}, + 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, + 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, + 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureSqlDWLinkedService, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.password = kwargs.get('password', None) + self.service_principal_id = kwargs.get('service_principal_id', None) + self.service_principal_key = kwargs.get('service_principal_key', None) + self.tenant = kwargs.get('tenant', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'AzureSqlDW' + + +class AzureSqlDWTableDataset(Dataset): + """The Azure SQL Data Warehouse dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: This property will be retired. Please consider using + schema + table properties instead. + :type table_name: object + :param azure_sql_dw_table_dataset_schema: The schema name of the Azure SQL + Data Warehouse. Type: string (or Expression with resultType string). + :type azure_sql_dw_table_dataset_schema: object + :param table: The table name of the Azure SQL Data Warehouse. Type: string + (or Expression with resultType string). + :type table: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + 'azure_sql_dw_table_dataset_schema': {'key': 'typeProperties.schema', 'type': 'object'}, + 'table': {'key': 'typeProperties.table', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureSqlDWTableDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.azure_sql_dw_table_dataset_schema = kwargs.get('azure_sql_dw_table_dataset_schema', None) + self.table = kwargs.get('table', None) + self.type = 'AzureSqlDWTable' + + +class AzureSqlMILinkedService(LinkedService): + """Azure SQL Managed Instance linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: Required. The connection string. Type: string, + SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param password: The Azure key vault secret reference of password in + connection string. + :type password: + ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param service_principal_id: The ID of the service principal used to + authenticate against Azure SQL Managed Instance. Type: string (or + Expression with resultType string). + :type service_principal_id: object + :param service_principal_key: The key of the service principal used to + authenticate against Azure SQL Managed Instance. + :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase + :param tenant: The name or ID of the tenant to which the service principal + belongs. Type: string (or Expression with resultType string). + :type tenant: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'connection_string': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'AzureKeyVaultSecretReference'}, + 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, + 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, + 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureSqlMILinkedService, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.password = kwargs.get('password', None) + self.service_principal_id = kwargs.get('service_principal_id', None) + self.service_principal_key = kwargs.get('service_principal_key', None) + self.tenant = kwargs.get('tenant', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'AzureSqlMI' + + +class AzureSqlMITableDataset(Dataset): + """The Azure SQL Managed Instance dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: This property will be retired. Please consider using + schema + table properties instead. + :type table_name: object + :param azure_sql_mi_table_dataset_schema: The schema name of the Azure SQL + Managed Instance. Type: string (or Expression with resultType string). + :type azure_sql_mi_table_dataset_schema: object + :param table: The table name of the Azure SQL Managed Instance dataset. + Type: string (or Expression with resultType string). + :type table: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + 'azure_sql_mi_table_dataset_schema': {'key': 'typeProperties.schema', 'type': 'object'}, + 'table': {'key': 'typeProperties.table', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureSqlMITableDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.azure_sql_mi_table_dataset_schema = kwargs.get('azure_sql_mi_table_dataset_schema', None) + self.table = kwargs.get('table', None) + self.type = 'AzureSqlMITable' + + +class AzureSqlSink(CopySink): + """A copy activity Azure SQL sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param sql_writer_stored_procedure_name: SQL writer stored procedure name. + Type: string (or Expression with resultType string). + :type sql_writer_stored_procedure_name: object + :param sql_writer_table_type: SQL writer table type. Type: string (or + Expression with resultType string). + :type sql_writer_table_type: object + :param pre_copy_script: SQL pre-copy script. Type: string (or Expression + with resultType string). + :type pre_copy_script: object + :param stored_procedure_parameters: SQL stored procedure parameters. + :type stored_procedure_parameters: dict[str, + ~azure.mgmt.datafactory.models.StoredProcedureParameter] + :param stored_procedure_table_type_parameter_name: The stored procedure + parameter name of the table type. Type: string (or Expression with + resultType string). + :type stored_procedure_table_type_parameter_name: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sql_writer_stored_procedure_name': {'key': 'sqlWriterStoredProcedureName', 'type': 'object'}, + 'sql_writer_table_type': {'key': 'sqlWriterTableType', 'type': 'object'}, + 'pre_copy_script': {'key': 'preCopyScript', 'type': 'object'}, + 'stored_procedure_parameters': {'key': 'storedProcedureParameters', 'type': '{StoredProcedureParameter}'}, + 'stored_procedure_table_type_parameter_name': {'key': 'storedProcedureTableTypeParameterName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureSqlSink, self).__init__(**kwargs) + self.sql_writer_stored_procedure_name = kwargs.get('sql_writer_stored_procedure_name', None) + self.sql_writer_table_type = kwargs.get('sql_writer_table_type', None) + self.pre_copy_script = kwargs.get('pre_copy_script', None) + self.stored_procedure_parameters = kwargs.get('stored_procedure_parameters', None) + self.stored_procedure_table_type_parameter_name = kwargs.get('stored_procedure_table_type_parameter_name', None) + self.type = 'AzureSqlSink' + + +class AzureSqlSource(CopySource): + """A copy activity Azure SQL source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param sql_reader_query: SQL reader query. Type: string (or Expression + with resultType string). + :type sql_reader_query: object + :param sql_reader_stored_procedure_name: Name of the stored procedure for + a SQL Database source. This cannot be used at the same time as + SqlReaderQuery. Type: string (or Expression with resultType string). + :type sql_reader_stored_procedure_name: object + :param stored_procedure_parameters: Value and type setting for stored + procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". + :type stored_procedure_parameters: dict[str, + ~azure.mgmt.datafactory.models.StoredProcedureParameter] + :param produce_additional_types: Which additional types to produce. + :type produce_additional_types: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sql_reader_query': {'key': 'sqlReaderQuery', 'type': 'object'}, + 'sql_reader_stored_procedure_name': {'key': 'sqlReaderStoredProcedureName', 'type': 'object'}, + 'stored_procedure_parameters': {'key': 'storedProcedureParameters', 'type': '{StoredProcedureParameter}'}, + 'produce_additional_types': {'key': 'produceAdditionalTypes', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureSqlSource, self).__init__(**kwargs) + self.sql_reader_query = kwargs.get('sql_reader_query', None) + self.sql_reader_stored_procedure_name = kwargs.get('sql_reader_stored_procedure_name', None) + self.stored_procedure_parameters = kwargs.get('stored_procedure_parameters', None) + self.produce_additional_types = kwargs.get('produce_additional_types', None) + self.type = 'AzureSqlSource' + + +class AzureSqlTableDataset(Dataset): + """The Azure SQL Server database dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: This property will be retired. Please consider using + schema + table properties instead. + :type table_name: object + :param azure_sql_table_dataset_schema: The schema name of the Azure SQL + database. Type: string (or Expression with resultType string). + :type azure_sql_table_dataset_schema: object + :param table: The table name of the Azure SQL database. Type: string (or + Expression with resultType string). + :type table: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + 'azure_sql_table_dataset_schema': {'key': 'typeProperties.schema', 'type': 'object'}, + 'table': {'key': 'typeProperties.table', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureSqlTableDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.azure_sql_table_dataset_schema = kwargs.get('azure_sql_table_dataset_schema', None) + self.table = kwargs.get('table', None) + self.type = 'AzureSqlTable' + + +class AzureStorageLinkedService(LinkedService): + """The storage account linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: The connection string. It is mutually exclusive + with sasUri property. Type: string, SecureString or + AzureKeyVaultSecretReference. + :type connection_string: object + :param account_key: The Azure key vault secret reference of accountKey in + connection string. + :type account_key: + ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param sas_uri: SAS URI of the Azure Storage resource. It is mutually + exclusive with connectionString property. Type: string, SecureString or + AzureKeyVaultSecretReference. + :type sas_uri: object + :param sas_token: The Azure key vault secret reference of sasToken in sas + uri. + :type sas_token: + ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'account_key': {'key': 'typeProperties.accountKey', 'type': 'AzureKeyVaultSecretReference'}, + 'sas_uri': {'key': 'typeProperties.sasUri', 'type': 'object'}, + 'sas_token': {'key': 'typeProperties.sasToken', 'type': 'AzureKeyVaultSecretReference'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureStorageLinkedService, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.account_key = kwargs.get('account_key', None) + self.sas_uri = kwargs.get('sas_uri', None) + self.sas_token = kwargs.get('sas_token', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'AzureStorage' + + +class AzureTableDataset(Dataset): + """The Azure Table storage dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: Required. The table name of the Azure Table storage. + Type: string (or Expression with resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + 'table_name': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureTableDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.type = 'AzureTable' + + +class AzureTableSink(CopySink): + """A copy activity Azure Table sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param azure_table_default_partition_key_value: Azure Table default + partition key value. Type: string (or Expression with resultType string). + :type azure_table_default_partition_key_value: object + :param azure_table_partition_key_name: Azure Table partition key name. + Type: string (or Expression with resultType string). + :type azure_table_partition_key_name: object + :param azure_table_row_key_name: Azure Table row key name. Type: string + (or Expression with resultType string). + :type azure_table_row_key_name: object + :param azure_table_insert_type: Azure Table insert type. Type: string (or + Expression with resultType string). + :type azure_table_insert_type: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'azure_table_default_partition_key_value': {'key': 'azureTableDefaultPartitionKeyValue', 'type': 'object'}, + 'azure_table_partition_key_name': {'key': 'azureTablePartitionKeyName', 'type': 'object'}, + 'azure_table_row_key_name': {'key': 'azureTableRowKeyName', 'type': 'object'}, + 'azure_table_insert_type': {'key': 'azureTableInsertType', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureTableSink, self).__init__(**kwargs) + self.azure_table_default_partition_key_value = kwargs.get('azure_table_default_partition_key_value', None) + self.azure_table_partition_key_name = kwargs.get('azure_table_partition_key_name', None) + self.azure_table_row_key_name = kwargs.get('azure_table_row_key_name', None) + self.azure_table_insert_type = kwargs.get('azure_table_insert_type', None) + self.type = 'AzureTableSink' + + +class AzureTableSource(CopySource): + """A copy activity Azure Table source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param azure_table_source_query: Azure Table source query. Type: string + (or Expression with resultType string). + :type azure_table_source_query: object + :param azure_table_source_ignore_table_not_found: Azure Table source + ignore table not found. Type: boolean (or Expression with resultType + boolean). + :type azure_table_source_ignore_table_not_found: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'azure_table_source_query': {'key': 'azureTableSourceQuery', 'type': 'object'}, + 'azure_table_source_ignore_table_not_found': {'key': 'azureTableSourceIgnoreTableNotFound', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AzureTableSource, self).__init__(**kwargs) + self.azure_table_source_query = kwargs.get('azure_table_source_query', None) + self.azure_table_source_ignore_table_not_found = kwargs.get('azure_table_source_ignore_table_not_found', None) + self.type = 'AzureTableSource' + + +class AzureTableStorageLinkedService(LinkedService): + """The azure table storage linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: The connection string. It is mutually exclusive + with sasUri property. Type: string, SecureString or + AzureKeyVaultSecretReference. + :type connection_string: object + :param account_key: The Azure key vault secret reference of accountKey in + connection string. + :type account_key: + ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param sas_uri: SAS URI of the Azure Storage resource. It is mutually + exclusive with connectionString property. Type: string, SecureString or + AzureKeyVaultSecretReference. + :type sas_uri: object + :param sas_token: The Azure key vault secret reference of sasToken in sas + uri. + :type sas_token: + ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'account_key': {'key': 'typeProperties.accountKey', 'type': 'AzureKeyVaultSecretReference'}, + 'sas_uri': {'key': 'typeProperties.sasUri', 'type': 'object'}, + 'sas_token': {'key': 'typeProperties.sasToken', 'type': 'AzureKeyVaultSecretReference'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureTableStorageLinkedService, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.account_key = kwargs.get('account_key', None) + self.sas_uri = kwargs.get('sas_uri', None) + self.sas_token = kwargs.get('sas_token', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'AzureTableStorage' + + +class BinaryDataset(Dataset): + """Binary dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param location: Required. The location of the Binary storage. + :type location: ~azure.mgmt.datafactory.models.DatasetLocation + :param compression: The data compression method used for the binary + dataset. + :type compression: ~azure.mgmt.datafactory.models.DatasetCompression + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'typeProperties.location', 'type': 'DatasetLocation'}, + 'compression': {'key': 'typeProperties.compression', 'type': 'DatasetCompression'}, + } + + def __init__(self, **kwargs): + super(BinaryDataset, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.compression = kwargs.get('compression', None) + self.type = 'Binary' + + +class BinarySink(CopySink): + """A copy activity Binary sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param store_settings: Binary store settings. + :type store_settings: ~azure.mgmt.datafactory.models.StoreReadSettings + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'store_settings': {'key': 'storeSettings', 'type': 'StoreReadSettings'}, + } + + def __init__(self, **kwargs): + super(BinarySink, self).__init__(**kwargs) + self.store_settings = kwargs.get('store_settings', None) + self.type = 'BinarySink' + + +class BinarySource(CopySource): + """A copy activity Binary source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param store_settings: Binary store settings. + :type store_settings: ~azure.mgmt.datafactory.models.StoreReadSettings + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'store_settings': {'key': 'storeSettings', 'type': 'StoreReadSettings'}, + } + + def __init__(self, **kwargs): + super(BinarySource, self).__init__(**kwargs) + self.store_settings = kwargs.get('store_settings', None) + self.type = 'BinarySource' + + +class Trigger(Model): + """Azure data factory nested object which contains information about creating + pipeline run. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: RerunTumblingWindowTrigger, TumblingWindowTrigger, + MultiplePipelineTrigger + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Trigger description. + :type description: str + :ivar runtime_state: Indicates if trigger is running or not. Updated when + Start/Stop APIs are called on the Trigger. Possible values include: + 'Started', 'Stopped', 'Disabled' + :vartype runtime_state: str or + ~azure.mgmt.datafactory.models.TriggerRuntimeState + :param annotations: List of tags that can be used for describing the + trigger. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'runtime_state': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'runtime_state': {'key': 'runtimeState', 'type': 'str'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'RerunTumblingWindowTrigger': 'RerunTumblingWindowTrigger', 'TumblingWindowTrigger': 'TumblingWindowTrigger', 'MultiplePipelineTrigger': 'MultiplePipelineTrigger'} + } + + def __init__(self, **kwargs): + super(Trigger, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.description = kwargs.get('description', None) + self.runtime_state = None + self.annotations = kwargs.get('annotations', None) + self.type = None + + +class MultiplePipelineTrigger(Trigger): + """Base class for all triggers that support one to many model for trigger to + pipeline. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: BlobEventsTrigger, BlobTrigger, ScheduleTrigger + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Trigger description. + :type description: str + :ivar runtime_state: Indicates if trigger is running or not. Updated when + Start/Stop APIs are called on the Trigger. Possible values include: + 'Started', 'Stopped', 'Disabled' + :vartype runtime_state: str or + ~azure.mgmt.datafactory.models.TriggerRuntimeState + :param annotations: List of tags that can be used for describing the + trigger. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param pipelines: Pipelines that need to be started. + :type pipelines: + list[~azure.mgmt.datafactory.models.TriggerPipelineReference] + """ + + _validation = { + 'runtime_state': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'runtime_state': {'key': 'runtimeState', 'type': 'str'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'pipelines': {'key': 'pipelines', 'type': '[TriggerPipelineReference]'}, + } + + _subtype_map = { + 'type': {'BlobEventsTrigger': 'BlobEventsTrigger', 'BlobTrigger': 'BlobTrigger', 'ScheduleTrigger': 'ScheduleTrigger'} + } + + def __init__(self, **kwargs): + super(MultiplePipelineTrigger, self).__init__(**kwargs) + self.pipelines = kwargs.get('pipelines', None) + self.type = 'MultiplePipelineTrigger' + + +class BlobEventsTrigger(MultiplePipelineTrigger): + """Trigger that runs every time a Blob event occurs. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Trigger description. + :type description: str + :ivar runtime_state: Indicates if trigger is running or not. Updated when + Start/Stop APIs are called on the Trigger. Possible values include: + 'Started', 'Stopped', 'Disabled' + :vartype runtime_state: str or + ~azure.mgmt.datafactory.models.TriggerRuntimeState + :param annotations: List of tags that can be used for describing the + trigger. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param pipelines: Pipelines that need to be started. + :type pipelines: + list[~azure.mgmt.datafactory.models.TriggerPipelineReference] + :param blob_path_begins_with: The blob path must begin with the pattern + provided for trigger to fire. For example, '/records/blobs/december/' will + only fire the trigger for blobs in the december folder under the records + container. At least one of these must be provided: blobPathBeginsWith, + blobPathEndsWith. + :type blob_path_begins_with: str + :param blob_path_ends_with: The blob path must end with the pattern + provided for trigger to fire. For example, 'december/boxes.csv' will only + fire the trigger for blobs named boxes in a december folder. At least one + of these must be provided: blobPathBeginsWith, blobPathEndsWith. + :type blob_path_ends_with: str + :param events: Required. The type of events that cause this trigger to + fire. + :type events: list[str or ~azure.mgmt.datafactory.models.BlobEventTypes] + :param scope: Required. The ARM resource ID of the Storage Account. + :type scope: str + """ + + _validation = { + 'runtime_state': {'readonly': True}, + 'type': {'required': True}, + 'events': {'required': True}, + 'scope': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'runtime_state': {'key': 'runtimeState', 'type': 'str'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'pipelines': {'key': 'pipelines', 'type': '[TriggerPipelineReference]'}, + 'blob_path_begins_with': {'key': 'typeProperties.blobPathBeginsWith', 'type': 'str'}, + 'blob_path_ends_with': {'key': 'typeProperties.blobPathEndsWith', 'type': 'str'}, + 'events': {'key': 'typeProperties.events', 'type': '[str]'}, + 'scope': {'key': 'typeProperties.scope', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BlobEventsTrigger, self).__init__(**kwargs) + self.blob_path_begins_with = kwargs.get('blob_path_begins_with', None) + self.blob_path_ends_with = kwargs.get('blob_path_ends_with', None) + self.events = kwargs.get('events', None) + self.scope = kwargs.get('scope', None) + self.type = 'BlobEventsTrigger' + + +class BlobSink(CopySink): + """A copy activity Azure Blob sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param blob_writer_overwrite_files: Blob writer overwrite files. Type: + boolean (or Expression with resultType boolean). + :type blob_writer_overwrite_files: object + :param blob_writer_date_time_format: Blob writer date time format. Type: + string (or Expression with resultType string). + :type blob_writer_date_time_format: object + :param blob_writer_add_header: Blob writer add header. Type: boolean (or + Expression with resultType boolean). + :type blob_writer_add_header: object + :param copy_behavior: The type of copy behavior for copy sink. + :type copy_behavior: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'blob_writer_overwrite_files': {'key': 'blobWriterOverwriteFiles', 'type': 'object'}, + 'blob_writer_date_time_format': {'key': 'blobWriterDateTimeFormat', 'type': 'object'}, + 'blob_writer_add_header': {'key': 'blobWriterAddHeader', 'type': 'object'}, + 'copy_behavior': {'key': 'copyBehavior', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(BlobSink, self).__init__(**kwargs) + self.blob_writer_overwrite_files = kwargs.get('blob_writer_overwrite_files', None) + self.blob_writer_date_time_format = kwargs.get('blob_writer_date_time_format', None) + self.blob_writer_add_header = kwargs.get('blob_writer_add_header', None) + self.copy_behavior = kwargs.get('copy_behavior', None) + self.type = 'BlobSink' + + +class BlobSource(CopySource): + """A copy activity Azure Blob source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param treat_empty_as_null: Treat empty as null. Type: boolean (or + Expression with resultType boolean). + :type treat_empty_as_null: object + :param skip_header_line_count: Number of header lines to skip from each + blob. Type: integer (or Expression with resultType integer). + :type skip_header_line_count: object + :param recursive: If true, files under the folder path will be read + recursively. Default is true. Type: boolean (or Expression with resultType + boolean). + :type recursive: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'treat_empty_as_null': {'key': 'treatEmptyAsNull', 'type': 'object'}, + 'skip_header_line_count': {'key': 'skipHeaderLineCount', 'type': 'object'}, + 'recursive': {'key': 'recursive', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(BlobSource, self).__init__(**kwargs) + self.treat_empty_as_null = kwargs.get('treat_empty_as_null', None) + self.skip_header_line_count = kwargs.get('skip_header_line_count', None) + self.recursive = kwargs.get('recursive', None) + self.type = 'BlobSource' + + +class BlobTrigger(MultiplePipelineTrigger): + """Trigger that runs every time the selected Blob container changes. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Trigger description. + :type description: str + :ivar runtime_state: Indicates if trigger is running or not. Updated when + Start/Stop APIs are called on the Trigger. Possible values include: + 'Started', 'Stopped', 'Disabled' + :vartype runtime_state: str or + ~azure.mgmt.datafactory.models.TriggerRuntimeState + :param annotations: List of tags that can be used for describing the + trigger. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param pipelines: Pipelines that need to be started. + :type pipelines: + list[~azure.mgmt.datafactory.models.TriggerPipelineReference] + :param folder_path: Required. The path of the container/folder that will + trigger the pipeline. + :type folder_path: str + :param max_concurrency: Required. The max number of parallel files to + handle when it is triggered. + :type max_concurrency: int + :param linked_service: Required. The Azure Storage linked service + reference. + :type linked_service: + ~azure.mgmt.datafactory.models.LinkedServiceReference + """ + + _validation = { + 'runtime_state': {'readonly': True}, + 'type': {'required': True}, + 'folder_path': {'required': True}, + 'max_concurrency': {'required': True}, + 'linked_service': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'runtime_state': {'key': 'runtimeState', 'type': 'str'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'pipelines': {'key': 'pipelines', 'type': '[TriggerPipelineReference]'}, + 'folder_path': {'key': 'typeProperties.folderPath', 'type': 'str'}, + 'max_concurrency': {'key': 'typeProperties.maxConcurrency', 'type': 'int'}, + 'linked_service': {'key': 'typeProperties.linkedService', 'type': 'LinkedServiceReference'}, + } + + def __init__(self, **kwargs): + super(BlobTrigger, self).__init__(**kwargs) + self.folder_path = kwargs.get('folder_path', None) + self.max_concurrency = kwargs.get('max_concurrency', None) + self.linked_service = kwargs.get('linked_service', None) + self.type = 'BlobTrigger' + + +class CassandraLinkedService(LinkedService): + """Linked service for Cassandra data source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param host: Required. Host name for connection. Type: string (or + Expression with resultType string). + :type host: object + :param authentication_type: AuthenticationType to be used for connection. + Type: string (or Expression with resultType string). + :type authentication_type: object + :param port: The port for the connection. Type: integer (or Expression + with resultType integer). + :type port: object + :param username: Username for authentication. Type: string (or Expression + with resultType string). + :type username: object + :param password: Password for authentication. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'host': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'host': {'key': 'typeProperties.host', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'object'}, + 'port': {'key': 'typeProperties.port', 'type': 'object'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(CassandraLinkedService, self).__init__(**kwargs) + self.host = kwargs.get('host', None) + self.authentication_type = kwargs.get('authentication_type', None) + self.port = kwargs.get('port', None) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'Cassandra' + + +class CassandraSource(CopySource): + """A copy activity source for a Cassandra database. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: Database query. Should be a SQL-92 query expression or + Cassandra Query Language (CQL) command. Type: string (or Expression with + resultType string). + :type query: object + :param consistency_level: The consistency level specifies how many + Cassandra servers must respond to a read request before returning data to + the client application. Cassandra checks the specified number of Cassandra + servers for data to satisfy the read request. Must be one of + cassandraSourceReadConsistencyLevels. The default value is 'ONE'. It is + case-insensitive. Possible values include: 'ALL', 'EACH_QUORUM', 'QUORUM', + 'LOCAL_QUORUM', 'ONE', 'TWO', 'THREE', 'LOCAL_ONE', 'SERIAL', + 'LOCAL_SERIAL' + :type consistency_level: str or + ~azure.mgmt.datafactory.models.CassandraSourceReadConsistencyLevels + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + 'consistency_level': {'key': 'consistencyLevel', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CassandraSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.consistency_level = kwargs.get('consistency_level', None) + self.type = 'CassandraSource' + + +class CassandraTableDataset(Dataset): + """The Cassandra database dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name of the Cassandra database. Type: string + (or Expression with resultType string). + :type table_name: object + :param keyspace: The keyspace of the Cassandra database. Type: string (or + Expression with resultType string). + :type keyspace: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + 'keyspace': {'key': 'typeProperties.keyspace', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(CassandraTableDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.keyspace = kwargs.get('keyspace', None) + self.type = 'CassandraTable' + + +class CloudError(Model): + """The object that defines the structure of an Azure Data Factory error + response. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. Error code. + :type code: str + :param message: Required. Error message. + :type message: str + :param target: Property name/path in request associated with error. + :type target: str + :param details: Array with additional error details. + :type details: list[~azure.mgmt.datafactory.models.CloudError] + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'error.code', 'type': 'str'}, + 'message': {'key': 'error.message', 'type': 'str'}, + 'target': {'key': 'error.target', 'type': 'str'}, + 'details': {'key': 'error.details', 'type': '[CloudError]'}, + } + + def __init__(self, **kwargs): + super(CloudError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class CommonDataServiceForAppsEntityDataset(Dataset): + """The Common Data Service for Apps entity dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param entity_name: The logical name of the entity. Type: string (or + Expression with resultType string). + :type entity_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'entity_name': {'key': 'typeProperties.entityName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(CommonDataServiceForAppsEntityDataset, self).__init__(**kwargs) + self.entity_name = kwargs.get('entity_name', None) + self.type = 'CommonDataServiceForAppsEntity' + + +class CommonDataServiceForAppsLinkedService(LinkedService): + """Common Data Service for Apps linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param deployment_type: Required. The deployment type of the Common Data + Service for Apps instance. 'Online' for Common Data Service for Apps + Online and 'OnPremisesWithIfd' for Common Data Service for Apps + on-premises with Ifd. Type: string (or Expression with resultType string). + Possible values include: 'Online', 'OnPremisesWithIfd' + :type deployment_type: str or + ~azure.mgmt.datafactory.models.DynamicsDeploymentType + :param host_name: The host name of the on-premises Common Data Service for + Apps server. The property is required for on-prem and not allowed for + online. Type: string (or Expression with resultType string). + :type host_name: object + :param port: The port of on-premises Common Data Service for Apps server. + The property is required for on-prem and not allowed for online. Default + is 443. Type: integer (or Expression with resultType integer), minimum: 0. + :type port: object + :param service_uri: The URL to the Microsoft Common Data Service for Apps + server. The property is required for on-line and not allowed for on-prem. + Type: string (or Expression with resultType string). + :type service_uri: object + :param organization_name: The organization name of the Common Data Service + for Apps instance. The property is required for on-prem and required for + online when there are more than one Common Data Service for Apps instances + associated with the user. Type: string (or Expression with resultType + string). + :type organization_name: object + :param authentication_type: Required. The authentication type to connect + to Common Data Service for Apps server. 'Office365' for online scenario, + 'Ifd' for on-premises with Ifd scenario. Type: string (or Expression with + resultType string). Possible values include: 'Office365', 'Ifd' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.DynamicsAuthenticationType + :param username: Required. User name to access the Common Data Service for + Apps instance. Type: string (or Expression with resultType string). + :type username: object + :param password: Password to access the Common Data Service for Apps + instance. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'deployment_type': {'required': True}, + 'authentication_type': {'required': True}, + 'username': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'deployment_type': {'key': 'typeProperties.deploymentType', 'type': 'str'}, + 'host_name': {'key': 'typeProperties.hostName', 'type': 'object'}, + 'port': {'key': 'typeProperties.port', 'type': 'object'}, + 'service_uri': {'key': 'typeProperties.serviceUri', 'type': 'object'}, + 'organization_name': {'key': 'typeProperties.organizationName', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(CommonDataServiceForAppsLinkedService, self).__init__(**kwargs) + self.deployment_type = kwargs.get('deployment_type', None) + self.host_name = kwargs.get('host_name', None) + self.port = kwargs.get('port', None) + self.service_uri = kwargs.get('service_uri', None) + self.organization_name = kwargs.get('organization_name', None) + self.authentication_type = kwargs.get('authentication_type', None) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'CommonDataServiceForApps' + + +class CommonDataServiceForAppsSink(CopySink): + """A copy activity Common Data Service for Apps sink. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :ivar write_behavior: Required. The write behavior for the operation. + Default value: "Upsert" . + :vartype write_behavior: str + :param ignore_null_values: The flag indicating whether to ignore null + values from input dataset (except key fields) during write operation. + Default is false. Type: boolean (or Expression with resultType boolean). + :type ignore_null_values: object + """ + + _validation = { + 'type': {'required': True}, + 'write_behavior': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'write_behavior': {'key': 'writeBehavior', 'type': 'str'}, + 'ignore_null_values': {'key': 'ignoreNullValues', 'type': 'object'}, + } + + write_behavior = "Upsert" + + def __init__(self, **kwargs): + super(CommonDataServiceForAppsSink, self).__init__(**kwargs) + self.ignore_null_values = kwargs.get('ignore_null_values', None) + self.type = 'CommonDataServiceForAppsSink' + + +class CommonDataServiceForAppsSource(CopySource): + """A copy activity Common Data Service for Apps source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: FetchXML is a proprietary query language that is used in + Microsoft Common Data Service for Apps (online & on-premises). Type: + string (or Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(CommonDataServiceForAppsSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'CommonDataServiceForAppsSource' + + +class ConcurLinkedService(LinkedService): + """Concur Service linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param client_id: Required. Application client_id supplied by Concur App + Management. + :type client_id: object + :param username: Required. The user name that you use to access Concur + Service. + :type username: object + :param password: The password corresponding to the user name that you + provided in the username field. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param use_encrypted_endpoints: Specifies whether the data source + endpoints are encrypted using HTTPS. The default value is true. + :type use_encrypted_endpoints: object + :param use_host_verification: Specifies whether to require the host name + in the server's certificate to match the host name of the server when + connecting over SSL. The default value is true. + :type use_host_verification: object + :param use_peer_verification: Specifies whether to verify the identity of + the server when connecting over SSL. The default value is true. + :type use_peer_verification: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'client_id': {'required': True}, + 'username': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, + 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, + 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ConcurLinkedService, self).__init__(**kwargs) + self.client_id = kwargs.get('client_id', None) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + self.use_encrypted_endpoints = kwargs.get('use_encrypted_endpoints', None) + self.use_host_verification = kwargs.get('use_host_verification', None) + self.use_peer_verification = kwargs.get('use_peer_verification', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'Concur' + + +class ConcurObjectDataset(Dataset): + """Concur Service dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ConcurObjectDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.type = 'ConcurObject' + + +class ConcurSource(CopySource): + """A copy activity Concur Service source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ConcurSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'ConcurSource' + + +class CopyActivity(ExecutionActivity): + """Copy activity. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param source: Required. Copy activity source. + :type source: ~azure.mgmt.datafactory.models.CopySource + :param sink: Required. Copy activity sink. + :type sink: ~azure.mgmt.datafactory.models.CopySink + :param translator: Copy activity translator. If not specified, tabular + translator is used. + :type translator: object + :param enable_staging: Specifies whether to copy data via an interim + staging. Default value is false. Type: boolean (or Expression with + resultType boolean). + :type enable_staging: object + :param staging_settings: Specifies interim staging settings when + EnableStaging is true. + :type staging_settings: ~azure.mgmt.datafactory.models.StagingSettings + :param parallel_copies: Maximum number of concurrent sessions opened on + the source or sink to avoid overloading the data store. Type: integer (or + Expression with resultType integer), minimum: 0. + :type parallel_copies: object + :param data_integration_units: Maximum number of data integration units + that can be used to perform this data movement. Type: integer (or + Expression with resultType integer), minimum: 0. + :type data_integration_units: object + :param enable_skip_incompatible_row: Whether to skip incompatible row. + Default value is false. Type: boolean (or Expression with resultType + boolean). + :type enable_skip_incompatible_row: object + :param redirect_incompatible_row_settings: Redirect incompatible row + settings when EnableSkipIncompatibleRow is true. + :type redirect_incompatible_row_settings: + ~azure.mgmt.datafactory.models.RedirectIncompatibleRowSettings + :param preserve_rules: Preserve Rules. + :type preserve_rules: list[object] + :param preserve: Preserve rules. + :type preserve: list[object] + :param inputs: List of inputs for the activity. + :type inputs: list[~azure.mgmt.datafactory.models.DatasetReference] + :param outputs: List of outputs for the activity. + :type outputs: list[~azure.mgmt.datafactory.models.DatasetReference] + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'source': {'required': True}, + 'sink': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'source': {'key': 'typeProperties.source', 'type': 'CopySource'}, + 'sink': {'key': 'typeProperties.sink', 'type': 'CopySink'}, + 'translator': {'key': 'typeProperties.translator', 'type': 'object'}, + 'enable_staging': {'key': 'typeProperties.enableStaging', 'type': 'object'}, + 'staging_settings': {'key': 'typeProperties.stagingSettings', 'type': 'StagingSettings'}, + 'parallel_copies': {'key': 'typeProperties.parallelCopies', 'type': 'object'}, + 'data_integration_units': {'key': 'typeProperties.dataIntegrationUnits', 'type': 'object'}, + 'enable_skip_incompatible_row': {'key': 'typeProperties.enableSkipIncompatibleRow', 'type': 'object'}, + 'redirect_incompatible_row_settings': {'key': 'typeProperties.redirectIncompatibleRowSettings', 'type': 'RedirectIncompatibleRowSettings'}, + 'preserve_rules': {'key': 'typeProperties.preserveRules', 'type': '[object]'}, + 'preserve': {'key': 'typeProperties.preserve', 'type': '[object]'}, + 'inputs': {'key': 'inputs', 'type': '[DatasetReference]'}, + 'outputs': {'key': 'outputs', 'type': '[DatasetReference]'}, + } + + def __init__(self, **kwargs): + super(CopyActivity, self).__init__(**kwargs) + self.source = kwargs.get('source', None) + self.sink = kwargs.get('sink', None) + self.translator = kwargs.get('translator', None) + self.enable_staging = kwargs.get('enable_staging', None) + self.staging_settings = kwargs.get('staging_settings', None) + self.parallel_copies = kwargs.get('parallel_copies', None) + self.data_integration_units = kwargs.get('data_integration_units', None) + self.enable_skip_incompatible_row = kwargs.get('enable_skip_incompatible_row', None) + self.redirect_incompatible_row_settings = kwargs.get('redirect_incompatible_row_settings', None) + self.preserve_rules = kwargs.get('preserve_rules', None) + self.preserve = kwargs.get('preserve', None) + self.inputs = kwargs.get('inputs', None) + self.outputs = kwargs.get('outputs', None) + self.type = 'Copy' + + +class CosmosDbLinkedService(LinkedService): + """Microsoft Azure Cosmos Database (CosmosDB) linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: Required. The connection string. Type: string, + SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param account_key: The Azure key vault secret reference of accountKey in + connection string. + :type account_key: + ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'connection_string': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'account_key': {'key': 'typeProperties.accountKey', 'type': 'AzureKeyVaultSecretReference'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(CosmosDbLinkedService, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.account_key = kwargs.get('account_key', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'CosmosDb' + + +class CosmosDbMongoDbApiCollectionDataset(Dataset): + """The CosmosDB (MongoDB API) database dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param collection: Required. The collection name of the CosmosDB (MongoDB + API) database. Type: string (or Expression with resultType string). + :type collection: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + 'collection': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'collection': {'key': 'typeProperties.collection', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(CosmosDbMongoDbApiCollectionDataset, self).__init__(**kwargs) + self.collection = kwargs.get('collection', None) + self.type = 'CosmosDbMongoDbApiCollection' + + +class CosmosDbMongoDbApiLinkedService(LinkedService): + """Linked service for CosmosDB (MongoDB API) data source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: Required. The CosmosDB (MongoDB API) connection + string. Type: string, SecureString or AzureKeyVaultSecretReference. Type: + string, SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param database: Required. The name of the CosmosDB (MongoDB API) database + that you want to access. Type: string (or Expression with resultType + string). + :type database: object + """ + + _validation = { + 'type': {'required': True}, + 'connection_string': {'required': True}, + 'database': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'database': {'key': 'typeProperties.database', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(CosmosDbMongoDbApiLinkedService, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.database = kwargs.get('database', None) + self.type = 'CosmosDbMongoDbApi' + + +class CosmosDbMongoDbApiSink(CopySink): + """A copy activity sink for a CosmosDB (MongoDB API) database. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param write_behavior: Specifies whether the document with same key to be + overwritten (upsert) rather than throw exception (insert). The default + value is "insert". Type: string (or Expression with resultType string). + Type: string (or Expression with resultType string). + :type write_behavior: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'write_behavior': {'key': 'writeBehavior', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(CosmosDbMongoDbApiSink, self).__init__(**kwargs) + self.write_behavior = kwargs.get('write_behavior', None) + self.type = 'CosmosDbMongoDbApiSink' + + +class CosmosDbMongoDbApiSource(CopySource): + """A copy activity source for a CosmosDB (MongoDB API) database. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param filter: Specifies selection filter using query operators. To return + all documents in a collection, omit this parameter or pass an empty + document ({}). Type: string (or Expression with resultType string). + :type filter: object + :param cursor_methods: Cursor methods for Mongodb query. + :type cursor_methods: + ~azure.mgmt.datafactory.models.MongoDbCursorMethodsProperties + :param batch_size: Specifies the number of documents to return in each + batch of the response from MongoDB instance. In most cases, modifying the + batch size will not affect the user or the application. This property's + main purpose is to avoid hit the limitation of response size. Type: + integer (or Expression with resultType integer). + :type batch_size: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'filter': {'key': 'filter', 'type': 'object'}, + 'cursor_methods': {'key': 'cursorMethods', 'type': 'MongoDbCursorMethodsProperties'}, + 'batch_size': {'key': 'batchSize', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(CosmosDbMongoDbApiSource, self).__init__(**kwargs) + self.filter = kwargs.get('filter', None) + self.cursor_methods = kwargs.get('cursor_methods', None) + self.batch_size = kwargs.get('batch_size', None) + self.type = 'CosmosDbMongoDbApiSource' + + +class CouchbaseLinkedService(LinkedService): + """Couchbase server linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: An ODBC connection string. Type: string, + SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param cred_string: The Azure key vault secret reference of credString in + connection string. + :type cred_string: + ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'cred_string': {'key': 'typeProperties.credString', 'type': 'AzureKeyVaultSecretReference'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(CouchbaseLinkedService, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.cred_string = kwargs.get('cred_string', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'Couchbase' + + +class CouchbaseSource(CopySource): + """A copy activity Couchbase server source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(CouchbaseSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'CouchbaseSource' + + +class CouchbaseTableDataset(Dataset): + """Couchbase server dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(CouchbaseTableDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.type = 'CouchbaseTable' + + +class CreateLinkedIntegrationRuntimeRequest(Model): + """The linked integration runtime information. + + :param name: The name of the linked integration runtime. + :type name: str + :param subscription_id: The ID of the subscription that the linked + integration runtime belongs to. + :type subscription_id: str + :param data_factory_name: The name of the data factory that the linked + integration runtime belongs to. + :type data_factory_name: str + :param data_factory_location: The location of the data factory that the + linked integration runtime belongs to. + :type data_factory_location: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'data_factory_name': {'key': 'dataFactoryName', 'type': 'str'}, + 'data_factory_location': {'key': 'dataFactoryLocation', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CreateLinkedIntegrationRuntimeRequest, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.data_factory_name = kwargs.get('data_factory_name', None) + self.data_factory_location = kwargs.get('data_factory_location', None) + + +class CreateRunResponse(Model): + """Response body with a run identifier. + + All required parameters must be populated in order to send to Azure. + + :param run_id: Required. Identifier of a run. + :type run_id: str + """ + + _validation = { + 'run_id': {'required': True}, + } + + _attribute_map = { + 'run_id': {'key': 'runId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CreateRunResponse, self).__init__(**kwargs) + self.run_id = kwargs.get('run_id', None) + + +class CustomActivity(ExecutionActivity): + """Custom activity type. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param command: Required. Command for custom activity Type: string (or + Expression with resultType string). + :type command: object + :param resource_linked_service: Resource linked service reference. + :type resource_linked_service: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param folder_path: Folder path for resource files Type: string (or + Expression with resultType string). + :type folder_path: object + :param reference_objects: Reference objects + :type reference_objects: + ~azure.mgmt.datafactory.models.CustomActivityReferenceObject + :param extended_properties: User defined property bag. There is no + restriction on the keys or values that can be used. The user specified + custom activity has the full responsibility to consume and interpret the + content defined. + :type extended_properties: dict[str, object] + :param retention_time_in_days: The retention time for the files submitted + for custom activity. Type: double (or Expression with resultType double). + :type retention_time_in_days: object + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'command': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'command': {'key': 'typeProperties.command', 'type': 'object'}, + 'resource_linked_service': {'key': 'typeProperties.resourceLinkedService', 'type': 'LinkedServiceReference'}, + 'folder_path': {'key': 'typeProperties.folderPath', 'type': 'object'}, + 'reference_objects': {'key': 'typeProperties.referenceObjects', 'type': 'CustomActivityReferenceObject'}, + 'extended_properties': {'key': 'typeProperties.extendedProperties', 'type': '{object}'}, + 'retention_time_in_days': {'key': 'typeProperties.retentionTimeInDays', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(CustomActivity, self).__init__(**kwargs) + self.command = kwargs.get('command', None) + self.resource_linked_service = kwargs.get('resource_linked_service', None) + self.folder_path = kwargs.get('folder_path', None) + self.reference_objects = kwargs.get('reference_objects', None) + self.extended_properties = kwargs.get('extended_properties', None) + self.retention_time_in_days = kwargs.get('retention_time_in_days', None) + self.type = 'Custom' + + +class CustomActivityReferenceObject(Model): + """Reference objects for custom activity. + + :param linked_services: Linked service references. + :type linked_services: + list[~azure.mgmt.datafactory.models.LinkedServiceReference] + :param datasets: Dataset references. + :type datasets: list[~azure.mgmt.datafactory.models.DatasetReference] + """ + + _attribute_map = { + 'linked_services': {'key': 'linkedServices', 'type': '[LinkedServiceReference]'}, + 'datasets': {'key': 'datasets', 'type': '[DatasetReference]'}, + } + + def __init__(self, **kwargs): + super(CustomActivityReferenceObject, self).__init__(**kwargs) + self.linked_services = kwargs.get('linked_services', None) + self.datasets = kwargs.get('datasets', None) + + +class CustomDataset(Dataset): + """The custom dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param type_properties: Custom dataset properties. + :type type_properties: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'type_properties': {'key': 'typeProperties', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(CustomDataset, self).__init__(**kwargs) + self.type_properties = kwargs.get('type_properties', None) + self.type = 'CustomDataset' + + +class CustomDataSourceLinkedService(LinkedService): + """Custom linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param type_properties: Required. Custom linked service properties. + :type type_properties: object + """ + + _validation = { + 'type': {'required': True}, + 'type_properties': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'type_properties': {'key': 'typeProperties', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(CustomDataSourceLinkedService, self).__init__(**kwargs) + self.type_properties = kwargs.get('type_properties', None) + self.type = 'CustomDataSource' + + +class DatabricksNotebookActivity(ExecutionActivity): + """DatabricksNotebook activity. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param notebook_path: Required. The absolute path of the notebook to be + run in the Databricks Workspace. This path must begin with a slash. Type: + string (or Expression with resultType string). + :type notebook_path: object + :param base_parameters: Base parameters to be used for each run of this + job.If the notebook takes a parameter that is not specified, the default + value from the notebook will be used. + :type base_parameters: dict[str, object] + :param libraries: A list of libraries to be installed on the cluster that + will execute the job. + :type libraries: list[dict[str, object]] + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'notebook_path': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'notebook_path': {'key': 'typeProperties.notebookPath', 'type': 'object'}, + 'base_parameters': {'key': 'typeProperties.baseParameters', 'type': '{object}'}, + 'libraries': {'key': 'typeProperties.libraries', 'type': '[{object}]'}, + } + + def __init__(self, **kwargs): + super(DatabricksNotebookActivity, self).__init__(**kwargs) + self.notebook_path = kwargs.get('notebook_path', None) + self.base_parameters = kwargs.get('base_parameters', None) + self.libraries = kwargs.get('libraries', None) + self.type = 'DatabricksNotebook' + + +class DatabricksSparkJarActivity(ExecutionActivity): + """DatabricksSparkJar activity. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param main_class_name: Required. The full name of the class containing + the main method to be executed. This class must be contained in a JAR + provided as a library. Type: string (or Expression with resultType + string). + :type main_class_name: object + :param parameters: Parameters that will be passed to the main method. + :type parameters: list[object] + :param libraries: A list of libraries to be installed on the cluster that + will execute the job. + :type libraries: list[dict[str, object]] + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'main_class_name': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'main_class_name': {'key': 'typeProperties.mainClassName', 'type': 'object'}, + 'parameters': {'key': 'typeProperties.parameters', 'type': '[object]'}, + 'libraries': {'key': 'typeProperties.libraries', 'type': '[{object}]'}, + } + + def __init__(self, **kwargs): + super(DatabricksSparkJarActivity, self).__init__(**kwargs) + self.main_class_name = kwargs.get('main_class_name', None) + self.parameters = kwargs.get('parameters', None) + self.libraries = kwargs.get('libraries', None) + self.type = 'DatabricksSparkJar' + + +class DatabricksSparkPythonActivity(ExecutionActivity): + """DatabricksSparkPython activity. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param python_file: Required. The URI of the Python file to be executed. + DBFS paths are supported. Type: string (or Expression with resultType + string). + :type python_file: object + :param parameters: Command line parameters that will be passed to the + Python file. + :type parameters: list[object] + :param libraries: A list of libraries to be installed on the cluster that + will execute the job. + :type libraries: list[dict[str, object]] + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'python_file': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'python_file': {'key': 'typeProperties.pythonFile', 'type': 'object'}, + 'parameters': {'key': 'typeProperties.parameters', 'type': '[object]'}, + 'libraries': {'key': 'typeProperties.libraries', 'type': '[{object}]'}, + } + + def __init__(self, **kwargs): + super(DatabricksSparkPythonActivity, self).__init__(**kwargs) + self.python_file = kwargs.get('python_file', None) + self.parameters = kwargs.get('parameters', None) + self.libraries = kwargs.get('libraries', None) + self.type = 'DatabricksSparkPython' + + +class DataLakeAnalyticsUSQLActivity(ExecutionActivity): + """Data Lake Analytics U-SQL activity. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param script_path: Required. Case-sensitive path to folder that contains + the U-SQL script. Type: string (or Expression with resultType string). + :type script_path: object + :param script_linked_service: Required. Script linked service reference. + :type script_linked_service: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param degree_of_parallelism: The maximum number of nodes simultaneously + used to run the job. Default value is 1. Type: integer (or Expression with + resultType integer), minimum: 1. + :type degree_of_parallelism: object + :param priority: Determines which jobs out of all that are queued should + be selected to run first. The lower the number, the higher the priority. + Default value is 1000. Type: integer (or Expression with resultType + integer), minimum: 1. + :type priority: object + :param parameters: Parameters for U-SQL job request. + :type parameters: dict[str, object] + :param runtime_version: Runtime version of the U-SQL engine to use. Type: + string (or Expression with resultType string). + :type runtime_version: object + :param compilation_mode: Compilation mode of U-SQL. Must be one of these + values : Semantic, Full and SingleBox. Type: string (or Expression with + resultType string). + :type compilation_mode: object + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'script_path': {'required': True}, + 'script_linked_service': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'script_path': {'key': 'typeProperties.scriptPath', 'type': 'object'}, + 'script_linked_service': {'key': 'typeProperties.scriptLinkedService', 'type': 'LinkedServiceReference'}, + 'degree_of_parallelism': {'key': 'typeProperties.degreeOfParallelism', 'type': 'object'}, + 'priority': {'key': 'typeProperties.priority', 'type': 'object'}, + 'parameters': {'key': 'typeProperties.parameters', 'type': '{object}'}, + 'runtime_version': {'key': 'typeProperties.runtimeVersion', 'type': 'object'}, + 'compilation_mode': {'key': 'typeProperties.compilationMode', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(DataLakeAnalyticsUSQLActivity, self).__init__(**kwargs) + self.script_path = kwargs.get('script_path', None) + self.script_linked_service = kwargs.get('script_linked_service', None) + self.degree_of_parallelism = kwargs.get('degree_of_parallelism', None) + self.priority = kwargs.get('priority', None) + self.parameters = kwargs.get('parameters', None) + self.runtime_version = kwargs.get('runtime_version', None) + self.compilation_mode = kwargs.get('compilation_mode', None) + self.type = 'DataLakeAnalyticsU-SQL' + + +class DatasetCompression(Model): + """The compression method used on a dataset. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DatasetZipDeflateCompression, DatasetDeflateCompression, + DatasetGZipCompression, DatasetBZip2Compression + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'ZipDeflate': 'DatasetZipDeflateCompression', 'Deflate': 'DatasetDeflateCompression', 'GZip': 'DatasetGZipCompression', 'BZip2': 'DatasetBZip2Compression'} + } + + def __init__(self, **kwargs): + super(DatasetCompression, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.type = None + + +class DatasetBZip2Compression(DatasetCompression): + """The BZip2 compression method used on a dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DatasetBZip2Compression, self).__init__(**kwargs) + self.type = 'BZip2' + + +class DatasetDeflateCompression(DatasetCompression): + """The Deflate compression method used on a dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. Constant filled by server. + :type type: str + :param level: The Deflate compression level. + :type level: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(DatasetDeflateCompression, self).__init__(**kwargs) + self.level = kwargs.get('level', None) + self.type = 'Deflate' + + +class DatasetFolder(Model): + """The folder that this Dataset is in. If not specified, Dataset will appear + at the root level. + + :param name: The name of the folder that this Dataset is in. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DatasetFolder, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class DatasetGZipCompression(DatasetCompression): + """The GZip compression method used on a dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. Constant filled by server. + :type type: str + :param level: The GZip compression level. + :type level: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(DatasetGZipCompression, self).__init__(**kwargs) + self.level = kwargs.get('level', None) + self.type = 'GZip' + + +class DatasetReference(Model): + """Dataset reference type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. Dataset reference type. Default value: + "DatasetReference" . + :vartype type: str + :param reference_name: Required. Reference dataset name. + :type reference_name: str + :param parameters: Arguments for dataset. + :type parameters: dict[str, object] + """ + + _validation = { + 'type': {'required': True, 'constant': True}, + 'reference_name': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'reference_name': {'key': 'referenceName', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{object}'}, + } + + type = "DatasetReference" + + def __init__(self, **kwargs): + super(DatasetReference, self).__init__(**kwargs) + self.reference_name = kwargs.get('reference_name', None) + self.parameters = kwargs.get('parameters', None) + + +class SubResource(Model): + """Azure Data Factory nested resource, which belongs to a factory. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar etag: Etag identifies change in the resource. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.etag = None + + +class DatasetResource(SubResource): + """Dataset resource type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar etag: Etag identifies change in the resource. + :vartype etag: str + :param properties: Required. Dataset properties. + :type properties: ~azure.mgmt.datafactory.models.Dataset + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'Dataset'}, + } + + def __init__(self, **kwargs): + super(DatasetResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class DatasetZipDeflateCompression(DatasetCompression): + """The ZipDeflate compression method used on a dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. Constant filled by server. + :type type: str + :param level: The ZipDeflate compression level. + :type level: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(DatasetZipDeflateCompression, self).__init__(**kwargs) + self.level = kwargs.get('level', None) + self.type = 'ZipDeflate' + + +class Db2LinkedService(LinkedService): + """Linked service for DB2 data source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param server: Required. Server name for connection. Type: string (or + Expression with resultType string). + :type server: object + :param database: Required. Database name for connection. Type: string (or + Expression with resultType string). + :type database: object + :param authentication_type: AuthenticationType to be used for connection. + Possible values include: 'Basic' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.Db2AuthenticationType + :param username: Username for authentication. Type: string (or Expression + with resultType string). + :type username: object + :param password: Password for authentication. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'server': {'required': True}, + 'database': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server': {'key': 'typeProperties.server', 'type': 'object'}, + 'database': {'key': 'typeProperties.database', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(Db2LinkedService, self).__init__(**kwargs) + self.server = kwargs.get('server', None) + self.database = kwargs.get('database', None) + self.authentication_type = kwargs.get('authentication_type', None) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'Db2' + + +class Db2Source(CopySource): + """A copy activity source for Db2 databases. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: Database query. Type: string (or Expression with resultType + string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(Db2Source, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'Db2Source' + + +class DeleteActivity(ExecutionActivity): + """Delete activity. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param recursive: If true, files or sub-folders under current folder path + will be deleted recursively. Default is false. Type: boolean (or + Expression with resultType boolean). + :type recursive: object + :param max_concurrent_connections: The max concurrent connections to + connect data source at the same time. + :type max_concurrent_connections: int + :param enable_logging: Whether to record detailed logs of delete-activity + execution. Default value is false. Type: boolean (or Expression with + resultType boolean). + :type enable_logging: object + :param log_storage_settings: Log storage settings customer need to provide + when enableLogging is true. + :type log_storage_settings: + ~azure.mgmt.datafactory.models.LogStorageSettings + :param dataset: Required. Delete activity dataset reference. + :type dataset: ~azure.mgmt.datafactory.models.DatasetReference + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'max_concurrent_connections': {'minimum': 1}, + 'dataset': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'recursive': {'key': 'typeProperties.recursive', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'typeProperties.maxConcurrentConnections', 'type': 'int'}, + 'enable_logging': {'key': 'typeProperties.enableLogging', 'type': 'object'}, + 'log_storage_settings': {'key': 'typeProperties.logStorageSettings', 'type': 'LogStorageSettings'}, + 'dataset': {'key': 'typeProperties.dataset', 'type': 'DatasetReference'}, + } + + def __init__(self, **kwargs): + super(DeleteActivity, self).__init__(**kwargs) + self.recursive = kwargs.get('recursive', None) + self.max_concurrent_connections = kwargs.get('max_concurrent_connections', None) + self.enable_logging = kwargs.get('enable_logging', None) + self.log_storage_settings = kwargs.get('log_storage_settings', None) + self.dataset = kwargs.get('dataset', None) + self.type = 'Delete' + + +class DelimitedTextDataset(Dataset): + """Delimited text dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param location: Required. The location of the delimited text storage. + :type location: ~azure.mgmt.datafactory.models.DatasetLocation + :param column_delimiter: The column delimiter. Type: string (or Expression + with resultType string). + :type column_delimiter: object + :param row_delimiter: The row delimiter. Type: string (or Expression with + resultType string). + :type row_delimiter: object + :param encoding_name: The code page name of the preferred encoding. If + miss, the default value is UTF-8, unless BOM denotes another Unicode + encoding. Refer to the name column of the table in the following link to + set supported values: + https://msdn.microsoft.com/library/system.text.encoding.aspx. Type: string + (or Expression with resultType string). + :type encoding_name: object + :param compression_codec: + :type compression_codec: object + :param compression_level: The data compression method used for + DelimitedText. + :type compression_level: object + :param quote_char: The quote character. Type: string (or Expression with + resultType string). + :type quote_char: object + :param escape_char: The escape character. Type: string (or Expression with + resultType string). + :type escape_char: object + :param first_row_as_header: When used as input, treat the first row of + data as headers. When used as output,write the headers into the output as + the first row of data. The default value is false. Type: boolean (or + Expression with resultType boolean). + :type first_row_as_header: object + :param null_value: The null value string. Type: string (or Expression with + resultType string). + :type null_value: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'typeProperties.location', 'type': 'DatasetLocation'}, + 'column_delimiter': {'key': 'typeProperties.columnDelimiter', 'type': 'object'}, + 'row_delimiter': {'key': 'typeProperties.rowDelimiter', 'type': 'object'}, + 'encoding_name': {'key': 'typeProperties.encodingName', 'type': 'object'}, + 'compression_codec': {'key': 'typeProperties.compressionCodec', 'type': 'object'}, + 'compression_level': {'key': 'typeProperties.compressionLevel', 'type': 'object'}, + 'quote_char': {'key': 'typeProperties.quoteChar', 'type': 'object'}, + 'escape_char': {'key': 'typeProperties.escapeChar', 'type': 'object'}, + 'first_row_as_header': {'key': 'typeProperties.firstRowAsHeader', 'type': 'object'}, + 'null_value': {'key': 'typeProperties.nullValue', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(DelimitedTextDataset, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.column_delimiter = kwargs.get('column_delimiter', None) + self.row_delimiter = kwargs.get('row_delimiter', None) + self.encoding_name = kwargs.get('encoding_name', None) + self.compression_codec = kwargs.get('compression_codec', None) + self.compression_level = kwargs.get('compression_level', None) + self.quote_char = kwargs.get('quote_char', None) + self.escape_char = kwargs.get('escape_char', None) + self.first_row_as_header = kwargs.get('first_row_as_header', None) + self.null_value = kwargs.get('null_value', None) + self.type = 'DelimitedText' + + +class FormatReadSettings(Model): + """Format read settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The read setting type. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FormatReadSettings, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.type = kwargs.get('type', None) + + +class DelimitedTextReadSettings(FormatReadSettings): + """Delimited text read settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The read setting type. + :type type: str + :param skip_line_count: Indicates the number of non-empty rows to skip + when reading data from input files. Type: integer (or Expression with + resultType integer). + :type skip_line_count: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'skip_line_count': {'key': 'skipLineCount', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(DelimitedTextReadSettings, self).__init__(**kwargs) + self.skip_line_count = kwargs.get('skip_line_count', None) + + +class DelimitedTextSink(CopySink): + """A copy activity DelimitedText sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param store_settings: DelimitedText store settings. + :type store_settings: ~azure.mgmt.datafactory.models.StoreWriteSettings + :param format_settings: DelimitedText format settings. + :type format_settings: + ~azure.mgmt.datafactory.models.DelimitedTextWriteSettings + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'store_settings': {'key': 'storeSettings', 'type': 'StoreWriteSettings'}, + 'format_settings': {'key': 'formatSettings', 'type': 'DelimitedTextWriteSettings'}, + } + + def __init__(self, **kwargs): + super(DelimitedTextSink, self).__init__(**kwargs) + self.store_settings = kwargs.get('store_settings', None) + self.format_settings = kwargs.get('format_settings', None) + self.type = 'DelimitedTextSink' + + +class DelimitedTextSource(CopySource): + """A copy activity DelimitedText source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param store_settings: DelimitedText store settings. + :type store_settings: ~azure.mgmt.datafactory.models.StoreReadSettings + :param format_settings: DelimitedText format settings. + :type format_settings: + ~azure.mgmt.datafactory.models.DelimitedTextReadSettings + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'store_settings': {'key': 'storeSettings', 'type': 'StoreReadSettings'}, + 'format_settings': {'key': 'formatSettings', 'type': 'DelimitedTextReadSettings'}, + } + + def __init__(self, **kwargs): + super(DelimitedTextSource, self).__init__(**kwargs) + self.store_settings = kwargs.get('store_settings', None) + self.format_settings = kwargs.get('format_settings', None) + self.type = 'DelimitedTextSource' + + +class DelimitedTextWriteSettings(FormatWriteSettings): + """Delimited text write settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The write setting type. + :type type: str + :param quote_all_text: Indicates whether string values should always be + enclosed with quotes. Type: boolean (or Expression with resultType + boolean). + :type quote_all_text: object + :param file_extension: Required. The file extension used to create the + files. Type: string (or Expression with resultType string). + :type file_extension: object + """ + + _validation = { + 'type': {'required': True}, + 'file_extension': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'quote_all_text': {'key': 'quoteAllText', 'type': 'object'}, + 'file_extension': {'key': 'fileExtension', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(DelimitedTextWriteSettings, self).__init__(**kwargs) + self.quote_all_text = kwargs.get('quote_all_text', None) + self.file_extension = kwargs.get('file_extension', None) + + +class DependencyReference(Model): + """Referenced dependency. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SelfDependencyTumblingWindowTriggerReference, + TriggerDependencyReference + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'SelfDependencyTumblingWindowTriggerReference': 'SelfDependencyTumblingWindowTriggerReference', 'TriggerDependencyReference': 'TriggerDependencyReference'} + } + + def __init__(self, **kwargs): + super(DependencyReference, self).__init__(**kwargs) + self.type = None + + +class DistcpSettings(Model): + """Distcp settings. + + All required parameters must be populated in order to send to Azure. + + :param resource_manager_endpoint: Required. Specifies the Yarn + ResourceManager endpoint. Type: string (or Expression with resultType + string). + :type resource_manager_endpoint: object + :param temp_script_path: Required. Specifies an existing folder path which + will be used to store temp Distcp command script. The script file is + generated by ADF and will be removed after Copy job finished. Type: string + (or Expression with resultType string). + :type temp_script_path: object + :param distcp_options: Specifies the Distcp options. Type: string (or + Expression with resultType string). + :type distcp_options: object + """ + + _validation = { + 'resource_manager_endpoint': {'required': True}, + 'temp_script_path': {'required': True}, + } + + _attribute_map = { + 'resource_manager_endpoint': {'key': 'resourceManagerEndpoint', 'type': 'object'}, + 'temp_script_path': {'key': 'tempScriptPath', 'type': 'object'}, + 'distcp_options': {'key': 'distcpOptions', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(DistcpSettings, self).__init__(**kwargs) + self.resource_manager_endpoint = kwargs.get('resource_manager_endpoint', None) + self.temp_script_path = kwargs.get('temp_script_path', None) + self.distcp_options = kwargs.get('distcp_options', None) + + +class DocumentDbCollectionDataset(Dataset): + """Microsoft Azure Document Database Collection dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param collection_name: Required. Document Database collection name. Type: + string (or Expression with resultType string). + :type collection_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + 'collection_name': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'collection_name': {'key': 'typeProperties.collectionName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(DocumentDbCollectionDataset, self).__init__(**kwargs) + self.collection_name = kwargs.get('collection_name', None) + self.type = 'DocumentDbCollection' + + +class DocumentDbCollectionSink(CopySink): + """A copy activity Document Database Collection sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param nesting_separator: Nested properties separator. Default is . (dot). + Type: string (or Expression with resultType string). + :type nesting_separator: object + :param write_behavior: Describes how to write data to Azure Cosmos DB. + Allowed values: insert and upsert. + :type write_behavior: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'nesting_separator': {'key': 'nestingSeparator', 'type': 'object'}, + 'write_behavior': {'key': 'writeBehavior', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(DocumentDbCollectionSink, self).__init__(**kwargs) + self.nesting_separator = kwargs.get('nesting_separator', None) + self.write_behavior = kwargs.get('write_behavior', None) + self.type = 'DocumentDbCollectionSink' + + +class DocumentDbCollectionSource(CopySource): + """A copy activity Document Database Collection source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: Documents query. Type: string (or Expression with resultType + string). + :type query: object + :param nesting_separator: Nested properties separator. Type: string (or + Expression with resultType string). + :type nesting_separator: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + 'nesting_separator': {'key': 'nestingSeparator', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(DocumentDbCollectionSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.nesting_separator = kwargs.get('nesting_separator', None) + self.type = 'DocumentDbCollectionSource' + + +class DrillLinkedService(LinkedService): + """Drill server linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: An ODBC connection string. Type: string, + SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param pwd: The Azure key vault secret reference of password in connection + string. + :type pwd: ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'pwd': {'key': 'typeProperties.pwd', 'type': 'AzureKeyVaultSecretReference'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(DrillLinkedService, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.pwd = kwargs.get('pwd', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'Drill' + + +class DrillSource(CopySource): + """A copy activity Drill server source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(DrillSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'DrillSource' + + +class DrillTableDataset(Dataset): + """Drill server dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: This property will be retired. Please consider using + schema + table properties instead. + :type table_name: object + :param table: The table name of the Drill. Type: string (or Expression + with resultType string). + :type table: object + :param drill_table_dataset_schema: The schema name of the Drill. Type: + string (or Expression with resultType string). + :type drill_table_dataset_schema: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + 'table': {'key': 'typeProperties.table', 'type': 'object'}, + 'drill_table_dataset_schema': {'key': 'typeProperties.schema', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(DrillTableDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.table = kwargs.get('table', None) + self.drill_table_dataset_schema = kwargs.get('drill_table_dataset_schema', None) + self.type = 'DrillTable' + + +class DynamicsAXLinkedService(LinkedService): + """Dynamics AX linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param url: Required. The Dynamics AX (or Dynamics 365 Finance and + Operations) instance OData endpoint. + :type url: object + :param service_principal_id: Required. Specify the application's client + ID. Type: string (or Expression with resultType string). + :type service_principal_id: object + :param service_principal_key: Required. Specify the application's key. + Mark this field as a SecureString to store it securely in Data Factory, or + reference a secret stored in Azure Key Vault. Type: string (or Expression + with resultType string). + :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase + :param tenant: Required. Specify the tenant information (domain name or + tenant ID) under which your application resides. Retrieve it by hovering + the mouse in the top-right corner of the Azure portal. Type: string (or + Expression with resultType string). + :type tenant: object + :param aad_resource_id: Required. Specify the resource you are requesting + authorization. Type: string (or Expression with resultType string). + :type aad_resource_id: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'url': {'required': True}, + 'service_principal_id': {'required': True}, + 'service_principal_key': {'required': True}, + 'tenant': {'required': True}, + 'aad_resource_id': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'url': {'key': 'typeProperties.url', 'type': 'object'}, + 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, + 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, + 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, + 'aad_resource_id': {'key': 'typeProperties.aadResourceId', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(DynamicsAXLinkedService, self).__init__(**kwargs) + self.url = kwargs.get('url', None) + self.service_principal_id = kwargs.get('service_principal_id', None) + self.service_principal_key = kwargs.get('service_principal_key', None) + self.tenant = kwargs.get('tenant', None) + self.aad_resource_id = kwargs.get('aad_resource_id', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'DynamicsAX' + + +class DynamicsAXResourceDataset(Dataset): + """The path of the Dynamics AX OData entity. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param path: Required. The path of the Dynamics AX OData entity. Type: + string (or Expression with resultType string). + :type path: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + 'path': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'path': {'key': 'typeProperties.path', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(DynamicsAXResourceDataset, self).__init__(**kwargs) + self.path = kwargs.get('path', None) + self.type = 'DynamicsAXResource' + + +class DynamicsAXSource(CopySource): + """A copy activity Dynamics AX source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(DynamicsAXSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'DynamicsAXSource' + + +class DynamicsCrmEntityDataset(Dataset): + """The Dynamics CRM entity dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param entity_name: The logical name of the entity. Type: string (or + Expression with resultType string). + :type entity_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'entity_name': {'key': 'typeProperties.entityName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(DynamicsCrmEntityDataset, self).__init__(**kwargs) + self.entity_name = kwargs.get('entity_name', None) + self.type = 'DynamicsCrmEntity' + + +class DynamicsCrmLinkedService(LinkedService): + """Dynamics CRM linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param deployment_type: Required. The deployment type of the Dynamics CRM + instance. 'Online' for Dynamics CRM Online and 'OnPremisesWithIfd' for + Dynamics CRM on-premises with Ifd. Type: string (or Expression with + resultType string). Possible values include: 'Online', 'OnPremisesWithIfd' + :type deployment_type: str or + ~azure.mgmt.datafactory.models.DynamicsDeploymentType + :param host_name: The host name of the on-premises Dynamics CRM server. + The property is required for on-prem and not allowed for online. Type: + string (or Expression with resultType string). + :type host_name: object + :param port: The port of on-premises Dynamics CRM server. The property is + required for on-prem and not allowed for online. Default is 443. Type: + integer (or Expression with resultType integer), minimum: 0. + :type port: object + :param service_uri: The URL to the Microsoft Dynamics CRM server. The + property is required for on-line and not allowed for on-prem. Type: string + (or Expression with resultType string). + :type service_uri: object + :param organization_name: The organization name of the Dynamics CRM + instance. The property is required for on-prem and required for online + when there are more than one Dynamics CRM instances associated with the + user. Type: string (or Expression with resultType string). + :type organization_name: object + :param authentication_type: Required. The authentication type to connect + to Dynamics CRM server. 'Office365' for online scenario, 'Ifd' for + on-premises with Ifd scenario. Type: string (or Expression with resultType + string). Possible values include: 'Office365', 'Ifd' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.DynamicsAuthenticationType + :param username: Required. User name to access the Dynamics CRM instance. + Type: string (or Expression with resultType string). + :type username: object + :param password: Password to access the Dynamics CRM instance. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'deployment_type': {'required': True}, + 'authentication_type': {'required': True}, + 'username': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'deployment_type': {'key': 'typeProperties.deploymentType', 'type': 'str'}, + 'host_name': {'key': 'typeProperties.hostName', 'type': 'object'}, + 'port': {'key': 'typeProperties.port', 'type': 'object'}, + 'service_uri': {'key': 'typeProperties.serviceUri', 'type': 'object'}, + 'organization_name': {'key': 'typeProperties.organizationName', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(DynamicsCrmLinkedService, self).__init__(**kwargs) + self.deployment_type = kwargs.get('deployment_type', None) + self.host_name = kwargs.get('host_name', None) + self.port = kwargs.get('port', None) + self.service_uri = kwargs.get('service_uri', None) + self.organization_name = kwargs.get('organization_name', None) + self.authentication_type = kwargs.get('authentication_type', None) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'DynamicsCrm' + + +class DynamicsCrmSink(CopySink): + """A copy activity Dynamics CRM sink. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :ivar write_behavior: Required. The write behavior for the operation. + Default value: "Upsert" . + :vartype write_behavior: str + :param ignore_null_values: The flag indicating whether to ignore null + values from input dataset (except key fields) during write operation. + Default is false. Type: boolean (or Expression with resultType boolean). + :type ignore_null_values: object + """ + + _validation = { + 'type': {'required': True}, + 'write_behavior': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'write_behavior': {'key': 'writeBehavior', 'type': 'str'}, + 'ignore_null_values': {'key': 'ignoreNullValues', 'type': 'object'}, + } + + write_behavior = "Upsert" + + def __init__(self, **kwargs): + super(DynamicsCrmSink, self).__init__(**kwargs) + self.ignore_null_values = kwargs.get('ignore_null_values', None) + self.type = 'DynamicsCrmSink' + + +class DynamicsCrmSource(CopySource): + """A copy activity Dynamics CRM source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: FetchXML is a proprietary query language that is used in + Microsoft Dynamics CRM (online & on-premises). Type: string (or Expression + with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(DynamicsCrmSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'DynamicsCrmSource' + + +class DynamicsEntityDataset(Dataset): + """The Dynamics entity dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param entity_name: The logical name of the entity. Type: string (or + Expression with resultType string). + :type entity_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'entity_name': {'key': 'typeProperties.entityName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(DynamicsEntityDataset, self).__init__(**kwargs) + self.entity_name = kwargs.get('entity_name', None) + self.type = 'DynamicsEntity' + + +class DynamicsLinkedService(LinkedService): + """Dynamics linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param deployment_type: Required. The deployment type of the Dynamics + instance. 'Online' for Dynamics Online and 'OnPremisesWithIfd' for + Dynamics on-premises with Ifd. Type: string (or Expression with resultType + string). + :type deployment_type: object + :param host_name: The host name of the on-premises Dynamics server. The + property is required for on-prem and not allowed for online. Type: string + (or Expression with resultType string). + :type host_name: object + :param port: The port of on-premises Dynamics server. The property is + required for on-prem and not allowed for online. Default is 443. Type: + integer (or Expression with resultType integer), minimum: 0. + :type port: object + :param service_uri: The URL to the Microsoft Dynamics server. The property + is required for on-line and not allowed for on-prem. Type: string (or + Expression with resultType string). + :type service_uri: object + :param organization_name: The organization name of the Dynamics instance. + The property is required for on-prem and required for online when there + are more than one Dynamics instances associated with the user. Type: + string (or Expression with resultType string). + :type organization_name: object + :param authentication_type: Required. The authentication type to connect + to Dynamics server. 'Office365' for online scenario, 'Ifd' for on-premises + with Ifd scenario. Type: string (or Expression with resultType string). + :type authentication_type: object + :param username: Required. User name to access the Dynamics instance. + Type: string (or Expression with resultType string). + :type username: object + :param password: Password to access the Dynamics instance. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'deployment_type': {'required': True}, + 'authentication_type': {'required': True}, + 'username': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'deployment_type': {'key': 'typeProperties.deploymentType', 'type': 'object'}, + 'host_name': {'key': 'typeProperties.hostName', 'type': 'object'}, + 'port': {'key': 'typeProperties.port', 'type': 'object'}, + 'service_uri': {'key': 'typeProperties.serviceUri', 'type': 'object'}, + 'organization_name': {'key': 'typeProperties.organizationName', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'object'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(DynamicsLinkedService, self).__init__(**kwargs) + self.deployment_type = kwargs.get('deployment_type', None) + self.host_name = kwargs.get('host_name', None) + self.port = kwargs.get('port', None) + self.service_uri = kwargs.get('service_uri', None) + self.organization_name = kwargs.get('organization_name', None) + self.authentication_type = kwargs.get('authentication_type', None) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'Dynamics' + + +class DynamicsSink(CopySink): + """A copy activity Dynamics sink. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :ivar write_behavior: Required. The write behavior for the operation. + Default value: "Upsert" . + :vartype write_behavior: str + :param ignore_null_values: The flag indicating whether ignore null values + from input dataset (except key fields) during write operation. Default is + false. Type: boolean (or Expression with resultType boolean). + :type ignore_null_values: object + """ + + _validation = { + 'type': {'required': True}, + 'write_behavior': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'write_behavior': {'key': 'writeBehavior', 'type': 'str'}, + 'ignore_null_values': {'key': 'ignoreNullValues', 'type': 'object'}, + } + + write_behavior = "Upsert" + + def __init__(self, **kwargs): + super(DynamicsSink, self).__init__(**kwargs) + self.ignore_null_values = kwargs.get('ignore_null_values', None) + self.type = 'DynamicsSink' + + +class DynamicsSource(CopySource): + """A copy activity Dynamics source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: FetchXML is a proprietary query language that is used in + Microsoft Dynamics (online & on-premises). Type: string (or Expression + with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(DynamicsSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'DynamicsSource' + + +class EloquaLinkedService(LinkedService): + """Eloqua server linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param endpoint: Required. The endpoint of the Eloqua server. (i.e. + eloqua.example.com) + :type endpoint: object + :param username: Required. The site name and user name of your Eloqua + account in the form: sitename/username. (i.e. Eloqua/Alice) + :type username: object + :param password: The password corresponding to the user name. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param use_encrypted_endpoints: Specifies whether the data source + endpoints are encrypted using HTTPS. The default value is true. + :type use_encrypted_endpoints: object + :param use_host_verification: Specifies whether to require the host name + in the server's certificate to match the host name of the server when + connecting over SSL. The default value is true. + :type use_host_verification: object + :param use_peer_verification: Specifies whether to verify the identity of + the server when connecting over SSL. The default value is true. + :type use_peer_verification: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'endpoint': {'required': True}, + 'username': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'endpoint': {'key': 'typeProperties.endpoint', 'type': 'object'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, + 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, + 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(EloquaLinkedService, self).__init__(**kwargs) + self.endpoint = kwargs.get('endpoint', None) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + self.use_encrypted_endpoints = kwargs.get('use_encrypted_endpoints', None) + self.use_host_verification = kwargs.get('use_host_verification', None) + self.use_peer_verification = kwargs.get('use_peer_verification', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'Eloqua' + + +class EloquaObjectDataset(Dataset): + """Eloqua server dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(EloquaObjectDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.type = 'EloquaObject' + + +class EloquaSource(CopySource): + """A copy activity Eloqua server source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(EloquaSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'EloquaSource' + + +class EntityReference(Model): + """The entity reference. + + :param type: The type of this referenced entity. Possible values include: + 'IntegrationRuntimeReference', 'LinkedServiceReference' + :type type: str or + ~azure.mgmt.datafactory.models.IntegrationRuntimeEntityReferenceType + :param reference_name: The name of this referenced entity. + :type reference_name: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'reference_name': {'key': 'referenceName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EntityReference, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.reference_name = kwargs.get('reference_name', None) + + +class ExecutePipelineActivity(ControlActivity): + """Execute pipeline activity. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param pipeline: Required. Pipeline reference. + :type pipeline: ~azure.mgmt.datafactory.models.PipelineReference + :param parameters: Pipeline parameters. + :type parameters: dict[str, object] + :param wait_on_completion: Defines whether activity execution will wait + for the dependent pipeline execution to finish. Default is false. + :type wait_on_completion: bool + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'pipeline': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'pipeline': {'key': 'typeProperties.pipeline', 'type': 'PipelineReference'}, + 'parameters': {'key': 'typeProperties.parameters', 'type': '{object}'}, + 'wait_on_completion': {'key': 'typeProperties.waitOnCompletion', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ExecutePipelineActivity, self).__init__(**kwargs) + self.pipeline = kwargs.get('pipeline', None) + self.parameters = kwargs.get('parameters', None) + self.wait_on_completion = kwargs.get('wait_on_completion', None) + self.type = 'ExecutePipeline' + + +class ExecuteSSISPackageActivity(ExecutionActivity): + """Execute SSIS package activity. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param package_location: Required. SSIS package location. + :type package_location: ~azure.mgmt.datafactory.models.SSISPackageLocation + :param runtime: Specifies the runtime to execute SSIS package. The value + should be "x86" or "x64". Type: string (or Expression with resultType + string). + :type runtime: object + :param logging_level: The logging level of SSIS package execution. Type: + string (or Expression with resultType string). + :type logging_level: object + :param environment_path: The environment path to execute the SSIS package. + Type: string (or Expression with resultType string). + :type environment_path: object + :param execution_credential: The package execution credential. + :type execution_credential: + ~azure.mgmt.datafactory.models.SSISExecutionCredential + :param connect_via: Required. The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param project_parameters: The project level parameters to execute the + SSIS package. + :type project_parameters: dict[str, + ~azure.mgmt.datafactory.models.SSISExecutionParameter] + :param package_parameters: The package level parameters to execute the + SSIS package. + :type package_parameters: dict[str, + ~azure.mgmt.datafactory.models.SSISExecutionParameter] + :param project_connection_managers: The project level connection managers + to execute the SSIS package. + :type project_connection_managers: dict[str, dict[str, + ~azure.mgmt.datafactory.models.SSISExecutionParameter]] + :param package_connection_managers: The package level connection managers + to execute the SSIS package. + :type package_connection_managers: dict[str, dict[str, + ~azure.mgmt.datafactory.models.SSISExecutionParameter]] + :param property_overrides: The property overrides to execute the SSIS + package. + :type property_overrides: dict[str, + ~azure.mgmt.datafactory.models.SSISPropertyOverride] + :param log_location: SSIS package execution log location. + :type log_location: ~azure.mgmt.datafactory.models.SSISLogLocation + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'package_location': {'required': True}, + 'connect_via': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'package_location': {'key': 'typeProperties.packageLocation', 'type': 'SSISPackageLocation'}, + 'runtime': {'key': 'typeProperties.runtime', 'type': 'object'}, + 'logging_level': {'key': 'typeProperties.loggingLevel', 'type': 'object'}, + 'environment_path': {'key': 'typeProperties.environmentPath', 'type': 'object'}, + 'execution_credential': {'key': 'typeProperties.executionCredential', 'type': 'SSISExecutionCredential'}, + 'connect_via': {'key': 'typeProperties.connectVia', 'type': 'IntegrationRuntimeReference'}, + 'project_parameters': {'key': 'typeProperties.projectParameters', 'type': '{SSISExecutionParameter}'}, + 'package_parameters': {'key': 'typeProperties.packageParameters', 'type': '{SSISExecutionParameter}'}, + 'project_connection_managers': {'key': 'typeProperties.projectConnectionManagers', 'type': '{{SSISExecutionParameter}}'}, + 'package_connection_managers': {'key': 'typeProperties.packageConnectionManagers', 'type': '{{SSISExecutionParameter}}'}, + 'property_overrides': {'key': 'typeProperties.propertyOverrides', 'type': '{SSISPropertyOverride}'}, + 'log_location': {'key': 'typeProperties.logLocation', 'type': 'SSISLogLocation'}, + } + + def __init__(self, **kwargs): + super(ExecuteSSISPackageActivity, self).__init__(**kwargs) + self.package_location = kwargs.get('package_location', None) + self.runtime = kwargs.get('runtime', None) + self.logging_level = kwargs.get('logging_level', None) + self.environment_path = kwargs.get('environment_path', None) + self.execution_credential = kwargs.get('execution_credential', None) + self.connect_via = kwargs.get('connect_via', None) + self.project_parameters = kwargs.get('project_parameters', None) + self.package_parameters = kwargs.get('package_parameters', None) + self.project_connection_managers = kwargs.get('project_connection_managers', None) + self.package_connection_managers = kwargs.get('package_connection_managers', None) + self.property_overrides = kwargs.get('property_overrides', None) + self.log_location = kwargs.get('log_location', None) + self.type = 'ExecuteSSISPackage' + + +class ExposureControlRequest(Model): + """The exposure control request. + + :param feature_name: The feature name. + :type feature_name: str + :param feature_type: The feature type. + :type feature_type: str + """ + + _attribute_map = { + 'feature_name': {'key': 'featureName', 'type': 'str'}, + 'feature_type': {'key': 'featureType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExposureControlRequest, self).__init__(**kwargs) + self.feature_name = kwargs.get('feature_name', None) + self.feature_type = kwargs.get('feature_type', None) + + +class ExposureControlResponse(Model): + """The exposure control response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar feature_name: The feature name. + :vartype feature_name: str + :ivar value: The feature value. + :vartype value: str + """ + + _validation = { + 'feature_name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'feature_name': {'key': 'featureName', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExposureControlResponse, self).__init__(**kwargs) + self.feature_name = None + self.value = None + + +class Expression(Model): + """Azure Data Factory expression definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. Expression type. Default value: "Expression" . + :vartype type: str + :param value: Required. Expression value. + :type value: str + """ + + _validation = { + 'type': {'required': True, 'constant': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + type = "Expression" + + def __init__(self, **kwargs): + super(Expression, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class Resource(Model): + """Azure Data Factory top-level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :ivar e_tag: Etag identifies change in the resource. + :vartype e_tag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'e_tag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.e_tag = None + + +class Factory(Resource): + """Factory resource type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :ivar e_tag: Etag identifies change in the resource. + :vartype e_tag: str + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param identity: Managed service identity of the factory. + :type identity: ~azure.mgmt.datafactory.models.FactoryIdentity + :ivar provisioning_state: Factory provisioning state, example Succeeded. + :vartype provisioning_state: str + :ivar create_time: Time the factory was created in ISO8601 format. + :vartype create_time: datetime + :ivar version: Version of the factory. + :vartype version: str + :param repo_configuration: Git repo information of the factory. + :type repo_configuration: + ~azure.mgmt.datafactory.models.FactoryRepoConfiguration + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'e_tag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'create_time': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'additional_properties': {'key': '', 'type': '{object}'}, + 'identity': {'key': 'identity', 'type': 'FactoryIdentity'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'create_time': {'key': 'properties.createTime', 'type': 'iso-8601'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'repo_configuration': {'key': 'properties.repoConfiguration', 'type': 'FactoryRepoConfiguration'}, + } + + def __init__(self, **kwargs): + super(Factory, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.identity = kwargs.get('identity', None) + self.provisioning_state = None + self.create_time = None + self.version = None + self.repo_configuration = kwargs.get('repo_configuration', None) + + +class FactoryRepoConfiguration(Model): + """Factory's git repo information. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: FactoryVSTSConfiguration, FactoryGitHubConfiguration + + All required parameters must be populated in order to send to Azure. + + :param account_name: Required. Account name. + :type account_name: str + :param repository_name: Required. Repository name. + :type repository_name: str + :param collaboration_branch: Required. Collaboration branch. + :type collaboration_branch: str + :param root_folder: Required. Root folder. + :type root_folder: str + :param last_commit_id: Last commit id. + :type last_commit_id: str + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'account_name': {'required': True}, + 'repository_name': {'required': True}, + 'collaboration_branch': {'required': True}, + 'root_folder': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'repository_name': {'key': 'repositoryName', 'type': 'str'}, + 'collaboration_branch': {'key': 'collaborationBranch', 'type': 'str'}, + 'root_folder': {'key': 'rootFolder', 'type': 'str'}, + 'last_commit_id': {'key': 'lastCommitId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'FactoryVSTSConfiguration': 'FactoryVSTSConfiguration', 'FactoryGitHubConfiguration': 'FactoryGitHubConfiguration'} + } + + def __init__(self, **kwargs): + super(FactoryRepoConfiguration, self).__init__(**kwargs) + self.account_name = kwargs.get('account_name', None) + self.repository_name = kwargs.get('repository_name', None) + self.collaboration_branch = kwargs.get('collaboration_branch', None) + self.root_folder = kwargs.get('root_folder', None) + self.last_commit_id = kwargs.get('last_commit_id', None) + self.type = None + + +class FactoryGitHubConfiguration(FactoryRepoConfiguration): + """Factory's GitHub repo information. + + All required parameters must be populated in order to send to Azure. + + :param account_name: Required. Account name. + :type account_name: str + :param repository_name: Required. Repository name. + :type repository_name: str + :param collaboration_branch: Required. Collaboration branch. + :type collaboration_branch: str + :param root_folder: Required. Root folder. + :type root_folder: str + :param last_commit_id: Last commit id. + :type last_commit_id: str + :param type: Required. Constant filled by server. + :type type: str + :param host_name: GitHub Enterprise host name. For example: + https://github.mydomain.com + :type host_name: str + """ + + _validation = { + 'account_name': {'required': True}, + 'repository_name': {'required': True}, + 'collaboration_branch': {'required': True}, + 'root_folder': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'repository_name': {'key': 'repositoryName', 'type': 'str'}, + 'collaboration_branch': {'key': 'collaborationBranch', 'type': 'str'}, + 'root_folder': {'key': 'rootFolder', 'type': 'str'}, + 'last_commit_id': {'key': 'lastCommitId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'host_name': {'key': 'hostName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FactoryGitHubConfiguration, self).__init__(**kwargs) + self.host_name = kwargs.get('host_name', None) + self.type = 'FactoryGitHubConfiguration' + + +class FactoryIdentity(Model): + """Identity properties of the factory resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. The identity type. Currently the only supported type + is 'SystemAssigned'. Default value: "SystemAssigned" . + :vartype type: str + :ivar principal_id: The principal id of the identity. + :vartype principal_id: str + :ivar tenant_id: The client tenant id of the identity. + :vartype tenant_id: str + """ + + _validation = { + 'type': {'required': True, 'constant': True}, + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + type = "SystemAssigned" + + def __init__(self, **kwargs): + super(FactoryIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + + +class FactoryRepoUpdate(Model): + """Factory's git repo information. + + :param factory_resource_id: The factory resource id. + :type factory_resource_id: str + :param repo_configuration: Git repo information of the factory. + :type repo_configuration: + ~azure.mgmt.datafactory.models.FactoryRepoConfiguration + """ + + _attribute_map = { + 'factory_resource_id': {'key': 'factoryResourceId', 'type': 'str'}, + 'repo_configuration': {'key': 'repoConfiguration', 'type': 'FactoryRepoConfiguration'}, + } + + def __init__(self, **kwargs): + super(FactoryRepoUpdate, self).__init__(**kwargs) + self.factory_resource_id = kwargs.get('factory_resource_id', None) + self.repo_configuration = kwargs.get('repo_configuration', None) + + +class FactoryUpdateParameters(Model): + """Parameters for updating a factory resource. + + :param tags: The resource tags. + :type tags: dict[str, str] + :param identity: Managed service identity of the factory. + :type identity: ~azure.mgmt.datafactory.models.FactoryIdentity + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'FactoryIdentity'}, + } + + def __init__(self, **kwargs): + super(FactoryUpdateParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.identity = kwargs.get('identity', None) + + +class FactoryVSTSConfiguration(FactoryRepoConfiguration): + """Factory's VSTS repo information. + + All required parameters must be populated in order to send to Azure. + + :param account_name: Required. Account name. + :type account_name: str + :param repository_name: Required. Repository name. + :type repository_name: str + :param collaboration_branch: Required. Collaboration branch. + :type collaboration_branch: str + :param root_folder: Required. Root folder. + :type root_folder: str + :param last_commit_id: Last commit id. + :type last_commit_id: str + :param type: Required. Constant filled by server. + :type type: str + :param project_name: Required. VSTS project name. + :type project_name: str + :param tenant_id: VSTS tenant id. + :type tenant_id: str + """ + + _validation = { + 'account_name': {'required': True}, + 'repository_name': {'required': True}, + 'collaboration_branch': {'required': True}, + 'root_folder': {'required': True}, + 'type': {'required': True}, + 'project_name': {'required': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'repository_name': {'key': 'repositoryName', 'type': 'str'}, + 'collaboration_branch': {'key': 'collaborationBranch', 'type': 'str'}, + 'root_folder': {'key': 'rootFolder', 'type': 'str'}, + 'last_commit_id': {'key': 'lastCommitId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'project_name': {'key': 'projectName', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FactoryVSTSConfiguration, self).__init__(**kwargs) + self.project_name = kwargs.get('project_name', None) + self.tenant_id = kwargs.get('tenant_id', None) + self.type = 'FactoryVSTSConfiguration' + + +class FileServerLinkedService(LinkedService): + """File system linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param host: Required. Host name of the server. Type: string (or + Expression with resultType string). + :type host: object + :param user_id: User ID to logon the server. Type: string (or Expression + with resultType string). + :type user_id: object + :param password: Password to logon the server. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'host': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'host': {'key': 'typeProperties.host', 'type': 'object'}, + 'user_id': {'key': 'typeProperties.userId', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(FileServerLinkedService, self).__init__(**kwargs) + self.host = kwargs.get('host', None) + self.user_id = kwargs.get('user_id', None) + self.password = kwargs.get('password', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'FileServer' + + +class FileServerLocation(DatasetLocation): + """The location of file server dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. Type of dataset storage location. + :type type: str + :param folder_path: Specify the folder path of dataset. Type: string (or + Expression with resultType string) + :type folder_path: object + :param file_name: Specify the file name of dataset. Type: string (or + Expression with resultType string). + :type file_name: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'folder_path': {'key': 'folderPath', 'type': 'object'}, + 'file_name': {'key': 'fileName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(FileServerLocation, self).__init__(**kwargs) + + +class FileServerReadSettings(StoreReadSettings): + """File server read settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The read setting type. + :type type: str + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param recursive: If true, files under the folder path will be read + recursively. Default is true. Type: boolean (or Expression with resultType + boolean). + :type recursive: object + :param wildcard_folder_path: FileServer wildcardFolderPath. Type: string + (or Expression with resultType string). + :type wildcard_folder_path: object + :param wildcard_file_name: FileServer wildcardFileName. Type: string (or + Expression with resultType string). + :type wildcard_file_name: object + :param enable_partition_discovery: Indicates whether to enable partition + discovery. + :type enable_partition_discovery: bool + :param modified_datetime_start: The start of file's modified datetime. + Type: string (or Expression with resultType string). + :type modified_datetime_start: object + :param modified_datetime_end: The end of file's modified datetime. Type: + string (or Expression with resultType string). + :type modified_datetime_end: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'recursive': {'key': 'recursive', 'type': 'object'}, + 'wildcard_folder_path': {'key': 'wildcardFolderPath', 'type': 'object'}, + 'wildcard_file_name': {'key': 'wildcardFileName', 'type': 'object'}, + 'enable_partition_discovery': {'key': 'enablePartitionDiscovery', 'type': 'bool'}, + 'modified_datetime_start': {'key': 'modifiedDatetimeStart', 'type': 'object'}, + 'modified_datetime_end': {'key': 'modifiedDatetimeEnd', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(FileServerReadSettings, self).__init__(**kwargs) + self.recursive = kwargs.get('recursive', None) + self.wildcard_folder_path = kwargs.get('wildcard_folder_path', None) + self.wildcard_file_name = kwargs.get('wildcard_file_name', None) + self.enable_partition_discovery = kwargs.get('enable_partition_discovery', None) + self.modified_datetime_start = kwargs.get('modified_datetime_start', None) + self.modified_datetime_end = kwargs.get('modified_datetime_end', None) + + +class FileServerWriteSettings(StoreWriteSettings): + """File server write settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The write setting type. + :type type: str + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param copy_behavior: The type of copy behavior for copy sink. + :type copy_behavior: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'copy_behavior': {'key': 'copyBehavior', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(FileServerWriteSettings, self).__init__(**kwargs) + + +class FileShareDataset(Dataset): + """An on-premises file system dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param folder_path: The path of the on-premises file system. Type: string + (or Expression with resultType string). + :type folder_path: object + :param file_name: The name of the on-premises file system. Type: string + (or Expression with resultType string). + :type file_name: object + :param modified_datetime_start: The start of file's modified datetime. + Type: string (or Expression with resultType string). + :type modified_datetime_start: object + :param modified_datetime_end: The end of file's modified datetime. Type: + string (or Expression with resultType string). + :type modified_datetime_end: object + :param format: The format of the files. + :type format: ~azure.mgmt.datafactory.models.DatasetStorageFormat + :param file_filter: Specify a filter to be used to select a subset of + files in the folderPath rather than all files. Type: string (or Expression + with resultType string). + :type file_filter: object + :param compression: The data compression method used for the file system. + :type compression: ~azure.mgmt.datafactory.models.DatasetCompression + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'folder_path': {'key': 'typeProperties.folderPath', 'type': 'object'}, + 'file_name': {'key': 'typeProperties.fileName', 'type': 'object'}, + 'modified_datetime_start': {'key': 'typeProperties.modifiedDatetimeStart', 'type': 'object'}, + 'modified_datetime_end': {'key': 'typeProperties.modifiedDatetimeEnd', 'type': 'object'}, + 'format': {'key': 'typeProperties.format', 'type': 'DatasetStorageFormat'}, + 'file_filter': {'key': 'typeProperties.fileFilter', 'type': 'object'}, + 'compression': {'key': 'typeProperties.compression', 'type': 'DatasetCompression'}, + } + + def __init__(self, **kwargs): + super(FileShareDataset, self).__init__(**kwargs) + self.folder_path = kwargs.get('folder_path', None) + self.file_name = kwargs.get('file_name', None) + self.modified_datetime_start = kwargs.get('modified_datetime_start', None) + self.modified_datetime_end = kwargs.get('modified_datetime_end', None) + self.format = kwargs.get('format', None) + self.file_filter = kwargs.get('file_filter', None) + self.compression = kwargs.get('compression', None) + self.type = 'FileShare' + + +class FileSystemSink(CopySink): + """A copy activity file system sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param copy_behavior: The type of copy behavior for copy sink. + :type copy_behavior: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'copy_behavior': {'key': 'copyBehavior', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(FileSystemSink, self).__init__(**kwargs) + self.copy_behavior = kwargs.get('copy_behavior', None) + self.type = 'FileSystemSink' + + +class FileSystemSource(CopySource): + """A copy activity file system source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param recursive: If true, files under the folder path will be read + recursively. Default is true. Type: boolean (or Expression with resultType + boolean). + :type recursive: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'recursive': {'key': 'recursive', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(FileSystemSource, self).__init__(**kwargs) + self.recursive = kwargs.get('recursive', None) + self.type = 'FileSystemSource' + + +class FilterActivity(ControlActivity): + """Filter and return results from input array based on the conditions. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param items: Required. Input array on which filter should be applied. + :type items: ~azure.mgmt.datafactory.models.Expression + :param condition: Required. Condition to be used for filtering the input. + :type condition: ~azure.mgmt.datafactory.models.Expression + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'items': {'required': True}, + 'condition': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'items': {'key': 'typeProperties.items', 'type': 'Expression'}, + 'condition': {'key': 'typeProperties.condition', 'type': 'Expression'}, + } + + def __init__(self, **kwargs): + super(FilterActivity, self).__init__(**kwargs) + self.items = kwargs.get('items', None) + self.condition = kwargs.get('condition', None) + self.type = 'Filter' + + +class ForEachActivity(ControlActivity): + """This activity is used for iterating over a collection and execute given + activities. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param is_sequential: Should the loop be executed in sequence or in + parallel (max 50) + :type is_sequential: bool + :param batch_count: Batch count to be used for controlling the number of + parallel execution (when isSequential is set to false). + :type batch_count: int + :param items: Required. Collection to iterate. + :type items: ~azure.mgmt.datafactory.models.Expression + :param activities: Required. List of activities to execute . + :type activities: list[~azure.mgmt.datafactory.models.Activity] + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'batch_count': {'maximum': 50}, + 'items': {'required': True}, + 'activities': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'is_sequential': {'key': 'typeProperties.isSequential', 'type': 'bool'}, + 'batch_count': {'key': 'typeProperties.batchCount', 'type': 'int'}, + 'items': {'key': 'typeProperties.items', 'type': 'Expression'}, + 'activities': {'key': 'typeProperties.activities', 'type': '[Activity]'}, + } + + def __init__(self, **kwargs): + super(ForEachActivity, self).__init__(**kwargs) + self.is_sequential = kwargs.get('is_sequential', None) + self.batch_count = kwargs.get('batch_count', None) + self.items = kwargs.get('items', None) + self.activities = kwargs.get('activities', None) + self.type = 'ForEach' + + +class FtpReadSettings(StoreReadSettings): + """Ftp read settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The read setting type. + :type type: str + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param recursive: If true, files under the folder path will be read + recursively. Default is true. Type: boolean (or Expression with resultType + boolean). + :type recursive: object + :param wildcard_folder_path: Ftp wildcardFolderPath. Type: string (or + Expression with resultType string). + :type wildcard_folder_path: object + :param wildcard_file_name: Ftp wildcardFileName. Type: string (or + Expression with resultType string). + :type wildcard_file_name: object + :param use_binary_transfer: Specify whether to use binary transfer mode + for FTP stores. + :type use_binary_transfer: bool + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'recursive': {'key': 'recursive', 'type': 'object'}, + 'wildcard_folder_path': {'key': 'wildcardFolderPath', 'type': 'object'}, + 'wildcard_file_name': {'key': 'wildcardFileName', 'type': 'object'}, + 'use_binary_transfer': {'key': 'useBinaryTransfer', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(FtpReadSettings, self).__init__(**kwargs) + self.recursive = kwargs.get('recursive', None) + self.wildcard_folder_path = kwargs.get('wildcard_folder_path', None) + self.wildcard_file_name = kwargs.get('wildcard_file_name', None) + self.use_binary_transfer = kwargs.get('use_binary_transfer', None) + + +class FtpServerLinkedService(LinkedService): + """A FTP server Linked Service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param host: Required. Host name of the FTP server. Type: string (or + Expression with resultType string). + :type host: object + :param port: The TCP port number that the FTP server uses to listen for + client connections. Default value is 21. Type: integer (or Expression with + resultType integer), minimum: 0. + :type port: object + :param authentication_type: The authentication type to be used to connect + to the FTP server. Possible values include: 'Basic', 'Anonymous' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.FtpAuthenticationType + :param user_name: Username to logon the FTP server. Type: string (or + Expression with resultType string). + :type user_name: object + :param password: Password to logon the FTP server. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + :param enable_ssl: If true, connect to the FTP server over SSL/TLS + channel. Default value is true. Type: boolean (or Expression with + resultType boolean). + :type enable_ssl: object + :param enable_server_certificate_validation: If true, validate the FTP + server SSL certificate when connect over SSL/TLS channel. Default value is + true. Type: boolean (or Expression with resultType boolean). + :type enable_server_certificate_validation: object + """ + + _validation = { + 'type': {'required': True}, + 'host': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'host': {'key': 'typeProperties.host', 'type': 'object'}, + 'port': {'key': 'typeProperties.port', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + 'enable_ssl': {'key': 'typeProperties.enableSsl', 'type': 'object'}, + 'enable_server_certificate_validation': {'key': 'typeProperties.enableServerCertificateValidation', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(FtpServerLinkedService, self).__init__(**kwargs) + self.host = kwargs.get('host', None) + self.port = kwargs.get('port', None) + self.authentication_type = kwargs.get('authentication_type', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.enable_ssl = kwargs.get('enable_ssl', None) + self.enable_server_certificate_validation = kwargs.get('enable_server_certificate_validation', None) + self.type = 'FtpServer' + + +class FtpServerLocation(DatasetLocation): + """The location of ftp server dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. Type of dataset storage location. + :type type: str + :param folder_path: Specify the folder path of dataset. Type: string (or + Expression with resultType string) + :type folder_path: object + :param file_name: Specify the file name of dataset. Type: string (or + Expression with resultType string). + :type file_name: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'folder_path': {'key': 'folderPath', 'type': 'object'}, + 'file_name': {'key': 'fileName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(FtpServerLocation, self).__init__(**kwargs) + + +class GetMetadataActivity(ExecutionActivity): + """Activity to get metadata of dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param dataset: Required. GetMetadata activity dataset reference. + :type dataset: ~azure.mgmt.datafactory.models.DatasetReference + :param field_list: Fields of metadata to get from dataset. + :type field_list: list[object] + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'dataset': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'dataset': {'key': 'typeProperties.dataset', 'type': 'DatasetReference'}, + 'field_list': {'key': 'typeProperties.fieldList', 'type': '[object]'}, + } + + def __init__(self, **kwargs): + super(GetMetadataActivity, self).__init__(**kwargs) + self.dataset = kwargs.get('dataset', None) + self.field_list = kwargs.get('field_list', None) + self.type = 'GetMetadata' + + +class GetSsisObjectMetadataRequest(Model): + """The request payload of get SSIS object metadata. + + :param metadata_path: Metadata path. + :type metadata_path: str + """ + + _attribute_map = { + 'metadata_path': {'key': 'metadataPath', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GetSsisObjectMetadataRequest, self).__init__(**kwargs) + self.metadata_path = kwargs.get('metadata_path', None) + + +class GitHubAccessTokenRequest(Model): + """Get GitHub access token request definition. + + All required parameters must be populated in order to send to Azure. + + :param git_hub_access_code: Required. GitHub access code. + :type git_hub_access_code: str + :param git_hub_client_id: GitHub application client ID. + :type git_hub_client_id: str + :param git_hub_access_token_base_url: Required. GitHub access token base + URL. + :type git_hub_access_token_base_url: str + """ + + _validation = { + 'git_hub_access_code': {'required': True}, + 'git_hub_access_token_base_url': {'required': True}, + } + + _attribute_map = { + 'git_hub_access_code': {'key': 'gitHubAccessCode', 'type': 'str'}, + 'git_hub_client_id': {'key': 'gitHubClientId', 'type': 'str'}, + 'git_hub_access_token_base_url': {'key': 'gitHubAccessTokenBaseUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GitHubAccessTokenRequest, self).__init__(**kwargs) + self.git_hub_access_code = kwargs.get('git_hub_access_code', None) + self.git_hub_client_id = kwargs.get('git_hub_client_id', None) + self.git_hub_access_token_base_url = kwargs.get('git_hub_access_token_base_url', None) + + +class GitHubAccessTokenResponse(Model): + """Get GitHub access token response definition. + + :param git_hub_access_token: GitHub access token. + :type git_hub_access_token: str + """ + + _attribute_map = { + 'git_hub_access_token': {'key': 'gitHubAccessToken', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GitHubAccessTokenResponse, self).__init__(**kwargs) + self.git_hub_access_token = kwargs.get('git_hub_access_token', None) + + +class GoogleAdWordsLinkedService(LinkedService): + """Google AdWords service linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param client_customer_id: Required. The Client customer ID of the AdWords + account that you want to fetch report data for. + :type client_customer_id: object + :param developer_token: Required. The developer token associated with the + manager account that you use to grant access to the AdWords API. + :type developer_token: ~azure.mgmt.datafactory.models.SecretBase + :param authentication_type: Required. The OAuth 2.0 authentication + mechanism used for authentication. ServiceAuthentication can only be used + on self-hosted IR. Possible values include: 'ServiceAuthentication', + 'UserAuthentication' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.GoogleAdWordsAuthenticationType + :param refresh_token: The refresh token obtained from Google for + authorizing access to AdWords for UserAuthentication. + :type refresh_token: ~azure.mgmt.datafactory.models.SecretBase + :param client_id: The client id of the google application used to acquire + the refresh token. + :type client_id: ~azure.mgmt.datafactory.models.SecretBase + :param client_secret: The client secret of the google application used to + acquire the refresh token. + :type client_secret: ~azure.mgmt.datafactory.models.SecretBase + :param email: The service account email ID that is used for + ServiceAuthentication and can only be used on self-hosted IR. + :type email: object + :param key_file_path: The full path to the .p12 key file that is used to + authenticate the service account email address and can only be used on + self-hosted IR. + :type key_file_path: object + :param trusted_cert_path: The full path of the .pem file containing + trusted CA certificates for verifying the server when connecting over SSL. + This property can only be set when using SSL on self-hosted IR. The + default value is the cacerts.pem file installed with the IR. + :type trusted_cert_path: object + :param use_system_trust_store: Specifies whether to use a CA certificate + from the system trust store or from a specified PEM file. The default + value is false. + :type use_system_trust_store: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'client_customer_id': {'required': True}, + 'developer_token': {'required': True}, + 'authentication_type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'client_customer_id': {'key': 'typeProperties.clientCustomerID', 'type': 'object'}, + 'developer_token': {'key': 'typeProperties.developerToken', 'type': 'SecretBase'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'refresh_token': {'key': 'typeProperties.refreshToken', 'type': 'SecretBase'}, + 'client_id': {'key': 'typeProperties.clientId', 'type': 'SecretBase'}, + 'client_secret': {'key': 'typeProperties.clientSecret', 'type': 'SecretBase'}, + 'email': {'key': 'typeProperties.email', 'type': 'object'}, + 'key_file_path': {'key': 'typeProperties.keyFilePath', 'type': 'object'}, + 'trusted_cert_path': {'key': 'typeProperties.trustedCertPath', 'type': 'object'}, + 'use_system_trust_store': {'key': 'typeProperties.useSystemTrustStore', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(GoogleAdWordsLinkedService, self).__init__(**kwargs) + self.client_customer_id = kwargs.get('client_customer_id', None) + self.developer_token = kwargs.get('developer_token', None) + self.authentication_type = kwargs.get('authentication_type', None) + self.refresh_token = kwargs.get('refresh_token', None) + self.client_id = kwargs.get('client_id', None) + self.client_secret = kwargs.get('client_secret', None) + self.email = kwargs.get('email', None) + self.key_file_path = kwargs.get('key_file_path', None) + self.trusted_cert_path = kwargs.get('trusted_cert_path', None) + self.use_system_trust_store = kwargs.get('use_system_trust_store', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'GoogleAdWords' + + +class GoogleAdWordsObjectDataset(Dataset): + """Google AdWords service dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(GoogleAdWordsObjectDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.type = 'GoogleAdWordsObject' + + +class GoogleAdWordsSource(CopySource): + """A copy activity Google AdWords service source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(GoogleAdWordsSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'GoogleAdWordsSource' + + +class GoogleBigQueryLinkedService(LinkedService): + """Google BigQuery service linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param project: Required. The default BigQuery project to query against. + :type project: object + :param additional_projects: A comma-separated list of public BigQuery + projects to access. + :type additional_projects: object + :param request_google_drive_scope: Whether to request access to Google + Drive. Allowing Google Drive access enables support for federated tables + that combine BigQuery data with data from Google Drive. The default value + is false. + :type request_google_drive_scope: object + :param authentication_type: Required. The OAuth 2.0 authentication + mechanism used for authentication. ServiceAuthentication can only be used + on self-hosted IR. Possible values include: 'ServiceAuthentication', + 'UserAuthentication' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.GoogleBigQueryAuthenticationType + :param refresh_token: The refresh token obtained from Google for + authorizing access to BigQuery for UserAuthentication. + :type refresh_token: ~azure.mgmt.datafactory.models.SecretBase + :param client_id: The client id of the google application used to acquire + the refresh token. + :type client_id: ~azure.mgmt.datafactory.models.SecretBase + :param client_secret: The client secret of the google application used to + acquire the refresh token. + :type client_secret: ~azure.mgmt.datafactory.models.SecretBase + :param email: The service account email ID that is used for + ServiceAuthentication and can only be used on self-hosted IR. + :type email: object + :param key_file_path: The full path to the .p12 key file that is used to + authenticate the service account email address and can only be used on + self-hosted IR. + :type key_file_path: object + :param trusted_cert_path: The full path of the .pem file containing + trusted CA certificates for verifying the server when connecting over SSL. + This property can only be set when using SSL on self-hosted IR. The + default value is the cacerts.pem file installed with the IR. + :type trusted_cert_path: object + :param use_system_trust_store: Specifies whether to use a CA certificate + from the system trust store or from a specified PEM file. The default + value is false. + :type use_system_trust_store: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'project': {'required': True}, + 'authentication_type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'project': {'key': 'typeProperties.project', 'type': 'object'}, + 'additional_projects': {'key': 'typeProperties.additionalProjects', 'type': 'object'}, + 'request_google_drive_scope': {'key': 'typeProperties.requestGoogleDriveScope', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'refresh_token': {'key': 'typeProperties.refreshToken', 'type': 'SecretBase'}, + 'client_id': {'key': 'typeProperties.clientId', 'type': 'SecretBase'}, + 'client_secret': {'key': 'typeProperties.clientSecret', 'type': 'SecretBase'}, + 'email': {'key': 'typeProperties.email', 'type': 'object'}, + 'key_file_path': {'key': 'typeProperties.keyFilePath', 'type': 'object'}, + 'trusted_cert_path': {'key': 'typeProperties.trustedCertPath', 'type': 'object'}, + 'use_system_trust_store': {'key': 'typeProperties.useSystemTrustStore', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(GoogleBigQueryLinkedService, self).__init__(**kwargs) + self.project = kwargs.get('project', None) + self.additional_projects = kwargs.get('additional_projects', None) + self.request_google_drive_scope = kwargs.get('request_google_drive_scope', None) + self.authentication_type = kwargs.get('authentication_type', None) + self.refresh_token = kwargs.get('refresh_token', None) + self.client_id = kwargs.get('client_id', None) + self.client_secret = kwargs.get('client_secret', None) + self.email = kwargs.get('email', None) + self.key_file_path = kwargs.get('key_file_path', None) + self.trusted_cert_path = kwargs.get('trusted_cert_path', None) + self.use_system_trust_store = kwargs.get('use_system_trust_store', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'GoogleBigQuery' + + +class GoogleBigQueryObjectDataset(Dataset): + """Google BigQuery service dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: This property will be retired. Please consider using + database + table properties instead. + :type table_name: object + :param table: The table name of the Google BigQuery. Type: string (or + Expression with resultType string). + :type table: object + :param dataset: The database name of the Google BigQuery. Type: string (or + Expression with resultType string). + :type dataset: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + 'table': {'key': 'typeProperties.table', 'type': 'object'}, + 'dataset': {'key': 'typeProperties.dataset', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(GoogleBigQueryObjectDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.table = kwargs.get('table', None) + self.dataset = kwargs.get('dataset', None) + self.type = 'GoogleBigQueryObject' + + +class GoogleBigQuerySource(CopySource): + """A copy activity Google BigQuery service source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(GoogleBigQuerySource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'GoogleBigQuerySource' + + +class GreenplumLinkedService(LinkedService): + """Greenplum Database linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: An ODBC connection string. Type: string, + SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param pwd: The Azure key vault secret reference of password in connection + string. + :type pwd: ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'pwd': {'key': 'typeProperties.pwd', 'type': 'AzureKeyVaultSecretReference'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(GreenplumLinkedService, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.pwd = kwargs.get('pwd', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'Greenplum' + + +class GreenplumSource(CopySource): + """A copy activity Greenplum Database source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(GreenplumSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'GreenplumSource' + + +class GreenplumTableDataset(Dataset): + """Greenplum Database dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: This property will be retired. Please consider using + schema + table properties instead. + :type table_name: object + :param table: The table name of Greenplum. Type: string (or Expression + with resultType string). + :type table: object + :param greenplum_table_dataset_schema: The schema name of Greenplum. Type: + string (or Expression with resultType string). + :type greenplum_table_dataset_schema: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + 'table': {'key': 'typeProperties.table', 'type': 'object'}, + 'greenplum_table_dataset_schema': {'key': 'typeProperties.schema', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(GreenplumTableDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.table = kwargs.get('table', None) + self.greenplum_table_dataset_schema = kwargs.get('greenplum_table_dataset_schema', None) + self.type = 'GreenplumTable' + + +class HBaseLinkedService(LinkedService): + """HBase server linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param host: Required. The IP address or host name of the HBase server. + (i.e. 192.168.222.160) + :type host: object + :param port: The TCP port that the HBase instance uses to listen for + client connections. The default value is 9090. + :type port: object + :param http_path: The partial URL corresponding to the HBase server. (i.e. + /gateway/sandbox/hbase/version) + :type http_path: object + :param authentication_type: Required. The authentication mechanism to use + to connect to the HBase server. Possible values include: 'Anonymous', + 'Basic' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.HBaseAuthenticationType + :param username: The user name used to connect to the HBase instance. + :type username: object + :param password: The password corresponding to the user name. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param enable_ssl: Specifies whether the connections to the server are + encrypted using SSL. The default value is false. + :type enable_ssl: object + :param trusted_cert_path: The full path of the .pem file containing + trusted CA certificates for verifying the server when connecting over SSL. + This property can only be set when using SSL on self-hosted IR. The + default value is the cacerts.pem file installed with the IR. + :type trusted_cert_path: object + :param allow_host_name_cn_mismatch: Specifies whether to require a + CA-issued SSL certificate name to match the host name of the server when + connecting over SSL. The default value is false. + :type allow_host_name_cn_mismatch: object + :param allow_self_signed_server_cert: Specifies whether to allow + self-signed certificates from the server. The default value is false. + :type allow_self_signed_server_cert: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'host': {'required': True}, + 'authentication_type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'host': {'key': 'typeProperties.host', 'type': 'object'}, + 'port': {'key': 'typeProperties.port', 'type': 'object'}, + 'http_path': {'key': 'typeProperties.httpPath', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'enable_ssl': {'key': 'typeProperties.enableSsl', 'type': 'object'}, + 'trusted_cert_path': {'key': 'typeProperties.trustedCertPath', 'type': 'object'}, + 'allow_host_name_cn_mismatch': {'key': 'typeProperties.allowHostNameCNMismatch', 'type': 'object'}, + 'allow_self_signed_server_cert': {'key': 'typeProperties.allowSelfSignedServerCert', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(HBaseLinkedService, self).__init__(**kwargs) + self.host = kwargs.get('host', None) + self.port = kwargs.get('port', None) + self.http_path = kwargs.get('http_path', None) + self.authentication_type = kwargs.get('authentication_type', None) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + self.enable_ssl = kwargs.get('enable_ssl', None) + self.trusted_cert_path = kwargs.get('trusted_cert_path', None) + self.allow_host_name_cn_mismatch = kwargs.get('allow_host_name_cn_mismatch', None) + self.allow_self_signed_server_cert = kwargs.get('allow_self_signed_server_cert', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'HBase' + + +class HBaseObjectDataset(Dataset): + """HBase server dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(HBaseObjectDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.type = 'HBaseObject' + + +class HBaseSource(CopySource): + """A copy activity HBase server source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(HBaseSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'HBaseSource' + + +class HdfsLinkedService(LinkedService): + """Hadoop Distributed File System (HDFS) linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param url: Required. The URL of the HDFS service endpoint, e.g. + http://myhostname:50070/webhdfs/v1 . Type: string (or Expression with + resultType string). + :type url: object + :param authentication_type: Type of authentication used to connect to the + HDFS. Possible values are: Anonymous and Windows. Type: string (or + Expression with resultType string). + :type authentication_type: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + :param user_name: User name for Windows authentication. Type: string (or + Expression with resultType string). + :type user_name: object + :param password: Password for Windows authentication. + :type password: ~azure.mgmt.datafactory.models.SecretBase + """ + + _validation = { + 'type': {'required': True}, + 'url': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'url': {'key': 'typeProperties.url', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + } + + def __init__(self, **kwargs): + super(HdfsLinkedService, self).__init__(**kwargs) + self.url = kwargs.get('url', None) + self.authentication_type = kwargs.get('authentication_type', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.type = 'Hdfs' + + +class HdfsLocation(DatasetLocation): + """The location of HDFS. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. Type of dataset storage location. + :type type: str + :param folder_path: Specify the folder path of dataset. Type: string (or + Expression with resultType string) + :type folder_path: object + :param file_name: Specify the file name of dataset. Type: string (or + Expression with resultType string). + :type file_name: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'folder_path': {'key': 'folderPath', 'type': 'object'}, + 'file_name': {'key': 'fileName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(HdfsLocation, self).__init__(**kwargs) + + +class HdfsReadSettings(StoreReadSettings): + """HDFS read settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The read setting type. + :type type: str + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param recursive: If true, files under the folder path will be read + recursively. Default is true. Type: boolean (or Expression with resultType + boolean). + :type recursive: object + :param wildcard_folder_path: HDFS wildcardFolderPath. Type: string (or + Expression with resultType string). + :type wildcard_folder_path: object + :param wildcard_file_name: HDFS wildcardFileName. Type: string (or + Expression with resultType string). + :type wildcard_file_name: object + :param enable_partition_discovery: Indicates whether to enable partition + discovery. + :type enable_partition_discovery: bool + :param modified_datetime_start: The start of file's modified datetime. + Type: string (or Expression with resultType string). + :type modified_datetime_start: object + :param modified_datetime_end: The end of file's modified datetime. Type: + string (or Expression with resultType string). + :type modified_datetime_end: object + :param distcp_settings: Specifies Distcp-related settings. + :type distcp_settings: ~azure.mgmt.datafactory.models.DistcpSettings + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'recursive': {'key': 'recursive', 'type': 'object'}, + 'wildcard_folder_path': {'key': 'wildcardFolderPath', 'type': 'object'}, + 'wildcard_file_name': {'key': 'wildcardFileName', 'type': 'object'}, + 'enable_partition_discovery': {'key': 'enablePartitionDiscovery', 'type': 'bool'}, + 'modified_datetime_start': {'key': 'modifiedDatetimeStart', 'type': 'object'}, + 'modified_datetime_end': {'key': 'modifiedDatetimeEnd', 'type': 'object'}, + 'distcp_settings': {'key': 'distcpSettings', 'type': 'DistcpSettings'}, + } + + def __init__(self, **kwargs): + super(HdfsReadSettings, self).__init__(**kwargs) + self.recursive = kwargs.get('recursive', None) + self.wildcard_folder_path = kwargs.get('wildcard_folder_path', None) + self.wildcard_file_name = kwargs.get('wildcard_file_name', None) + self.enable_partition_discovery = kwargs.get('enable_partition_discovery', None) + self.modified_datetime_start = kwargs.get('modified_datetime_start', None) + self.modified_datetime_end = kwargs.get('modified_datetime_end', None) + self.distcp_settings = kwargs.get('distcp_settings', None) + + +class HdfsSource(CopySource): + """A copy activity HDFS source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param recursive: If true, files under the folder path will be read + recursively. Default is true. Type: boolean (or Expression with resultType + boolean). + :type recursive: object + :param distcp_settings: Specifies Distcp-related settings. + :type distcp_settings: ~azure.mgmt.datafactory.models.DistcpSettings + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'recursive': {'key': 'recursive', 'type': 'object'}, + 'distcp_settings': {'key': 'distcpSettings', 'type': 'DistcpSettings'}, + } + + def __init__(self, **kwargs): + super(HdfsSource, self).__init__(**kwargs) + self.recursive = kwargs.get('recursive', None) + self.distcp_settings = kwargs.get('distcp_settings', None) + self.type = 'HdfsSource' + + +class HDInsightHiveActivity(ExecutionActivity): + """HDInsight Hive activity type. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param storage_linked_services: Storage linked service references. + :type storage_linked_services: + list[~azure.mgmt.datafactory.models.LinkedServiceReference] + :param arguments: User specified arguments to HDInsightActivity. + :type arguments: list[object] + :param get_debug_info: Debug info option. Possible values include: 'None', + 'Always', 'Failure' + :type get_debug_info: str or + ~azure.mgmt.datafactory.models.HDInsightActivityDebugInfoOption + :param script_path: Script path. Type: string (or Expression with + resultType string). + :type script_path: object + :param script_linked_service: Script linked service reference. + :type script_linked_service: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param defines: Allows user to specify defines for Hive job request. + :type defines: dict[str, object] + :param variables: User specified arguments under hivevar namespace. + :type variables: list[object] + :param query_timeout: Query timeout value (in minutes). Effective when + the HDInsight cluster is with ESP (Enterprise Security Package) + :type query_timeout: int + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'storage_linked_services': {'key': 'typeProperties.storageLinkedServices', 'type': '[LinkedServiceReference]'}, + 'arguments': {'key': 'typeProperties.arguments', 'type': '[object]'}, + 'get_debug_info': {'key': 'typeProperties.getDebugInfo', 'type': 'str'}, + 'script_path': {'key': 'typeProperties.scriptPath', 'type': 'object'}, + 'script_linked_service': {'key': 'typeProperties.scriptLinkedService', 'type': 'LinkedServiceReference'}, + 'defines': {'key': 'typeProperties.defines', 'type': '{object}'}, + 'variables': {'key': 'typeProperties.variables', 'type': '[object]'}, + 'query_timeout': {'key': 'typeProperties.queryTimeout', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(HDInsightHiveActivity, self).__init__(**kwargs) + self.storage_linked_services = kwargs.get('storage_linked_services', None) + self.arguments = kwargs.get('arguments', None) + self.get_debug_info = kwargs.get('get_debug_info', None) + self.script_path = kwargs.get('script_path', None) + self.script_linked_service = kwargs.get('script_linked_service', None) + self.defines = kwargs.get('defines', None) + self.variables = kwargs.get('variables', None) + self.query_timeout = kwargs.get('query_timeout', None) + self.type = 'HDInsightHive' + + +class HDInsightLinkedService(LinkedService): + """HDInsight linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param cluster_uri: Required. HDInsight cluster URI. Type: string (or + Expression with resultType string). + :type cluster_uri: object + :param user_name: HDInsight cluster user name. Type: string (or Expression + with resultType string). + :type user_name: object + :param password: HDInsight cluster password. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param linked_service_name: The Azure Storage linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param hcatalog_linked_service_name: A reference to the Azure SQL linked + service that points to the HCatalog database. + :type hcatalog_linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + :param is_esp_enabled: Specify if the HDInsight is created with ESP + (Enterprise Security Package). Type: Boolean. + :type is_esp_enabled: object + :param file_system: Specify the FileSystem if the main storage for the + HDInsight is ADLS Gen2. Type: string (or Expression with resultType + string). + :type file_system: object + """ + + _validation = { + 'type': {'required': True}, + 'cluster_uri': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'cluster_uri': {'key': 'typeProperties.clusterUri', 'type': 'object'}, + 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'linked_service_name': {'key': 'typeProperties.linkedServiceName', 'type': 'LinkedServiceReference'}, + 'hcatalog_linked_service_name': {'key': 'typeProperties.hcatalogLinkedServiceName', 'type': 'LinkedServiceReference'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + 'is_esp_enabled': {'key': 'typeProperties.isEspEnabled', 'type': 'object'}, + 'file_system': {'key': 'typeProperties.fileSystem', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(HDInsightLinkedService, self).__init__(**kwargs) + self.cluster_uri = kwargs.get('cluster_uri', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.linked_service_name = kwargs.get('linked_service_name', None) + self.hcatalog_linked_service_name = kwargs.get('hcatalog_linked_service_name', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.is_esp_enabled = kwargs.get('is_esp_enabled', None) + self.file_system = kwargs.get('file_system', None) + self.type = 'HDInsight' + + +class HDInsightMapReduceActivity(ExecutionActivity): + """HDInsight MapReduce activity type. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param storage_linked_services: Storage linked service references. + :type storage_linked_services: + list[~azure.mgmt.datafactory.models.LinkedServiceReference] + :param arguments: User specified arguments to HDInsightActivity. + :type arguments: list[object] + :param get_debug_info: Debug info option. Possible values include: 'None', + 'Always', 'Failure' + :type get_debug_info: str or + ~azure.mgmt.datafactory.models.HDInsightActivityDebugInfoOption + :param class_name: Required. Class name. Type: string (or Expression with + resultType string). + :type class_name: object + :param jar_file_path: Required. Jar path. Type: string (or Expression with + resultType string). + :type jar_file_path: object + :param jar_linked_service: Jar linked service reference. + :type jar_linked_service: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param jar_libs: Jar libs. + :type jar_libs: list[object] + :param defines: Allows user to specify defines for the MapReduce job + request. + :type defines: dict[str, object] + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'class_name': {'required': True}, + 'jar_file_path': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'storage_linked_services': {'key': 'typeProperties.storageLinkedServices', 'type': '[LinkedServiceReference]'}, + 'arguments': {'key': 'typeProperties.arguments', 'type': '[object]'}, + 'get_debug_info': {'key': 'typeProperties.getDebugInfo', 'type': 'str'}, + 'class_name': {'key': 'typeProperties.className', 'type': 'object'}, + 'jar_file_path': {'key': 'typeProperties.jarFilePath', 'type': 'object'}, + 'jar_linked_service': {'key': 'typeProperties.jarLinkedService', 'type': 'LinkedServiceReference'}, + 'jar_libs': {'key': 'typeProperties.jarLibs', 'type': '[object]'}, + 'defines': {'key': 'typeProperties.defines', 'type': '{object}'}, + } + + def __init__(self, **kwargs): + super(HDInsightMapReduceActivity, self).__init__(**kwargs) + self.storage_linked_services = kwargs.get('storage_linked_services', None) + self.arguments = kwargs.get('arguments', None) + self.get_debug_info = kwargs.get('get_debug_info', None) + self.class_name = kwargs.get('class_name', None) + self.jar_file_path = kwargs.get('jar_file_path', None) + self.jar_linked_service = kwargs.get('jar_linked_service', None) + self.jar_libs = kwargs.get('jar_libs', None) + self.defines = kwargs.get('defines', None) + self.type = 'HDInsightMapReduce' + + +class HDInsightOnDemandLinkedService(LinkedService): + """HDInsight ondemand linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param cluster_size: Required. Number of worker/data nodes in the cluster. + Suggestion value: 4. Type: string (or Expression with resultType string). + :type cluster_size: object + :param time_to_live: Required. The allowed idle time for the on-demand + HDInsight cluster. Specifies how long the on-demand HDInsight cluster + stays alive after completion of an activity run if there are no other + active jobs in the cluster. The minimum value is 5 mins. Type: string (or + Expression with resultType string). + :type time_to_live: object + :param version: Required. Version of the HDInsight cluster.  Type: string + (or Expression with resultType string). + :type version: object + :param linked_service_name: Required. Azure Storage linked service to be + used by the on-demand cluster for storing and processing data. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param host_subscription_id: Required. The customer’s subscription to host + the cluster. Type: string (or Expression with resultType string). + :type host_subscription_id: object + :param service_principal_id: The service principal id for the + hostSubscriptionId. Type: string (or Expression with resultType string). + :type service_principal_id: object + :param service_principal_key: The key for the service principal id. + :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase + :param tenant: Required. The Tenant id/name to which the service principal + belongs. Type: string (or Expression with resultType string). + :type tenant: object + :param cluster_resource_group: Required. The resource group where the + cluster belongs. Type: string (or Expression with resultType string). + :type cluster_resource_group: object + :param cluster_name_prefix: The prefix of cluster name, postfix will be + distinct with timestamp. Type: string (or Expression with resultType + string). + :type cluster_name_prefix: object + :param cluster_user_name: The username to access the cluster. Type: string + (or Expression with resultType string). + :type cluster_user_name: object + :param cluster_password: The password to access the cluster. + :type cluster_password: ~azure.mgmt.datafactory.models.SecretBase + :param cluster_ssh_user_name: The username to SSH remotely connect to + cluster’s node (for Linux). Type: string (or Expression with resultType + string). + :type cluster_ssh_user_name: object + :param cluster_ssh_password: The password to SSH remotely connect + cluster’s node (for Linux). + :type cluster_ssh_password: ~azure.mgmt.datafactory.models.SecretBase + :param additional_linked_service_names: Specifies additional storage + accounts for the HDInsight linked service so that the Data Factory service + can register them on your behalf. + :type additional_linked_service_names: + list[~azure.mgmt.datafactory.models.LinkedServiceReference] + :param hcatalog_linked_service_name: The name of Azure SQL linked service + that point to the HCatalog database. The on-demand HDInsight cluster is + created by using the Azure SQL database as the metastore. + :type hcatalog_linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param cluster_type: The cluster type. Type: string (or Expression with + resultType string). + :type cluster_type: object + :param spark_version: The version of spark if the cluster type is 'spark'. + Type: string (or Expression with resultType string). + :type spark_version: object + :param core_configuration: Specifies the core configuration parameters (as + in core-site.xml) for the HDInsight cluster to be created. + :type core_configuration: object + :param h_base_configuration: Specifies the HBase configuration parameters + (hbase-site.xml) for the HDInsight cluster. + :type h_base_configuration: object + :param hdfs_configuration: Specifies the HDFS configuration parameters + (hdfs-site.xml) for the HDInsight cluster. + :type hdfs_configuration: object + :param hive_configuration: Specifies the hive configuration parameters + (hive-site.xml) for the HDInsight cluster. + :type hive_configuration: object + :param map_reduce_configuration: Specifies the MapReduce configuration + parameters (mapred-site.xml) for the HDInsight cluster. + :type map_reduce_configuration: object + :param oozie_configuration: Specifies the Oozie configuration parameters + (oozie-site.xml) for the HDInsight cluster. + :type oozie_configuration: object + :param storm_configuration: Specifies the Storm configuration parameters + (storm-site.xml) for the HDInsight cluster. + :type storm_configuration: object + :param yarn_configuration: Specifies the Yarn configuration parameters + (yarn-site.xml) for the HDInsight cluster. + :type yarn_configuration: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + :param head_node_size: Specifies the size of the head node for the + HDInsight cluster. + :type head_node_size: object + :param data_node_size: Specifies the size of the data node for the + HDInsight cluster. + :type data_node_size: object + :param zookeeper_node_size: Specifies the size of the Zoo Keeper node for + the HDInsight cluster. + :type zookeeper_node_size: object + :param script_actions: Custom script actions to run on HDI ondemand + cluster once it's up. Please refer to + https://docs.microsoft.com/en-us/azure/hdinsight/hdinsight-hadoop-customize-cluster-linux?toc=%2Fen-us%2Fazure%2Fhdinsight%2Fr-server%2FTOC.json&bc=%2Fen-us%2Fazure%2Fbread%2Ftoc.json#understanding-script-actions. + :type script_actions: list[~azure.mgmt.datafactory.models.ScriptAction] + :param virtual_network_id: The ARM resource ID for the vNet to which the + cluster should be joined after creation. Type: string (or Expression with + resultType string). + :type virtual_network_id: object + :param subnet_name: The ARM resource ID for the subnet in the vNet. If + virtualNetworkId was specified, then this property is required. Type: + string (or Expression with resultType string). + :type subnet_name: object + """ + + _validation = { + 'type': {'required': True}, + 'cluster_size': {'required': True}, + 'time_to_live': {'required': True}, + 'version': {'required': True}, + 'linked_service_name': {'required': True}, + 'host_subscription_id': {'required': True}, + 'tenant': {'required': True}, + 'cluster_resource_group': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'cluster_size': {'key': 'typeProperties.clusterSize', 'type': 'object'}, + 'time_to_live': {'key': 'typeProperties.timeToLive', 'type': 'object'}, + 'version': {'key': 'typeProperties.version', 'type': 'object'}, + 'linked_service_name': {'key': 'typeProperties.linkedServiceName', 'type': 'LinkedServiceReference'}, + 'host_subscription_id': {'key': 'typeProperties.hostSubscriptionId', 'type': 'object'}, + 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, + 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, + 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, + 'cluster_resource_group': {'key': 'typeProperties.clusterResourceGroup', 'type': 'object'}, + 'cluster_name_prefix': {'key': 'typeProperties.clusterNamePrefix', 'type': 'object'}, + 'cluster_user_name': {'key': 'typeProperties.clusterUserName', 'type': 'object'}, + 'cluster_password': {'key': 'typeProperties.clusterPassword', 'type': 'SecretBase'}, + 'cluster_ssh_user_name': {'key': 'typeProperties.clusterSshUserName', 'type': 'object'}, + 'cluster_ssh_password': {'key': 'typeProperties.clusterSshPassword', 'type': 'SecretBase'}, + 'additional_linked_service_names': {'key': 'typeProperties.additionalLinkedServiceNames', 'type': '[LinkedServiceReference]'}, + 'hcatalog_linked_service_name': {'key': 'typeProperties.hcatalogLinkedServiceName', 'type': 'LinkedServiceReference'}, + 'cluster_type': {'key': 'typeProperties.clusterType', 'type': 'object'}, + 'spark_version': {'key': 'typeProperties.sparkVersion', 'type': 'object'}, + 'core_configuration': {'key': 'typeProperties.coreConfiguration', 'type': 'object'}, + 'h_base_configuration': {'key': 'typeProperties.hBaseConfiguration', 'type': 'object'}, + 'hdfs_configuration': {'key': 'typeProperties.hdfsConfiguration', 'type': 'object'}, + 'hive_configuration': {'key': 'typeProperties.hiveConfiguration', 'type': 'object'}, + 'map_reduce_configuration': {'key': 'typeProperties.mapReduceConfiguration', 'type': 'object'}, + 'oozie_configuration': {'key': 'typeProperties.oozieConfiguration', 'type': 'object'}, + 'storm_configuration': {'key': 'typeProperties.stormConfiguration', 'type': 'object'}, + 'yarn_configuration': {'key': 'typeProperties.yarnConfiguration', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + 'head_node_size': {'key': 'typeProperties.headNodeSize', 'type': 'object'}, + 'data_node_size': {'key': 'typeProperties.dataNodeSize', 'type': 'object'}, + 'zookeeper_node_size': {'key': 'typeProperties.zookeeperNodeSize', 'type': 'object'}, + 'script_actions': {'key': 'typeProperties.scriptActions', 'type': '[ScriptAction]'}, + 'virtual_network_id': {'key': 'typeProperties.virtualNetworkId', 'type': 'object'}, + 'subnet_name': {'key': 'typeProperties.subnetName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(HDInsightOnDemandLinkedService, self).__init__(**kwargs) + self.cluster_size = kwargs.get('cluster_size', None) + self.time_to_live = kwargs.get('time_to_live', None) + self.version = kwargs.get('version', None) + self.linked_service_name = kwargs.get('linked_service_name', None) + self.host_subscription_id = kwargs.get('host_subscription_id', None) + self.service_principal_id = kwargs.get('service_principal_id', None) + self.service_principal_key = kwargs.get('service_principal_key', None) + self.tenant = kwargs.get('tenant', None) + self.cluster_resource_group = kwargs.get('cluster_resource_group', None) + self.cluster_name_prefix = kwargs.get('cluster_name_prefix', None) + self.cluster_user_name = kwargs.get('cluster_user_name', None) + self.cluster_password = kwargs.get('cluster_password', None) + self.cluster_ssh_user_name = kwargs.get('cluster_ssh_user_name', None) + self.cluster_ssh_password = kwargs.get('cluster_ssh_password', None) + self.additional_linked_service_names = kwargs.get('additional_linked_service_names', None) + self.hcatalog_linked_service_name = kwargs.get('hcatalog_linked_service_name', None) + self.cluster_type = kwargs.get('cluster_type', None) + self.spark_version = kwargs.get('spark_version', None) + self.core_configuration = kwargs.get('core_configuration', None) + self.h_base_configuration = kwargs.get('h_base_configuration', None) + self.hdfs_configuration = kwargs.get('hdfs_configuration', None) + self.hive_configuration = kwargs.get('hive_configuration', None) + self.map_reduce_configuration = kwargs.get('map_reduce_configuration', None) + self.oozie_configuration = kwargs.get('oozie_configuration', None) + self.storm_configuration = kwargs.get('storm_configuration', None) + self.yarn_configuration = kwargs.get('yarn_configuration', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.head_node_size = kwargs.get('head_node_size', None) + self.data_node_size = kwargs.get('data_node_size', None) + self.zookeeper_node_size = kwargs.get('zookeeper_node_size', None) + self.script_actions = kwargs.get('script_actions', None) + self.virtual_network_id = kwargs.get('virtual_network_id', None) + self.subnet_name = kwargs.get('subnet_name', None) + self.type = 'HDInsightOnDemand' + + +class HDInsightPigActivity(ExecutionActivity): + """HDInsight Pig activity type. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param storage_linked_services: Storage linked service references. + :type storage_linked_services: + list[~azure.mgmt.datafactory.models.LinkedServiceReference] + :param arguments: User specified arguments to HDInsightActivity. + :type arguments: list[object] + :param get_debug_info: Debug info option. Possible values include: 'None', + 'Always', 'Failure' + :type get_debug_info: str or + ~azure.mgmt.datafactory.models.HDInsightActivityDebugInfoOption + :param script_path: Script path. Type: string (or Expression with + resultType string). + :type script_path: object + :param script_linked_service: Script linked service reference. + :type script_linked_service: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param defines: Allows user to specify defines for Pig job request. + :type defines: dict[str, object] + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'storage_linked_services': {'key': 'typeProperties.storageLinkedServices', 'type': '[LinkedServiceReference]'}, + 'arguments': {'key': 'typeProperties.arguments', 'type': '[object]'}, + 'get_debug_info': {'key': 'typeProperties.getDebugInfo', 'type': 'str'}, + 'script_path': {'key': 'typeProperties.scriptPath', 'type': 'object'}, + 'script_linked_service': {'key': 'typeProperties.scriptLinkedService', 'type': 'LinkedServiceReference'}, + 'defines': {'key': 'typeProperties.defines', 'type': '{object}'}, + } + + def __init__(self, **kwargs): + super(HDInsightPigActivity, self).__init__(**kwargs) + self.storage_linked_services = kwargs.get('storage_linked_services', None) + self.arguments = kwargs.get('arguments', None) + self.get_debug_info = kwargs.get('get_debug_info', None) + self.script_path = kwargs.get('script_path', None) + self.script_linked_service = kwargs.get('script_linked_service', None) + self.defines = kwargs.get('defines', None) + self.type = 'HDInsightPig' + + +class HDInsightSparkActivity(ExecutionActivity): + """HDInsight Spark activity. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param root_path: Required. The root path in 'sparkJobLinkedService' for + all the job’s files. Type: string (or Expression with resultType string). + :type root_path: object + :param entry_file_path: Required. The relative path to the root folder of + the code/package to be executed. Type: string (or Expression with + resultType string). + :type entry_file_path: object + :param arguments: The user-specified arguments to HDInsightSparkActivity. + :type arguments: list[object] + :param get_debug_info: Debug info option. Possible values include: 'None', + 'Always', 'Failure' + :type get_debug_info: str or + ~azure.mgmt.datafactory.models.HDInsightActivityDebugInfoOption + :param spark_job_linked_service: The storage linked service for uploading + the entry file and dependencies, and for receiving logs. + :type spark_job_linked_service: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param class_name: The application's Java/Spark main class. + :type class_name: str + :param proxy_user: The user to impersonate that will execute the job. + Type: string (or Expression with resultType string). + :type proxy_user: object + :param spark_config: Spark configuration property. + :type spark_config: dict[str, object] + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'root_path': {'required': True}, + 'entry_file_path': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'root_path': {'key': 'typeProperties.rootPath', 'type': 'object'}, + 'entry_file_path': {'key': 'typeProperties.entryFilePath', 'type': 'object'}, + 'arguments': {'key': 'typeProperties.arguments', 'type': '[object]'}, + 'get_debug_info': {'key': 'typeProperties.getDebugInfo', 'type': 'str'}, + 'spark_job_linked_service': {'key': 'typeProperties.sparkJobLinkedService', 'type': 'LinkedServiceReference'}, + 'class_name': {'key': 'typeProperties.className', 'type': 'str'}, + 'proxy_user': {'key': 'typeProperties.proxyUser', 'type': 'object'}, + 'spark_config': {'key': 'typeProperties.sparkConfig', 'type': '{object}'}, + } + + def __init__(self, **kwargs): + super(HDInsightSparkActivity, self).__init__(**kwargs) + self.root_path = kwargs.get('root_path', None) + self.entry_file_path = kwargs.get('entry_file_path', None) + self.arguments = kwargs.get('arguments', None) + self.get_debug_info = kwargs.get('get_debug_info', None) + self.spark_job_linked_service = kwargs.get('spark_job_linked_service', None) + self.class_name = kwargs.get('class_name', None) + self.proxy_user = kwargs.get('proxy_user', None) + self.spark_config = kwargs.get('spark_config', None) + self.type = 'HDInsightSpark' + + +class HDInsightStreamingActivity(ExecutionActivity): + """HDInsight streaming activity type. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param storage_linked_services: Storage linked service references. + :type storage_linked_services: + list[~azure.mgmt.datafactory.models.LinkedServiceReference] + :param arguments: User specified arguments to HDInsightActivity. + :type arguments: list[object] + :param get_debug_info: Debug info option. Possible values include: 'None', + 'Always', 'Failure' + :type get_debug_info: str or + ~azure.mgmt.datafactory.models.HDInsightActivityDebugInfoOption + :param mapper: Required. Mapper executable name. Type: string (or + Expression with resultType string). + :type mapper: object + :param reducer: Required. Reducer executable name. Type: string (or + Expression with resultType string). + :type reducer: object + :param input: Required. Input blob path. Type: string (or Expression with + resultType string). + :type input: object + :param output: Required. Output blob path. Type: string (or Expression + with resultType string). + :type output: object + :param file_paths: Required. Paths to streaming job files. Can be + directories. + :type file_paths: list[object] + :param file_linked_service: Linked service reference where the files are + located. + :type file_linked_service: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param combiner: Combiner executable name. Type: string (or Expression + with resultType string). + :type combiner: object + :param command_environment: Command line environment values. + :type command_environment: list[object] + :param defines: Allows user to specify defines for streaming job request. + :type defines: dict[str, object] + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'mapper': {'required': True}, + 'reducer': {'required': True}, + 'input': {'required': True}, + 'output': {'required': True}, + 'file_paths': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'storage_linked_services': {'key': 'typeProperties.storageLinkedServices', 'type': '[LinkedServiceReference]'}, + 'arguments': {'key': 'typeProperties.arguments', 'type': '[object]'}, + 'get_debug_info': {'key': 'typeProperties.getDebugInfo', 'type': 'str'}, + 'mapper': {'key': 'typeProperties.mapper', 'type': 'object'}, + 'reducer': {'key': 'typeProperties.reducer', 'type': 'object'}, + 'input': {'key': 'typeProperties.input', 'type': 'object'}, + 'output': {'key': 'typeProperties.output', 'type': 'object'}, + 'file_paths': {'key': 'typeProperties.filePaths', 'type': '[object]'}, + 'file_linked_service': {'key': 'typeProperties.fileLinkedService', 'type': 'LinkedServiceReference'}, + 'combiner': {'key': 'typeProperties.combiner', 'type': 'object'}, + 'command_environment': {'key': 'typeProperties.commandEnvironment', 'type': '[object]'}, + 'defines': {'key': 'typeProperties.defines', 'type': '{object}'}, + } + + def __init__(self, **kwargs): + super(HDInsightStreamingActivity, self).__init__(**kwargs) + self.storage_linked_services = kwargs.get('storage_linked_services', None) + self.arguments = kwargs.get('arguments', None) + self.get_debug_info = kwargs.get('get_debug_info', None) + self.mapper = kwargs.get('mapper', None) + self.reducer = kwargs.get('reducer', None) + self.input = kwargs.get('input', None) + self.output = kwargs.get('output', None) + self.file_paths = kwargs.get('file_paths', None) + self.file_linked_service = kwargs.get('file_linked_service', None) + self.combiner = kwargs.get('combiner', None) + self.command_environment = kwargs.get('command_environment', None) + self.defines = kwargs.get('defines', None) + self.type = 'HDInsightStreaming' + + +class HiveLinkedService(LinkedService): + """Hive Server linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param host: Required. IP address or host name of the Hive server, + separated by ';' for multiple hosts (only when serviceDiscoveryMode is + enable). + :type host: object + :param port: The TCP port that the Hive server uses to listen for client + connections. + :type port: object + :param server_type: The type of Hive server. Possible values include: + 'HiveServer1', 'HiveServer2', 'HiveThriftServer' + :type server_type: str or ~azure.mgmt.datafactory.models.HiveServerType + :param thrift_transport_protocol: The transport protocol to use in the + Thrift layer. Possible values include: 'Binary', 'SASL', 'HTTP ' + :type thrift_transport_protocol: str or + ~azure.mgmt.datafactory.models.HiveThriftTransportProtocol + :param authentication_type: Required. The authentication method used to + access the Hive server. Possible values include: 'Anonymous', 'Username', + 'UsernameAndPassword', 'WindowsAzureHDInsightService' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.HiveAuthenticationType + :param service_discovery_mode: true to indicate using the ZooKeeper + service, false not. + :type service_discovery_mode: object + :param zoo_keeper_name_space: The namespace on ZooKeeper under which Hive + Server 2 nodes are added. + :type zoo_keeper_name_space: object + :param use_native_query: Specifies whether the driver uses native HiveQL + queries,or converts them into an equivalent form in HiveQL. + :type use_native_query: object + :param username: The user name that you use to access Hive Server. + :type username: object + :param password: The password corresponding to the user name that you + provided in the Username field + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param http_path: The partial URL corresponding to the Hive server. + :type http_path: object + :param enable_ssl: Specifies whether the connections to the server are + encrypted using SSL. The default value is false. + :type enable_ssl: object + :param trusted_cert_path: The full path of the .pem file containing + trusted CA certificates for verifying the server when connecting over SSL. + This property can only be set when using SSL on self-hosted IR. The + default value is the cacerts.pem file installed with the IR. + :type trusted_cert_path: object + :param use_system_trust_store: Specifies whether to use a CA certificate + from the system trust store or from a specified PEM file. The default + value is false. + :type use_system_trust_store: object + :param allow_host_name_cn_mismatch: Specifies whether to require a + CA-issued SSL certificate name to match the host name of the server when + connecting over SSL. The default value is false. + :type allow_host_name_cn_mismatch: object + :param allow_self_signed_server_cert: Specifies whether to allow + self-signed certificates from the server. The default value is false. + :type allow_self_signed_server_cert: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'host': {'required': True}, + 'authentication_type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'host': {'key': 'typeProperties.host', 'type': 'object'}, + 'port': {'key': 'typeProperties.port', 'type': 'object'}, + 'server_type': {'key': 'typeProperties.serverType', 'type': 'str'}, + 'thrift_transport_protocol': {'key': 'typeProperties.thriftTransportProtocol', 'type': 'str'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'service_discovery_mode': {'key': 'typeProperties.serviceDiscoveryMode', 'type': 'object'}, + 'zoo_keeper_name_space': {'key': 'typeProperties.zooKeeperNameSpace', 'type': 'object'}, + 'use_native_query': {'key': 'typeProperties.useNativeQuery', 'type': 'object'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'http_path': {'key': 'typeProperties.httpPath', 'type': 'object'}, + 'enable_ssl': {'key': 'typeProperties.enableSsl', 'type': 'object'}, + 'trusted_cert_path': {'key': 'typeProperties.trustedCertPath', 'type': 'object'}, + 'use_system_trust_store': {'key': 'typeProperties.useSystemTrustStore', 'type': 'object'}, + 'allow_host_name_cn_mismatch': {'key': 'typeProperties.allowHostNameCNMismatch', 'type': 'object'}, + 'allow_self_signed_server_cert': {'key': 'typeProperties.allowSelfSignedServerCert', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(HiveLinkedService, self).__init__(**kwargs) + self.host = kwargs.get('host', None) + self.port = kwargs.get('port', None) + self.server_type = kwargs.get('server_type', None) + self.thrift_transport_protocol = kwargs.get('thrift_transport_protocol', None) + self.authentication_type = kwargs.get('authentication_type', None) + self.service_discovery_mode = kwargs.get('service_discovery_mode', None) + self.zoo_keeper_name_space = kwargs.get('zoo_keeper_name_space', None) + self.use_native_query = kwargs.get('use_native_query', None) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + self.http_path = kwargs.get('http_path', None) + self.enable_ssl = kwargs.get('enable_ssl', None) + self.trusted_cert_path = kwargs.get('trusted_cert_path', None) + self.use_system_trust_store = kwargs.get('use_system_trust_store', None) + self.allow_host_name_cn_mismatch = kwargs.get('allow_host_name_cn_mismatch', None) + self.allow_self_signed_server_cert = kwargs.get('allow_self_signed_server_cert', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'Hive' + + +class HiveObjectDataset(Dataset): + """Hive Server dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: This property will be retired. Please consider using + schema + table properties instead. + :type table_name: object + :param table: The table name of the Hive. Type: string (or Expression with + resultType string). + :type table: object + :param hive_object_dataset_schema: The schema name of the Hive. Type: + string (or Expression with resultType string). + :type hive_object_dataset_schema: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + 'table': {'key': 'typeProperties.table', 'type': 'object'}, + 'hive_object_dataset_schema': {'key': 'typeProperties.schema', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(HiveObjectDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.table = kwargs.get('table', None) + self.hive_object_dataset_schema = kwargs.get('hive_object_dataset_schema', None) + self.type = 'HiveObject' + + +class HiveSource(CopySource): + """A copy activity Hive Server source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(HiveSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'HiveSource' + + +class HttpDataset(Dataset): + """A file in an HTTP web server. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param relative_url: The relative URL based on the URL in the + HttpLinkedService refers to an HTTP file Type: string (or Expression with + resultType string). + :type relative_url: object + :param request_method: The HTTP method for the HTTP request. Type: string + (or Expression with resultType string). + :type request_method: object + :param request_body: The body for the HTTP request. Type: string (or + Expression with resultType string). + :type request_body: object + :param additional_headers: The headers for the HTTP Request. e.g. + request-header-name-1:request-header-value-1 + ... + request-header-name-n:request-header-value-n Type: string (or Expression + with resultType string). + :type additional_headers: object + :param format: The format of files. + :type format: ~azure.mgmt.datafactory.models.DatasetStorageFormat + :param compression: The data compression method used on files. + :type compression: ~azure.mgmt.datafactory.models.DatasetCompression + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'relative_url': {'key': 'typeProperties.relativeUrl', 'type': 'object'}, + 'request_method': {'key': 'typeProperties.requestMethod', 'type': 'object'}, + 'request_body': {'key': 'typeProperties.requestBody', 'type': 'object'}, + 'additional_headers': {'key': 'typeProperties.additionalHeaders', 'type': 'object'}, + 'format': {'key': 'typeProperties.format', 'type': 'DatasetStorageFormat'}, + 'compression': {'key': 'typeProperties.compression', 'type': 'DatasetCompression'}, + } + + def __init__(self, **kwargs): + super(HttpDataset, self).__init__(**kwargs) + self.relative_url = kwargs.get('relative_url', None) + self.request_method = kwargs.get('request_method', None) + self.request_body = kwargs.get('request_body', None) + self.additional_headers = kwargs.get('additional_headers', None) + self.format = kwargs.get('format', None) + self.compression = kwargs.get('compression', None) + self.type = 'HttpFile' + + +class HttpLinkedService(LinkedService): + """Linked service for an HTTP source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param url: Required. The base URL of the HTTP endpoint, e.g. + http://www.microsoft.com. Type: string (or Expression with resultType + string). + :type url: object + :param authentication_type: The authentication type to be used to connect + to the HTTP server. Possible values include: 'Basic', 'Anonymous', + 'Digest', 'Windows', 'ClientCertificate' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.HttpAuthenticationType + :param user_name: User name for Basic, Digest, or Windows authentication. + Type: string (or Expression with resultType string). + :type user_name: object + :param password: Password for Basic, Digest, Windows, or ClientCertificate + with EmbeddedCertData authentication. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param embedded_cert_data: Base64 encoded certificate data for + ClientCertificate authentication. For on-premises copy with + ClientCertificate authentication, either CertThumbprint or + EmbeddedCertData/Password should be specified. Type: string (or Expression + with resultType string). + :type embedded_cert_data: object + :param cert_thumbprint: Thumbprint of certificate for ClientCertificate + authentication. Only valid for on-premises copy. For on-premises copy with + ClientCertificate authentication, either CertThumbprint or + EmbeddedCertData/Password should be specified. Type: string (or Expression + with resultType string). + :type cert_thumbprint: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + :param enable_server_certificate_validation: If true, validate the HTTPS + server SSL certificate. Default value is true. Type: boolean (or + Expression with resultType boolean). + :type enable_server_certificate_validation: object + """ + + _validation = { + 'type': {'required': True}, + 'url': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'url': {'key': 'typeProperties.url', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'embedded_cert_data': {'key': 'typeProperties.embeddedCertData', 'type': 'object'}, + 'cert_thumbprint': {'key': 'typeProperties.certThumbprint', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + 'enable_server_certificate_validation': {'key': 'typeProperties.enableServerCertificateValidation', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(HttpLinkedService, self).__init__(**kwargs) + self.url = kwargs.get('url', None) + self.authentication_type = kwargs.get('authentication_type', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.embedded_cert_data = kwargs.get('embedded_cert_data', None) + self.cert_thumbprint = kwargs.get('cert_thumbprint', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.enable_server_certificate_validation = kwargs.get('enable_server_certificate_validation', None) + self.type = 'HttpServer' + + +class HttpReadSettings(StoreReadSettings): + """Sftp read settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The read setting type. + :type type: str + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param request_method: The HTTP method used to call the RESTful API. The + default is GET. Type: string (or Expression with resultType string). + :type request_method: object + :param request_body: The HTTP request body to the RESTful API if + requestMethod is POST. Type: string (or Expression with resultType + string). + :type request_body: object + :param additional_headers: The additional HTTP headers in the request to + the RESTful API. Type: string (or Expression with resultType string). + :type additional_headers: object + :param request_timeout: Specifies the timeout for a HTTP client to get + HTTP response from HTTP server. + :type request_timeout: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'request_method': {'key': 'requestMethod', 'type': 'object'}, + 'request_body': {'key': 'requestBody', 'type': 'object'}, + 'additional_headers': {'key': 'additionalHeaders', 'type': 'object'}, + 'request_timeout': {'key': 'requestTimeout', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(HttpReadSettings, self).__init__(**kwargs) + self.request_method = kwargs.get('request_method', None) + self.request_body = kwargs.get('request_body', None) + self.additional_headers = kwargs.get('additional_headers', None) + self.request_timeout = kwargs.get('request_timeout', None) + + +class HttpServerLocation(DatasetLocation): + """The location of http server. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. Type of dataset storage location. + :type type: str + :param folder_path: Specify the folder path of dataset. Type: string (or + Expression with resultType string) + :type folder_path: object + :param file_name: Specify the file name of dataset. Type: string (or + Expression with resultType string). + :type file_name: object + :param relative_url: Specify the relativeUrl of http server. Type: string + (or Expression with resultType string) + :type relative_url: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'folder_path': {'key': 'folderPath', 'type': 'object'}, + 'file_name': {'key': 'fileName', 'type': 'object'}, + 'relative_url': {'key': 'relativeUrl', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(HttpServerLocation, self).__init__(**kwargs) + self.relative_url = kwargs.get('relative_url', None) + + +class HttpSource(CopySource): + """A copy activity source for an HTTP file. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param http_request_timeout: Specifies the timeout for a HTTP client to + get HTTP response from HTTP server. The default value is equivalent to + System.Net.HttpWebRequest.Timeout. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type http_request_timeout: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'http_request_timeout': {'key': 'httpRequestTimeout', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(HttpSource, self).__init__(**kwargs) + self.http_request_timeout = kwargs.get('http_request_timeout', None) + self.type = 'HttpSource' + + +class HubspotLinkedService(LinkedService): + """Hubspot Service linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param client_id: Required. The client ID associated with your Hubspot + application. + :type client_id: object + :param client_secret: The client secret associated with your Hubspot + application. + :type client_secret: ~azure.mgmt.datafactory.models.SecretBase + :param access_token: The access token obtained when initially + authenticating your OAuth integration. + :type access_token: ~azure.mgmt.datafactory.models.SecretBase + :param refresh_token: The refresh token obtained when initially + authenticating your OAuth integration. + :type refresh_token: ~azure.mgmt.datafactory.models.SecretBase + :param use_encrypted_endpoints: Specifies whether the data source + endpoints are encrypted using HTTPS. The default value is true. + :type use_encrypted_endpoints: object + :param use_host_verification: Specifies whether to require the host name + in the server's certificate to match the host name of the server when + connecting over SSL. The default value is true. + :type use_host_verification: object + :param use_peer_verification: Specifies whether to verify the identity of + the server when connecting over SSL. The default value is true. + :type use_peer_verification: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'client_id': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, + 'client_secret': {'key': 'typeProperties.clientSecret', 'type': 'SecretBase'}, + 'access_token': {'key': 'typeProperties.accessToken', 'type': 'SecretBase'}, + 'refresh_token': {'key': 'typeProperties.refreshToken', 'type': 'SecretBase'}, + 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, + 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, + 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(HubspotLinkedService, self).__init__(**kwargs) + self.client_id = kwargs.get('client_id', None) + self.client_secret = kwargs.get('client_secret', None) + self.access_token = kwargs.get('access_token', None) + self.refresh_token = kwargs.get('refresh_token', None) + self.use_encrypted_endpoints = kwargs.get('use_encrypted_endpoints', None) + self.use_host_verification = kwargs.get('use_host_verification', None) + self.use_peer_verification = kwargs.get('use_peer_verification', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'Hubspot' + + +class HubspotObjectDataset(Dataset): + """Hubspot Service dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(HubspotObjectDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.type = 'HubspotObject' + + +class HubspotSource(CopySource): + """A copy activity Hubspot Service source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(HubspotSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'HubspotSource' + + +class IfConditionActivity(ControlActivity): + """This activity evaluates a boolean expression and executes either the + activities under the ifTrueActivities property or the ifFalseActivities + property depending on the result of the expression. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param expression: Required. An expression that would evaluate to Boolean. + This is used to determine the block of activities (ifTrueActivities or + ifFalseActivities) that will be executed. + :type expression: ~azure.mgmt.datafactory.models.Expression + :param if_true_activities: List of activities to execute if expression is + evaluated to true. This is an optional property and if not provided, the + activity will exit without any action. + :type if_true_activities: list[~azure.mgmt.datafactory.models.Activity] + :param if_false_activities: List of activities to execute if expression is + evaluated to false. This is an optional property and if not provided, the + activity will exit without any action. + :type if_false_activities: list[~azure.mgmt.datafactory.models.Activity] + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'expression': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'expression': {'key': 'typeProperties.expression', 'type': 'Expression'}, + 'if_true_activities': {'key': 'typeProperties.ifTrueActivities', 'type': '[Activity]'}, + 'if_false_activities': {'key': 'typeProperties.ifFalseActivities', 'type': '[Activity]'}, + } + + def __init__(self, **kwargs): + super(IfConditionActivity, self).__init__(**kwargs) + self.expression = kwargs.get('expression', None) + self.if_true_activities = kwargs.get('if_true_activities', None) + self.if_false_activities = kwargs.get('if_false_activities', None) + self.type = 'IfCondition' + + +class ImpalaLinkedService(LinkedService): + """Impala server linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param host: Required. The IP address or host name of the Impala server. + (i.e. 192.168.222.160) + :type host: object + :param port: The TCP port that the Impala server uses to listen for client + connections. The default value is 21050. + :type port: object + :param authentication_type: Required. The authentication type to use. + Possible values include: 'Anonymous', 'SASLUsername', + 'UsernameAndPassword' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.ImpalaAuthenticationType + :param username: The user name used to access the Impala server. The + default value is anonymous when using SASLUsername. + :type username: object + :param password: The password corresponding to the user name when using + UsernameAndPassword. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param enable_ssl: Specifies whether the connections to the server are + encrypted using SSL. The default value is false. + :type enable_ssl: object + :param trusted_cert_path: The full path of the .pem file containing + trusted CA certificates for verifying the server when connecting over SSL. + This property can only be set when using SSL on self-hosted IR. The + default value is the cacerts.pem file installed with the IR. + :type trusted_cert_path: object + :param use_system_trust_store: Specifies whether to use a CA certificate + from the system trust store or from a specified PEM file. The default + value is false. + :type use_system_trust_store: object + :param allow_host_name_cn_mismatch: Specifies whether to require a + CA-issued SSL certificate name to match the host name of the server when + connecting over SSL. The default value is false. + :type allow_host_name_cn_mismatch: object + :param allow_self_signed_server_cert: Specifies whether to allow + self-signed certificates from the server. The default value is false. + :type allow_self_signed_server_cert: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'host': {'required': True}, + 'authentication_type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'host': {'key': 'typeProperties.host', 'type': 'object'}, + 'port': {'key': 'typeProperties.port', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'enable_ssl': {'key': 'typeProperties.enableSsl', 'type': 'object'}, + 'trusted_cert_path': {'key': 'typeProperties.trustedCertPath', 'type': 'object'}, + 'use_system_trust_store': {'key': 'typeProperties.useSystemTrustStore', 'type': 'object'}, + 'allow_host_name_cn_mismatch': {'key': 'typeProperties.allowHostNameCNMismatch', 'type': 'object'}, + 'allow_self_signed_server_cert': {'key': 'typeProperties.allowSelfSignedServerCert', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ImpalaLinkedService, self).__init__(**kwargs) + self.host = kwargs.get('host', None) + self.port = kwargs.get('port', None) + self.authentication_type = kwargs.get('authentication_type', None) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + self.enable_ssl = kwargs.get('enable_ssl', None) + self.trusted_cert_path = kwargs.get('trusted_cert_path', None) + self.use_system_trust_store = kwargs.get('use_system_trust_store', None) + self.allow_host_name_cn_mismatch = kwargs.get('allow_host_name_cn_mismatch', None) + self.allow_self_signed_server_cert = kwargs.get('allow_self_signed_server_cert', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'Impala' + + +class ImpalaObjectDataset(Dataset): + """Impala server dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: This property will be retired. Please consider using + schema + table properties instead. + :type table_name: object + :param table: The table name of the Impala. Type: string (or Expression + with resultType string). + :type table: object + :param impala_object_dataset_schema: The schema name of the Impala. Type: + string (or Expression with resultType string). + :type impala_object_dataset_schema: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + 'table': {'key': 'typeProperties.table', 'type': 'object'}, + 'impala_object_dataset_schema': {'key': 'typeProperties.schema', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ImpalaObjectDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.table = kwargs.get('table', None) + self.impala_object_dataset_schema = kwargs.get('impala_object_dataset_schema', None) + self.type = 'ImpalaObject' + + +class ImpalaSource(CopySource): + """A copy activity Impala server source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ImpalaSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'ImpalaSource' + + +class InformixLinkedService(LinkedService): + """Informix linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: Required. The non-access credential portion of + the connection string as well as an optional encrypted credential. Type: + string, SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param authentication_type: Type of authentication used to connect to the + Informix as ODBC data store. Possible values are: Anonymous and Basic. + Type: string (or Expression with resultType string). + :type authentication_type: object + :param credential: The access credential portion of the connection string + specified in driver-specific property-value format. + :type credential: ~azure.mgmt.datafactory.models.SecretBase + :param user_name: User name for Basic authentication. Type: string (or + Expression with resultType string). + :type user_name: object + :param password: Password for Basic authentication. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'connection_string': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'object'}, + 'credential': {'key': 'typeProperties.credential', 'type': 'SecretBase'}, + 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(InformixLinkedService, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.authentication_type = kwargs.get('authentication_type', None) + self.credential = kwargs.get('credential', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'Informix' + + +class InformixSink(CopySink): + """A copy activity Informix sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param pre_copy_script: A query to execute before starting the copy. Type: + string (or Expression with resultType string). + :type pre_copy_script: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'pre_copy_script': {'key': 'preCopyScript', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(InformixSink, self).__init__(**kwargs) + self.pre_copy_script = kwargs.get('pre_copy_script', None) + self.type = 'InformixSink' + + +class InformixSource(CopySource): + """A copy activity source for Informix. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: Database query. Type: string (or Expression with resultType + string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(InformixSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'InformixSource' + + +class InformixTableDataset(Dataset): + """The Informix table dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The Informix table name. Type: string (or Expression + with resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(InformixTableDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.type = 'InformixTable' + + +class IntegrationRuntime(Model): + """Azure Data Factory nested object which serves as a compute resource for + activities. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SelfHostedIntegrationRuntime, ManagedIntegrationRuntime + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Integration runtime description. + :type description: str + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'SelfHosted': 'SelfHostedIntegrationRuntime', 'Managed': 'ManagedIntegrationRuntime'} + } + + def __init__(self, **kwargs): + super(IntegrationRuntime, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.description = kwargs.get('description', None) + self.type = None + + +class IntegrationRuntimeAuthKeys(Model): + """The integration runtime authentication keys. + + :param auth_key1: The primary integration runtime authentication key. + :type auth_key1: str + :param auth_key2: The secondary integration runtime authentication key. + :type auth_key2: str + """ + + _attribute_map = { + 'auth_key1': {'key': 'authKey1', 'type': 'str'}, + 'auth_key2': {'key': 'authKey2', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IntegrationRuntimeAuthKeys, self).__init__(**kwargs) + self.auth_key1 = kwargs.get('auth_key1', None) + self.auth_key2 = kwargs.get('auth_key2', None) + + +class IntegrationRuntimeComputeProperties(Model): + """The compute resource properties for managed integration runtime. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param location: The location for managed integration runtime. The + supported regions could be found on + https://docs.microsoft.com/en-us/azure/data-factory/data-factory-data-movement-activities + :type location: str + :param node_size: The node size requirement to managed integration + runtime. + :type node_size: str + :param number_of_nodes: The required number of nodes for managed + integration runtime. + :type number_of_nodes: int + :param max_parallel_executions_per_node: Maximum parallel executions count + per node for managed integration runtime. + :type max_parallel_executions_per_node: int + :param v_net_properties: VNet properties for managed integration runtime. + :type v_net_properties: + ~azure.mgmt.datafactory.models.IntegrationRuntimeVNetProperties + """ + + _validation = { + 'number_of_nodes': {'minimum': 1}, + 'max_parallel_executions_per_node': {'minimum': 1}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'node_size': {'key': 'nodeSize', 'type': 'str'}, + 'number_of_nodes': {'key': 'numberOfNodes', 'type': 'int'}, + 'max_parallel_executions_per_node': {'key': 'maxParallelExecutionsPerNode', 'type': 'int'}, + 'v_net_properties': {'key': 'vNetProperties', 'type': 'IntegrationRuntimeVNetProperties'}, + } + + def __init__(self, **kwargs): + super(IntegrationRuntimeComputeProperties, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.location = kwargs.get('location', None) + self.node_size = kwargs.get('node_size', None) + self.number_of_nodes = kwargs.get('number_of_nodes', None) + self.max_parallel_executions_per_node = kwargs.get('max_parallel_executions_per_node', None) + self.v_net_properties = kwargs.get('v_net_properties', None) + + +class IntegrationRuntimeConnectionInfo(Model): + """Connection information for encrypting the on-premises data source + credentials. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar service_token: The token generated in service. Callers use this + token to authenticate to integration runtime. + :vartype service_token: str + :ivar identity_cert_thumbprint: The integration runtime SSL certificate + thumbprint. Click-Once application uses it to do server validation. + :vartype identity_cert_thumbprint: str + :ivar host_service_uri: The on-premises integration runtime host URL. + :vartype host_service_uri: str + :ivar version: The integration runtime version. + :vartype version: str + :ivar public_key: The public key for encrypting a credential when + transferring the credential to the integration runtime. + :vartype public_key: str + :ivar is_identity_cert_exprired: Whether the identity certificate is + expired. + :vartype is_identity_cert_exprired: bool + """ + + _validation = { + 'service_token': {'readonly': True}, + 'identity_cert_thumbprint': {'readonly': True}, + 'host_service_uri': {'readonly': True}, + 'version': {'readonly': True}, + 'public_key': {'readonly': True}, + 'is_identity_cert_exprired': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'service_token': {'key': 'serviceToken', 'type': 'str'}, + 'identity_cert_thumbprint': {'key': 'identityCertThumbprint', 'type': 'str'}, + 'host_service_uri': {'key': 'hostServiceUri', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'public_key': {'key': 'publicKey', 'type': 'str'}, + 'is_identity_cert_exprired': {'key': 'isIdentityCertExprired', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(IntegrationRuntimeConnectionInfo, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.service_token = None + self.identity_cert_thumbprint = None + self.host_service_uri = None + self.version = None + self.public_key = None + self.is_identity_cert_exprired = None + + +class IntegrationRuntimeCustomSetupScriptProperties(Model): + """Custom setup script properties for a managed dedicated integration runtime. + + :param blob_container_uri: The URI of the Azure blob container that + contains the custom setup script. + :type blob_container_uri: str + :param sas_token: The SAS token of the Azure blob container. + :type sas_token: ~azure.mgmt.datafactory.models.SecureString + """ + + _attribute_map = { + 'blob_container_uri': {'key': 'blobContainerUri', 'type': 'str'}, + 'sas_token': {'key': 'sasToken', 'type': 'SecureString'}, + } + + def __init__(self, **kwargs): + super(IntegrationRuntimeCustomSetupScriptProperties, self).__init__(**kwargs) + self.blob_container_uri = kwargs.get('blob_container_uri', None) + self.sas_token = kwargs.get('sas_token', None) + + +class IntegrationRuntimeDataProxyProperties(Model): + """Data proxy properties for a managed dedicated integration runtime. + + :param connect_via: The self-hosted integration runtime reference. + :type connect_via: ~azure.mgmt.datafactory.models.EntityReference + :param staging_linked_service: The staging linked service reference. + :type staging_linked_service: + ~azure.mgmt.datafactory.models.EntityReference + :param path: The path to contain the staged data in the Blob storage. + :type path: str + """ + + _attribute_map = { + 'connect_via': {'key': 'connectVia', 'type': 'EntityReference'}, + 'staging_linked_service': {'key': 'stagingLinkedService', 'type': 'EntityReference'}, + 'path': {'key': 'path', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IntegrationRuntimeDataProxyProperties, self).__init__(**kwargs) + self.connect_via = kwargs.get('connect_via', None) + self.staging_linked_service = kwargs.get('staging_linked_service', None) + self.path = kwargs.get('path', None) + + +class IntegrationRuntimeMonitoringData(Model): + """Get monitoring data response. + + :param name: Integration runtime name. + :type name: str + :param nodes: Integration runtime node monitoring data. + :type nodes: + list[~azure.mgmt.datafactory.models.IntegrationRuntimeNodeMonitoringData] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'nodes': {'key': 'nodes', 'type': '[IntegrationRuntimeNodeMonitoringData]'}, + } + + def __init__(self, **kwargs): + super(IntegrationRuntimeMonitoringData, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.nodes = kwargs.get('nodes', None) + + +class IntegrationRuntimeNodeIpAddress(Model): + """The IP address of self-hosted integration runtime node. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar ip_address: The IP address of self-hosted integration runtime node. + :vartype ip_address: str + """ + + _validation = { + 'ip_address': {'readonly': True}, + } + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IntegrationRuntimeNodeIpAddress, self).__init__(**kwargs) + self.ip_address = None + + +class IntegrationRuntimeNodeMonitoringData(Model): + """Monitoring data for integration runtime node. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar node_name: Name of the integration runtime node. + :vartype node_name: str + :ivar available_memory_in_mb: Available memory (MB) on the integration + runtime node. + :vartype available_memory_in_mb: int + :ivar cpu_utilization: CPU percentage on the integration runtime node. + :vartype cpu_utilization: int + :ivar concurrent_jobs_limit: Maximum concurrent jobs on the integration + runtime node. + :vartype concurrent_jobs_limit: int + :ivar concurrent_jobs_running: The number of jobs currently running on the + integration runtime node. + :vartype concurrent_jobs_running: int + :ivar max_concurrent_jobs: The maximum concurrent jobs in this integration + runtime. + :vartype max_concurrent_jobs: int + :ivar sent_bytes: Sent bytes on the integration runtime node. + :vartype sent_bytes: float + :ivar received_bytes: Received bytes on the integration runtime node. + :vartype received_bytes: float + """ + + _validation = { + 'node_name': {'readonly': True}, + 'available_memory_in_mb': {'readonly': True}, + 'cpu_utilization': {'readonly': True}, + 'concurrent_jobs_limit': {'readonly': True}, + 'concurrent_jobs_running': {'readonly': True}, + 'max_concurrent_jobs': {'readonly': True}, + 'sent_bytes': {'readonly': True}, + 'received_bytes': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'node_name': {'key': 'nodeName', 'type': 'str'}, + 'available_memory_in_mb': {'key': 'availableMemoryInMB', 'type': 'int'}, + 'cpu_utilization': {'key': 'cpuUtilization', 'type': 'int'}, + 'concurrent_jobs_limit': {'key': 'concurrentJobsLimit', 'type': 'int'}, + 'concurrent_jobs_running': {'key': 'concurrentJobsRunning', 'type': 'int'}, + 'max_concurrent_jobs': {'key': 'maxConcurrentJobs', 'type': 'int'}, + 'sent_bytes': {'key': 'sentBytes', 'type': 'float'}, + 'received_bytes': {'key': 'receivedBytes', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(IntegrationRuntimeNodeMonitoringData, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.node_name = None + self.available_memory_in_mb = None + self.cpu_utilization = None + self.concurrent_jobs_limit = None + self.concurrent_jobs_running = None + self.max_concurrent_jobs = None + self.sent_bytes = None + self.received_bytes = None + + +class IntegrationRuntimeReference(Model): + """Integration runtime reference type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. Type of integration runtime. Default value: + "IntegrationRuntimeReference" . + :vartype type: str + :param reference_name: Required. Reference integration runtime name. + :type reference_name: str + :param parameters: Arguments for integration runtime. + :type parameters: dict[str, object] + """ + + _validation = { + 'type': {'required': True, 'constant': True}, + 'reference_name': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'reference_name': {'key': 'referenceName', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{object}'}, + } + + type = "IntegrationRuntimeReference" + + def __init__(self, **kwargs): + super(IntegrationRuntimeReference, self).__init__(**kwargs) + self.reference_name = kwargs.get('reference_name', None) + self.parameters = kwargs.get('parameters', None) + + +class IntegrationRuntimeRegenerateKeyParameters(Model): + """Parameters to regenerate the authentication key. + + :param key_name: The name of the authentication key to regenerate. + Possible values include: 'authKey1', 'authKey2' + :type key_name: str or + ~azure.mgmt.datafactory.models.IntegrationRuntimeAuthKeyName + """ + + _attribute_map = { + 'key_name': {'key': 'keyName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IntegrationRuntimeRegenerateKeyParameters, self).__init__(**kwargs) + self.key_name = kwargs.get('key_name', None) + + +class IntegrationRuntimeResource(SubResource): + """Integration runtime resource type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar etag: Etag identifies change in the resource. + :vartype etag: str + :param properties: Required. Integration runtime properties. + :type properties: ~azure.mgmt.datafactory.models.IntegrationRuntime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'IntegrationRuntime'}, + } + + def __init__(self, **kwargs): + super(IntegrationRuntimeResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class IntegrationRuntimeSsisCatalogInfo(Model): + """Catalog information for managed dedicated integration runtime. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param catalog_server_endpoint: The catalog database server URL. + :type catalog_server_endpoint: str + :param catalog_admin_user_name: The administrator user name of catalog + database. + :type catalog_admin_user_name: str + :param catalog_admin_password: The password of the administrator user + account of the catalog database. + :type catalog_admin_password: ~azure.mgmt.datafactory.models.SecureString + :param catalog_pricing_tier: The pricing tier for the catalog database. + The valid values could be found in + https://azure.microsoft.com/en-us/pricing/details/sql-database/. Possible + values include: 'Basic', 'Standard', 'Premium', 'PremiumRS' + :type catalog_pricing_tier: str or + ~azure.mgmt.datafactory.models.IntegrationRuntimeSsisCatalogPricingTier + """ + + _validation = { + 'catalog_admin_user_name': {'max_length': 128, 'min_length': 1}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'catalog_server_endpoint': {'key': 'catalogServerEndpoint', 'type': 'str'}, + 'catalog_admin_user_name': {'key': 'catalogAdminUserName', 'type': 'str'}, + 'catalog_admin_password': {'key': 'catalogAdminPassword', 'type': 'SecureString'}, + 'catalog_pricing_tier': {'key': 'catalogPricingTier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IntegrationRuntimeSsisCatalogInfo, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.catalog_server_endpoint = kwargs.get('catalog_server_endpoint', None) + self.catalog_admin_user_name = kwargs.get('catalog_admin_user_name', None) + self.catalog_admin_password = kwargs.get('catalog_admin_password', None) + self.catalog_pricing_tier = kwargs.get('catalog_pricing_tier', None) + + +class IntegrationRuntimeSsisProperties(Model): + """SSIS properties for managed integration runtime. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param catalog_info: Catalog information for managed dedicated integration + runtime. + :type catalog_info: + ~azure.mgmt.datafactory.models.IntegrationRuntimeSsisCatalogInfo + :param license_type: License type for bringing your own license scenario. + Possible values include: 'BasePrice', 'LicenseIncluded' + :type license_type: str or + ~azure.mgmt.datafactory.models.IntegrationRuntimeLicenseType + :param custom_setup_script_properties: Custom setup script properties for + a managed dedicated integration runtime. + :type custom_setup_script_properties: + ~azure.mgmt.datafactory.models.IntegrationRuntimeCustomSetupScriptProperties + :param data_proxy_properties: Data proxy properties for a managed + dedicated integration runtime. + :type data_proxy_properties: + ~azure.mgmt.datafactory.models.IntegrationRuntimeDataProxyProperties + :param edition: The edition for the SSIS Integration Runtime. Possible + values include: 'Standard', 'Enterprise' + :type edition: str or + ~azure.mgmt.datafactory.models.IntegrationRuntimeEdition + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'catalog_info': {'key': 'catalogInfo', 'type': 'IntegrationRuntimeSsisCatalogInfo'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + 'custom_setup_script_properties': {'key': 'customSetupScriptProperties', 'type': 'IntegrationRuntimeCustomSetupScriptProperties'}, + 'data_proxy_properties': {'key': 'dataProxyProperties', 'type': 'IntegrationRuntimeDataProxyProperties'}, + 'edition': {'key': 'edition', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IntegrationRuntimeSsisProperties, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.catalog_info = kwargs.get('catalog_info', None) + self.license_type = kwargs.get('license_type', None) + self.custom_setup_script_properties = kwargs.get('custom_setup_script_properties', None) + self.data_proxy_properties = kwargs.get('data_proxy_properties', None) + self.edition = kwargs.get('edition', None) + + +class IntegrationRuntimeStatus(Model): + """Integration runtime status. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SelfHostedIntegrationRuntimeStatus, + ManagedIntegrationRuntimeStatus + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar data_factory_name: The data factory name which the integration + runtime belong to. + :vartype data_factory_name: str + :ivar state: The state of integration runtime. Possible values include: + 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', + 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied' + :vartype state: str or + ~azure.mgmt.datafactory.models.IntegrationRuntimeState + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'data_factory_name': {'readonly': True}, + 'state': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'data_factory_name': {'key': 'dataFactoryName', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'SelfHosted': 'SelfHostedIntegrationRuntimeStatus', 'Managed': 'ManagedIntegrationRuntimeStatus'} + } + + def __init__(self, **kwargs): + super(IntegrationRuntimeStatus, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.data_factory_name = None + self.state = None + self.type = None + + +class IntegrationRuntimeStatusListResponse(Model): + """A list of integration runtime status. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of integration runtime status. + :type value: + list[~azure.mgmt.datafactory.models.IntegrationRuntimeStatusResponse] + :param next_link: The link to the next page of results, if any remaining + results exist. + :type next_link: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IntegrationRuntimeStatusResponse]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IntegrationRuntimeStatusListResponse, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class IntegrationRuntimeStatusResponse(Model): + """Integration runtime status response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar name: The integration runtime name. + :vartype name: str + :param properties: Required. Integration runtime properties. + :type properties: ~azure.mgmt.datafactory.models.IntegrationRuntimeStatus + """ + + _validation = { + 'name': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'IntegrationRuntimeStatus'}, + } + + def __init__(self, **kwargs): + super(IntegrationRuntimeStatusResponse, self).__init__(**kwargs) + self.name = None + self.properties = kwargs.get('properties', None) + + +class IntegrationRuntimeVNetProperties(Model): + """VNet properties for managed integration runtime. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param v_net_id: The ID of the VNet that this integration runtime will + join. + :type v_net_id: str + :param subnet: The name of the subnet this integration runtime will join. + :type subnet: str + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'v_net_id': {'key': 'vNetId', 'type': 'str'}, + 'subnet': {'key': 'subnet', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IntegrationRuntimeVNetProperties, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.v_net_id = kwargs.get('v_net_id', None) + self.subnet = kwargs.get('subnet', None) + + +class JiraLinkedService(LinkedService): + """Jira Service linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param host: Required. The IP address or host name of the Jira service. + (e.g. jira.example.com) + :type host: object + :param port: The TCP port that the Jira server uses to listen for client + connections. The default value is 443 if connecting through HTTPS, or 8080 + if connecting through HTTP. + :type port: object + :param username: Required. The user name that you use to access Jira + Service. + :type username: object + :param password: The password corresponding to the user name that you + provided in the username field. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param use_encrypted_endpoints: Specifies whether the data source + endpoints are encrypted using HTTPS. The default value is true. + :type use_encrypted_endpoints: object + :param use_host_verification: Specifies whether to require the host name + in the server's certificate to match the host name of the server when + connecting over SSL. The default value is true. + :type use_host_verification: object + :param use_peer_verification: Specifies whether to verify the identity of + the server when connecting over SSL. The default value is true. + :type use_peer_verification: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'host': {'required': True}, + 'username': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'host': {'key': 'typeProperties.host', 'type': 'object'}, + 'port': {'key': 'typeProperties.port', 'type': 'object'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, + 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, + 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(JiraLinkedService, self).__init__(**kwargs) + self.host = kwargs.get('host', None) + self.port = kwargs.get('port', None) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + self.use_encrypted_endpoints = kwargs.get('use_encrypted_endpoints', None) + self.use_host_verification = kwargs.get('use_host_verification', None) + self.use_peer_verification = kwargs.get('use_peer_verification', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'Jira' + + +class JiraObjectDataset(Dataset): + """Jira Service dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(JiraObjectDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.type = 'JiraObject' + + +class JiraSource(CopySource): + """A copy activity Jira Service source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(JiraSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'JiraSource' + + +class JsonFormat(DatasetStorageFormat): + """The data stored in JSON format. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param serializer: Serializer. Type: string (or Expression with resultType + string). + :type serializer: object + :param deserializer: Deserializer. Type: string (or Expression with + resultType string). + :type deserializer: object + :param type: Required. Constant filled by server. + :type type: str + :param file_pattern: File pattern of JSON. To be more specific, the way of + separating a collection of JSON objects. The default value is + 'setOfObjects'. It is case-sensitive. + :type file_pattern: object + :param nesting_separator: The character used to separate nesting levels. + Default value is '.' (dot). Type: string (or Expression with resultType + string). + :type nesting_separator: object + :param encoding_name: The code page name of the preferred encoding. If not + provided, the default value is 'utf-8', unless the byte order mark (BOM) + denotes another Unicode encoding. The full list of supported values can be + found in the 'Name' column of the table of encodings in the following + reference: https://go.microsoft.com/fwlink/?linkid=861078. Type: string + (or Expression with resultType string). + :type encoding_name: object + :param json_node_reference: The JSONPath of the JSON array element to be + flattened. Example: "$.ArrayPath". Type: string (or Expression with + resultType string). + :type json_node_reference: object + :param json_path_definition: The JSONPath definition for each column + mapping with a customized column name to extract data from JSON file. For + fields under root object, start with "$"; for fields inside the array + chosen by jsonNodeReference property, start from the array element. + Example: {"Column1": "$.Column1Path", "Column2": "Column2PathInArray"}. + Type: object (or Expression with resultType object). + :type json_path_definition: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'serializer': {'key': 'serializer', 'type': 'object'}, + 'deserializer': {'key': 'deserializer', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'file_pattern': {'key': 'filePattern', 'type': 'object'}, + 'nesting_separator': {'key': 'nestingSeparator', 'type': 'object'}, + 'encoding_name': {'key': 'encodingName', 'type': 'object'}, + 'json_node_reference': {'key': 'jsonNodeReference', 'type': 'object'}, + 'json_path_definition': {'key': 'jsonPathDefinition', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(JsonFormat, self).__init__(**kwargs) + self.file_pattern = kwargs.get('file_pattern', None) + self.nesting_separator = kwargs.get('nesting_separator', None) + self.encoding_name = kwargs.get('encoding_name', None) + self.json_node_reference = kwargs.get('json_node_reference', None) + self.json_path_definition = kwargs.get('json_path_definition', None) + self.type = 'JsonFormat' + + +class LinkedIntegrationRuntime(Model): + """The linked integration runtime information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the linked integration runtime. + :vartype name: str + :ivar subscription_id: The subscription ID for which the linked + integration runtime belong to. + :vartype subscription_id: str + :ivar data_factory_name: The name of the data factory for which the linked + integration runtime belong to. + :vartype data_factory_name: str + :ivar data_factory_location: The location of the data factory for which + the linked integration runtime belong to. + :vartype data_factory_location: str + :ivar create_time: The creating time of the linked integration runtime. + :vartype create_time: datetime + """ + + _validation = { + 'name': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'data_factory_name': {'readonly': True}, + 'data_factory_location': {'readonly': True}, + 'create_time': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'data_factory_name': {'key': 'dataFactoryName', 'type': 'str'}, + 'data_factory_location': {'key': 'dataFactoryLocation', 'type': 'str'}, + 'create_time': {'key': 'createTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(LinkedIntegrationRuntime, self).__init__(**kwargs) + self.name = None + self.subscription_id = None + self.data_factory_name = None + self.data_factory_location = None + self.create_time = None + + +class LinkedIntegrationRuntimeType(Model): + """The base definition of a linked integration runtime. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: LinkedIntegrationRuntimeRbacAuthorization, + LinkedIntegrationRuntimeKeyAuthorization + + All required parameters must be populated in order to send to Azure. + + :param authorization_type: Required. Constant filled by server. + :type authorization_type: str + """ + + _validation = { + 'authorization_type': {'required': True}, + } + + _attribute_map = { + 'authorization_type': {'key': 'authorizationType', 'type': 'str'}, + } + + _subtype_map = { + 'authorization_type': {'RBAC': 'LinkedIntegrationRuntimeRbacAuthorization', 'Key': 'LinkedIntegrationRuntimeKeyAuthorization'} + } + + def __init__(self, **kwargs): + super(LinkedIntegrationRuntimeType, self).__init__(**kwargs) + self.authorization_type = None + + +class LinkedIntegrationRuntimeKeyAuthorization(LinkedIntegrationRuntimeType): + """The key authorization type integration runtime. + + All required parameters must be populated in order to send to Azure. + + :param authorization_type: Required. Constant filled by server. + :type authorization_type: str + :param key: Required. The key used for authorization. + :type key: ~azure.mgmt.datafactory.models.SecureString + """ + + _validation = { + 'authorization_type': {'required': True}, + 'key': {'required': True}, + } + + _attribute_map = { + 'authorization_type': {'key': 'authorizationType', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'SecureString'}, + } + + def __init__(self, **kwargs): + super(LinkedIntegrationRuntimeKeyAuthorization, self).__init__(**kwargs) + self.key = kwargs.get('key', None) + self.authorization_type = 'Key' + + +class LinkedIntegrationRuntimeRbacAuthorization(LinkedIntegrationRuntimeType): + """The role based access control (RBAC) authorization type integration + runtime. + + All required parameters must be populated in order to send to Azure. + + :param authorization_type: Required. Constant filled by server. + :type authorization_type: str + :param resource_id: Required. The resource identifier of the integration + runtime to be shared. + :type resource_id: str + """ + + _validation = { + 'authorization_type': {'required': True}, + 'resource_id': {'required': True}, + } + + _attribute_map = { + 'authorization_type': {'key': 'authorizationType', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LinkedIntegrationRuntimeRbacAuthorization, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.authorization_type = 'RBAC' + + +class LinkedIntegrationRuntimeRequest(Model): + """Data factory name for linked integration runtime request. + + All required parameters must be populated in order to send to Azure. + + :param linked_factory_name: Required. The data factory name for linked + integration runtime. + :type linked_factory_name: str + """ + + _validation = { + 'linked_factory_name': {'required': True}, + } + + _attribute_map = { + 'linked_factory_name': {'key': 'factoryName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LinkedIntegrationRuntimeRequest, self).__init__(**kwargs) + self.linked_factory_name = kwargs.get('linked_factory_name', None) + + +class LinkedServiceReference(Model): + """Linked service reference type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. Linked service reference type. Default value: + "LinkedServiceReference" . + :vartype type: str + :param reference_name: Required. Reference LinkedService name. + :type reference_name: str + :param parameters: Arguments for LinkedService. + :type parameters: dict[str, object] + """ + + _validation = { + 'type': {'required': True, 'constant': True}, + 'reference_name': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'reference_name': {'key': 'referenceName', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{object}'}, + } + + type = "LinkedServiceReference" + + def __init__(self, **kwargs): + super(LinkedServiceReference, self).__init__(**kwargs) + self.reference_name = kwargs.get('reference_name', None) + self.parameters = kwargs.get('parameters', None) + + +class LinkedServiceResource(SubResource): + """Linked service resource type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar etag: Etag identifies change in the resource. + :vartype etag: str + :param properties: Required. Properties of linked service. + :type properties: ~azure.mgmt.datafactory.models.LinkedService + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'LinkedService'}, + } + + def __init__(self, **kwargs): + super(LinkedServiceResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class LogStorageSettings(Model): + """Log storage settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param linked_service_name: Required. Log storage linked service + reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param path: The path to storage for storing detailed logs of activity + execution. Type: string (or Expression with resultType string). + :type path: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'path': {'key': 'path', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(LogStorageSettings, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.linked_service_name = kwargs.get('linked_service_name', None) + self.path = kwargs.get('path', None) + + +class LookupActivity(ExecutionActivity): + """Lookup activity. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param source: Required. Dataset-specific source properties, same as copy + activity source. + :type source: ~azure.mgmt.datafactory.models.CopySource + :param dataset: Required. Lookup activity dataset reference. + :type dataset: ~azure.mgmt.datafactory.models.DatasetReference + :param first_row_only: Whether to return first row or all rows. Default + value is true. Type: boolean (or Expression with resultType boolean). + :type first_row_only: object + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'source': {'required': True}, + 'dataset': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'source': {'key': 'typeProperties.source', 'type': 'CopySource'}, + 'dataset': {'key': 'typeProperties.dataset', 'type': 'DatasetReference'}, + 'first_row_only': {'key': 'typeProperties.firstRowOnly', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(LookupActivity, self).__init__(**kwargs) + self.source = kwargs.get('source', None) + self.dataset = kwargs.get('dataset', None) + self.first_row_only = kwargs.get('first_row_only', None) + self.type = 'Lookup' + + +class MagentoLinkedService(LinkedService): + """Magento server linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param host: Required. The URL of the Magento instance. (i.e. + 192.168.222.110/magento3) + :type host: object + :param access_token: The access token from Magento. + :type access_token: ~azure.mgmt.datafactory.models.SecretBase + :param use_encrypted_endpoints: Specifies whether the data source + endpoints are encrypted using HTTPS. The default value is true. + :type use_encrypted_endpoints: object + :param use_host_verification: Specifies whether to require the host name + in the server's certificate to match the host name of the server when + connecting over SSL. The default value is true. + :type use_host_verification: object + :param use_peer_verification: Specifies whether to verify the identity of + the server when connecting over SSL. The default value is true. + :type use_peer_verification: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'host': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'host': {'key': 'typeProperties.host', 'type': 'object'}, + 'access_token': {'key': 'typeProperties.accessToken', 'type': 'SecretBase'}, + 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, + 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, + 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(MagentoLinkedService, self).__init__(**kwargs) + self.host = kwargs.get('host', None) + self.access_token = kwargs.get('access_token', None) + self.use_encrypted_endpoints = kwargs.get('use_encrypted_endpoints', None) + self.use_host_verification = kwargs.get('use_host_verification', None) + self.use_peer_verification = kwargs.get('use_peer_verification', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'Magento' + + +class MagentoObjectDataset(Dataset): + """Magento server dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(MagentoObjectDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.type = 'MagentoObject' + + +class MagentoSource(CopySource): + """A copy activity Magento server source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(MagentoSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'MagentoSource' + + +class ManagedIntegrationRuntime(IntegrationRuntime): + """Managed integration runtime, including managed elastic and managed + dedicated integration runtimes. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Integration runtime description. + :type description: str + :param type: Required. Constant filled by server. + :type type: str + :ivar state: Integration runtime state, only valid for managed dedicated + integration runtime. Possible values include: 'Initial', 'Stopped', + 'Started', 'Starting', 'Stopping', 'NeedRegistration', 'Online', + 'Limited', 'Offline', 'AccessDenied' + :vartype state: str or + ~azure.mgmt.datafactory.models.IntegrationRuntimeState + :param compute_properties: The compute resource for managed integration + runtime. + :type compute_properties: + ~azure.mgmt.datafactory.models.IntegrationRuntimeComputeProperties + :param ssis_properties: SSIS properties for managed integration runtime. + :type ssis_properties: + ~azure.mgmt.datafactory.models.IntegrationRuntimeSsisProperties + """ + + _validation = { + 'type': {'required': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'compute_properties': {'key': 'typeProperties.computeProperties', 'type': 'IntegrationRuntimeComputeProperties'}, + 'ssis_properties': {'key': 'typeProperties.ssisProperties', 'type': 'IntegrationRuntimeSsisProperties'}, + } + + def __init__(self, **kwargs): + super(ManagedIntegrationRuntime, self).__init__(**kwargs) + self.state = None + self.compute_properties = kwargs.get('compute_properties', None) + self.ssis_properties = kwargs.get('ssis_properties', None) + self.type = 'Managed' + + +class ManagedIntegrationRuntimeError(Model): + """Error definition for managed integration runtime. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar time: The time when the error occurred. + :vartype time: datetime + :ivar code: Error code. + :vartype code: str + :ivar parameters: Managed integration runtime error parameters. + :vartype parameters: list[str] + :ivar message: Error message. + :vartype message: str + """ + + _validation = { + 'time': {'readonly': True}, + 'code': {'readonly': True}, + 'parameters': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'time': {'key': 'time', 'type': 'iso-8601'}, + 'code': {'key': 'code', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[str]'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedIntegrationRuntimeError, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.time = None + self.code = None + self.parameters = None + self.message = None + + +class ManagedIntegrationRuntimeNode(Model): + """Properties of integration runtime node. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar node_id: The managed integration runtime node id. + :vartype node_id: str + :ivar status: The managed integration runtime node status. Possible values + include: 'Starting', 'Available', 'Recycling', 'Unavailable' + :vartype status: str or + ~azure.mgmt.datafactory.models.ManagedIntegrationRuntimeNodeStatus + :param errors: The errors that occurred on this integration runtime node. + :type errors: + list[~azure.mgmt.datafactory.models.ManagedIntegrationRuntimeError] + """ + + _validation = { + 'node_id': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'node_id': {'key': 'nodeId', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ManagedIntegrationRuntimeError]'}, + } + + def __init__(self, **kwargs): + super(ManagedIntegrationRuntimeNode, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.node_id = None + self.status = None + self.errors = kwargs.get('errors', None) + + +class ManagedIntegrationRuntimeOperationResult(Model): + """Properties of managed integration runtime operation result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar type: The operation type. Could be start or stop. + :vartype type: str + :ivar start_time: The start time of the operation. + :vartype start_time: datetime + :ivar result: The operation result. + :vartype result: str + :ivar error_code: The error code. + :vartype error_code: str + :ivar parameters: Managed integration runtime error parameters. + :vartype parameters: list[str] + :ivar activity_id: The activity id for the operation request. + :vartype activity_id: str + """ + + _validation = { + 'type': {'readonly': True}, + 'start_time': {'readonly': True}, + 'result': {'readonly': True}, + 'error_code': {'readonly': True}, + 'parameters': {'readonly': True}, + 'activity_id': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'result': {'key': 'result', 'type': 'str'}, + 'error_code': {'key': 'errorCode', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[str]'}, + 'activity_id': {'key': 'activityId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedIntegrationRuntimeOperationResult, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.type = None + self.start_time = None + self.result = None + self.error_code = None + self.parameters = None + self.activity_id = None + + +class ManagedIntegrationRuntimeStatus(IntegrationRuntimeStatus): + """Managed integration runtime status. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar data_factory_name: The data factory name which the integration + runtime belong to. + :vartype data_factory_name: str + :ivar state: The state of integration runtime. Possible values include: + 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', + 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied' + :vartype state: str or + ~azure.mgmt.datafactory.models.IntegrationRuntimeState + :param type: Required. Constant filled by server. + :type type: str + :ivar create_time: The time at which the integration runtime was created, + in ISO8601 format. + :vartype create_time: datetime + :ivar nodes: The list of nodes for managed integration runtime. + :vartype nodes: + list[~azure.mgmt.datafactory.models.ManagedIntegrationRuntimeNode] + :ivar other_errors: The errors that occurred on this integration runtime. + :vartype other_errors: + list[~azure.mgmt.datafactory.models.ManagedIntegrationRuntimeError] + :ivar last_operation: The last operation result that occurred on this + integration runtime. + :vartype last_operation: + ~azure.mgmt.datafactory.models.ManagedIntegrationRuntimeOperationResult + """ + + _validation = { + 'data_factory_name': {'readonly': True}, + 'state': {'readonly': True}, + 'type': {'required': True}, + 'create_time': {'readonly': True}, + 'nodes': {'readonly': True}, + 'other_errors': {'readonly': True}, + 'last_operation': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'data_factory_name': {'key': 'dataFactoryName', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'create_time': {'key': 'typeProperties.createTime', 'type': 'iso-8601'}, + 'nodes': {'key': 'typeProperties.nodes', 'type': '[ManagedIntegrationRuntimeNode]'}, + 'other_errors': {'key': 'typeProperties.otherErrors', 'type': '[ManagedIntegrationRuntimeError]'}, + 'last_operation': {'key': 'typeProperties.lastOperation', 'type': 'ManagedIntegrationRuntimeOperationResult'}, + } + + def __init__(self, **kwargs): + super(ManagedIntegrationRuntimeStatus, self).__init__(**kwargs) + self.create_time = None + self.nodes = None + self.other_errors = None + self.last_operation = None + self.type = 'Managed' + + +class MariaDBLinkedService(LinkedService): + """MariaDB server linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: An ODBC connection string. Type: string, + SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param pwd: The Azure key vault secret reference of password in connection + string. + :type pwd: ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'pwd': {'key': 'typeProperties.pwd', 'type': 'AzureKeyVaultSecretReference'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(MariaDBLinkedService, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.pwd = kwargs.get('pwd', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'MariaDB' + + +class MariaDBSource(CopySource): + """A copy activity MariaDB server source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(MariaDBSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'MariaDBSource' + + +class MariaDBTableDataset(Dataset): + """MariaDB server dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(MariaDBTableDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.type = 'MariaDBTable' + + +class MarketoLinkedService(LinkedService): + """Marketo server linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param endpoint: Required. The endpoint of the Marketo server. (i.e. + 123-ABC-321.mktorest.com) + :type endpoint: object + :param client_id: Required. The client Id of your Marketo service. + :type client_id: object + :param client_secret: The client secret of your Marketo service. + :type client_secret: ~azure.mgmt.datafactory.models.SecretBase + :param use_encrypted_endpoints: Specifies whether the data source + endpoints are encrypted using HTTPS. The default value is true. + :type use_encrypted_endpoints: object + :param use_host_verification: Specifies whether to require the host name + in the server's certificate to match the host name of the server when + connecting over SSL. The default value is true. + :type use_host_verification: object + :param use_peer_verification: Specifies whether to verify the identity of + the server when connecting over SSL. The default value is true. + :type use_peer_verification: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'endpoint': {'required': True}, + 'client_id': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'endpoint': {'key': 'typeProperties.endpoint', 'type': 'object'}, + 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, + 'client_secret': {'key': 'typeProperties.clientSecret', 'type': 'SecretBase'}, + 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, + 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, + 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(MarketoLinkedService, self).__init__(**kwargs) + self.endpoint = kwargs.get('endpoint', None) + self.client_id = kwargs.get('client_id', None) + self.client_secret = kwargs.get('client_secret', None) + self.use_encrypted_endpoints = kwargs.get('use_encrypted_endpoints', None) + self.use_host_verification = kwargs.get('use_host_verification', None) + self.use_peer_verification = kwargs.get('use_peer_verification', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'Marketo' + + +class MarketoObjectDataset(Dataset): + """Marketo server dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(MarketoObjectDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.type = 'MarketoObject' + + +class MarketoSource(CopySource): + """A copy activity Marketo server source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(MarketoSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'MarketoSource' + + +class MicrosoftAccessLinkedService(LinkedService): + """Microsoft Access linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: Required. The non-access credential portion of + the connection string as well as an optional encrypted credential. Type: + string, SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param authentication_type: Type of authentication used to connect to the + Microsoft Access as ODBC data store. Possible values are: Anonymous and + Basic. Type: string (or Expression with resultType string). + :type authentication_type: object + :param credential: The access credential portion of the connection string + specified in driver-specific property-value format. + :type credential: ~azure.mgmt.datafactory.models.SecretBase + :param user_name: User name for Basic authentication. Type: string (or + Expression with resultType string). + :type user_name: object + :param password: Password for Basic authentication. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'connection_string': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'object'}, + 'credential': {'key': 'typeProperties.credential', 'type': 'SecretBase'}, + 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(MicrosoftAccessLinkedService, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.authentication_type = kwargs.get('authentication_type', None) + self.credential = kwargs.get('credential', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'MicrosoftAccess' + + +class MicrosoftAccessSink(CopySink): + """A copy activity Microsoft Access sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param pre_copy_script: A query to execute before starting the copy. Type: + string (or Expression with resultType string). + :type pre_copy_script: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'pre_copy_script': {'key': 'preCopyScript', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(MicrosoftAccessSink, self).__init__(**kwargs) + self.pre_copy_script = kwargs.get('pre_copy_script', None) + self.type = 'MicrosoftAccessSink' + + +class MicrosoftAccessSource(CopySource): + """A copy activity source for Microsoft Access. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: Database query. Type: string (or Expression with resultType + string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(MicrosoftAccessSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'MicrosoftAccessSource' + + +class MicrosoftAccessTableDataset(Dataset): + """The Microsoft Access table dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The Microsoft Access table name. Type: string (or + Expression with resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(MicrosoftAccessTableDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.type = 'MicrosoftAccessTable' + + +class MongoDbCollectionDataset(Dataset): + """The MongoDB database dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param collection_name: Required. The table name of the MongoDB database. + Type: string (or Expression with resultType string). + :type collection_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + 'collection_name': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'collection_name': {'key': 'typeProperties.collectionName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(MongoDbCollectionDataset, self).__init__(**kwargs) + self.collection_name = kwargs.get('collection_name', None) + self.type = 'MongoDbCollection' + + +class MongoDbCursorMethodsProperties(Model): + """Cursor methods for Mongodb query. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param project: Specifies the fields to return in the documents that match + the query filter. To return all fields in the matching documents, omit + this parameter. Type: string (or Expression with resultType string). + :type project: object + :param sort: Specifies the order in which the query returns matching + documents. Type: string (or Expression with resultType string). Type: + string (or Expression with resultType string). + :type sort: object + :param skip: Specifies the how many documents skipped and where MongoDB + begins returning results. This approach may be useful in implementing + paginated results. Type: integer (or Expression with resultType integer). + :type skip: object + :param limit: Specifies the maximum number of documents the server + returns. limit() is analogous to the LIMIT statement in a SQL database. + Type: integer (or Expression with resultType integer). + :type limit: object + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'project': {'key': 'project', 'type': 'object'}, + 'sort': {'key': 'sort', 'type': 'object'}, + 'skip': {'key': 'skip', 'type': 'object'}, + 'limit': {'key': 'limit', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(MongoDbCursorMethodsProperties, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.project = kwargs.get('project', None) + self.sort = kwargs.get('sort', None) + self.skip = kwargs.get('skip', None) + self.limit = kwargs.get('limit', None) + + +class MongoDbLinkedService(LinkedService): + """Linked service for MongoDb data source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param server: Required. The IP address or server name of the MongoDB + server. Type: string (or Expression with resultType string). + :type server: object + :param authentication_type: The authentication type to be used to connect + to the MongoDB database. Possible values include: 'Basic', 'Anonymous' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.MongoDbAuthenticationType + :param database_name: Required. The name of the MongoDB database that you + want to access. Type: string (or Expression with resultType string). + :type database_name: object + :param username: Username for authentication. Type: string (or Expression + with resultType string). + :type username: object + :param password: Password for authentication. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param auth_source: Database to verify the username and password. Type: + string (or Expression with resultType string). + :type auth_source: object + :param port: The TCP port number that the MongoDB server uses to listen + for client connections. The default value is 27017. Type: integer (or + Expression with resultType integer), minimum: 0. + :type port: object + :param enable_ssl: Specifies whether the connections to the server are + encrypted using SSL. The default value is false. Type: boolean (or + Expression with resultType boolean). + :type enable_ssl: object + :param allow_self_signed_server_cert: Specifies whether to allow + self-signed certificates from the server. The default value is false. + Type: boolean (or Expression with resultType boolean). + :type allow_self_signed_server_cert: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'server': {'required': True}, + 'database_name': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server': {'key': 'typeProperties.server', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'database_name': {'key': 'typeProperties.databaseName', 'type': 'object'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'auth_source': {'key': 'typeProperties.authSource', 'type': 'object'}, + 'port': {'key': 'typeProperties.port', 'type': 'object'}, + 'enable_ssl': {'key': 'typeProperties.enableSsl', 'type': 'object'}, + 'allow_self_signed_server_cert': {'key': 'typeProperties.allowSelfSignedServerCert', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(MongoDbLinkedService, self).__init__(**kwargs) + self.server = kwargs.get('server', None) + self.authentication_type = kwargs.get('authentication_type', None) + self.database_name = kwargs.get('database_name', None) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + self.auth_source = kwargs.get('auth_source', None) + self.port = kwargs.get('port', None) + self.enable_ssl = kwargs.get('enable_ssl', None) + self.allow_self_signed_server_cert = kwargs.get('allow_self_signed_server_cert', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'MongoDb' + + +class MongoDbSource(CopySource): + """A copy activity source for a MongoDB database. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: Database query. Should be a SQL-92 query expression. Type: + string (or Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(MongoDbSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'MongoDbSource' + + +class MongoDbV2CollectionDataset(Dataset): + """The MongoDB database dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param collection: Required. The collection name of the MongoDB database. + Type: string (or Expression with resultType string). + :type collection: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + 'collection': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'collection': {'key': 'typeProperties.collection', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(MongoDbV2CollectionDataset, self).__init__(**kwargs) + self.collection = kwargs.get('collection', None) + self.type = 'MongoDbV2Collection' + + +class MongoDbV2LinkedService(LinkedService): + """Linked service for MongoDB data source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: Required. The MongoDB connection string. Type: + string, SecureString or AzureKeyVaultSecretReference. Type: string, + SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param database: Required. The name of the MongoDB database that you want + to access. Type: string (or Expression with resultType string). + :type database: object + """ + + _validation = { + 'type': {'required': True}, + 'connection_string': {'required': True}, + 'database': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'database': {'key': 'typeProperties.database', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(MongoDbV2LinkedService, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.database = kwargs.get('database', None) + self.type = 'MongoDbV2' + + +class MongoDbV2Source(CopySource): + """A copy activity source for a MongoDB database. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param filter: Specifies selection filter using query operators. To return + all documents in a collection, omit this parameter or pass an empty + document ({}). Type: string (or Expression with resultType string). + :type filter: object + :param cursor_methods: Cursor methods for Mongodb query + :type cursor_methods: + ~azure.mgmt.datafactory.models.MongoDbCursorMethodsProperties + :param batch_size: Specifies the number of documents to return in each + batch of the response from MongoDB instance. In most cases, modifying the + batch size will not affect the user or the application. This property's + main purpose is to avoid hit the limitation of response size. Type: + integer (or Expression with resultType integer). + :type batch_size: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'filter': {'key': 'filter', 'type': 'object'}, + 'cursor_methods': {'key': 'cursorMethods', 'type': 'MongoDbCursorMethodsProperties'}, + 'batch_size': {'key': 'batchSize', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(MongoDbV2Source, self).__init__(**kwargs) + self.filter = kwargs.get('filter', None) + self.cursor_methods = kwargs.get('cursor_methods', None) + self.batch_size = kwargs.get('batch_size', None) + self.type = 'MongoDbV2Source' + + +class MySqlLinkedService(LinkedService): + """Linked service for MySQL data source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: Required. The connection string. + :type connection_string: ~azure.mgmt.datafactory.models.SecretBase + :param password: The Azure key vault secret reference of password in + connection string. + :type password: + ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'connection_string': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'SecretBase'}, + 'password': {'key': 'typeProperties.password', 'type': 'AzureKeyVaultSecretReference'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(MySqlLinkedService, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.password = kwargs.get('password', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'MySql' + + +class MySqlSource(CopySource): + """A copy activity source for MySQL databases. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: Database query. Type: string (or Expression with resultType + string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(MySqlSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'MySqlSource' + + +class MySqlTableDataset(Dataset): + """The MySQL table dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The MySQL table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(MySqlTableDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.type = 'MySqlTable' + + +class NetezzaLinkedService(LinkedService): + """Netezza linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: An ODBC connection string. Type: string, + SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param pwd: The Azure key vault secret reference of password in connection + string. + :type pwd: ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'pwd': {'key': 'typeProperties.pwd', 'type': 'AzureKeyVaultSecretReference'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(NetezzaLinkedService, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.pwd = kwargs.get('pwd', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'Netezza' + + +class NetezzaPartitionSettings(Model): + """The settings that will be leveraged for Netezza source partitioning. + + :param partition_column_name: The name of the column in integer type that + will be used for proceeding range partitioning. Type: string (or + Expression with resultType string). + :type partition_column_name: object + :param partition_upper_bound: The maximum value of column specified in + partitionColumnName that will be used for proceeding range partitioning. + Type: string (or Expression with resultType string). + :type partition_upper_bound: object + :param partition_lower_bound: The minimum value of column specified in + partitionColumnName that will be used for proceeding range partitioning. + Type: string (or Expression with resultType string). + :type partition_lower_bound: object + """ + + _attribute_map = { + 'partition_column_name': {'key': 'partitionColumnName', 'type': 'object'}, + 'partition_upper_bound': {'key': 'partitionUpperBound', 'type': 'object'}, + 'partition_lower_bound': {'key': 'partitionLowerBound', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(NetezzaPartitionSettings, self).__init__(**kwargs) + self.partition_column_name = kwargs.get('partition_column_name', None) + self.partition_upper_bound = kwargs.get('partition_upper_bound', None) + self.partition_lower_bound = kwargs.get('partition_lower_bound', None) + + +class NetezzaSource(CopySource): + """A copy activity Netezza source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + :param partition_option: The partition mechanism that will be used for + Netezza read in parallel. Possible values include: 'None', 'DataSlice', + 'DynamicRange' + :type partition_option: str or + ~azure.mgmt.datafactory.models.NetezzaPartitionOption + :param partition_settings: The settings that will be leveraged for Netezza + source partitioning. + :type partition_settings: + ~azure.mgmt.datafactory.models.NetezzaPartitionSettings + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + 'partition_option': {'key': 'partitionOption', 'type': 'str'}, + 'partition_settings': {'key': 'partitionSettings', 'type': 'NetezzaPartitionSettings'}, + } + + def __init__(self, **kwargs): + super(NetezzaSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.partition_option = kwargs.get('partition_option', None) + self.partition_settings = kwargs.get('partition_settings', None) + self.type = 'NetezzaSource' + + +class NetezzaTableDataset(Dataset): + """Netezza dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(NetezzaTableDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.type = 'NetezzaTable' + + +class ODataLinkedService(LinkedService): + """Open Data Protocol (OData) linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param url: Required. The URL of the OData service endpoint. Type: string + (or Expression with resultType string). + :type url: object + :param authentication_type: Type of authentication used to connect to the + OData service. Possible values include: 'Basic', 'Anonymous', 'Windows', + 'AadServicePrincipal', 'ManagedServiceIdentity' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.ODataAuthenticationType + :param user_name: User name of the OData service. Type: string (or + Expression with resultType string). + :type user_name: object + :param password: Password of the OData service. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param tenant: Specify the tenant information (domain name or tenant ID) + under which your application resides. Type: string (or Expression with + resultType string). + :type tenant: object + :param service_principal_id: Specify the application id of your + application registered in Azure Active Directory. Type: string (or + Expression with resultType string). + :type service_principal_id: object + :param aad_resource_id: Specify the resource you are requesting + authorization to use Directory. Type: string (or Expression with + resultType string). + :type aad_resource_id: object + :param aad_service_principal_credential_type: Specify the credential type + (key or cert) is used for service principal. Possible values include: + 'ServicePrincipalKey', 'ServicePrincipalCert' + :type aad_service_principal_credential_type: str or + ~azure.mgmt.datafactory.models.ODataAadServicePrincipalCredentialType + :param service_principal_key: Specify the secret of your application + registered in Azure Active Directory. Type: string (or Expression with + resultType string). + :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase + :param service_principal_embedded_cert: Specify the base64 encoded + certificate of your application registered in Azure Active Directory. + Type: string (or Expression with resultType string). + :type service_principal_embedded_cert: + ~azure.mgmt.datafactory.models.SecretBase + :param service_principal_embedded_cert_password: Specify the password of + your certificate if your certificate has a password and you are using + AadServicePrincipal authentication. Type: string (or Expression with + resultType string). + :type service_principal_embedded_cert_password: + ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'url': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'url': {'key': 'typeProperties.url', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, + 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, + 'aad_resource_id': {'key': 'typeProperties.aadResourceId', 'type': 'object'}, + 'aad_service_principal_credential_type': {'key': 'typeProperties.aadServicePrincipalCredentialType', 'type': 'str'}, + 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, + 'service_principal_embedded_cert': {'key': 'typeProperties.servicePrincipalEmbeddedCert', 'type': 'SecretBase'}, + 'service_principal_embedded_cert_password': {'key': 'typeProperties.servicePrincipalEmbeddedCertPassword', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ODataLinkedService, self).__init__(**kwargs) + self.url = kwargs.get('url', None) + self.authentication_type = kwargs.get('authentication_type', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.tenant = kwargs.get('tenant', None) + self.service_principal_id = kwargs.get('service_principal_id', None) + self.aad_resource_id = kwargs.get('aad_resource_id', None) + self.aad_service_principal_credential_type = kwargs.get('aad_service_principal_credential_type', None) + self.service_principal_key = kwargs.get('service_principal_key', None) + self.service_principal_embedded_cert = kwargs.get('service_principal_embedded_cert', None) + self.service_principal_embedded_cert_password = kwargs.get('service_principal_embedded_cert_password', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'OData' + + +class ODataResourceDataset(Dataset): + """The Open Data Protocol (OData) resource dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param path: The OData resource path. Type: string (or Expression with + resultType string). + :type path: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'path': {'key': 'typeProperties.path', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ODataResourceDataset, self).__init__(**kwargs) + self.path = kwargs.get('path', None) + self.type = 'ODataResource' + + +class ODataSource(CopySource): + """A copy activity source for OData source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: OData query. For example, "$top=1". Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ODataSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'ODataSource' + + +class OdbcLinkedService(LinkedService): + """Open Database Connectivity (ODBC) linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: Required. The non-access credential portion of + the connection string as well as an optional encrypted credential. Type: + string, SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param authentication_type: Type of authentication used to connect to the + ODBC data store. Possible values are: Anonymous and Basic. Type: string + (or Expression with resultType string). + :type authentication_type: object + :param credential: The access credential portion of the connection string + specified in driver-specific property-value format. + :type credential: ~azure.mgmt.datafactory.models.SecretBase + :param user_name: User name for Basic authentication. Type: string (or + Expression with resultType string). + :type user_name: object + :param password: Password for Basic authentication. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'connection_string': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'object'}, + 'credential': {'key': 'typeProperties.credential', 'type': 'SecretBase'}, + 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(OdbcLinkedService, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.authentication_type = kwargs.get('authentication_type', None) + self.credential = kwargs.get('credential', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'Odbc' + + +class OdbcSink(CopySink): + """A copy activity ODBC sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param pre_copy_script: A query to execute before starting the copy. Type: + string (or Expression with resultType string). + :type pre_copy_script: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'pre_copy_script': {'key': 'preCopyScript', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(OdbcSink, self).__init__(**kwargs) + self.pre_copy_script = kwargs.get('pre_copy_script', None) + self.type = 'OdbcSink' + + +class OdbcSource(CopySource): + """A copy activity source for ODBC databases. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: Database query. Type: string (or Expression with resultType + string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(OdbcSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'OdbcSource' + + +class OdbcTableDataset(Dataset): + """The ODBC table dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The ODBC table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(OdbcTableDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.type = 'OdbcTable' + + +class Office365Dataset(Dataset): + """The Office365 account. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: Required. Name of the dataset to extract from Office + 365. Type: string (or Expression with resultType string). + :type table_name: object + :param predicate: A predicate expression that can be used to filter the + specific rows to extract from Office 365. Type: string (or Expression with + resultType string). + :type predicate: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + 'table_name': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + 'predicate': {'key': 'typeProperties.predicate', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(Office365Dataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.predicate = kwargs.get('predicate', None) + self.type = 'Office365Table' + + +class Office365LinkedService(LinkedService): + """Office365 linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param office365_tenant_id: Required. Azure tenant ID to which the Office + 365 account belongs. Type: string (or Expression with resultType string). + :type office365_tenant_id: object + :param service_principal_tenant_id: Required. Specify the tenant + information under which your Azure AD web application resides. Type: + string (or Expression with resultType string). + :type service_principal_tenant_id: object + :param service_principal_id: Required. Specify the application's client + ID. Type: string (or Expression with resultType string). + :type service_principal_id: object + :param service_principal_key: Required. Specify the application's key. + :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'office365_tenant_id': {'required': True}, + 'service_principal_tenant_id': {'required': True}, + 'service_principal_id': {'required': True}, + 'service_principal_key': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'office365_tenant_id': {'key': 'typeProperties.office365TenantId', 'type': 'object'}, + 'service_principal_tenant_id': {'key': 'typeProperties.servicePrincipalTenantId', 'type': 'object'}, + 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, + 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(Office365LinkedService, self).__init__(**kwargs) + self.office365_tenant_id = kwargs.get('office365_tenant_id', None) + self.service_principal_tenant_id = kwargs.get('service_principal_tenant_id', None) + self.service_principal_id = kwargs.get('service_principal_id', None) + self.service_principal_key = kwargs.get('service_principal_key', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'Office365' + + +class Office365Source(CopySource): + """A copy activity source for an Office365 service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param allowed_groups: The groups containing all the users. Type: array of + strings (or Expression with resultType array of strings). + :type allowed_groups: object + :param user_scope_filter_uri: The user scope uri. Type: string (or + Expression with resultType string). + :type user_scope_filter_uri: object + :param date_filter_column: The Column to apply the and . Type: string (or + Expression with resultType string). + :type date_filter_column: object + :param start_time: Start time of the requested range for this dataset. + Type: string (or Expression with resultType string). + :type start_time: object + :param end_time: End time of the requested range for this dataset. Type: + string (or Expression with resultType string). + :type end_time: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'allowed_groups': {'key': 'allowedGroups', 'type': 'object'}, + 'user_scope_filter_uri': {'key': 'userScopeFilterUri', 'type': 'object'}, + 'date_filter_column': {'key': 'dateFilterColumn', 'type': 'object'}, + 'start_time': {'key': 'startTime', 'type': 'object'}, + 'end_time': {'key': 'endTime', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(Office365Source, self).__init__(**kwargs) + self.allowed_groups = kwargs.get('allowed_groups', None) + self.user_scope_filter_uri = kwargs.get('user_scope_filter_uri', None) + self.date_filter_column = kwargs.get('date_filter_column', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.type = 'Office365Source' + + +class Operation(Model): + """Azure Data Factory API operation definition. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param origin: The intended executor of the operation. + :type origin: str + :param display: Metadata associated with the operation. + :type display: ~azure.mgmt.datafactory.models.OperationDisplay + :param service_specification: Details about a service operation. + :type service_specification: + ~azure.mgmt.datafactory.models.OperationServiceSpecification + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'OperationServiceSpecification'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.origin = kwargs.get('origin', None) + self.display = kwargs.get('display', None) + self.service_specification = kwargs.get('service_specification', None) + + +class OperationDisplay(Model): + """Metadata associated with the operation. + + :param description: The description of the operation. + :type description: str + :param provider: The name of the provider. + :type provider: str + :param resource: The name of the resource type on which the operation is + performed. + :type resource: str + :param operation: The type of operation: get, read, delete, etc. + :type operation: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + + +class OperationLogSpecification(Model): + """Details about an operation related to logs. + + :param name: The name of the log category. + :type name: str + :param display_name: Localized display name. + :type display_name: str + :param blob_duration: Blobs created in the customer storage account, per + hour. + :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(OperationLogSpecification, 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 OperationMetricAvailability(Model): + """Defines how often data for a metric becomes available. + + :param time_grain: The granularity for the metric. + :type time_grain: str + :param blob_duration: Blob created in the customer storage account, per + hour. + :type blob_duration: str + """ + + _attribute_map = { + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationMetricAvailability, self).__init__(**kwargs) + self.time_grain = kwargs.get('time_grain', None) + self.blob_duration = kwargs.get('blob_duration', None) + + +class OperationMetricDimension(Model): + """Defines the metric dimension. + + :param name: The name of the dimension for the metric. + :type name: str + :param display_name: The display name of the metric dimension. + :type display_name: str + :param to_be_exported_for_shoebox: Whether the dimension should be + exported to Azure Monitor. + :type to_be_exported_for_shoebox: bool + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(OperationMetricDimension, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.to_be_exported_for_shoebox = kwargs.get('to_be_exported_for_shoebox', None) + + +class OperationMetricSpecification(Model): + """Details about an operation related to metrics. + + :param name: The name of the metric. + :type name: str + :param display_name: Localized display name of the metric. + :type display_name: str + :param display_description: The description of the metric. + :type display_description: str + :param unit: The unit that the metric is measured in. + :type unit: str + :param aggregation_type: The type of metric aggregation. + :type aggregation_type: str + :param enable_regional_mdm_account: Whether or not the service is using + regional MDM accounts. + :type enable_regional_mdm_account: str + :param source_mdm_account: The name of the MDM account. + :type source_mdm_account: str + :param source_mdm_namespace: The name of the MDM namespace. + :type source_mdm_namespace: str + :param availabilities: Defines how often data for metrics becomes + available. + :type availabilities: + list[~azure.mgmt.datafactory.models.OperationMetricAvailability] + :param dimensions: Defines the metric dimension. + :type dimensions: + list[~azure.mgmt.datafactory.models.OperationMetricDimension] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'str'}, + 'source_mdm_account': {'key': 'sourceMdmAccount', 'type': 'str'}, + 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, + 'availabilities': {'key': 'availabilities', 'type': '[OperationMetricAvailability]'}, + 'dimensions': {'key': 'dimensions', 'type': '[OperationMetricDimension]'}, + } + + def __init__(self, **kwargs): + super(OperationMetricSpecification, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.display_description = kwargs.get('display_description', None) + self.unit = kwargs.get('unit', None) + self.aggregation_type = kwargs.get('aggregation_type', None) + self.enable_regional_mdm_account = kwargs.get('enable_regional_mdm_account', None) + self.source_mdm_account = kwargs.get('source_mdm_account', None) + self.source_mdm_namespace = kwargs.get('source_mdm_namespace', None) + self.availabilities = kwargs.get('availabilities', None) + self.dimensions = kwargs.get('dimensions', None) + + +class OperationServiceSpecification(Model): + """Details about a service operation. + + :param log_specifications: Details about operations related to logs. + :type log_specifications: + list[~azure.mgmt.datafactory.models.OperationLogSpecification] + :param metric_specifications: Details about operations related to metrics. + :type metric_specifications: + list[~azure.mgmt.datafactory.models.OperationMetricSpecification] + """ + + _attribute_map = { + 'log_specifications': {'key': 'logSpecifications', 'type': '[OperationLogSpecification]'}, + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[OperationMetricSpecification]'}, + } + + def __init__(self, **kwargs): + super(OperationServiceSpecification, self).__init__(**kwargs) + self.log_specifications = kwargs.get('log_specifications', None) + self.metric_specifications = kwargs.get('metric_specifications', None) + + +class OracleLinkedService(LinkedService): + """Oracle database. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: Required. The connection string. Type: string, + SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param password: The Azure key vault secret reference of password in + connection string. + :type password: + ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'connection_string': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'AzureKeyVaultSecretReference'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(OracleLinkedService, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.password = kwargs.get('password', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'Oracle' + + +class OraclePartitionSettings(Model): + """The settings that will be leveraged for Oracle source partitioning. + + :param partition_names: Names of the physical partitions of Oracle table. + :type partition_names: object + :param partition_column_name: The name of the column in integer type that + will be used for proceeding range partitioning. Type: string (or + Expression with resultType string). + :type partition_column_name: object + :param partition_upper_bound: The maximum value of column specified in + partitionColumnName that will be used for proceeding range partitioning. + Type: string (or Expression with resultType string). + :type partition_upper_bound: object + :param partition_lower_bound: The minimum value of column specified in + partitionColumnName that will be used for proceeding range partitioning. + Type: string (or Expression with resultType string). + :type partition_lower_bound: object + """ + + _attribute_map = { + 'partition_names': {'key': 'partitionNames', 'type': 'object'}, + 'partition_column_name': {'key': 'partitionColumnName', 'type': 'object'}, + 'partition_upper_bound': {'key': 'partitionUpperBound', 'type': 'object'}, + 'partition_lower_bound': {'key': 'partitionLowerBound', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(OraclePartitionSettings, self).__init__(**kwargs) + self.partition_names = kwargs.get('partition_names', None) + self.partition_column_name = kwargs.get('partition_column_name', None) + self.partition_upper_bound = kwargs.get('partition_upper_bound', None) + self.partition_lower_bound = kwargs.get('partition_lower_bound', None) + + +class OracleServiceCloudLinkedService(LinkedService): + """Oracle Service Cloud linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param host: Required. The URL of the Oracle Service Cloud instance. + :type host: object + :param username: Required. The user name that you use to access Oracle + Service Cloud server. + :type username: object + :param password: Required. The password corresponding to the user name + that you provided in the username key. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param use_encrypted_endpoints: Specifies whether the data source + endpoints are encrypted using HTTPS. The default value is true. Type: + boolean (or Expression with resultType boolean). + :type use_encrypted_endpoints: object + :param use_host_verification: Specifies whether to require the host name + in the server's certificate to match the host name of the server when + connecting over SSL. The default value is true. Type: boolean (or + Expression with resultType boolean). + :type use_host_verification: object + :param use_peer_verification: Specifies whether to verify the identity of + the server when connecting over SSL. The default value is true. Type: + boolean (or Expression with resultType boolean). + :type use_peer_verification: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'host': {'required': True}, + 'username': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'host': {'key': 'typeProperties.host', 'type': 'object'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, + 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, + 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(OracleServiceCloudLinkedService, self).__init__(**kwargs) + self.host = kwargs.get('host', None) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + self.use_encrypted_endpoints = kwargs.get('use_encrypted_endpoints', None) + self.use_host_verification = kwargs.get('use_host_verification', None) + self.use_peer_verification = kwargs.get('use_peer_verification', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'OracleServiceCloud' + + +class OracleServiceCloudObjectDataset(Dataset): + """Oracle Service Cloud dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(OracleServiceCloudObjectDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.type = 'OracleServiceCloudObject' + + +class OracleServiceCloudSource(CopySource): + """A copy activity Oracle Service Cloud source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(OracleServiceCloudSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'OracleServiceCloudSource' + + +class OracleSink(CopySink): + """A copy activity Oracle sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param pre_copy_script: SQL pre-copy script. Type: string (or Expression + with resultType string). + :type pre_copy_script: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'pre_copy_script': {'key': 'preCopyScript', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(OracleSink, self).__init__(**kwargs) + self.pre_copy_script = kwargs.get('pre_copy_script', None) + self.type = 'OracleSink' + + +class OracleSource(CopySource): + """A copy activity Oracle source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param oracle_reader_query: Oracle reader query. Type: string (or + Expression with resultType string). + :type oracle_reader_query: object + :param query_timeout: Query timeout. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type query_timeout: object + :param partition_option: The partition mechanism that will be used for + Oracle read in parallel. Possible values include: 'None', + 'PhysicalPartitionsOfTable', 'DynamicRange' + :type partition_option: str or + ~azure.mgmt.datafactory.models.OraclePartitionOption + :param partition_settings: The settings that will be leveraged for Oracle + source partitioning. + :type partition_settings: + ~azure.mgmt.datafactory.models.OraclePartitionSettings + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'oracle_reader_query': {'key': 'oracleReaderQuery', 'type': 'object'}, + 'query_timeout': {'key': 'queryTimeout', 'type': 'object'}, + 'partition_option': {'key': 'partitionOption', 'type': 'str'}, + 'partition_settings': {'key': 'partitionSettings', 'type': 'OraclePartitionSettings'}, + } + + def __init__(self, **kwargs): + super(OracleSource, self).__init__(**kwargs) + self.oracle_reader_query = kwargs.get('oracle_reader_query', None) + self.query_timeout = kwargs.get('query_timeout', None) + self.partition_option = kwargs.get('partition_option', None) + self.partition_settings = kwargs.get('partition_settings', None) + self.type = 'OracleSource' + + +class OracleTableDataset(Dataset): + """The on-premises Oracle database dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: This property will be retired. Please consider using + schema + table properties instead. + :type table_name: object + :param oracle_table_dataset_schema: The schema name of the on-premises + Oracle database. Type: string (or Expression with resultType string). + :type oracle_table_dataset_schema: object + :param table: The table name of the on-premises Oracle database. Type: + string (or Expression with resultType string). + :type table: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + 'oracle_table_dataset_schema': {'key': 'typeProperties.schema', 'type': 'object'}, + 'table': {'key': 'typeProperties.table', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(OracleTableDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.oracle_table_dataset_schema = kwargs.get('oracle_table_dataset_schema', None) + self.table = kwargs.get('table', None) + self.type = 'OracleTable' + + +class OrcFormat(DatasetStorageFormat): + """The data stored in Optimized Row Columnar (ORC) format. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param serializer: Serializer. Type: string (or Expression with resultType + string). + :type serializer: object + :param deserializer: Deserializer. Type: string (or Expression with + resultType string). + :type deserializer: object + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'serializer': {'key': 'serializer', 'type': 'object'}, + 'deserializer': {'key': 'deserializer', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OrcFormat, self).__init__(**kwargs) + self.type = 'OrcFormat' + + +class ParameterSpecification(Model): + """Definition of a single parameter for an entity. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Parameter type. Possible values include: 'Object', + 'String', 'Int', 'Float', 'Bool', 'Array', 'SecureString' + :type type: str or ~azure.mgmt.datafactory.models.ParameterType + :param default_value: Default value of parameter. + :type default_value: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'default_value': {'key': 'defaultValue', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ParameterSpecification, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.default_value = kwargs.get('default_value', None) + + +class ParquetDataset(Dataset): + """Parquet dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param location: Required. The location of the parquet storage. + :type location: ~azure.mgmt.datafactory.models.DatasetLocation + :param compression_codec: + :type compression_codec: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'typeProperties.location', 'type': 'DatasetLocation'}, + 'compression_codec': {'key': 'typeProperties.compressionCodec', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ParquetDataset, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.compression_codec = kwargs.get('compression_codec', None) + self.type = 'Parquet' + + +class ParquetFormat(DatasetStorageFormat): + """The data stored in Parquet format. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param serializer: Serializer. Type: string (or Expression with resultType + string). + :type serializer: object + :param deserializer: Deserializer. Type: string (or Expression with + resultType string). + :type deserializer: object + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'serializer': {'key': 'serializer', 'type': 'object'}, + 'deserializer': {'key': 'deserializer', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ParquetFormat, self).__init__(**kwargs) + self.type = 'ParquetFormat' + + +class ParquetSink(CopySink): + """A copy activity Parquet sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param store_settings: Parquet store settings. + :type store_settings: ~azure.mgmt.datafactory.models.StoreWriteSettings + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'store_settings': {'key': 'storeSettings', 'type': 'StoreWriteSettings'}, + } + + def __init__(self, **kwargs): + super(ParquetSink, self).__init__(**kwargs) + self.store_settings = kwargs.get('store_settings', None) + self.type = 'ParquetSink' + + +class ParquetSource(CopySource): + """A copy activity Parquet source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param store_settings: Parquet store settings. + :type store_settings: ~azure.mgmt.datafactory.models.StoreReadSettings + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'store_settings': {'key': 'storeSettings', 'type': 'StoreReadSettings'}, + } + + def __init__(self, **kwargs): + super(ParquetSource, self).__init__(**kwargs) + self.store_settings = kwargs.get('store_settings', None) + self.type = 'ParquetSource' + + +class PaypalLinkedService(LinkedService): + """Paypal Service linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param host: Required. The URL of the PayPal instance. (i.e. + api.sandbox.paypal.com) + :type host: object + :param client_id: Required. The client ID associated with your PayPal + application. + :type client_id: object + :param client_secret: The client secret associated with your PayPal + application. + :type client_secret: ~azure.mgmt.datafactory.models.SecretBase + :param use_encrypted_endpoints: Specifies whether the data source + endpoints are encrypted using HTTPS. The default value is true. + :type use_encrypted_endpoints: object + :param use_host_verification: Specifies whether to require the host name + in the server's certificate to match the host name of the server when + connecting over SSL. The default value is true. + :type use_host_verification: object + :param use_peer_verification: Specifies whether to verify the identity of + the server when connecting over SSL. The default value is true. + :type use_peer_verification: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'host': {'required': True}, + 'client_id': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'host': {'key': 'typeProperties.host', 'type': 'object'}, + 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, + 'client_secret': {'key': 'typeProperties.clientSecret', 'type': 'SecretBase'}, + 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, + 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, + 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(PaypalLinkedService, self).__init__(**kwargs) + self.host = kwargs.get('host', None) + self.client_id = kwargs.get('client_id', None) + self.client_secret = kwargs.get('client_secret', None) + self.use_encrypted_endpoints = kwargs.get('use_encrypted_endpoints', None) + self.use_host_verification = kwargs.get('use_host_verification', None) + self.use_peer_verification = kwargs.get('use_peer_verification', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'Paypal' + + +class PaypalObjectDataset(Dataset): + """Paypal Service dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(PaypalObjectDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.type = 'PaypalObject' + + +class PaypalSource(CopySource): + """A copy activity Paypal Service source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(PaypalSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'PaypalSource' + + +class PhoenixLinkedService(LinkedService): + """Phoenix server linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param host: Required. The IP address or host name of the Phoenix server. + (i.e. 192.168.222.160) + :type host: object + :param port: The TCP port that the Phoenix server uses to listen for + client connections. The default value is 8765. + :type port: object + :param http_path: The partial URL corresponding to the Phoenix server. + (i.e. /gateway/sandbox/phoenix/version). The default value is hbasephoenix + if using WindowsAzureHDInsightService. + :type http_path: object + :param authentication_type: Required. The authentication mechanism used to + connect to the Phoenix server. Possible values include: 'Anonymous', + 'UsernameAndPassword', 'WindowsAzureHDInsightService' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.PhoenixAuthenticationType + :param username: The user name used to connect to the Phoenix server. + :type username: object + :param password: The password corresponding to the user name. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param enable_ssl: Specifies whether the connections to the server are + encrypted using SSL. The default value is false. + :type enable_ssl: object + :param trusted_cert_path: The full path of the .pem file containing + trusted CA certificates for verifying the server when connecting over SSL. + This property can only be set when using SSL on self-hosted IR. The + default value is the cacerts.pem file installed with the IR. + :type trusted_cert_path: object + :param use_system_trust_store: Specifies whether to use a CA certificate + from the system trust store or from a specified PEM file. The default + value is false. + :type use_system_trust_store: object + :param allow_host_name_cn_mismatch: Specifies whether to require a + CA-issued SSL certificate name to match the host name of the server when + connecting over SSL. The default value is false. + :type allow_host_name_cn_mismatch: object + :param allow_self_signed_server_cert: Specifies whether to allow + self-signed certificates from the server. The default value is false. + :type allow_self_signed_server_cert: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'host': {'required': True}, + 'authentication_type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'host': {'key': 'typeProperties.host', 'type': 'object'}, + 'port': {'key': 'typeProperties.port', 'type': 'object'}, + 'http_path': {'key': 'typeProperties.httpPath', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'enable_ssl': {'key': 'typeProperties.enableSsl', 'type': 'object'}, + 'trusted_cert_path': {'key': 'typeProperties.trustedCertPath', 'type': 'object'}, + 'use_system_trust_store': {'key': 'typeProperties.useSystemTrustStore', 'type': 'object'}, + 'allow_host_name_cn_mismatch': {'key': 'typeProperties.allowHostNameCNMismatch', 'type': 'object'}, + 'allow_self_signed_server_cert': {'key': 'typeProperties.allowSelfSignedServerCert', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(PhoenixLinkedService, self).__init__(**kwargs) + self.host = kwargs.get('host', None) + self.port = kwargs.get('port', None) + self.http_path = kwargs.get('http_path', None) + self.authentication_type = kwargs.get('authentication_type', None) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + self.enable_ssl = kwargs.get('enable_ssl', None) + self.trusted_cert_path = kwargs.get('trusted_cert_path', None) + self.use_system_trust_store = kwargs.get('use_system_trust_store', None) + self.allow_host_name_cn_mismatch = kwargs.get('allow_host_name_cn_mismatch', None) + self.allow_self_signed_server_cert = kwargs.get('allow_self_signed_server_cert', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'Phoenix' + + +class PhoenixObjectDataset(Dataset): + """Phoenix server dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: This property will be retired. Please consider using + schema + table properties instead. + :type table_name: object + :param table: The table name of the Phoenix. Type: string (or Expression + with resultType string). + :type table: object + :param phoenix_object_dataset_schema: The schema name of the Phoenix. + Type: string (or Expression with resultType string). + :type phoenix_object_dataset_schema: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + 'table': {'key': 'typeProperties.table', 'type': 'object'}, + 'phoenix_object_dataset_schema': {'key': 'typeProperties.schema', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(PhoenixObjectDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.table = kwargs.get('table', None) + self.phoenix_object_dataset_schema = kwargs.get('phoenix_object_dataset_schema', None) + self.type = 'PhoenixObject' + + +class PhoenixSource(CopySource): + """A copy activity Phoenix server source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(PhoenixSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'PhoenixSource' + + +class PipelineFolder(Model): + """The folder that this Pipeline is in. If not specified, Pipeline will appear + at the root level. + + :param name: The name of the folder that this Pipeline is in. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PipelineFolder, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class PipelineReference(Model): + """Pipeline reference type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. Pipeline reference type. Default value: + "PipelineReference" . + :vartype type: str + :param reference_name: Required. Reference pipeline name. + :type reference_name: str + :param name: Reference name. + :type name: str + """ + + _validation = { + 'type': {'required': True, 'constant': True}, + 'reference_name': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'reference_name': {'key': 'referenceName', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + type = "PipelineReference" + + def __init__(self, **kwargs): + super(PipelineReference, self).__init__(**kwargs) + self.reference_name = kwargs.get('reference_name', None) + self.name = kwargs.get('name', None) + + +class PipelineResource(SubResource): + """Pipeline resource type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar etag: Etag identifies change in the resource. + :vartype etag: str + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: The description of the pipeline. + :type description: str + :param activities: List of activities in pipeline. + :type activities: list[~azure.mgmt.datafactory.models.Activity] + :param parameters: List of parameters for pipeline. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param variables: List of variables for pipeline. + :type variables: dict[str, + ~azure.mgmt.datafactory.models.VariableSpecification] + :param concurrency: The max number of concurrent runs for the pipeline. + :type concurrency: int + :param annotations: List of tags that can be used for describing the + Pipeline. + :type annotations: list[object] + :param folder: The folder that this Pipeline is in. If not specified, + Pipeline will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.PipelineFolder + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'concurrency': {'minimum': 1}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'activities': {'key': 'properties.activities', 'type': '[Activity]'}, + 'parameters': {'key': 'properties.parameters', 'type': '{ParameterSpecification}'}, + 'variables': {'key': 'properties.variables', 'type': '{VariableSpecification}'}, + 'concurrency': {'key': 'properties.concurrency', 'type': 'int'}, + 'annotations': {'key': 'properties.annotations', 'type': '[object]'}, + 'folder': {'key': 'properties.folder', 'type': 'PipelineFolder'}, + } + + def __init__(self, **kwargs): + super(PipelineResource, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.description = kwargs.get('description', None) + self.activities = kwargs.get('activities', None) + self.parameters = kwargs.get('parameters', None) + self.variables = kwargs.get('variables', None) + self.concurrency = kwargs.get('concurrency', None) + self.annotations = kwargs.get('annotations', None) + self.folder = kwargs.get('folder', None) + + +class PipelineRun(Model): + """Information about a pipeline run. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar run_id: Identifier of a run. + :vartype run_id: str + :ivar run_group_id: Identifier that correlates all the recovery runs of a + pipeline run. + :vartype run_group_id: str + :ivar is_latest: Indicates if the recovered pipeline run is the latest in + its group. + :vartype is_latest: bool + :ivar pipeline_name: The pipeline name. + :vartype pipeline_name: str + :ivar parameters: The full or partial list of parameter name, value pair + used in the pipeline run. + :vartype parameters: dict[str, str] + :ivar invoked_by: Entity that started the pipeline run. + :vartype invoked_by: ~azure.mgmt.datafactory.models.PipelineRunInvokedBy + :ivar last_updated: The last updated timestamp for the pipeline run event + in ISO8601 format. + :vartype last_updated: datetime + :ivar run_start: The start time of a pipeline run in ISO8601 format. + :vartype run_start: datetime + :ivar run_end: The end time of a pipeline run in ISO8601 format. + :vartype run_end: datetime + :ivar duration_in_ms: The duration of a pipeline run. + :vartype duration_in_ms: int + :ivar status: The status of a pipeline run. + :vartype status: str + :ivar message: The message from a pipeline run. + :vartype message: str + """ + + _validation = { + 'run_id': {'readonly': True}, + 'run_group_id': {'readonly': True}, + 'is_latest': {'readonly': True}, + 'pipeline_name': {'readonly': True}, + 'parameters': {'readonly': True}, + 'invoked_by': {'readonly': True}, + 'last_updated': {'readonly': True}, + 'run_start': {'readonly': True}, + 'run_end': {'readonly': True}, + 'duration_in_ms': {'readonly': True}, + 'status': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'run_id': {'key': 'runId', 'type': 'str'}, + 'run_group_id': {'key': 'runGroupId', 'type': 'str'}, + 'is_latest': {'key': 'isLatest', 'type': 'bool'}, + 'pipeline_name': {'key': 'pipelineName', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{str}'}, + 'invoked_by': {'key': 'invokedBy', 'type': 'PipelineRunInvokedBy'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, + 'run_start': {'key': 'runStart', 'type': 'iso-8601'}, + 'run_end': {'key': 'runEnd', 'type': 'iso-8601'}, + 'duration_in_ms': {'key': 'durationInMs', 'type': 'int'}, + 'status': {'key': 'status', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PipelineRun, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.run_id = None + self.run_group_id = None + self.is_latest = None + self.pipeline_name = None + self.parameters = None + self.invoked_by = None + self.last_updated = None + self.run_start = None + self.run_end = None + self.duration_in_ms = None + self.status = None + self.message = None + + +class PipelineRunInvokedBy(Model): + """Provides entity name and id that started the pipeline run. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of the entity that started the pipeline run. + :vartype name: str + :ivar id: The ID of the entity that started the run. + :vartype id: str + :ivar invoked_by_type: The type of the entity that started the run. + :vartype invoked_by_type: str + """ + + _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'invoked_by_type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'invoked_by_type': {'key': 'invokedByType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PipelineRunInvokedBy, self).__init__(**kwargs) + self.name = None + self.id = None + self.invoked_by_type = None + + +class PipelineRunsQueryResponse(Model): + """A list pipeline runs. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of pipeline runs. + :type value: list[~azure.mgmt.datafactory.models.PipelineRun] + :param continuation_token: The continuation token for getting the next + page of results, if any remaining results exist, null otherwise. + :type continuation_token: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PipelineRun]'}, + 'continuation_token': {'key': 'continuationToken', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PipelineRunsQueryResponse, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.continuation_token = kwargs.get('continuation_token', None) + + +class PolybaseSettings(Model): + """PolyBase settings. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param reject_type: Reject type. Possible values include: 'value', + 'percentage' + :type reject_type: str or + ~azure.mgmt.datafactory.models.PolybaseSettingsRejectType + :param reject_value: Specifies the value or the percentage of rows that + can be rejected before the query fails. Type: number (or Expression with + resultType number), minimum: 0. + :type reject_value: object + :param reject_sample_value: Determines the number of rows to attempt to + retrieve before the PolyBase recalculates the percentage of rejected rows. + Type: integer (or Expression with resultType integer), minimum: 0. + :type reject_sample_value: object + :param use_type_default: Specifies how to handle missing values in + delimited text files when PolyBase retrieves data from the text file. + Type: boolean (or Expression with resultType boolean). + :type use_type_default: object + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'reject_type': {'key': 'rejectType', 'type': 'str'}, + 'reject_value': {'key': 'rejectValue', 'type': 'object'}, + 'reject_sample_value': {'key': 'rejectSampleValue', 'type': 'object'}, + 'use_type_default': {'key': 'useTypeDefault', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(PolybaseSettings, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.reject_type = kwargs.get('reject_type', None) + self.reject_value = kwargs.get('reject_value', None) + self.reject_sample_value = kwargs.get('reject_sample_value', None) + self.use_type_default = kwargs.get('use_type_default', None) + + +class PostgreSqlLinkedService(LinkedService): + """Linked service for PostgreSQL data source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: Required. The connection string. + :type connection_string: ~azure.mgmt.datafactory.models.SecretBase + :param password: The Azure key vault secret reference of password in + connection string. + :type password: + ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'connection_string': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'SecretBase'}, + 'password': {'key': 'typeProperties.password', 'type': 'AzureKeyVaultSecretReference'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(PostgreSqlLinkedService, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.password = kwargs.get('password', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'PostgreSql' + + +class PostgreSqlSource(CopySource): + """A copy activity source for PostgreSQL databases. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: Database query. Type: string (or Expression with resultType + string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(PostgreSqlSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'PostgreSqlSource' + + +class PostgreSqlTableDataset(Dataset): + """The PostgreSQL table dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The PostgreSQL table name. Type: string (or Expression + with resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(PostgreSqlTableDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.type = 'PostgreSqlTable' + + +class PrestoLinkedService(LinkedService): + """Presto server linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param host: Required. The IP address or host name of the Presto server. + (i.e. 192.168.222.160) + :type host: object + :param server_version: Required. The version of the Presto server. (i.e. + 0.148-t) + :type server_version: object + :param catalog: Required. The catalog context for all request against the + server. + :type catalog: object + :param port: The TCP port that the Presto server uses to listen for client + connections. The default value is 8080. + :type port: object + :param authentication_type: Required. The authentication mechanism used to + connect to the Presto server. Possible values include: 'Anonymous', 'LDAP' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.PrestoAuthenticationType + :param username: The user name used to connect to the Presto server. + :type username: object + :param password: The password corresponding to the user name. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param enable_ssl: Specifies whether the connections to the server are + encrypted using SSL. The default value is false. + :type enable_ssl: object + :param trusted_cert_path: The full path of the .pem file containing + trusted CA certificates for verifying the server when connecting over SSL. + This property can only be set when using SSL on self-hosted IR. The + default value is the cacerts.pem file installed with the IR. + :type trusted_cert_path: object + :param use_system_trust_store: Specifies whether to use a CA certificate + from the system trust store or from a specified PEM file. The default + value is false. + :type use_system_trust_store: object + :param allow_host_name_cn_mismatch: Specifies whether to require a + CA-issued SSL certificate name to match the host name of the server when + connecting over SSL. The default value is false. + :type allow_host_name_cn_mismatch: object + :param allow_self_signed_server_cert: Specifies whether to allow + self-signed certificates from the server. The default value is false. + :type allow_self_signed_server_cert: object + :param time_zone_id: The local time zone used by the connection. Valid + values for this option are specified in the IANA Time Zone Database. The + default value is the system time zone. + :type time_zone_id: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'host': {'required': True}, + 'server_version': {'required': True}, + 'catalog': {'required': True}, + 'authentication_type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'host': {'key': 'typeProperties.host', 'type': 'object'}, + 'server_version': {'key': 'typeProperties.serverVersion', 'type': 'object'}, + 'catalog': {'key': 'typeProperties.catalog', 'type': 'object'}, + 'port': {'key': 'typeProperties.port', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'enable_ssl': {'key': 'typeProperties.enableSsl', 'type': 'object'}, + 'trusted_cert_path': {'key': 'typeProperties.trustedCertPath', 'type': 'object'}, + 'use_system_trust_store': {'key': 'typeProperties.useSystemTrustStore', 'type': 'object'}, + 'allow_host_name_cn_mismatch': {'key': 'typeProperties.allowHostNameCNMismatch', 'type': 'object'}, + 'allow_self_signed_server_cert': {'key': 'typeProperties.allowSelfSignedServerCert', 'type': 'object'}, + 'time_zone_id': {'key': 'typeProperties.timeZoneID', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(PrestoLinkedService, self).__init__(**kwargs) + self.host = kwargs.get('host', None) + self.server_version = kwargs.get('server_version', None) + self.catalog = kwargs.get('catalog', None) + self.port = kwargs.get('port', None) + self.authentication_type = kwargs.get('authentication_type', None) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + self.enable_ssl = kwargs.get('enable_ssl', None) + self.trusted_cert_path = kwargs.get('trusted_cert_path', None) + self.use_system_trust_store = kwargs.get('use_system_trust_store', None) + self.allow_host_name_cn_mismatch = kwargs.get('allow_host_name_cn_mismatch', None) + self.allow_self_signed_server_cert = kwargs.get('allow_self_signed_server_cert', None) + self.time_zone_id = kwargs.get('time_zone_id', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'Presto' + + +class PrestoObjectDataset(Dataset): + """Presto server dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: This property will be retired. Please consider using + schema + table properties instead. + :type table_name: object + :param table: The table name of the Presto. Type: string (or Expression + with resultType string). + :type table: object + :param presto_object_dataset_schema: The schema name of the Presto. Type: + string (or Expression with resultType string). + :type presto_object_dataset_schema: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + 'table': {'key': 'typeProperties.table', 'type': 'object'}, + 'presto_object_dataset_schema': {'key': 'typeProperties.schema', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(PrestoObjectDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.table = kwargs.get('table', None) + self.presto_object_dataset_schema = kwargs.get('presto_object_dataset_schema', None) + self.type = 'PrestoObject' + + +class PrestoSource(CopySource): + """A copy activity Presto server source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(PrestoSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'PrestoSource' + + +class QuickBooksLinkedService(LinkedService): + """QuickBooks server linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param endpoint: Required. The endpoint of the QuickBooks server. (i.e. + quickbooks.api.intuit.com) + :type endpoint: object + :param company_id: Required. The company ID of the QuickBooks company to + authorize. + :type company_id: object + :param consumer_key: Required. The consumer key for OAuth 1.0 + authentication. + :type consumer_key: object + :param consumer_secret: Required. The consumer secret for OAuth 1.0 + authentication. + :type consumer_secret: ~azure.mgmt.datafactory.models.SecretBase + :param access_token: Required. The access token for OAuth 1.0 + authentication. + :type access_token: ~azure.mgmt.datafactory.models.SecretBase + :param access_token_secret: Required. The access token secret for OAuth + 1.0 authentication. + :type access_token_secret: ~azure.mgmt.datafactory.models.SecretBase + :param use_encrypted_endpoints: Specifies whether the data source + endpoints are encrypted using HTTPS. The default value is true. + :type use_encrypted_endpoints: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'endpoint': {'required': True}, + 'company_id': {'required': True}, + 'consumer_key': {'required': True}, + 'consumer_secret': {'required': True}, + 'access_token': {'required': True}, + 'access_token_secret': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'endpoint': {'key': 'typeProperties.endpoint', 'type': 'object'}, + 'company_id': {'key': 'typeProperties.companyId', 'type': 'object'}, + 'consumer_key': {'key': 'typeProperties.consumerKey', 'type': 'object'}, + 'consumer_secret': {'key': 'typeProperties.consumerSecret', 'type': 'SecretBase'}, + 'access_token': {'key': 'typeProperties.accessToken', 'type': 'SecretBase'}, + 'access_token_secret': {'key': 'typeProperties.accessTokenSecret', 'type': 'SecretBase'}, + 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(QuickBooksLinkedService, self).__init__(**kwargs) + self.endpoint = kwargs.get('endpoint', None) + self.company_id = kwargs.get('company_id', None) + self.consumer_key = kwargs.get('consumer_key', None) + self.consumer_secret = kwargs.get('consumer_secret', None) + self.access_token = kwargs.get('access_token', None) + self.access_token_secret = kwargs.get('access_token_secret', None) + self.use_encrypted_endpoints = kwargs.get('use_encrypted_endpoints', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'QuickBooks' + + +class QuickBooksObjectDataset(Dataset): + """QuickBooks server dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(QuickBooksObjectDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.type = 'QuickBooksObject' + + +class QuickBooksSource(CopySource): + """A copy activity QuickBooks server source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(QuickBooksSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'QuickBooksSource' + + +class RecurrenceSchedule(Model): + """The recurrence schedule. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param minutes: The minutes. + :type minutes: list[int] + :param hours: The hours. + :type hours: list[int] + :param week_days: The days of the week. + :type week_days: list[str or ~azure.mgmt.datafactory.models.DaysOfWeek] + :param month_days: The month days. + :type month_days: list[int] + :param monthly_occurrences: The monthly occurrences. + :type monthly_occurrences: + list[~azure.mgmt.datafactory.models.RecurrenceScheduleOccurrence] + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'minutes': {'key': 'minutes', 'type': '[int]'}, + 'hours': {'key': 'hours', 'type': '[int]'}, + 'week_days': {'key': 'weekDays', 'type': '[DaysOfWeek]'}, + 'month_days': {'key': 'monthDays', 'type': '[int]'}, + 'monthly_occurrences': {'key': 'monthlyOccurrences', 'type': '[RecurrenceScheduleOccurrence]'}, + } + + def __init__(self, **kwargs): + super(RecurrenceSchedule, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.minutes = kwargs.get('minutes', None) + self.hours = kwargs.get('hours', None) + self.week_days = kwargs.get('week_days', None) + self.month_days = kwargs.get('month_days', None) + self.monthly_occurrences = kwargs.get('monthly_occurrences', None) + + +class RecurrenceScheduleOccurrence(Model): + """The recurrence schedule occurrence. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param day: The day of the week. Possible values include: 'Sunday', + 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' + :type day: str or ~azure.mgmt.datafactory.models.DayOfWeek + :param occurrence: The occurrence. + :type occurrence: int + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'day': {'key': 'day', 'type': 'DayOfWeek'}, + 'occurrence': {'key': 'occurrence', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RecurrenceScheduleOccurrence, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.day = kwargs.get('day', None) + self.occurrence = kwargs.get('occurrence', None) + + +class RedirectIncompatibleRowSettings(Model): + """Redirect incompatible row settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param linked_service_name: Required. Name of the Azure Storage, Storage + SAS, or Azure Data Lake Store linked service used for redirecting + incompatible row. Must be specified if redirectIncompatibleRowSettings is + specified. Type: string (or Expression with resultType string). + :type linked_service_name: object + :param path: The path for storing the redirect incompatible row data. + Type: string (or Expression with resultType string). + :type path: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'object'}, + 'path': {'key': 'path', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(RedirectIncompatibleRowSettings, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.linked_service_name = kwargs.get('linked_service_name', None) + self.path = kwargs.get('path', None) + + +class RedshiftUnloadSettings(Model): + """The Amazon S3 settings needed for the interim Amazon S3 when copying from + Amazon Redshift with unload. With this, data from Amazon Redshift source + will be unloaded into S3 first and then copied into the targeted sink from + the interim S3. + + All required parameters must be populated in order to send to Azure. + + :param s3_linked_service_name: Required. The name of the Amazon S3 linked + service which will be used for the unload operation when copying from the + Amazon Redshift source. + :type s3_linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param bucket_name: Required. The bucket of the interim Amazon S3 which + will be used to store the unloaded data from Amazon Redshift source. The + bucket must be in the same region as the Amazon Redshift source. Type: + string (or Expression with resultType string). + :type bucket_name: object + """ + + _validation = { + 's3_linked_service_name': {'required': True}, + 'bucket_name': {'required': True}, + } + + _attribute_map = { + 's3_linked_service_name': {'key': 's3LinkedServiceName', 'type': 'LinkedServiceReference'}, + 'bucket_name': {'key': 'bucketName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(RedshiftUnloadSettings, self).__init__(**kwargs) + self.s3_linked_service_name = kwargs.get('s3_linked_service_name', None) + self.bucket_name = kwargs.get('bucket_name', None) + + +class RelationalSource(CopySource): + """A copy activity source for various relational databases. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: Database query. Type: string (or Expression with resultType + string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(RelationalSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'RelationalSource' + + +class RelationalTableDataset(Dataset): + """The relational table dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The relational table name. Type: string (or Expression + with resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(RelationalTableDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.type = 'RelationalTable' + + +class RerunTriggerResource(SubResource): + """RerunTrigger resource type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar etag: Etag identifies change in the resource. + :vartype etag: str + :param properties: Required. Properties of the rerun trigger. + :type properties: + ~azure.mgmt.datafactory.models.RerunTumblingWindowTrigger + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'RerunTumblingWindowTrigger'}, + } + + def __init__(self, **kwargs): + super(RerunTriggerResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class RerunTumblingWindowTrigger(Trigger): + """Trigger that schedules pipeline reruns for all fixed time interval windows + from a requested start time to requested end time. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Trigger description. + :type description: str + :ivar runtime_state: Indicates if trigger is running or not. Updated when + Start/Stop APIs are called on the Trigger. Possible values include: + 'Started', 'Stopped', 'Disabled' + :vartype runtime_state: str or + ~azure.mgmt.datafactory.models.TriggerRuntimeState + :param annotations: List of tags that can be used for describing the + trigger. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param parent_trigger: The parent trigger reference. + :type parent_trigger: object + :param requested_start_time: Required. The start time for the time period + for which restatement is initiated. Only UTC time is currently supported. + :type requested_start_time: datetime + :param requested_end_time: Required. The end time for the time period for + which restatement is initiated. Only UTC time is currently supported. + :type requested_end_time: datetime + :param max_concurrency: Required. The max number of parallel time windows + (ready for execution) for which a rerun is triggered. + :type max_concurrency: int + """ + + _validation = { + 'runtime_state': {'readonly': True}, + 'type': {'required': True}, + 'requested_start_time': {'required': True}, + 'requested_end_time': {'required': True}, + 'max_concurrency': {'required': True, 'maximum': 50, 'minimum': 1}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'runtime_state': {'key': 'runtimeState', 'type': 'str'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'parent_trigger': {'key': 'typeProperties.parentTrigger', 'type': 'object'}, + 'requested_start_time': {'key': 'typeProperties.requestedStartTime', 'type': 'iso-8601'}, + 'requested_end_time': {'key': 'typeProperties.requestedEndTime', 'type': 'iso-8601'}, + 'max_concurrency': {'key': 'typeProperties.maxConcurrency', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RerunTumblingWindowTrigger, self).__init__(**kwargs) + self.parent_trigger = kwargs.get('parent_trigger', None) + self.requested_start_time = kwargs.get('requested_start_time', None) + self.requested_end_time = kwargs.get('requested_end_time', None) + self.max_concurrency = kwargs.get('max_concurrency', None) + self.type = 'RerunTumblingWindowTrigger' + + +class RerunTumblingWindowTriggerActionParameters(Model): + """Rerun tumbling window trigger Parameters. + + All required parameters must be populated in order to send to Azure. + + :param start_time: Required. The start time for the time period for which + restatement is initiated. Only UTC time is currently supported. + :type start_time: datetime + :param end_time: Required. The end time for the time period for which + restatement is initiated. Only UTC time is currently supported. + :type end_time: datetime + :param max_concurrency: Required. The max number of parallel time windows + (ready for execution) for which a rerun is triggered. + :type max_concurrency: int + """ + + _validation = { + 'start_time': {'required': True}, + 'end_time': {'required': True}, + 'max_concurrency': {'required': True, 'maximum': 50, 'minimum': 1}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'max_concurrency': {'key': 'maxConcurrency', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RerunTumblingWindowTriggerActionParameters, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.max_concurrency = kwargs.get('max_concurrency', None) + + +class ResponsysLinkedService(LinkedService): + """Responsys linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param endpoint: Required. The endpoint of the Responsys server. + :type endpoint: object + :param client_id: Required. The client ID associated with the Responsys + application. Type: string (or Expression with resultType string). + :type client_id: object + :param client_secret: The client secret associated with the Responsys + application. Type: string (or Expression with resultType string). + :type client_secret: ~azure.mgmt.datafactory.models.SecretBase + :param use_encrypted_endpoints: Specifies whether the data source + endpoints are encrypted using HTTPS. The default value is true. Type: + boolean (or Expression with resultType boolean). + :type use_encrypted_endpoints: object + :param use_host_verification: Specifies whether to require the host name + in the server's certificate to match the host name of the server when + connecting over SSL. The default value is true. Type: boolean (or + Expression with resultType boolean). + :type use_host_verification: object + :param use_peer_verification: Specifies whether to verify the identity of + the server when connecting over SSL. The default value is true. Type: + boolean (or Expression with resultType boolean). + :type use_peer_verification: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'endpoint': {'required': True}, + 'client_id': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'endpoint': {'key': 'typeProperties.endpoint', 'type': 'object'}, + 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, + 'client_secret': {'key': 'typeProperties.clientSecret', 'type': 'SecretBase'}, + 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, + 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, + 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ResponsysLinkedService, self).__init__(**kwargs) + self.endpoint = kwargs.get('endpoint', None) + self.client_id = kwargs.get('client_id', None) + self.client_secret = kwargs.get('client_secret', None) + self.use_encrypted_endpoints = kwargs.get('use_encrypted_endpoints', None) + self.use_host_verification = kwargs.get('use_host_verification', None) + self.use_peer_verification = kwargs.get('use_peer_verification', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'Responsys' + + +class ResponsysObjectDataset(Dataset): + """Responsys dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ResponsysObjectDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.type = 'ResponsysObject' + + +class ResponsysSource(CopySource): + """A copy activity Responsys source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ResponsysSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'ResponsysSource' + + +class RestResourceDataset(Dataset): + """A Rest service dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param relative_url: The relative URL to the resource that the RESTful API + provides. Type: string (or Expression with resultType string). + :type relative_url: object + :param request_method: The HTTP method used to call the RESTful API. The + default is GET. Type: string (or Expression with resultType string). + :type request_method: object + :param request_body: The HTTP request body to the RESTful API if + requestMethod is POST. Type: string (or Expression with resultType + string). + :type request_body: object + :param additional_headers: The additional HTTP headers in the request to + the RESTful API. Type: string (or Expression with resultType string). + :type additional_headers: object + :param pagination_rules: The pagination rules to compose next page + requests. Type: string (or Expression with resultType string). + :type pagination_rules: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'relative_url': {'key': 'typeProperties.relativeUrl', 'type': 'object'}, + 'request_method': {'key': 'typeProperties.requestMethod', 'type': 'object'}, + 'request_body': {'key': 'typeProperties.requestBody', 'type': 'object'}, + 'additional_headers': {'key': 'typeProperties.additionalHeaders', 'type': 'object'}, + 'pagination_rules': {'key': 'typeProperties.paginationRules', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(RestResourceDataset, self).__init__(**kwargs) + self.relative_url = kwargs.get('relative_url', None) + self.request_method = kwargs.get('request_method', None) + self.request_body = kwargs.get('request_body', None) + self.additional_headers = kwargs.get('additional_headers', None) + self.pagination_rules = kwargs.get('pagination_rules', None) + self.type = 'RestResource' + + +class RestServiceLinkedService(LinkedService): + """Rest Service linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param url: Required. The base URL of the REST service. + :type url: object + :param enable_server_certificate_validation: Whether to validate server + side SSL certificate when connecting to the endpoint.The default value is + true. Type: boolean (or Expression with resultType boolean). + :type enable_server_certificate_validation: object + :param authentication_type: Required. Type of authentication used to + connect to the REST service. Possible values include: 'Anonymous', + 'Basic', 'AadServicePrincipal', 'ManagedServiceIdentity' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.RestServiceAuthenticationType + :param user_name: The user name used in Basic authentication type. + :type user_name: object + :param password: The password used in Basic authentication type. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param service_principal_id: The application's client ID used in + AadServicePrincipal authentication type. + :type service_principal_id: object + :param service_principal_key: The application's key used in + AadServicePrincipal authentication type. + :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase + :param tenant: The tenant information (domain name or tenant ID) used in + AadServicePrincipal authentication type under which your application + resides. + :type tenant: object + :param aad_resource_id: The resource you are requesting authorization to + use. + :type aad_resource_id: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'url': {'required': True}, + 'authentication_type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'url': {'key': 'typeProperties.url', 'type': 'object'}, + 'enable_server_certificate_validation': {'key': 'typeProperties.enableServerCertificateValidation', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, + 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, + 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, + 'aad_resource_id': {'key': 'typeProperties.aadResourceId', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(RestServiceLinkedService, self).__init__(**kwargs) + self.url = kwargs.get('url', None) + self.enable_server_certificate_validation = kwargs.get('enable_server_certificate_validation', None) + self.authentication_type = kwargs.get('authentication_type', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.service_principal_id = kwargs.get('service_principal_id', None) + self.service_principal_key = kwargs.get('service_principal_key', None) + self.tenant = kwargs.get('tenant', None) + self.aad_resource_id = kwargs.get('aad_resource_id', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'RestService' + + +class RestSource(CopySource): + """A copy activity Rest service source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param request_method: The HTTP method used to call the RESTful API. The + default is GET. Type: string (or Expression with resultType string). + :type request_method: object + :param request_body: The HTTP request body to the RESTful API if + requestMethod is POST. Type: string (or Expression with resultType + string). + :type request_body: object + :param additional_headers: The additional HTTP headers in the request to + the RESTful API. Type: string (or Expression with resultType string). + :type additional_headers: object + :param pagination_rules: The pagination rules to compose next page + requests. Type: string (or Expression with resultType string). + :type pagination_rules: object + :param http_request_timeout: The timeout (TimeSpan) to get an HTTP + response. It is the timeout to get a response, not the timeout to read + response data. Default value: 00:01:40. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type http_request_timeout: object + :param request_interval: The time to await before sending next page + request. + :type request_interval: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'request_method': {'key': 'requestMethod', 'type': 'object'}, + 'request_body': {'key': 'requestBody', 'type': 'object'}, + 'additional_headers': {'key': 'additionalHeaders', 'type': 'object'}, + 'pagination_rules': {'key': 'paginationRules', 'type': 'object'}, + 'http_request_timeout': {'key': 'httpRequestTimeout', 'type': 'object'}, + 'request_interval': {'key': 'requestInterval', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(RestSource, self).__init__(**kwargs) + self.request_method = kwargs.get('request_method', None) + self.request_body = kwargs.get('request_body', None) + self.additional_headers = kwargs.get('additional_headers', None) + self.pagination_rules = kwargs.get('pagination_rules', None) + self.http_request_timeout = kwargs.get('http_request_timeout', None) + self.request_interval = kwargs.get('request_interval', None) + self.type = 'RestSource' + + +class RetryPolicy(Model): + """Execution policy for an activity. + + :param count: Maximum ordinary retry attempts. Default is 0. Type: integer + (or Expression with resultType integer), minimum: 0. + :type count: object + :param interval_in_seconds: Interval between retries in seconds. Default + is 30. + :type interval_in_seconds: int + """ + + _validation = { + 'interval_in_seconds': {'maximum': 86400, 'minimum': 30}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'object'}, + 'interval_in_seconds': {'key': 'intervalInSeconds', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RetryPolicy, self).__init__(**kwargs) + self.count = kwargs.get('count', None) + self.interval_in_seconds = kwargs.get('interval_in_seconds', None) + + +class RunFilterParameters(Model): + """Query parameters for listing runs. + + All required parameters must be populated in order to send to Azure. + + :param continuation_token: The continuation token for getting the next + page of results. Null for first page. + :type continuation_token: str + :param last_updated_after: Required. The time at or after which the run + event was updated in 'ISO 8601' format. + :type last_updated_after: datetime + :param last_updated_before: Required. The time at or before which the run + event was updated in 'ISO 8601' format. + :type last_updated_before: datetime + :param filters: List of filters. + :type filters: list[~azure.mgmt.datafactory.models.RunQueryFilter] + :param order_by: List of OrderBy option. + :type order_by: list[~azure.mgmt.datafactory.models.RunQueryOrderBy] + """ + + _validation = { + 'last_updated_after': {'required': True}, + 'last_updated_before': {'required': True}, + } + + _attribute_map = { + 'continuation_token': {'key': 'continuationToken', 'type': 'str'}, + 'last_updated_after': {'key': 'lastUpdatedAfter', 'type': 'iso-8601'}, + 'last_updated_before': {'key': 'lastUpdatedBefore', 'type': 'iso-8601'}, + 'filters': {'key': 'filters', 'type': '[RunQueryFilter]'}, + 'order_by': {'key': 'orderBy', 'type': '[RunQueryOrderBy]'}, + } + + def __init__(self, **kwargs): + super(RunFilterParameters, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.last_updated_after = kwargs.get('last_updated_after', None) + self.last_updated_before = kwargs.get('last_updated_before', None) + self.filters = kwargs.get('filters', None) + self.order_by = kwargs.get('order_by', None) + + +class RunQueryFilter(Model): + """Query filter option for listing runs. + + All required parameters must be populated in order to send to Azure. + + :param operand: Required. Parameter name to be used for filter. The + allowed operands to query pipeline runs are PipelineName, RunStart, RunEnd + and Status; to query activity runs are ActivityName, ActivityRunStart, + ActivityRunEnd, ActivityType and Status, and to query trigger runs are + TriggerName, TriggerRunTimestamp and Status. Possible values include: + 'PipelineName', 'Status', 'RunStart', 'RunEnd', 'ActivityName', + 'ActivityRunStart', 'ActivityRunEnd', 'ActivityType', 'TriggerName', + 'TriggerRunTimestamp', 'RunGroupId', 'LatestOnly' + :type operand: str or ~azure.mgmt.datafactory.models.RunQueryFilterOperand + :param operator: Required. Operator to be used for filter. Possible values + include: 'Equals', 'NotEquals', 'In', 'NotIn' + :type operator: str or + ~azure.mgmt.datafactory.models.RunQueryFilterOperator + :param values: Required. List of filter values. + :type values: list[str] + """ + + _validation = { + 'operand': {'required': True}, + 'operator': {'required': True}, + 'values': {'required': True}, + } + + _attribute_map = { + 'operand': {'key': 'operand', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(RunQueryFilter, self).__init__(**kwargs) + self.operand = kwargs.get('operand', None) + self.operator = kwargs.get('operator', None) + self.values = kwargs.get('values', None) + + +class RunQueryOrderBy(Model): + """An object to provide order by options for listing runs. + + All required parameters must be populated in order to send to Azure. + + :param order_by: Required. Parameter name to be used for order by. The + allowed parameters to order by for pipeline runs are PipelineName, + RunStart, RunEnd and Status; for activity runs are ActivityName, + ActivityRunStart, ActivityRunEnd and Status; for trigger runs are + TriggerName, TriggerRunTimestamp and Status. Possible values include: + 'RunStart', 'RunEnd', 'PipelineName', 'Status', 'ActivityName', + 'ActivityRunStart', 'ActivityRunEnd', 'TriggerName', 'TriggerRunTimestamp' + :type order_by: str or ~azure.mgmt.datafactory.models.RunQueryOrderByField + :param order: Required. Sorting order of the parameter. Possible values + include: 'ASC', 'DESC' + :type order: str or ~azure.mgmt.datafactory.models.RunQueryOrder + """ + + _validation = { + 'order_by': {'required': True}, + 'order': {'required': True}, + } + + _attribute_map = { + 'order_by': {'key': 'orderBy', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RunQueryOrderBy, self).__init__(**kwargs) + self.order_by = kwargs.get('order_by', None) + self.order = kwargs.get('order', None) + + +class SalesforceLinkedService(LinkedService): + """Linked service for Salesforce. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param environment_url: The URL of Salesforce instance. Default is + 'https://login.salesforce.com'. To copy data from sandbox, specify + 'https://test.salesforce.com'. To copy data from custom domain, specify, + for example, 'https://[domain].my.salesforce.com'. Type: string (or + Expression with resultType string). + :type environment_url: object + :param username: The username for Basic authentication of the Salesforce + instance. Type: string (or Expression with resultType string). + :type username: object + :param password: The password for Basic authentication of the Salesforce + instance. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param security_token: The security token is required to remotely access + Salesforce instance. + :type security_token: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'environment_url': {'key': 'typeProperties.environmentUrl', 'type': 'object'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'security_token': {'key': 'typeProperties.securityToken', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SalesforceLinkedService, self).__init__(**kwargs) + self.environment_url = kwargs.get('environment_url', None) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + self.security_token = kwargs.get('security_token', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'Salesforce' + + +class SalesforceMarketingCloudLinkedService(LinkedService): + """Salesforce Marketing Cloud linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param client_id: Required. The client ID associated with the Salesforce + Marketing Cloud application. Type: string (or Expression with resultType + string). + :type client_id: object + :param client_secret: The client secret associated with the Salesforce + Marketing Cloud application. Type: string (or Expression with resultType + string). + :type client_secret: ~azure.mgmt.datafactory.models.SecretBase + :param use_encrypted_endpoints: Specifies whether the data source + endpoints are encrypted using HTTPS. The default value is true. Type: + boolean (or Expression with resultType boolean). + :type use_encrypted_endpoints: object + :param use_host_verification: Specifies whether to require the host name + in the server's certificate to match the host name of the server when + connecting over SSL. The default value is true. Type: boolean (or + Expression with resultType boolean). + :type use_host_verification: object + :param use_peer_verification: Specifies whether to verify the identity of + the server when connecting over SSL. The default value is true. Type: + boolean (or Expression with resultType boolean). + :type use_peer_verification: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'client_id': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, + 'client_secret': {'key': 'typeProperties.clientSecret', 'type': 'SecretBase'}, + 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, + 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, + 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SalesforceMarketingCloudLinkedService, self).__init__(**kwargs) + self.client_id = kwargs.get('client_id', None) + self.client_secret = kwargs.get('client_secret', None) + self.use_encrypted_endpoints = kwargs.get('use_encrypted_endpoints', None) + self.use_host_verification = kwargs.get('use_host_verification', None) + self.use_peer_verification = kwargs.get('use_peer_verification', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'SalesforceMarketingCloud' + + +class SalesforceMarketingCloudObjectDataset(Dataset): + """Salesforce Marketing Cloud dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SalesforceMarketingCloudObjectDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.type = 'SalesforceMarketingCloudObject' + + +class SalesforceMarketingCloudSource(CopySource): + """A copy activity Salesforce Marketing Cloud source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SalesforceMarketingCloudSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'SalesforceMarketingCloudSource' + + +class SalesforceObjectDataset(Dataset): + """The Salesforce object dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param object_api_name: The Salesforce object API name. Type: string (or + Expression with resultType string). + :type object_api_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'object_api_name': {'key': 'typeProperties.objectApiName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SalesforceObjectDataset, self).__init__(**kwargs) + self.object_api_name = kwargs.get('object_api_name', None) + self.type = 'SalesforceObject' + + +class SalesforceServiceCloudLinkedService(LinkedService): + """Linked service for Salesforce Service Cloud. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param environment_url: The URL of Salesforce Service Cloud instance. + Default is 'https://login.salesforce.com'. To copy data from sandbox, + specify 'https://test.salesforce.com'. To copy data from custom domain, + specify, for example, 'https://[domain].my.salesforce.com'. Type: string + (or Expression with resultType string). + :type environment_url: object + :param username: The username for Basic authentication of the Salesforce + instance. Type: string (or Expression with resultType string). + :type username: object + :param password: The password for Basic authentication of the Salesforce + instance. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param security_token: The security token is required to remotely access + Salesforce instance. + :type security_token: ~azure.mgmt.datafactory.models.SecretBase + :param extended_properties: Extended properties appended to the connection + string. Type: string (or Expression with resultType string). + :type extended_properties: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'environment_url': {'key': 'typeProperties.environmentUrl', 'type': 'object'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'security_token': {'key': 'typeProperties.securityToken', 'type': 'SecretBase'}, + 'extended_properties': {'key': 'typeProperties.extendedProperties', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SalesforceServiceCloudLinkedService, self).__init__(**kwargs) + self.environment_url = kwargs.get('environment_url', None) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + self.security_token = kwargs.get('security_token', None) + self.extended_properties = kwargs.get('extended_properties', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'SalesforceServiceCloud' + + +class SalesforceServiceCloudObjectDataset(Dataset): + """The Salesforce Service Cloud object dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param object_api_name: The Salesforce Service Cloud object API name. + Type: string (or Expression with resultType string). + :type object_api_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'object_api_name': {'key': 'typeProperties.objectApiName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SalesforceServiceCloudObjectDataset, self).__init__(**kwargs) + self.object_api_name = kwargs.get('object_api_name', None) + self.type = 'SalesforceServiceCloudObject' + + +class SalesforceServiceCloudSink(CopySink): + """A copy activity Salesforce Service Cloud sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param write_behavior: The write behavior for the operation. Default is + Insert. Possible values include: 'Insert', 'Upsert' + :type write_behavior: str or + ~azure.mgmt.datafactory.models.SalesforceSinkWriteBehavior + :param external_id_field_name: The name of the external ID field for + upsert operation. Default value is 'Id' column. Type: string (or + Expression with resultType string). + :type external_id_field_name: object + :param ignore_null_values: The flag indicating whether or not to ignore + null values from input dataset (except key fields) during write operation. + Default value is false. If set it to true, it means ADF will leave the + data in the destination object unchanged when doing upsert/update + operation and insert defined default value when doing insert operation, + versus ADF will update the data in the destination object to NULL when + doing upsert/update operation and insert NULL value when doing insert + operation. Type: boolean (or Expression with resultType boolean). + :type ignore_null_values: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'write_behavior': {'key': 'writeBehavior', 'type': 'str'}, + 'external_id_field_name': {'key': 'externalIdFieldName', 'type': 'object'}, + 'ignore_null_values': {'key': 'ignoreNullValues', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SalesforceServiceCloudSink, self).__init__(**kwargs) + self.write_behavior = kwargs.get('write_behavior', None) + self.external_id_field_name = kwargs.get('external_id_field_name', None) + self.ignore_null_values = kwargs.get('ignore_null_values', None) + self.type = 'SalesforceServiceCloudSink' + + +class SalesforceServiceCloudSource(CopySource): + """A copy activity Salesforce Service Cloud source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: Database query. Type: string (or Expression with resultType + string). + :type query: object + :param read_behavior: The read behavior for the operation. Default is + Query. Possible values include: 'Query', 'QueryAll' + :type read_behavior: str or + ~azure.mgmt.datafactory.models.SalesforceSourceReadBehavior + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + 'read_behavior': {'key': 'readBehavior', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SalesforceServiceCloudSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.read_behavior = kwargs.get('read_behavior', None) + self.type = 'SalesforceServiceCloudSource' + + +class SalesforceSink(CopySink): + """A copy activity Salesforce sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param write_behavior: The write behavior for the operation. Default is + Insert. Possible values include: 'Insert', 'Upsert' + :type write_behavior: str or + ~azure.mgmt.datafactory.models.SalesforceSinkWriteBehavior + :param external_id_field_name: The name of the external ID field for + upsert operation. Default value is 'Id' column. Type: string (or + Expression with resultType string). + :type external_id_field_name: object + :param ignore_null_values: The flag indicating whether or not to ignore + null values from input dataset (except key fields) during write operation. + Default value is false. If set it to true, it means ADF will leave the + data in the destination object unchanged when doing upsert/update + operation and insert defined default value when doing insert operation, + versus ADF will update the data in the destination object to NULL when + doing upsert/update operation and insert NULL value when doing insert + operation. Type: boolean (or Expression with resultType boolean). + :type ignore_null_values: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'write_behavior': {'key': 'writeBehavior', 'type': 'str'}, + 'external_id_field_name': {'key': 'externalIdFieldName', 'type': 'object'}, + 'ignore_null_values': {'key': 'ignoreNullValues', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SalesforceSink, self).__init__(**kwargs) + self.write_behavior = kwargs.get('write_behavior', None) + self.external_id_field_name = kwargs.get('external_id_field_name', None) + self.ignore_null_values = kwargs.get('ignore_null_values', None) + self.type = 'SalesforceSink' + + +class SalesforceSource(CopySource): + """A copy activity Salesforce source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: Database query. Type: string (or Expression with resultType + string). + :type query: object + :param read_behavior: The read behavior for the operation. Default is + Query. Possible values include: 'Query', 'QueryAll' + :type read_behavior: str or + ~azure.mgmt.datafactory.models.SalesforceSourceReadBehavior + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + 'read_behavior': {'key': 'readBehavior', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SalesforceSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.read_behavior = kwargs.get('read_behavior', None) + self.type = 'SalesforceSource' + + +class SapBwCubeDataset(Dataset): + """The SAP BW cube dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SapBwCubeDataset, self).__init__(**kwargs) + self.type = 'SapBwCube' + + +class SapBWLinkedService(LinkedService): + """SAP Business Warehouse Linked Service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param server: Required. Host name of the SAP BW instance. Type: string + (or Expression with resultType string). + :type server: object + :param system_number: Required. System number of the BW system. (Usually a + two-digit decimal number represented as a string.) Type: string (or + Expression with resultType string). + :type system_number: object + :param client_id: Required. Client ID of the client on the BW system. + (Usually a three-digit decimal number represented as a string) Type: + string (or Expression with resultType string). + :type client_id: object + :param user_name: Username to access the SAP BW server. Type: string (or + Expression with resultType string). + :type user_name: object + :param password: Password to access the SAP BW server. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'server': {'required': True}, + 'system_number': {'required': True}, + 'client_id': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server': {'key': 'typeProperties.server', 'type': 'object'}, + 'system_number': {'key': 'typeProperties.systemNumber', 'type': 'object'}, + 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, + 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SapBWLinkedService, self).__init__(**kwargs) + self.server = kwargs.get('server', None) + self.system_number = kwargs.get('system_number', None) + self.client_id = kwargs.get('client_id', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'SapBW' + + +class SapBwSource(CopySource): + """A copy activity source for SapBW server via MDX. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: MDX query. Type: string (or Expression with resultType + string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SapBwSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'SapBwSource' + + +class SapCloudForCustomerLinkedService(LinkedService): + """Linked service for SAP Cloud for Customer. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param url: Required. The URL of SAP Cloud for Customer OData API. For + example, '[https://[tenantname].crm.ondemand.com/sap/c4c/odata/v1]'. Type: + string (or Expression with resultType string). + :type url: object + :param username: The username for Basic authentication. Type: string (or + Expression with resultType string). + :type username: object + :param password: The password for Basic authentication. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Either encryptedCredential or username/password must + be provided. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'url': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'url': {'key': 'typeProperties.url', 'type': 'object'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SapCloudForCustomerLinkedService, self).__init__(**kwargs) + self.url = kwargs.get('url', None) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'SapCloudForCustomer' + + +class SapCloudForCustomerResourceDataset(Dataset): + """The path of the SAP Cloud for Customer OData entity. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param path: Required. The path of the SAP Cloud for Customer OData + entity. Type: string (or Expression with resultType string). + :type path: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + 'path': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'path': {'key': 'typeProperties.path', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SapCloudForCustomerResourceDataset, self).__init__(**kwargs) + self.path = kwargs.get('path', None) + self.type = 'SapCloudForCustomerResource' + + +class SapCloudForCustomerSink(CopySink): + """A copy activity SAP Cloud for Customer sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param write_behavior: The write behavior for the operation. Default is + 'Insert'. Possible values include: 'Insert', 'Update' + :type write_behavior: str or + ~azure.mgmt.datafactory.models.SapCloudForCustomerSinkWriteBehavior + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'write_behavior': {'key': 'writeBehavior', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SapCloudForCustomerSink, self).__init__(**kwargs) + self.write_behavior = kwargs.get('write_behavior', None) + self.type = 'SapCloudForCustomerSink' + + +class SapCloudForCustomerSource(CopySource): + """A copy activity source for SAP Cloud for Customer source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: SAP Cloud for Customer OData query. For example, "$top=1". + Type: string (or Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SapCloudForCustomerSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'SapCloudForCustomerSource' + + +class SapEccLinkedService(LinkedService): + """Linked service for SAP ERP Central Component(SAP ECC). + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param url: Required. The URL of SAP ECC OData API. For example, + '[https://hostname:port/sap/opu/odata/sap/servicename/]'. Type: string (or + Expression with resultType string). + :type url: str + :param username: The username for Basic authentication. Type: string (or + Expression with resultType string). + :type username: str + :param password: The password for Basic authentication. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Either encryptedCredential or username/password must + be provided. Type: string (or Expression with resultType string). + :type encrypted_credential: str + """ + + _validation = { + 'type': {'required': True}, + 'url': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'url': {'key': 'typeProperties.url', 'type': 'str'}, + 'username': {'key': 'typeProperties.username', 'type': 'str'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SapEccLinkedService, self).__init__(**kwargs) + self.url = kwargs.get('url', None) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'SapEcc' + + +class SapEccResourceDataset(Dataset): + """The path of the SAP ECC OData entity. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param path: Required. The path of the SAP ECC OData entity. Type: string + (or Expression with resultType string). + :type path: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + 'path': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'path': {'key': 'typeProperties.path', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SapEccResourceDataset, self).__init__(**kwargs) + self.path = kwargs.get('path', None) + self.type = 'SapEccResource' + + +class SapEccSource(CopySource): + """A copy activity source for SAP ECC source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: SAP ECC OData query. For example, "$top=1". Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SapEccSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'SapEccSource' + + +class SapHanaLinkedService(LinkedService): + """SAP HANA Linked Service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: SAP HANA ODBC connection string. Type: string, + SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param server: Required. Host name of the SAP HANA server. Type: string + (or Expression with resultType string). + :type server: object + :param authentication_type: The authentication type to be used to connect + to the SAP HANA server. Possible values include: 'Basic', 'Windows' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.SapHanaAuthenticationType + :param user_name: Username to access the SAP HANA server. Type: string (or + Expression with resultType string). + :type user_name: object + :param password: Password to access the SAP HANA server. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'server': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'server': {'key': 'typeProperties.server', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SapHanaLinkedService, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.server = kwargs.get('server', None) + self.authentication_type = kwargs.get('authentication_type', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'SapHana' + + +class SapHanaSource(CopySource): + """A copy activity source for SAP HANA source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: SAP HANA Sql query. Type: string (or Expression with + resultType string). + :type query: object + :param packet_size: The packet size of data read from SAP HANA. Type: + integer(or Expression with resultType integer). + :type packet_size: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + 'packet_size': {'key': 'packetSize', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SapHanaSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.packet_size = kwargs.get('packet_size', None) + self.type = 'SapHanaSource' + + +class SapHanaTableDataset(Dataset): + """SAP HANA Table properties. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param sap_hana_table_dataset_schema: The schema name of SAP HANA. Type: + string (or Expression with resultType string). + :type sap_hana_table_dataset_schema: object + :param table: The table name of SAP HANA. Type: string (or Expression with + resultType string). + :type table: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sap_hana_table_dataset_schema': {'key': 'typeProperties.schema', 'type': 'object'}, + 'table': {'key': 'typeProperties.table', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SapHanaTableDataset, self).__init__(**kwargs) + self.sap_hana_table_dataset_schema = kwargs.get('sap_hana_table_dataset_schema', None) + self.table = kwargs.get('table', None) + self.type = 'SapHanaTable' + + +class SapOpenHubLinkedService(LinkedService): + """SAP Business Warehouse Open Hub Destination Linked Service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param server: Required. Host name of the SAP BW instance where the open + hub destination is located. Type: string (or Expression with resultType + string). + :type server: object + :param system_number: Required. System number of the BW system where the + open hub destination is located. (Usually a two-digit decimal number + represented as a string.) Type: string (or Expression with resultType + string). + :type system_number: object + :param client_id: Required. Client ID of the client on the BW system where + the open hub destination is located. (Usually a three-digit decimal number + represented as a string) Type: string (or Expression with resultType + string). + :type client_id: object + :param language: Language of the BW system where the open hub destination + is located. The default value is EN. Type: string (or Expression with + resultType string). + :type language: object + :param user_name: Username to access the SAP BW server where the open hub + destination is located. Type: string (or Expression with resultType + string). + :type user_name: object + :param password: Password to access the SAP BW server where the open hub + destination is located. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'server': {'required': True}, + 'system_number': {'required': True}, + 'client_id': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server': {'key': 'typeProperties.server', 'type': 'object'}, + 'system_number': {'key': 'typeProperties.systemNumber', 'type': 'object'}, + 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, + 'language': {'key': 'typeProperties.language', 'type': 'object'}, + 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SapOpenHubLinkedService, self).__init__(**kwargs) + self.server = kwargs.get('server', None) + self.system_number = kwargs.get('system_number', None) + self.client_id = kwargs.get('client_id', None) + self.language = kwargs.get('language', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'SapOpenHub' + + +class SapOpenHubSource(CopySource): + """A copy activity source for SAP Business Warehouse Open Hub Destination + source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param exclude_last_request: Whether to exclude the records of the last + request. The default value is true. Type: boolean (or Expression with + resultType boolean). + :type exclude_last_request: object + :param base_request_id: The ID of request for delta loading. Once it is + set, only data with requestId larger than the value of this property will + be retrieved. The default value is 0. Type: integer (or Expression with + resultType integer ). + :type base_request_id: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'exclude_last_request': {'key': 'excludeLastRequest', 'type': 'object'}, + 'base_request_id': {'key': 'baseRequestId', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SapOpenHubSource, self).__init__(**kwargs) + self.exclude_last_request = kwargs.get('exclude_last_request', None) + self.base_request_id = kwargs.get('base_request_id', None) + self.type = 'SapOpenHubSource' + + +class SapOpenHubTableDataset(Dataset): + """Sap Business Warehouse Open Hub Destination Table properties. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param open_hub_destination_name: Required. The name of the Open Hub + Destination with destination type as Database Table. Type: string (or + Expression with resultType string). + :type open_hub_destination_name: object + :param exclude_last_request: Whether to exclude the records of the last + request. The default value is true. Type: boolean (or Expression with + resultType boolean). + :type exclude_last_request: object + :param base_request_id: The ID of request for delta loading. Once it is + set, only data with requestId larger than the value of this property will + be retrieved. The default value is 0. Type: integer (or Expression with + resultType integer ). + :type base_request_id: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + 'open_hub_destination_name': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'open_hub_destination_name': {'key': 'typeProperties.openHubDestinationName', 'type': 'object'}, + 'exclude_last_request': {'key': 'typeProperties.excludeLastRequest', 'type': 'object'}, + 'base_request_id': {'key': 'typeProperties.baseRequestId', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SapOpenHubTableDataset, self).__init__(**kwargs) + self.open_hub_destination_name = kwargs.get('open_hub_destination_name', None) + self.exclude_last_request = kwargs.get('exclude_last_request', None) + self.base_request_id = kwargs.get('base_request_id', None) + self.type = 'SapOpenHubTable' + + +class SapTableLinkedService(LinkedService): + """SAP Table Linked Service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param server: Host name of the SAP instance where the table is located. + Type: string (or Expression with resultType string). + :type server: object + :param system_number: System number of the SAP system where the table is + located. (Usually a two-digit decimal number represented as a string.) + Type: string (or Expression with resultType string). + :type system_number: object + :param client_id: Client ID of the client on the SAP system where the + table is located. (Usually a three-digit decimal number represented as a + string) Type: string (or Expression with resultType string). + :type client_id: object + :param language: Language of the SAP system where the table is located. + The default value is EN. Type: string (or Expression with resultType + string). + :type language: object + :param system_id: SystemID of the SAP system where the table is located. + Type: string (or Expression with resultType string). + :type system_id: object + :param user_name: Username to access the SAP server where the table is + located. Type: string (or Expression with resultType string). + :type user_name: object + :param password: Password to access the SAP server where the table is + located. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param message_server: The hostname of the SAP Message Server. Type: + string (or Expression with resultType string). + :type message_server: object + :param message_server_service: The service name or port number of the + Message Server. Type: string (or Expression with resultType string). + :type message_server_service: object + :param snc_mode: SNC activation indicator to access the SAP server where + the table is located. Must be either 0 (off) or 1 (on). Type: string (or + Expression with resultType string). + :type snc_mode: object + :param snc_my_name: Initiator's SNC name to access the SAP server where + the table is located. Type: string (or Expression with resultType string). + :type snc_my_name: object + :param snc_partner_name: Communication partner's SNC name to access the + SAP server where the table is located. Type: string (or Expression with + resultType string). + :type snc_partner_name: object + :param snc_library_path: External security product's library to access the + SAP server where the table is located. Type: string (or Expression with + resultType string). + :type snc_library_path: object + :param snc_qop: SNC Quality of Protection. Allowed value include: 1, 2, 3, + 8, 9. Type: string (or Expression with resultType string). + :type snc_qop: object + :param logon_group: The Logon Group for the SAP System. Type: string (or + Expression with resultType string). + :type logon_group: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server': {'key': 'typeProperties.server', 'type': 'object'}, + 'system_number': {'key': 'typeProperties.systemNumber', 'type': 'object'}, + 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, + 'language': {'key': 'typeProperties.language', 'type': 'object'}, + 'system_id': {'key': 'typeProperties.systemId', 'type': 'object'}, + 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'message_server': {'key': 'typeProperties.messageServer', 'type': 'object'}, + 'message_server_service': {'key': 'typeProperties.messageServerService', 'type': 'object'}, + 'snc_mode': {'key': 'typeProperties.sncMode', 'type': 'object'}, + 'snc_my_name': {'key': 'typeProperties.sncMyName', 'type': 'object'}, + 'snc_partner_name': {'key': 'typeProperties.sncPartnerName', 'type': 'object'}, + 'snc_library_path': {'key': 'typeProperties.sncLibraryPath', 'type': 'object'}, + 'snc_qop': {'key': 'typeProperties.sncQop', 'type': 'object'}, + 'logon_group': {'key': 'typeProperties.logonGroup', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SapTableLinkedService, self).__init__(**kwargs) + self.server = kwargs.get('server', None) + self.system_number = kwargs.get('system_number', None) + self.client_id = kwargs.get('client_id', None) + self.language = kwargs.get('language', None) + self.system_id = kwargs.get('system_id', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.message_server = kwargs.get('message_server', None) + self.message_server_service = kwargs.get('message_server_service', None) + self.snc_mode = kwargs.get('snc_mode', None) + self.snc_my_name = kwargs.get('snc_my_name', None) + self.snc_partner_name = kwargs.get('snc_partner_name', None) + self.snc_library_path = kwargs.get('snc_library_path', None) + self.snc_qop = kwargs.get('snc_qop', None) + self.logon_group = kwargs.get('logon_group', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'SapTable' + + +class SapTablePartitionSettings(Model): + """The settings that will be leveraged for SAP table source partitioning. + + :param partition_column_name: The name of the column that will be used for + proceeding range partitioning. Type: string (or Expression with resultType + string). + :type partition_column_name: object + :param partition_upper_bound: The maximum value of column specified in + partitionColumnName that will be used for proceeding range partitioning. + Type: string (or Expression with resultType string). + :type partition_upper_bound: object + :param partition_lower_bound: The minimum value of column specified in + partitionColumnName that will be used for proceeding range partitioning. + Type: string (or Expression with resultType string). + :type partition_lower_bound: object + :param max_partitions_number: The maximum value of partitions the table + will be split into. Type: integer (or Expression with resultType string). + :type max_partitions_number: object + """ + + _attribute_map = { + 'partition_column_name': {'key': 'partitionColumnName', 'type': 'object'}, + 'partition_upper_bound': {'key': 'partitionUpperBound', 'type': 'object'}, + 'partition_lower_bound': {'key': 'partitionLowerBound', 'type': 'object'}, + 'max_partitions_number': {'key': 'maxPartitionsNumber', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SapTablePartitionSettings, self).__init__(**kwargs) + self.partition_column_name = kwargs.get('partition_column_name', None) + self.partition_upper_bound = kwargs.get('partition_upper_bound', None) + self.partition_lower_bound = kwargs.get('partition_lower_bound', None) + self.max_partitions_number = kwargs.get('max_partitions_number', None) + + +class SapTableResourceDataset(Dataset): + """SAP Table Resource properties. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: Required. The name of the SAP Table. Type: string (or + Expression with resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + 'table_name': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SapTableResourceDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.type = 'SapTableResource' + + +class SapTableSource(CopySource): + """A copy activity source for SAP Table source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param row_count: The number of rows to be retrieved. Type: integer(or + Expression with resultType integer). + :type row_count: object + :param row_skips: The number of rows that will be skipped. Type: integer + (or Expression with resultType integer). + :type row_skips: object + :param rfc_table_fields: The fields of the SAP table that will be + retrieved. For example, column0, column1. Type: string (or Expression with + resultType string). + :type rfc_table_fields: object + :param rfc_table_options: The options for the filtering of the SAP Table. + For example, COLUMN0 EQ SOME VALUE. Type: string (or Expression with + resultType string). + :type rfc_table_options: object + :param batch_size: Specifies the maximum number of rows that will be + retrieved at a time when retrieving data from SAP Table. Type: integer (or + Expression with resultType integer). + :type batch_size: object + :param custom_rfc_read_table_function_module: Specifies the custom RFC + function module that will be used to read data from SAP Table. Type: + string (or Expression with resultType string). + :type custom_rfc_read_table_function_module: object + :param partition_option: The partition mechanism that will be used for SAP + table read in parallel. Possible values include: 'None', 'PartitionOnInt', + 'PartitionOnCalendarYear', 'PartitionOnCalendarMonth', + 'PartitionOnCalendarDate', 'PartitionOnTime' + :type partition_option: str or + ~azure.mgmt.datafactory.models.SapTablePartitionOption + :param partition_settings: The settings that will be leveraged for SAP + table source partitioning. + :type partition_settings: + ~azure.mgmt.datafactory.models.SapTablePartitionSettings + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'row_count': {'key': 'rowCount', 'type': 'object'}, + 'row_skips': {'key': 'rowSkips', 'type': 'object'}, + 'rfc_table_fields': {'key': 'rfcTableFields', 'type': 'object'}, + 'rfc_table_options': {'key': 'rfcTableOptions', 'type': 'object'}, + 'batch_size': {'key': 'batchSize', 'type': 'object'}, + 'custom_rfc_read_table_function_module': {'key': 'customRfcReadTableFunctionModule', 'type': 'object'}, + 'partition_option': {'key': 'partitionOption', 'type': 'str'}, + 'partition_settings': {'key': 'partitionSettings', 'type': 'SapTablePartitionSettings'}, + } + + def __init__(self, **kwargs): + super(SapTableSource, self).__init__(**kwargs) + self.row_count = kwargs.get('row_count', None) + self.row_skips = kwargs.get('row_skips', None) + self.rfc_table_fields = kwargs.get('rfc_table_fields', None) + self.rfc_table_options = kwargs.get('rfc_table_options', None) + self.batch_size = kwargs.get('batch_size', None) + self.custom_rfc_read_table_function_module = kwargs.get('custom_rfc_read_table_function_module', None) + self.partition_option = kwargs.get('partition_option', None) + self.partition_settings = kwargs.get('partition_settings', None) + self.type = 'SapTableSource' + + +class ScheduleTrigger(MultiplePipelineTrigger): + """Trigger that creates pipeline runs periodically, on schedule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Trigger description. + :type description: str + :ivar runtime_state: Indicates if trigger is running or not. Updated when + Start/Stop APIs are called on the Trigger. Possible values include: + 'Started', 'Stopped', 'Disabled' + :vartype runtime_state: str or + ~azure.mgmt.datafactory.models.TriggerRuntimeState + :param annotations: List of tags that can be used for describing the + trigger. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param pipelines: Pipelines that need to be started. + :type pipelines: + list[~azure.mgmt.datafactory.models.TriggerPipelineReference] + :param recurrence: Required. Recurrence schedule configuration. + :type recurrence: ~azure.mgmt.datafactory.models.ScheduleTriggerRecurrence + """ + + _validation = { + 'runtime_state': {'readonly': True}, + 'type': {'required': True}, + 'recurrence': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'runtime_state': {'key': 'runtimeState', 'type': 'str'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'pipelines': {'key': 'pipelines', 'type': '[TriggerPipelineReference]'}, + 'recurrence': {'key': 'typeProperties.recurrence', 'type': 'ScheduleTriggerRecurrence'}, + } + + def __init__(self, **kwargs): + super(ScheduleTrigger, self).__init__(**kwargs) + self.recurrence = kwargs.get('recurrence', None) + self.type = 'ScheduleTrigger' + + +class ScheduleTriggerRecurrence(Model): + """The workflow trigger recurrence. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param frequency: The frequency. Possible values include: 'NotSpecified', + 'Minute', 'Hour', 'Day', 'Week', 'Month', 'Year' + :type frequency: str or ~azure.mgmt.datafactory.models.RecurrenceFrequency + :param interval: The interval. + :type interval: int + :param start_time: The start time. + :type start_time: datetime + :param end_time: The end time. + :type end_time: datetime + :param time_zone: The time zone. + :type time_zone: str + :param schedule: The recurrence schedule. + :type schedule: ~azure.mgmt.datafactory.models.RecurrenceSchedule + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'frequency': {'key': 'frequency', 'type': 'str'}, + 'interval': {'key': 'interval', 'type': 'int'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'schedule': {'key': 'schedule', 'type': 'RecurrenceSchedule'}, + } + + def __init__(self, **kwargs): + super(ScheduleTriggerRecurrence, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.frequency = kwargs.get('frequency', None) + self.interval = kwargs.get('interval', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.time_zone = kwargs.get('time_zone', None) + self.schedule = kwargs.get('schedule', None) + + +class ScriptAction(Model): + """Custom script action to run on HDI ondemand cluster once it's up. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The user provided name of the script action. + :type name: str + :param uri: Required. The URI for the script action. + :type uri: str + :param roles: Required. The node types on which the script action should + be executed. + :type roles: object + :param parameters: The parameters for the script action. + :type parameters: str + """ + + _validation = { + 'name': {'required': True}, + 'uri': {'required': True}, + 'roles': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': 'object'}, + 'parameters': {'key': 'parameters', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ScriptAction, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.uri = kwargs.get('uri', None) + self.roles = kwargs.get('roles', None) + self.parameters = kwargs.get('parameters', None) + + +class SecureString(SecretBase): + """Azure Data Factory secure string definition. The string value will be + masked with asterisks '*' during Get or List API calls. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param value: Required. Value of secure string. + :type value: str + """ + + _validation = { + 'type': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecureString, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.type = 'SecureString' + + +class SelfDependencyTumblingWindowTriggerReference(DependencyReference): + """Self referenced tumbling window trigger dependency. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param offset: Required. Timespan applied to the start time of a tumbling + window when evaluating dependency. + :type offset: str + :param size: The size of the window when evaluating the dependency. If + undefined the frequency of the tumbling window will be used. + :type size: str + """ + + _validation = { + 'type': {'required': True}, + 'offset': {'required': True, 'max_length': 15, 'min_length': 8, 'pattern': r'((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9]))'}, + 'size': {'max_length': 15, 'min_length': 8, 'pattern': r'((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9]))'}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'offset': {'key': 'offset', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SelfDependencyTumblingWindowTriggerReference, self).__init__(**kwargs) + self.offset = kwargs.get('offset', None) + self.size = kwargs.get('size', None) + self.type = 'SelfDependencyTumblingWindowTriggerReference' + + +class SelfHostedIntegrationRuntime(IntegrationRuntime): + """Self-hosted integration runtime. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Integration runtime description. + :type description: str + :param type: Required. Constant filled by server. + :type type: str + :param linked_info: + :type linked_info: + ~azure.mgmt.datafactory.models.LinkedIntegrationRuntimeType + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_info': {'key': 'typeProperties.linkedInfo', 'type': 'LinkedIntegrationRuntimeType'}, + } + + def __init__(self, **kwargs): + super(SelfHostedIntegrationRuntime, self).__init__(**kwargs) + self.linked_info = kwargs.get('linked_info', None) + self.type = 'SelfHosted' + + +class SelfHostedIntegrationRuntimeNode(Model): + """Properties of Self-hosted integration runtime node. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar node_name: Name of the integration runtime node. + :vartype node_name: str + :ivar machine_name: Machine name of the integration runtime node. + :vartype machine_name: str + :ivar host_service_uri: URI for the host machine of the integration + runtime. + :vartype host_service_uri: str + :ivar status: Status of the integration runtime node. Possible values + include: 'NeedRegistration', 'Online', 'Limited', 'Offline', 'Upgrading', + 'Initializing', 'InitializeFailed' + :vartype status: str or + ~azure.mgmt.datafactory.models.SelfHostedIntegrationRuntimeNodeStatus + :ivar capabilities: The integration runtime capabilities dictionary + :vartype capabilities: dict[str, str] + :ivar version_status: Status of the integration runtime node version. + :vartype version_status: str + :ivar version: Version of the integration runtime node. + :vartype version: str + :ivar register_time: The time at which the integration runtime node was + registered in ISO8601 format. + :vartype register_time: datetime + :ivar last_connect_time: The most recent time at which the integration + runtime was connected in ISO8601 format. + :vartype last_connect_time: datetime + :ivar expiry_time: The time at which the integration runtime will expire + in ISO8601 format. + :vartype expiry_time: datetime + :ivar last_start_time: The time the node last started up. + :vartype last_start_time: datetime + :ivar last_stop_time: The integration runtime node last stop time. + :vartype last_stop_time: datetime + :ivar last_update_result: The result of the last integration runtime node + update. Possible values include: 'None', 'Succeed', 'Fail' + :vartype last_update_result: str or + ~azure.mgmt.datafactory.models.IntegrationRuntimeUpdateResult + :ivar last_start_update_time: The last time for the integration runtime + node update start. + :vartype last_start_update_time: datetime + :ivar last_end_update_time: The last time for the integration runtime node + update end. + :vartype last_end_update_time: datetime + :ivar is_active_dispatcher: Indicates whether this node is the active + dispatcher for integration runtime requests. + :vartype is_active_dispatcher: bool + :ivar concurrent_jobs_limit: Maximum concurrent jobs on the integration + runtime node. + :vartype concurrent_jobs_limit: int + :ivar max_concurrent_jobs: The maximum concurrent jobs in this integration + runtime. + :vartype max_concurrent_jobs: int + """ + + _validation = { + 'node_name': {'readonly': True}, + 'machine_name': {'readonly': True}, + 'host_service_uri': {'readonly': True}, + 'status': {'readonly': True}, + 'capabilities': {'readonly': True}, + 'version_status': {'readonly': True}, + 'version': {'readonly': True}, + 'register_time': {'readonly': True}, + 'last_connect_time': {'readonly': True}, + 'expiry_time': {'readonly': True}, + 'last_start_time': {'readonly': True}, + 'last_stop_time': {'readonly': True}, + 'last_update_result': {'readonly': True}, + 'last_start_update_time': {'readonly': True}, + 'last_end_update_time': {'readonly': True}, + 'is_active_dispatcher': {'readonly': True}, + 'concurrent_jobs_limit': {'readonly': True}, + 'max_concurrent_jobs': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'node_name': {'key': 'nodeName', 'type': 'str'}, + 'machine_name': {'key': 'machineName', 'type': 'str'}, + 'host_service_uri': {'key': 'hostServiceUri', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'capabilities': {'key': 'capabilities', 'type': '{str}'}, + 'version_status': {'key': 'versionStatus', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'register_time': {'key': 'registerTime', 'type': 'iso-8601'}, + 'last_connect_time': {'key': 'lastConnectTime', 'type': 'iso-8601'}, + 'expiry_time': {'key': 'expiryTime', 'type': 'iso-8601'}, + 'last_start_time': {'key': 'lastStartTime', 'type': 'iso-8601'}, + 'last_stop_time': {'key': 'lastStopTime', 'type': 'iso-8601'}, + 'last_update_result': {'key': 'lastUpdateResult', 'type': 'str'}, + 'last_start_update_time': {'key': 'lastStartUpdateTime', 'type': 'iso-8601'}, + 'last_end_update_time': {'key': 'lastEndUpdateTime', 'type': 'iso-8601'}, + 'is_active_dispatcher': {'key': 'isActiveDispatcher', 'type': 'bool'}, + 'concurrent_jobs_limit': {'key': 'concurrentJobsLimit', 'type': 'int'}, + 'max_concurrent_jobs': {'key': 'maxConcurrentJobs', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(SelfHostedIntegrationRuntimeNode, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.node_name = None + self.machine_name = None + self.host_service_uri = None + self.status = None + self.capabilities = None + self.version_status = None + self.version = None + self.register_time = None + self.last_connect_time = None + self.expiry_time = None + self.last_start_time = None + self.last_stop_time = None + self.last_update_result = None + self.last_start_update_time = None + self.last_end_update_time = None + self.is_active_dispatcher = None + self.concurrent_jobs_limit = None + self.max_concurrent_jobs = None + + +class SelfHostedIntegrationRuntimeStatus(IntegrationRuntimeStatus): + """Self-hosted integration runtime status. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar data_factory_name: The data factory name which the integration + runtime belong to. + :vartype data_factory_name: str + :ivar state: The state of integration runtime. Possible values include: + 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', + 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied' + :vartype state: str or + ~azure.mgmt.datafactory.models.IntegrationRuntimeState + :param type: Required. Constant filled by server. + :type type: str + :ivar create_time: The time at which the integration runtime was created, + in ISO8601 format. + :vartype create_time: datetime + :ivar task_queue_id: The task queue id of the integration runtime. + :vartype task_queue_id: str + :ivar internal_channel_encryption: It is used to set the encryption mode + for node-node communication channel (when more than 2 self-hosted + integration runtime nodes exist). Possible values include: 'NotSet', + 'SslEncrypted', 'NotEncrypted' + :vartype internal_channel_encryption: str or + ~azure.mgmt.datafactory.models.IntegrationRuntimeInternalChannelEncryptionMode + :ivar version: Version of the integration runtime. + :vartype version: str + :param nodes: The list of nodes for this integration runtime. + :type nodes: + list[~azure.mgmt.datafactory.models.SelfHostedIntegrationRuntimeNode] + :ivar scheduled_update_date: The date at which the integration runtime + will be scheduled to update, in ISO8601 format. + :vartype scheduled_update_date: datetime + :ivar update_delay_offset: The time in the date scheduled by service to + update the integration runtime, e.g., PT03H is 3 hours + :vartype update_delay_offset: str + :ivar local_time_zone_offset: The local time zone offset in hours. + :vartype local_time_zone_offset: str + :ivar capabilities: Object with additional information about integration + runtime capabilities. + :vartype capabilities: dict[str, str] + :ivar service_urls: The URLs for the services used in integration runtime + backend service. + :vartype service_urls: list[str] + :ivar auto_update: Whether Self-hosted integration runtime auto update has + been turned on. Possible values include: 'On', 'Off' + :vartype auto_update: str or + ~azure.mgmt.datafactory.models.IntegrationRuntimeAutoUpdate + :ivar version_status: Status of the integration runtime version. + :vartype version_status: str + :param links: The list of linked integration runtimes that are created to + share with this integration runtime. + :type links: list[~azure.mgmt.datafactory.models.LinkedIntegrationRuntime] + :ivar pushed_version: The version that the integration runtime is going to + update to. + :vartype pushed_version: str + :ivar latest_version: The latest version on download center. + :vartype latest_version: str + :ivar auto_update_eta: The estimated time when the self-hosted integration + runtime will be updated. + :vartype auto_update_eta: datetime + """ + + _validation = { + 'data_factory_name': {'readonly': True}, + 'state': {'readonly': True}, + 'type': {'required': True}, + 'create_time': {'readonly': True}, + 'task_queue_id': {'readonly': True}, + 'internal_channel_encryption': {'readonly': True}, + 'version': {'readonly': True}, + 'scheduled_update_date': {'readonly': True}, + 'update_delay_offset': {'readonly': True}, + 'local_time_zone_offset': {'readonly': True}, + 'capabilities': {'readonly': True}, + 'service_urls': {'readonly': True}, + 'auto_update': {'readonly': True}, + 'version_status': {'readonly': True}, + 'pushed_version': {'readonly': True}, + 'latest_version': {'readonly': True}, + 'auto_update_eta': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'data_factory_name': {'key': 'dataFactoryName', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'create_time': {'key': 'typeProperties.createTime', 'type': 'iso-8601'}, + 'task_queue_id': {'key': 'typeProperties.taskQueueId', 'type': 'str'}, + 'internal_channel_encryption': {'key': 'typeProperties.internalChannelEncryption', 'type': 'str'}, + 'version': {'key': 'typeProperties.version', 'type': 'str'}, + 'nodes': {'key': 'typeProperties.nodes', 'type': '[SelfHostedIntegrationRuntimeNode]'}, + 'scheduled_update_date': {'key': 'typeProperties.scheduledUpdateDate', 'type': 'iso-8601'}, + 'update_delay_offset': {'key': 'typeProperties.updateDelayOffset', 'type': 'str'}, + 'local_time_zone_offset': {'key': 'typeProperties.localTimeZoneOffset', 'type': 'str'}, + 'capabilities': {'key': 'typeProperties.capabilities', 'type': '{str}'}, + 'service_urls': {'key': 'typeProperties.serviceUrls', 'type': '[str]'}, + 'auto_update': {'key': 'typeProperties.autoUpdate', 'type': 'str'}, + 'version_status': {'key': 'typeProperties.versionStatus', 'type': 'str'}, + 'links': {'key': 'typeProperties.links', 'type': '[LinkedIntegrationRuntime]'}, + 'pushed_version': {'key': 'typeProperties.pushedVersion', 'type': 'str'}, + 'latest_version': {'key': 'typeProperties.latestVersion', 'type': 'str'}, + 'auto_update_eta': {'key': 'typeProperties.autoUpdateETA', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(SelfHostedIntegrationRuntimeStatus, self).__init__(**kwargs) + self.create_time = None + self.task_queue_id = None + self.internal_channel_encryption = None + self.version = None + self.nodes = kwargs.get('nodes', None) + self.scheduled_update_date = None + self.update_delay_offset = None + self.local_time_zone_offset = None + self.capabilities = None + self.service_urls = None + self.auto_update = None + self.version_status = None + self.links = kwargs.get('links', None) + self.pushed_version = None + self.latest_version = None + self.auto_update_eta = None + self.type = 'SelfHosted' + + +class ServiceNowLinkedService(LinkedService): + """ServiceNow server linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param endpoint: Required. The endpoint of the ServiceNow server. (i.e. + .service-now.com) + :type endpoint: object + :param authentication_type: Required. The authentication type to use. + Possible values include: 'Basic', 'OAuth2' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.ServiceNowAuthenticationType + :param username: The user name used to connect to the ServiceNow server + for Basic and OAuth2 authentication. + :type username: object + :param password: The password corresponding to the user name for Basic and + OAuth2 authentication. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param client_id: The client id for OAuth2 authentication. + :type client_id: object + :param client_secret: The client secret for OAuth2 authentication. + :type client_secret: ~azure.mgmt.datafactory.models.SecretBase + :param use_encrypted_endpoints: Specifies whether the data source + endpoints are encrypted using HTTPS. The default value is true. + :type use_encrypted_endpoints: object + :param use_host_verification: Specifies whether to require the host name + in the server's certificate to match the host name of the server when + connecting over SSL. The default value is true. + :type use_host_verification: object + :param use_peer_verification: Specifies whether to verify the identity of + the server when connecting over SSL. The default value is true. + :type use_peer_verification: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'endpoint': {'required': True}, + 'authentication_type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'endpoint': {'key': 'typeProperties.endpoint', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, + 'client_secret': {'key': 'typeProperties.clientSecret', 'type': 'SecretBase'}, + 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, + 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, + 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ServiceNowLinkedService, self).__init__(**kwargs) + self.endpoint = kwargs.get('endpoint', None) + self.authentication_type = kwargs.get('authentication_type', None) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + self.client_id = kwargs.get('client_id', None) + self.client_secret = kwargs.get('client_secret', None) + self.use_encrypted_endpoints = kwargs.get('use_encrypted_endpoints', None) + self.use_host_verification = kwargs.get('use_host_verification', None) + self.use_peer_verification = kwargs.get('use_peer_verification', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'ServiceNow' + + +class ServiceNowObjectDataset(Dataset): + """ServiceNow server dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ServiceNowObjectDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.type = 'ServiceNowObject' + + +class ServiceNowSource(CopySource): + """A copy activity ServiceNow server source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ServiceNowSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'ServiceNowSource' + + +class SetVariableActivity(ControlActivity): + """Set value for a Variable. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param variable_name: Name of the variable whose value needs to be set. + :type variable_name: str + :param value: Value to be set. Could be a static value or Expression + :type value: object + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'variable_name': {'key': 'typeProperties.variableName', 'type': 'str'}, + 'value': {'key': 'typeProperties.value', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SetVariableActivity, self).__init__(**kwargs) + self.variable_name = kwargs.get('variable_name', None) + self.value = kwargs.get('value', None) + self.type = 'SetVariable' + + +class SftpLocation(DatasetLocation): + """The location of SFTP dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. Type of dataset storage location. + :type type: str + :param folder_path: Specify the folder path of dataset. Type: string (or + Expression with resultType string) + :type folder_path: object + :param file_name: Specify the file name of dataset. Type: string (or + Expression with resultType string). + :type file_name: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'folder_path': {'key': 'folderPath', 'type': 'object'}, + 'file_name': {'key': 'fileName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SftpLocation, self).__init__(**kwargs) + + +class SftpReadSettings(StoreReadSettings): + """Sftp read settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The read setting type. + :type type: str + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param recursive: If true, files under the folder path will be read + recursively. Default is true. Type: boolean (or Expression with resultType + boolean). + :type recursive: object + :param wildcard_folder_path: Sftp wildcardFolderPath. Type: string (or + Expression with resultType string). + :type wildcard_folder_path: object + :param wildcard_file_name: Sftp wildcardFileName. Type: string (or + Expression with resultType string). + :type wildcard_file_name: object + :param modified_datetime_start: The start of file's modified datetime. + Type: string (or Expression with resultType string). + :type modified_datetime_start: object + :param modified_datetime_end: The end of file's modified datetime. Type: + string (or Expression with resultType string). + :type modified_datetime_end: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'recursive': {'key': 'recursive', 'type': 'object'}, + 'wildcard_folder_path': {'key': 'wildcardFolderPath', 'type': 'object'}, + 'wildcard_file_name': {'key': 'wildcardFileName', 'type': 'object'}, + 'modified_datetime_start': {'key': 'modifiedDatetimeStart', 'type': 'object'}, + 'modified_datetime_end': {'key': 'modifiedDatetimeEnd', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SftpReadSettings, self).__init__(**kwargs) + self.recursive = kwargs.get('recursive', None) + self.wildcard_folder_path = kwargs.get('wildcard_folder_path', None) + self.wildcard_file_name = kwargs.get('wildcard_file_name', None) + self.modified_datetime_start = kwargs.get('modified_datetime_start', None) + self.modified_datetime_end = kwargs.get('modified_datetime_end', None) + + +class SftpServerLinkedService(LinkedService): + """A linked service for an SSH File Transfer Protocol (SFTP) server. . + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param host: Required. The SFTP server host name. Type: string (or + Expression with resultType string). + :type host: object + :param port: The TCP port number that the SFTP server uses to listen for + client connections. Default value is 22. Type: integer (or Expression with + resultType integer), minimum: 0. + :type port: object + :param authentication_type: The authentication type to be used to connect + to the FTP server. Possible values include: 'Basic', 'SshPublicKey' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.SftpAuthenticationType + :param user_name: The username used to log on to the SFTP server. Type: + string (or Expression with resultType string). + :type user_name: object + :param password: Password to logon the SFTP server for Basic + authentication. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + :param private_key_path: The SSH private key file path for SshPublicKey + authentication. Only valid for on-premises copy. For on-premises copy with + SshPublicKey authentication, either PrivateKeyPath or PrivateKeyContent + should be specified. SSH private key should be OpenSSH format. Type: + string (or Expression with resultType string). + :type private_key_path: object + :param private_key_content: Base64 encoded SSH private key content for + SshPublicKey authentication. For on-premises copy with SshPublicKey + authentication, either PrivateKeyPath or PrivateKeyContent should be + specified. SSH private key should be OpenSSH format. + :type private_key_content: ~azure.mgmt.datafactory.models.SecretBase + :param pass_phrase: The password to decrypt the SSH private key if the SSH + private key is encrypted. + :type pass_phrase: ~azure.mgmt.datafactory.models.SecretBase + :param skip_host_key_validation: If true, skip the SSH host key + validation. Default value is false. Type: boolean (or Expression with + resultType boolean). + :type skip_host_key_validation: object + :param host_key_fingerprint: The host key finger-print of the SFTP server. + When SkipHostKeyValidation is false, HostKeyFingerprint should be + specified. Type: string (or Expression with resultType string). + :type host_key_fingerprint: object + """ + + _validation = { + 'type': {'required': True}, + 'host': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'host': {'key': 'typeProperties.host', 'type': 'object'}, + 'port': {'key': 'typeProperties.port', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + 'private_key_path': {'key': 'typeProperties.privateKeyPath', 'type': 'object'}, + 'private_key_content': {'key': 'typeProperties.privateKeyContent', 'type': 'SecretBase'}, + 'pass_phrase': {'key': 'typeProperties.passPhrase', 'type': 'SecretBase'}, + 'skip_host_key_validation': {'key': 'typeProperties.skipHostKeyValidation', 'type': 'object'}, + 'host_key_fingerprint': {'key': 'typeProperties.hostKeyFingerprint', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SftpServerLinkedService, self).__init__(**kwargs) + self.host = kwargs.get('host', None) + self.port = kwargs.get('port', None) + self.authentication_type = kwargs.get('authentication_type', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.private_key_path = kwargs.get('private_key_path', None) + self.private_key_content = kwargs.get('private_key_content', None) + self.pass_phrase = kwargs.get('pass_phrase', None) + self.skip_host_key_validation = kwargs.get('skip_host_key_validation', None) + self.host_key_fingerprint = kwargs.get('host_key_fingerprint', None) + self.type = 'Sftp' + + +class ShopifyLinkedService(LinkedService): + """Shopify Service linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param host: Required. The endpoint of the Shopify server. (i.e. + mystore.myshopify.com) + :type host: object + :param access_token: The API access token that can be used to access + Shopify’s data. The token won't expire if it is offline mode. + :type access_token: ~azure.mgmt.datafactory.models.SecretBase + :param use_encrypted_endpoints: Specifies whether the data source + endpoints are encrypted using HTTPS. The default value is true. + :type use_encrypted_endpoints: object + :param use_host_verification: Specifies whether to require the host name + in the server's certificate to match the host name of the server when + connecting over SSL. The default value is true. + :type use_host_verification: object + :param use_peer_verification: Specifies whether to verify the identity of + the server when connecting over SSL. The default value is true. + :type use_peer_verification: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'host': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'host': {'key': 'typeProperties.host', 'type': 'object'}, + 'access_token': {'key': 'typeProperties.accessToken', 'type': 'SecretBase'}, + 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, + 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, + 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ShopifyLinkedService, self).__init__(**kwargs) + self.host = kwargs.get('host', None) + self.access_token = kwargs.get('access_token', None) + self.use_encrypted_endpoints = kwargs.get('use_encrypted_endpoints', None) + self.use_host_verification = kwargs.get('use_host_verification', None) + self.use_peer_verification = kwargs.get('use_peer_verification', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'Shopify' + + +class ShopifyObjectDataset(Dataset): + """Shopify Service dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ShopifyObjectDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.type = 'ShopifyObject' + + +class ShopifySource(CopySource): + """A copy activity Shopify Service source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ShopifySource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'ShopifySource' + + +class SparkLinkedService(LinkedService): + """Spark Server linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param host: Required. IP address or host name of the Spark server + :type host: object + :param port: Required. The TCP port that the Spark server uses to listen + for client connections. + :type port: object + :param server_type: The type of Spark server. Possible values include: + 'SharkServer', 'SharkServer2', 'SparkThriftServer' + :type server_type: str or ~azure.mgmt.datafactory.models.SparkServerType + :param thrift_transport_protocol: The transport protocol to use in the + Thrift layer. Possible values include: 'Binary', 'SASL', 'HTTP ' + :type thrift_transport_protocol: str or + ~azure.mgmt.datafactory.models.SparkThriftTransportProtocol + :param authentication_type: Required. The authentication method used to + access the Spark server. Possible values include: 'Anonymous', 'Username', + 'UsernameAndPassword', 'WindowsAzureHDInsightService' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.SparkAuthenticationType + :param username: The user name that you use to access Spark Server. + :type username: object + :param password: The password corresponding to the user name that you + provided in the Username field + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param http_path: The partial URL corresponding to the Spark server. + :type http_path: object + :param enable_ssl: Specifies whether the connections to the server are + encrypted using SSL. The default value is false. + :type enable_ssl: object + :param trusted_cert_path: The full path of the .pem file containing + trusted CA certificates for verifying the server when connecting over SSL. + This property can only be set when using SSL on self-hosted IR. The + default value is the cacerts.pem file installed with the IR. + :type trusted_cert_path: object + :param use_system_trust_store: Specifies whether to use a CA certificate + from the system trust store or from a specified PEM file. The default + value is false. + :type use_system_trust_store: object + :param allow_host_name_cn_mismatch: Specifies whether to require a + CA-issued SSL certificate name to match the host name of the server when + connecting over SSL. The default value is false. + :type allow_host_name_cn_mismatch: object + :param allow_self_signed_server_cert: Specifies whether to allow + self-signed certificates from the server. The default value is false. + :type allow_self_signed_server_cert: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'host': {'required': True}, + 'port': {'required': True}, + 'authentication_type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'host': {'key': 'typeProperties.host', 'type': 'object'}, + 'port': {'key': 'typeProperties.port', 'type': 'object'}, + 'server_type': {'key': 'typeProperties.serverType', 'type': 'str'}, + 'thrift_transport_protocol': {'key': 'typeProperties.thriftTransportProtocol', 'type': 'str'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'http_path': {'key': 'typeProperties.httpPath', 'type': 'object'}, + 'enable_ssl': {'key': 'typeProperties.enableSsl', 'type': 'object'}, + 'trusted_cert_path': {'key': 'typeProperties.trustedCertPath', 'type': 'object'}, + 'use_system_trust_store': {'key': 'typeProperties.useSystemTrustStore', 'type': 'object'}, + 'allow_host_name_cn_mismatch': {'key': 'typeProperties.allowHostNameCNMismatch', 'type': 'object'}, + 'allow_self_signed_server_cert': {'key': 'typeProperties.allowSelfSignedServerCert', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SparkLinkedService, self).__init__(**kwargs) + self.host = kwargs.get('host', None) + self.port = kwargs.get('port', None) + self.server_type = kwargs.get('server_type', None) + self.thrift_transport_protocol = kwargs.get('thrift_transport_protocol', None) + self.authentication_type = kwargs.get('authentication_type', None) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + self.http_path = kwargs.get('http_path', None) + self.enable_ssl = kwargs.get('enable_ssl', None) + self.trusted_cert_path = kwargs.get('trusted_cert_path', None) + self.use_system_trust_store = kwargs.get('use_system_trust_store', None) + self.allow_host_name_cn_mismatch = kwargs.get('allow_host_name_cn_mismatch', None) + self.allow_self_signed_server_cert = kwargs.get('allow_self_signed_server_cert', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'Spark' + + +class SparkObjectDataset(Dataset): + """Spark Server dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: This property will be retired. Please consider using + schema + table properties instead. + :type table_name: object + :param table: The table name of the Spark. Type: string (or Expression + with resultType string). + :type table: object + :param spark_object_dataset_schema: The schema name of the Spark. Type: + string (or Expression with resultType string). + :type spark_object_dataset_schema: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + 'table': {'key': 'typeProperties.table', 'type': 'object'}, + 'spark_object_dataset_schema': {'key': 'typeProperties.schema', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SparkObjectDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.table = kwargs.get('table', None) + self.spark_object_dataset_schema = kwargs.get('spark_object_dataset_schema', None) + self.type = 'SparkObject' + + +class SparkSource(CopySource): + """A copy activity Spark Server source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SparkSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'SparkSource' + + +class SqlDWSink(CopySink): + """A copy activity SQL Data Warehouse sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param pre_copy_script: SQL pre-copy script. Type: string (or Expression + with resultType string). + :type pre_copy_script: object + :param allow_poly_base: Indicates to use PolyBase to copy data into SQL + Data Warehouse when applicable. Type: boolean (or Expression with + resultType boolean). + :type allow_poly_base: object + :param poly_base_settings: Specifies PolyBase-related settings when + allowPolyBase is true. + :type poly_base_settings: ~azure.mgmt.datafactory.models.PolybaseSettings + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'pre_copy_script': {'key': 'preCopyScript', 'type': 'object'}, + 'allow_poly_base': {'key': 'allowPolyBase', 'type': 'object'}, + 'poly_base_settings': {'key': 'polyBaseSettings', 'type': 'PolybaseSettings'}, + } + + def __init__(self, **kwargs): + super(SqlDWSink, self).__init__(**kwargs) + self.pre_copy_script = kwargs.get('pre_copy_script', None) + self.allow_poly_base = kwargs.get('allow_poly_base', None) + self.poly_base_settings = kwargs.get('poly_base_settings', None) + self.type = 'SqlDWSink' + + +class SqlDWSource(CopySource): + """A copy activity SQL Data Warehouse source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param sql_reader_query: SQL Data Warehouse reader query. Type: string (or + Expression with resultType string). + :type sql_reader_query: object + :param sql_reader_stored_procedure_name: Name of the stored procedure for + a SQL Data Warehouse source. This cannot be used at the same time as + SqlReaderQuery. Type: string (or Expression with resultType string). + :type sql_reader_stored_procedure_name: object + :param stored_procedure_parameters: Value and type setting for stored + procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". + Type: object (or Expression with resultType object), itemType: + StoredProcedureParameter. + :type stored_procedure_parameters: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sql_reader_query': {'key': 'sqlReaderQuery', 'type': 'object'}, + 'sql_reader_stored_procedure_name': {'key': 'sqlReaderStoredProcedureName', 'type': 'object'}, + 'stored_procedure_parameters': {'key': 'storedProcedureParameters', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SqlDWSource, self).__init__(**kwargs) + self.sql_reader_query = kwargs.get('sql_reader_query', None) + self.sql_reader_stored_procedure_name = kwargs.get('sql_reader_stored_procedure_name', None) + self.stored_procedure_parameters = kwargs.get('stored_procedure_parameters', None) + self.type = 'SqlDWSource' + + +class SqlMISink(CopySink): + """A copy activity Azure SQL Managed Instance sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param sql_writer_stored_procedure_name: SQL writer stored procedure name. + Type: string (or Expression with resultType string). + :type sql_writer_stored_procedure_name: object + :param sql_writer_table_type: SQL writer table type. Type: string (or + Expression with resultType string). + :type sql_writer_table_type: object + :param pre_copy_script: SQL pre-copy script. Type: string (or Expression + with resultType string). + :type pre_copy_script: object + :param stored_procedure_parameters: SQL stored procedure parameters. + :type stored_procedure_parameters: dict[str, + ~azure.mgmt.datafactory.models.StoredProcedureParameter] + :param stored_procedure_table_type_parameter_name: The stored procedure + parameter name of the table type. Type: string (or Expression with + resultType string). + :type stored_procedure_table_type_parameter_name: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sql_writer_stored_procedure_name': {'key': 'sqlWriterStoredProcedureName', 'type': 'object'}, + 'sql_writer_table_type': {'key': 'sqlWriterTableType', 'type': 'object'}, + 'pre_copy_script': {'key': 'preCopyScript', 'type': 'object'}, + 'stored_procedure_parameters': {'key': 'storedProcedureParameters', 'type': '{StoredProcedureParameter}'}, + 'stored_procedure_table_type_parameter_name': {'key': 'storedProcedureTableTypeParameterName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SqlMISink, self).__init__(**kwargs) + self.sql_writer_stored_procedure_name = kwargs.get('sql_writer_stored_procedure_name', None) + self.sql_writer_table_type = kwargs.get('sql_writer_table_type', None) + self.pre_copy_script = kwargs.get('pre_copy_script', None) + self.stored_procedure_parameters = kwargs.get('stored_procedure_parameters', None) + self.stored_procedure_table_type_parameter_name = kwargs.get('stored_procedure_table_type_parameter_name', None) + self.type = 'SqlMISink' + + +class SqlMISource(CopySource): + """A copy activity Azure SQL Managed Instance source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param sql_reader_query: SQL reader query. Type: string (or Expression + with resultType string). + :type sql_reader_query: object + :param sql_reader_stored_procedure_name: Name of the stored procedure for + a Azure SQL Managed Instance source. This cannot be used at the same time + as SqlReaderQuery. Type: string (or Expression with resultType string). + :type sql_reader_stored_procedure_name: object + :param stored_procedure_parameters: Value and type setting for stored + procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". + :type stored_procedure_parameters: dict[str, + ~azure.mgmt.datafactory.models.StoredProcedureParameter] + :param produce_additional_types: Which additional types to produce. + :type produce_additional_types: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sql_reader_query': {'key': 'sqlReaderQuery', 'type': 'object'}, + 'sql_reader_stored_procedure_name': {'key': 'sqlReaderStoredProcedureName', 'type': 'object'}, + 'stored_procedure_parameters': {'key': 'storedProcedureParameters', 'type': '{StoredProcedureParameter}'}, + 'produce_additional_types': {'key': 'produceAdditionalTypes', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SqlMISource, self).__init__(**kwargs) + self.sql_reader_query = kwargs.get('sql_reader_query', None) + self.sql_reader_stored_procedure_name = kwargs.get('sql_reader_stored_procedure_name', None) + self.stored_procedure_parameters = kwargs.get('stored_procedure_parameters', None) + self.produce_additional_types = kwargs.get('produce_additional_types', None) + self.type = 'SqlMISource' + + +class SqlServerLinkedService(LinkedService): + """SQL Server linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: Required. The connection string. Type: string, + SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param user_name: The on-premises Windows authentication user name. Type: + string (or Expression with resultType string). + :type user_name: object + :param password: The on-premises Windows authentication password. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'connection_string': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SqlServerLinkedService, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'SqlServer' + + +class SqlServerSink(CopySink): + """A copy activity SQL server sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param sql_writer_stored_procedure_name: SQL writer stored procedure name. + Type: string (or Expression with resultType string). + :type sql_writer_stored_procedure_name: object + :param sql_writer_table_type: SQL writer table type. Type: string (or + Expression with resultType string). + :type sql_writer_table_type: object + :param pre_copy_script: SQL pre-copy script. Type: string (or Expression + with resultType string). + :type pre_copy_script: object + :param stored_procedure_parameters: SQL stored procedure parameters. + :type stored_procedure_parameters: dict[str, + ~azure.mgmt.datafactory.models.StoredProcedureParameter] + :param stored_procedure_table_type_parameter_name: The stored procedure + parameter name of the table type. Type: string (or Expression with + resultType string). + :type stored_procedure_table_type_parameter_name: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sql_writer_stored_procedure_name': {'key': 'sqlWriterStoredProcedureName', 'type': 'object'}, + 'sql_writer_table_type': {'key': 'sqlWriterTableType', 'type': 'object'}, + 'pre_copy_script': {'key': 'preCopyScript', 'type': 'object'}, + 'stored_procedure_parameters': {'key': 'storedProcedureParameters', 'type': '{StoredProcedureParameter}'}, + 'stored_procedure_table_type_parameter_name': {'key': 'storedProcedureTableTypeParameterName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SqlServerSink, self).__init__(**kwargs) + self.sql_writer_stored_procedure_name = kwargs.get('sql_writer_stored_procedure_name', None) + self.sql_writer_table_type = kwargs.get('sql_writer_table_type', None) + self.pre_copy_script = kwargs.get('pre_copy_script', None) + self.stored_procedure_parameters = kwargs.get('stored_procedure_parameters', None) + self.stored_procedure_table_type_parameter_name = kwargs.get('stored_procedure_table_type_parameter_name', None) + self.type = 'SqlServerSink' + + +class SqlServerSource(CopySource): + """A copy activity SQL server source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param sql_reader_query: SQL reader query. Type: string (or Expression + with resultType string). + :type sql_reader_query: object + :param sql_reader_stored_procedure_name: Name of the stored procedure for + a SQL Database source. This cannot be used at the same time as + SqlReaderQuery. Type: string (or Expression with resultType string). + :type sql_reader_stored_procedure_name: object + :param stored_procedure_parameters: Value and type setting for stored + procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". + :type stored_procedure_parameters: dict[str, + ~azure.mgmt.datafactory.models.StoredProcedureParameter] + :param produce_additional_types: Which additional types to produce. + :type produce_additional_types: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sql_reader_query': {'key': 'sqlReaderQuery', 'type': 'object'}, + 'sql_reader_stored_procedure_name': {'key': 'sqlReaderStoredProcedureName', 'type': 'object'}, + 'stored_procedure_parameters': {'key': 'storedProcedureParameters', 'type': '{StoredProcedureParameter}'}, + 'produce_additional_types': {'key': 'produceAdditionalTypes', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SqlServerSource, self).__init__(**kwargs) + self.sql_reader_query = kwargs.get('sql_reader_query', None) + self.sql_reader_stored_procedure_name = kwargs.get('sql_reader_stored_procedure_name', None) + self.stored_procedure_parameters = kwargs.get('stored_procedure_parameters', None) + self.produce_additional_types = kwargs.get('produce_additional_types', None) + self.type = 'SqlServerSource' + + +class SqlServerStoredProcedureActivity(ExecutionActivity): + """SQL stored procedure activity type. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param stored_procedure_name: Required. Stored procedure name. Type: + string (or Expression with resultType string). + :type stored_procedure_name: object + :param stored_procedure_parameters: Value and type setting for stored + procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". + :type stored_procedure_parameters: dict[str, + ~azure.mgmt.datafactory.models.StoredProcedureParameter] + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'stored_procedure_name': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'stored_procedure_name': {'key': 'typeProperties.storedProcedureName', 'type': 'object'}, + 'stored_procedure_parameters': {'key': 'typeProperties.storedProcedureParameters', 'type': '{StoredProcedureParameter}'}, + } + + def __init__(self, **kwargs): + super(SqlServerStoredProcedureActivity, self).__init__(**kwargs) + self.stored_procedure_name = kwargs.get('stored_procedure_name', None) + self.stored_procedure_parameters = kwargs.get('stored_procedure_parameters', None) + self.type = 'SqlServerStoredProcedure' + + +class SqlServerTableDataset(Dataset): + """The on-premises SQL Server dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: This property will be retired. Please consider using + schema + table properties instead. + :type table_name: object + :param sql_server_table_dataset_schema: The schema name of the SQL Server + dataset. Type: string (or Expression with resultType string). + :type sql_server_table_dataset_schema: object + :param table: The table name of the SQL Server dataset. Type: string (or + Expression with resultType string). + :type table: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + 'sql_server_table_dataset_schema': {'key': 'typeProperties.schema', 'type': 'object'}, + 'table': {'key': 'typeProperties.table', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SqlServerTableDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.sql_server_table_dataset_schema = kwargs.get('sql_server_table_dataset_schema', None) + self.table = kwargs.get('table', None) + self.type = 'SqlServerTable' + + +class SqlSink(CopySink): + """A copy activity SQL sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param sql_writer_stored_procedure_name: SQL writer stored procedure name. + Type: string (or Expression with resultType string). + :type sql_writer_stored_procedure_name: object + :param sql_writer_table_type: SQL writer table type. Type: string (or + Expression with resultType string). + :type sql_writer_table_type: object + :param pre_copy_script: SQL pre-copy script. Type: string (or Expression + with resultType string). + :type pre_copy_script: object + :param stored_procedure_parameters: SQL stored procedure parameters. + :type stored_procedure_parameters: dict[str, + ~azure.mgmt.datafactory.models.StoredProcedureParameter] + :param stored_procedure_table_type_parameter_name: The stored procedure + parameter name of the table type. Type: string (or Expression with + resultType string). + :type stored_procedure_table_type_parameter_name: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sql_writer_stored_procedure_name': {'key': 'sqlWriterStoredProcedureName', 'type': 'object'}, + 'sql_writer_table_type': {'key': 'sqlWriterTableType', 'type': 'object'}, + 'pre_copy_script': {'key': 'preCopyScript', 'type': 'object'}, + 'stored_procedure_parameters': {'key': 'storedProcedureParameters', 'type': '{StoredProcedureParameter}'}, + 'stored_procedure_table_type_parameter_name': {'key': 'storedProcedureTableTypeParameterName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SqlSink, self).__init__(**kwargs) + self.sql_writer_stored_procedure_name = kwargs.get('sql_writer_stored_procedure_name', None) + self.sql_writer_table_type = kwargs.get('sql_writer_table_type', None) + self.pre_copy_script = kwargs.get('pre_copy_script', None) + self.stored_procedure_parameters = kwargs.get('stored_procedure_parameters', None) + self.stored_procedure_table_type_parameter_name = kwargs.get('stored_procedure_table_type_parameter_name', None) + self.type = 'SqlSink' + + +class SqlSource(CopySource): + """A copy activity SQL source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param sql_reader_query: SQL reader query. Type: string (or Expression + with resultType string). + :type sql_reader_query: object + :param sql_reader_stored_procedure_name: Name of the stored procedure for + a SQL Database source. This cannot be used at the same time as + SqlReaderQuery. Type: string (or Expression with resultType string). + :type sql_reader_stored_procedure_name: object + :param stored_procedure_parameters: Value and type setting for stored + procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". + :type stored_procedure_parameters: dict[str, + ~azure.mgmt.datafactory.models.StoredProcedureParameter] + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sql_reader_query': {'key': 'sqlReaderQuery', 'type': 'object'}, + 'sql_reader_stored_procedure_name': {'key': 'sqlReaderStoredProcedureName', 'type': 'object'}, + 'stored_procedure_parameters': {'key': 'storedProcedureParameters', 'type': '{StoredProcedureParameter}'}, + } + + def __init__(self, **kwargs): + super(SqlSource, self).__init__(**kwargs) + self.sql_reader_query = kwargs.get('sql_reader_query', None) + self.sql_reader_stored_procedure_name = kwargs.get('sql_reader_stored_procedure_name', None) + self.stored_procedure_parameters = kwargs.get('stored_procedure_parameters', None) + self.type = 'SqlSource' + + +class SquareLinkedService(LinkedService): + """Square Service linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param host: Required. The URL of the Square instance. (i.e. + mystore.mysquare.com) + :type host: object + :param client_id: Required. The client ID associated with your Square + application. + :type client_id: object + :param client_secret: The client secret associated with your Square + application. + :type client_secret: ~azure.mgmt.datafactory.models.SecretBase + :param redirect_uri: Required. The redirect URL assigned in the Square + application dashboard. (i.e. http://localhost:2500) + :type redirect_uri: object + :param use_encrypted_endpoints: Specifies whether the data source + endpoints are encrypted using HTTPS. The default value is true. + :type use_encrypted_endpoints: object + :param use_host_verification: Specifies whether to require the host name + in the server's certificate to match the host name of the server when + connecting over SSL. The default value is true. + :type use_host_verification: object + :param use_peer_verification: Specifies whether to verify the identity of + the server when connecting over SSL. The default value is true. + :type use_peer_verification: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'host': {'required': True}, + 'client_id': {'required': True}, + 'redirect_uri': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'host': {'key': 'typeProperties.host', 'type': 'object'}, + 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, + 'client_secret': {'key': 'typeProperties.clientSecret', 'type': 'SecretBase'}, + 'redirect_uri': {'key': 'typeProperties.redirectUri', 'type': 'object'}, + 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, + 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, + 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SquareLinkedService, self).__init__(**kwargs) + self.host = kwargs.get('host', None) + self.client_id = kwargs.get('client_id', None) + self.client_secret = kwargs.get('client_secret', None) + self.redirect_uri = kwargs.get('redirect_uri', None) + self.use_encrypted_endpoints = kwargs.get('use_encrypted_endpoints', None) + self.use_host_verification = kwargs.get('use_host_verification', None) + self.use_peer_verification = kwargs.get('use_peer_verification', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'Square' + + +class SquareObjectDataset(Dataset): + """Square Service dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SquareObjectDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.type = 'SquareObject' + + +class SquareSource(CopySource): + """A copy activity Square Service source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SquareSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'SquareSource' + + +class SSISAccessCredential(Model): + """SSIS access credential. + + All required parameters must be populated in order to send to Azure. + + :param domain: Required. Domain for windows authentication. + :type domain: object + :param user_name: Required. UseName for windows authentication. + :type user_name: object + :param password: Required. Password for windows authentication. + :type password: ~azure.mgmt.datafactory.models.SecureString + """ + + _validation = { + 'domain': {'required': True}, + 'user_name': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'domain': {'key': 'domain', 'type': 'object'}, + 'user_name': {'key': 'userName', 'type': 'object'}, + 'password': {'key': 'password', 'type': 'SecureString'}, + } + + def __init__(self, **kwargs): + super(SSISAccessCredential, self).__init__(**kwargs) + self.domain = kwargs.get('domain', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + + +class SsisObjectMetadata(Model): + """SSIS object metadata. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SsisEnvironment, SsisPackage, SsisProject, SsisFolder + + All required parameters must be populated in order to send to Azure. + + :param id: Metadata id. + :type id: long + :param name: Metadata name. + :type name: str + :param description: Metadata description. + :type description: str + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'Environment': 'SsisEnvironment', 'Package': 'SsisPackage', 'Project': 'SsisProject', 'Folder': 'SsisFolder'} + } + + def __init__(self, **kwargs): + super(SsisObjectMetadata, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.type = None + + +class SsisEnvironment(SsisObjectMetadata): + """Ssis environment. + + All required parameters must be populated in order to send to Azure. + + :param id: Metadata id. + :type id: long + :param name: Metadata name. + :type name: str + :param description: Metadata description. + :type description: str + :param type: Required. Constant filled by server. + :type type: str + :param folder_id: Folder id which contains environment. + :type folder_id: long + :param variables: Variable in environment + :type variables: list[~azure.mgmt.datafactory.models.SsisVariable] + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'folder_id': {'key': 'folderId', 'type': 'long'}, + 'variables': {'key': 'variables', 'type': '[SsisVariable]'}, + } + + def __init__(self, **kwargs): + super(SsisEnvironment, self).__init__(**kwargs) + self.folder_id = kwargs.get('folder_id', None) + self.variables = kwargs.get('variables', None) + self.type = 'Environment' + + +class SsisEnvironmentReference(Model): + """Ssis environment reference. + + :param id: Environment reference id. + :type id: long + :param environment_folder_name: Environment folder name. + :type environment_folder_name: str + :param environment_name: Environment name. + :type environment_name: str + :param reference_type: Reference type + :type reference_type: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'long'}, + 'environment_folder_name': {'key': 'environmentFolderName', 'type': 'str'}, + 'environment_name': {'key': 'environmentName', 'type': 'str'}, + 'reference_type': {'key': 'referenceType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SsisEnvironmentReference, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.environment_folder_name = kwargs.get('environment_folder_name', None) + self.environment_name = kwargs.get('environment_name', None) + self.reference_type = kwargs.get('reference_type', None) + + +class SSISExecutionCredential(Model): + """SSIS package execution credential. + + All required parameters must be populated in order to send to Azure. + + :param domain: Required. Domain for windows authentication. + :type domain: object + :param user_name: Required. UseName for windows authentication. + :type user_name: object + :param password: Required. Password for windows authentication. + :type password: ~azure.mgmt.datafactory.models.SecureString + """ + + _validation = { + 'domain': {'required': True}, + 'user_name': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'domain': {'key': 'domain', 'type': 'object'}, + 'user_name': {'key': 'userName', 'type': 'object'}, + 'password': {'key': 'password', 'type': 'SecureString'}, + } + + def __init__(self, **kwargs): + super(SSISExecutionCredential, self).__init__(**kwargs) + self.domain = kwargs.get('domain', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + + +class SSISExecutionParameter(Model): + """SSIS execution parameter. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. SSIS package execution parameter value. Type: + string (or Expression with resultType string). + :type value: object + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SSISExecutionParameter, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class SsisFolder(SsisObjectMetadata): + """Ssis folder. + + All required parameters must be populated in order to send to Azure. + + :param id: Metadata id. + :type id: long + :param name: Metadata name. + :type name: str + :param description: Metadata description. + :type description: str + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SsisFolder, self).__init__(**kwargs) + self.type = 'Folder' + + +class SSISLogLocation(Model): + """SSIS package execution log location. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param log_path: Required. The SSIS package execution log path. Type: + string (or Expression with resultType string). + :type log_path: object + :ivar type: Required. The type of SSIS log location. Default value: "File" + . + :vartype type: str + :param access_credential: The package execution log access credential. + :type access_credential: + ~azure.mgmt.datafactory.models.SSISAccessCredential + :param log_refresh_interval: Specifies the interval to refresh log. The + default interval is 5 minutes. Type: string (or Expression with resultType + string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type log_refresh_interval: object + """ + + _validation = { + 'log_path': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'log_path': {'key': 'logPath', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'access_credential': {'key': 'typeProperties.accessCredential', 'type': 'SSISAccessCredential'}, + 'log_refresh_interval': {'key': 'typeProperties.logRefreshInterval', 'type': 'object'}, + } + + type = "File" + + def __init__(self, **kwargs): + super(SSISLogLocation, self).__init__(**kwargs) + self.log_path = kwargs.get('log_path', None) + self.access_credential = kwargs.get('access_credential', None) + self.log_refresh_interval = kwargs.get('log_refresh_interval', None) + + +class SsisObjectMetadataListResponse(Model): + """A list of SSIS object metadata. + + :param value: List of SSIS object metadata. + :type value: list[~azure.mgmt.datafactory.models.SsisObjectMetadata] + :param next_link: The link to the next page of results, if any remaining + results exist. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SsisObjectMetadata]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SsisObjectMetadataListResponse, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class SsisObjectMetadataStatusResponse(Model): + """The status of the operation. + + :param status: The status of the operation. + :type status: str + :param name: The operation name. + :type name: str + :param properties: The operation properties. + :type properties: str + :param error: The operation error message. + :type error: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SsisObjectMetadataStatusResponse, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.name = kwargs.get('name', None) + self.properties = kwargs.get('properties', None) + self.error = kwargs.get('error', None) + + +class SsisPackage(SsisObjectMetadata): + """Ssis Package. + + All required parameters must be populated in order to send to Azure. + + :param id: Metadata id. + :type id: long + :param name: Metadata name. + :type name: str + :param description: Metadata description. + :type description: str + :param type: Required. Constant filled by server. + :type type: str + :param folder_id: Folder id which contains package. + :type folder_id: long + :param project_version: Project version which contains package. + :type project_version: long + :param project_id: Project id which contains package. + :type project_id: long + :param parameters: Parameters in package + :type parameters: list[~azure.mgmt.datafactory.models.SsisParameter] + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'folder_id': {'key': 'folderId', 'type': 'long'}, + 'project_version': {'key': 'projectVersion', 'type': 'long'}, + 'project_id': {'key': 'projectId', 'type': 'long'}, + 'parameters': {'key': 'parameters', 'type': '[SsisParameter]'}, + } + + def __init__(self, **kwargs): + super(SsisPackage, self).__init__(**kwargs) + self.folder_id = kwargs.get('folder_id', None) + self.project_version = kwargs.get('project_version', None) + self.project_id = kwargs.get('project_id', None) + self.parameters = kwargs.get('parameters', None) + self.type = 'Package' + + +class SSISPackageLocation(Model): + """SSIS package location. + + All required parameters must be populated in order to send to Azure. + + :param package_path: Required. The SSIS package path. Type: string (or + Expression with resultType string). + :type package_path: object + :param type: The type of SSIS package location. Possible values include: + 'SSISDB', 'File' + :type type: str or ~azure.mgmt.datafactory.models.SsisPackageLocationType + :param package_password: Password of the package. + :type package_password: ~azure.mgmt.datafactory.models.SecureString + :param access_credential: The package access credential. + :type access_credential: + ~azure.mgmt.datafactory.models.SSISAccessCredential + :param configuration_path: The configuration file of the package + execution. Type: string (or Expression with resultType string). + :type configuration_path: object + """ + + _validation = { + 'package_path': {'required': True}, + } + + _attribute_map = { + 'package_path': {'key': 'packagePath', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'package_password': {'key': 'typeProperties.packagePassword', 'type': 'SecureString'}, + 'access_credential': {'key': 'typeProperties.accessCredential', 'type': 'SSISAccessCredential'}, + 'configuration_path': {'key': 'typeProperties.configurationPath', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SSISPackageLocation, self).__init__(**kwargs) + self.package_path = kwargs.get('package_path', None) + self.type = kwargs.get('type', None) + self.package_password = kwargs.get('package_password', None) + self.access_credential = kwargs.get('access_credential', None) + self.configuration_path = kwargs.get('configuration_path', None) + + +class SsisParameter(Model): + """Ssis parameter. + + :param id: Parameter id. + :type id: long + :param name: Parameter name. + :type name: str + :param description: Parameter description. + :type description: str + :param data_type: Parameter type. + :type data_type: str + :param required: Whether parameter is required. + :type required: bool + :param sensitive: Whether parameter is sensitive. + :type sensitive: bool + :param design_default_value: Design default value of parameter. + :type design_default_value: str + :param default_value: Default value of parameter. + :type default_value: str + :param sensitive_default_value: Default sensitive value of parameter. + :type sensitive_default_value: str + :param value_type: Parameter value type. + :type value_type: str + :param value_set: Parameter value set. + :type value_set: bool + :param variable: Parameter reference variable. + :type variable: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'data_type': {'key': 'dataType', 'type': 'str'}, + 'required': {'key': 'required', 'type': 'bool'}, + 'sensitive': {'key': 'sensitive', 'type': 'bool'}, + 'design_default_value': {'key': 'designDefaultValue', 'type': 'str'}, + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'sensitive_default_value': {'key': 'sensitiveDefaultValue', 'type': 'str'}, + 'value_type': {'key': 'valueType', 'type': 'str'}, + 'value_set': {'key': 'valueSet', 'type': 'bool'}, + 'variable': {'key': 'variable', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SsisParameter, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.data_type = kwargs.get('data_type', None) + self.required = kwargs.get('required', None) + self.sensitive = kwargs.get('sensitive', None) + self.design_default_value = kwargs.get('design_default_value', None) + self.default_value = kwargs.get('default_value', None) + self.sensitive_default_value = kwargs.get('sensitive_default_value', None) + self.value_type = kwargs.get('value_type', None) + self.value_set = kwargs.get('value_set', None) + self.variable = kwargs.get('variable', None) + + +class SsisProject(SsisObjectMetadata): + """Ssis project. + + All required parameters must be populated in order to send to Azure. + + :param id: Metadata id. + :type id: long + :param name: Metadata name. + :type name: str + :param description: Metadata description. + :type description: str + :param type: Required. Constant filled by server. + :type type: str + :param folder_id: Folder id which contains project. + :type folder_id: long + :param version: Project version. + :type version: long + :param environment_refs: Environment reference in project + :type environment_refs: + list[~azure.mgmt.datafactory.models.SsisEnvironmentReference] + :param parameters: Parameters in project + :type parameters: list[~azure.mgmt.datafactory.models.SsisParameter] + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'folder_id': {'key': 'folderId', 'type': 'long'}, + 'version': {'key': 'version', 'type': 'long'}, + 'environment_refs': {'key': 'environmentRefs', 'type': '[SsisEnvironmentReference]'}, + 'parameters': {'key': 'parameters', 'type': '[SsisParameter]'}, + } + + def __init__(self, **kwargs): + super(SsisProject, self).__init__(**kwargs) + self.folder_id = kwargs.get('folder_id', None) + self.version = kwargs.get('version', None) + self.environment_refs = kwargs.get('environment_refs', None) + self.parameters = kwargs.get('parameters', None) + self.type = 'Project' + + +class SSISPropertyOverride(Model): + """SSIS property override. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. SSIS package property override value. Type: string + (or Expression with resultType string). + :type value: object + :param is_sensitive: Whether SSIS package property override value is + sensitive data. Value will be encrypted in SSISDB if it is true + :type is_sensitive: bool + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'object'}, + 'is_sensitive': {'key': 'isSensitive', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(SSISPropertyOverride, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.is_sensitive = kwargs.get('is_sensitive', None) + + +class SsisVariable(Model): + """Ssis variable. + + :param id: Variable id. + :type id: long + :param name: Variable name. + :type name: str + :param description: Variable description. + :type description: str + :param data_type: Variable type. + :type data_type: str + :param sensitive: Whether variable is sensitive. + :type sensitive: bool + :param value: Variable value. + :type value: str + :param sensitive_value: Variable sensitive value. + :type sensitive_value: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'data_type': {'key': 'dataType', 'type': 'str'}, + 'sensitive': {'key': 'sensitive', 'type': 'bool'}, + 'value': {'key': 'value', 'type': 'str'}, + 'sensitive_value': {'key': 'sensitiveValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SsisVariable, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.data_type = kwargs.get('data_type', None) + self.sensitive = kwargs.get('sensitive', None) + self.value = kwargs.get('value', None) + self.sensitive_value = kwargs.get('sensitive_value', None) + + +class StagingSettings(Model): + """Staging settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param linked_service_name: Required. Staging linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param path: The path to storage for storing the interim data. Type: + string (or Expression with resultType string). + :type path: object + :param enable_compression: Specifies whether to use compression when + copying data via an interim staging. Default value is false. Type: boolean + (or Expression with resultType boolean). + :type enable_compression: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'path': {'key': 'path', 'type': 'object'}, + 'enable_compression': {'key': 'enableCompression', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(StagingSettings, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.linked_service_name = kwargs.get('linked_service_name', None) + self.path = kwargs.get('path', None) + self.enable_compression = kwargs.get('enable_compression', None) + + +class StoredProcedureParameter(Model): + """SQL stored procedure parameter. + + :param value: Stored procedure parameter value. Type: string (or + Expression with resultType string). + :type value: object + :param type: Stored procedure parameter type. Possible values include: + 'String', 'Int', 'Int64', 'Decimal', 'Guid', 'Boolean', 'Date' + :type type: str or + ~azure.mgmt.datafactory.models.StoredProcedureParameterType + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StoredProcedureParameter, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.type = kwargs.get('type', None) + + +class SybaseLinkedService(LinkedService): + """Linked service for Sybase data source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param server: Required. Server name for connection. Type: string (or + Expression with resultType string). + :type server: object + :param database: Required. Database name for connection. Type: string (or + Expression with resultType string). + :type database: object + :param schema: Schema name for connection. Type: string (or Expression + with resultType string). + :type schema: object + :param authentication_type: AuthenticationType to be used for connection. + Possible values include: 'Basic', 'Windows' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.SybaseAuthenticationType + :param username: Username for authentication. Type: string (or Expression + with resultType string). + :type username: object + :param password: Password for authentication. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'server': {'required': True}, + 'database': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server': {'key': 'typeProperties.server', 'type': 'object'}, + 'database': {'key': 'typeProperties.database', 'type': 'object'}, + 'schema': {'key': 'typeProperties.schema', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SybaseLinkedService, self).__init__(**kwargs) + self.server = kwargs.get('server', None) + self.database = kwargs.get('database', None) + self.schema = kwargs.get('schema', None) + self.authentication_type = kwargs.get('authentication_type', None) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'Sybase' + + +class SybaseSource(CopySource): + """A copy activity source for Sybase databases. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: Database query. Type: string (or Expression with resultType + string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SybaseSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'SybaseSource' + + +class SybaseTableDataset(Dataset): + """The Sybase table dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The Sybase table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SybaseTableDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.type = 'SybaseTable' + + +class TeradataLinkedService(LinkedService): + """Linked service for Teradata data source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: Teradata ODBC connection string. Type: string, + SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param server: Server name for connection. Type: string (or Expression + with resultType string). + :type server: object + :param authentication_type: AuthenticationType to be used for connection. + Possible values include: 'Basic', 'Windows' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.TeradataAuthenticationType + :param username: Username for authentication. Type: string (or Expression + with resultType string). + :type username: object + :param password: Password for authentication. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'server': {'key': 'typeProperties.server', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(TeradataLinkedService, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.server = kwargs.get('server', None) + self.authentication_type = kwargs.get('authentication_type', None) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'Teradata' + + +class TeradataPartitionSettings(Model): + """The settings that will be leveraged for teradata source partitioning. + + :param partition_column_name: The name of the column that will be used for + proceeding range or hash partitioning. Type: string (or Expression with + resultType string). + :type partition_column_name: object + :param partition_upper_bound: The maximum value of column specified in + partitionColumnName that will be used for proceeding range partitioning. + Type: string (or Expression with resultType string). + :type partition_upper_bound: object + :param partition_lower_bound: The minimum value of column specified in + partitionColumnName that will be used for proceeding range partitioning. + Type: string (or Expression with resultType string). + :type partition_lower_bound: object + """ + + _attribute_map = { + 'partition_column_name': {'key': 'partitionColumnName', 'type': 'object'}, + 'partition_upper_bound': {'key': 'partitionUpperBound', 'type': 'object'}, + 'partition_lower_bound': {'key': 'partitionLowerBound', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(TeradataPartitionSettings, self).__init__(**kwargs) + self.partition_column_name = kwargs.get('partition_column_name', None) + self.partition_upper_bound = kwargs.get('partition_upper_bound', None) + self.partition_lower_bound = kwargs.get('partition_lower_bound', None) + + +class TeradataSource(CopySource): + """A copy activity Teradata source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: Teradata query. Type: string (or Expression with resultType + string). + :type query: object + :param partition_option: The partition mechanism that will be used for + teradata read in parallel. Possible values include: 'None', 'Hash', + 'DynamicRange' + :type partition_option: str or + ~azure.mgmt.datafactory.models.TeradataPartitionOption + :param partition_settings: The settings that will be leveraged for + teradata source partitioning. + :type partition_settings: + ~azure.mgmt.datafactory.models.TeradataPartitionSettings + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + 'partition_option': {'key': 'partitionOption', 'type': 'str'}, + 'partition_settings': {'key': 'partitionSettings', 'type': 'TeradataPartitionSettings'}, + } + + def __init__(self, **kwargs): + super(TeradataSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.partition_option = kwargs.get('partition_option', None) + self.partition_settings = kwargs.get('partition_settings', None) + self.type = 'TeradataSource' + + +class TeradataTableDataset(Dataset): + """The Teradata database dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param database: The database name of Teradata. Type: string (or + Expression with resultType string). + :type database: object + :param table: The table name of Teradata. Type: string (or Expression with + resultType string). + :type table: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database': {'key': 'typeProperties.database', 'type': 'object'}, + 'table': {'key': 'typeProperties.table', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(TeradataTableDataset, self).__init__(**kwargs) + self.database = kwargs.get('database', None) + self.table = kwargs.get('table', None) + self.type = 'TeradataTable' + + +class TextFormat(DatasetStorageFormat): + """The data stored in text format. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param serializer: Serializer. Type: string (or Expression with resultType + string). + :type serializer: object + :param deserializer: Deserializer. Type: string (or Expression with + resultType string). + :type deserializer: object + :param type: Required. Constant filled by server. + :type type: str + :param column_delimiter: The column delimiter. Type: string (or Expression + with resultType string). + :type column_delimiter: object + :param row_delimiter: The row delimiter. Type: string (or Expression with + resultType string). + :type row_delimiter: object + :param escape_char: The escape character. Type: string (or Expression with + resultType string). + :type escape_char: object + :param quote_char: The quote character. Type: string (or Expression with + resultType string). + :type quote_char: object + :param null_value: The null value string. Type: string (or Expression with + resultType string). + :type null_value: object + :param encoding_name: The code page name of the preferred encoding. If + miss, the default value is ΓÇ£utf-8ΓÇ¥, unless BOM denotes another Unicode + encoding. Refer to the ΓÇ£NameΓÇ¥ column of the table in the following + link to set supported values: + https://msdn.microsoft.com/library/system.text.encoding.aspx. Type: string + (or Expression with resultType string). + :type encoding_name: object + :param treat_empty_as_null: Treat empty column values in the text file as + null. The default value is true. Type: boolean (or Expression with + resultType boolean). + :type treat_empty_as_null: object + :param skip_line_count: The number of lines/rows to be skipped when + parsing text files. The default value is 0. Type: integer (or Expression + with resultType integer). + :type skip_line_count: object + :param first_row_as_header: When used as input, treat the first row of + data as headers. When used as output,write the headers into the output as + the first row of data. The default value is false. Type: boolean (or + Expression with resultType boolean). + :type first_row_as_header: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'serializer': {'key': 'serializer', 'type': 'object'}, + 'deserializer': {'key': 'deserializer', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'column_delimiter': {'key': 'columnDelimiter', 'type': 'object'}, + 'row_delimiter': {'key': 'rowDelimiter', 'type': 'object'}, + 'escape_char': {'key': 'escapeChar', 'type': 'object'}, + 'quote_char': {'key': 'quoteChar', 'type': 'object'}, + 'null_value': {'key': 'nullValue', 'type': 'object'}, + 'encoding_name': {'key': 'encodingName', 'type': 'object'}, + 'treat_empty_as_null': {'key': 'treatEmptyAsNull', 'type': 'object'}, + 'skip_line_count': {'key': 'skipLineCount', 'type': 'object'}, + 'first_row_as_header': {'key': 'firstRowAsHeader', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(TextFormat, self).__init__(**kwargs) + self.column_delimiter = kwargs.get('column_delimiter', None) + self.row_delimiter = kwargs.get('row_delimiter', None) + self.escape_char = kwargs.get('escape_char', None) + self.quote_char = kwargs.get('quote_char', None) + self.null_value = kwargs.get('null_value', None) + self.encoding_name = kwargs.get('encoding_name', None) + self.treat_empty_as_null = kwargs.get('treat_empty_as_null', None) + self.skip_line_count = kwargs.get('skip_line_count', None) + self.first_row_as_header = kwargs.get('first_row_as_header', None) + self.type = 'TextFormat' + + +class TriggerDependencyReference(DependencyReference): + """Trigger referenced dependency. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: TumblingWindowTriggerDependencyReference + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param reference_trigger: Required. Referenced trigger. + :type reference_trigger: ~azure.mgmt.datafactory.models.TriggerReference + """ + + _validation = { + 'type': {'required': True}, + 'reference_trigger': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'reference_trigger': {'key': 'referenceTrigger', 'type': 'TriggerReference'}, + } + + _subtype_map = { + 'type': {'TumblingWindowTriggerDependencyReference': 'TumblingWindowTriggerDependencyReference'} + } + + def __init__(self, **kwargs): + super(TriggerDependencyReference, self).__init__(**kwargs) + self.reference_trigger = kwargs.get('reference_trigger', None) + self.type = 'TriggerDependencyReference' + + +class TriggerPipelineReference(Model): + """Pipeline that needs to be triggered with the given parameters. + + :param pipeline_reference: Pipeline reference. + :type pipeline_reference: ~azure.mgmt.datafactory.models.PipelineReference + :param parameters: Pipeline parameters. + :type parameters: dict[str, object] + """ + + _attribute_map = { + 'pipeline_reference': {'key': 'pipelineReference', 'type': 'PipelineReference'}, + 'parameters': {'key': 'parameters', 'type': '{object}'}, + } + + def __init__(self, **kwargs): + super(TriggerPipelineReference, self).__init__(**kwargs) + self.pipeline_reference = kwargs.get('pipeline_reference', None) + self.parameters = kwargs.get('parameters', None) + + +class TriggerReference(Model): + """Trigger reference type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. Trigger reference type. Default value: + "TriggerReference" . + :vartype type: str + :param reference_name: Required. Reference trigger name. + :type reference_name: str + """ + + _validation = { + 'type': {'required': True, 'constant': True}, + 'reference_name': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'reference_name': {'key': 'referenceName', 'type': 'str'}, + } + + type = "TriggerReference" + + def __init__(self, **kwargs): + super(TriggerReference, self).__init__(**kwargs) + self.reference_name = kwargs.get('reference_name', None) + + +class TriggerResource(SubResource): + """Trigger resource type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar etag: Etag identifies change in the resource. + :vartype etag: str + :param properties: Required. Properties of the trigger. + :type properties: ~azure.mgmt.datafactory.models.Trigger + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'Trigger'}, + } + + def __init__(self, **kwargs): + super(TriggerResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class TriggerRun(Model): + """Trigger runs. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar trigger_run_id: Trigger run id. + :vartype trigger_run_id: str + :ivar trigger_name: Trigger name. + :vartype trigger_name: str + :ivar trigger_type: Trigger type. + :vartype trigger_type: str + :ivar trigger_run_timestamp: Trigger run start time. + :vartype trigger_run_timestamp: datetime + :ivar status: Trigger run status. Possible values include: 'Succeeded', + 'Failed', 'Inprogress' + :vartype status: str or ~azure.mgmt.datafactory.models.TriggerRunStatus + :ivar message: Trigger error message. + :vartype message: str + :ivar properties: List of property name and value related to trigger run. + Name, value pair depends on type of trigger. + :vartype properties: dict[str, str] + :ivar triggered_pipelines: List of pipeline name and run Id triggered by + the trigger run. + :vartype triggered_pipelines: dict[str, str] + """ + + _validation = { + 'trigger_run_id': {'readonly': True}, + 'trigger_name': {'readonly': True}, + 'trigger_type': {'readonly': True}, + 'trigger_run_timestamp': {'readonly': True}, + 'status': {'readonly': True}, + 'message': {'readonly': True}, + 'properties': {'readonly': True}, + 'triggered_pipelines': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'trigger_run_id': {'key': 'triggerRunId', 'type': 'str'}, + 'trigger_name': {'key': 'triggerName', 'type': 'str'}, + 'trigger_type': {'key': 'triggerType', 'type': 'str'}, + 'trigger_run_timestamp': {'key': 'triggerRunTimestamp', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'triggered_pipelines': {'key': 'triggeredPipelines', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(TriggerRun, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.trigger_run_id = None + self.trigger_name = None + self.trigger_type = None + self.trigger_run_timestamp = None + self.status = None + self.message = None + self.properties = None + self.triggered_pipelines = None + + +class TriggerRunsQueryResponse(Model): + """A list of trigger runs. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of trigger runs. + :type value: list[~azure.mgmt.datafactory.models.TriggerRun] + :param continuation_token: The continuation token for getting the next + page of results, if any remaining results exist, null otherwise. + :type continuation_token: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[TriggerRun]'}, + 'continuation_token': {'key': 'continuationToken', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TriggerRunsQueryResponse, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.continuation_token = kwargs.get('continuation_token', None) + + +class TumblingWindowTrigger(Trigger): + """Trigger that schedules pipeline runs for all fixed time interval windows + from a start time without gaps and also supports backfill scenarios (when + start time is in the past). + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Trigger description. + :type description: str + :ivar runtime_state: Indicates if trigger is running or not. Updated when + Start/Stop APIs are called on the Trigger. Possible values include: + 'Started', 'Stopped', 'Disabled' + :vartype runtime_state: str or + ~azure.mgmt.datafactory.models.TriggerRuntimeState + :param annotations: List of tags that can be used for describing the + trigger. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param pipeline: Required. Pipeline for which runs are created when an + event is fired for trigger window that is ready. + :type pipeline: ~azure.mgmt.datafactory.models.TriggerPipelineReference + :param frequency: Required. The frequency of the time windows. Possible + values include: 'Minute', 'Hour' + :type frequency: str or + ~azure.mgmt.datafactory.models.TumblingWindowFrequency + :param interval: Required. The interval of the time windows. The minimum + interval allowed is 15 Minutes. + :type interval: int + :param start_time: Required. The start time for the time period for the + trigger during which events are fired for windows that are ready. Only UTC + time is currently supported. + :type start_time: datetime + :param end_time: The end time for the time period for the trigger during + which events are fired for windows that are ready. Only UTC time is + currently supported. + :type end_time: datetime + :param delay: Specifies how long the trigger waits past due time before + triggering new run. It doesn't alter window start and end time. The + default is 0. Type: string (or Expression with resultType string), + pattern: ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type delay: object + :param max_concurrency: Required. The max number of parallel time windows + (ready for execution) for which a new run is triggered. + :type max_concurrency: int + :param retry_policy: Retry policy that will be applied for failed pipeline + runs. + :type retry_policy: ~azure.mgmt.datafactory.models.RetryPolicy + :param depends_on: Triggers that this trigger depends on. Only tumbling + window triggers are supported. + :type depends_on: list[~azure.mgmt.datafactory.models.DependencyReference] + """ + + _validation = { + 'runtime_state': {'readonly': True}, + 'type': {'required': True}, + 'pipeline': {'required': True}, + 'frequency': {'required': True}, + 'interval': {'required': True}, + 'start_time': {'required': True}, + 'max_concurrency': {'required': True, 'maximum': 50, 'minimum': 1}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'runtime_state': {'key': 'runtimeState', 'type': 'str'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'pipeline': {'key': 'pipeline', 'type': 'TriggerPipelineReference'}, + 'frequency': {'key': 'typeProperties.frequency', 'type': 'str'}, + 'interval': {'key': 'typeProperties.interval', 'type': 'int'}, + 'start_time': {'key': 'typeProperties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'typeProperties.endTime', 'type': 'iso-8601'}, + 'delay': {'key': 'typeProperties.delay', 'type': 'object'}, + 'max_concurrency': {'key': 'typeProperties.maxConcurrency', 'type': 'int'}, + 'retry_policy': {'key': 'typeProperties.retryPolicy', 'type': 'RetryPolicy'}, + 'depends_on': {'key': 'typeProperties.dependsOn', 'type': '[DependencyReference]'}, + } + + def __init__(self, **kwargs): + super(TumblingWindowTrigger, self).__init__(**kwargs) + self.pipeline = kwargs.get('pipeline', None) + self.frequency = kwargs.get('frequency', None) + self.interval = kwargs.get('interval', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.delay = kwargs.get('delay', None) + self.max_concurrency = kwargs.get('max_concurrency', None) + self.retry_policy = kwargs.get('retry_policy', None) + self.depends_on = kwargs.get('depends_on', None) + self.type = 'TumblingWindowTrigger' + + +class TumblingWindowTriggerDependencyReference(TriggerDependencyReference): + """Referenced tumbling window trigger dependency. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param reference_trigger: Required. Referenced trigger. + :type reference_trigger: ~azure.mgmt.datafactory.models.TriggerReference + :param offset: Timespan applied to the start time of a tumbling window + when evaluating dependency. + :type offset: str + :param size: The size of the window when evaluating the dependency. If + undefined the frequency of the tumbling window will be used. + :type size: str + """ + + _validation = { + 'type': {'required': True}, + 'reference_trigger': {'required': True}, + 'offset': {'max_length': 15, 'min_length': 8, 'pattern': r'((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9]))'}, + 'size': {'max_length': 15, 'min_length': 8, 'pattern': r'((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9]))'}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'reference_trigger': {'key': 'referenceTrigger', 'type': 'TriggerReference'}, + 'offset': {'key': 'offset', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TumblingWindowTriggerDependencyReference, self).__init__(**kwargs) + self.offset = kwargs.get('offset', None) + self.size = kwargs.get('size', None) + self.type = 'TumblingWindowTriggerDependencyReference' + + +class UntilActivity(ControlActivity): + """This activity executes inner activities until the specified boolean + expression results to true or timeout is reached, whichever is earlier. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param expression: Required. An expression that would evaluate to Boolean. + The loop will continue until this expression evaluates to true + :type expression: ~azure.mgmt.datafactory.models.Expression + :param timeout: Specifies the timeout for the activity to run. If there is + no value specified, it takes the value of TimeSpan.FromDays(7) which is 1 + week as default. Type: string (or Expression with resultType string), + pattern: ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). Type: + string (or Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type timeout: object + :param activities: Required. List of activities to execute. + :type activities: list[~azure.mgmt.datafactory.models.Activity] + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'expression': {'required': True}, + 'activities': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'expression': {'key': 'typeProperties.expression', 'type': 'Expression'}, + 'timeout': {'key': 'typeProperties.timeout', 'type': 'object'}, + 'activities': {'key': 'typeProperties.activities', 'type': '[Activity]'}, + } + + def __init__(self, **kwargs): + super(UntilActivity, self).__init__(**kwargs) + self.expression = kwargs.get('expression', None) + self.timeout = kwargs.get('timeout', None) + self.activities = kwargs.get('activities', None) + self.type = 'Until' + + +class UpdateIntegrationRuntimeNodeRequest(Model): + """Update integration runtime node request. + + :param concurrent_jobs_limit: The number of concurrent jobs permitted to + run on the integration runtime node. Values between 1 and + maxConcurrentJobs(inclusive) are allowed. + :type concurrent_jobs_limit: int + """ + + _validation = { + 'concurrent_jobs_limit': {'minimum': 1}, + } + + _attribute_map = { + 'concurrent_jobs_limit': {'key': 'concurrentJobsLimit', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(UpdateIntegrationRuntimeNodeRequest, self).__init__(**kwargs) + self.concurrent_jobs_limit = kwargs.get('concurrent_jobs_limit', None) + + +class UpdateIntegrationRuntimeRequest(Model): + """Update integration runtime request. + + :param auto_update: Enables or disables the auto-update feature of the + self-hosted integration runtime. See + https://go.microsoft.com/fwlink/?linkid=854189. Possible values include: + 'On', 'Off' + :type auto_update: str or + ~azure.mgmt.datafactory.models.IntegrationRuntimeAutoUpdate + :param update_delay_offset: The time offset (in hours) in the day, e.g., + PT03H is 3 hours. The integration runtime auto update will happen on that + time. + :type update_delay_offset: str + """ + + _attribute_map = { + 'auto_update': {'key': 'autoUpdate', 'type': 'str'}, + 'update_delay_offset': {'key': 'updateDelayOffset', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UpdateIntegrationRuntimeRequest, self).__init__(**kwargs) + self.auto_update = kwargs.get('auto_update', None) + self.update_delay_offset = kwargs.get('update_delay_offset', None) + + +class UserAccessPolicy(Model): + """Get Data Plane read only token request definition. + + :param permissions: The string with permissions for Data Plane access. + Currently only 'r' is supported which grants read only access. + :type permissions: str + :param access_resource_path: The resource path to get access relative to + factory. Currently only empty string is supported which corresponds to the + factory resource. + :type access_resource_path: str + :param profile_name: The name of the profile. Currently only the default + is supported. The default value is DefaultProfile. + :type profile_name: str + :param start_time: Start time for the token. If not specified the current + time will be used. + :type start_time: str + :param expire_time: Expiration time for the token. Maximum duration for + the token is eight hours and by default the token will expire in eight + hours. + :type expire_time: str + """ + + _attribute_map = { + 'permissions': {'key': 'permissions', 'type': 'str'}, + 'access_resource_path': {'key': 'accessResourcePath', 'type': 'str'}, + 'profile_name': {'key': 'profileName', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'expire_time': {'key': 'expireTime', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserAccessPolicy, self).__init__(**kwargs) + self.permissions = kwargs.get('permissions', None) + self.access_resource_path = kwargs.get('access_resource_path', None) + self.profile_name = kwargs.get('profile_name', None) + self.start_time = kwargs.get('start_time', None) + self.expire_time = kwargs.get('expire_time', None) + + +class UserProperty(Model): + """User property. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. User property name. + :type name: str + :param value: Required. User property value. Type: string (or Expression + with resultType string). + :type value: object + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(UserProperty, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class ValidationActivity(ControlActivity): + """This activity verifies that an external resource exists. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param timeout: Specifies the timeout for the activity to run. If there is + no value specified, it takes the value of TimeSpan.FromDays(7) which is 1 + week as default. Type: string (or Expression with resultType string), + pattern: ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type timeout: object + :param sleep: A delay in seconds between validation attempts. If no value + is specified, 10 seconds will be used as the default. Type: integer (or + Expression with resultType integer). + :type sleep: object + :param minimum_size: Can be used if dataset points to a file. The file + must be greater than or equal in size to the value specified. Type: + integer (or Expression with resultType integer). + :type minimum_size: object + :param child_items: Can be used if dataset points to a folder. If set to + true, the folder must have at least one file. If set to false, the folder + must be empty. Type: boolean (or Expression with resultType boolean). + :type child_items: object + :param dataset: Required. Validation activity dataset reference. + :type dataset: ~azure.mgmt.datafactory.models.DatasetReference + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'dataset': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'timeout': {'key': 'typeProperties.timeout', 'type': 'object'}, + 'sleep': {'key': 'typeProperties.sleep', 'type': 'object'}, + 'minimum_size': {'key': 'typeProperties.minimumSize', 'type': 'object'}, + 'child_items': {'key': 'typeProperties.childItems', 'type': 'object'}, + 'dataset': {'key': 'typeProperties.dataset', 'type': 'DatasetReference'}, + } + + def __init__(self, **kwargs): + super(ValidationActivity, self).__init__(**kwargs) + self.timeout = kwargs.get('timeout', None) + self.sleep = kwargs.get('sleep', None) + self.minimum_size = kwargs.get('minimum_size', None) + self.child_items = kwargs.get('child_items', None) + self.dataset = kwargs.get('dataset', None) + self.type = 'Validation' + + +class VariableSpecification(Model): + """Definition of a single variable for a Pipeline. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Variable type. Possible values include: 'String', + 'Bool', 'Array' + :type type: str or ~azure.mgmt.datafactory.models.VariableType + :param default_value: Default value of variable. + :type default_value: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'default_value': {'key': 'defaultValue', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(VariableSpecification, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.default_value = kwargs.get('default_value', None) + + +class VerticaLinkedService(LinkedService): + """Vertica linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: An ODBC connection string. Type: string, + SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param pwd: The Azure key vault secret reference of password in connection + string. + :type pwd: ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'pwd': {'key': 'typeProperties.pwd', 'type': 'AzureKeyVaultSecretReference'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(VerticaLinkedService, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.pwd = kwargs.get('pwd', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'Vertica' + + +class VerticaSource(CopySource): + """A copy activity Vertica source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(VerticaSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'VerticaSource' + + +class VerticaTableDataset(Dataset): + """Vertica dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: This property will be retired. Please consider using + schema + table properties instead. + :type table_name: object + :param table: The table name of the Vertica. Type: string (or Expression + with resultType string). + :type table: object + :param vertica_table_dataset_schema: The schema name of the Vertica. Type: + string (or Expression with resultType string). + :type vertica_table_dataset_schema: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + 'table': {'key': 'typeProperties.table', 'type': 'object'}, + 'vertica_table_dataset_schema': {'key': 'typeProperties.schema', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(VerticaTableDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.table = kwargs.get('table', None) + self.vertica_table_dataset_schema = kwargs.get('vertica_table_dataset_schema', None) + self.type = 'VerticaTable' + + +class WaitActivity(ControlActivity): + """This activity suspends pipeline execution for the specified interval. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param wait_time_in_seconds: Required. Duration in seconds. + :type wait_time_in_seconds: int + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'wait_time_in_seconds': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'wait_time_in_seconds': {'key': 'typeProperties.waitTimeInSeconds', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(WaitActivity, self).__init__(**kwargs) + self.wait_time_in_seconds = kwargs.get('wait_time_in_seconds', None) + self.type = 'Wait' + + +class WebActivity(ExecutionActivity): + """Web activity. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param method: Required. Rest API method for target endpoint. Possible + values include: 'GET', 'POST', 'PUT', 'DELETE' + :type method: str or ~azure.mgmt.datafactory.models.WebActivityMethod + :param url: Required. Web activity target endpoint and path. Type: string + (or Expression with resultType string). + :type url: object + :param headers: Represents the headers that will be sent to the request. + For example, to set the language and type on a request: "headers" : { + "Accept-Language": "en-us", "Content-Type": "application/json" }. Type: + string (or Expression with resultType string). + :type headers: object + :param body: Represents the payload that will be sent to the endpoint. + Required for POST/PUT method, not allowed for GET method Type: string (or + Expression with resultType string). + :type body: object + :param authentication: Authentication method used for calling the + endpoint. + :type authentication: + ~azure.mgmt.datafactory.models.WebActivityAuthentication + :param datasets: List of datasets passed to web endpoint. + :type datasets: list[~azure.mgmt.datafactory.models.DatasetReference] + :param linked_services: List of linked services passed to web endpoint. + :type linked_services: + list[~azure.mgmt.datafactory.models.LinkedServiceReference] + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'method': {'required': True}, + 'url': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'method': {'key': 'typeProperties.method', 'type': 'str'}, + 'url': {'key': 'typeProperties.url', 'type': 'object'}, + 'headers': {'key': 'typeProperties.headers', 'type': 'object'}, + 'body': {'key': 'typeProperties.body', 'type': 'object'}, + 'authentication': {'key': 'typeProperties.authentication', 'type': 'WebActivityAuthentication'}, + 'datasets': {'key': 'typeProperties.datasets', 'type': '[DatasetReference]'}, + 'linked_services': {'key': 'typeProperties.linkedServices', 'type': '[LinkedServiceReference]'}, + } + + def __init__(self, **kwargs): + super(WebActivity, self).__init__(**kwargs) + self.method = kwargs.get('method', None) + self.url = kwargs.get('url', None) + self.headers = kwargs.get('headers', None) + self.body = kwargs.get('body', None) + self.authentication = kwargs.get('authentication', None) + self.datasets = kwargs.get('datasets', None) + self.linked_services = kwargs.get('linked_services', None) + self.type = 'WebActivity' + + +class WebActivityAuthentication(Model): + """Web activity authentication properties. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Web activity authentication + (Basic/ClientCertificate/MSI) + :type type: str + :param pfx: Base64-encoded contents of a PFX file. + :type pfx: ~azure.mgmt.datafactory.models.SecureString + :param username: Web activity authentication user name for basic + authentication. + :type username: str + :param password: Password for the PFX file or basic authentication. + :type password: ~azure.mgmt.datafactory.models.SecureString + :param resource: Resource for which Azure Auth token will be requested + when using MSI Authentication. + :type resource: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'pfx': {'key': 'pfx', 'type': 'SecureString'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'SecureString'}, + 'resource': {'key': 'resource', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WebActivityAuthentication, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.pfx = kwargs.get('pfx', None) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + self.resource = kwargs.get('resource', None) + + +class WebLinkedServiceTypeProperties(Model): + """Base definition of WebLinkedServiceTypeProperties, this typeProperties is + polymorphic based on authenticationType, so not flattened in SDK models. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: WebClientCertificateAuthentication, + WebBasicAuthentication, WebAnonymousAuthentication + + All required parameters must be populated in order to send to Azure. + + :param url: Required. The URL of the web service endpoint, e.g. + http://www.microsoft.com . Type: string (or Expression with resultType + string). + :type url: object + :param authentication_type: Required. Constant filled by server. + :type authentication_type: str + """ + + _validation = { + 'url': {'required': True}, + 'authentication_type': {'required': True}, + } + + _attribute_map = { + 'url': {'key': 'url', 'type': 'object'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, + } + + _subtype_map = { + 'authentication_type': {'ClientCertificate': 'WebClientCertificateAuthentication', 'Basic': 'WebBasicAuthentication', 'Anonymous': 'WebAnonymousAuthentication'} + } + + def __init__(self, **kwargs): + super(WebLinkedServiceTypeProperties, self).__init__(**kwargs) + self.url = kwargs.get('url', None) + self.authentication_type = None + + +class WebAnonymousAuthentication(WebLinkedServiceTypeProperties): + """A WebLinkedService that uses anonymous authentication to communicate with + an HTTP endpoint. + + All required parameters must be populated in order to send to Azure. + + :param url: Required. The URL of the web service endpoint, e.g. + http://www.microsoft.com . Type: string (or Expression with resultType + string). + :type url: object + :param authentication_type: Required. Constant filled by server. + :type authentication_type: str + """ + + _validation = { + 'url': {'required': True}, + 'authentication_type': {'required': True}, + } + + _attribute_map = { + 'url': {'key': 'url', 'type': 'object'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WebAnonymousAuthentication, self).__init__(**kwargs) + self.authentication_type = 'Anonymous' + + +class WebBasicAuthentication(WebLinkedServiceTypeProperties): + """A WebLinkedService that uses basic authentication to communicate with an + HTTP endpoint. + + All required parameters must be populated in order to send to Azure. + + :param url: Required. The URL of the web service endpoint, e.g. + http://www.microsoft.com . Type: string (or Expression with resultType + string). + :type url: object + :param authentication_type: Required. Constant filled by server. + :type authentication_type: str + :param username: Required. User name for Basic authentication. Type: + string (or Expression with resultType string). + :type username: object + :param password: Required. The password for Basic authentication. + :type password: ~azure.mgmt.datafactory.models.SecretBase + """ + + _validation = { + 'url': {'required': True}, + 'authentication_type': {'required': True}, + 'username': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'url': {'key': 'url', 'type': 'object'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'object'}, + 'password': {'key': 'password', 'type': 'SecretBase'}, + } + + def __init__(self, **kwargs): + super(WebBasicAuthentication, self).__init__(**kwargs) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + self.authentication_type = 'Basic' + + +class WebClientCertificateAuthentication(WebLinkedServiceTypeProperties): + """A WebLinkedService that uses client certificate based authentication to + communicate with an HTTP endpoint. This scheme follows mutual + authentication; the server must also provide valid credentials to the + client. + + All required parameters must be populated in order to send to Azure. + + :param url: Required. The URL of the web service endpoint, e.g. + http://www.microsoft.com . Type: string (or Expression with resultType + string). + :type url: object + :param authentication_type: Required. Constant filled by server. + :type authentication_type: str + :param pfx: Required. Base64-encoded contents of a PFX file. + :type pfx: ~azure.mgmt.datafactory.models.SecretBase + :param password: Required. Password for the PFX file. + :type password: ~azure.mgmt.datafactory.models.SecretBase + """ + + _validation = { + 'url': {'required': True}, + 'authentication_type': {'required': True}, + 'pfx': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'url': {'key': 'url', 'type': 'object'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, + 'pfx': {'key': 'pfx', 'type': 'SecretBase'}, + 'password': {'key': 'password', 'type': 'SecretBase'}, + } + + def __init__(self, **kwargs): + super(WebClientCertificateAuthentication, self).__init__(**kwargs) + self.pfx = kwargs.get('pfx', None) + self.password = kwargs.get('password', None) + self.authentication_type = 'ClientCertificate' + + +class WebHookActivity(ControlActivity): + """WebHook activity. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :ivar method: Required. Rest API method for target endpoint. Default + value: "POST" . + :vartype method: str + :param url: Required. WebHook activity target endpoint and path. Type: + string (or Expression with resultType string). + :type url: object + :param timeout: The timeout within which the webhook should be called + back. If there is no value specified, it defaults to 10 minutes. Type: + string. Pattern: ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type timeout: str + :param headers: Represents the headers that will be sent to the request. + For example, to set the language and type on a request: "headers" : { + "Accept-Language": "en-us", "Content-Type": "application/json" }. Type: + string (or Expression with resultType string). + :type headers: object + :param body: Represents the payload that will be sent to the endpoint. + Required for POST/PUT method, not allowed for GET method Type: string (or + Expression with resultType string). + :type body: object + :param authentication: Authentication method used for calling the + endpoint. + :type authentication: + ~azure.mgmt.datafactory.models.WebActivityAuthentication + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'method': {'required': True, 'constant': True}, + 'url': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'method': {'key': 'typeProperties.method', 'type': 'str'}, + 'url': {'key': 'typeProperties.url', 'type': 'object'}, + 'timeout': {'key': 'typeProperties.timeout', 'type': 'str'}, + 'headers': {'key': 'typeProperties.headers', 'type': 'object'}, + 'body': {'key': 'typeProperties.body', 'type': 'object'}, + 'authentication': {'key': 'typeProperties.authentication', 'type': 'WebActivityAuthentication'}, + } + + method = "POST" + + def __init__(self, **kwargs): + super(WebHookActivity, self).__init__(**kwargs) + self.url = kwargs.get('url', None) + self.timeout = kwargs.get('timeout', None) + self.headers = kwargs.get('headers', None) + self.body = kwargs.get('body', None) + self.authentication = kwargs.get('authentication', None) + self.type = 'WebHook' + + +class WebLinkedService(LinkedService): + """Web linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param type_properties: Required. Web linked service properties. + :type type_properties: + ~azure.mgmt.datafactory.models.WebLinkedServiceTypeProperties + """ + + _validation = { + 'type': {'required': True}, + 'type_properties': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'type_properties': {'key': 'typeProperties', 'type': 'WebLinkedServiceTypeProperties'}, + } + + def __init__(self, **kwargs): + super(WebLinkedService, self).__init__(**kwargs) + self.type_properties = kwargs.get('type_properties', None) + self.type = 'Web' + + +class WebSource(CopySource): + """A copy activity source for web page table. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WebSource, self).__init__(**kwargs) + self.type = 'WebSource' + + +class WebTableDataset(Dataset): + """The dataset points to a HTML table in the web page. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param index: Required. The zero-based index of the table in the web page. + Type: integer (or Expression with resultType integer), minimum: 0. + :type index: object + :param path: The relative URL to the web page from the linked service URL. + Type: string (or Expression with resultType string). + :type path: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + 'index': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'index': {'key': 'typeProperties.index', 'type': 'object'}, + 'path': {'key': 'typeProperties.path', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(WebTableDataset, self).__init__(**kwargs) + self.index = kwargs.get('index', None) + self.path = kwargs.get('path', None) + self.type = 'WebTable' + + +class XeroLinkedService(LinkedService): + """Xero Service linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param host: Required. The endpoint of the Xero server. (i.e. + api.xero.com) + :type host: object + :param consumer_key: The consumer key associated with the Xero + application. + :type consumer_key: ~azure.mgmt.datafactory.models.SecretBase + :param private_key: The private key from the .pem file that was generated + for your Xero private application. You must include all the text from the + .pem file, including the Unix line endings( + ). + :type private_key: ~azure.mgmt.datafactory.models.SecretBase + :param use_encrypted_endpoints: Specifies whether the data source + endpoints are encrypted using HTTPS. The default value is true. + :type use_encrypted_endpoints: object + :param use_host_verification: Specifies whether to require the host name + in the server's certificate to match the host name of the server when + connecting over SSL. The default value is true. + :type use_host_verification: object + :param use_peer_verification: Specifies whether to verify the identity of + the server when connecting over SSL. The default value is true. + :type use_peer_verification: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'host': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'host': {'key': 'typeProperties.host', 'type': 'object'}, + 'consumer_key': {'key': 'typeProperties.consumerKey', 'type': 'SecretBase'}, + 'private_key': {'key': 'typeProperties.privateKey', 'type': 'SecretBase'}, + 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, + 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, + 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(XeroLinkedService, self).__init__(**kwargs) + self.host = kwargs.get('host', None) + self.consumer_key = kwargs.get('consumer_key', None) + self.private_key = kwargs.get('private_key', None) + self.use_encrypted_endpoints = kwargs.get('use_encrypted_endpoints', None) + self.use_host_verification = kwargs.get('use_host_verification', None) + self.use_peer_verification = kwargs.get('use_peer_verification', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'Xero' + + +class XeroObjectDataset(Dataset): + """Xero Service dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(XeroObjectDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.type = 'XeroObject' + + +class XeroSource(CopySource): + """A copy activity Xero Service source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(XeroSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'XeroSource' + + +class ZohoLinkedService(LinkedService): + """Zoho server linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param endpoint: Required. The endpoint of the Zoho server. (i.e. + crm.zoho.com/crm/private) + :type endpoint: object + :param access_token: The access token for Zoho authentication. + :type access_token: ~azure.mgmt.datafactory.models.SecretBase + :param use_encrypted_endpoints: Specifies whether the data source + endpoints are encrypted using HTTPS. The default value is true. + :type use_encrypted_endpoints: object + :param use_host_verification: Specifies whether to require the host name + in the server's certificate to match the host name of the server when + connecting over SSL. The default value is true. + :type use_host_verification: object + :param use_peer_verification: Specifies whether to verify the identity of + the server when connecting over SSL. The default value is true. + :type use_peer_verification: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'endpoint': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'endpoint': {'key': 'typeProperties.endpoint', 'type': 'object'}, + 'access_token': {'key': 'typeProperties.accessToken', 'type': 'SecretBase'}, + 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, + 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, + 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ZohoLinkedService, self).__init__(**kwargs) + self.endpoint = kwargs.get('endpoint', None) + self.access_token = kwargs.get('access_token', None) + self.use_encrypted_endpoints = kwargs.get('use_encrypted_endpoints', None) + self.use_host_verification = kwargs.get('use_host_verification', None) + self.use_peer_verification = kwargs.get('use_peer_verification', None) + self.encrypted_credential = kwargs.get('encrypted_credential', None) + self.type = 'Zoho' + + +class ZohoObjectDataset(Dataset): + """Zoho server dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ZohoObjectDataset, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.type = 'ZohoObject' + + +class ZohoSource(CopySource): + """A copy activity Zoho server source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ZohoSource, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.type = 'ZohoSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/_models_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/_models_py3.py new file mode 100644 index 000000000000..7a791183473b --- /dev/null +++ b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/_models_py3.py @@ -0,0 +1,28514 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AccessPolicyResponse(Model): + """Get Data Plane read only token response definition. + + :param policy: The user access policy. + :type policy: ~azure.mgmt.datafactory.models.UserAccessPolicy + :param access_token: Data Plane read only access token. + :type access_token: str + :param data_plane_url: Data Plane service base URL. + :type data_plane_url: str + """ + + _attribute_map = { + 'policy': {'key': 'policy', 'type': 'UserAccessPolicy'}, + 'access_token': {'key': 'accessToken', 'type': 'str'}, + 'data_plane_url': {'key': 'dataPlaneUrl', 'type': 'str'}, + } + + def __init__(self, *, policy=None, access_token: str=None, data_plane_url: str=None, **kwargs) -> None: + super(AccessPolicyResponse, self).__init__(**kwargs) + self.policy = policy + self.access_token = access_token + self.data_plane_url = data_plane_url + + +class Activity(Model): + """A pipeline activity. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ExecutionActivity, ControlActivity + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'Execution': 'ExecutionActivity', 'Container': 'ControlActivity'} + } + + def __init__(self, *, name: str, additional_properties=None, description: str=None, depends_on=None, user_properties=None, **kwargs) -> None: + super(Activity, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.name = name + self.description = description + self.depends_on = depends_on + self.user_properties = user_properties + self.type = None + + +class ActivityDependency(Model): + """Activity dependency information. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param activity: Required. Activity name. + :type activity: str + :param dependency_conditions: Required. Match-Condition for the + dependency. + :type dependency_conditions: list[str or + ~azure.mgmt.datafactory.models.DependencyCondition] + """ + + _validation = { + 'activity': {'required': True}, + 'dependency_conditions': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'activity': {'key': 'activity', 'type': 'str'}, + 'dependency_conditions': {'key': 'dependencyConditions', 'type': '[str]'}, + } + + def __init__(self, *, activity: str, dependency_conditions, additional_properties=None, **kwargs) -> None: + super(ActivityDependency, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.activity = activity + self.dependency_conditions = dependency_conditions + + +class ActivityPolicy(Model): + """Execution policy for an activity. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param timeout: Specifies the timeout for the activity to run. The default + timeout is 7 days. Type: string (or Expression with resultType string), + pattern: ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type timeout: object + :param retry: Maximum ordinary retry attempts. Default is 0. Type: integer + (or Expression with resultType integer), minimum: 0. + :type retry: object + :param retry_interval_in_seconds: Interval between each retry attempt (in + seconds). The default is 30 sec. + :type retry_interval_in_seconds: int + :param secure_input: When set to true, Input from activity is considered + as secure and will not be logged to monitoring. + :type secure_input: bool + :param secure_output: When set to true, Output from activity is considered + as secure and will not be logged to monitoring. + :type secure_output: bool + """ + + _validation = { + 'retry_interval_in_seconds': {'maximum': 86400, 'minimum': 30}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'timeout': {'key': 'timeout', 'type': 'object'}, + 'retry': {'key': 'retry', 'type': 'object'}, + 'retry_interval_in_seconds': {'key': 'retryIntervalInSeconds', 'type': 'int'}, + 'secure_input': {'key': 'secureInput', 'type': 'bool'}, + 'secure_output': {'key': 'secureOutput', 'type': 'bool'}, + } + + def __init__(self, *, additional_properties=None, timeout=None, retry=None, retry_interval_in_seconds: int=None, secure_input: bool=None, secure_output: bool=None, **kwargs) -> None: + super(ActivityPolicy, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.timeout = timeout + self.retry = retry + self.retry_interval_in_seconds = retry_interval_in_seconds + self.secure_input = secure_input + self.secure_output = secure_output + + +class ActivityRun(Model): + """Information about an activity run in a pipeline. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar pipeline_name: The name of the pipeline. + :vartype pipeline_name: str + :ivar pipeline_run_id: The id of the pipeline run. + :vartype pipeline_run_id: str + :ivar activity_name: The name of the activity. + :vartype activity_name: str + :ivar activity_type: The type of the activity. + :vartype activity_type: str + :ivar activity_run_id: The id of the activity run. + :vartype activity_run_id: str + :ivar linked_service_name: The name of the compute linked service. + :vartype linked_service_name: str + :ivar status: The status of the activity run. + :vartype status: str + :ivar activity_run_start: The start time of the activity run in 'ISO 8601' + format. + :vartype activity_run_start: datetime + :ivar activity_run_end: The end time of the activity run in 'ISO 8601' + format. + :vartype activity_run_end: datetime + :ivar duration_in_ms: The duration of the activity run. + :vartype duration_in_ms: int + :ivar input: The input for the activity. + :vartype input: object + :ivar output: The output for the activity. + :vartype output: object + :ivar error: The error if any from the activity run. + :vartype error: object + """ + + _validation = { + 'pipeline_name': {'readonly': True}, + 'pipeline_run_id': {'readonly': True}, + 'activity_name': {'readonly': True}, + 'activity_type': {'readonly': True}, + 'activity_run_id': {'readonly': True}, + 'linked_service_name': {'readonly': True}, + 'status': {'readonly': True}, + 'activity_run_start': {'readonly': True}, + 'activity_run_end': {'readonly': True}, + 'duration_in_ms': {'readonly': True}, + 'input': {'readonly': True}, + 'output': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'pipeline_name': {'key': 'pipelineName', 'type': 'str'}, + 'pipeline_run_id': {'key': 'pipelineRunId', 'type': 'str'}, + 'activity_name': {'key': 'activityName', 'type': 'str'}, + 'activity_type': {'key': 'activityType', 'type': 'str'}, + 'activity_run_id': {'key': 'activityRunId', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'activity_run_start': {'key': 'activityRunStart', 'type': 'iso-8601'}, + 'activity_run_end': {'key': 'activityRunEnd', 'type': 'iso-8601'}, + 'duration_in_ms': {'key': 'durationInMs', 'type': 'int'}, + 'input': {'key': 'input', 'type': 'object'}, + 'output': {'key': 'output', 'type': 'object'}, + 'error': {'key': 'error', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, **kwargs) -> None: + super(ActivityRun, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.pipeline_name = None + self.pipeline_run_id = None + self.activity_name = None + self.activity_type = None + self.activity_run_id = None + self.linked_service_name = None + self.status = None + self.activity_run_start = None + self.activity_run_end = None + self.duration_in_ms = None + self.input = None + self.output = None + self.error = None + + +class ActivityRunsQueryResponse(Model): + """A list activity runs. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of activity runs. + :type value: list[~azure.mgmt.datafactory.models.ActivityRun] + :param continuation_token: The continuation token for getting the next + page of results, if any remaining results exist, null otherwise. + :type continuation_token: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ActivityRun]'}, + 'continuation_token': {'key': 'continuationToken', 'type': 'str'}, + } + + def __init__(self, *, value, continuation_token: str=None, **kwargs) -> None: + super(ActivityRunsQueryResponse, self).__init__(**kwargs) + self.value = value + self.continuation_token = continuation_token + + +class LinkedService(Model): + """The Azure Data Factory nested object which contains the information and + credential which can be used to connect with related store or compute + resource. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureFunctionLinkedService, + AzureDataExplorerLinkedService, SapTableLinkedService, + GoogleAdWordsLinkedService, OracleServiceCloudLinkedService, + DynamicsAXLinkedService, ResponsysLinkedService, + AzureDatabricksLinkedService, AzureDataLakeAnalyticsLinkedService, + HDInsightOnDemandLinkedService, SalesforceMarketingCloudLinkedService, + NetezzaLinkedService, VerticaLinkedService, ZohoLinkedService, + XeroLinkedService, SquareLinkedService, SparkLinkedService, + ShopifyLinkedService, ServiceNowLinkedService, QuickBooksLinkedService, + PrestoLinkedService, PhoenixLinkedService, PaypalLinkedService, + MarketoLinkedService, AzureMariaDBLinkedService, MariaDBLinkedService, + MagentoLinkedService, JiraLinkedService, ImpalaLinkedService, + HubspotLinkedService, HiveLinkedService, HBaseLinkedService, + GreenplumLinkedService, GoogleBigQueryLinkedService, EloquaLinkedService, + DrillLinkedService, CouchbaseLinkedService, ConcurLinkedService, + AzurePostgreSqlLinkedService, AmazonMWSLinkedService, SapHanaLinkedService, + SapBWLinkedService, SftpServerLinkedService, FtpServerLinkedService, + HttpLinkedService, AzureSearchLinkedService, CustomDataSourceLinkedService, + AmazonRedshiftLinkedService, AmazonS3LinkedService, + RestServiceLinkedService, SapOpenHubLinkedService, SapEccLinkedService, + SapCloudForCustomerLinkedService, SalesforceServiceCloudLinkedService, + SalesforceLinkedService, Office365LinkedService, AzureBlobFSLinkedService, + AzureDataLakeStoreLinkedService, CosmosDbMongoDbApiLinkedService, + MongoDbV2LinkedService, MongoDbLinkedService, CassandraLinkedService, + WebLinkedService, ODataLinkedService, HdfsLinkedService, + MicrosoftAccessLinkedService, InformixLinkedService, OdbcLinkedService, + AzureMLLinkedService, TeradataLinkedService, Db2LinkedService, + SybaseLinkedService, PostgreSqlLinkedService, MySqlLinkedService, + AzureMySqlLinkedService, OracleLinkedService, FileServerLinkedService, + HDInsightLinkedService, CommonDataServiceForAppsLinkedService, + DynamicsCrmLinkedService, DynamicsLinkedService, CosmosDbLinkedService, + AzureKeyVaultLinkedService, AzureBatchLinkedService, + AzureSqlMILinkedService, AzureSqlDatabaseLinkedService, + SqlServerLinkedService, AzureSqlDWLinkedService, + AzureTableStorageLinkedService, AzureBlobStorageLinkedService, + AzureStorageLinkedService + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'AzureFunction': 'AzureFunctionLinkedService', 'AzureDataExplorer': 'AzureDataExplorerLinkedService', 'SapTable': 'SapTableLinkedService', 'GoogleAdWords': 'GoogleAdWordsLinkedService', 'OracleServiceCloud': 'OracleServiceCloudLinkedService', 'DynamicsAX': 'DynamicsAXLinkedService', 'Responsys': 'ResponsysLinkedService', 'AzureDatabricks': 'AzureDatabricksLinkedService', 'AzureDataLakeAnalytics': 'AzureDataLakeAnalyticsLinkedService', 'HDInsightOnDemand': 'HDInsightOnDemandLinkedService', 'SalesforceMarketingCloud': 'SalesforceMarketingCloudLinkedService', 'Netezza': 'NetezzaLinkedService', 'Vertica': 'VerticaLinkedService', 'Zoho': 'ZohoLinkedService', 'Xero': 'XeroLinkedService', 'Square': 'SquareLinkedService', 'Spark': 'SparkLinkedService', 'Shopify': 'ShopifyLinkedService', 'ServiceNow': 'ServiceNowLinkedService', 'QuickBooks': 'QuickBooksLinkedService', 'Presto': 'PrestoLinkedService', 'Phoenix': 'PhoenixLinkedService', 'Paypal': 'PaypalLinkedService', 'Marketo': 'MarketoLinkedService', 'AzureMariaDB': 'AzureMariaDBLinkedService', 'MariaDB': 'MariaDBLinkedService', 'Magento': 'MagentoLinkedService', 'Jira': 'JiraLinkedService', 'Impala': 'ImpalaLinkedService', 'Hubspot': 'HubspotLinkedService', 'Hive': 'HiveLinkedService', 'HBase': 'HBaseLinkedService', 'Greenplum': 'GreenplumLinkedService', 'GoogleBigQuery': 'GoogleBigQueryLinkedService', 'Eloqua': 'EloquaLinkedService', 'Drill': 'DrillLinkedService', 'Couchbase': 'CouchbaseLinkedService', 'Concur': 'ConcurLinkedService', 'AzurePostgreSql': 'AzurePostgreSqlLinkedService', 'AmazonMWS': 'AmazonMWSLinkedService', 'SapHana': 'SapHanaLinkedService', 'SapBW': 'SapBWLinkedService', 'Sftp': 'SftpServerLinkedService', 'FtpServer': 'FtpServerLinkedService', 'HttpServer': 'HttpLinkedService', 'AzureSearch': 'AzureSearchLinkedService', 'CustomDataSource': 'CustomDataSourceLinkedService', 'AmazonRedshift': 'AmazonRedshiftLinkedService', 'AmazonS3': 'AmazonS3LinkedService', 'RestService': 'RestServiceLinkedService', 'SapOpenHub': 'SapOpenHubLinkedService', 'SapEcc': 'SapEccLinkedService', 'SapCloudForCustomer': 'SapCloudForCustomerLinkedService', 'SalesforceServiceCloud': 'SalesforceServiceCloudLinkedService', 'Salesforce': 'SalesforceLinkedService', 'Office365': 'Office365LinkedService', 'AzureBlobFS': 'AzureBlobFSLinkedService', 'AzureDataLakeStore': 'AzureDataLakeStoreLinkedService', 'CosmosDbMongoDbApi': 'CosmosDbMongoDbApiLinkedService', 'MongoDbV2': 'MongoDbV2LinkedService', 'MongoDb': 'MongoDbLinkedService', 'Cassandra': 'CassandraLinkedService', 'Web': 'WebLinkedService', 'OData': 'ODataLinkedService', 'Hdfs': 'HdfsLinkedService', 'MicrosoftAccess': 'MicrosoftAccessLinkedService', 'Informix': 'InformixLinkedService', 'Odbc': 'OdbcLinkedService', 'AzureML': 'AzureMLLinkedService', 'Teradata': 'TeradataLinkedService', 'Db2': 'Db2LinkedService', 'Sybase': 'SybaseLinkedService', 'PostgreSql': 'PostgreSqlLinkedService', 'MySql': 'MySqlLinkedService', 'AzureMySql': 'AzureMySqlLinkedService', 'Oracle': 'OracleLinkedService', 'FileServer': 'FileServerLinkedService', 'HDInsight': 'HDInsightLinkedService', 'CommonDataServiceForApps': 'CommonDataServiceForAppsLinkedService', 'DynamicsCrm': 'DynamicsCrmLinkedService', 'Dynamics': 'DynamicsLinkedService', 'CosmosDb': 'CosmosDbLinkedService', 'AzureKeyVault': 'AzureKeyVaultLinkedService', 'AzureBatch': 'AzureBatchLinkedService', 'AzureSqlMI': 'AzureSqlMILinkedService', 'AzureSqlDatabase': 'AzureSqlDatabaseLinkedService', 'SqlServer': 'SqlServerLinkedService', 'AzureSqlDW': 'AzureSqlDWLinkedService', 'AzureTableStorage': 'AzureTableStorageLinkedService', 'AzureBlobStorage': 'AzureBlobStorageLinkedService', 'AzureStorage': 'AzureStorageLinkedService'} + } + + def __init__(self, *, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, **kwargs) -> None: + super(LinkedService, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.connect_via = connect_via + self.description = description + self.parameters = parameters + self.annotations = annotations + self.type = None + + +class AmazonMWSLinkedService(LinkedService): + """Amazon Marketplace Web Service linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param endpoint: Required. The endpoint of the Amazon MWS server, (i.e. + mws.amazonservices.com) + :type endpoint: object + :param marketplace_id: Required. The Amazon Marketplace ID you want to + retrieve data from. To retrieve data from multiple Marketplace IDs, + separate them with a comma (,). (i.e. A2EUQ1WTGCTBG2) + :type marketplace_id: object + :param seller_id: Required. The Amazon seller ID. + :type seller_id: object + :param mws_auth_token: The Amazon MWS authentication token. + :type mws_auth_token: ~azure.mgmt.datafactory.models.SecretBase + :param access_key_id: Required. The access key id used to access data. + :type access_key_id: object + :param secret_key: The secret key used to access data. + :type secret_key: ~azure.mgmt.datafactory.models.SecretBase + :param use_encrypted_endpoints: Specifies whether the data source + endpoints are encrypted using HTTPS. The default value is true. + :type use_encrypted_endpoints: object + :param use_host_verification: Specifies whether to require the host name + in the server's certificate to match the host name of the server when + connecting over SSL. The default value is true. + :type use_host_verification: object + :param use_peer_verification: Specifies whether to verify the identity of + the server when connecting over SSL. The default value is true. + :type use_peer_verification: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'endpoint': {'required': True}, + 'marketplace_id': {'required': True}, + 'seller_id': {'required': True}, + 'access_key_id': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'endpoint': {'key': 'typeProperties.endpoint', 'type': 'object'}, + 'marketplace_id': {'key': 'typeProperties.marketplaceID', 'type': 'object'}, + 'seller_id': {'key': 'typeProperties.sellerID', 'type': 'object'}, + 'mws_auth_token': {'key': 'typeProperties.mwsAuthToken', 'type': 'SecretBase'}, + 'access_key_id': {'key': 'typeProperties.accessKeyId', 'type': 'object'}, + 'secret_key': {'key': 'typeProperties.secretKey', 'type': 'SecretBase'}, + 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, + 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, + 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, endpoint, marketplace_id, seller_id, access_key_id, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, mws_auth_token=None, secret_key=None, use_encrypted_endpoints=None, use_host_verification=None, use_peer_verification=None, encrypted_credential=None, **kwargs) -> None: + super(AmazonMWSLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.endpoint = endpoint + self.marketplace_id = marketplace_id + self.seller_id = seller_id + self.mws_auth_token = mws_auth_token + self.access_key_id = access_key_id + self.secret_key = secret_key + self.use_encrypted_endpoints = use_encrypted_endpoints + self.use_host_verification = use_host_verification + self.use_peer_verification = use_peer_verification + self.encrypted_credential = encrypted_credential + self.type = 'AmazonMWS' + + +class Dataset(Model): + """The Azure Data Factory nested object which identifies data within different + data stores, such as tables, files, folders, and documents. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: GoogleAdWordsObjectDataset, AzureDataExplorerTableDataset, + OracleServiceCloudObjectDataset, DynamicsAXResourceDataset, + ResponsysObjectDataset, SalesforceMarketingCloudObjectDataset, + VerticaTableDataset, NetezzaTableDataset, ZohoObjectDataset, + XeroObjectDataset, SquareObjectDataset, SparkObjectDataset, + ShopifyObjectDataset, ServiceNowObjectDataset, QuickBooksObjectDataset, + PrestoObjectDataset, PhoenixObjectDataset, PaypalObjectDataset, + MarketoObjectDataset, AzureMariaDBTableDataset, MariaDBTableDataset, + MagentoObjectDataset, JiraObjectDataset, ImpalaObjectDataset, + HubspotObjectDataset, HiveObjectDataset, HBaseObjectDataset, + GreenplumTableDataset, GoogleBigQueryObjectDataset, EloquaObjectDataset, + DrillTableDataset, CouchbaseTableDataset, ConcurObjectDataset, + AzurePostgreSqlTableDataset, AmazonMWSObjectDataset, HttpDataset, + AzureSearchIndexDataset, WebTableDataset, SapTableResourceDataset, + RestResourceDataset, SqlServerTableDataset, SapOpenHubTableDataset, + SapHanaTableDataset, SapEccResourceDataset, + SapCloudForCustomerResourceDataset, SapBwCubeDataset, SybaseTableDataset, + SalesforceServiceCloudObjectDataset, SalesforceObjectDataset, + MicrosoftAccessTableDataset, PostgreSqlTableDataset, MySqlTableDataset, + OdbcTableDataset, InformixTableDataset, RelationalTableDataset, + AzureMySqlTableDataset, TeradataTableDataset, OracleTableDataset, + ODataResourceDataset, CosmosDbMongoDbApiCollectionDataset, + MongoDbV2CollectionDataset, MongoDbCollectionDataset, FileShareDataset, + Office365Dataset, AzureBlobFSDataset, AzureDataLakeStoreDataset, + CommonDataServiceForAppsEntityDataset, DynamicsCrmEntityDataset, + DynamicsEntityDataset, DocumentDbCollectionDataset, CustomDataset, + CassandraTableDataset, AzureSqlDWTableDataset, AzureSqlMITableDataset, + AzureSqlTableDataset, AzureTableDataset, AzureBlobDataset, BinaryDataset, + DelimitedTextDataset, ParquetDataset, AvroDataset, AmazonS3Dataset + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'GoogleAdWordsObject': 'GoogleAdWordsObjectDataset', 'AzureDataExplorerTable': 'AzureDataExplorerTableDataset', 'OracleServiceCloudObject': 'OracleServiceCloudObjectDataset', 'DynamicsAXResource': 'DynamicsAXResourceDataset', 'ResponsysObject': 'ResponsysObjectDataset', 'SalesforceMarketingCloudObject': 'SalesforceMarketingCloudObjectDataset', 'VerticaTable': 'VerticaTableDataset', 'NetezzaTable': 'NetezzaTableDataset', 'ZohoObject': 'ZohoObjectDataset', 'XeroObject': 'XeroObjectDataset', 'SquareObject': 'SquareObjectDataset', 'SparkObject': 'SparkObjectDataset', 'ShopifyObject': 'ShopifyObjectDataset', 'ServiceNowObject': 'ServiceNowObjectDataset', 'QuickBooksObject': 'QuickBooksObjectDataset', 'PrestoObject': 'PrestoObjectDataset', 'PhoenixObject': 'PhoenixObjectDataset', 'PaypalObject': 'PaypalObjectDataset', 'MarketoObject': 'MarketoObjectDataset', 'AzureMariaDBTable': 'AzureMariaDBTableDataset', 'MariaDBTable': 'MariaDBTableDataset', 'MagentoObject': 'MagentoObjectDataset', 'JiraObject': 'JiraObjectDataset', 'ImpalaObject': 'ImpalaObjectDataset', 'HubspotObject': 'HubspotObjectDataset', 'HiveObject': 'HiveObjectDataset', 'HBaseObject': 'HBaseObjectDataset', 'GreenplumTable': 'GreenplumTableDataset', 'GoogleBigQueryObject': 'GoogleBigQueryObjectDataset', 'EloquaObject': 'EloquaObjectDataset', 'DrillTable': 'DrillTableDataset', 'CouchbaseTable': 'CouchbaseTableDataset', 'ConcurObject': 'ConcurObjectDataset', 'AzurePostgreSqlTable': 'AzurePostgreSqlTableDataset', 'AmazonMWSObject': 'AmazonMWSObjectDataset', 'HttpFile': 'HttpDataset', 'AzureSearchIndex': 'AzureSearchIndexDataset', 'WebTable': 'WebTableDataset', 'SapTableResource': 'SapTableResourceDataset', 'RestResource': 'RestResourceDataset', 'SqlServerTable': 'SqlServerTableDataset', 'SapOpenHubTable': 'SapOpenHubTableDataset', 'SapHanaTable': 'SapHanaTableDataset', 'SapEccResource': 'SapEccResourceDataset', 'SapCloudForCustomerResource': 'SapCloudForCustomerResourceDataset', 'SapBwCube': 'SapBwCubeDataset', 'SybaseTable': 'SybaseTableDataset', 'SalesforceServiceCloudObject': 'SalesforceServiceCloudObjectDataset', 'SalesforceObject': 'SalesforceObjectDataset', 'MicrosoftAccessTable': 'MicrosoftAccessTableDataset', 'PostgreSqlTable': 'PostgreSqlTableDataset', 'MySqlTable': 'MySqlTableDataset', 'OdbcTable': 'OdbcTableDataset', 'InformixTable': 'InformixTableDataset', 'RelationalTable': 'RelationalTableDataset', 'AzureMySqlTable': 'AzureMySqlTableDataset', 'TeradataTable': 'TeradataTableDataset', 'OracleTable': 'OracleTableDataset', 'ODataResource': 'ODataResourceDataset', 'CosmosDbMongoDbApiCollection': 'CosmosDbMongoDbApiCollectionDataset', 'MongoDbV2Collection': 'MongoDbV2CollectionDataset', 'MongoDbCollection': 'MongoDbCollectionDataset', 'FileShare': 'FileShareDataset', 'Office365Table': 'Office365Dataset', 'AzureBlobFSFile': 'AzureBlobFSDataset', 'AzureDataLakeStoreFile': 'AzureDataLakeStoreDataset', 'CommonDataServiceForAppsEntity': 'CommonDataServiceForAppsEntityDataset', 'DynamicsCrmEntity': 'DynamicsCrmEntityDataset', 'DynamicsEntity': 'DynamicsEntityDataset', 'DocumentDbCollection': 'DocumentDbCollectionDataset', 'CustomDataset': 'CustomDataset', 'CassandraTable': 'CassandraTableDataset', 'AzureSqlDWTable': 'AzureSqlDWTableDataset', 'AzureSqlMITable': 'AzureSqlMITableDataset', 'AzureSqlTable': 'AzureSqlTableDataset', 'AzureTable': 'AzureTableDataset', 'AzureBlob': 'AzureBlobDataset', 'Binary': 'BinaryDataset', 'DelimitedText': 'DelimitedTextDataset', 'Parquet': 'ParquetDataset', 'Avro': 'AvroDataset', 'AmazonS3Object': 'AmazonS3Dataset'} + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, **kwargs) -> None: + super(Dataset, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.description = description + self.structure = structure + self.schema = schema + self.linked_service_name = linked_service_name + self.parameters = parameters + self.annotations = annotations + self.folder = folder + self.type = None + + +class AmazonMWSObjectDataset(Dataset): + """Amazon Marketplace Web Service dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: + super(AmazonMWSObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.type = 'AmazonMWSObject' + + +class CopySource(Model): + """A copy activity source. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AmazonRedshiftSource, GoogleAdWordsSource, + OracleServiceCloudSource, DynamicsAXSource, ResponsysSource, + SalesforceMarketingCloudSource, VerticaSource, NetezzaSource, ZohoSource, + XeroSource, SquareSource, SparkSource, ShopifySource, ServiceNowSource, + QuickBooksSource, PrestoSource, PhoenixSource, PaypalSource, MarketoSource, + AzureMariaDBSource, MariaDBSource, MagentoSource, JiraSource, ImpalaSource, + HubspotSource, HiveSource, HBaseSource, GreenplumSource, + GoogleBigQuerySource, EloquaSource, DrillSource, CouchbaseSource, + ConcurSource, AzurePostgreSqlSource, AmazonMWSSource, HttpSource, + AzureBlobFSSource, AzureDataLakeStoreSource, Office365Source, + CosmosDbMongoDbApiSource, MongoDbV2Source, MongoDbSource, CassandraSource, + WebSource, TeradataSource, OracleSource, AzureDataExplorerSource, + AzureMySqlSource, HdfsSource, FileSystemSource, SqlDWSource, SqlMISource, + AzureSqlSource, SqlServerSource, SqlSource, RestSource, SapTableSource, + SapOpenHubSource, SapHanaSource, SapEccSource, SapCloudForCustomerSource, + SalesforceServiceCloudSource, SalesforceSource, ODataSource, SapBwSource, + SybaseSource, PostgreSqlSource, MySqlSource, OdbcSource, Db2Source, + MicrosoftAccessSource, InformixSource, RelationalSource, + CommonDataServiceForAppsSource, DynamicsCrmSource, DynamicsSource, + DocumentDbCollectionSource, BlobSource, AzureTableSource, BinarySource, + DelimitedTextSource, ParquetSource, AvroSource + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'AmazonRedshiftSource': 'AmazonRedshiftSource', 'GoogleAdWordsSource': 'GoogleAdWordsSource', 'OracleServiceCloudSource': 'OracleServiceCloudSource', 'DynamicsAXSource': 'DynamicsAXSource', 'ResponsysSource': 'ResponsysSource', 'SalesforceMarketingCloudSource': 'SalesforceMarketingCloudSource', 'VerticaSource': 'VerticaSource', 'NetezzaSource': 'NetezzaSource', 'ZohoSource': 'ZohoSource', 'XeroSource': 'XeroSource', 'SquareSource': 'SquareSource', 'SparkSource': 'SparkSource', 'ShopifySource': 'ShopifySource', 'ServiceNowSource': 'ServiceNowSource', 'QuickBooksSource': 'QuickBooksSource', 'PrestoSource': 'PrestoSource', 'PhoenixSource': 'PhoenixSource', 'PaypalSource': 'PaypalSource', 'MarketoSource': 'MarketoSource', 'AzureMariaDBSource': 'AzureMariaDBSource', 'MariaDBSource': 'MariaDBSource', 'MagentoSource': 'MagentoSource', 'JiraSource': 'JiraSource', 'ImpalaSource': 'ImpalaSource', 'HubspotSource': 'HubspotSource', 'HiveSource': 'HiveSource', 'HBaseSource': 'HBaseSource', 'GreenplumSource': 'GreenplumSource', 'GoogleBigQuerySource': 'GoogleBigQuerySource', 'EloquaSource': 'EloquaSource', 'DrillSource': 'DrillSource', 'CouchbaseSource': 'CouchbaseSource', 'ConcurSource': 'ConcurSource', 'AzurePostgreSqlSource': 'AzurePostgreSqlSource', 'AmazonMWSSource': 'AmazonMWSSource', 'HttpSource': 'HttpSource', 'AzureBlobFSSource': 'AzureBlobFSSource', 'AzureDataLakeStoreSource': 'AzureDataLakeStoreSource', 'Office365Source': 'Office365Source', 'CosmosDbMongoDbApiSource': 'CosmosDbMongoDbApiSource', 'MongoDbV2Source': 'MongoDbV2Source', 'MongoDbSource': 'MongoDbSource', 'CassandraSource': 'CassandraSource', 'WebSource': 'WebSource', 'TeradataSource': 'TeradataSource', 'OracleSource': 'OracleSource', 'AzureDataExplorerSource': 'AzureDataExplorerSource', 'AzureMySqlSource': 'AzureMySqlSource', 'HdfsSource': 'HdfsSource', 'FileSystemSource': 'FileSystemSource', 'SqlDWSource': 'SqlDWSource', 'SqlMISource': 'SqlMISource', 'AzureSqlSource': 'AzureSqlSource', 'SqlServerSource': 'SqlServerSource', 'SqlSource': 'SqlSource', 'RestSource': 'RestSource', 'SapTableSource': 'SapTableSource', 'SapOpenHubSource': 'SapOpenHubSource', 'SapHanaSource': 'SapHanaSource', 'SapEccSource': 'SapEccSource', 'SapCloudForCustomerSource': 'SapCloudForCustomerSource', 'SalesforceServiceCloudSource': 'SalesforceServiceCloudSource', 'SalesforceSource': 'SalesforceSource', 'ODataSource': 'ODataSource', 'SapBwSource': 'SapBwSource', 'SybaseSource': 'SybaseSource', 'PostgreSqlSource': 'PostgreSqlSource', 'MySqlSource': 'MySqlSource', 'OdbcSource': 'OdbcSource', 'Db2Source': 'Db2Source', 'MicrosoftAccessSource': 'MicrosoftAccessSource', 'InformixSource': 'InformixSource', 'RelationalSource': 'RelationalSource', 'CommonDataServiceForAppsSource': 'CommonDataServiceForAppsSource', 'DynamicsCrmSource': 'DynamicsCrmSource', 'DynamicsSource': 'DynamicsSource', 'DocumentDbCollectionSource': 'DocumentDbCollectionSource', 'BlobSource': 'BlobSource', 'AzureTableSource': 'AzureTableSource', 'BinarySource': 'BinarySource', 'DelimitedTextSource': 'DelimitedTextSource', 'ParquetSource': 'ParquetSource', 'AvroSource': 'AvroSource'} + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, **kwargs) -> None: + super(CopySource, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.source_retry_count = source_retry_count + self.source_retry_wait = source_retry_wait + self.max_concurrent_connections = max_concurrent_connections + self.type = None + + +class AmazonMWSSource(CopySource): + """A copy activity Amazon Marketplace Web Service source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(AmazonMWSSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'AmazonMWSSource' + + +class AmazonRedshiftLinkedService(LinkedService): + """Linked service for Amazon Redshift. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param server: Required. The name of the Amazon Redshift server. Type: + string (or Expression with resultType string). + :type server: object + :param username: The username of the Amazon Redshift source. Type: string + (or Expression with resultType string). + :type username: object + :param password: The password of the Amazon Redshift source. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param database: Required. The database name of the Amazon Redshift + source. Type: string (or Expression with resultType string). + :type database: object + :param port: The TCP port number that the Amazon Redshift server uses to + listen for client connections. The default value is 5439. Type: integer + (or Expression with resultType integer). + :type port: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'server': {'required': True}, + 'database': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server': {'key': 'typeProperties.server', 'type': 'object'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'database': {'key': 'typeProperties.database', 'type': 'object'}, + 'port': {'key': 'typeProperties.port', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, server, database, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, username=None, password=None, port=None, encrypted_credential=None, **kwargs) -> None: + super(AmazonRedshiftLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.server = server + self.username = username + self.password = password + self.database = database + self.port = port + self.encrypted_credential = encrypted_credential + self.type = 'AmazonRedshift' + + +class AmazonRedshiftSource(CopySource): + """A copy activity source for Amazon Redshift Source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: Database query. Type: string (or Expression with resultType + string). + :type query: object + :param redshift_unload_settings: The Amazon S3 settings needed for the + interim Amazon S3 when copying from Amazon Redshift with unload. With + this, data from Amazon Redshift source will be unloaded into S3 first and + then copied into the targeted sink from the interim S3. + :type redshift_unload_settings: + ~azure.mgmt.datafactory.models.RedshiftUnloadSettings + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + 'redshift_unload_settings': {'key': 'redshiftUnloadSettings', 'type': 'RedshiftUnloadSettings'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, redshift_unload_settings=None, **kwargs) -> None: + super(AmazonRedshiftSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.redshift_unload_settings = redshift_unload_settings + self.type = 'AmazonRedshiftSource' + + +class AmazonS3Dataset(Dataset): + """A single Amazon Simple Storage Service (S3) object or a set of S3 objects. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param bucket_name: Required. The name of the Amazon S3 bucket. Type: + string (or Expression with resultType string). + :type bucket_name: object + :param key: The key of the Amazon S3 object. Type: string (or Expression + with resultType string). + :type key: object + :param prefix: The prefix filter for the S3 object name. Type: string (or + Expression with resultType string). + :type prefix: object + :param version: The version for the S3 object. Type: string (or Expression + with resultType string). + :type version: object + :param modified_datetime_start: The start of S3 object's modified + datetime. Type: string (or Expression with resultType string). + :type modified_datetime_start: object + :param modified_datetime_end: The end of S3 object's modified datetime. + Type: string (or Expression with resultType string). + :type modified_datetime_end: object + :param format: The format of files. + :type format: ~azure.mgmt.datafactory.models.DatasetStorageFormat + :param compression: The data compression method used for the Amazon S3 + object. + :type compression: ~azure.mgmt.datafactory.models.DatasetCompression + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + 'bucket_name': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'bucket_name': {'key': 'typeProperties.bucketName', 'type': 'object'}, + 'key': {'key': 'typeProperties.key', 'type': 'object'}, + 'prefix': {'key': 'typeProperties.prefix', 'type': 'object'}, + 'version': {'key': 'typeProperties.version', 'type': 'object'}, + 'modified_datetime_start': {'key': 'typeProperties.modifiedDatetimeStart', 'type': 'object'}, + 'modified_datetime_end': {'key': 'typeProperties.modifiedDatetimeEnd', 'type': 'object'}, + 'format': {'key': 'typeProperties.format', 'type': 'DatasetStorageFormat'}, + 'compression': {'key': 'typeProperties.compression', 'type': 'DatasetCompression'}, + } + + def __init__(self, *, linked_service_name, bucket_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, key=None, prefix=None, version=None, modified_datetime_start=None, modified_datetime_end=None, format=None, compression=None, **kwargs) -> None: + super(AmazonS3Dataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.bucket_name = bucket_name + self.key = key + self.prefix = prefix + self.version = version + self.modified_datetime_start = modified_datetime_start + self.modified_datetime_end = modified_datetime_end + self.format = format + self.compression = compression + self.type = 'AmazonS3Object' + + +class AmazonS3LinkedService(LinkedService): + """Linked service for Amazon S3. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param access_key_id: The access key identifier of the Amazon S3 Identity + and Access Management (IAM) user. Type: string (or Expression with + resultType string). + :type access_key_id: object + :param secret_access_key: The secret access key of the Amazon S3 Identity + and Access Management (IAM) user. + :type secret_access_key: ~azure.mgmt.datafactory.models.SecretBase + :param service_url: This value specifies the endpoint to access with the + S3 Connector. This is an optional property; change it only if you want to + try a different service endpoint or want to switch between https and http. + Type: string (or Expression with resultType string). + :type service_url: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'access_key_id': {'key': 'typeProperties.accessKeyId', 'type': 'object'}, + 'secret_access_key': {'key': 'typeProperties.secretAccessKey', 'type': 'SecretBase'}, + 'service_url': {'key': 'typeProperties.serviceUrl', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, access_key_id=None, secret_access_key=None, service_url=None, encrypted_credential=None, **kwargs) -> None: + super(AmazonS3LinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.access_key_id = access_key_id + self.secret_access_key = secret_access_key + self.service_url = service_url + self.encrypted_credential = encrypted_credential + self.type = 'AmazonS3' + + +class DatasetLocation(Model): + """Dataset location. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. Type of dataset storage location. + :type type: str + :param folder_path: Specify the folder path of dataset. Type: string (or + Expression with resultType string) + :type folder_path: object + :param file_name: Specify the file name of dataset. Type: string (or + Expression with resultType string). + :type file_name: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'folder_path': {'key': 'folderPath', 'type': 'object'}, + 'file_name': {'key': 'fileName', 'type': 'object'}, + } + + def __init__(self, *, type: str, additional_properties=None, folder_path=None, file_name=None, **kwargs) -> None: + super(DatasetLocation, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.type = type + self.folder_path = folder_path + self.file_name = file_name + + +class AmazonS3Location(DatasetLocation): + """The location of amazon S3 dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. Type of dataset storage location. + :type type: str + :param folder_path: Specify the folder path of dataset. Type: string (or + Expression with resultType string) + :type folder_path: object + :param file_name: Specify the file name of dataset. Type: string (or + Expression with resultType string). + :type file_name: object + :param bucket_name: Specify the bucketName of amazon S3. Type: string (or + Expression with resultType string) + :type bucket_name: object + :param version: Specify the version of amazon S3. Type: string (or + Expression with resultType string). + :type version: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'folder_path': {'key': 'folderPath', 'type': 'object'}, + 'file_name': {'key': 'fileName', 'type': 'object'}, + 'bucket_name': {'key': 'bucketName', 'type': 'object'}, + 'version': {'key': 'version', 'type': 'object'}, + } + + def __init__(self, *, type: str, additional_properties=None, folder_path=None, file_name=None, bucket_name=None, version=None, **kwargs) -> None: + super(AmazonS3Location, self).__init__(additional_properties=additional_properties, type=type, folder_path=folder_path, file_name=file_name, **kwargs) + self.bucket_name = bucket_name + self.version = version + + +class StoreReadSettings(Model): + """Connector read setting. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The read setting type. + :type type: str + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + } + + def __init__(self, *, type: str, additional_properties=None, max_concurrent_connections=None, **kwargs) -> None: + super(StoreReadSettings, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.type = type + self.max_concurrent_connections = max_concurrent_connections + + +class AmazonS3ReadSettings(StoreReadSettings): + """Azure data lake store read settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The read setting type. + :type type: str + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param recursive: If true, files under the folder path will be read + recursively. Default is true. Type: boolean (or Expression with resultType + boolean). + :type recursive: object + :param wildcard_folder_path: AmazonS3 wildcardFolderPath. Type: string (or + Expression with resultType string). + :type wildcard_folder_path: object + :param wildcard_file_name: AmazonS3 wildcardFileName. Type: string (or + Expression with resultType string). + :type wildcard_file_name: object + :param prefix: The prefix filter for the S3 object name. Type: string (or + Expression with resultType string). + :type prefix: object + :param enable_partition_discovery: Indicates whether to enable partition + discovery. + :type enable_partition_discovery: bool + :param modified_datetime_start: The start of file's modified datetime. + Type: string (or Expression with resultType string). + :type modified_datetime_start: object + :param modified_datetime_end: The end of file's modified datetime. Type: + string (or Expression with resultType string). + :type modified_datetime_end: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'recursive': {'key': 'recursive', 'type': 'object'}, + 'wildcard_folder_path': {'key': 'wildcardFolderPath', 'type': 'object'}, + 'wildcard_file_name': {'key': 'wildcardFileName', 'type': 'object'}, + 'prefix': {'key': 'prefix', 'type': 'object'}, + 'enable_partition_discovery': {'key': 'enablePartitionDiscovery', 'type': 'bool'}, + 'modified_datetime_start': {'key': 'modifiedDatetimeStart', 'type': 'object'}, + 'modified_datetime_end': {'key': 'modifiedDatetimeEnd', 'type': 'object'}, + } + + def __init__(self, *, type: str, additional_properties=None, max_concurrent_connections=None, recursive=None, wildcard_folder_path=None, wildcard_file_name=None, prefix=None, enable_partition_discovery: bool=None, modified_datetime_start=None, modified_datetime_end=None, **kwargs) -> None: + super(AmazonS3ReadSettings, self).__init__(additional_properties=additional_properties, type=type, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.recursive = recursive + self.wildcard_folder_path = wildcard_folder_path + self.wildcard_file_name = wildcard_file_name + self.prefix = prefix + self.enable_partition_discovery = enable_partition_discovery + self.modified_datetime_start = modified_datetime_start + self.modified_datetime_end = modified_datetime_end + + +class ControlActivity(Activity): + """Base class for all control activities like IfCondition, ForEach , Until. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: WebHookActivity, AppendVariableActivity, + SetVariableActivity, FilterActivity, ValidationActivity, UntilActivity, + WaitActivity, ForEachActivity, IfConditionActivity, ExecutePipelineActivity + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'WebHook': 'WebHookActivity', 'AppendVariable': 'AppendVariableActivity', 'SetVariable': 'SetVariableActivity', 'Filter': 'FilterActivity', 'Validation': 'ValidationActivity', 'Until': 'UntilActivity', 'Wait': 'WaitActivity', 'ForEach': 'ForEachActivity', 'IfCondition': 'IfConditionActivity', 'ExecutePipeline': 'ExecutePipelineActivity'} + } + + def __init__(self, *, name: str, additional_properties=None, description: str=None, depends_on=None, user_properties=None, **kwargs) -> None: + super(ControlActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, **kwargs) + self.type = 'Container' + + +class AppendVariableActivity(ControlActivity): + """Append value for a Variable of type Array. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param variable_name: Name of the variable whose value needs to be + appended to. + :type variable_name: str + :param value: Value to be appended. Could be a static value or Expression + :type value: object + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'variable_name': {'key': 'typeProperties.variableName', 'type': 'str'}, + 'value': {'key': 'typeProperties.value', 'type': 'object'}, + } + + def __init__(self, *, name: str, additional_properties=None, description: str=None, depends_on=None, user_properties=None, variable_name: str=None, value=None, **kwargs) -> None: + super(AppendVariableActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, **kwargs) + self.variable_name = variable_name + self.value = value + self.type = 'AppendVariable' + + +class AvroDataset(Dataset): + """Avro dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param location: Required. The location of the avro storage. + :type location: ~azure.mgmt.datafactory.models.DatasetLocation + :param avro_compression_codec: Possible values include: 'none', 'deflate', + 'snappy', 'xz', 'bzip2' + :type avro_compression_codec: str or + ~azure.mgmt.datafactory.models.AvroCompressionCodec + :param avro_compression_level: + :type avro_compression_level: int + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + 'location': {'required': True}, + 'avro_compression_level': {'maximum': 9, 'minimum': 1}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'typeProperties.location', 'type': 'DatasetLocation'}, + 'avro_compression_codec': {'key': 'typeProperties.avroCompressionCodec', 'type': 'str'}, + 'avro_compression_level': {'key': 'typeProperties.avroCompressionLevel', 'type': 'int'}, + } + + def __init__(self, *, linked_service_name, location, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, avro_compression_codec=None, avro_compression_level: int=None, **kwargs) -> None: + super(AvroDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.location = location + self.avro_compression_codec = avro_compression_codec + self.avro_compression_level = avro_compression_level + self.type = 'Avro' + + +class DatasetStorageFormat(Model): + """The format definition of a storage. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ParquetFormat, OrcFormat, AvroFormat, JsonFormat, + TextFormat + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param serializer: Serializer. Type: string (or Expression with resultType + string). + :type serializer: object + :param deserializer: Deserializer. Type: string (or Expression with + resultType string). + :type deserializer: object + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'serializer': {'key': 'serializer', 'type': 'object'}, + 'deserializer': {'key': 'deserializer', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'ParquetFormat': 'ParquetFormat', 'OrcFormat': 'OrcFormat', 'AvroFormat': 'AvroFormat', 'JsonFormat': 'JsonFormat', 'TextFormat': 'TextFormat'} + } + + def __init__(self, *, additional_properties=None, serializer=None, deserializer=None, **kwargs) -> None: + super(DatasetStorageFormat, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.serializer = serializer + self.deserializer = deserializer + self.type = None + + +class AvroFormat(DatasetStorageFormat): + """The data stored in Avro format. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param serializer: Serializer. Type: string (or Expression with resultType + string). + :type serializer: object + :param deserializer: Deserializer. Type: string (or Expression with + resultType string). + :type deserializer: object + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'serializer': {'key': 'serializer', 'type': 'object'}, + 'deserializer': {'key': 'deserializer', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, additional_properties=None, serializer=None, deserializer=None, **kwargs) -> None: + super(AvroFormat, self).__init__(additional_properties=additional_properties, serializer=serializer, deserializer=deserializer, **kwargs) + self.type = 'AvroFormat' + + +class CopySink(Model): + """A copy activity sink. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CosmosDbMongoDbApiSink, SalesforceServiceCloudSink, + SalesforceSink, AzureDataExplorerSink, CommonDataServiceForAppsSink, + DynamicsCrmSink, DynamicsSink, MicrosoftAccessSink, InformixSink, OdbcSink, + AzureSearchIndexSink, AzureBlobFSSink, AzureDataLakeStoreSink, OracleSink, + SqlDWSink, SqlMISink, AzureSqlSink, SqlServerSink, SqlSink, + DocumentDbCollectionSink, FileSystemSink, BlobSink, BinarySink, + ParquetSink, AvroSink, AzureTableSink, AzureQueueSink, + SapCloudForCustomerSink, AzurePostgreSqlSink, DelimitedTextSink + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'CosmosDbMongoDbApiSink': 'CosmosDbMongoDbApiSink', 'SalesforceServiceCloudSink': 'SalesforceServiceCloudSink', 'SalesforceSink': 'SalesforceSink', 'AzureDataExplorerSink': 'AzureDataExplorerSink', 'CommonDataServiceForAppsSink': 'CommonDataServiceForAppsSink', 'DynamicsCrmSink': 'DynamicsCrmSink', 'DynamicsSink': 'DynamicsSink', 'MicrosoftAccessSink': 'MicrosoftAccessSink', 'InformixSink': 'InformixSink', 'OdbcSink': 'OdbcSink', 'AzureSearchIndexSink': 'AzureSearchIndexSink', 'AzureBlobFSSink': 'AzureBlobFSSink', 'AzureDataLakeStoreSink': 'AzureDataLakeStoreSink', 'OracleSink': 'OracleSink', 'SqlDWSink': 'SqlDWSink', 'SqlMISink': 'SqlMISink', 'AzureSqlSink': 'AzureSqlSink', 'SqlServerSink': 'SqlServerSink', 'SqlSink': 'SqlSink', 'DocumentDbCollectionSink': 'DocumentDbCollectionSink', 'FileSystemSink': 'FileSystemSink', 'BlobSink': 'BlobSink', 'BinarySink': 'BinarySink', 'ParquetSink': 'ParquetSink', 'AvroSink': 'AvroSink', 'AzureTableSink': 'AzureTableSink', 'AzureQueueSink': 'AzureQueueSink', 'SapCloudForCustomerSink': 'SapCloudForCustomerSink', 'AzurePostgreSqlSink': 'AzurePostgreSqlSink', 'DelimitedTextSink': 'DelimitedTextSink'} + } + + def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, max_concurrent_connections=None, **kwargs) -> None: + super(CopySink, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.write_batch_size = write_batch_size + self.write_batch_timeout = write_batch_timeout + self.sink_retry_count = sink_retry_count + self.sink_retry_wait = sink_retry_wait + self.max_concurrent_connections = max_concurrent_connections + self.type = None + + +class AvroSink(CopySink): + """A copy activity Avro sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param store_settings: Avro store settings. + :type store_settings: ~azure.mgmt.datafactory.models.StoreWriteSettings + :param format_settings: Avro format settings. + :type format_settings: ~azure.mgmt.datafactory.models.AvroWriteSettings + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'store_settings': {'key': 'storeSettings', 'type': 'StoreWriteSettings'}, + 'format_settings': {'key': 'formatSettings', 'type': 'AvroWriteSettings'}, + } + + def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, max_concurrent_connections=None, store_settings=None, format_settings=None, **kwargs) -> None: + super(AvroSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.store_settings = store_settings + self.format_settings = format_settings + self.type = 'AvroSink' + + +class AvroSource(CopySource): + """A copy activity Avro source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param store_settings: Avro store settings. + :type store_settings: ~azure.mgmt.datafactory.models.StoreReadSettings + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'store_settings': {'key': 'storeSettings', 'type': 'StoreReadSettings'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, store_settings=None, **kwargs) -> None: + super(AvroSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.store_settings = store_settings + self.type = 'AvroSource' + + +class FormatWriteSettings(Model): + """Format write settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The write setting type. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, type: str, additional_properties=None, **kwargs) -> None: + super(FormatWriteSettings, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.type = type + + +class AvroWriteSettings(FormatWriteSettings): + """Avro write settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The write setting type. + :type type: str + :param record_name: Top level record name in write result, which is + required in AVRO spec. + :type record_name: str + :param record_namespace: Record namespace in the write result. + :type record_namespace: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'record_name': {'key': 'recordName', 'type': 'str'}, + 'record_namespace': {'key': 'recordNamespace', 'type': 'str'}, + } + + def __init__(self, *, type: str, additional_properties=None, record_name: str=None, record_namespace: str=None, **kwargs) -> None: + super(AvroWriteSettings, self).__init__(additional_properties=additional_properties, type=type, **kwargs) + self.record_name = record_name + self.record_namespace = record_namespace + + +class AzureBatchLinkedService(LinkedService): + """Azure Batch linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param account_name: Required. The Azure Batch account name. Type: string + (or Expression with resultType string). + :type account_name: object + :param access_key: The Azure Batch account access key. + :type access_key: ~azure.mgmt.datafactory.models.SecretBase + :param batch_uri: Required. The Azure Batch URI. Type: string (or + Expression with resultType string). + :type batch_uri: object + :param pool_name: Required. The Azure Batch pool name. Type: string (or + Expression with resultType string). + :type pool_name: object + :param linked_service_name: Required. The Azure Storage linked service + reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'account_name': {'required': True}, + 'batch_uri': {'required': True}, + 'pool_name': {'required': True}, + 'linked_service_name': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'account_name': {'key': 'typeProperties.accountName', 'type': 'object'}, + 'access_key': {'key': 'typeProperties.accessKey', 'type': 'SecretBase'}, + 'batch_uri': {'key': 'typeProperties.batchUri', 'type': 'object'}, + 'pool_name': {'key': 'typeProperties.poolName', 'type': 'object'}, + 'linked_service_name': {'key': 'typeProperties.linkedServiceName', 'type': 'LinkedServiceReference'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, account_name, batch_uri, pool_name, linked_service_name, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, access_key=None, encrypted_credential=None, **kwargs) -> None: + super(AzureBatchLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.account_name = account_name + self.access_key = access_key + self.batch_uri = batch_uri + self.pool_name = pool_name + self.linked_service_name = linked_service_name + self.encrypted_credential = encrypted_credential + self.type = 'AzureBatch' + + +class AzureBlobDataset(Dataset): + """The Azure Blob storage. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param folder_path: The path of the Azure Blob storage. Type: string (or + Expression with resultType string). + :type folder_path: object + :param table_root_location: The root of blob path. Type: string (or + Expression with resultType string). + :type table_root_location: object + :param file_name: The name of the Azure Blob. Type: string (or Expression + with resultType string). + :type file_name: object + :param modified_datetime_start: The start of Azure Blob's modified + datetime. Type: string (or Expression with resultType string). + :type modified_datetime_start: object + :param modified_datetime_end: The end of Azure Blob's modified datetime. + Type: string (or Expression with resultType string). + :type modified_datetime_end: object + :param format: The format of the Azure Blob storage. + :type format: ~azure.mgmt.datafactory.models.DatasetStorageFormat + :param compression: The data compression method used for the blob storage. + :type compression: ~azure.mgmt.datafactory.models.DatasetCompression + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'folder_path': {'key': 'typeProperties.folderPath', 'type': 'object'}, + 'table_root_location': {'key': 'typeProperties.tableRootLocation', 'type': 'object'}, + 'file_name': {'key': 'typeProperties.fileName', 'type': 'object'}, + 'modified_datetime_start': {'key': 'typeProperties.modifiedDatetimeStart', 'type': 'object'}, + 'modified_datetime_end': {'key': 'typeProperties.modifiedDatetimeEnd', 'type': 'object'}, + 'format': {'key': 'typeProperties.format', 'type': 'DatasetStorageFormat'}, + 'compression': {'key': 'typeProperties.compression', 'type': 'DatasetCompression'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, folder_path=None, table_root_location=None, file_name=None, modified_datetime_start=None, modified_datetime_end=None, format=None, compression=None, **kwargs) -> None: + super(AzureBlobDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.folder_path = folder_path + self.table_root_location = table_root_location + self.file_name = file_name + self.modified_datetime_start = modified_datetime_start + self.modified_datetime_end = modified_datetime_end + self.format = format + self.compression = compression + self.type = 'AzureBlob' + + +class AzureBlobFSDataset(Dataset): + """The Azure Data Lake Storage Gen2 storage. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param folder_path: The path of the Azure Data Lake Storage Gen2 storage. + Type: string (or Expression with resultType string). + :type folder_path: object + :param file_name: The name of the Azure Data Lake Storage Gen2. Type: + string (or Expression with resultType string). + :type file_name: object + :param format: The format of the Azure Data Lake Storage Gen2 storage. + :type format: ~azure.mgmt.datafactory.models.DatasetStorageFormat + :param compression: The data compression method used for the blob storage. + :type compression: ~azure.mgmt.datafactory.models.DatasetCompression + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'folder_path': {'key': 'typeProperties.folderPath', 'type': 'object'}, + 'file_name': {'key': 'typeProperties.fileName', 'type': 'object'}, + 'format': {'key': 'typeProperties.format', 'type': 'DatasetStorageFormat'}, + 'compression': {'key': 'typeProperties.compression', 'type': 'DatasetCompression'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, folder_path=None, file_name=None, format=None, compression=None, **kwargs) -> None: + super(AzureBlobFSDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.folder_path = folder_path + self.file_name = file_name + self.format = format + self.compression = compression + self.type = 'AzureBlobFSFile' + + +class AzureBlobFSLinkedService(LinkedService): + """Azure Data Lake Storage Gen2 linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param url: Required. Endpoint for the Azure Data Lake Storage Gen2 + service. Type: string (or Expression with resultType string). + :type url: object + :param account_key: Account key for the Azure Data Lake Storage Gen2 + service. Type: string (or Expression with resultType string). + :type account_key: object + :param service_principal_id: The ID of the application used to + authenticate against the Azure Data Lake Storage Gen2 account. Type: + string (or Expression with resultType string). + :type service_principal_id: object + :param service_principal_key: The Key of the application used to + authenticate against the Azure Data Lake Storage Gen2 account. + :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase + :param tenant: The name or ID of the tenant to which the service principal + belongs. Type: string (or Expression with resultType string). + :type tenant: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'url': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'url': {'key': 'typeProperties.url', 'type': 'object'}, + 'account_key': {'key': 'typeProperties.accountKey', 'type': 'object'}, + 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, + 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, + 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, url, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, account_key=None, service_principal_id=None, service_principal_key=None, tenant=None, encrypted_credential=None, **kwargs) -> None: + super(AzureBlobFSLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.url = url + self.account_key = account_key + self.service_principal_id = service_principal_id + self.service_principal_key = service_principal_key + self.tenant = tenant + self.encrypted_credential = encrypted_credential + self.type = 'AzureBlobFS' + + +class AzureBlobFSLocation(DatasetLocation): + """The location of azure blobFS dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. Type of dataset storage location. + :type type: str + :param folder_path: Specify the folder path of dataset. Type: string (or + Expression with resultType string) + :type folder_path: object + :param file_name: Specify the file name of dataset. Type: string (or + Expression with resultType string). + :type file_name: object + :param file_system: Specify the fileSystem of azure blobFS. Type: string + (or Expression with resultType string). + :type file_system: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'folder_path': {'key': 'folderPath', 'type': 'object'}, + 'file_name': {'key': 'fileName', 'type': 'object'}, + 'file_system': {'key': 'fileSystem', 'type': 'object'}, + } + + def __init__(self, *, type: str, additional_properties=None, folder_path=None, file_name=None, file_system=None, **kwargs) -> None: + super(AzureBlobFSLocation, self).__init__(additional_properties=additional_properties, type=type, folder_path=folder_path, file_name=file_name, **kwargs) + self.file_system = file_system + + +class AzureBlobFSReadSettings(StoreReadSettings): + """Azure blobFS read settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The read setting type. + :type type: str + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param recursive: If true, files under the folder path will be read + recursively. Default is true. Type: boolean (or Expression with resultType + boolean). + :type recursive: object + :param wildcard_folder_path: Azure blobFS wildcardFolderPath. Type: string + (or Expression with resultType string). + :type wildcard_folder_path: object + :param wildcard_file_name: Azure blobFS wildcardFileName. Type: string (or + Expression with resultType string). + :type wildcard_file_name: object + :param enable_partition_discovery: Indicates whether to enable partition + discovery. + :type enable_partition_discovery: bool + :param modified_datetime_start: The start of file's modified datetime. + Type: string (or Expression with resultType string). + :type modified_datetime_start: object + :param modified_datetime_end: The end of file's modified datetime. Type: + string (or Expression with resultType string). + :type modified_datetime_end: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'recursive': {'key': 'recursive', 'type': 'object'}, + 'wildcard_folder_path': {'key': 'wildcardFolderPath', 'type': 'object'}, + 'wildcard_file_name': {'key': 'wildcardFileName', 'type': 'object'}, + 'enable_partition_discovery': {'key': 'enablePartitionDiscovery', 'type': 'bool'}, + 'modified_datetime_start': {'key': 'modifiedDatetimeStart', 'type': 'object'}, + 'modified_datetime_end': {'key': 'modifiedDatetimeEnd', 'type': 'object'}, + } + + def __init__(self, *, type: str, additional_properties=None, max_concurrent_connections=None, recursive=None, wildcard_folder_path=None, wildcard_file_name=None, enable_partition_discovery: bool=None, modified_datetime_start=None, modified_datetime_end=None, **kwargs) -> None: + super(AzureBlobFSReadSettings, self).__init__(additional_properties=additional_properties, type=type, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.recursive = recursive + self.wildcard_folder_path = wildcard_folder_path + self.wildcard_file_name = wildcard_file_name + self.enable_partition_discovery = enable_partition_discovery + self.modified_datetime_start = modified_datetime_start + self.modified_datetime_end = modified_datetime_end + + +class AzureBlobFSSink(CopySink): + """A copy activity Azure Data Lake Storage Gen2 sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param copy_behavior: The type of copy behavior for copy sink. + :type copy_behavior: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'copy_behavior': {'key': 'copyBehavior', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, max_concurrent_connections=None, copy_behavior=None, **kwargs) -> None: + super(AzureBlobFSSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.copy_behavior = copy_behavior + self.type = 'AzureBlobFSSink' + + +class AzureBlobFSSource(CopySource): + """A copy activity Azure BlobFS source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param treat_empty_as_null: Treat empty as null. Type: boolean (or + Expression with resultType boolean). + :type treat_empty_as_null: object + :param skip_header_line_count: Number of header lines to skip from each + blob. Type: integer (or Expression with resultType integer). + :type skip_header_line_count: object + :param recursive: If true, files under the folder path will be read + recursively. Default is true. Type: boolean (or Expression with resultType + boolean). + :type recursive: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'treat_empty_as_null': {'key': 'treatEmptyAsNull', 'type': 'object'}, + 'skip_header_line_count': {'key': 'skipHeaderLineCount', 'type': 'object'}, + 'recursive': {'key': 'recursive', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, treat_empty_as_null=None, skip_header_line_count=None, recursive=None, **kwargs) -> None: + super(AzureBlobFSSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.treat_empty_as_null = treat_empty_as_null + self.skip_header_line_count = skip_header_line_count + self.recursive = recursive + self.type = 'AzureBlobFSSource' + + +class StoreWriteSettings(Model): + """Connector write settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The write setting type. + :type type: str + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param copy_behavior: The type of copy behavior for copy sink. + :type copy_behavior: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'copy_behavior': {'key': 'copyBehavior', 'type': 'object'}, + } + + def __init__(self, *, type: str, additional_properties=None, max_concurrent_connections=None, copy_behavior=None, **kwargs) -> None: + super(StoreWriteSettings, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.type = type + self.max_concurrent_connections = max_concurrent_connections + self.copy_behavior = copy_behavior + + +class AzureBlobFSWriteSettings(StoreWriteSettings): + """Azure blobFS write settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The write setting type. + :type type: str + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param copy_behavior: The type of copy behavior for copy sink. + :type copy_behavior: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'copy_behavior': {'key': 'copyBehavior', 'type': 'object'}, + } + + def __init__(self, *, type: str, additional_properties=None, max_concurrent_connections=None, copy_behavior=None, **kwargs) -> None: + super(AzureBlobFSWriteSettings, self).__init__(additional_properties=additional_properties, type=type, max_concurrent_connections=max_concurrent_connections, copy_behavior=copy_behavior, **kwargs) + + +class AzureBlobStorageLinkedService(LinkedService): + """The azure blob storage linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: The connection string. It is mutually exclusive + with sasUri, serviceEndpoint property. Type: string, SecureString or + AzureKeyVaultSecretReference. + :type connection_string: object + :param account_key: The Azure key vault secret reference of accountKey in + connection string. + :type account_key: + ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param sas_uri: SAS URI of the Azure Blob Storage resource. It is mutually + exclusive with connectionString, serviceEndpoint property. Type: string, + SecureString or AzureKeyVaultSecretReference. + :type sas_uri: object + :param sas_token: The Azure key vault secret reference of sasToken in sas + uri. + :type sas_token: + ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param service_endpoint: Blob service endpoint of the Azure Blob Storage + resource. It is mutually exclusive with connectionString, sasUri property. + :type service_endpoint: str + :param service_principal_id: The ID of the service principal used to + authenticate against Azure SQL Data Warehouse. Type: string (or Expression + with resultType string). + :type service_principal_id: object + :param service_principal_key: The key of the service principal used to + authenticate against Azure SQL Data Warehouse. + :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase + :param tenant: The name or ID of the tenant to which the service principal + belongs. Type: string (or Expression with resultType string). + :type tenant: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'account_key': {'key': 'typeProperties.accountKey', 'type': 'AzureKeyVaultSecretReference'}, + 'sas_uri': {'key': 'typeProperties.sasUri', 'type': 'object'}, + 'sas_token': {'key': 'typeProperties.sasToken', 'type': 'AzureKeyVaultSecretReference'}, + 'service_endpoint': {'key': 'typeProperties.serviceEndpoint', 'type': 'str'}, + 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, + 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, + 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'str'}, + } + + def __init__(self, *, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, connection_string=None, account_key=None, sas_uri=None, sas_token=None, service_endpoint: str=None, service_principal_id=None, service_principal_key=None, tenant=None, encrypted_credential: str=None, **kwargs) -> None: + super(AzureBlobStorageLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.connection_string = connection_string + self.account_key = account_key + self.sas_uri = sas_uri + self.sas_token = sas_token + self.service_endpoint = service_endpoint + self.service_principal_id = service_principal_id + self.service_principal_key = service_principal_key + self.tenant = tenant + self.encrypted_credential = encrypted_credential + self.type = 'AzureBlobStorage' + + +class AzureBlobStorageLocation(DatasetLocation): + """The location of azure blob dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. Type of dataset storage location. + :type type: str + :param folder_path: Specify the folder path of dataset. Type: string (or + Expression with resultType string) + :type folder_path: object + :param file_name: Specify the file name of dataset. Type: string (or + Expression with resultType string). + :type file_name: object + :param container: Specify the container of azure blob. Type: string (or + Expression with resultType string). + :type container: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'folder_path': {'key': 'folderPath', 'type': 'object'}, + 'file_name': {'key': 'fileName', 'type': 'object'}, + 'container': {'key': 'container', 'type': 'object'}, + } + + def __init__(self, *, type: str, additional_properties=None, folder_path=None, file_name=None, container=None, **kwargs) -> None: + super(AzureBlobStorageLocation, self).__init__(additional_properties=additional_properties, type=type, folder_path=folder_path, file_name=file_name, **kwargs) + self.container = container + + +class AzureBlobStorageReadSettings(StoreReadSettings): + """Azure blob read settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The read setting type. + :type type: str + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param recursive: If true, files under the folder path will be read + recursively. Default is true. Type: boolean (or Expression with resultType + boolean). + :type recursive: object + :param wildcard_folder_path: Azure blob wildcardFolderPath. Type: string + (or Expression with resultType string). + :type wildcard_folder_path: object + :param wildcard_file_name: Azure blob wildcardFileName. Type: string (or + Expression with resultType string). + :type wildcard_file_name: object + :param enable_partition_discovery: Indicates whether to enable partition + discovery. + :type enable_partition_discovery: bool + :param modified_datetime_start: The start of file's modified datetime. + Type: string (or Expression with resultType string). + :type modified_datetime_start: object + :param modified_datetime_end: The end of file's modified datetime. Type: + string (or Expression with resultType string). + :type modified_datetime_end: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'recursive': {'key': 'recursive', 'type': 'object'}, + 'wildcard_folder_path': {'key': 'wildcardFolderPath', 'type': 'object'}, + 'wildcard_file_name': {'key': 'wildcardFileName', 'type': 'object'}, + 'enable_partition_discovery': {'key': 'enablePartitionDiscovery', 'type': 'bool'}, + 'modified_datetime_start': {'key': 'modifiedDatetimeStart', 'type': 'object'}, + 'modified_datetime_end': {'key': 'modifiedDatetimeEnd', 'type': 'object'}, + } + + def __init__(self, *, type: str, additional_properties=None, max_concurrent_connections=None, recursive=None, wildcard_folder_path=None, wildcard_file_name=None, enable_partition_discovery: bool=None, modified_datetime_start=None, modified_datetime_end=None, **kwargs) -> None: + super(AzureBlobStorageReadSettings, self).__init__(additional_properties=additional_properties, type=type, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.recursive = recursive + self.wildcard_folder_path = wildcard_folder_path + self.wildcard_file_name = wildcard_file_name + self.enable_partition_discovery = enable_partition_discovery + self.modified_datetime_start = modified_datetime_start + self.modified_datetime_end = modified_datetime_end + + +class AzureBlobStorageWriteSettings(StoreWriteSettings): + """Azure blob write settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The write setting type. + :type type: str + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param copy_behavior: The type of copy behavior for copy sink. + :type copy_behavior: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'copy_behavior': {'key': 'copyBehavior', 'type': 'object'}, + } + + def __init__(self, *, type: str, additional_properties=None, max_concurrent_connections=None, copy_behavior=None, **kwargs) -> None: + super(AzureBlobStorageWriteSettings, self).__init__(additional_properties=additional_properties, type=type, max_concurrent_connections=max_concurrent_connections, copy_behavior=copy_behavior, **kwargs) + + +class AzureDatabricksLinkedService(LinkedService): + """Azure Databricks linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param domain: Required. .azuredatabricks.net, domain name of your + Databricks deployment. Type: string (or Expression with resultType + string). + :type domain: object + :param access_token: Required. Access token for databricks REST API. Refer + to https://docs.azuredatabricks.net/api/latest/authentication.html. Type: + string (or Expression with resultType string). + :type access_token: ~azure.mgmt.datafactory.models.SecretBase + :param existing_cluster_id: The id of an existing cluster that will be + used for all runs of this job. Type: string (or Expression with resultType + string). + :type existing_cluster_id: object + :param new_cluster_version: The Spark version of new cluster. Type: string + (or Expression with resultType string). + :type new_cluster_version: object + :param new_cluster_num_of_worker: Number of worker nodes that new cluster + should have. A string formatted Int32, like '1' means numOfWorker is 1 or + '1:10' means auto-scale from 1 as min and 10 as max. Type: string (or + Expression with resultType string). + :type new_cluster_num_of_worker: object + :param new_cluster_node_type: The node types of new cluster. Type: string + (or Expression with resultType string). + :type new_cluster_node_type: object + :param new_cluster_spark_conf: A set of optional, user-specified Spark + configuration key-value pairs. + :type new_cluster_spark_conf: dict[str, object] + :param new_cluster_spark_env_vars: A set of optional, user-specified Spark + environment variables key-value pairs. + :type new_cluster_spark_env_vars: dict[str, object] + :param new_cluster_custom_tags: Additional tags for cluster resources. + :type new_cluster_custom_tags: dict[str, object] + :param new_cluster_driver_node_type: The driver node type for the new + cluster. Type: string (or Expression with resultType string). + :type new_cluster_driver_node_type: object + :param new_cluster_init_scripts: User-defined initialization scripts for + the new cluster. Type: array of strings (or Expression with resultType + array of strings). + :type new_cluster_init_scripts: object + :param new_cluster_enable_elastic_disk: Enable the elastic disk on the new + cluster. Type: boolean (or Expression with resultType boolean). + :type new_cluster_enable_elastic_disk: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'domain': {'required': True}, + 'access_token': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'domain': {'key': 'typeProperties.domain', 'type': 'object'}, + 'access_token': {'key': 'typeProperties.accessToken', 'type': 'SecretBase'}, + 'existing_cluster_id': {'key': 'typeProperties.existingClusterId', 'type': 'object'}, + 'new_cluster_version': {'key': 'typeProperties.newClusterVersion', 'type': 'object'}, + 'new_cluster_num_of_worker': {'key': 'typeProperties.newClusterNumOfWorker', 'type': 'object'}, + 'new_cluster_node_type': {'key': 'typeProperties.newClusterNodeType', 'type': 'object'}, + 'new_cluster_spark_conf': {'key': 'typeProperties.newClusterSparkConf', 'type': '{object}'}, + 'new_cluster_spark_env_vars': {'key': 'typeProperties.newClusterSparkEnvVars', 'type': '{object}'}, + 'new_cluster_custom_tags': {'key': 'typeProperties.newClusterCustomTags', 'type': '{object}'}, + 'new_cluster_driver_node_type': {'key': 'typeProperties.newClusterDriverNodeType', 'type': 'object'}, + 'new_cluster_init_scripts': {'key': 'typeProperties.newClusterInitScripts', 'type': 'object'}, + 'new_cluster_enable_elastic_disk': {'key': 'typeProperties.newClusterEnableElasticDisk', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, domain, access_token, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, existing_cluster_id=None, new_cluster_version=None, new_cluster_num_of_worker=None, new_cluster_node_type=None, new_cluster_spark_conf=None, new_cluster_spark_env_vars=None, new_cluster_custom_tags=None, new_cluster_driver_node_type=None, new_cluster_init_scripts=None, new_cluster_enable_elastic_disk=None, encrypted_credential=None, **kwargs) -> None: + super(AzureDatabricksLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.domain = domain + self.access_token = access_token + self.existing_cluster_id = existing_cluster_id + self.new_cluster_version = new_cluster_version + self.new_cluster_num_of_worker = new_cluster_num_of_worker + self.new_cluster_node_type = new_cluster_node_type + self.new_cluster_spark_conf = new_cluster_spark_conf + self.new_cluster_spark_env_vars = new_cluster_spark_env_vars + self.new_cluster_custom_tags = new_cluster_custom_tags + self.new_cluster_driver_node_type = new_cluster_driver_node_type + self.new_cluster_init_scripts = new_cluster_init_scripts + self.new_cluster_enable_elastic_disk = new_cluster_enable_elastic_disk + self.encrypted_credential = encrypted_credential + self.type = 'AzureDatabricks' + + +class ExecutionActivity(Activity): + """Base class for all execution activities. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureFunctionActivity, DatabricksSparkPythonActivity, + DatabricksSparkJarActivity, DatabricksNotebookActivity, + DataLakeAnalyticsUSQLActivity, AzureMLUpdateResourceActivity, + AzureMLBatchExecutionActivity, GetMetadataActivity, WebActivity, + LookupActivity, AzureDataExplorerCommandActivity, DeleteActivity, + SqlServerStoredProcedureActivity, CustomActivity, + ExecuteSSISPackageActivity, HDInsightSparkActivity, + HDInsightStreamingActivity, HDInsightMapReduceActivity, + HDInsightPigActivity, HDInsightHiveActivity, CopyActivity + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + } + + _subtype_map = { + 'type': {'AzureFunctionActivity': 'AzureFunctionActivity', 'DatabricksSparkPython': 'DatabricksSparkPythonActivity', 'DatabricksSparkJar': 'DatabricksSparkJarActivity', 'DatabricksNotebook': 'DatabricksNotebookActivity', 'DataLakeAnalyticsU-SQL': 'DataLakeAnalyticsUSQLActivity', 'AzureMLUpdateResource': 'AzureMLUpdateResourceActivity', 'AzureMLBatchExecution': 'AzureMLBatchExecutionActivity', 'GetMetadata': 'GetMetadataActivity', 'WebActivity': 'WebActivity', 'Lookup': 'LookupActivity', 'AzureDataExplorerCommand': 'AzureDataExplorerCommandActivity', 'Delete': 'DeleteActivity', 'SqlServerStoredProcedure': 'SqlServerStoredProcedureActivity', 'Custom': 'CustomActivity', 'ExecuteSSISPackage': 'ExecuteSSISPackageActivity', 'HDInsightSpark': 'HDInsightSparkActivity', 'HDInsightStreaming': 'HDInsightStreamingActivity', 'HDInsightMapReduce': 'HDInsightMapReduceActivity', 'HDInsightPig': 'HDInsightPigActivity', 'HDInsightHive': 'HDInsightHiveActivity', 'Copy': 'CopyActivity'} + } + + def __init__(self, *, name: str, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, **kwargs) -> None: + super(ExecutionActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, **kwargs) + self.linked_service_name = linked_service_name + self.policy = policy + self.type = 'Execution' + + +class AzureDataExplorerCommandActivity(ExecutionActivity): + """Azure Data Explorer command activity. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param command: Required. A control command, according to the Azure Data + Explorer command syntax. Type: string (or Expression with resultType + string). + :type command: object + :param command_timeout: Control command timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9]))..) + :type command_timeout: object + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'command': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'command': {'key': 'typeProperties.command', 'type': 'object'}, + 'command_timeout': {'key': 'typeProperties.commandTimeout', 'type': 'object'}, + } + + def __init__(self, *, name: str, command, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, command_timeout=None, **kwargs) -> None: + super(AzureDataExplorerCommandActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) + self.command = command + self.command_timeout = command_timeout + self.type = 'AzureDataExplorerCommand' + + +class AzureDataExplorerLinkedService(LinkedService): + """Azure Data Explorer (Kusto) linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param endpoint: Required. The endpoint of Azure Data Explorer (the + engine's endpoint). URL will be in the format + https://..kusto.windows.net. Type: string (or + Expression with resultType string) + :type endpoint: object + :param service_principal_id: Required. The ID of the service principal + used to authenticate against Azure Data Explorer. Type: string (or + Expression with resultType string). + :type service_principal_id: object + :param service_principal_key: Required. The key of the service principal + used to authenticate against Kusto. + :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase + :param database: Required. Database name for connection. Type: string (or + Expression with resultType string). + :type database: object + :param tenant: Required. The name or ID of the tenant to which the service + principal belongs. Type: string (or Expression with resultType string). + :type tenant: object + """ + + _validation = { + 'type': {'required': True}, + 'endpoint': {'required': True}, + 'service_principal_id': {'required': True}, + 'service_principal_key': {'required': True}, + 'database': {'required': True}, + 'tenant': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'endpoint': {'key': 'typeProperties.endpoint', 'type': 'object'}, + 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, + 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, + 'database': {'key': 'typeProperties.database', 'type': 'object'}, + 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, + } + + def __init__(self, *, endpoint, service_principal_id, service_principal_key, database, tenant, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, **kwargs) -> None: + super(AzureDataExplorerLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.endpoint = endpoint + self.service_principal_id = service_principal_id + self.service_principal_key = service_principal_key + self.database = database + self.tenant = tenant + self.type = 'AzureDataExplorer' + + +class AzureDataExplorerSink(CopySink): + """A copy activity Azure Data Explorer sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param ingestion_mapping_name: A name of a pre-created csv mapping that + was defined on the target Kusto table. Type: string. + :type ingestion_mapping_name: object + :param ingestion_mapping_as_json: An explicit column mapping description + provided in a json format. Type: string. + :type ingestion_mapping_as_json: object + :param flush_immediately: If set to true, any aggregation will be skipped. + Default is false. Type: boolean. + :type flush_immediately: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'ingestion_mapping_name': {'key': 'ingestionMappingName', 'type': 'object'}, + 'ingestion_mapping_as_json': {'key': 'ingestionMappingAsJson', 'type': 'object'}, + 'flush_immediately': {'key': 'flushImmediately', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, max_concurrent_connections=None, ingestion_mapping_name=None, ingestion_mapping_as_json=None, flush_immediately=None, **kwargs) -> None: + super(AzureDataExplorerSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.ingestion_mapping_name = ingestion_mapping_name + self.ingestion_mapping_as_json = ingestion_mapping_as_json + self.flush_immediately = flush_immediately + self.type = 'AzureDataExplorerSink' + + +class AzureDataExplorerSource(CopySource): + """A copy activity Azure Data Explorer (Kusto) source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: Required. Database query. Should be a Kusto Query Language + (KQL) query. Type: string (or Expression with resultType string). + :type query: object + :param no_truncation: The name of the Boolean option that controls whether + truncation is applied to result-sets that go beyond a certain row-count + limit. + :type no_truncation: object + :param query_timeout: Query timeout. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])).. + :type query_timeout: object + """ + + _validation = { + 'type': {'required': True}, + 'query': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + 'no_truncation': {'key': 'noTruncation', 'type': 'object'}, + 'query_timeout': {'key': 'queryTimeout', 'type': 'object'}, + } + + def __init__(self, *, query, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, no_truncation=None, query_timeout=None, **kwargs) -> None: + super(AzureDataExplorerSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.no_truncation = no_truncation + self.query_timeout = query_timeout + self.type = 'AzureDataExplorerSource' + + +class AzureDataExplorerTableDataset(Dataset): + """The Azure Data Explorer (Kusto) dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table: The table name of the Azure Data Explorer database. Type: + string (or Expression with resultType string). + :type table: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table': {'key': 'typeProperties.table', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table=None, **kwargs) -> None: + super(AzureDataExplorerTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table = table + self.type = 'AzureDataExplorerTable' + + +class AzureDataLakeAnalyticsLinkedService(LinkedService): + """Azure Data Lake Analytics linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param account_name: Required. The Azure Data Lake Analytics account name. + Type: string (or Expression with resultType string). + :type account_name: object + :param service_principal_id: The ID of the application used to + authenticate against the Azure Data Lake Analytics account. Type: string + (or Expression with resultType string). + :type service_principal_id: object + :param service_principal_key: The Key of the application used to + authenticate against the Azure Data Lake Analytics account. + :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase + :param tenant: Required. The name or ID of the tenant to which the service + principal belongs. Type: string (or Expression with resultType string). + :type tenant: object + :param subscription_id: Data Lake Analytics account subscription ID (if + different from Data Factory account). Type: string (or Expression with + resultType string). + :type subscription_id: object + :param resource_group_name: Data Lake Analytics account resource group + name (if different from Data Factory account). Type: string (or Expression + with resultType string). + :type resource_group_name: object + :param data_lake_analytics_uri: Azure Data Lake Analytics URI Type: string + (or Expression with resultType string). + :type data_lake_analytics_uri: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'account_name': {'required': True}, + 'tenant': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'account_name': {'key': 'typeProperties.accountName', 'type': 'object'}, + 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, + 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, + 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, + 'subscription_id': {'key': 'typeProperties.subscriptionId', 'type': 'object'}, + 'resource_group_name': {'key': 'typeProperties.resourceGroupName', 'type': 'object'}, + 'data_lake_analytics_uri': {'key': 'typeProperties.dataLakeAnalyticsUri', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, account_name, tenant, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, service_principal_id=None, service_principal_key=None, subscription_id=None, resource_group_name=None, data_lake_analytics_uri=None, encrypted_credential=None, **kwargs) -> None: + super(AzureDataLakeAnalyticsLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.account_name = account_name + self.service_principal_id = service_principal_id + self.service_principal_key = service_principal_key + self.tenant = tenant + self.subscription_id = subscription_id + self.resource_group_name = resource_group_name + self.data_lake_analytics_uri = data_lake_analytics_uri + self.encrypted_credential = encrypted_credential + self.type = 'AzureDataLakeAnalytics' + + +class AzureDataLakeStoreDataset(Dataset): + """Azure Data Lake Store dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param folder_path: Path to the folder in the Azure Data Lake Store. Type: + string (or Expression with resultType string). + :type folder_path: object + :param file_name: The name of the file in the Azure Data Lake Store. Type: + string (or Expression with resultType string). + :type file_name: object + :param format: The format of the Data Lake Store. + :type format: ~azure.mgmt.datafactory.models.DatasetStorageFormat + :param compression: The data compression method used for the item(s) in + the Azure Data Lake Store. + :type compression: ~azure.mgmt.datafactory.models.DatasetCompression + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'folder_path': {'key': 'typeProperties.folderPath', 'type': 'object'}, + 'file_name': {'key': 'typeProperties.fileName', 'type': 'object'}, + 'format': {'key': 'typeProperties.format', 'type': 'DatasetStorageFormat'}, + 'compression': {'key': 'typeProperties.compression', 'type': 'DatasetCompression'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, folder_path=None, file_name=None, format=None, compression=None, **kwargs) -> None: + super(AzureDataLakeStoreDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.folder_path = folder_path + self.file_name = file_name + self.format = format + self.compression = compression + self.type = 'AzureDataLakeStoreFile' + + +class AzureDataLakeStoreLinkedService(LinkedService): + """Azure Data Lake Store linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param data_lake_store_uri: Required. Data Lake Store service URI. Type: + string (or Expression with resultType string). + :type data_lake_store_uri: object + :param service_principal_id: The ID of the application used to + authenticate against the Azure Data Lake Store account. Type: string (or + Expression with resultType string). + :type service_principal_id: object + :param service_principal_key: The Key of the application used to + authenticate against the Azure Data Lake Store account. + :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase + :param tenant: The name or ID of the tenant to which the service principal + belongs. Type: string (or Expression with resultType string). + :type tenant: object + :param account_name: Data Lake Store account name. Type: string (or + Expression with resultType string). + :type account_name: object + :param subscription_id: Data Lake Store account subscription ID (if + different from Data Factory account). Type: string (or Expression with + resultType string). + :type subscription_id: object + :param resource_group_name: Data Lake Store account resource group name + (if different from Data Factory account). Type: string (or Expression with + resultType string). + :type resource_group_name: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'data_lake_store_uri': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data_lake_store_uri': {'key': 'typeProperties.dataLakeStoreUri', 'type': 'object'}, + 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, + 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, + 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, + 'account_name': {'key': 'typeProperties.accountName', 'type': 'object'}, + 'subscription_id': {'key': 'typeProperties.subscriptionId', 'type': 'object'}, + 'resource_group_name': {'key': 'typeProperties.resourceGroupName', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, data_lake_store_uri, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, service_principal_id=None, service_principal_key=None, tenant=None, account_name=None, subscription_id=None, resource_group_name=None, encrypted_credential=None, **kwargs) -> None: + super(AzureDataLakeStoreLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.data_lake_store_uri = data_lake_store_uri + self.service_principal_id = service_principal_id + self.service_principal_key = service_principal_key + self.tenant = tenant + self.account_name = account_name + self.subscription_id = subscription_id + self.resource_group_name = resource_group_name + self.encrypted_credential = encrypted_credential + self.type = 'AzureDataLakeStore' + + +class AzureDataLakeStoreLocation(DatasetLocation): + """The location of azure data lake store dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. Type of dataset storage location. + :type type: str + :param folder_path: Specify the folder path of dataset. Type: string (or + Expression with resultType string) + :type folder_path: object + :param file_name: Specify the file name of dataset. Type: string (or + Expression with resultType string). + :type file_name: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'folder_path': {'key': 'folderPath', 'type': 'object'}, + 'file_name': {'key': 'fileName', 'type': 'object'}, + } + + def __init__(self, *, type: str, additional_properties=None, folder_path=None, file_name=None, **kwargs) -> None: + super(AzureDataLakeStoreLocation, self).__init__(additional_properties=additional_properties, type=type, folder_path=folder_path, file_name=file_name, **kwargs) + + +class AzureDataLakeStoreReadSettings(StoreReadSettings): + """Azure data lake store read settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The read setting type. + :type type: str + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param recursive: If true, files under the folder path will be read + recursively. Default is true. Type: boolean (or Expression with resultType + boolean). + :type recursive: object + :param wildcard_folder_path: ADLS wildcardFolderPath. Type: string (or + Expression with resultType string). + :type wildcard_folder_path: object + :param wildcard_file_name: ADLS wildcardFileName. Type: string (or + Expression with resultType string). + :type wildcard_file_name: object + :param enable_partition_discovery: Indicates whether to enable partition + discovery. + :type enable_partition_discovery: bool + :param modified_datetime_start: The start of file's modified datetime. + Type: string (or Expression with resultType string). + :type modified_datetime_start: object + :param modified_datetime_end: The end of file's modified datetime. Type: + string (or Expression with resultType string). + :type modified_datetime_end: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'recursive': {'key': 'recursive', 'type': 'object'}, + 'wildcard_folder_path': {'key': 'wildcardFolderPath', 'type': 'object'}, + 'wildcard_file_name': {'key': 'wildcardFileName', 'type': 'object'}, + 'enable_partition_discovery': {'key': 'enablePartitionDiscovery', 'type': 'bool'}, + 'modified_datetime_start': {'key': 'modifiedDatetimeStart', 'type': 'object'}, + 'modified_datetime_end': {'key': 'modifiedDatetimeEnd', 'type': 'object'}, + } + + def __init__(self, *, type: str, additional_properties=None, max_concurrent_connections=None, recursive=None, wildcard_folder_path=None, wildcard_file_name=None, enable_partition_discovery: bool=None, modified_datetime_start=None, modified_datetime_end=None, **kwargs) -> None: + super(AzureDataLakeStoreReadSettings, self).__init__(additional_properties=additional_properties, type=type, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.recursive = recursive + self.wildcard_folder_path = wildcard_folder_path + self.wildcard_file_name = wildcard_file_name + self.enable_partition_discovery = enable_partition_discovery + self.modified_datetime_start = modified_datetime_start + self.modified_datetime_end = modified_datetime_end + + +class AzureDataLakeStoreSink(CopySink): + """A copy activity Azure Data Lake Store sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param copy_behavior: The type of copy behavior for copy sink. + :type copy_behavior: object + :param enable_adls_single_file_parallel: Single File Parallel. + :type enable_adls_single_file_parallel: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'copy_behavior': {'key': 'copyBehavior', 'type': 'object'}, + 'enable_adls_single_file_parallel': {'key': 'enableAdlsSingleFileParallel', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, max_concurrent_connections=None, copy_behavior=None, enable_adls_single_file_parallel=None, **kwargs) -> None: + super(AzureDataLakeStoreSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.copy_behavior = copy_behavior + self.enable_adls_single_file_parallel = enable_adls_single_file_parallel + self.type = 'AzureDataLakeStoreSink' + + +class AzureDataLakeStoreSource(CopySource): + """A copy activity Azure Data Lake source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param recursive: If true, files under the folder path will be read + recursively. Default is true. Type: boolean (or Expression with resultType + boolean). + :type recursive: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'recursive': {'key': 'recursive', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, recursive=None, **kwargs) -> None: + super(AzureDataLakeStoreSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.recursive = recursive + self.type = 'AzureDataLakeStoreSource' + + +class AzureDataLakeStoreWriteSettings(StoreWriteSettings): + """Azure data lake store write settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The write setting type. + :type type: str + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param copy_behavior: The type of copy behavior for copy sink. + :type copy_behavior: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'copy_behavior': {'key': 'copyBehavior', 'type': 'object'}, + } + + def __init__(self, *, type: str, additional_properties=None, max_concurrent_connections=None, copy_behavior=None, **kwargs) -> None: + super(AzureDataLakeStoreWriteSettings, self).__init__(additional_properties=additional_properties, type=type, max_concurrent_connections=max_concurrent_connections, copy_behavior=copy_behavior, **kwargs) + + +class AzureFunctionActivity(ExecutionActivity): + """Azure Function activity. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param method: Required. Rest API method for target endpoint. Possible + values include: 'GET', 'POST', 'PUT', 'DELETE', 'OPTIONS', 'HEAD', 'TRACE' + :type method: str or + ~azure.mgmt.datafactory.models.AzureFunctionActivityMethod + :param function_name: Required. Name of the Function that the Azure + Function Activity will call. Type: string (or Expression with resultType + string) + :type function_name: object + :param headers: Represents the headers that will be sent to the request. + For example, to set the language and type on a request: "headers" : { + "Accept-Language": "en-us", "Content-Type": "application/json" }. Type: + string (or Expression with resultType string). + :type headers: object + :param body: Represents the payload that will be sent to the endpoint. + Required for POST/PUT method, not allowed for GET method Type: string (or + Expression with resultType string). + :type body: object + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'method': {'required': True}, + 'function_name': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'method': {'key': 'typeProperties.method', 'type': 'str'}, + 'function_name': {'key': 'typeProperties.functionName', 'type': 'object'}, + 'headers': {'key': 'typeProperties.headers', 'type': 'object'}, + 'body': {'key': 'typeProperties.body', 'type': 'object'}, + } + + def __init__(self, *, name: str, method, function_name, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, headers=None, body=None, **kwargs) -> None: + super(AzureFunctionActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) + self.method = method + self.function_name = function_name + self.headers = headers + self.body = body + self.type = 'AzureFunctionActivity' + + +class AzureFunctionLinkedService(LinkedService): + """Azure Function linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param function_app_url: Required. The endpoint of the Azure Function App. + URL will be in the format https://.azurewebsites.net. + :type function_app_url: object + :param function_key: Function or Host key for Azure Function App. + :type function_key: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'function_app_url': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'function_app_url': {'key': 'typeProperties.functionAppUrl', 'type': 'object'}, + 'function_key': {'key': 'typeProperties.functionKey', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, function_app_url, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, function_key=None, encrypted_credential=None, **kwargs) -> None: + super(AzureFunctionLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.function_app_url = function_app_url + self.function_key = function_key + self.encrypted_credential = encrypted_credential + self.type = 'AzureFunction' + + +class AzureKeyVaultLinkedService(LinkedService): + """Azure Key Vault linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param base_url: Required. The base URL of the Azure Key Vault. e.g. + https://myakv.vault.azure.net Type: string (or Expression with resultType + string). + :type base_url: object + """ + + _validation = { + 'type': {'required': True}, + 'base_url': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'base_url': {'key': 'typeProperties.baseUrl', 'type': 'object'}, + } + + def __init__(self, *, base_url, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, **kwargs) -> None: + super(AzureKeyVaultLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.base_url = base_url + self.type = 'AzureKeyVault' + + +class SecretBase(Model): + """The base definition of a secret type. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SecureString, AzureKeyVaultSecretReference + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'SecureString': 'SecureString', 'AzureKeyVaultSecret': 'AzureKeyVaultSecretReference'} + } + + def __init__(self, **kwargs) -> None: + super(SecretBase, self).__init__(**kwargs) + self.type = None + + +class AzureKeyVaultSecretReference(SecretBase): + """Azure Key Vault secret reference. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param store: Required. The Azure Key Vault linked service reference. + :type store: ~azure.mgmt.datafactory.models.LinkedServiceReference + :param secret_name: Required. The name of the secret in Azure Key Vault. + Type: string (or Expression with resultType string). + :type secret_name: object + :param secret_version: The version of the secret in Azure Key Vault. The + default value is the latest version of the secret. Type: string (or + Expression with resultType string). + :type secret_version: object + """ + + _validation = { + 'type': {'required': True}, + 'store': {'required': True}, + 'secret_name': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'store': {'key': 'store', 'type': 'LinkedServiceReference'}, + 'secret_name': {'key': 'secretName', 'type': 'object'}, + 'secret_version': {'key': 'secretVersion', 'type': 'object'}, + } + + def __init__(self, *, store, secret_name, secret_version=None, **kwargs) -> None: + super(AzureKeyVaultSecretReference, self).__init__(**kwargs) + self.store = store + self.secret_name = secret_name + self.secret_version = secret_version + self.type = 'AzureKeyVaultSecret' + + +class AzureMariaDBLinkedService(LinkedService): + """Azure Database for MariaDB linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: An ODBC connection string. Type: string, + SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param pwd: The Azure key vault secret reference of password in connection + string. + :type pwd: ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'pwd': {'key': 'typeProperties.pwd', 'type': 'AzureKeyVaultSecretReference'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, connection_string=None, pwd=None, encrypted_credential=None, **kwargs) -> None: + super(AzureMariaDBLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.connection_string = connection_string + self.pwd = pwd + self.encrypted_credential = encrypted_credential + self.type = 'AzureMariaDB' + + +class AzureMariaDBSource(CopySource): + """A copy activity Azure MariaDB source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(AzureMariaDBSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'AzureMariaDBSource' + + +class AzureMariaDBTableDataset(Dataset): + """Azure Database for MariaDB dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: + super(AzureMariaDBTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.type = 'AzureMariaDBTable' + + +class AzureMLBatchExecutionActivity(ExecutionActivity): + """Azure ML Batch Execution activity. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param global_parameters: Key,Value pairs to be passed to the Azure ML + Batch Execution Service endpoint. Keys must match the names of web service + parameters defined in the published Azure ML web service. Values will be + passed in the GlobalParameters property of the Azure ML batch execution + request. + :type global_parameters: dict[str, object] + :param web_service_outputs: Key,Value pairs, mapping the names of Azure ML + endpoint's Web Service Outputs to AzureMLWebServiceFile objects specifying + the output Blob locations. This information will be passed in the + WebServiceOutputs property of the Azure ML batch execution request. + :type web_service_outputs: dict[str, + ~azure.mgmt.datafactory.models.AzureMLWebServiceFile] + :param web_service_inputs: Key,Value pairs, mapping the names of Azure ML + endpoint's Web Service Inputs to AzureMLWebServiceFile objects specifying + the input Blob locations.. This information will be passed in the + WebServiceInputs property of the Azure ML batch execution request. + :type web_service_inputs: dict[str, + ~azure.mgmt.datafactory.models.AzureMLWebServiceFile] + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'global_parameters': {'key': 'typeProperties.globalParameters', 'type': '{object}'}, + 'web_service_outputs': {'key': 'typeProperties.webServiceOutputs', 'type': '{AzureMLWebServiceFile}'}, + 'web_service_inputs': {'key': 'typeProperties.webServiceInputs', 'type': '{AzureMLWebServiceFile}'}, + } + + def __init__(self, *, name: str, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, global_parameters=None, web_service_outputs=None, web_service_inputs=None, **kwargs) -> None: + super(AzureMLBatchExecutionActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) + self.global_parameters = global_parameters + self.web_service_outputs = web_service_outputs + self.web_service_inputs = web_service_inputs + self.type = 'AzureMLBatchExecution' + + +class AzureMLLinkedService(LinkedService): + """Azure ML Web Service linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param ml_endpoint: Required. The Batch Execution REST URL for an Azure ML + Web Service endpoint. Type: string (or Expression with resultType string). + :type ml_endpoint: object + :param api_key: Required. The API key for accessing the Azure ML model + endpoint. + :type api_key: ~azure.mgmt.datafactory.models.SecretBase + :param update_resource_endpoint: The Update Resource REST URL for an Azure + ML Web Service endpoint. Type: string (or Expression with resultType + string). + :type update_resource_endpoint: object + :param service_principal_id: The ID of the service principal used to + authenticate against the ARM-based updateResourceEndpoint of an Azure ML + web service. Type: string (or Expression with resultType string). + :type service_principal_id: object + :param service_principal_key: The key of the service principal used to + authenticate against the ARM-based updateResourceEndpoint of an Azure ML + web service. + :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase + :param tenant: The name or ID of the tenant to which the service principal + belongs. Type: string (or Expression with resultType string). + :type tenant: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'ml_endpoint': {'required': True}, + 'api_key': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'ml_endpoint': {'key': 'typeProperties.mlEndpoint', 'type': 'object'}, + 'api_key': {'key': 'typeProperties.apiKey', 'type': 'SecretBase'}, + 'update_resource_endpoint': {'key': 'typeProperties.updateResourceEndpoint', 'type': 'object'}, + 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, + 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, + 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, ml_endpoint, api_key, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, update_resource_endpoint=None, service_principal_id=None, service_principal_key=None, tenant=None, encrypted_credential=None, **kwargs) -> None: + super(AzureMLLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.ml_endpoint = ml_endpoint + self.api_key = api_key + self.update_resource_endpoint = update_resource_endpoint + self.service_principal_id = service_principal_id + self.service_principal_key = service_principal_key + self.tenant = tenant + self.encrypted_credential = encrypted_credential + self.type = 'AzureML' + + +class AzureMLUpdateResourceActivity(ExecutionActivity): + """Azure ML Update Resource management activity. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param trained_model_name: Required. Name of the Trained Model module in + the Web Service experiment to be updated. Type: string (or Expression with + resultType string). + :type trained_model_name: object + :param trained_model_linked_service_name: Required. Name of Azure Storage + linked service holding the .ilearner file that will be uploaded by the + update operation. + :type trained_model_linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param trained_model_file_path: Required. The relative file path in + trainedModelLinkedService to represent the .ilearner file that will be + uploaded by the update operation. Type: string (or Expression with + resultType string). + :type trained_model_file_path: object + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'trained_model_name': {'required': True}, + 'trained_model_linked_service_name': {'required': True}, + 'trained_model_file_path': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'trained_model_name': {'key': 'typeProperties.trainedModelName', 'type': 'object'}, + 'trained_model_linked_service_name': {'key': 'typeProperties.trainedModelLinkedServiceName', 'type': 'LinkedServiceReference'}, + 'trained_model_file_path': {'key': 'typeProperties.trainedModelFilePath', 'type': 'object'}, + } + + def __init__(self, *, name: str, trained_model_name, trained_model_linked_service_name, trained_model_file_path, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, **kwargs) -> None: + super(AzureMLUpdateResourceActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) + self.trained_model_name = trained_model_name + self.trained_model_linked_service_name = trained_model_linked_service_name + self.trained_model_file_path = trained_model_file_path + self.type = 'AzureMLUpdateResource' + + +class AzureMLWebServiceFile(Model): + """Azure ML WebService Input/Output file. + + All required parameters must be populated in order to send to Azure. + + :param file_path: Required. The relative file path, including container + name, in the Azure Blob Storage specified by the LinkedService. Type: + string (or Expression with resultType string). + :type file_path: object + :param linked_service_name: Required. Reference to an Azure Storage + LinkedService, where Azure ML WebService Input/Output file located. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + """ + + _validation = { + 'file_path': {'required': True}, + 'linked_service_name': {'required': True}, + } + + _attribute_map = { + 'file_path': {'key': 'filePath', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + } + + def __init__(self, *, file_path, linked_service_name, **kwargs) -> None: + super(AzureMLWebServiceFile, self).__init__(**kwargs) + self.file_path = file_path + self.linked_service_name = linked_service_name + + +class AzureMySqlLinkedService(LinkedService): + """Azure MySQL database linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: Required. The connection string. Type: string, + SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param password: The Azure key vault secret reference of password in + connection string. + :type password: + ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'connection_string': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'AzureKeyVaultSecretReference'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, connection_string, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, password=None, encrypted_credential=None, **kwargs) -> None: + super(AzureMySqlLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.connection_string = connection_string + self.password = password + self.encrypted_credential = encrypted_credential + self.type = 'AzureMySql' + + +class AzureMySqlSource(CopySource): + """A copy activity Azure MySQL source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: Database query. Type: string (or Expression with resultType + string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(AzureMySqlSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'AzureMySqlSource' + + +class AzureMySqlTableDataset(Dataset): + """The Azure MySQL database dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The Azure MySQL database table name. Type: string (or + Expression with resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: + super(AzureMySqlTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.type = 'AzureMySqlTable' + + +class AzurePostgreSqlLinkedService(LinkedService): + """Azure PostgreSQL linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: An ODBC connection string. Type: string, + SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param password: The Azure key vault secret reference of password in + connection string. + :type password: + ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'AzureKeyVaultSecretReference'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, connection_string=None, password=None, encrypted_credential=None, **kwargs) -> None: + super(AzurePostgreSqlLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.connection_string = connection_string + self.password = password + self.encrypted_credential = encrypted_credential + self.type = 'AzurePostgreSql' + + +class AzurePostgreSqlSink(CopySink): + """A copy activity Azure PostgreSQL sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param pre_copy_script: A query to execute before starting the copy. Type: + string (or Expression with resultType string). + :type pre_copy_script: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'pre_copy_script': {'key': 'preCopyScript', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, max_concurrent_connections=None, pre_copy_script=None, **kwargs) -> None: + super(AzurePostgreSqlSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.pre_copy_script = pre_copy_script + self.type = 'AzurePostgreSqlSink' + + +class AzurePostgreSqlSource(CopySource): + """A copy activity Azure PostgreSQL source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(AzurePostgreSqlSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'AzurePostgreSqlSource' + + +class AzurePostgreSqlTableDataset(Dataset): + """Azure PostgreSQL dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name of the Azure PostgreSQL database which + includes both schema and table. Type: string (or Expression with + resultType string). + :type table_name: object + :param table: The table name of the Azure PostgreSQL database. Type: + string (or Expression with resultType string). + :type table: object + :param azure_postgre_sql_table_dataset_schema: The schema name of the + Azure PostgreSQL database. Type: string (or Expression with resultType + string). + :type azure_postgre_sql_table_dataset_schema: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + 'table': {'key': 'typeProperties.table', 'type': 'object'}, + 'azure_postgre_sql_table_dataset_schema': {'key': 'typeProperties.schema', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, table=None, azure_postgre_sql_table_dataset_schema=None, **kwargs) -> None: + super(AzurePostgreSqlTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.table = table + self.azure_postgre_sql_table_dataset_schema = azure_postgre_sql_table_dataset_schema + self.type = 'AzurePostgreSqlTable' + + +class AzureQueueSink(CopySink): + """A copy activity Azure Queue sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, max_concurrent_connections=None, **kwargs) -> None: + super(AzureQueueSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.type = 'AzureQueueSink' + + +class AzureSearchIndexDataset(Dataset): + """The Azure Search Index. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param index_name: Required. The name of the Azure Search Index. Type: + string (or Expression with resultType string). + :type index_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + 'index_name': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'index_name': {'key': 'typeProperties.indexName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, index_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, **kwargs) -> None: + super(AzureSearchIndexDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.index_name = index_name + self.type = 'AzureSearchIndex' + + +class AzureSearchIndexSink(CopySink): + """A copy activity Azure Search Index sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param write_behavior: Specify the write behavior when upserting documents + into Azure Search Index. Possible values include: 'Merge', 'Upload' + :type write_behavior: str or + ~azure.mgmt.datafactory.models.AzureSearchIndexWriteBehaviorType + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'write_behavior': {'key': 'writeBehavior', 'type': 'str'}, + } + + def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, max_concurrent_connections=None, write_behavior=None, **kwargs) -> None: + super(AzureSearchIndexSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.write_behavior = write_behavior + self.type = 'AzureSearchIndexSink' + + +class AzureSearchLinkedService(LinkedService): + """Linked service for Windows Azure Search Service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param url: Required. URL for Azure Search service. Type: string (or + Expression with resultType string). + :type url: object + :param key: Admin Key for Azure Search service + :type key: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'url': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'url': {'key': 'typeProperties.url', 'type': 'object'}, + 'key': {'key': 'typeProperties.key', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, url, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, key=None, encrypted_credential=None, **kwargs) -> None: + super(AzureSearchLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.url = url + self.key = key + self.encrypted_credential = encrypted_credential + self.type = 'AzureSearch' + + +class AzureSqlDatabaseLinkedService(LinkedService): + """Microsoft Azure SQL Database linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: Required. The connection string. Type: string, + SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param password: The Azure key vault secret reference of password in + connection string. + :type password: + ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param service_principal_id: The ID of the service principal used to + authenticate against Azure SQL Database. Type: string (or Expression with + resultType string). + :type service_principal_id: object + :param service_principal_key: The key of the service principal used to + authenticate against Azure SQL Database. + :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase + :param tenant: The name or ID of the tenant to which the service principal + belongs. Type: string (or Expression with resultType string). + :type tenant: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'connection_string': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'AzureKeyVaultSecretReference'}, + 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, + 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, + 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, connection_string, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, password=None, service_principal_id=None, service_principal_key=None, tenant=None, encrypted_credential=None, **kwargs) -> None: + super(AzureSqlDatabaseLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.connection_string = connection_string + self.password = password + self.service_principal_id = service_principal_id + self.service_principal_key = service_principal_key + self.tenant = tenant + self.encrypted_credential = encrypted_credential + self.type = 'AzureSqlDatabase' + + +class AzureSqlDWLinkedService(LinkedService): + """Azure SQL Data Warehouse linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: Required. The connection string. Type: string, + SecureString or AzureKeyVaultSecretReference. Type: string, SecureString + or AzureKeyVaultSecretReference. + :type connection_string: object + :param password: The Azure key vault secret reference of password in + connection string. + :type password: + ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param service_principal_id: The ID of the service principal used to + authenticate against Azure SQL Data Warehouse. Type: string (or Expression + with resultType string). + :type service_principal_id: object + :param service_principal_key: The key of the service principal used to + authenticate against Azure SQL Data Warehouse. + :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase + :param tenant: The name or ID of the tenant to which the service principal + belongs. Type: string (or Expression with resultType string). + :type tenant: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'connection_string': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'AzureKeyVaultSecretReference'}, + 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, + 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, + 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, connection_string, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, password=None, service_principal_id=None, service_principal_key=None, tenant=None, encrypted_credential=None, **kwargs) -> None: + super(AzureSqlDWLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.connection_string = connection_string + self.password = password + self.service_principal_id = service_principal_id + self.service_principal_key = service_principal_key + self.tenant = tenant + self.encrypted_credential = encrypted_credential + self.type = 'AzureSqlDW' + + +class AzureSqlDWTableDataset(Dataset): + """The Azure SQL Data Warehouse dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: This property will be retired. Please consider using + schema + table properties instead. + :type table_name: object + :param azure_sql_dw_table_dataset_schema: The schema name of the Azure SQL + Data Warehouse. Type: string (or Expression with resultType string). + :type azure_sql_dw_table_dataset_schema: object + :param table: The table name of the Azure SQL Data Warehouse. Type: string + (or Expression with resultType string). + :type table: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + 'azure_sql_dw_table_dataset_schema': {'key': 'typeProperties.schema', 'type': 'object'}, + 'table': {'key': 'typeProperties.table', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, azure_sql_dw_table_dataset_schema=None, table=None, **kwargs) -> None: + super(AzureSqlDWTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.azure_sql_dw_table_dataset_schema = azure_sql_dw_table_dataset_schema + self.table = table + self.type = 'AzureSqlDWTable' + + +class AzureSqlMILinkedService(LinkedService): + """Azure SQL Managed Instance linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: Required. The connection string. Type: string, + SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param password: The Azure key vault secret reference of password in + connection string. + :type password: + ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param service_principal_id: The ID of the service principal used to + authenticate against Azure SQL Managed Instance. Type: string (or + Expression with resultType string). + :type service_principal_id: object + :param service_principal_key: The key of the service principal used to + authenticate against Azure SQL Managed Instance. + :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase + :param tenant: The name or ID of the tenant to which the service principal + belongs. Type: string (or Expression with resultType string). + :type tenant: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'connection_string': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'AzureKeyVaultSecretReference'}, + 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, + 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, + 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, connection_string, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, password=None, service_principal_id=None, service_principal_key=None, tenant=None, encrypted_credential=None, **kwargs) -> None: + super(AzureSqlMILinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.connection_string = connection_string + self.password = password + self.service_principal_id = service_principal_id + self.service_principal_key = service_principal_key + self.tenant = tenant + self.encrypted_credential = encrypted_credential + self.type = 'AzureSqlMI' + + +class AzureSqlMITableDataset(Dataset): + """The Azure SQL Managed Instance dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: This property will be retired. Please consider using + schema + table properties instead. + :type table_name: object + :param azure_sql_mi_table_dataset_schema: The schema name of the Azure SQL + Managed Instance. Type: string (or Expression with resultType string). + :type azure_sql_mi_table_dataset_schema: object + :param table: The table name of the Azure SQL Managed Instance dataset. + Type: string (or Expression with resultType string). + :type table: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + 'azure_sql_mi_table_dataset_schema': {'key': 'typeProperties.schema', 'type': 'object'}, + 'table': {'key': 'typeProperties.table', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, azure_sql_mi_table_dataset_schema=None, table=None, **kwargs) -> None: + super(AzureSqlMITableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.azure_sql_mi_table_dataset_schema = azure_sql_mi_table_dataset_schema + self.table = table + self.type = 'AzureSqlMITable' + + +class AzureSqlSink(CopySink): + """A copy activity Azure SQL sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param sql_writer_stored_procedure_name: SQL writer stored procedure name. + Type: string (or Expression with resultType string). + :type sql_writer_stored_procedure_name: object + :param sql_writer_table_type: SQL writer table type. Type: string (or + Expression with resultType string). + :type sql_writer_table_type: object + :param pre_copy_script: SQL pre-copy script. Type: string (or Expression + with resultType string). + :type pre_copy_script: object + :param stored_procedure_parameters: SQL stored procedure parameters. + :type stored_procedure_parameters: dict[str, + ~azure.mgmt.datafactory.models.StoredProcedureParameter] + :param stored_procedure_table_type_parameter_name: The stored procedure + parameter name of the table type. Type: string (or Expression with + resultType string). + :type stored_procedure_table_type_parameter_name: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sql_writer_stored_procedure_name': {'key': 'sqlWriterStoredProcedureName', 'type': 'object'}, + 'sql_writer_table_type': {'key': 'sqlWriterTableType', 'type': 'object'}, + 'pre_copy_script': {'key': 'preCopyScript', 'type': 'object'}, + 'stored_procedure_parameters': {'key': 'storedProcedureParameters', 'type': '{StoredProcedureParameter}'}, + 'stored_procedure_table_type_parameter_name': {'key': 'storedProcedureTableTypeParameterName', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, max_concurrent_connections=None, sql_writer_stored_procedure_name=None, sql_writer_table_type=None, pre_copy_script=None, stored_procedure_parameters=None, stored_procedure_table_type_parameter_name=None, **kwargs) -> None: + super(AzureSqlSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.sql_writer_stored_procedure_name = sql_writer_stored_procedure_name + self.sql_writer_table_type = sql_writer_table_type + self.pre_copy_script = pre_copy_script + self.stored_procedure_parameters = stored_procedure_parameters + self.stored_procedure_table_type_parameter_name = stored_procedure_table_type_parameter_name + self.type = 'AzureSqlSink' + + +class AzureSqlSource(CopySource): + """A copy activity Azure SQL source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param sql_reader_query: SQL reader query. Type: string (or Expression + with resultType string). + :type sql_reader_query: object + :param sql_reader_stored_procedure_name: Name of the stored procedure for + a SQL Database source. This cannot be used at the same time as + SqlReaderQuery. Type: string (or Expression with resultType string). + :type sql_reader_stored_procedure_name: object + :param stored_procedure_parameters: Value and type setting for stored + procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". + :type stored_procedure_parameters: dict[str, + ~azure.mgmt.datafactory.models.StoredProcedureParameter] + :param produce_additional_types: Which additional types to produce. + :type produce_additional_types: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sql_reader_query': {'key': 'sqlReaderQuery', 'type': 'object'}, + 'sql_reader_stored_procedure_name': {'key': 'sqlReaderStoredProcedureName', 'type': 'object'}, + 'stored_procedure_parameters': {'key': 'storedProcedureParameters', 'type': '{StoredProcedureParameter}'}, + 'produce_additional_types': {'key': 'produceAdditionalTypes', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, sql_reader_query=None, sql_reader_stored_procedure_name=None, stored_procedure_parameters=None, produce_additional_types=None, **kwargs) -> None: + super(AzureSqlSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.sql_reader_query = sql_reader_query + self.sql_reader_stored_procedure_name = sql_reader_stored_procedure_name + self.stored_procedure_parameters = stored_procedure_parameters + self.produce_additional_types = produce_additional_types + self.type = 'AzureSqlSource' + + +class AzureSqlTableDataset(Dataset): + """The Azure SQL Server database dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: This property will be retired. Please consider using + schema + table properties instead. + :type table_name: object + :param azure_sql_table_dataset_schema: The schema name of the Azure SQL + database. Type: string (or Expression with resultType string). + :type azure_sql_table_dataset_schema: object + :param table: The table name of the Azure SQL database. Type: string (or + Expression with resultType string). + :type table: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + 'azure_sql_table_dataset_schema': {'key': 'typeProperties.schema', 'type': 'object'}, + 'table': {'key': 'typeProperties.table', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, azure_sql_table_dataset_schema=None, table=None, **kwargs) -> None: + super(AzureSqlTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.azure_sql_table_dataset_schema = azure_sql_table_dataset_schema + self.table = table + self.type = 'AzureSqlTable' + + +class AzureStorageLinkedService(LinkedService): + """The storage account linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: The connection string. It is mutually exclusive + with sasUri property. Type: string, SecureString or + AzureKeyVaultSecretReference. + :type connection_string: object + :param account_key: The Azure key vault secret reference of accountKey in + connection string. + :type account_key: + ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param sas_uri: SAS URI of the Azure Storage resource. It is mutually + exclusive with connectionString property. Type: string, SecureString or + AzureKeyVaultSecretReference. + :type sas_uri: object + :param sas_token: The Azure key vault secret reference of sasToken in sas + uri. + :type sas_token: + ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'account_key': {'key': 'typeProperties.accountKey', 'type': 'AzureKeyVaultSecretReference'}, + 'sas_uri': {'key': 'typeProperties.sasUri', 'type': 'object'}, + 'sas_token': {'key': 'typeProperties.sasToken', 'type': 'AzureKeyVaultSecretReference'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'str'}, + } + + def __init__(self, *, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, connection_string=None, account_key=None, sas_uri=None, sas_token=None, encrypted_credential: str=None, **kwargs) -> None: + super(AzureStorageLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.connection_string = connection_string + self.account_key = account_key + self.sas_uri = sas_uri + self.sas_token = sas_token + self.encrypted_credential = encrypted_credential + self.type = 'AzureStorage' + + +class AzureTableDataset(Dataset): + """The Azure Table storage dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: Required. The table name of the Azure Table storage. + Type: string (or Expression with resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + 'table_name': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, table_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, **kwargs) -> None: + super(AzureTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.type = 'AzureTable' + + +class AzureTableSink(CopySink): + """A copy activity Azure Table sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param azure_table_default_partition_key_value: Azure Table default + partition key value. Type: string (or Expression with resultType string). + :type azure_table_default_partition_key_value: object + :param azure_table_partition_key_name: Azure Table partition key name. + Type: string (or Expression with resultType string). + :type azure_table_partition_key_name: object + :param azure_table_row_key_name: Azure Table row key name. Type: string + (or Expression with resultType string). + :type azure_table_row_key_name: object + :param azure_table_insert_type: Azure Table insert type. Type: string (or + Expression with resultType string). + :type azure_table_insert_type: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'azure_table_default_partition_key_value': {'key': 'azureTableDefaultPartitionKeyValue', 'type': 'object'}, + 'azure_table_partition_key_name': {'key': 'azureTablePartitionKeyName', 'type': 'object'}, + 'azure_table_row_key_name': {'key': 'azureTableRowKeyName', 'type': 'object'}, + 'azure_table_insert_type': {'key': 'azureTableInsertType', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, max_concurrent_connections=None, azure_table_default_partition_key_value=None, azure_table_partition_key_name=None, azure_table_row_key_name=None, azure_table_insert_type=None, **kwargs) -> None: + super(AzureTableSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.azure_table_default_partition_key_value = azure_table_default_partition_key_value + self.azure_table_partition_key_name = azure_table_partition_key_name + self.azure_table_row_key_name = azure_table_row_key_name + self.azure_table_insert_type = azure_table_insert_type + self.type = 'AzureTableSink' + + +class AzureTableSource(CopySource): + """A copy activity Azure Table source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param azure_table_source_query: Azure Table source query. Type: string + (or Expression with resultType string). + :type azure_table_source_query: object + :param azure_table_source_ignore_table_not_found: Azure Table source + ignore table not found. Type: boolean (or Expression with resultType + boolean). + :type azure_table_source_ignore_table_not_found: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'azure_table_source_query': {'key': 'azureTableSourceQuery', 'type': 'object'}, + 'azure_table_source_ignore_table_not_found': {'key': 'azureTableSourceIgnoreTableNotFound', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, azure_table_source_query=None, azure_table_source_ignore_table_not_found=None, **kwargs) -> None: + super(AzureTableSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.azure_table_source_query = azure_table_source_query + self.azure_table_source_ignore_table_not_found = azure_table_source_ignore_table_not_found + self.type = 'AzureTableSource' + + +class AzureTableStorageLinkedService(LinkedService): + """The azure table storage linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: The connection string. It is mutually exclusive + with sasUri property. Type: string, SecureString or + AzureKeyVaultSecretReference. + :type connection_string: object + :param account_key: The Azure key vault secret reference of accountKey in + connection string. + :type account_key: + ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param sas_uri: SAS URI of the Azure Storage resource. It is mutually + exclusive with connectionString property. Type: string, SecureString or + AzureKeyVaultSecretReference. + :type sas_uri: object + :param sas_token: The Azure key vault secret reference of sasToken in sas + uri. + :type sas_token: + ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'account_key': {'key': 'typeProperties.accountKey', 'type': 'AzureKeyVaultSecretReference'}, + 'sas_uri': {'key': 'typeProperties.sasUri', 'type': 'object'}, + 'sas_token': {'key': 'typeProperties.sasToken', 'type': 'AzureKeyVaultSecretReference'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'str'}, + } + + def __init__(self, *, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, connection_string=None, account_key=None, sas_uri=None, sas_token=None, encrypted_credential: str=None, **kwargs) -> None: + super(AzureTableStorageLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.connection_string = connection_string + self.account_key = account_key + self.sas_uri = sas_uri + self.sas_token = sas_token + self.encrypted_credential = encrypted_credential + self.type = 'AzureTableStorage' + + +class BinaryDataset(Dataset): + """Binary dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param location: Required. The location of the Binary storage. + :type location: ~azure.mgmt.datafactory.models.DatasetLocation + :param compression: The data compression method used for the binary + dataset. + :type compression: ~azure.mgmt.datafactory.models.DatasetCompression + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'typeProperties.location', 'type': 'DatasetLocation'}, + 'compression': {'key': 'typeProperties.compression', 'type': 'DatasetCompression'}, + } + + def __init__(self, *, linked_service_name, location, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, compression=None, **kwargs) -> None: + super(BinaryDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.location = location + self.compression = compression + self.type = 'Binary' + + +class BinarySink(CopySink): + """A copy activity Binary sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param store_settings: Binary store settings. + :type store_settings: ~azure.mgmt.datafactory.models.StoreReadSettings + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'store_settings': {'key': 'storeSettings', 'type': 'StoreReadSettings'}, + } + + def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, max_concurrent_connections=None, store_settings=None, **kwargs) -> None: + super(BinarySink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.store_settings = store_settings + self.type = 'BinarySink' + + +class BinarySource(CopySource): + """A copy activity Binary source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param store_settings: Binary store settings. + :type store_settings: ~azure.mgmt.datafactory.models.StoreReadSettings + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'store_settings': {'key': 'storeSettings', 'type': 'StoreReadSettings'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, store_settings=None, **kwargs) -> None: + super(BinarySource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.store_settings = store_settings + self.type = 'BinarySource' + + +class Trigger(Model): + """Azure data factory nested object which contains information about creating + pipeline run. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: RerunTumblingWindowTrigger, TumblingWindowTrigger, + MultiplePipelineTrigger + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Trigger description. + :type description: str + :ivar runtime_state: Indicates if trigger is running or not. Updated when + Start/Stop APIs are called on the Trigger. Possible values include: + 'Started', 'Stopped', 'Disabled' + :vartype runtime_state: str or + ~azure.mgmt.datafactory.models.TriggerRuntimeState + :param annotations: List of tags that can be used for describing the + trigger. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'runtime_state': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'runtime_state': {'key': 'runtimeState', 'type': 'str'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'RerunTumblingWindowTrigger': 'RerunTumblingWindowTrigger', 'TumblingWindowTrigger': 'TumblingWindowTrigger', 'MultiplePipelineTrigger': 'MultiplePipelineTrigger'} + } + + def __init__(self, *, additional_properties=None, description: str=None, annotations=None, **kwargs) -> None: + super(Trigger, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.description = description + self.runtime_state = None + self.annotations = annotations + self.type = None + + +class MultiplePipelineTrigger(Trigger): + """Base class for all triggers that support one to many model for trigger to + pipeline. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: BlobEventsTrigger, BlobTrigger, ScheduleTrigger + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Trigger description. + :type description: str + :ivar runtime_state: Indicates if trigger is running or not. Updated when + Start/Stop APIs are called on the Trigger. Possible values include: + 'Started', 'Stopped', 'Disabled' + :vartype runtime_state: str or + ~azure.mgmt.datafactory.models.TriggerRuntimeState + :param annotations: List of tags that can be used for describing the + trigger. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param pipelines: Pipelines that need to be started. + :type pipelines: + list[~azure.mgmt.datafactory.models.TriggerPipelineReference] + """ + + _validation = { + 'runtime_state': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'runtime_state': {'key': 'runtimeState', 'type': 'str'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'pipelines': {'key': 'pipelines', 'type': '[TriggerPipelineReference]'}, + } + + _subtype_map = { + 'type': {'BlobEventsTrigger': 'BlobEventsTrigger', 'BlobTrigger': 'BlobTrigger', 'ScheduleTrigger': 'ScheduleTrigger'} + } + + def __init__(self, *, additional_properties=None, description: str=None, annotations=None, pipelines=None, **kwargs) -> None: + super(MultiplePipelineTrigger, self).__init__(additional_properties=additional_properties, description=description, annotations=annotations, **kwargs) + self.pipelines = pipelines + self.type = 'MultiplePipelineTrigger' + + +class BlobEventsTrigger(MultiplePipelineTrigger): + """Trigger that runs every time a Blob event occurs. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Trigger description. + :type description: str + :ivar runtime_state: Indicates if trigger is running or not. Updated when + Start/Stop APIs are called on the Trigger. Possible values include: + 'Started', 'Stopped', 'Disabled' + :vartype runtime_state: str or + ~azure.mgmt.datafactory.models.TriggerRuntimeState + :param annotations: List of tags that can be used for describing the + trigger. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param pipelines: Pipelines that need to be started. + :type pipelines: + list[~azure.mgmt.datafactory.models.TriggerPipelineReference] + :param blob_path_begins_with: The blob path must begin with the pattern + provided for trigger to fire. For example, '/records/blobs/december/' will + only fire the trigger for blobs in the december folder under the records + container. At least one of these must be provided: blobPathBeginsWith, + blobPathEndsWith. + :type blob_path_begins_with: str + :param blob_path_ends_with: The blob path must end with the pattern + provided for trigger to fire. For example, 'december/boxes.csv' will only + fire the trigger for blobs named boxes in a december folder. At least one + of these must be provided: blobPathBeginsWith, blobPathEndsWith. + :type blob_path_ends_with: str + :param events: Required. The type of events that cause this trigger to + fire. + :type events: list[str or ~azure.mgmt.datafactory.models.BlobEventTypes] + :param scope: Required. The ARM resource ID of the Storage Account. + :type scope: str + """ + + _validation = { + 'runtime_state': {'readonly': True}, + 'type': {'required': True}, + 'events': {'required': True}, + 'scope': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'runtime_state': {'key': 'runtimeState', 'type': 'str'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'pipelines': {'key': 'pipelines', 'type': '[TriggerPipelineReference]'}, + 'blob_path_begins_with': {'key': 'typeProperties.blobPathBeginsWith', 'type': 'str'}, + 'blob_path_ends_with': {'key': 'typeProperties.blobPathEndsWith', 'type': 'str'}, + 'events': {'key': 'typeProperties.events', 'type': '[str]'}, + 'scope': {'key': 'typeProperties.scope', 'type': 'str'}, + } + + def __init__(self, *, events, scope: str, additional_properties=None, description: str=None, annotations=None, pipelines=None, blob_path_begins_with: str=None, blob_path_ends_with: str=None, **kwargs) -> None: + super(BlobEventsTrigger, self).__init__(additional_properties=additional_properties, description=description, annotations=annotations, pipelines=pipelines, **kwargs) + self.blob_path_begins_with = blob_path_begins_with + self.blob_path_ends_with = blob_path_ends_with + self.events = events + self.scope = scope + self.type = 'BlobEventsTrigger' + + +class BlobSink(CopySink): + """A copy activity Azure Blob sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param blob_writer_overwrite_files: Blob writer overwrite files. Type: + boolean (or Expression with resultType boolean). + :type blob_writer_overwrite_files: object + :param blob_writer_date_time_format: Blob writer date time format. Type: + string (or Expression with resultType string). + :type blob_writer_date_time_format: object + :param blob_writer_add_header: Blob writer add header. Type: boolean (or + Expression with resultType boolean). + :type blob_writer_add_header: object + :param copy_behavior: The type of copy behavior for copy sink. + :type copy_behavior: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'blob_writer_overwrite_files': {'key': 'blobWriterOverwriteFiles', 'type': 'object'}, + 'blob_writer_date_time_format': {'key': 'blobWriterDateTimeFormat', 'type': 'object'}, + 'blob_writer_add_header': {'key': 'blobWriterAddHeader', 'type': 'object'}, + 'copy_behavior': {'key': 'copyBehavior', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, max_concurrent_connections=None, blob_writer_overwrite_files=None, blob_writer_date_time_format=None, blob_writer_add_header=None, copy_behavior=None, **kwargs) -> None: + super(BlobSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.blob_writer_overwrite_files = blob_writer_overwrite_files + self.blob_writer_date_time_format = blob_writer_date_time_format + self.blob_writer_add_header = blob_writer_add_header + self.copy_behavior = copy_behavior + self.type = 'BlobSink' + + +class BlobSource(CopySource): + """A copy activity Azure Blob source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param treat_empty_as_null: Treat empty as null. Type: boolean (or + Expression with resultType boolean). + :type treat_empty_as_null: object + :param skip_header_line_count: Number of header lines to skip from each + blob. Type: integer (or Expression with resultType integer). + :type skip_header_line_count: object + :param recursive: If true, files under the folder path will be read + recursively. Default is true. Type: boolean (or Expression with resultType + boolean). + :type recursive: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'treat_empty_as_null': {'key': 'treatEmptyAsNull', 'type': 'object'}, + 'skip_header_line_count': {'key': 'skipHeaderLineCount', 'type': 'object'}, + 'recursive': {'key': 'recursive', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, treat_empty_as_null=None, skip_header_line_count=None, recursive=None, **kwargs) -> None: + super(BlobSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.treat_empty_as_null = treat_empty_as_null + self.skip_header_line_count = skip_header_line_count + self.recursive = recursive + self.type = 'BlobSource' + + +class BlobTrigger(MultiplePipelineTrigger): + """Trigger that runs every time the selected Blob container changes. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Trigger description. + :type description: str + :ivar runtime_state: Indicates if trigger is running or not. Updated when + Start/Stop APIs are called on the Trigger. Possible values include: + 'Started', 'Stopped', 'Disabled' + :vartype runtime_state: str or + ~azure.mgmt.datafactory.models.TriggerRuntimeState + :param annotations: List of tags that can be used for describing the + trigger. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param pipelines: Pipelines that need to be started. + :type pipelines: + list[~azure.mgmt.datafactory.models.TriggerPipelineReference] + :param folder_path: Required. The path of the container/folder that will + trigger the pipeline. + :type folder_path: str + :param max_concurrency: Required. The max number of parallel files to + handle when it is triggered. + :type max_concurrency: int + :param linked_service: Required. The Azure Storage linked service + reference. + :type linked_service: + ~azure.mgmt.datafactory.models.LinkedServiceReference + """ + + _validation = { + 'runtime_state': {'readonly': True}, + 'type': {'required': True}, + 'folder_path': {'required': True}, + 'max_concurrency': {'required': True}, + 'linked_service': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'runtime_state': {'key': 'runtimeState', 'type': 'str'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'pipelines': {'key': 'pipelines', 'type': '[TriggerPipelineReference]'}, + 'folder_path': {'key': 'typeProperties.folderPath', 'type': 'str'}, + 'max_concurrency': {'key': 'typeProperties.maxConcurrency', 'type': 'int'}, + 'linked_service': {'key': 'typeProperties.linkedService', 'type': 'LinkedServiceReference'}, + } + + def __init__(self, *, folder_path: str, max_concurrency: int, linked_service, additional_properties=None, description: str=None, annotations=None, pipelines=None, **kwargs) -> None: + super(BlobTrigger, self).__init__(additional_properties=additional_properties, description=description, annotations=annotations, pipelines=pipelines, **kwargs) + self.folder_path = folder_path + self.max_concurrency = max_concurrency + self.linked_service = linked_service + self.type = 'BlobTrigger' + + +class CassandraLinkedService(LinkedService): + """Linked service for Cassandra data source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param host: Required. Host name for connection. Type: string (or + Expression with resultType string). + :type host: object + :param authentication_type: AuthenticationType to be used for connection. + Type: string (or Expression with resultType string). + :type authentication_type: object + :param port: The port for the connection. Type: integer (or Expression + with resultType integer). + :type port: object + :param username: Username for authentication. Type: string (or Expression + with resultType string). + :type username: object + :param password: Password for authentication. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'host': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'host': {'key': 'typeProperties.host', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'object'}, + 'port': {'key': 'typeProperties.port', 'type': 'object'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, host, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, authentication_type=None, port=None, username=None, password=None, encrypted_credential=None, **kwargs) -> None: + super(CassandraLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.host = host + self.authentication_type = authentication_type + self.port = port + self.username = username + self.password = password + self.encrypted_credential = encrypted_credential + self.type = 'Cassandra' + + +class CassandraSource(CopySource): + """A copy activity source for a Cassandra database. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: Database query. Should be a SQL-92 query expression or + Cassandra Query Language (CQL) command. Type: string (or Expression with + resultType string). + :type query: object + :param consistency_level: The consistency level specifies how many + Cassandra servers must respond to a read request before returning data to + the client application. Cassandra checks the specified number of Cassandra + servers for data to satisfy the read request. Must be one of + cassandraSourceReadConsistencyLevels. The default value is 'ONE'. It is + case-insensitive. Possible values include: 'ALL', 'EACH_QUORUM', 'QUORUM', + 'LOCAL_QUORUM', 'ONE', 'TWO', 'THREE', 'LOCAL_ONE', 'SERIAL', + 'LOCAL_SERIAL' + :type consistency_level: str or + ~azure.mgmt.datafactory.models.CassandraSourceReadConsistencyLevels + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + 'consistency_level': {'key': 'consistencyLevel', 'type': 'str'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, consistency_level=None, **kwargs) -> None: + super(CassandraSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.consistency_level = consistency_level + self.type = 'CassandraSource' + + +class CassandraTableDataset(Dataset): + """The Cassandra database dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name of the Cassandra database. Type: string + (or Expression with resultType string). + :type table_name: object + :param keyspace: The keyspace of the Cassandra database. Type: string (or + Expression with resultType string). + :type keyspace: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + 'keyspace': {'key': 'typeProperties.keyspace', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, keyspace=None, **kwargs) -> None: + super(CassandraTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.keyspace = keyspace + self.type = 'CassandraTable' + + +class CloudError(Model): + """The object that defines the structure of an Azure Data Factory error + response. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. Error code. + :type code: str + :param message: Required. Error message. + :type message: str + :param target: Property name/path in request associated with error. + :type target: str + :param details: Array with additional error details. + :type details: list[~azure.mgmt.datafactory.models.CloudError] + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'error.code', 'type': 'str'}, + 'message': {'key': 'error.message', 'type': 'str'}, + 'target': {'key': 'error.target', 'type': 'str'}, + 'details': {'key': 'error.details', 'type': '[CloudError]'}, + } + + def __init__(self, *, code: str, message: str, target: str=None, details=None, **kwargs) -> None: + super(CloudError, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class CommonDataServiceForAppsEntityDataset(Dataset): + """The Common Data Service for Apps entity dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param entity_name: The logical name of the entity. Type: string (or + Expression with resultType string). + :type entity_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'entity_name': {'key': 'typeProperties.entityName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, entity_name=None, **kwargs) -> None: + super(CommonDataServiceForAppsEntityDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.entity_name = entity_name + self.type = 'CommonDataServiceForAppsEntity' + + +class CommonDataServiceForAppsLinkedService(LinkedService): + """Common Data Service for Apps linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param deployment_type: Required. The deployment type of the Common Data + Service for Apps instance. 'Online' for Common Data Service for Apps + Online and 'OnPremisesWithIfd' for Common Data Service for Apps + on-premises with Ifd. Type: string (or Expression with resultType string). + Possible values include: 'Online', 'OnPremisesWithIfd' + :type deployment_type: str or + ~azure.mgmt.datafactory.models.DynamicsDeploymentType + :param host_name: The host name of the on-premises Common Data Service for + Apps server. The property is required for on-prem and not allowed for + online. Type: string (or Expression with resultType string). + :type host_name: object + :param port: The port of on-premises Common Data Service for Apps server. + The property is required for on-prem and not allowed for online. Default + is 443. Type: integer (or Expression with resultType integer), minimum: 0. + :type port: object + :param service_uri: The URL to the Microsoft Common Data Service for Apps + server. The property is required for on-line and not allowed for on-prem. + Type: string (or Expression with resultType string). + :type service_uri: object + :param organization_name: The organization name of the Common Data Service + for Apps instance. The property is required for on-prem and required for + online when there are more than one Common Data Service for Apps instances + associated with the user. Type: string (or Expression with resultType + string). + :type organization_name: object + :param authentication_type: Required. The authentication type to connect + to Common Data Service for Apps server. 'Office365' for online scenario, + 'Ifd' for on-premises with Ifd scenario. Type: string (or Expression with + resultType string). Possible values include: 'Office365', 'Ifd' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.DynamicsAuthenticationType + :param username: Required. User name to access the Common Data Service for + Apps instance. Type: string (or Expression with resultType string). + :type username: object + :param password: Password to access the Common Data Service for Apps + instance. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'deployment_type': {'required': True}, + 'authentication_type': {'required': True}, + 'username': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'deployment_type': {'key': 'typeProperties.deploymentType', 'type': 'str'}, + 'host_name': {'key': 'typeProperties.hostName', 'type': 'object'}, + 'port': {'key': 'typeProperties.port', 'type': 'object'}, + 'service_uri': {'key': 'typeProperties.serviceUri', 'type': 'object'}, + 'organization_name': {'key': 'typeProperties.organizationName', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, deployment_type, authentication_type, username, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, host_name=None, port=None, service_uri=None, organization_name=None, password=None, encrypted_credential=None, **kwargs) -> None: + super(CommonDataServiceForAppsLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.deployment_type = deployment_type + self.host_name = host_name + self.port = port + self.service_uri = service_uri + self.organization_name = organization_name + self.authentication_type = authentication_type + self.username = username + self.password = password + self.encrypted_credential = encrypted_credential + self.type = 'CommonDataServiceForApps' + + +class CommonDataServiceForAppsSink(CopySink): + """A copy activity Common Data Service for Apps sink. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :ivar write_behavior: Required. The write behavior for the operation. + Default value: "Upsert" . + :vartype write_behavior: str + :param ignore_null_values: The flag indicating whether to ignore null + values from input dataset (except key fields) during write operation. + Default is false. Type: boolean (or Expression with resultType boolean). + :type ignore_null_values: object + """ + + _validation = { + 'type': {'required': True}, + 'write_behavior': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'write_behavior': {'key': 'writeBehavior', 'type': 'str'}, + 'ignore_null_values': {'key': 'ignoreNullValues', 'type': 'object'}, + } + + write_behavior = "Upsert" + + def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, max_concurrent_connections=None, ignore_null_values=None, **kwargs) -> None: + super(CommonDataServiceForAppsSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.ignore_null_values = ignore_null_values + self.type = 'CommonDataServiceForAppsSink' + + +class CommonDataServiceForAppsSource(CopySource): + """A copy activity Common Data Service for Apps source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: FetchXML is a proprietary query language that is used in + Microsoft Common Data Service for Apps (online & on-premises). Type: + string (or Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(CommonDataServiceForAppsSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'CommonDataServiceForAppsSource' + + +class ConcurLinkedService(LinkedService): + """Concur Service linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param client_id: Required. Application client_id supplied by Concur App + Management. + :type client_id: object + :param username: Required. The user name that you use to access Concur + Service. + :type username: object + :param password: The password corresponding to the user name that you + provided in the username field. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param use_encrypted_endpoints: Specifies whether the data source + endpoints are encrypted using HTTPS. The default value is true. + :type use_encrypted_endpoints: object + :param use_host_verification: Specifies whether to require the host name + in the server's certificate to match the host name of the server when + connecting over SSL. The default value is true. + :type use_host_verification: object + :param use_peer_verification: Specifies whether to verify the identity of + the server when connecting over SSL. The default value is true. + :type use_peer_verification: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'client_id': {'required': True}, + 'username': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, + 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, + 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, client_id, username, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, password=None, use_encrypted_endpoints=None, use_host_verification=None, use_peer_verification=None, encrypted_credential=None, **kwargs) -> None: + super(ConcurLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.client_id = client_id + self.username = username + self.password = password + self.use_encrypted_endpoints = use_encrypted_endpoints + self.use_host_verification = use_host_verification + self.use_peer_verification = use_peer_verification + self.encrypted_credential = encrypted_credential + self.type = 'Concur' + + +class ConcurObjectDataset(Dataset): + """Concur Service dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: + super(ConcurObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.type = 'ConcurObject' + + +class ConcurSource(CopySource): + """A copy activity Concur Service source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(ConcurSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'ConcurSource' + + +class CopyActivity(ExecutionActivity): + """Copy activity. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param source: Required. Copy activity source. + :type source: ~azure.mgmt.datafactory.models.CopySource + :param sink: Required. Copy activity sink. + :type sink: ~azure.mgmt.datafactory.models.CopySink + :param translator: Copy activity translator. If not specified, tabular + translator is used. + :type translator: object + :param enable_staging: Specifies whether to copy data via an interim + staging. Default value is false. Type: boolean (or Expression with + resultType boolean). + :type enable_staging: object + :param staging_settings: Specifies interim staging settings when + EnableStaging is true. + :type staging_settings: ~azure.mgmt.datafactory.models.StagingSettings + :param parallel_copies: Maximum number of concurrent sessions opened on + the source or sink to avoid overloading the data store. Type: integer (or + Expression with resultType integer), minimum: 0. + :type parallel_copies: object + :param data_integration_units: Maximum number of data integration units + that can be used to perform this data movement. Type: integer (or + Expression with resultType integer), minimum: 0. + :type data_integration_units: object + :param enable_skip_incompatible_row: Whether to skip incompatible row. + Default value is false. Type: boolean (or Expression with resultType + boolean). + :type enable_skip_incompatible_row: object + :param redirect_incompatible_row_settings: Redirect incompatible row + settings when EnableSkipIncompatibleRow is true. + :type redirect_incompatible_row_settings: + ~azure.mgmt.datafactory.models.RedirectIncompatibleRowSettings + :param preserve_rules: Preserve Rules. + :type preserve_rules: list[object] + :param preserve: Preserve rules. + :type preserve: list[object] + :param inputs: List of inputs for the activity. + :type inputs: list[~azure.mgmt.datafactory.models.DatasetReference] + :param outputs: List of outputs for the activity. + :type outputs: list[~azure.mgmt.datafactory.models.DatasetReference] + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'source': {'required': True}, + 'sink': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'source': {'key': 'typeProperties.source', 'type': 'CopySource'}, + 'sink': {'key': 'typeProperties.sink', 'type': 'CopySink'}, + 'translator': {'key': 'typeProperties.translator', 'type': 'object'}, + 'enable_staging': {'key': 'typeProperties.enableStaging', 'type': 'object'}, + 'staging_settings': {'key': 'typeProperties.stagingSettings', 'type': 'StagingSettings'}, + 'parallel_copies': {'key': 'typeProperties.parallelCopies', 'type': 'object'}, + 'data_integration_units': {'key': 'typeProperties.dataIntegrationUnits', 'type': 'object'}, + 'enable_skip_incompatible_row': {'key': 'typeProperties.enableSkipIncompatibleRow', 'type': 'object'}, + 'redirect_incompatible_row_settings': {'key': 'typeProperties.redirectIncompatibleRowSettings', 'type': 'RedirectIncompatibleRowSettings'}, + 'preserve_rules': {'key': 'typeProperties.preserveRules', 'type': '[object]'}, + 'preserve': {'key': 'typeProperties.preserve', 'type': '[object]'}, + 'inputs': {'key': 'inputs', 'type': '[DatasetReference]'}, + 'outputs': {'key': 'outputs', 'type': '[DatasetReference]'}, + } + + def __init__(self, *, name: str, source, sink, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, translator=None, enable_staging=None, staging_settings=None, parallel_copies=None, data_integration_units=None, enable_skip_incompatible_row=None, redirect_incompatible_row_settings=None, preserve_rules=None, preserve=None, inputs=None, outputs=None, **kwargs) -> None: + super(CopyActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) + self.source = source + self.sink = sink + self.translator = translator + self.enable_staging = enable_staging + self.staging_settings = staging_settings + self.parallel_copies = parallel_copies + self.data_integration_units = data_integration_units + self.enable_skip_incompatible_row = enable_skip_incompatible_row + self.redirect_incompatible_row_settings = redirect_incompatible_row_settings + self.preserve_rules = preserve_rules + self.preserve = preserve + self.inputs = inputs + self.outputs = outputs + self.type = 'Copy' + + +class CosmosDbLinkedService(LinkedService): + """Microsoft Azure Cosmos Database (CosmosDB) linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: Required. The connection string. Type: string, + SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param account_key: The Azure key vault secret reference of accountKey in + connection string. + :type account_key: + ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'connection_string': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'account_key': {'key': 'typeProperties.accountKey', 'type': 'AzureKeyVaultSecretReference'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, connection_string, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, account_key=None, encrypted_credential=None, **kwargs) -> None: + super(CosmosDbLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.connection_string = connection_string + self.account_key = account_key + self.encrypted_credential = encrypted_credential + self.type = 'CosmosDb' + + +class CosmosDbMongoDbApiCollectionDataset(Dataset): + """The CosmosDB (MongoDB API) database dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param collection: Required. The collection name of the CosmosDB (MongoDB + API) database. Type: string (or Expression with resultType string). + :type collection: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + 'collection': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'collection': {'key': 'typeProperties.collection', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, collection, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, **kwargs) -> None: + super(CosmosDbMongoDbApiCollectionDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.collection = collection + self.type = 'CosmosDbMongoDbApiCollection' + + +class CosmosDbMongoDbApiLinkedService(LinkedService): + """Linked service for CosmosDB (MongoDB API) data source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: Required. The CosmosDB (MongoDB API) connection + string. Type: string, SecureString or AzureKeyVaultSecretReference. Type: + string, SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param database: Required. The name of the CosmosDB (MongoDB API) database + that you want to access. Type: string (or Expression with resultType + string). + :type database: object + """ + + _validation = { + 'type': {'required': True}, + 'connection_string': {'required': True}, + 'database': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'database': {'key': 'typeProperties.database', 'type': 'object'}, + } + + def __init__(self, *, connection_string, database, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, **kwargs) -> None: + super(CosmosDbMongoDbApiLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.connection_string = connection_string + self.database = database + self.type = 'CosmosDbMongoDbApi' + + +class CosmosDbMongoDbApiSink(CopySink): + """A copy activity sink for a CosmosDB (MongoDB API) database. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param write_behavior: Specifies whether the document with same key to be + overwritten (upsert) rather than throw exception (insert). The default + value is "insert". Type: string (or Expression with resultType string). + Type: string (or Expression with resultType string). + :type write_behavior: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'write_behavior': {'key': 'writeBehavior', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, max_concurrent_connections=None, write_behavior=None, **kwargs) -> None: + super(CosmosDbMongoDbApiSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.write_behavior = write_behavior + self.type = 'CosmosDbMongoDbApiSink' + + +class CosmosDbMongoDbApiSource(CopySource): + """A copy activity source for a CosmosDB (MongoDB API) database. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param filter: Specifies selection filter using query operators. To return + all documents in a collection, omit this parameter or pass an empty + document ({}). Type: string (or Expression with resultType string). + :type filter: object + :param cursor_methods: Cursor methods for Mongodb query. + :type cursor_methods: + ~azure.mgmt.datafactory.models.MongoDbCursorMethodsProperties + :param batch_size: Specifies the number of documents to return in each + batch of the response from MongoDB instance. In most cases, modifying the + batch size will not affect the user or the application. This property's + main purpose is to avoid hit the limitation of response size. Type: + integer (or Expression with resultType integer). + :type batch_size: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'filter': {'key': 'filter', 'type': 'object'}, + 'cursor_methods': {'key': 'cursorMethods', 'type': 'MongoDbCursorMethodsProperties'}, + 'batch_size': {'key': 'batchSize', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, filter=None, cursor_methods=None, batch_size=None, **kwargs) -> None: + super(CosmosDbMongoDbApiSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.filter = filter + self.cursor_methods = cursor_methods + self.batch_size = batch_size + self.type = 'CosmosDbMongoDbApiSource' + + +class CouchbaseLinkedService(LinkedService): + """Couchbase server linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: An ODBC connection string. Type: string, + SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param cred_string: The Azure key vault secret reference of credString in + connection string. + :type cred_string: + ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'cred_string': {'key': 'typeProperties.credString', 'type': 'AzureKeyVaultSecretReference'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, connection_string=None, cred_string=None, encrypted_credential=None, **kwargs) -> None: + super(CouchbaseLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.connection_string = connection_string + self.cred_string = cred_string + self.encrypted_credential = encrypted_credential + self.type = 'Couchbase' + + +class CouchbaseSource(CopySource): + """A copy activity Couchbase server source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(CouchbaseSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'CouchbaseSource' + + +class CouchbaseTableDataset(Dataset): + """Couchbase server dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: + super(CouchbaseTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.type = 'CouchbaseTable' + + +class CreateLinkedIntegrationRuntimeRequest(Model): + """The linked integration runtime information. + + :param name: The name of the linked integration runtime. + :type name: str + :param subscription_id: The ID of the subscription that the linked + integration runtime belongs to. + :type subscription_id: str + :param data_factory_name: The name of the data factory that the linked + integration runtime belongs to. + :type data_factory_name: str + :param data_factory_location: The location of the data factory that the + linked integration runtime belongs to. + :type data_factory_location: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'data_factory_name': {'key': 'dataFactoryName', 'type': 'str'}, + 'data_factory_location': {'key': 'dataFactoryLocation', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, subscription_id: str=None, data_factory_name: str=None, data_factory_location: str=None, **kwargs) -> None: + super(CreateLinkedIntegrationRuntimeRequest, self).__init__(**kwargs) + self.name = name + self.subscription_id = subscription_id + self.data_factory_name = data_factory_name + self.data_factory_location = data_factory_location + + +class CreateRunResponse(Model): + """Response body with a run identifier. + + All required parameters must be populated in order to send to Azure. + + :param run_id: Required. Identifier of a run. + :type run_id: str + """ + + _validation = { + 'run_id': {'required': True}, + } + + _attribute_map = { + 'run_id': {'key': 'runId', 'type': 'str'}, + } + + def __init__(self, *, run_id: str, **kwargs) -> None: + super(CreateRunResponse, self).__init__(**kwargs) + self.run_id = run_id + + +class CustomActivity(ExecutionActivity): + """Custom activity type. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param command: Required. Command for custom activity Type: string (or + Expression with resultType string). + :type command: object + :param resource_linked_service: Resource linked service reference. + :type resource_linked_service: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param folder_path: Folder path for resource files Type: string (or + Expression with resultType string). + :type folder_path: object + :param reference_objects: Reference objects + :type reference_objects: + ~azure.mgmt.datafactory.models.CustomActivityReferenceObject + :param extended_properties: User defined property bag. There is no + restriction on the keys or values that can be used. The user specified + custom activity has the full responsibility to consume and interpret the + content defined. + :type extended_properties: dict[str, object] + :param retention_time_in_days: The retention time for the files submitted + for custom activity. Type: double (or Expression with resultType double). + :type retention_time_in_days: object + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'command': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'command': {'key': 'typeProperties.command', 'type': 'object'}, + 'resource_linked_service': {'key': 'typeProperties.resourceLinkedService', 'type': 'LinkedServiceReference'}, + 'folder_path': {'key': 'typeProperties.folderPath', 'type': 'object'}, + 'reference_objects': {'key': 'typeProperties.referenceObjects', 'type': 'CustomActivityReferenceObject'}, + 'extended_properties': {'key': 'typeProperties.extendedProperties', 'type': '{object}'}, + 'retention_time_in_days': {'key': 'typeProperties.retentionTimeInDays', 'type': 'object'}, + } + + def __init__(self, *, name: str, command, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, resource_linked_service=None, folder_path=None, reference_objects=None, extended_properties=None, retention_time_in_days=None, **kwargs) -> None: + super(CustomActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) + self.command = command + self.resource_linked_service = resource_linked_service + self.folder_path = folder_path + self.reference_objects = reference_objects + self.extended_properties = extended_properties + self.retention_time_in_days = retention_time_in_days + self.type = 'Custom' + + +class CustomActivityReferenceObject(Model): + """Reference objects for custom activity. + + :param linked_services: Linked service references. + :type linked_services: + list[~azure.mgmt.datafactory.models.LinkedServiceReference] + :param datasets: Dataset references. + :type datasets: list[~azure.mgmt.datafactory.models.DatasetReference] + """ + + _attribute_map = { + 'linked_services': {'key': 'linkedServices', 'type': '[LinkedServiceReference]'}, + 'datasets': {'key': 'datasets', 'type': '[DatasetReference]'}, + } + + def __init__(self, *, linked_services=None, datasets=None, **kwargs) -> None: + super(CustomActivityReferenceObject, self).__init__(**kwargs) + self.linked_services = linked_services + self.datasets = datasets + + +class CustomDataset(Dataset): + """The custom dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param type_properties: Custom dataset properties. + :type type_properties: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'type_properties': {'key': 'typeProperties', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, type_properties=None, **kwargs) -> None: + super(CustomDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.type_properties = type_properties + self.type = 'CustomDataset' + + +class CustomDataSourceLinkedService(LinkedService): + """Custom linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param type_properties: Required. Custom linked service properties. + :type type_properties: object + """ + + _validation = { + 'type': {'required': True}, + 'type_properties': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'type_properties': {'key': 'typeProperties', 'type': 'object'}, + } + + def __init__(self, *, type_properties, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, **kwargs) -> None: + super(CustomDataSourceLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.type_properties = type_properties + self.type = 'CustomDataSource' + + +class DatabricksNotebookActivity(ExecutionActivity): + """DatabricksNotebook activity. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param notebook_path: Required. The absolute path of the notebook to be + run in the Databricks Workspace. This path must begin with a slash. Type: + string (or Expression with resultType string). + :type notebook_path: object + :param base_parameters: Base parameters to be used for each run of this + job.If the notebook takes a parameter that is not specified, the default + value from the notebook will be used. + :type base_parameters: dict[str, object] + :param libraries: A list of libraries to be installed on the cluster that + will execute the job. + :type libraries: list[dict[str, object]] + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'notebook_path': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'notebook_path': {'key': 'typeProperties.notebookPath', 'type': 'object'}, + 'base_parameters': {'key': 'typeProperties.baseParameters', 'type': '{object}'}, + 'libraries': {'key': 'typeProperties.libraries', 'type': '[{object}]'}, + } + + def __init__(self, *, name: str, notebook_path, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, base_parameters=None, libraries=None, **kwargs) -> None: + super(DatabricksNotebookActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) + self.notebook_path = notebook_path + self.base_parameters = base_parameters + self.libraries = libraries + self.type = 'DatabricksNotebook' + + +class DatabricksSparkJarActivity(ExecutionActivity): + """DatabricksSparkJar activity. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param main_class_name: Required. The full name of the class containing + the main method to be executed. This class must be contained in a JAR + provided as a library. Type: string (or Expression with resultType + string). + :type main_class_name: object + :param parameters: Parameters that will be passed to the main method. + :type parameters: list[object] + :param libraries: A list of libraries to be installed on the cluster that + will execute the job. + :type libraries: list[dict[str, object]] + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'main_class_name': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'main_class_name': {'key': 'typeProperties.mainClassName', 'type': 'object'}, + 'parameters': {'key': 'typeProperties.parameters', 'type': '[object]'}, + 'libraries': {'key': 'typeProperties.libraries', 'type': '[{object}]'}, + } + + def __init__(self, *, name: str, main_class_name, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, parameters=None, libraries=None, **kwargs) -> None: + super(DatabricksSparkJarActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) + self.main_class_name = main_class_name + self.parameters = parameters + self.libraries = libraries + self.type = 'DatabricksSparkJar' + + +class DatabricksSparkPythonActivity(ExecutionActivity): + """DatabricksSparkPython activity. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param python_file: Required. The URI of the Python file to be executed. + DBFS paths are supported. Type: string (or Expression with resultType + string). + :type python_file: object + :param parameters: Command line parameters that will be passed to the + Python file. + :type parameters: list[object] + :param libraries: A list of libraries to be installed on the cluster that + will execute the job. + :type libraries: list[dict[str, object]] + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'python_file': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'python_file': {'key': 'typeProperties.pythonFile', 'type': 'object'}, + 'parameters': {'key': 'typeProperties.parameters', 'type': '[object]'}, + 'libraries': {'key': 'typeProperties.libraries', 'type': '[{object}]'}, + } + + def __init__(self, *, name: str, python_file, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, parameters=None, libraries=None, **kwargs) -> None: + super(DatabricksSparkPythonActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) + self.python_file = python_file + self.parameters = parameters + self.libraries = libraries + self.type = 'DatabricksSparkPython' + + +class DataLakeAnalyticsUSQLActivity(ExecutionActivity): + """Data Lake Analytics U-SQL activity. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param script_path: Required. Case-sensitive path to folder that contains + the U-SQL script. Type: string (or Expression with resultType string). + :type script_path: object + :param script_linked_service: Required. Script linked service reference. + :type script_linked_service: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param degree_of_parallelism: The maximum number of nodes simultaneously + used to run the job. Default value is 1. Type: integer (or Expression with + resultType integer), minimum: 1. + :type degree_of_parallelism: object + :param priority: Determines which jobs out of all that are queued should + be selected to run first. The lower the number, the higher the priority. + Default value is 1000. Type: integer (or Expression with resultType + integer), minimum: 1. + :type priority: object + :param parameters: Parameters for U-SQL job request. + :type parameters: dict[str, object] + :param runtime_version: Runtime version of the U-SQL engine to use. Type: + string (or Expression with resultType string). + :type runtime_version: object + :param compilation_mode: Compilation mode of U-SQL. Must be one of these + values : Semantic, Full and SingleBox. Type: string (or Expression with + resultType string). + :type compilation_mode: object + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'script_path': {'required': True}, + 'script_linked_service': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'script_path': {'key': 'typeProperties.scriptPath', 'type': 'object'}, + 'script_linked_service': {'key': 'typeProperties.scriptLinkedService', 'type': 'LinkedServiceReference'}, + 'degree_of_parallelism': {'key': 'typeProperties.degreeOfParallelism', 'type': 'object'}, + 'priority': {'key': 'typeProperties.priority', 'type': 'object'}, + 'parameters': {'key': 'typeProperties.parameters', 'type': '{object}'}, + 'runtime_version': {'key': 'typeProperties.runtimeVersion', 'type': 'object'}, + 'compilation_mode': {'key': 'typeProperties.compilationMode', 'type': 'object'}, + } + + def __init__(self, *, name: str, script_path, script_linked_service, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, degree_of_parallelism=None, priority=None, parameters=None, runtime_version=None, compilation_mode=None, **kwargs) -> None: + super(DataLakeAnalyticsUSQLActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) + self.script_path = script_path + self.script_linked_service = script_linked_service + self.degree_of_parallelism = degree_of_parallelism + self.priority = priority + self.parameters = parameters + self.runtime_version = runtime_version + self.compilation_mode = compilation_mode + self.type = 'DataLakeAnalyticsU-SQL' + + +class DatasetCompression(Model): + """The compression method used on a dataset. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DatasetZipDeflateCompression, DatasetDeflateCompression, + DatasetGZipCompression, DatasetBZip2Compression + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'ZipDeflate': 'DatasetZipDeflateCompression', 'Deflate': 'DatasetDeflateCompression', 'GZip': 'DatasetGZipCompression', 'BZip2': 'DatasetBZip2Compression'} + } + + def __init__(self, *, additional_properties=None, **kwargs) -> None: + super(DatasetCompression, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.type = None + + +class DatasetBZip2Compression(DatasetCompression): + """The BZip2 compression method used on a dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, additional_properties=None, **kwargs) -> None: + super(DatasetBZip2Compression, self).__init__(additional_properties=additional_properties, **kwargs) + self.type = 'BZip2' + + +class DatasetDeflateCompression(DatasetCompression): + """The Deflate compression method used on a dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. Constant filled by server. + :type type: str + :param level: The Deflate compression level. + :type level: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, level=None, **kwargs) -> None: + super(DatasetDeflateCompression, self).__init__(additional_properties=additional_properties, **kwargs) + self.level = level + self.type = 'Deflate' + + +class DatasetFolder(Model): + """The folder that this Dataset is in. If not specified, Dataset will appear + at the root level. + + :param name: The name of the folder that this Dataset is in. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, **kwargs) -> None: + super(DatasetFolder, self).__init__(**kwargs) + self.name = name + + +class DatasetGZipCompression(DatasetCompression): + """The GZip compression method used on a dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. Constant filled by server. + :type type: str + :param level: The GZip compression level. + :type level: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, level=None, **kwargs) -> None: + super(DatasetGZipCompression, self).__init__(additional_properties=additional_properties, **kwargs) + self.level = level + self.type = 'GZip' + + +class DatasetReference(Model): + """Dataset reference type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. Dataset reference type. Default value: + "DatasetReference" . + :vartype type: str + :param reference_name: Required. Reference dataset name. + :type reference_name: str + :param parameters: Arguments for dataset. + :type parameters: dict[str, object] + """ + + _validation = { + 'type': {'required': True, 'constant': True}, + 'reference_name': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'reference_name': {'key': 'referenceName', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{object}'}, + } + + type = "DatasetReference" + + def __init__(self, *, reference_name: str, parameters=None, **kwargs) -> None: + super(DatasetReference, self).__init__(**kwargs) + self.reference_name = reference_name + self.parameters = parameters + + +class SubResource(Model): + """Azure Data Factory nested resource, which belongs to a factory. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar etag: Etag identifies change in the resource. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SubResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.etag = None + + +class DatasetResource(SubResource): + """Dataset resource type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar etag: Etag identifies change in the resource. + :vartype etag: str + :param properties: Required. Dataset properties. + :type properties: ~azure.mgmt.datafactory.models.Dataset + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'Dataset'}, + } + + def __init__(self, *, properties, **kwargs) -> None: + super(DatasetResource, self).__init__(**kwargs) + self.properties = properties + + +class DatasetZipDeflateCompression(DatasetCompression): + """The ZipDeflate compression method used on a dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. Constant filled by server. + :type type: str + :param level: The ZipDeflate compression level. + :type level: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, level=None, **kwargs) -> None: + super(DatasetZipDeflateCompression, self).__init__(additional_properties=additional_properties, **kwargs) + self.level = level + self.type = 'ZipDeflate' + + +class Db2LinkedService(LinkedService): + """Linked service for DB2 data source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param server: Required. Server name for connection. Type: string (or + Expression with resultType string). + :type server: object + :param database: Required. Database name for connection. Type: string (or + Expression with resultType string). + :type database: object + :param authentication_type: AuthenticationType to be used for connection. + Possible values include: 'Basic' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.Db2AuthenticationType + :param username: Username for authentication. Type: string (or Expression + with resultType string). + :type username: object + :param password: Password for authentication. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'server': {'required': True}, + 'database': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server': {'key': 'typeProperties.server', 'type': 'object'}, + 'database': {'key': 'typeProperties.database', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, server, database, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, authentication_type=None, username=None, password=None, encrypted_credential=None, **kwargs) -> None: + super(Db2LinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.server = server + self.database = database + self.authentication_type = authentication_type + self.username = username + self.password = password + self.encrypted_credential = encrypted_credential + self.type = 'Db2' + + +class Db2Source(CopySource): + """A copy activity source for Db2 databases. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: Database query. Type: string (or Expression with resultType + string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(Db2Source, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'Db2Source' + + +class DeleteActivity(ExecutionActivity): + """Delete activity. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param recursive: If true, files or sub-folders under current folder path + will be deleted recursively. Default is false. Type: boolean (or + Expression with resultType boolean). + :type recursive: object + :param max_concurrent_connections: The max concurrent connections to + connect data source at the same time. + :type max_concurrent_connections: int + :param enable_logging: Whether to record detailed logs of delete-activity + execution. Default value is false. Type: boolean (or Expression with + resultType boolean). + :type enable_logging: object + :param log_storage_settings: Log storage settings customer need to provide + when enableLogging is true. + :type log_storage_settings: + ~azure.mgmt.datafactory.models.LogStorageSettings + :param dataset: Required. Delete activity dataset reference. + :type dataset: ~azure.mgmt.datafactory.models.DatasetReference + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'max_concurrent_connections': {'minimum': 1}, + 'dataset': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'recursive': {'key': 'typeProperties.recursive', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'typeProperties.maxConcurrentConnections', 'type': 'int'}, + 'enable_logging': {'key': 'typeProperties.enableLogging', 'type': 'object'}, + 'log_storage_settings': {'key': 'typeProperties.logStorageSettings', 'type': 'LogStorageSettings'}, + 'dataset': {'key': 'typeProperties.dataset', 'type': 'DatasetReference'}, + } + + def __init__(self, *, name: str, dataset, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, recursive=None, max_concurrent_connections: int=None, enable_logging=None, log_storage_settings=None, **kwargs) -> None: + super(DeleteActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) + self.recursive = recursive + self.max_concurrent_connections = max_concurrent_connections + self.enable_logging = enable_logging + self.log_storage_settings = log_storage_settings + self.dataset = dataset + self.type = 'Delete' + + +class DelimitedTextDataset(Dataset): + """Delimited text dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param location: Required. The location of the delimited text storage. + :type location: ~azure.mgmt.datafactory.models.DatasetLocation + :param column_delimiter: The column delimiter. Type: string (or Expression + with resultType string). + :type column_delimiter: object + :param row_delimiter: The row delimiter. Type: string (or Expression with + resultType string). + :type row_delimiter: object + :param encoding_name: The code page name of the preferred encoding. If + miss, the default value is UTF-8, unless BOM denotes another Unicode + encoding. Refer to the name column of the table in the following link to + set supported values: + https://msdn.microsoft.com/library/system.text.encoding.aspx. Type: string + (or Expression with resultType string). + :type encoding_name: object + :param compression_codec: + :type compression_codec: object + :param compression_level: The data compression method used for + DelimitedText. + :type compression_level: object + :param quote_char: The quote character. Type: string (or Expression with + resultType string). + :type quote_char: object + :param escape_char: The escape character. Type: string (or Expression with + resultType string). + :type escape_char: object + :param first_row_as_header: When used as input, treat the first row of + data as headers. When used as output,write the headers into the output as + the first row of data. The default value is false. Type: boolean (or + Expression with resultType boolean). + :type first_row_as_header: object + :param null_value: The null value string. Type: string (or Expression with + resultType string). + :type null_value: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'typeProperties.location', 'type': 'DatasetLocation'}, + 'column_delimiter': {'key': 'typeProperties.columnDelimiter', 'type': 'object'}, + 'row_delimiter': {'key': 'typeProperties.rowDelimiter', 'type': 'object'}, + 'encoding_name': {'key': 'typeProperties.encodingName', 'type': 'object'}, + 'compression_codec': {'key': 'typeProperties.compressionCodec', 'type': 'object'}, + 'compression_level': {'key': 'typeProperties.compressionLevel', 'type': 'object'}, + 'quote_char': {'key': 'typeProperties.quoteChar', 'type': 'object'}, + 'escape_char': {'key': 'typeProperties.escapeChar', 'type': 'object'}, + 'first_row_as_header': {'key': 'typeProperties.firstRowAsHeader', 'type': 'object'}, + 'null_value': {'key': 'typeProperties.nullValue', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, location, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, column_delimiter=None, row_delimiter=None, encoding_name=None, compression_codec=None, compression_level=None, quote_char=None, escape_char=None, first_row_as_header=None, null_value=None, **kwargs) -> None: + super(DelimitedTextDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.location = location + self.column_delimiter = column_delimiter + self.row_delimiter = row_delimiter + self.encoding_name = encoding_name + self.compression_codec = compression_codec + self.compression_level = compression_level + self.quote_char = quote_char + self.escape_char = escape_char + self.first_row_as_header = first_row_as_header + self.null_value = null_value + self.type = 'DelimitedText' + + +class FormatReadSettings(Model): + """Format read settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The read setting type. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, type: str, additional_properties=None, **kwargs) -> None: + super(FormatReadSettings, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.type = type + + +class DelimitedTextReadSettings(FormatReadSettings): + """Delimited text read settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The read setting type. + :type type: str + :param skip_line_count: Indicates the number of non-empty rows to skip + when reading data from input files. Type: integer (or Expression with + resultType integer). + :type skip_line_count: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'skip_line_count': {'key': 'skipLineCount', 'type': 'object'}, + } + + def __init__(self, *, type: str, additional_properties=None, skip_line_count=None, **kwargs) -> None: + super(DelimitedTextReadSettings, self).__init__(additional_properties=additional_properties, type=type, **kwargs) + self.skip_line_count = skip_line_count + + +class DelimitedTextSink(CopySink): + """A copy activity DelimitedText sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param store_settings: DelimitedText store settings. + :type store_settings: ~azure.mgmt.datafactory.models.StoreWriteSettings + :param format_settings: DelimitedText format settings. + :type format_settings: + ~azure.mgmt.datafactory.models.DelimitedTextWriteSettings + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'store_settings': {'key': 'storeSettings', 'type': 'StoreWriteSettings'}, + 'format_settings': {'key': 'formatSettings', 'type': 'DelimitedTextWriteSettings'}, + } + + def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, max_concurrent_connections=None, store_settings=None, format_settings=None, **kwargs) -> None: + super(DelimitedTextSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.store_settings = store_settings + self.format_settings = format_settings + self.type = 'DelimitedTextSink' + + +class DelimitedTextSource(CopySource): + """A copy activity DelimitedText source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param store_settings: DelimitedText store settings. + :type store_settings: ~azure.mgmt.datafactory.models.StoreReadSettings + :param format_settings: DelimitedText format settings. + :type format_settings: + ~azure.mgmt.datafactory.models.DelimitedTextReadSettings + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'store_settings': {'key': 'storeSettings', 'type': 'StoreReadSettings'}, + 'format_settings': {'key': 'formatSettings', 'type': 'DelimitedTextReadSettings'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, store_settings=None, format_settings=None, **kwargs) -> None: + super(DelimitedTextSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.store_settings = store_settings + self.format_settings = format_settings + self.type = 'DelimitedTextSource' + + +class DelimitedTextWriteSettings(FormatWriteSettings): + """Delimited text write settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The write setting type. + :type type: str + :param quote_all_text: Indicates whether string values should always be + enclosed with quotes. Type: boolean (or Expression with resultType + boolean). + :type quote_all_text: object + :param file_extension: Required. The file extension used to create the + files. Type: string (or Expression with resultType string). + :type file_extension: object + """ + + _validation = { + 'type': {'required': True}, + 'file_extension': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'quote_all_text': {'key': 'quoteAllText', 'type': 'object'}, + 'file_extension': {'key': 'fileExtension', 'type': 'object'}, + } + + def __init__(self, *, type: str, file_extension, additional_properties=None, quote_all_text=None, **kwargs) -> None: + super(DelimitedTextWriteSettings, self).__init__(additional_properties=additional_properties, type=type, **kwargs) + self.quote_all_text = quote_all_text + self.file_extension = file_extension + + +class DependencyReference(Model): + """Referenced dependency. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SelfDependencyTumblingWindowTriggerReference, + TriggerDependencyReference + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'SelfDependencyTumblingWindowTriggerReference': 'SelfDependencyTumblingWindowTriggerReference', 'TriggerDependencyReference': 'TriggerDependencyReference'} + } + + def __init__(self, **kwargs) -> None: + super(DependencyReference, self).__init__(**kwargs) + self.type = None + + +class DistcpSettings(Model): + """Distcp settings. + + All required parameters must be populated in order to send to Azure. + + :param resource_manager_endpoint: Required. Specifies the Yarn + ResourceManager endpoint. Type: string (or Expression with resultType + string). + :type resource_manager_endpoint: object + :param temp_script_path: Required. Specifies an existing folder path which + will be used to store temp Distcp command script. The script file is + generated by ADF and will be removed after Copy job finished. Type: string + (or Expression with resultType string). + :type temp_script_path: object + :param distcp_options: Specifies the Distcp options. Type: string (or + Expression with resultType string). + :type distcp_options: object + """ + + _validation = { + 'resource_manager_endpoint': {'required': True}, + 'temp_script_path': {'required': True}, + } + + _attribute_map = { + 'resource_manager_endpoint': {'key': 'resourceManagerEndpoint', 'type': 'object'}, + 'temp_script_path': {'key': 'tempScriptPath', 'type': 'object'}, + 'distcp_options': {'key': 'distcpOptions', 'type': 'object'}, + } + + def __init__(self, *, resource_manager_endpoint, temp_script_path, distcp_options=None, **kwargs) -> None: + super(DistcpSettings, self).__init__(**kwargs) + self.resource_manager_endpoint = resource_manager_endpoint + self.temp_script_path = temp_script_path + self.distcp_options = distcp_options + + +class DocumentDbCollectionDataset(Dataset): + """Microsoft Azure Document Database Collection dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param collection_name: Required. Document Database collection name. Type: + string (or Expression with resultType string). + :type collection_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + 'collection_name': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'collection_name': {'key': 'typeProperties.collectionName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, collection_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, **kwargs) -> None: + super(DocumentDbCollectionDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.collection_name = collection_name + self.type = 'DocumentDbCollection' + + +class DocumentDbCollectionSink(CopySink): + """A copy activity Document Database Collection sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param nesting_separator: Nested properties separator. Default is . (dot). + Type: string (or Expression with resultType string). + :type nesting_separator: object + :param write_behavior: Describes how to write data to Azure Cosmos DB. + Allowed values: insert and upsert. + :type write_behavior: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'nesting_separator': {'key': 'nestingSeparator', 'type': 'object'}, + 'write_behavior': {'key': 'writeBehavior', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, max_concurrent_connections=None, nesting_separator=None, write_behavior=None, **kwargs) -> None: + super(DocumentDbCollectionSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.nesting_separator = nesting_separator + self.write_behavior = write_behavior + self.type = 'DocumentDbCollectionSink' + + +class DocumentDbCollectionSource(CopySource): + """A copy activity Document Database Collection source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: Documents query. Type: string (or Expression with resultType + string). + :type query: object + :param nesting_separator: Nested properties separator. Type: string (or + Expression with resultType string). + :type nesting_separator: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + 'nesting_separator': {'key': 'nestingSeparator', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, nesting_separator=None, **kwargs) -> None: + super(DocumentDbCollectionSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.nesting_separator = nesting_separator + self.type = 'DocumentDbCollectionSource' + + +class DrillLinkedService(LinkedService): + """Drill server linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: An ODBC connection string. Type: string, + SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param pwd: The Azure key vault secret reference of password in connection + string. + :type pwd: ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'pwd': {'key': 'typeProperties.pwd', 'type': 'AzureKeyVaultSecretReference'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, connection_string=None, pwd=None, encrypted_credential=None, **kwargs) -> None: + super(DrillLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.connection_string = connection_string + self.pwd = pwd + self.encrypted_credential = encrypted_credential + self.type = 'Drill' + + +class DrillSource(CopySource): + """A copy activity Drill server source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(DrillSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'DrillSource' + + +class DrillTableDataset(Dataset): + """Drill server dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: This property will be retired. Please consider using + schema + table properties instead. + :type table_name: object + :param table: The table name of the Drill. Type: string (or Expression + with resultType string). + :type table: object + :param drill_table_dataset_schema: The schema name of the Drill. Type: + string (or Expression with resultType string). + :type drill_table_dataset_schema: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + 'table': {'key': 'typeProperties.table', 'type': 'object'}, + 'drill_table_dataset_schema': {'key': 'typeProperties.schema', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, table=None, drill_table_dataset_schema=None, **kwargs) -> None: + super(DrillTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.table = table + self.drill_table_dataset_schema = drill_table_dataset_schema + self.type = 'DrillTable' + + +class DynamicsAXLinkedService(LinkedService): + """Dynamics AX linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param url: Required. The Dynamics AX (or Dynamics 365 Finance and + Operations) instance OData endpoint. + :type url: object + :param service_principal_id: Required. Specify the application's client + ID. Type: string (or Expression with resultType string). + :type service_principal_id: object + :param service_principal_key: Required. Specify the application's key. + Mark this field as a SecureString to store it securely in Data Factory, or + reference a secret stored in Azure Key Vault. Type: string (or Expression + with resultType string). + :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase + :param tenant: Required. Specify the tenant information (domain name or + tenant ID) under which your application resides. Retrieve it by hovering + the mouse in the top-right corner of the Azure portal. Type: string (or + Expression with resultType string). + :type tenant: object + :param aad_resource_id: Required. Specify the resource you are requesting + authorization. Type: string (or Expression with resultType string). + :type aad_resource_id: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'url': {'required': True}, + 'service_principal_id': {'required': True}, + 'service_principal_key': {'required': True}, + 'tenant': {'required': True}, + 'aad_resource_id': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'url': {'key': 'typeProperties.url', 'type': 'object'}, + 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, + 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, + 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, + 'aad_resource_id': {'key': 'typeProperties.aadResourceId', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, url, service_principal_id, service_principal_key, tenant, aad_resource_id, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, encrypted_credential=None, **kwargs) -> None: + super(DynamicsAXLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.url = url + self.service_principal_id = service_principal_id + self.service_principal_key = service_principal_key + self.tenant = tenant + self.aad_resource_id = aad_resource_id + self.encrypted_credential = encrypted_credential + self.type = 'DynamicsAX' + + +class DynamicsAXResourceDataset(Dataset): + """The path of the Dynamics AX OData entity. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param path: Required. The path of the Dynamics AX OData entity. Type: + string (or Expression with resultType string). + :type path: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + 'path': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'path': {'key': 'typeProperties.path', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, path, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, **kwargs) -> None: + super(DynamicsAXResourceDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.path = path + self.type = 'DynamicsAXResource' + + +class DynamicsAXSource(CopySource): + """A copy activity Dynamics AX source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(DynamicsAXSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'DynamicsAXSource' + + +class DynamicsCrmEntityDataset(Dataset): + """The Dynamics CRM entity dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param entity_name: The logical name of the entity. Type: string (or + Expression with resultType string). + :type entity_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'entity_name': {'key': 'typeProperties.entityName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, entity_name=None, **kwargs) -> None: + super(DynamicsCrmEntityDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.entity_name = entity_name + self.type = 'DynamicsCrmEntity' + + +class DynamicsCrmLinkedService(LinkedService): + """Dynamics CRM linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param deployment_type: Required. The deployment type of the Dynamics CRM + instance. 'Online' for Dynamics CRM Online and 'OnPremisesWithIfd' for + Dynamics CRM on-premises with Ifd. Type: string (or Expression with + resultType string). Possible values include: 'Online', 'OnPremisesWithIfd' + :type deployment_type: str or + ~azure.mgmt.datafactory.models.DynamicsDeploymentType + :param host_name: The host name of the on-premises Dynamics CRM server. + The property is required for on-prem and not allowed for online. Type: + string (or Expression with resultType string). + :type host_name: object + :param port: The port of on-premises Dynamics CRM server. The property is + required for on-prem and not allowed for online. Default is 443. Type: + integer (or Expression with resultType integer), minimum: 0. + :type port: object + :param service_uri: The URL to the Microsoft Dynamics CRM server. The + property is required for on-line and not allowed for on-prem. Type: string + (or Expression with resultType string). + :type service_uri: object + :param organization_name: The organization name of the Dynamics CRM + instance. The property is required for on-prem and required for online + when there are more than one Dynamics CRM instances associated with the + user. Type: string (or Expression with resultType string). + :type organization_name: object + :param authentication_type: Required. The authentication type to connect + to Dynamics CRM server. 'Office365' for online scenario, 'Ifd' for + on-premises with Ifd scenario. Type: string (or Expression with resultType + string). Possible values include: 'Office365', 'Ifd' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.DynamicsAuthenticationType + :param username: Required. User name to access the Dynamics CRM instance. + Type: string (or Expression with resultType string). + :type username: object + :param password: Password to access the Dynamics CRM instance. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'deployment_type': {'required': True}, + 'authentication_type': {'required': True}, + 'username': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'deployment_type': {'key': 'typeProperties.deploymentType', 'type': 'str'}, + 'host_name': {'key': 'typeProperties.hostName', 'type': 'object'}, + 'port': {'key': 'typeProperties.port', 'type': 'object'}, + 'service_uri': {'key': 'typeProperties.serviceUri', 'type': 'object'}, + 'organization_name': {'key': 'typeProperties.organizationName', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, deployment_type, authentication_type, username, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, host_name=None, port=None, service_uri=None, organization_name=None, password=None, encrypted_credential=None, **kwargs) -> None: + super(DynamicsCrmLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.deployment_type = deployment_type + self.host_name = host_name + self.port = port + self.service_uri = service_uri + self.organization_name = organization_name + self.authentication_type = authentication_type + self.username = username + self.password = password + self.encrypted_credential = encrypted_credential + self.type = 'DynamicsCrm' + + +class DynamicsCrmSink(CopySink): + """A copy activity Dynamics CRM sink. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :ivar write_behavior: Required. The write behavior for the operation. + Default value: "Upsert" . + :vartype write_behavior: str + :param ignore_null_values: The flag indicating whether to ignore null + values from input dataset (except key fields) during write operation. + Default is false. Type: boolean (or Expression with resultType boolean). + :type ignore_null_values: object + """ + + _validation = { + 'type': {'required': True}, + 'write_behavior': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'write_behavior': {'key': 'writeBehavior', 'type': 'str'}, + 'ignore_null_values': {'key': 'ignoreNullValues', 'type': 'object'}, + } + + write_behavior = "Upsert" + + def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, max_concurrent_connections=None, ignore_null_values=None, **kwargs) -> None: + super(DynamicsCrmSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.ignore_null_values = ignore_null_values + self.type = 'DynamicsCrmSink' + + +class DynamicsCrmSource(CopySource): + """A copy activity Dynamics CRM source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: FetchXML is a proprietary query language that is used in + Microsoft Dynamics CRM (online & on-premises). Type: string (or Expression + with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(DynamicsCrmSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'DynamicsCrmSource' + + +class DynamicsEntityDataset(Dataset): + """The Dynamics entity dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param entity_name: The logical name of the entity. Type: string (or + Expression with resultType string). + :type entity_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'entity_name': {'key': 'typeProperties.entityName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, entity_name=None, **kwargs) -> None: + super(DynamicsEntityDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.entity_name = entity_name + self.type = 'DynamicsEntity' + + +class DynamicsLinkedService(LinkedService): + """Dynamics linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param deployment_type: Required. The deployment type of the Dynamics + instance. 'Online' for Dynamics Online and 'OnPremisesWithIfd' for + Dynamics on-premises with Ifd. Type: string (or Expression with resultType + string). + :type deployment_type: object + :param host_name: The host name of the on-premises Dynamics server. The + property is required for on-prem and not allowed for online. Type: string + (or Expression with resultType string). + :type host_name: object + :param port: The port of on-premises Dynamics server. The property is + required for on-prem and not allowed for online. Default is 443. Type: + integer (or Expression with resultType integer), minimum: 0. + :type port: object + :param service_uri: The URL to the Microsoft Dynamics server. The property + is required for on-line and not allowed for on-prem. Type: string (or + Expression with resultType string). + :type service_uri: object + :param organization_name: The organization name of the Dynamics instance. + The property is required for on-prem and required for online when there + are more than one Dynamics instances associated with the user. Type: + string (or Expression with resultType string). + :type organization_name: object + :param authentication_type: Required. The authentication type to connect + to Dynamics server. 'Office365' for online scenario, 'Ifd' for on-premises + with Ifd scenario. Type: string (or Expression with resultType string). + :type authentication_type: object + :param username: Required. User name to access the Dynamics instance. + Type: string (or Expression with resultType string). + :type username: object + :param password: Password to access the Dynamics instance. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'deployment_type': {'required': True}, + 'authentication_type': {'required': True}, + 'username': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'deployment_type': {'key': 'typeProperties.deploymentType', 'type': 'object'}, + 'host_name': {'key': 'typeProperties.hostName', 'type': 'object'}, + 'port': {'key': 'typeProperties.port', 'type': 'object'}, + 'service_uri': {'key': 'typeProperties.serviceUri', 'type': 'object'}, + 'organization_name': {'key': 'typeProperties.organizationName', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'object'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, deployment_type, authentication_type, username, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, host_name=None, port=None, service_uri=None, organization_name=None, password=None, encrypted_credential=None, **kwargs) -> None: + super(DynamicsLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.deployment_type = deployment_type + self.host_name = host_name + self.port = port + self.service_uri = service_uri + self.organization_name = organization_name + self.authentication_type = authentication_type + self.username = username + self.password = password + self.encrypted_credential = encrypted_credential + self.type = 'Dynamics' + + +class DynamicsSink(CopySink): + """A copy activity Dynamics sink. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :ivar write_behavior: Required. The write behavior for the operation. + Default value: "Upsert" . + :vartype write_behavior: str + :param ignore_null_values: The flag indicating whether ignore null values + from input dataset (except key fields) during write operation. Default is + false. Type: boolean (or Expression with resultType boolean). + :type ignore_null_values: object + """ + + _validation = { + 'type': {'required': True}, + 'write_behavior': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'write_behavior': {'key': 'writeBehavior', 'type': 'str'}, + 'ignore_null_values': {'key': 'ignoreNullValues', 'type': 'object'}, + } + + write_behavior = "Upsert" + + def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, max_concurrent_connections=None, ignore_null_values=None, **kwargs) -> None: + super(DynamicsSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.ignore_null_values = ignore_null_values + self.type = 'DynamicsSink' + + +class DynamicsSource(CopySource): + """A copy activity Dynamics source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: FetchXML is a proprietary query language that is used in + Microsoft Dynamics (online & on-premises). Type: string (or Expression + with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(DynamicsSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'DynamicsSource' + + +class EloquaLinkedService(LinkedService): + """Eloqua server linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param endpoint: Required. The endpoint of the Eloqua server. (i.e. + eloqua.example.com) + :type endpoint: object + :param username: Required. The site name and user name of your Eloqua + account in the form: sitename/username. (i.e. Eloqua/Alice) + :type username: object + :param password: The password corresponding to the user name. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param use_encrypted_endpoints: Specifies whether the data source + endpoints are encrypted using HTTPS. The default value is true. + :type use_encrypted_endpoints: object + :param use_host_verification: Specifies whether to require the host name + in the server's certificate to match the host name of the server when + connecting over SSL. The default value is true. + :type use_host_verification: object + :param use_peer_verification: Specifies whether to verify the identity of + the server when connecting over SSL. The default value is true. + :type use_peer_verification: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'endpoint': {'required': True}, + 'username': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'endpoint': {'key': 'typeProperties.endpoint', 'type': 'object'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, + 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, + 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, endpoint, username, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, password=None, use_encrypted_endpoints=None, use_host_verification=None, use_peer_verification=None, encrypted_credential=None, **kwargs) -> None: + super(EloquaLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.endpoint = endpoint + self.username = username + self.password = password + self.use_encrypted_endpoints = use_encrypted_endpoints + self.use_host_verification = use_host_verification + self.use_peer_verification = use_peer_verification + self.encrypted_credential = encrypted_credential + self.type = 'Eloqua' + + +class EloquaObjectDataset(Dataset): + """Eloqua server dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: + super(EloquaObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.type = 'EloquaObject' + + +class EloquaSource(CopySource): + """A copy activity Eloqua server source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(EloquaSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'EloquaSource' + + +class EntityReference(Model): + """The entity reference. + + :param type: The type of this referenced entity. Possible values include: + 'IntegrationRuntimeReference', 'LinkedServiceReference' + :type type: str or + ~azure.mgmt.datafactory.models.IntegrationRuntimeEntityReferenceType + :param reference_name: The name of this referenced entity. + :type reference_name: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'reference_name': {'key': 'referenceName', 'type': 'str'}, + } + + def __init__(self, *, type=None, reference_name: str=None, **kwargs) -> None: + super(EntityReference, self).__init__(**kwargs) + self.type = type + self.reference_name = reference_name + + +class ExecutePipelineActivity(ControlActivity): + """Execute pipeline activity. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param pipeline: Required. Pipeline reference. + :type pipeline: ~azure.mgmt.datafactory.models.PipelineReference + :param parameters: Pipeline parameters. + :type parameters: dict[str, object] + :param wait_on_completion: Defines whether activity execution will wait + for the dependent pipeline execution to finish. Default is false. + :type wait_on_completion: bool + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'pipeline': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'pipeline': {'key': 'typeProperties.pipeline', 'type': 'PipelineReference'}, + 'parameters': {'key': 'typeProperties.parameters', 'type': '{object}'}, + 'wait_on_completion': {'key': 'typeProperties.waitOnCompletion', 'type': 'bool'}, + } + + def __init__(self, *, name: str, pipeline, additional_properties=None, description: str=None, depends_on=None, user_properties=None, parameters=None, wait_on_completion: bool=None, **kwargs) -> None: + super(ExecutePipelineActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, **kwargs) + self.pipeline = pipeline + self.parameters = parameters + self.wait_on_completion = wait_on_completion + self.type = 'ExecutePipeline' + + +class ExecuteSSISPackageActivity(ExecutionActivity): + """Execute SSIS package activity. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param package_location: Required. SSIS package location. + :type package_location: ~azure.mgmt.datafactory.models.SSISPackageLocation + :param runtime: Specifies the runtime to execute SSIS package. The value + should be "x86" or "x64". Type: string (or Expression with resultType + string). + :type runtime: object + :param logging_level: The logging level of SSIS package execution. Type: + string (or Expression with resultType string). + :type logging_level: object + :param environment_path: The environment path to execute the SSIS package. + Type: string (or Expression with resultType string). + :type environment_path: object + :param execution_credential: The package execution credential. + :type execution_credential: + ~azure.mgmt.datafactory.models.SSISExecutionCredential + :param connect_via: Required. The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param project_parameters: The project level parameters to execute the + SSIS package. + :type project_parameters: dict[str, + ~azure.mgmt.datafactory.models.SSISExecutionParameter] + :param package_parameters: The package level parameters to execute the + SSIS package. + :type package_parameters: dict[str, + ~azure.mgmt.datafactory.models.SSISExecutionParameter] + :param project_connection_managers: The project level connection managers + to execute the SSIS package. + :type project_connection_managers: dict[str, dict[str, + ~azure.mgmt.datafactory.models.SSISExecutionParameter]] + :param package_connection_managers: The package level connection managers + to execute the SSIS package. + :type package_connection_managers: dict[str, dict[str, + ~azure.mgmt.datafactory.models.SSISExecutionParameter]] + :param property_overrides: The property overrides to execute the SSIS + package. + :type property_overrides: dict[str, + ~azure.mgmt.datafactory.models.SSISPropertyOverride] + :param log_location: SSIS package execution log location. + :type log_location: ~azure.mgmt.datafactory.models.SSISLogLocation + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'package_location': {'required': True}, + 'connect_via': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'package_location': {'key': 'typeProperties.packageLocation', 'type': 'SSISPackageLocation'}, + 'runtime': {'key': 'typeProperties.runtime', 'type': 'object'}, + 'logging_level': {'key': 'typeProperties.loggingLevel', 'type': 'object'}, + 'environment_path': {'key': 'typeProperties.environmentPath', 'type': 'object'}, + 'execution_credential': {'key': 'typeProperties.executionCredential', 'type': 'SSISExecutionCredential'}, + 'connect_via': {'key': 'typeProperties.connectVia', 'type': 'IntegrationRuntimeReference'}, + 'project_parameters': {'key': 'typeProperties.projectParameters', 'type': '{SSISExecutionParameter}'}, + 'package_parameters': {'key': 'typeProperties.packageParameters', 'type': '{SSISExecutionParameter}'}, + 'project_connection_managers': {'key': 'typeProperties.projectConnectionManagers', 'type': '{{SSISExecutionParameter}}'}, + 'package_connection_managers': {'key': 'typeProperties.packageConnectionManagers', 'type': '{{SSISExecutionParameter}}'}, + 'property_overrides': {'key': 'typeProperties.propertyOverrides', 'type': '{SSISPropertyOverride}'}, + 'log_location': {'key': 'typeProperties.logLocation', 'type': 'SSISLogLocation'}, + } + + def __init__(self, *, name: str, package_location, connect_via, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, runtime=None, logging_level=None, environment_path=None, execution_credential=None, project_parameters=None, package_parameters=None, project_connection_managers=None, package_connection_managers=None, property_overrides=None, log_location=None, **kwargs) -> None: + super(ExecuteSSISPackageActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) + self.package_location = package_location + self.runtime = runtime + self.logging_level = logging_level + self.environment_path = environment_path + self.execution_credential = execution_credential + self.connect_via = connect_via + self.project_parameters = project_parameters + self.package_parameters = package_parameters + self.project_connection_managers = project_connection_managers + self.package_connection_managers = package_connection_managers + self.property_overrides = property_overrides + self.log_location = log_location + self.type = 'ExecuteSSISPackage' + + +class ExposureControlRequest(Model): + """The exposure control request. + + :param feature_name: The feature name. + :type feature_name: str + :param feature_type: The feature type. + :type feature_type: str + """ + + _attribute_map = { + 'feature_name': {'key': 'featureName', 'type': 'str'}, + 'feature_type': {'key': 'featureType', 'type': 'str'}, + } + + def __init__(self, *, feature_name: str=None, feature_type: str=None, **kwargs) -> None: + super(ExposureControlRequest, self).__init__(**kwargs) + self.feature_name = feature_name + self.feature_type = feature_type + + +class ExposureControlResponse(Model): + """The exposure control response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar feature_name: The feature name. + :vartype feature_name: str + :ivar value: The feature value. + :vartype value: str + """ + + _validation = { + 'feature_name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'feature_name': {'key': 'featureName', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ExposureControlResponse, self).__init__(**kwargs) + self.feature_name = None + self.value = None + + +class Expression(Model): + """Azure Data Factory expression definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. Expression type. Default value: "Expression" . + :vartype type: str + :param value: Required. Expression value. + :type value: str + """ + + _validation = { + 'type': {'required': True, 'constant': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + type = "Expression" + + def __init__(self, *, value: str, **kwargs) -> None: + super(Expression, self).__init__(**kwargs) + self.value = value + + +class Resource(Model): + """Azure Data Factory top-level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :ivar e_tag: Etag identifies change in the resource. + :vartype e_tag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'e_tag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + self.e_tag = None + + +class Factory(Resource): + """Factory resource type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :ivar e_tag: Etag identifies change in the resource. + :vartype e_tag: str + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param identity: Managed service identity of the factory. + :type identity: ~azure.mgmt.datafactory.models.FactoryIdentity + :ivar provisioning_state: Factory provisioning state, example Succeeded. + :vartype provisioning_state: str + :ivar create_time: Time the factory was created in ISO8601 format. + :vartype create_time: datetime + :ivar version: Version of the factory. + :vartype version: str + :param repo_configuration: Git repo information of the factory. + :type repo_configuration: + ~azure.mgmt.datafactory.models.FactoryRepoConfiguration + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'e_tag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'create_time': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'additional_properties': {'key': '', 'type': '{object}'}, + 'identity': {'key': 'identity', 'type': 'FactoryIdentity'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'create_time': {'key': 'properties.createTime', 'type': 'iso-8601'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'repo_configuration': {'key': 'properties.repoConfiguration', 'type': 'FactoryRepoConfiguration'}, + } + + def __init__(self, *, location: str=None, tags=None, additional_properties=None, identity=None, repo_configuration=None, **kwargs) -> None: + super(Factory, self).__init__(location=location, tags=tags, **kwargs) + self.additional_properties = additional_properties + self.identity = identity + self.provisioning_state = None + self.create_time = None + self.version = None + self.repo_configuration = repo_configuration + + +class FactoryRepoConfiguration(Model): + """Factory's git repo information. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: FactoryVSTSConfiguration, FactoryGitHubConfiguration + + All required parameters must be populated in order to send to Azure. + + :param account_name: Required. Account name. + :type account_name: str + :param repository_name: Required. Repository name. + :type repository_name: str + :param collaboration_branch: Required. Collaboration branch. + :type collaboration_branch: str + :param root_folder: Required. Root folder. + :type root_folder: str + :param last_commit_id: Last commit id. + :type last_commit_id: str + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'account_name': {'required': True}, + 'repository_name': {'required': True}, + 'collaboration_branch': {'required': True}, + 'root_folder': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'repository_name': {'key': 'repositoryName', 'type': 'str'}, + 'collaboration_branch': {'key': 'collaborationBranch', 'type': 'str'}, + 'root_folder': {'key': 'rootFolder', 'type': 'str'}, + 'last_commit_id': {'key': 'lastCommitId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'FactoryVSTSConfiguration': 'FactoryVSTSConfiguration', 'FactoryGitHubConfiguration': 'FactoryGitHubConfiguration'} + } + + def __init__(self, *, account_name: str, repository_name: str, collaboration_branch: str, root_folder: str, last_commit_id: str=None, **kwargs) -> None: + super(FactoryRepoConfiguration, self).__init__(**kwargs) + self.account_name = account_name + self.repository_name = repository_name + self.collaboration_branch = collaboration_branch + self.root_folder = root_folder + self.last_commit_id = last_commit_id + self.type = None + + +class FactoryGitHubConfiguration(FactoryRepoConfiguration): + """Factory's GitHub repo information. + + All required parameters must be populated in order to send to Azure. + + :param account_name: Required. Account name. + :type account_name: str + :param repository_name: Required. Repository name. + :type repository_name: str + :param collaboration_branch: Required. Collaboration branch. + :type collaboration_branch: str + :param root_folder: Required. Root folder. + :type root_folder: str + :param last_commit_id: Last commit id. + :type last_commit_id: str + :param type: Required. Constant filled by server. + :type type: str + :param host_name: GitHub Enterprise host name. For example: + https://github.mydomain.com + :type host_name: str + """ + + _validation = { + 'account_name': {'required': True}, + 'repository_name': {'required': True}, + 'collaboration_branch': {'required': True}, + 'root_folder': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'repository_name': {'key': 'repositoryName', 'type': 'str'}, + 'collaboration_branch': {'key': 'collaborationBranch', 'type': 'str'}, + 'root_folder': {'key': 'rootFolder', 'type': 'str'}, + 'last_commit_id': {'key': 'lastCommitId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'host_name': {'key': 'hostName', 'type': 'str'}, + } + + def __init__(self, *, account_name: str, repository_name: str, collaboration_branch: str, root_folder: str, last_commit_id: str=None, host_name: str=None, **kwargs) -> None: + super(FactoryGitHubConfiguration, self).__init__(account_name=account_name, repository_name=repository_name, collaboration_branch=collaboration_branch, root_folder=root_folder, last_commit_id=last_commit_id, **kwargs) + self.host_name = host_name + self.type = 'FactoryGitHubConfiguration' + + +class FactoryIdentity(Model): + """Identity properties of the factory resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. The identity type. Currently the only supported type + is 'SystemAssigned'. Default value: "SystemAssigned" . + :vartype type: str + :ivar principal_id: The principal id of the identity. + :vartype principal_id: str + :ivar tenant_id: The client tenant id of the identity. + :vartype tenant_id: str + """ + + _validation = { + 'type': {'required': True, 'constant': True}, + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + type = "SystemAssigned" + + def __init__(self, **kwargs) -> None: + super(FactoryIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + + +class FactoryRepoUpdate(Model): + """Factory's git repo information. + + :param factory_resource_id: The factory resource id. + :type factory_resource_id: str + :param repo_configuration: Git repo information of the factory. + :type repo_configuration: + ~azure.mgmt.datafactory.models.FactoryRepoConfiguration + """ + + _attribute_map = { + 'factory_resource_id': {'key': 'factoryResourceId', 'type': 'str'}, + 'repo_configuration': {'key': 'repoConfiguration', 'type': 'FactoryRepoConfiguration'}, + } + + def __init__(self, *, factory_resource_id: str=None, repo_configuration=None, **kwargs) -> None: + super(FactoryRepoUpdate, self).__init__(**kwargs) + self.factory_resource_id = factory_resource_id + self.repo_configuration = repo_configuration + + +class FactoryUpdateParameters(Model): + """Parameters for updating a factory resource. + + :param tags: The resource tags. + :type tags: dict[str, str] + :param identity: Managed service identity of the factory. + :type identity: ~azure.mgmt.datafactory.models.FactoryIdentity + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'FactoryIdentity'}, + } + + def __init__(self, *, tags=None, identity=None, **kwargs) -> None: + super(FactoryUpdateParameters, self).__init__(**kwargs) + self.tags = tags + self.identity = identity + + +class FactoryVSTSConfiguration(FactoryRepoConfiguration): + """Factory's VSTS repo information. + + All required parameters must be populated in order to send to Azure. + + :param account_name: Required. Account name. + :type account_name: str + :param repository_name: Required. Repository name. + :type repository_name: str + :param collaboration_branch: Required. Collaboration branch. + :type collaboration_branch: str + :param root_folder: Required. Root folder. + :type root_folder: str + :param last_commit_id: Last commit id. + :type last_commit_id: str + :param type: Required. Constant filled by server. + :type type: str + :param project_name: Required. VSTS project name. + :type project_name: str + :param tenant_id: VSTS tenant id. + :type tenant_id: str + """ + + _validation = { + 'account_name': {'required': True}, + 'repository_name': {'required': True}, + 'collaboration_branch': {'required': True}, + 'root_folder': {'required': True}, + 'type': {'required': True}, + 'project_name': {'required': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'repository_name': {'key': 'repositoryName', 'type': 'str'}, + 'collaboration_branch': {'key': 'collaborationBranch', 'type': 'str'}, + 'root_folder': {'key': 'rootFolder', 'type': 'str'}, + 'last_commit_id': {'key': 'lastCommitId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'project_name': {'key': 'projectName', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__(self, *, account_name: str, repository_name: str, collaboration_branch: str, root_folder: str, project_name: str, last_commit_id: str=None, tenant_id: str=None, **kwargs) -> None: + super(FactoryVSTSConfiguration, self).__init__(account_name=account_name, repository_name=repository_name, collaboration_branch=collaboration_branch, root_folder=root_folder, last_commit_id=last_commit_id, **kwargs) + self.project_name = project_name + self.tenant_id = tenant_id + self.type = 'FactoryVSTSConfiguration' + + +class FileServerLinkedService(LinkedService): + """File system linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param host: Required. Host name of the server. Type: string (or + Expression with resultType string). + :type host: object + :param user_id: User ID to logon the server. Type: string (or Expression + with resultType string). + :type user_id: object + :param password: Password to logon the server. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'host': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'host': {'key': 'typeProperties.host', 'type': 'object'}, + 'user_id': {'key': 'typeProperties.userId', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, host, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, user_id=None, password=None, encrypted_credential=None, **kwargs) -> None: + super(FileServerLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.host = host + self.user_id = user_id + self.password = password + self.encrypted_credential = encrypted_credential + self.type = 'FileServer' + + +class FileServerLocation(DatasetLocation): + """The location of file server dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. Type of dataset storage location. + :type type: str + :param folder_path: Specify the folder path of dataset. Type: string (or + Expression with resultType string) + :type folder_path: object + :param file_name: Specify the file name of dataset. Type: string (or + Expression with resultType string). + :type file_name: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'folder_path': {'key': 'folderPath', 'type': 'object'}, + 'file_name': {'key': 'fileName', 'type': 'object'}, + } + + def __init__(self, *, type: str, additional_properties=None, folder_path=None, file_name=None, **kwargs) -> None: + super(FileServerLocation, self).__init__(additional_properties=additional_properties, type=type, folder_path=folder_path, file_name=file_name, **kwargs) + + +class FileServerReadSettings(StoreReadSettings): + """File server read settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The read setting type. + :type type: str + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param recursive: If true, files under the folder path will be read + recursively. Default is true. Type: boolean (or Expression with resultType + boolean). + :type recursive: object + :param wildcard_folder_path: FileServer wildcardFolderPath. Type: string + (or Expression with resultType string). + :type wildcard_folder_path: object + :param wildcard_file_name: FileServer wildcardFileName. Type: string (or + Expression with resultType string). + :type wildcard_file_name: object + :param enable_partition_discovery: Indicates whether to enable partition + discovery. + :type enable_partition_discovery: bool + :param modified_datetime_start: The start of file's modified datetime. + Type: string (or Expression with resultType string). + :type modified_datetime_start: object + :param modified_datetime_end: The end of file's modified datetime. Type: + string (or Expression with resultType string). + :type modified_datetime_end: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'recursive': {'key': 'recursive', 'type': 'object'}, + 'wildcard_folder_path': {'key': 'wildcardFolderPath', 'type': 'object'}, + 'wildcard_file_name': {'key': 'wildcardFileName', 'type': 'object'}, + 'enable_partition_discovery': {'key': 'enablePartitionDiscovery', 'type': 'bool'}, + 'modified_datetime_start': {'key': 'modifiedDatetimeStart', 'type': 'object'}, + 'modified_datetime_end': {'key': 'modifiedDatetimeEnd', 'type': 'object'}, + } + + def __init__(self, *, type: str, additional_properties=None, max_concurrent_connections=None, recursive=None, wildcard_folder_path=None, wildcard_file_name=None, enable_partition_discovery: bool=None, modified_datetime_start=None, modified_datetime_end=None, **kwargs) -> None: + super(FileServerReadSettings, self).__init__(additional_properties=additional_properties, type=type, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.recursive = recursive + self.wildcard_folder_path = wildcard_folder_path + self.wildcard_file_name = wildcard_file_name + self.enable_partition_discovery = enable_partition_discovery + self.modified_datetime_start = modified_datetime_start + self.modified_datetime_end = modified_datetime_end + + +class FileServerWriteSettings(StoreWriteSettings): + """File server write settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The write setting type. + :type type: str + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param copy_behavior: The type of copy behavior for copy sink. + :type copy_behavior: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'copy_behavior': {'key': 'copyBehavior', 'type': 'object'}, + } + + def __init__(self, *, type: str, additional_properties=None, max_concurrent_connections=None, copy_behavior=None, **kwargs) -> None: + super(FileServerWriteSettings, self).__init__(additional_properties=additional_properties, type=type, max_concurrent_connections=max_concurrent_connections, copy_behavior=copy_behavior, **kwargs) + + +class FileShareDataset(Dataset): + """An on-premises file system dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param folder_path: The path of the on-premises file system. Type: string + (or Expression with resultType string). + :type folder_path: object + :param file_name: The name of the on-premises file system. Type: string + (or Expression with resultType string). + :type file_name: object + :param modified_datetime_start: The start of file's modified datetime. + Type: string (or Expression with resultType string). + :type modified_datetime_start: object + :param modified_datetime_end: The end of file's modified datetime. Type: + string (or Expression with resultType string). + :type modified_datetime_end: object + :param format: The format of the files. + :type format: ~azure.mgmt.datafactory.models.DatasetStorageFormat + :param file_filter: Specify a filter to be used to select a subset of + files in the folderPath rather than all files. Type: string (or Expression + with resultType string). + :type file_filter: object + :param compression: The data compression method used for the file system. + :type compression: ~azure.mgmt.datafactory.models.DatasetCompression + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'folder_path': {'key': 'typeProperties.folderPath', 'type': 'object'}, + 'file_name': {'key': 'typeProperties.fileName', 'type': 'object'}, + 'modified_datetime_start': {'key': 'typeProperties.modifiedDatetimeStart', 'type': 'object'}, + 'modified_datetime_end': {'key': 'typeProperties.modifiedDatetimeEnd', 'type': 'object'}, + 'format': {'key': 'typeProperties.format', 'type': 'DatasetStorageFormat'}, + 'file_filter': {'key': 'typeProperties.fileFilter', 'type': 'object'}, + 'compression': {'key': 'typeProperties.compression', 'type': 'DatasetCompression'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, folder_path=None, file_name=None, modified_datetime_start=None, modified_datetime_end=None, format=None, file_filter=None, compression=None, **kwargs) -> None: + super(FileShareDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.folder_path = folder_path + self.file_name = file_name + self.modified_datetime_start = modified_datetime_start + self.modified_datetime_end = modified_datetime_end + self.format = format + self.file_filter = file_filter + self.compression = compression + self.type = 'FileShare' + + +class FileSystemSink(CopySink): + """A copy activity file system sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param copy_behavior: The type of copy behavior for copy sink. + :type copy_behavior: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'copy_behavior': {'key': 'copyBehavior', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, max_concurrent_connections=None, copy_behavior=None, **kwargs) -> None: + super(FileSystemSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.copy_behavior = copy_behavior + self.type = 'FileSystemSink' + + +class FileSystemSource(CopySource): + """A copy activity file system source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param recursive: If true, files under the folder path will be read + recursively. Default is true. Type: boolean (or Expression with resultType + boolean). + :type recursive: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'recursive': {'key': 'recursive', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, recursive=None, **kwargs) -> None: + super(FileSystemSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.recursive = recursive + self.type = 'FileSystemSource' + + +class FilterActivity(ControlActivity): + """Filter and return results from input array based on the conditions. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param items: Required. Input array on which filter should be applied. + :type items: ~azure.mgmt.datafactory.models.Expression + :param condition: Required. Condition to be used for filtering the input. + :type condition: ~azure.mgmt.datafactory.models.Expression + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'items': {'required': True}, + 'condition': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'items': {'key': 'typeProperties.items', 'type': 'Expression'}, + 'condition': {'key': 'typeProperties.condition', 'type': 'Expression'}, + } + + def __init__(self, *, name: str, items, condition, additional_properties=None, description: str=None, depends_on=None, user_properties=None, **kwargs) -> None: + super(FilterActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, **kwargs) + self.items = items + self.condition = condition + self.type = 'Filter' + + +class ForEachActivity(ControlActivity): + """This activity is used for iterating over a collection and execute given + activities. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param is_sequential: Should the loop be executed in sequence or in + parallel (max 50) + :type is_sequential: bool + :param batch_count: Batch count to be used for controlling the number of + parallel execution (when isSequential is set to false). + :type batch_count: int + :param items: Required. Collection to iterate. + :type items: ~azure.mgmt.datafactory.models.Expression + :param activities: Required. List of activities to execute . + :type activities: list[~azure.mgmt.datafactory.models.Activity] + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'batch_count': {'maximum': 50}, + 'items': {'required': True}, + 'activities': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'is_sequential': {'key': 'typeProperties.isSequential', 'type': 'bool'}, + 'batch_count': {'key': 'typeProperties.batchCount', 'type': 'int'}, + 'items': {'key': 'typeProperties.items', 'type': 'Expression'}, + 'activities': {'key': 'typeProperties.activities', 'type': '[Activity]'}, + } + + def __init__(self, *, name: str, items, activities, additional_properties=None, description: str=None, depends_on=None, user_properties=None, is_sequential: bool=None, batch_count: int=None, **kwargs) -> None: + super(ForEachActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, **kwargs) + self.is_sequential = is_sequential + self.batch_count = batch_count + self.items = items + self.activities = activities + self.type = 'ForEach' + + +class FtpReadSettings(StoreReadSettings): + """Ftp read settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The read setting type. + :type type: str + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param recursive: If true, files under the folder path will be read + recursively. Default is true. Type: boolean (or Expression with resultType + boolean). + :type recursive: object + :param wildcard_folder_path: Ftp wildcardFolderPath. Type: string (or + Expression with resultType string). + :type wildcard_folder_path: object + :param wildcard_file_name: Ftp wildcardFileName. Type: string (or + Expression with resultType string). + :type wildcard_file_name: object + :param use_binary_transfer: Specify whether to use binary transfer mode + for FTP stores. + :type use_binary_transfer: bool + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'recursive': {'key': 'recursive', 'type': 'object'}, + 'wildcard_folder_path': {'key': 'wildcardFolderPath', 'type': 'object'}, + 'wildcard_file_name': {'key': 'wildcardFileName', 'type': 'object'}, + 'use_binary_transfer': {'key': 'useBinaryTransfer', 'type': 'bool'}, + } + + def __init__(self, *, type: str, additional_properties=None, max_concurrent_connections=None, recursive=None, wildcard_folder_path=None, wildcard_file_name=None, use_binary_transfer: bool=None, **kwargs) -> None: + super(FtpReadSettings, self).__init__(additional_properties=additional_properties, type=type, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.recursive = recursive + self.wildcard_folder_path = wildcard_folder_path + self.wildcard_file_name = wildcard_file_name + self.use_binary_transfer = use_binary_transfer + + +class FtpServerLinkedService(LinkedService): + """A FTP server Linked Service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param host: Required. Host name of the FTP server. Type: string (or + Expression with resultType string). + :type host: object + :param port: The TCP port number that the FTP server uses to listen for + client connections. Default value is 21. Type: integer (or Expression with + resultType integer), minimum: 0. + :type port: object + :param authentication_type: The authentication type to be used to connect + to the FTP server. Possible values include: 'Basic', 'Anonymous' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.FtpAuthenticationType + :param user_name: Username to logon the FTP server. Type: string (or + Expression with resultType string). + :type user_name: object + :param password: Password to logon the FTP server. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + :param enable_ssl: If true, connect to the FTP server over SSL/TLS + channel. Default value is true. Type: boolean (or Expression with + resultType boolean). + :type enable_ssl: object + :param enable_server_certificate_validation: If true, validate the FTP + server SSL certificate when connect over SSL/TLS channel. Default value is + true. Type: boolean (or Expression with resultType boolean). + :type enable_server_certificate_validation: object + """ + + _validation = { + 'type': {'required': True}, + 'host': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'host': {'key': 'typeProperties.host', 'type': 'object'}, + 'port': {'key': 'typeProperties.port', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + 'enable_ssl': {'key': 'typeProperties.enableSsl', 'type': 'object'}, + 'enable_server_certificate_validation': {'key': 'typeProperties.enableServerCertificateValidation', 'type': 'object'}, + } + + def __init__(self, *, host, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, port=None, authentication_type=None, user_name=None, password=None, encrypted_credential=None, enable_ssl=None, enable_server_certificate_validation=None, **kwargs) -> None: + super(FtpServerLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.host = host + self.port = port + self.authentication_type = authentication_type + self.user_name = user_name + self.password = password + self.encrypted_credential = encrypted_credential + self.enable_ssl = enable_ssl + self.enable_server_certificate_validation = enable_server_certificate_validation + self.type = 'FtpServer' + + +class FtpServerLocation(DatasetLocation): + """The location of ftp server dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. Type of dataset storage location. + :type type: str + :param folder_path: Specify the folder path of dataset. Type: string (or + Expression with resultType string) + :type folder_path: object + :param file_name: Specify the file name of dataset. Type: string (or + Expression with resultType string). + :type file_name: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'folder_path': {'key': 'folderPath', 'type': 'object'}, + 'file_name': {'key': 'fileName', 'type': 'object'}, + } + + def __init__(self, *, type: str, additional_properties=None, folder_path=None, file_name=None, **kwargs) -> None: + super(FtpServerLocation, self).__init__(additional_properties=additional_properties, type=type, folder_path=folder_path, file_name=file_name, **kwargs) + + +class GetMetadataActivity(ExecutionActivity): + """Activity to get metadata of dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param dataset: Required. GetMetadata activity dataset reference. + :type dataset: ~azure.mgmt.datafactory.models.DatasetReference + :param field_list: Fields of metadata to get from dataset. + :type field_list: list[object] + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'dataset': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'dataset': {'key': 'typeProperties.dataset', 'type': 'DatasetReference'}, + 'field_list': {'key': 'typeProperties.fieldList', 'type': '[object]'}, + } + + def __init__(self, *, name: str, dataset, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, field_list=None, **kwargs) -> None: + super(GetMetadataActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) + self.dataset = dataset + self.field_list = field_list + self.type = 'GetMetadata' + + +class GetSsisObjectMetadataRequest(Model): + """The request payload of get SSIS object metadata. + + :param metadata_path: Metadata path. + :type metadata_path: str + """ + + _attribute_map = { + 'metadata_path': {'key': 'metadataPath', 'type': 'str'}, + } + + def __init__(self, *, metadata_path: str=None, **kwargs) -> None: + super(GetSsisObjectMetadataRequest, self).__init__(**kwargs) + self.metadata_path = metadata_path + + +class GitHubAccessTokenRequest(Model): + """Get GitHub access token request definition. + + All required parameters must be populated in order to send to Azure. + + :param git_hub_access_code: Required. GitHub access code. + :type git_hub_access_code: str + :param git_hub_client_id: GitHub application client ID. + :type git_hub_client_id: str + :param git_hub_access_token_base_url: Required. GitHub access token base + URL. + :type git_hub_access_token_base_url: str + """ + + _validation = { + 'git_hub_access_code': {'required': True}, + 'git_hub_access_token_base_url': {'required': True}, + } + + _attribute_map = { + 'git_hub_access_code': {'key': 'gitHubAccessCode', 'type': 'str'}, + 'git_hub_client_id': {'key': 'gitHubClientId', 'type': 'str'}, + 'git_hub_access_token_base_url': {'key': 'gitHubAccessTokenBaseUrl', 'type': 'str'}, + } + + def __init__(self, *, git_hub_access_code: str, git_hub_access_token_base_url: str, git_hub_client_id: str=None, **kwargs) -> None: + super(GitHubAccessTokenRequest, self).__init__(**kwargs) + self.git_hub_access_code = git_hub_access_code + self.git_hub_client_id = git_hub_client_id + self.git_hub_access_token_base_url = git_hub_access_token_base_url + + +class GitHubAccessTokenResponse(Model): + """Get GitHub access token response definition. + + :param git_hub_access_token: GitHub access token. + :type git_hub_access_token: str + """ + + _attribute_map = { + 'git_hub_access_token': {'key': 'gitHubAccessToken', 'type': 'str'}, + } + + def __init__(self, *, git_hub_access_token: str=None, **kwargs) -> None: + super(GitHubAccessTokenResponse, self).__init__(**kwargs) + self.git_hub_access_token = git_hub_access_token + + +class GoogleAdWordsLinkedService(LinkedService): + """Google AdWords service linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param client_customer_id: Required. The Client customer ID of the AdWords + account that you want to fetch report data for. + :type client_customer_id: object + :param developer_token: Required. The developer token associated with the + manager account that you use to grant access to the AdWords API. + :type developer_token: ~azure.mgmt.datafactory.models.SecretBase + :param authentication_type: Required. The OAuth 2.0 authentication + mechanism used for authentication. ServiceAuthentication can only be used + on self-hosted IR. Possible values include: 'ServiceAuthentication', + 'UserAuthentication' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.GoogleAdWordsAuthenticationType + :param refresh_token: The refresh token obtained from Google for + authorizing access to AdWords for UserAuthentication. + :type refresh_token: ~azure.mgmt.datafactory.models.SecretBase + :param client_id: The client id of the google application used to acquire + the refresh token. + :type client_id: ~azure.mgmt.datafactory.models.SecretBase + :param client_secret: The client secret of the google application used to + acquire the refresh token. + :type client_secret: ~azure.mgmt.datafactory.models.SecretBase + :param email: The service account email ID that is used for + ServiceAuthentication and can only be used on self-hosted IR. + :type email: object + :param key_file_path: The full path to the .p12 key file that is used to + authenticate the service account email address and can only be used on + self-hosted IR. + :type key_file_path: object + :param trusted_cert_path: The full path of the .pem file containing + trusted CA certificates for verifying the server when connecting over SSL. + This property can only be set when using SSL on self-hosted IR. The + default value is the cacerts.pem file installed with the IR. + :type trusted_cert_path: object + :param use_system_trust_store: Specifies whether to use a CA certificate + from the system trust store or from a specified PEM file. The default + value is false. + :type use_system_trust_store: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'client_customer_id': {'required': True}, + 'developer_token': {'required': True}, + 'authentication_type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'client_customer_id': {'key': 'typeProperties.clientCustomerID', 'type': 'object'}, + 'developer_token': {'key': 'typeProperties.developerToken', 'type': 'SecretBase'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'refresh_token': {'key': 'typeProperties.refreshToken', 'type': 'SecretBase'}, + 'client_id': {'key': 'typeProperties.clientId', 'type': 'SecretBase'}, + 'client_secret': {'key': 'typeProperties.clientSecret', 'type': 'SecretBase'}, + 'email': {'key': 'typeProperties.email', 'type': 'object'}, + 'key_file_path': {'key': 'typeProperties.keyFilePath', 'type': 'object'}, + 'trusted_cert_path': {'key': 'typeProperties.trustedCertPath', 'type': 'object'}, + 'use_system_trust_store': {'key': 'typeProperties.useSystemTrustStore', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, client_customer_id, developer_token, authentication_type, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, refresh_token=None, client_id=None, client_secret=None, email=None, key_file_path=None, trusted_cert_path=None, use_system_trust_store=None, encrypted_credential=None, **kwargs) -> None: + super(GoogleAdWordsLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.client_customer_id = client_customer_id + self.developer_token = developer_token + self.authentication_type = authentication_type + self.refresh_token = refresh_token + self.client_id = client_id + self.client_secret = client_secret + self.email = email + self.key_file_path = key_file_path + self.trusted_cert_path = trusted_cert_path + self.use_system_trust_store = use_system_trust_store + self.encrypted_credential = encrypted_credential + self.type = 'GoogleAdWords' + + +class GoogleAdWordsObjectDataset(Dataset): + """Google AdWords service dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: + super(GoogleAdWordsObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.type = 'GoogleAdWordsObject' + + +class GoogleAdWordsSource(CopySource): + """A copy activity Google AdWords service source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(GoogleAdWordsSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'GoogleAdWordsSource' + + +class GoogleBigQueryLinkedService(LinkedService): + """Google BigQuery service linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param project: Required. The default BigQuery project to query against. + :type project: object + :param additional_projects: A comma-separated list of public BigQuery + projects to access. + :type additional_projects: object + :param request_google_drive_scope: Whether to request access to Google + Drive. Allowing Google Drive access enables support for federated tables + that combine BigQuery data with data from Google Drive. The default value + is false. + :type request_google_drive_scope: object + :param authentication_type: Required. The OAuth 2.0 authentication + mechanism used for authentication. ServiceAuthentication can only be used + on self-hosted IR. Possible values include: 'ServiceAuthentication', + 'UserAuthentication' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.GoogleBigQueryAuthenticationType + :param refresh_token: The refresh token obtained from Google for + authorizing access to BigQuery for UserAuthentication. + :type refresh_token: ~azure.mgmt.datafactory.models.SecretBase + :param client_id: The client id of the google application used to acquire + the refresh token. + :type client_id: ~azure.mgmt.datafactory.models.SecretBase + :param client_secret: The client secret of the google application used to + acquire the refresh token. + :type client_secret: ~azure.mgmt.datafactory.models.SecretBase + :param email: The service account email ID that is used for + ServiceAuthentication and can only be used on self-hosted IR. + :type email: object + :param key_file_path: The full path to the .p12 key file that is used to + authenticate the service account email address and can only be used on + self-hosted IR. + :type key_file_path: object + :param trusted_cert_path: The full path of the .pem file containing + trusted CA certificates for verifying the server when connecting over SSL. + This property can only be set when using SSL on self-hosted IR. The + default value is the cacerts.pem file installed with the IR. + :type trusted_cert_path: object + :param use_system_trust_store: Specifies whether to use a CA certificate + from the system trust store or from a specified PEM file. The default + value is false. + :type use_system_trust_store: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'project': {'required': True}, + 'authentication_type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'project': {'key': 'typeProperties.project', 'type': 'object'}, + 'additional_projects': {'key': 'typeProperties.additionalProjects', 'type': 'object'}, + 'request_google_drive_scope': {'key': 'typeProperties.requestGoogleDriveScope', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'refresh_token': {'key': 'typeProperties.refreshToken', 'type': 'SecretBase'}, + 'client_id': {'key': 'typeProperties.clientId', 'type': 'SecretBase'}, + 'client_secret': {'key': 'typeProperties.clientSecret', 'type': 'SecretBase'}, + 'email': {'key': 'typeProperties.email', 'type': 'object'}, + 'key_file_path': {'key': 'typeProperties.keyFilePath', 'type': 'object'}, + 'trusted_cert_path': {'key': 'typeProperties.trustedCertPath', 'type': 'object'}, + 'use_system_trust_store': {'key': 'typeProperties.useSystemTrustStore', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, project, authentication_type, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, additional_projects=None, request_google_drive_scope=None, refresh_token=None, client_id=None, client_secret=None, email=None, key_file_path=None, trusted_cert_path=None, use_system_trust_store=None, encrypted_credential=None, **kwargs) -> None: + super(GoogleBigQueryLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.project = project + self.additional_projects = additional_projects + self.request_google_drive_scope = request_google_drive_scope + self.authentication_type = authentication_type + self.refresh_token = refresh_token + self.client_id = client_id + self.client_secret = client_secret + self.email = email + self.key_file_path = key_file_path + self.trusted_cert_path = trusted_cert_path + self.use_system_trust_store = use_system_trust_store + self.encrypted_credential = encrypted_credential + self.type = 'GoogleBigQuery' + + +class GoogleBigQueryObjectDataset(Dataset): + """Google BigQuery service dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: This property will be retired. Please consider using + database + table properties instead. + :type table_name: object + :param table: The table name of the Google BigQuery. Type: string (or + Expression with resultType string). + :type table: object + :param dataset: The database name of the Google BigQuery. Type: string (or + Expression with resultType string). + :type dataset: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + 'table': {'key': 'typeProperties.table', 'type': 'object'}, + 'dataset': {'key': 'typeProperties.dataset', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, table=None, dataset=None, **kwargs) -> None: + super(GoogleBigQueryObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.table = table + self.dataset = dataset + self.type = 'GoogleBigQueryObject' + + +class GoogleBigQuerySource(CopySource): + """A copy activity Google BigQuery service source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(GoogleBigQuerySource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'GoogleBigQuerySource' + + +class GreenplumLinkedService(LinkedService): + """Greenplum Database linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: An ODBC connection string. Type: string, + SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param pwd: The Azure key vault secret reference of password in connection + string. + :type pwd: ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'pwd': {'key': 'typeProperties.pwd', 'type': 'AzureKeyVaultSecretReference'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, connection_string=None, pwd=None, encrypted_credential=None, **kwargs) -> None: + super(GreenplumLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.connection_string = connection_string + self.pwd = pwd + self.encrypted_credential = encrypted_credential + self.type = 'Greenplum' + + +class GreenplumSource(CopySource): + """A copy activity Greenplum Database source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(GreenplumSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'GreenplumSource' + + +class GreenplumTableDataset(Dataset): + """Greenplum Database dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: This property will be retired. Please consider using + schema + table properties instead. + :type table_name: object + :param table: The table name of Greenplum. Type: string (or Expression + with resultType string). + :type table: object + :param greenplum_table_dataset_schema: The schema name of Greenplum. Type: + string (or Expression with resultType string). + :type greenplum_table_dataset_schema: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + 'table': {'key': 'typeProperties.table', 'type': 'object'}, + 'greenplum_table_dataset_schema': {'key': 'typeProperties.schema', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, table=None, greenplum_table_dataset_schema=None, **kwargs) -> None: + super(GreenplumTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.table = table + self.greenplum_table_dataset_schema = greenplum_table_dataset_schema + self.type = 'GreenplumTable' + + +class HBaseLinkedService(LinkedService): + """HBase server linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param host: Required. The IP address or host name of the HBase server. + (i.e. 192.168.222.160) + :type host: object + :param port: The TCP port that the HBase instance uses to listen for + client connections. The default value is 9090. + :type port: object + :param http_path: The partial URL corresponding to the HBase server. (i.e. + /gateway/sandbox/hbase/version) + :type http_path: object + :param authentication_type: Required. The authentication mechanism to use + to connect to the HBase server. Possible values include: 'Anonymous', + 'Basic' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.HBaseAuthenticationType + :param username: The user name used to connect to the HBase instance. + :type username: object + :param password: The password corresponding to the user name. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param enable_ssl: Specifies whether the connections to the server are + encrypted using SSL. The default value is false. + :type enable_ssl: object + :param trusted_cert_path: The full path of the .pem file containing + trusted CA certificates for verifying the server when connecting over SSL. + This property can only be set when using SSL on self-hosted IR. The + default value is the cacerts.pem file installed with the IR. + :type trusted_cert_path: object + :param allow_host_name_cn_mismatch: Specifies whether to require a + CA-issued SSL certificate name to match the host name of the server when + connecting over SSL. The default value is false. + :type allow_host_name_cn_mismatch: object + :param allow_self_signed_server_cert: Specifies whether to allow + self-signed certificates from the server. The default value is false. + :type allow_self_signed_server_cert: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'host': {'required': True}, + 'authentication_type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'host': {'key': 'typeProperties.host', 'type': 'object'}, + 'port': {'key': 'typeProperties.port', 'type': 'object'}, + 'http_path': {'key': 'typeProperties.httpPath', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'enable_ssl': {'key': 'typeProperties.enableSsl', 'type': 'object'}, + 'trusted_cert_path': {'key': 'typeProperties.trustedCertPath', 'type': 'object'}, + 'allow_host_name_cn_mismatch': {'key': 'typeProperties.allowHostNameCNMismatch', 'type': 'object'}, + 'allow_self_signed_server_cert': {'key': 'typeProperties.allowSelfSignedServerCert', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, host, authentication_type, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, port=None, http_path=None, username=None, password=None, enable_ssl=None, trusted_cert_path=None, allow_host_name_cn_mismatch=None, allow_self_signed_server_cert=None, encrypted_credential=None, **kwargs) -> None: + super(HBaseLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.host = host + self.port = port + self.http_path = http_path + self.authentication_type = authentication_type + self.username = username + self.password = password + self.enable_ssl = enable_ssl + self.trusted_cert_path = trusted_cert_path + self.allow_host_name_cn_mismatch = allow_host_name_cn_mismatch + self.allow_self_signed_server_cert = allow_self_signed_server_cert + self.encrypted_credential = encrypted_credential + self.type = 'HBase' + + +class HBaseObjectDataset(Dataset): + """HBase server dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: + super(HBaseObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.type = 'HBaseObject' + + +class HBaseSource(CopySource): + """A copy activity HBase server source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(HBaseSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'HBaseSource' + + +class HdfsLinkedService(LinkedService): + """Hadoop Distributed File System (HDFS) linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param url: Required. The URL of the HDFS service endpoint, e.g. + http://myhostname:50070/webhdfs/v1 . Type: string (or Expression with + resultType string). + :type url: object + :param authentication_type: Type of authentication used to connect to the + HDFS. Possible values are: Anonymous and Windows. Type: string (or + Expression with resultType string). + :type authentication_type: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + :param user_name: User name for Windows authentication. Type: string (or + Expression with resultType string). + :type user_name: object + :param password: Password for Windows authentication. + :type password: ~azure.mgmt.datafactory.models.SecretBase + """ + + _validation = { + 'type': {'required': True}, + 'url': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'url': {'key': 'typeProperties.url', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + } + + def __init__(self, *, url, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, authentication_type=None, encrypted_credential=None, user_name=None, password=None, **kwargs) -> None: + super(HdfsLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.url = url + self.authentication_type = authentication_type + self.encrypted_credential = encrypted_credential + self.user_name = user_name + self.password = password + self.type = 'Hdfs' + + +class HdfsLocation(DatasetLocation): + """The location of HDFS. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. Type of dataset storage location. + :type type: str + :param folder_path: Specify the folder path of dataset. Type: string (or + Expression with resultType string) + :type folder_path: object + :param file_name: Specify the file name of dataset. Type: string (or + Expression with resultType string). + :type file_name: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'folder_path': {'key': 'folderPath', 'type': 'object'}, + 'file_name': {'key': 'fileName', 'type': 'object'}, + } + + def __init__(self, *, type: str, additional_properties=None, folder_path=None, file_name=None, **kwargs) -> None: + super(HdfsLocation, self).__init__(additional_properties=additional_properties, type=type, folder_path=folder_path, file_name=file_name, **kwargs) + + +class HdfsReadSettings(StoreReadSettings): + """HDFS read settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The read setting type. + :type type: str + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param recursive: If true, files under the folder path will be read + recursively. Default is true. Type: boolean (or Expression with resultType + boolean). + :type recursive: object + :param wildcard_folder_path: HDFS wildcardFolderPath. Type: string (or + Expression with resultType string). + :type wildcard_folder_path: object + :param wildcard_file_name: HDFS wildcardFileName. Type: string (or + Expression with resultType string). + :type wildcard_file_name: object + :param enable_partition_discovery: Indicates whether to enable partition + discovery. + :type enable_partition_discovery: bool + :param modified_datetime_start: The start of file's modified datetime. + Type: string (or Expression with resultType string). + :type modified_datetime_start: object + :param modified_datetime_end: The end of file's modified datetime. Type: + string (or Expression with resultType string). + :type modified_datetime_end: object + :param distcp_settings: Specifies Distcp-related settings. + :type distcp_settings: ~azure.mgmt.datafactory.models.DistcpSettings + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'recursive': {'key': 'recursive', 'type': 'object'}, + 'wildcard_folder_path': {'key': 'wildcardFolderPath', 'type': 'object'}, + 'wildcard_file_name': {'key': 'wildcardFileName', 'type': 'object'}, + 'enable_partition_discovery': {'key': 'enablePartitionDiscovery', 'type': 'bool'}, + 'modified_datetime_start': {'key': 'modifiedDatetimeStart', 'type': 'object'}, + 'modified_datetime_end': {'key': 'modifiedDatetimeEnd', 'type': 'object'}, + 'distcp_settings': {'key': 'distcpSettings', 'type': 'DistcpSettings'}, + } + + def __init__(self, *, type: str, additional_properties=None, max_concurrent_connections=None, recursive=None, wildcard_folder_path=None, wildcard_file_name=None, enable_partition_discovery: bool=None, modified_datetime_start=None, modified_datetime_end=None, distcp_settings=None, **kwargs) -> None: + super(HdfsReadSettings, self).__init__(additional_properties=additional_properties, type=type, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.recursive = recursive + self.wildcard_folder_path = wildcard_folder_path + self.wildcard_file_name = wildcard_file_name + self.enable_partition_discovery = enable_partition_discovery + self.modified_datetime_start = modified_datetime_start + self.modified_datetime_end = modified_datetime_end + self.distcp_settings = distcp_settings + + +class HdfsSource(CopySource): + """A copy activity HDFS source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param recursive: If true, files under the folder path will be read + recursively. Default is true. Type: boolean (or Expression with resultType + boolean). + :type recursive: object + :param distcp_settings: Specifies Distcp-related settings. + :type distcp_settings: ~azure.mgmt.datafactory.models.DistcpSettings + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'recursive': {'key': 'recursive', 'type': 'object'}, + 'distcp_settings': {'key': 'distcpSettings', 'type': 'DistcpSettings'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, recursive=None, distcp_settings=None, **kwargs) -> None: + super(HdfsSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.recursive = recursive + self.distcp_settings = distcp_settings + self.type = 'HdfsSource' + + +class HDInsightHiveActivity(ExecutionActivity): + """HDInsight Hive activity type. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param storage_linked_services: Storage linked service references. + :type storage_linked_services: + list[~azure.mgmt.datafactory.models.LinkedServiceReference] + :param arguments: User specified arguments to HDInsightActivity. + :type arguments: list[object] + :param get_debug_info: Debug info option. Possible values include: 'None', + 'Always', 'Failure' + :type get_debug_info: str or + ~azure.mgmt.datafactory.models.HDInsightActivityDebugInfoOption + :param script_path: Script path. Type: string (or Expression with + resultType string). + :type script_path: object + :param script_linked_service: Script linked service reference. + :type script_linked_service: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param defines: Allows user to specify defines for Hive job request. + :type defines: dict[str, object] + :param variables: User specified arguments under hivevar namespace. + :type variables: list[object] + :param query_timeout: Query timeout value (in minutes). Effective when + the HDInsight cluster is with ESP (Enterprise Security Package) + :type query_timeout: int + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'storage_linked_services': {'key': 'typeProperties.storageLinkedServices', 'type': '[LinkedServiceReference]'}, + 'arguments': {'key': 'typeProperties.arguments', 'type': '[object]'}, + 'get_debug_info': {'key': 'typeProperties.getDebugInfo', 'type': 'str'}, + 'script_path': {'key': 'typeProperties.scriptPath', 'type': 'object'}, + 'script_linked_service': {'key': 'typeProperties.scriptLinkedService', 'type': 'LinkedServiceReference'}, + 'defines': {'key': 'typeProperties.defines', 'type': '{object}'}, + 'variables': {'key': 'typeProperties.variables', 'type': '[object]'}, + 'query_timeout': {'key': 'typeProperties.queryTimeout', 'type': 'int'}, + } + + def __init__(self, *, name: str, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, storage_linked_services=None, arguments=None, get_debug_info=None, script_path=None, script_linked_service=None, defines=None, variables=None, query_timeout: int=None, **kwargs) -> None: + super(HDInsightHiveActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) + self.storage_linked_services = storage_linked_services + self.arguments = arguments + self.get_debug_info = get_debug_info + self.script_path = script_path + self.script_linked_service = script_linked_service + self.defines = defines + self.variables = variables + self.query_timeout = query_timeout + self.type = 'HDInsightHive' + + +class HDInsightLinkedService(LinkedService): + """HDInsight linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param cluster_uri: Required. HDInsight cluster URI. Type: string (or + Expression with resultType string). + :type cluster_uri: object + :param user_name: HDInsight cluster user name. Type: string (or Expression + with resultType string). + :type user_name: object + :param password: HDInsight cluster password. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param linked_service_name: The Azure Storage linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param hcatalog_linked_service_name: A reference to the Azure SQL linked + service that points to the HCatalog database. + :type hcatalog_linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + :param is_esp_enabled: Specify if the HDInsight is created with ESP + (Enterprise Security Package). Type: Boolean. + :type is_esp_enabled: object + :param file_system: Specify the FileSystem if the main storage for the + HDInsight is ADLS Gen2. Type: string (or Expression with resultType + string). + :type file_system: object + """ + + _validation = { + 'type': {'required': True}, + 'cluster_uri': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'cluster_uri': {'key': 'typeProperties.clusterUri', 'type': 'object'}, + 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'linked_service_name': {'key': 'typeProperties.linkedServiceName', 'type': 'LinkedServiceReference'}, + 'hcatalog_linked_service_name': {'key': 'typeProperties.hcatalogLinkedServiceName', 'type': 'LinkedServiceReference'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + 'is_esp_enabled': {'key': 'typeProperties.isEspEnabled', 'type': 'object'}, + 'file_system': {'key': 'typeProperties.fileSystem', 'type': 'object'}, + } + + def __init__(self, *, cluster_uri, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, user_name=None, password=None, linked_service_name=None, hcatalog_linked_service_name=None, encrypted_credential=None, is_esp_enabled=None, file_system=None, **kwargs) -> None: + super(HDInsightLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.cluster_uri = cluster_uri + self.user_name = user_name + self.password = password + self.linked_service_name = linked_service_name + self.hcatalog_linked_service_name = hcatalog_linked_service_name + self.encrypted_credential = encrypted_credential + self.is_esp_enabled = is_esp_enabled + self.file_system = file_system + self.type = 'HDInsight' + + +class HDInsightMapReduceActivity(ExecutionActivity): + """HDInsight MapReduce activity type. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param storage_linked_services: Storage linked service references. + :type storage_linked_services: + list[~azure.mgmt.datafactory.models.LinkedServiceReference] + :param arguments: User specified arguments to HDInsightActivity. + :type arguments: list[object] + :param get_debug_info: Debug info option. Possible values include: 'None', + 'Always', 'Failure' + :type get_debug_info: str or + ~azure.mgmt.datafactory.models.HDInsightActivityDebugInfoOption + :param class_name: Required. Class name. Type: string (or Expression with + resultType string). + :type class_name: object + :param jar_file_path: Required. Jar path. Type: string (or Expression with + resultType string). + :type jar_file_path: object + :param jar_linked_service: Jar linked service reference. + :type jar_linked_service: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param jar_libs: Jar libs. + :type jar_libs: list[object] + :param defines: Allows user to specify defines for the MapReduce job + request. + :type defines: dict[str, object] + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'class_name': {'required': True}, + 'jar_file_path': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'storage_linked_services': {'key': 'typeProperties.storageLinkedServices', 'type': '[LinkedServiceReference]'}, + 'arguments': {'key': 'typeProperties.arguments', 'type': '[object]'}, + 'get_debug_info': {'key': 'typeProperties.getDebugInfo', 'type': 'str'}, + 'class_name': {'key': 'typeProperties.className', 'type': 'object'}, + 'jar_file_path': {'key': 'typeProperties.jarFilePath', 'type': 'object'}, + 'jar_linked_service': {'key': 'typeProperties.jarLinkedService', 'type': 'LinkedServiceReference'}, + 'jar_libs': {'key': 'typeProperties.jarLibs', 'type': '[object]'}, + 'defines': {'key': 'typeProperties.defines', 'type': '{object}'}, + } + + def __init__(self, *, name: str, class_name, jar_file_path, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, storage_linked_services=None, arguments=None, get_debug_info=None, jar_linked_service=None, jar_libs=None, defines=None, **kwargs) -> None: + super(HDInsightMapReduceActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) + self.storage_linked_services = storage_linked_services + self.arguments = arguments + self.get_debug_info = get_debug_info + self.class_name = class_name + self.jar_file_path = jar_file_path + self.jar_linked_service = jar_linked_service + self.jar_libs = jar_libs + self.defines = defines + self.type = 'HDInsightMapReduce' + + +class HDInsightOnDemandLinkedService(LinkedService): + """HDInsight ondemand linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param cluster_size: Required. Number of worker/data nodes in the cluster. + Suggestion value: 4. Type: string (or Expression with resultType string). + :type cluster_size: object + :param time_to_live: Required. The allowed idle time for the on-demand + HDInsight cluster. Specifies how long the on-demand HDInsight cluster + stays alive after completion of an activity run if there are no other + active jobs in the cluster. The minimum value is 5 mins. Type: string (or + Expression with resultType string). + :type time_to_live: object + :param version: Required. Version of the HDInsight cluster.  Type: string + (or Expression with resultType string). + :type version: object + :param linked_service_name: Required. Azure Storage linked service to be + used by the on-demand cluster for storing and processing data. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param host_subscription_id: Required. The customer’s subscription to host + the cluster. Type: string (or Expression with resultType string). + :type host_subscription_id: object + :param service_principal_id: The service principal id for the + hostSubscriptionId. Type: string (or Expression with resultType string). + :type service_principal_id: object + :param service_principal_key: The key for the service principal id. + :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase + :param tenant: Required. The Tenant id/name to which the service principal + belongs. Type: string (or Expression with resultType string). + :type tenant: object + :param cluster_resource_group: Required. The resource group where the + cluster belongs. Type: string (or Expression with resultType string). + :type cluster_resource_group: object + :param cluster_name_prefix: The prefix of cluster name, postfix will be + distinct with timestamp. Type: string (or Expression with resultType + string). + :type cluster_name_prefix: object + :param cluster_user_name: The username to access the cluster. Type: string + (or Expression with resultType string). + :type cluster_user_name: object + :param cluster_password: The password to access the cluster. + :type cluster_password: ~azure.mgmt.datafactory.models.SecretBase + :param cluster_ssh_user_name: The username to SSH remotely connect to + cluster’s node (for Linux). Type: string (or Expression with resultType + string). + :type cluster_ssh_user_name: object + :param cluster_ssh_password: The password to SSH remotely connect + cluster’s node (for Linux). + :type cluster_ssh_password: ~azure.mgmt.datafactory.models.SecretBase + :param additional_linked_service_names: Specifies additional storage + accounts for the HDInsight linked service so that the Data Factory service + can register them on your behalf. + :type additional_linked_service_names: + list[~azure.mgmt.datafactory.models.LinkedServiceReference] + :param hcatalog_linked_service_name: The name of Azure SQL linked service + that point to the HCatalog database. The on-demand HDInsight cluster is + created by using the Azure SQL database as the metastore. + :type hcatalog_linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param cluster_type: The cluster type. Type: string (or Expression with + resultType string). + :type cluster_type: object + :param spark_version: The version of spark if the cluster type is 'spark'. + Type: string (or Expression with resultType string). + :type spark_version: object + :param core_configuration: Specifies the core configuration parameters (as + in core-site.xml) for the HDInsight cluster to be created. + :type core_configuration: object + :param h_base_configuration: Specifies the HBase configuration parameters + (hbase-site.xml) for the HDInsight cluster. + :type h_base_configuration: object + :param hdfs_configuration: Specifies the HDFS configuration parameters + (hdfs-site.xml) for the HDInsight cluster. + :type hdfs_configuration: object + :param hive_configuration: Specifies the hive configuration parameters + (hive-site.xml) for the HDInsight cluster. + :type hive_configuration: object + :param map_reduce_configuration: Specifies the MapReduce configuration + parameters (mapred-site.xml) for the HDInsight cluster. + :type map_reduce_configuration: object + :param oozie_configuration: Specifies the Oozie configuration parameters + (oozie-site.xml) for the HDInsight cluster. + :type oozie_configuration: object + :param storm_configuration: Specifies the Storm configuration parameters + (storm-site.xml) for the HDInsight cluster. + :type storm_configuration: object + :param yarn_configuration: Specifies the Yarn configuration parameters + (yarn-site.xml) for the HDInsight cluster. + :type yarn_configuration: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + :param head_node_size: Specifies the size of the head node for the + HDInsight cluster. + :type head_node_size: object + :param data_node_size: Specifies the size of the data node for the + HDInsight cluster. + :type data_node_size: object + :param zookeeper_node_size: Specifies the size of the Zoo Keeper node for + the HDInsight cluster. + :type zookeeper_node_size: object + :param script_actions: Custom script actions to run on HDI ondemand + cluster once it's up. Please refer to + https://docs.microsoft.com/en-us/azure/hdinsight/hdinsight-hadoop-customize-cluster-linux?toc=%2Fen-us%2Fazure%2Fhdinsight%2Fr-server%2FTOC.json&bc=%2Fen-us%2Fazure%2Fbread%2Ftoc.json#understanding-script-actions. + :type script_actions: list[~azure.mgmt.datafactory.models.ScriptAction] + :param virtual_network_id: The ARM resource ID for the vNet to which the + cluster should be joined after creation. Type: string (or Expression with + resultType string). + :type virtual_network_id: object + :param subnet_name: The ARM resource ID for the subnet in the vNet. If + virtualNetworkId was specified, then this property is required. Type: + string (or Expression with resultType string). + :type subnet_name: object + """ + + _validation = { + 'type': {'required': True}, + 'cluster_size': {'required': True}, + 'time_to_live': {'required': True}, + 'version': {'required': True}, + 'linked_service_name': {'required': True}, + 'host_subscription_id': {'required': True}, + 'tenant': {'required': True}, + 'cluster_resource_group': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'cluster_size': {'key': 'typeProperties.clusterSize', 'type': 'object'}, + 'time_to_live': {'key': 'typeProperties.timeToLive', 'type': 'object'}, + 'version': {'key': 'typeProperties.version', 'type': 'object'}, + 'linked_service_name': {'key': 'typeProperties.linkedServiceName', 'type': 'LinkedServiceReference'}, + 'host_subscription_id': {'key': 'typeProperties.hostSubscriptionId', 'type': 'object'}, + 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, + 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, + 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, + 'cluster_resource_group': {'key': 'typeProperties.clusterResourceGroup', 'type': 'object'}, + 'cluster_name_prefix': {'key': 'typeProperties.clusterNamePrefix', 'type': 'object'}, + 'cluster_user_name': {'key': 'typeProperties.clusterUserName', 'type': 'object'}, + 'cluster_password': {'key': 'typeProperties.clusterPassword', 'type': 'SecretBase'}, + 'cluster_ssh_user_name': {'key': 'typeProperties.clusterSshUserName', 'type': 'object'}, + 'cluster_ssh_password': {'key': 'typeProperties.clusterSshPassword', 'type': 'SecretBase'}, + 'additional_linked_service_names': {'key': 'typeProperties.additionalLinkedServiceNames', 'type': '[LinkedServiceReference]'}, + 'hcatalog_linked_service_name': {'key': 'typeProperties.hcatalogLinkedServiceName', 'type': 'LinkedServiceReference'}, + 'cluster_type': {'key': 'typeProperties.clusterType', 'type': 'object'}, + 'spark_version': {'key': 'typeProperties.sparkVersion', 'type': 'object'}, + 'core_configuration': {'key': 'typeProperties.coreConfiguration', 'type': 'object'}, + 'h_base_configuration': {'key': 'typeProperties.hBaseConfiguration', 'type': 'object'}, + 'hdfs_configuration': {'key': 'typeProperties.hdfsConfiguration', 'type': 'object'}, + 'hive_configuration': {'key': 'typeProperties.hiveConfiguration', 'type': 'object'}, + 'map_reduce_configuration': {'key': 'typeProperties.mapReduceConfiguration', 'type': 'object'}, + 'oozie_configuration': {'key': 'typeProperties.oozieConfiguration', 'type': 'object'}, + 'storm_configuration': {'key': 'typeProperties.stormConfiguration', 'type': 'object'}, + 'yarn_configuration': {'key': 'typeProperties.yarnConfiguration', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + 'head_node_size': {'key': 'typeProperties.headNodeSize', 'type': 'object'}, + 'data_node_size': {'key': 'typeProperties.dataNodeSize', 'type': 'object'}, + 'zookeeper_node_size': {'key': 'typeProperties.zookeeperNodeSize', 'type': 'object'}, + 'script_actions': {'key': 'typeProperties.scriptActions', 'type': '[ScriptAction]'}, + 'virtual_network_id': {'key': 'typeProperties.virtualNetworkId', 'type': 'object'}, + 'subnet_name': {'key': 'typeProperties.subnetName', 'type': 'object'}, + } + + def __init__(self, *, cluster_size, time_to_live, version, linked_service_name, host_subscription_id, tenant, cluster_resource_group, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, service_principal_id=None, service_principal_key=None, cluster_name_prefix=None, cluster_user_name=None, cluster_password=None, cluster_ssh_user_name=None, cluster_ssh_password=None, additional_linked_service_names=None, hcatalog_linked_service_name=None, cluster_type=None, spark_version=None, core_configuration=None, h_base_configuration=None, hdfs_configuration=None, hive_configuration=None, map_reduce_configuration=None, oozie_configuration=None, storm_configuration=None, yarn_configuration=None, encrypted_credential=None, head_node_size=None, data_node_size=None, zookeeper_node_size=None, script_actions=None, virtual_network_id=None, subnet_name=None, **kwargs) -> None: + super(HDInsightOnDemandLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.cluster_size = cluster_size + self.time_to_live = time_to_live + self.version = version + self.linked_service_name = linked_service_name + self.host_subscription_id = host_subscription_id + self.service_principal_id = service_principal_id + self.service_principal_key = service_principal_key + self.tenant = tenant + self.cluster_resource_group = cluster_resource_group + self.cluster_name_prefix = cluster_name_prefix + self.cluster_user_name = cluster_user_name + self.cluster_password = cluster_password + self.cluster_ssh_user_name = cluster_ssh_user_name + self.cluster_ssh_password = cluster_ssh_password + self.additional_linked_service_names = additional_linked_service_names + self.hcatalog_linked_service_name = hcatalog_linked_service_name + self.cluster_type = cluster_type + self.spark_version = spark_version + self.core_configuration = core_configuration + self.h_base_configuration = h_base_configuration + self.hdfs_configuration = hdfs_configuration + self.hive_configuration = hive_configuration + self.map_reduce_configuration = map_reduce_configuration + self.oozie_configuration = oozie_configuration + self.storm_configuration = storm_configuration + self.yarn_configuration = yarn_configuration + self.encrypted_credential = encrypted_credential + self.head_node_size = head_node_size + self.data_node_size = data_node_size + self.zookeeper_node_size = zookeeper_node_size + self.script_actions = script_actions + self.virtual_network_id = virtual_network_id + self.subnet_name = subnet_name + self.type = 'HDInsightOnDemand' + + +class HDInsightPigActivity(ExecutionActivity): + """HDInsight Pig activity type. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param storage_linked_services: Storage linked service references. + :type storage_linked_services: + list[~azure.mgmt.datafactory.models.LinkedServiceReference] + :param arguments: User specified arguments to HDInsightActivity. + :type arguments: list[object] + :param get_debug_info: Debug info option. Possible values include: 'None', + 'Always', 'Failure' + :type get_debug_info: str or + ~azure.mgmt.datafactory.models.HDInsightActivityDebugInfoOption + :param script_path: Script path. Type: string (or Expression with + resultType string). + :type script_path: object + :param script_linked_service: Script linked service reference. + :type script_linked_service: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param defines: Allows user to specify defines for Pig job request. + :type defines: dict[str, object] + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'storage_linked_services': {'key': 'typeProperties.storageLinkedServices', 'type': '[LinkedServiceReference]'}, + 'arguments': {'key': 'typeProperties.arguments', 'type': '[object]'}, + 'get_debug_info': {'key': 'typeProperties.getDebugInfo', 'type': 'str'}, + 'script_path': {'key': 'typeProperties.scriptPath', 'type': 'object'}, + 'script_linked_service': {'key': 'typeProperties.scriptLinkedService', 'type': 'LinkedServiceReference'}, + 'defines': {'key': 'typeProperties.defines', 'type': '{object}'}, + } + + def __init__(self, *, name: str, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, storage_linked_services=None, arguments=None, get_debug_info=None, script_path=None, script_linked_service=None, defines=None, **kwargs) -> None: + super(HDInsightPigActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) + self.storage_linked_services = storage_linked_services + self.arguments = arguments + self.get_debug_info = get_debug_info + self.script_path = script_path + self.script_linked_service = script_linked_service + self.defines = defines + self.type = 'HDInsightPig' + + +class HDInsightSparkActivity(ExecutionActivity): + """HDInsight Spark activity. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param root_path: Required. The root path in 'sparkJobLinkedService' for + all the job’s files. Type: string (or Expression with resultType string). + :type root_path: object + :param entry_file_path: Required. The relative path to the root folder of + the code/package to be executed. Type: string (or Expression with + resultType string). + :type entry_file_path: object + :param arguments: The user-specified arguments to HDInsightSparkActivity. + :type arguments: list[object] + :param get_debug_info: Debug info option. Possible values include: 'None', + 'Always', 'Failure' + :type get_debug_info: str or + ~azure.mgmt.datafactory.models.HDInsightActivityDebugInfoOption + :param spark_job_linked_service: The storage linked service for uploading + the entry file and dependencies, and for receiving logs. + :type spark_job_linked_service: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param class_name: The application's Java/Spark main class. + :type class_name: str + :param proxy_user: The user to impersonate that will execute the job. + Type: string (or Expression with resultType string). + :type proxy_user: object + :param spark_config: Spark configuration property. + :type spark_config: dict[str, object] + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'root_path': {'required': True}, + 'entry_file_path': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'root_path': {'key': 'typeProperties.rootPath', 'type': 'object'}, + 'entry_file_path': {'key': 'typeProperties.entryFilePath', 'type': 'object'}, + 'arguments': {'key': 'typeProperties.arguments', 'type': '[object]'}, + 'get_debug_info': {'key': 'typeProperties.getDebugInfo', 'type': 'str'}, + 'spark_job_linked_service': {'key': 'typeProperties.sparkJobLinkedService', 'type': 'LinkedServiceReference'}, + 'class_name': {'key': 'typeProperties.className', 'type': 'str'}, + 'proxy_user': {'key': 'typeProperties.proxyUser', 'type': 'object'}, + 'spark_config': {'key': 'typeProperties.sparkConfig', 'type': '{object}'}, + } + + def __init__(self, *, name: str, root_path, entry_file_path, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, arguments=None, get_debug_info=None, spark_job_linked_service=None, class_name: str=None, proxy_user=None, spark_config=None, **kwargs) -> None: + super(HDInsightSparkActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) + self.root_path = root_path + self.entry_file_path = entry_file_path + self.arguments = arguments + self.get_debug_info = get_debug_info + self.spark_job_linked_service = spark_job_linked_service + self.class_name = class_name + self.proxy_user = proxy_user + self.spark_config = spark_config + self.type = 'HDInsightSpark' + + +class HDInsightStreamingActivity(ExecutionActivity): + """HDInsight streaming activity type. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param storage_linked_services: Storage linked service references. + :type storage_linked_services: + list[~azure.mgmt.datafactory.models.LinkedServiceReference] + :param arguments: User specified arguments to HDInsightActivity. + :type arguments: list[object] + :param get_debug_info: Debug info option. Possible values include: 'None', + 'Always', 'Failure' + :type get_debug_info: str or + ~azure.mgmt.datafactory.models.HDInsightActivityDebugInfoOption + :param mapper: Required. Mapper executable name. Type: string (or + Expression with resultType string). + :type mapper: object + :param reducer: Required. Reducer executable name. Type: string (or + Expression with resultType string). + :type reducer: object + :param input: Required. Input blob path. Type: string (or Expression with + resultType string). + :type input: object + :param output: Required. Output blob path. Type: string (or Expression + with resultType string). + :type output: object + :param file_paths: Required. Paths to streaming job files. Can be + directories. + :type file_paths: list[object] + :param file_linked_service: Linked service reference where the files are + located. + :type file_linked_service: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param combiner: Combiner executable name. Type: string (or Expression + with resultType string). + :type combiner: object + :param command_environment: Command line environment values. + :type command_environment: list[object] + :param defines: Allows user to specify defines for streaming job request. + :type defines: dict[str, object] + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'mapper': {'required': True}, + 'reducer': {'required': True}, + 'input': {'required': True}, + 'output': {'required': True}, + 'file_paths': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'storage_linked_services': {'key': 'typeProperties.storageLinkedServices', 'type': '[LinkedServiceReference]'}, + 'arguments': {'key': 'typeProperties.arguments', 'type': '[object]'}, + 'get_debug_info': {'key': 'typeProperties.getDebugInfo', 'type': 'str'}, + 'mapper': {'key': 'typeProperties.mapper', 'type': 'object'}, + 'reducer': {'key': 'typeProperties.reducer', 'type': 'object'}, + 'input': {'key': 'typeProperties.input', 'type': 'object'}, + 'output': {'key': 'typeProperties.output', 'type': 'object'}, + 'file_paths': {'key': 'typeProperties.filePaths', 'type': '[object]'}, + 'file_linked_service': {'key': 'typeProperties.fileLinkedService', 'type': 'LinkedServiceReference'}, + 'combiner': {'key': 'typeProperties.combiner', 'type': 'object'}, + 'command_environment': {'key': 'typeProperties.commandEnvironment', 'type': '[object]'}, + 'defines': {'key': 'typeProperties.defines', 'type': '{object}'}, + } + + def __init__(self, *, name: str, mapper, reducer, input, output, file_paths, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, storage_linked_services=None, arguments=None, get_debug_info=None, file_linked_service=None, combiner=None, command_environment=None, defines=None, **kwargs) -> None: + super(HDInsightStreamingActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) + self.storage_linked_services = storage_linked_services + self.arguments = arguments + self.get_debug_info = get_debug_info + self.mapper = mapper + self.reducer = reducer + self.input = input + self.output = output + self.file_paths = file_paths + self.file_linked_service = file_linked_service + self.combiner = combiner + self.command_environment = command_environment + self.defines = defines + self.type = 'HDInsightStreaming' + + +class HiveLinkedService(LinkedService): + """Hive Server linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param host: Required. IP address or host name of the Hive server, + separated by ';' for multiple hosts (only when serviceDiscoveryMode is + enable). + :type host: object + :param port: The TCP port that the Hive server uses to listen for client + connections. + :type port: object + :param server_type: The type of Hive server. Possible values include: + 'HiveServer1', 'HiveServer2', 'HiveThriftServer' + :type server_type: str or ~azure.mgmt.datafactory.models.HiveServerType + :param thrift_transport_protocol: The transport protocol to use in the + Thrift layer. Possible values include: 'Binary', 'SASL', 'HTTP ' + :type thrift_transport_protocol: str or + ~azure.mgmt.datafactory.models.HiveThriftTransportProtocol + :param authentication_type: Required. The authentication method used to + access the Hive server. Possible values include: 'Anonymous', 'Username', + 'UsernameAndPassword', 'WindowsAzureHDInsightService' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.HiveAuthenticationType + :param service_discovery_mode: true to indicate using the ZooKeeper + service, false not. + :type service_discovery_mode: object + :param zoo_keeper_name_space: The namespace on ZooKeeper under which Hive + Server 2 nodes are added. + :type zoo_keeper_name_space: object + :param use_native_query: Specifies whether the driver uses native HiveQL + queries,or converts them into an equivalent form in HiveQL. + :type use_native_query: object + :param username: The user name that you use to access Hive Server. + :type username: object + :param password: The password corresponding to the user name that you + provided in the Username field + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param http_path: The partial URL corresponding to the Hive server. + :type http_path: object + :param enable_ssl: Specifies whether the connections to the server are + encrypted using SSL. The default value is false. + :type enable_ssl: object + :param trusted_cert_path: The full path of the .pem file containing + trusted CA certificates for verifying the server when connecting over SSL. + This property can only be set when using SSL on self-hosted IR. The + default value is the cacerts.pem file installed with the IR. + :type trusted_cert_path: object + :param use_system_trust_store: Specifies whether to use a CA certificate + from the system trust store or from a specified PEM file. The default + value is false. + :type use_system_trust_store: object + :param allow_host_name_cn_mismatch: Specifies whether to require a + CA-issued SSL certificate name to match the host name of the server when + connecting over SSL. The default value is false. + :type allow_host_name_cn_mismatch: object + :param allow_self_signed_server_cert: Specifies whether to allow + self-signed certificates from the server. The default value is false. + :type allow_self_signed_server_cert: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'host': {'required': True}, + 'authentication_type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'host': {'key': 'typeProperties.host', 'type': 'object'}, + 'port': {'key': 'typeProperties.port', 'type': 'object'}, + 'server_type': {'key': 'typeProperties.serverType', 'type': 'str'}, + 'thrift_transport_protocol': {'key': 'typeProperties.thriftTransportProtocol', 'type': 'str'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'service_discovery_mode': {'key': 'typeProperties.serviceDiscoveryMode', 'type': 'object'}, + 'zoo_keeper_name_space': {'key': 'typeProperties.zooKeeperNameSpace', 'type': 'object'}, + 'use_native_query': {'key': 'typeProperties.useNativeQuery', 'type': 'object'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'http_path': {'key': 'typeProperties.httpPath', 'type': 'object'}, + 'enable_ssl': {'key': 'typeProperties.enableSsl', 'type': 'object'}, + 'trusted_cert_path': {'key': 'typeProperties.trustedCertPath', 'type': 'object'}, + 'use_system_trust_store': {'key': 'typeProperties.useSystemTrustStore', 'type': 'object'}, + 'allow_host_name_cn_mismatch': {'key': 'typeProperties.allowHostNameCNMismatch', 'type': 'object'}, + 'allow_self_signed_server_cert': {'key': 'typeProperties.allowSelfSignedServerCert', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, host, authentication_type, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, port=None, server_type=None, thrift_transport_protocol=None, service_discovery_mode=None, zoo_keeper_name_space=None, use_native_query=None, username=None, password=None, http_path=None, enable_ssl=None, trusted_cert_path=None, use_system_trust_store=None, allow_host_name_cn_mismatch=None, allow_self_signed_server_cert=None, encrypted_credential=None, **kwargs) -> None: + super(HiveLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.host = host + self.port = port + self.server_type = server_type + self.thrift_transport_protocol = thrift_transport_protocol + self.authentication_type = authentication_type + self.service_discovery_mode = service_discovery_mode + self.zoo_keeper_name_space = zoo_keeper_name_space + self.use_native_query = use_native_query + self.username = username + self.password = password + self.http_path = http_path + self.enable_ssl = enable_ssl + self.trusted_cert_path = trusted_cert_path + self.use_system_trust_store = use_system_trust_store + self.allow_host_name_cn_mismatch = allow_host_name_cn_mismatch + self.allow_self_signed_server_cert = allow_self_signed_server_cert + self.encrypted_credential = encrypted_credential + self.type = 'Hive' + + +class HiveObjectDataset(Dataset): + """Hive Server dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: This property will be retired. Please consider using + schema + table properties instead. + :type table_name: object + :param table: The table name of the Hive. Type: string (or Expression with + resultType string). + :type table: object + :param hive_object_dataset_schema: The schema name of the Hive. Type: + string (or Expression with resultType string). + :type hive_object_dataset_schema: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + 'table': {'key': 'typeProperties.table', 'type': 'object'}, + 'hive_object_dataset_schema': {'key': 'typeProperties.schema', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, table=None, hive_object_dataset_schema=None, **kwargs) -> None: + super(HiveObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.table = table + self.hive_object_dataset_schema = hive_object_dataset_schema + self.type = 'HiveObject' + + +class HiveSource(CopySource): + """A copy activity Hive Server source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(HiveSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'HiveSource' + + +class HttpDataset(Dataset): + """A file in an HTTP web server. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param relative_url: The relative URL based on the URL in the + HttpLinkedService refers to an HTTP file Type: string (or Expression with + resultType string). + :type relative_url: object + :param request_method: The HTTP method for the HTTP request. Type: string + (or Expression with resultType string). + :type request_method: object + :param request_body: The body for the HTTP request. Type: string (or + Expression with resultType string). + :type request_body: object + :param additional_headers: The headers for the HTTP Request. e.g. + request-header-name-1:request-header-value-1 + ... + request-header-name-n:request-header-value-n Type: string (or Expression + with resultType string). + :type additional_headers: object + :param format: The format of files. + :type format: ~azure.mgmt.datafactory.models.DatasetStorageFormat + :param compression: The data compression method used on files. + :type compression: ~azure.mgmt.datafactory.models.DatasetCompression + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'relative_url': {'key': 'typeProperties.relativeUrl', 'type': 'object'}, + 'request_method': {'key': 'typeProperties.requestMethod', 'type': 'object'}, + 'request_body': {'key': 'typeProperties.requestBody', 'type': 'object'}, + 'additional_headers': {'key': 'typeProperties.additionalHeaders', 'type': 'object'}, + 'format': {'key': 'typeProperties.format', 'type': 'DatasetStorageFormat'}, + 'compression': {'key': 'typeProperties.compression', 'type': 'DatasetCompression'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, relative_url=None, request_method=None, request_body=None, additional_headers=None, format=None, compression=None, **kwargs) -> None: + super(HttpDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.relative_url = relative_url + self.request_method = request_method + self.request_body = request_body + self.additional_headers = additional_headers + self.format = format + self.compression = compression + self.type = 'HttpFile' + + +class HttpLinkedService(LinkedService): + """Linked service for an HTTP source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param url: Required. The base URL of the HTTP endpoint, e.g. + http://www.microsoft.com. Type: string (or Expression with resultType + string). + :type url: object + :param authentication_type: The authentication type to be used to connect + to the HTTP server. Possible values include: 'Basic', 'Anonymous', + 'Digest', 'Windows', 'ClientCertificate' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.HttpAuthenticationType + :param user_name: User name for Basic, Digest, or Windows authentication. + Type: string (or Expression with resultType string). + :type user_name: object + :param password: Password for Basic, Digest, Windows, or ClientCertificate + with EmbeddedCertData authentication. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param embedded_cert_data: Base64 encoded certificate data for + ClientCertificate authentication. For on-premises copy with + ClientCertificate authentication, either CertThumbprint or + EmbeddedCertData/Password should be specified. Type: string (or Expression + with resultType string). + :type embedded_cert_data: object + :param cert_thumbprint: Thumbprint of certificate for ClientCertificate + authentication. Only valid for on-premises copy. For on-premises copy with + ClientCertificate authentication, either CertThumbprint or + EmbeddedCertData/Password should be specified. Type: string (or Expression + with resultType string). + :type cert_thumbprint: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + :param enable_server_certificate_validation: If true, validate the HTTPS + server SSL certificate. Default value is true. Type: boolean (or + Expression with resultType boolean). + :type enable_server_certificate_validation: object + """ + + _validation = { + 'type': {'required': True}, + 'url': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'url': {'key': 'typeProperties.url', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'embedded_cert_data': {'key': 'typeProperties.embeddedCertData', 'type': 'object'}, + 'cert_thumbprint': {'key': 'typeProperties.certThumbprint', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + 'enable_server_certificate_validation': {'key': 'typeProperties.enableServerCertificateValidation', 'type': 'object'}, + } + + def __init__(self, *, url, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, authentication_type=None, user_name=None, password=None, embedded_cert_data=None, cert_thumbprint=None, encrypted_credential=None, enable_server_certificate_validation=None, **kwargs) -> None: + super(HttpLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.url = url + self.authentication_type = authentication_type + self.user_name = user_name + self.password = password + self.embedded_cert_data = embedded_cert_data + self.cert_thumbprint = cert_thumbprint + self.encrypted_credential = encrypted_credential + self.enable_server_certificate_validation = enable_server_certificate_validation + self.type = 'HttpServer' + + +class HttpReadSettings(StoreReadSettings): + """Sftp read settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The read setting type. + :type type: str + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param request_method: The HTTP method used to call the RESTful API. The + default is GET. Type: string (or Expression with resultType string). + :type request_method: object + :param request_body: The HTTP request body to the RESTful API if + requestMethod is POST. Type: string (or Expression with resultType + string). + :type request_body: object + :param additional_headers: The additional HTTP headers in the request to + the RESTful API. Type: string (or Expression with resultType string). + :type additional_headers: object + :param request_timeout: Specifies the timeout for a HTTP client to get + HTTP response from HTTP server. + :type request_timeout: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'request_method': {'key': 'requestMethod', 'type': 'object'}, + 'request_body': {'key': 'requestBody', 'type': 'object'}, + 'additional_headers': {'key': 'additionalHeaders', 'type': 'object'}, + 'request_timeout': {'key': 'requestTimeout', 'type': 'object'}, + } + + def __init__(self, *, type: str, additional_properties=None, max_concurrent_connections=None, request_method=None, request_body=None, additional_headers=None, request_timeout=None, **kwargs) -> None: + super(HttpReadSettings, self).__init__(additional_properties=additional_properties, type=type, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.request_method = request_method + self.request_body = request_body + self.additional_headers = additional_headers + self.request_timeout = request_timeout + + +class HttpServerLocation(DatasetLocation): + """The location of http server. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. Type of dataset storage location. + :type type: str + :param folder_path: Specify the folder path of dataset. Type: string (or + Expression with resultType string) + :type folder_path: object + :param file_name: Specify the file name of dataset. Type: string (or + Expression with resultType string). + :type file_name: object + :param relative_url: Specify the relativeUrl of http server. Type: string + (or Expression with resultType string) + :type relative_url: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'folder_path': {'key': 'folderPath', 'type': 'object'}, + 'file_name': {'key': 'fileName', 'type': 'object'}, + 'relative_url': {'key': 'relativeUrl', 'type': 'object'}, + } + + def __init__(self, *, type: str, additional_properties=None, folder_path=None, file_name=None, relative_url=None, **kwargs) -> None: + super(HttpServerLocation, self).__init__(additional_properties=additional_properties, type=type, folder_path=folder_path, file_name=file_name, **kwargs) + self.relative_url = relative_url + + +class HttpSource(CopySource): + """A copy activity source for an HTTP file. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param http_request_timeout: Specifies the timeout for a HTTP client to + get HTTP response from HTTP server. The default value is equivalent to + System.Net.HttpWebRequest.Timeout. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type http_request_timeout: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'http_request_timeout': {'key': 'httpRequestTimeout', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, http_request_timeout=None, **kwargs) -> None: + super(HttpSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.http_request_timeout = http_request_timeout + self.type = 'HttpSource' + + +class HubspotLinkedService(LinkedService): + """Hubspot Service linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param client_id: Required. The client ID associated with your Hubspot + application. + :type client_id: object + :param client_secret: The client secret associated with your Hubspot + application. + :type client_secret: ~azure.mgmt.datafactory.models.SecretBase + :param access_token: The access token obtained when initially + authenticating your OAuth integration. + :type access_token: ~azure.mgmt.datafactory.models.SecretBase + :param refresh_token: The refresh token obtained when initially + authenticating your OAuth integration. + :type refresh_token: ~azure.mgmt.datafactory.models.SecretBase + :param use_encrypted_endpoints: Specifies whether the data source + endpoints are encrypted using HTTPS. The default value is true. + :type use_encrypted_endpoints: object + :param use_host_verification: Specifies whether to require the host name + in the server's certificate to match the host name of the server when + connecting over SSL. The default value is true. + :type use_host_verification: object + :param use_peer_verification: Specifies whether to verify the identity of + the server when connecting over SSL. The default value is true. + :type use_peer_verification: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'client_id': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, + 'client_secret': {'key': 'typeProperties.clientSecret', 'type': 'SecretBase'}, + 'access_token': {'key': 'typeProperties.accessToken', 'type': 'SecretBase'}, + 'refresh_token': {'key': 'typeProperties.refreshToken', 'type': 'SecretBase'}, + 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, + 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, + 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, client_id, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, client_secret=None, access_token=None, refresh_token=None, use_encrypted_endpoints=None, use_host_verification=None, use_peer_verification=None, encrypted_credential=None, **kwargs) -> None: + super(HubspotLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.client_id = client_id + self.client_secret = client_secret + self.access_token = access_token + self.refresh_token = refresh_token + self.use_encrypted_endpoints = use_encrypted_endpoints + self.use_host_verification = use_host_verification + self.use_peer_verification = use_peer_verification + self.encrypted_credential = encrypted_credential + self.type = 'Hubspot' + + +class HubspotObjectDataset(Dataset): + """Hubspot Service dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: + super(HubspotObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.type = 'HubspotObject' + + +class HubspotSource(CopySource): + """A copy activity Hubspot Service source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(HubspotSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'HubspotSource' + + +class IfConditionActivity(ControlActivity): + """This activity evaluates a boolean expression and executes either the + activities under the ifTrueActivities property or the ifFalseActivities + property depending on the result of the expression. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param expression: Required. An expression that would evaluate to Boolean. + This is used to determine the block of activities (ifTrueActivities or + ifFalseActivities) that will be executed. + :type expression: ~azure.mgmt.datafactory.models.Expression + :param if_true_activities: List of activities to execute if expression is + evaluated to true. This is an optional property and if not provided, the + activity will exit without any action. + :type if_true_activities: list[~azure.mgmt.datafactory.models.Activity] + :param if_false_activities: List of activities to execute if expression is + evaluated to false. This is an optional property and if not provided, the + activity will exit without any action. + :type if_false_activities: list[~azure.mgmt.datafactory.models.Activity] + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'expression': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'expression': {'key': 'typeProperties.expression', 'type': 'Expression'}, + 'if_true_activities': {'key': 'typeProperties.ifTrueActivities', 'type': '[Activity]'}, + 'if_false_activities': {'key': 'typeProperties.ifFalseActivities', 'type': '[Activity]'}, + } + + def __init__(self, *, name: str, expression, additional_properties=None, description: str=None, depends_on=None, user_properties=None, if_true_activities=None, if_false_activities=None, **kwargs) -> None: + super(IfConditionActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, **kwargs) + self.expression = expression + self.if_true_activities = if_true_activities + self.if_false_activities = if_false_activities + self.type = 'IfCondition' + + +class ImpalaLinkedService(LinkedService): + """Impala server linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param host: Required. The IP address or host name of the Impala server. + (i.e. 192.168.222.160) + :type host: object + :param port: The TCP port that the Impala server uses to listen for client + connections. The default value is 21050. + :type port: object + :param authentication_type: Required. The authentication type to use. + Possible values include: 'Anonymous', 'SASLUsername', + 'UsernameAndPassword' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.ImpalaAuthenticationType + :param username: The user name used to access the Impala server. The + default value is anonymous when using SASLUsername. + :type username: object + :param password: The password corresponding to the user name when using + UsernameAndPassword. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param enable_ssl: Specifies whether the connections to the server are + encrypted using SSL. The default value is false. + :type enable_ssl: object + :param trusted_cert_path: The full path of the .pem file containing + trusted CA certificates for verifying the server when connecting over SSL. + This property can only be set when using SSL on self-hosted IR. The + default value is the cacerts.pem file installed with the IR. + :type trusted_cert_path: object + :param use_system_trust_store: Specifies whether to use a CA certificate + from the system trust store or from a specified PEM file. The default + value is false. + :type use_system_trust_store: object + :param allow_host_name_cn_mismatch: Specifies whether to require a + CA-issued SSL certificate name to match the host name of the server when + connecting over SSL. The default value is false. + :type allow_host_name_cn_mismatch: object + :param allow_self_signed_server_cert: Specifies whether to allow + self-signed certificates from the server. The default value is false. + :type allow_self_signed_server_cert: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'host': {'required': True}, + 'authentication_type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'host': {'key': 'typeProperties.host', 'type': 'object'}, + 'port': {'key': 'typeProperties.port', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'enable_ssl': {'key': 'typeProperties.enableSsl', 'type': 'object'}, + 'trusted_cert_path': {'key': 'typeProperties.trustedCertPath', 'type': 'object'}, + 'use_system_trust_store': {'key': 'typeProperties.useSystemTrustStore', 'type': 'object'}, + 'allow_host_name_cn_mismatch': {'key': 'typeProperties.allowHostNameCNMismatch', 'type': 'object'}, + 'allow_self_signed_server_cert': {'key': 'typeProperties.allowSelfSignedServerCert', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, host, authentication_type, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, port=None, username=None, password=None, enable_ssl=None, trusted_cert_path=None, use_system_trust_store=None, allow_host_name_cn_mismatch=None, allow_self_signed_server_cert=None, encrypted_credential=None, **kwargs) -> None: + super(ImpalaLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.host = host + self.port = port + self.authentication_type = authentication_type + self.username = username + self.password = password + self.enable_ssl = enable_ssl + self.trusted_cert_path = trusted_cert_path + self.use_system_trust_store = use_system_trust_store + self.allow_host_name_cn_mismatch = allow_host_name_cn_mismatch + self.allow_self_signed_server_cert = allow_self_signed_server_cert + self.encrypted_credential = encrypted_credential + self.type = 'Impala' + + +class ImpalaObjectDataset(Dataset): + """Impala server dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: This property will be retired. Please consider using + schema + table properties instead. + :type table_name: object + :param table: The table name of the Impala. Type: string (or Expression + with resultType string). + :type table: object + :param impala_object_dataset_schema: The schema name of the Impala. Type: + string (or Expression with resultType string). + :type impala_object_dataset_schema: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + 'table': {'key': 'typeProperties.table', 'type': 'object'}, + 'impala_object_dataset_schema': {'key': 'typeProperties.schema', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, table=None, impala_object_dataset_schema=None, **kwargs) -> None: + super(ImpalaObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.table = table + self.impala_object_dataset_schema = impala_object_dataset_schema + self.type = 'ImpalaObject' + + +class ImpalaSource(CopySource): + """A copy activity Impala server source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(ImpalaSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'ImpalaSource' + + +class InformixLinkedService(LinkedService): + """Informix linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: Required. The non-access credential portion of + the connection string as well as an optional encrypted credential. Type: + string, SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param authentication_type: Type of authentication used to connect to the + Informix as ODBC data store. Possible values are: Anonymous and Basic. + Type: string (or Expression with resultType string). + :type authentication_type: object + :param credential: The access credential portion of the connection string + specified in driver-specific property-value format. + :type credential: ~azure.mgmt.datafactory.models.SecretBase + :param user_name: User name for Basic authentication. Type: string (or + Expression with resultType string). + :type user_name: object + :param password: Password for Basic authentication. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'connection_string': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'object'}, + 'credential': {'key': 'typeProperties.credential', 'type': 'SecretBase'}, + 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, connection_string, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, authentication_type=None, credential=None, user_name=None, password=None, encrypted_credential=None, **kwargs) -> None: + super(InformixLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.connection_string = connection_string + self.authentication_type = authentication_type + self.credential = credential + self.user_name = user_name + self.password = password + self.encrypted_credential = encrypted_credential + self.type = 'Informix' + + +class InformixSink(CopySink): + """A copy activity Informix sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param pre_copy_script: A query to execute before starting the copy. Type: + string (or Expression with resultType string). + :type pre_copy_script: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'pre_copy_script': {'key': 'preCopyScript', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, max_concurrent_connections=None, pre_copy_script=None, **kwargs) -> None: + super(InformixSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.pre_copy_script = pre_copy_script + self.type = 'InformixSink' + + +class InformixSource(CopySource): + """A copy activity source for Informix. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: Database query. Type: string (or Expression with resultType + string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(InformixSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'InformixSource' + + +class InformixTableDataset(Dataset): + """The Informix table dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The Informix table name. Type: string (or Expression + with resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: + super(InformixTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.type = 'InformixTable' + + +class IntegrationRuntime(Model): + """Azure Data Factory nested object which serves as a compute resource for + activities. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SelfHostedIntegrationRuntime, ManagedIntegrationRuntime + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Integration runtime description. + :type description: str + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'SelfHosted': 'SelfHostedIntegrationRuntime', 'Managed': 'ManagedIntegrationRuntime'} + } + + def __init__(self, *, additional_properties=None, description: str=None, **kwargs) -> None: + super(IntegrationRuntime, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.description = description + self.type = None + + +class IntegrationRuntimeAuthKeys(Model): + """The integration runtime authentication keys. + + :param auth_key1: The primary integration runtime authentication key. + :type auth_key1: str + :param auth_key2: The secondary integration runtime authentication key. + :type auth_key2: str + """ + + _attribute_map = { + 'auth_key1': {'key': 'authKey1', 'type': 'str'}, + 'auth_key2': {'key': 'authKey2', 'type': 'str'}, + } + + def __init__(self, *, auth_key1: str=None, auth_key2: str=None, **kwargs) -> None: + super(IntegrationRuntimeAuthKeys, self).__init__(**kwargs) + self.auth_key1 = auth_key1 + self.auth_key2 = auth_key2 + + +class IntegrationRuntimeComputeProperties(Model): + """The compute resource properties for managed integration runtime. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param location: The location for managed integration runtime. The + supported regions could be found on + https://docs.microsoft.com/en-us/azure/data-factory/data-factory-data-movement-activities + :type location: str + :param node_size: The node size requirement to managed integration + runtime. + :type node_size: str + :param number_of_nodes: The required number of nodes for managed + integration runtime. + :type number_of_nodes: int + :param max_parallel_executions_per_node: Maximum parallel executions count + per node for managed integration runtime. + :type max_parallel_executions_per_node: int + :param v_net_properties: VNet properties for managed integration runtime. + :type v_net_properties: + ~azure.mgmt.datafactory.models.IntegrationRuntimeVNetProperties + """ + + _validation = { + 'number_of_nodes': {'minimum': 1}, + 'max_parallel_executions_per_node': {'minimum': 1}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'node_size': {'key': 'nodeSize', 'type': 'str'}, + 'number_of_nodes': {'key': 'numberOfNodes', 'type': 'int'}, + 'max_parallel_executions_per_node': {'key': 'maxParallelExecutionsPerNode', 'type': 'int'}, + 'v_net_properties': {'key': 'vNetProperties', 'type': 'IntegrationRuntimeVNetProperties'}, + } + + def __init__(self, *, additional_properties=None, location: str=None, node_size: str=None, number_of_nodes: int=None, max_parallel_executions_per_node: int=None, v_net_properties=None, **kwargs) -> None: + super(IntegrationRuntimeComputeProperties, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.location = location + self.node_size = node_size + self.number_of_nodes = number_of_nodes + self.max_parallel_executions_per_node = max_parallel_executions_per_node + self.v_net_properties = v_net_properties + + +class IntegrationRuntimeConnectionInfo(Model): + """Connection information for encrypting the on-premises data source + credentials. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar service_token: The token generated in service. Callers use this + token to authenticate to integration runtime. + :vartype service_token: str + :ivar identity_cert_thumbprint: The integration runtime SSL certificate + thumbprint. Click-Once application uses it to do server validation. + :vartype identity_cert_thumbprint: str + :ivar host_service_uri: The on-premises integration runtime host URL. + :vartype host_service_uri: str + :ivar version: The integration runtime version. + :vartype version: str + :ivar public_key: The public key for encrypting a credential when + transferring the credential to the integration runtime. + :vartype public_key: str + :ivar is_identity_cert_exprired: Whether the identity certificate is + expired. + :vartype is_identity_cert_exprired: bool + """ + + _validation = { + 'service_token': {'readonly': True}, + 'identity_cert_thumbprint': {'readonly': True}, + 'host_service_uri': {'readonly': True}, + 'version': {'readonly': True}, + 'public_key': {'readonly': True}, + 'is_identity_cert_exprired': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'service_token': {'key': 'serviceToken', 'type': 'str'}, + 'identity_cert_thumbprint': {'key': 'identityCertThumbprint', 'type': 'str'}, + 'host_service_uri': {'key': 'hostServiceUri', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'public_key': {'key': 'publicKey', 'type': 'str'}, + 'is_identity_cert_exprired': {'key': 'isIdentityCertExprired', 'type': 'bool'}, + } + + def __init__(self, *, additional_properties=None, **kwargs) -> None: + super(IntegrationRuntimeConnectionInfo, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.service_token = None + self.identity_cert_thumbprint = None + self.host_service_uri = None + self.version = None + self.public_key = None + self.is_identity_cert_exprired = None + + +class IntegrationRuntimeCustomSetupScriptProperties(Model): + """Custom setup script properties for a managed dedicated integration runtime. + + :param blob_container_uri: The URI of the Azure blob container that + contains the custom setup script. + :type blob_container_uri: str + :param sas_token: The SAS token of the Azure blob container. + :type sas_token: ~azure.mgmt.datafactory.models.SecureString + """ + + _attribute_map = { + 'blob_container_uri': {'key': 'blobContainerUri', 'type': 'str'}, + 'sas_token': {'key': 'sasToken', 'type': 'SecureString'}, + } + + def __init__(self, *, blob_container_uri: str=None, sas_token=None, **kwargs) -> None: + super(IntegrationRuntimeCustomSetupScriptProperties, self).__init__(**kwargs) + self.blob_container_uri = blob_container_uri + self.sas_token = sas_token + + +class IntegrationRuntimeDataProxyProperties(Model): + """Data proxy properties for a managed dedicated integration runtime. + + :param connect_via: The self-hosted integration runtime reference. + :type connect_via: ~azure.mgmt.datafactory.models.EntityReference + :param staging_linked_service: The staging linked service reference. + :type staging_linked_service: + ~azure.mgmt.datafactory.models.EntityReference + :param path: The path to contain the staged data in the Blob storage. + :type path: str + """ + + _attribute_map = { + 'connect_via': {'key': 'connectVia', 'type': 'EntityReference'}, + 'staging_linked_service': {'key': 'stagingLinkedService', 'type': 'EntityReference'}, + 'path': {'key': 'path', 'type': 'str'}, + } + + def __init__(self, *, connect_via=None, staging_linked_service=None, path: str=None, **kwargs) -> None: + super(IntegrationRuntimeDataProxyProperties, self).__init__(**kwargs) + self.connect_via = connect_via + self.staging_linked_service = staging_linked_service + self.path = path + + +class IntegrationRuntimeMonitoringData(Model): + """Get monitoring data response. + + :param name: Integration runtime name. + :type name: str + :param nodes: Integration runtime node monitoring data. + :type nodes: + list[~azure.mgmt.datafactory.models.IntegrationRuntimeNodeMonitoringData] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'nodes': {'key': 'nodes', 'type': '[IntegrationRuntimeNodeMonitoringData]'}, + } + + def __init__(self, *, name: str=None, nodes=None, **kwargs) -> None: + super(IntegrationRuntimeMonitoringData, self).__init__(**kwargs) + self.name = name + self.nodes = nodes + + +class IntegrationRuntimeNodeIpAddress(Model): + """The IP address of self-hosted integration runtime node. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar ip_address: The IP address of self-hosted integration runtime node. + :vartype ip_address: str + """ + + _validation = { + 'ip_address': {'readonly': True}, + } + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(IntegrationRuntimeNodeIpAddress, self).__init__(**kwargs) + self.ip_address = None + + +class IntegrationRuntimeNodeMonitoringData(Model): + """Monitoring data for integration runtime node. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar node_name: Name of the integration runtime node. + :vartype node_name: str + :ivar available_memory_in_mb: Available memory (MB) on the integration + runtime node. + :vartype available_memory_in_mb: int + :ivar cpu_utilization: CPU percentage on the integration runtime node. + :vartype cpu_utilization: int + :ivar concurrent_jobs_limit: Maximum concurrent jobs on the integration + runtime node. + :vartype concurrent_jobs_limit: int + :ivar concurrent_jobs_running: The number of jobs currently running on the + integration runtime node. + :vartype concurrent_jobs_running: int + :ivar max_concurrent_jobs: The maximum concurrent jobs in this integration + runtime. + :vartype max_concurrent_jobs: int + :ivar sent_bytes: Sent bytes on the integration runtime node. + :vartype sent_bytes: float + :ivar received_bytes: Received bytes on the integration runtime node. + :vartype received_bytes: float + """ + + _validation = { + 'node_name': {'readonly': True}, + 'available_memory_in_mb': {'readonly': True}, + 'cpu_utilization': {'readonly': True}, + 'concurrent_jobs_limit': {'readonly': True}, + 'concurrent_jobs_running': {'readonly': True}, + 'max_concurrent_jobs': {'readonly': True}, + 'sent_bytes': {'readonly': True}, + 'received_bytes': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'node_name': {'key': 'nodeName', 'type': 'str'}, + 'available_memory_in_mb': {'key': 'availableMemoryInMB', 'type': 'int'}, + 'cpu_utilization': {'key': 'cpuUtilization', 'type': 'int'}, + 'concurrent_jobs_limit': {'key': 'concurrentJobsLimit', 'type': 'int'}, + 'concurrent_jobs_running': {'key': 'concurrentJobsRunning', 'type': 'int'}, + 'max_concurrent_jobs': {'key': 'maxConcurrentJobs', 'type': 'int'}, + 'sent_bytes': {'key': 'sentBytes', 'type': 'float'}, + 'received_bytes': {'key': 'receivedBytes', 'type': 'float'}, + } + + def __init__(self, *, additional_properties=None, **kwargs) -> None: + super(IntegrationRuntimeNodeMonitoringData, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.node_name = None + self.available_memory_in_mb = None + self.cpu_utilization = None + self.concurrent_jobs_limit = None + self.concurrent_jobs_running = None + self.max_concurrent_jobs = None + self.sent_bytes = None + self.received_bytes = None + + +class IntegrationRuntimeReference(Model): + """Integration runtime reference type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. Type of integration runtime. Default value: + "IntegrationRuntimeReference" . + :vartype type: str + :param reference_name: Required. Reference integration runtime name. + :type reference_name: str + :param parameters: Arguments for integration runtime. + :type parameters: dict[str, object] + """ + + _validation = { + 'type': {'required': True, 'constant': True}, + 'reference_name': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'reference_name': {'key': 'referenceName', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{object}'}, + } + + type = "IntegrationRuntimeReference" + + def __init__(self, *, reference_name: str, parameters=None, **kwargs) -> None: + super(IntegrationRuntimeReference, self).__init__(**kwargs) + self.reference_name = reference_name + self.parameters = parameters + + +class IntegrationRuntimeRegenerateKeyParameters(Model): + """Parameters to regenerate the authentication key. + + :param key_name: The name of the authentication key to regenerate. + Possible values include: 'authKey1', 'authKey2' + :type key_name: str or + ~azure.mgmt.datafactory.models.IntegrationRuntimeAuthKeyName + """ + + _attribute_map = { + 'key_name': {'key': 'keyName', 'type': 'str'}, + } + + def __init__(self, *, key_name=None, **kwargs) -> None: + super(IntegrationRuntimeRegenerateKeyParameters, self).__init__(**kwargs) + self.key_name = key_name + + +class IntegrationRuntimeResource(SubResource): + """Integration runtime resource type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar etag: Etag identifies change in the resource. + :vartype etag: str + :param properties: Required. Integration runtime properties. + :type properties: ~azure.mgmt.datafactory.models.IntegrationRuntime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'IntegrationRuntime'}, + } + + def __init__(self, *, properties, **kwargs) -> None: + super(IntegrationRuntimeResource, self).__init__(**kwargs) + self.properties = properties + + +class IntegrationRuntimeSsisCatalogInfo(Model): + """Catalog information for managed dedicated integration runtime. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param catalog_server_endpoint: The catalog database server URL. + :type catalog_server_endpoint: str + :param catalog_admin_user_name: The administrator user name of catalog + database. + :type catalog_admin_user_name: str + :param catalog_admin_password: The password of the administrator user + account of the catalog database. + :type catalog_admin_password: ~azure.mgmt.datafactory.models.SecureString + :param catalog_pricing_tier: The pricing tier for the catalog database. + The valid values could be found in + https://azure.microsoft.com/en-us/pricing/details/sql-database/. Possible + values include: 'Basic', 'Standard', 'Premium', 'PremiumRS' + :type catalog_pricing_tier: str or + ~azure.mgmt.datafactory.models.IntegrationRuntimeSsisCatalogPricingTier + """ + + _validation = { + 'catalog_admin_user_name': {'max_length': 128, 'min_length': 1}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'catalog_server_endpoint': {'key': 'catalogServerEndpoint', 'type': 'str'}, + 'catalog_admin_user_name': {'key': 'catalogAdminUserName', 'type': 'str'}, + 'catalog_admin_password': {'key': 'catalogAdminPassword', 'type': 'SecureString'}, + 'catalog_pricing_tier': {'key': 'catalogPricingTier', 'type': 'str'}, + } + + def __init__(self, *, additional_properties=None, catalog_server_endpoint: str=None, catalog_admin_user_name: str=None, catalog_admin_password=None, catalog_pricing_tier=None, **kwargs) -> None: + super(IntegrationRuntimeSsisCatalogInfo, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.catalog_server_endpoint = catalog_server_endpoint + self.catalog_admin_user_name = catalog_admin_user_name + self.catalog_admin_password = catalog_admin_password + self.catalog_pricing_tier = catalog_pricing_tier + + +class IntegrationRuntimeSsisProperties(Model): + """SSIS properties for managed integration runtime. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param catalog_info: Catalog information for managed dedicated integration + runtime. + :type catalog_info: + ~azure.mgmt.datafactory.models.IntegrationRuntimeSsisCatalogInfo + :param license_type: License type for bringing your own license scenario. + Possible values include: 'BasePrice', 'LicenseIncluded' + :type license_type: str or + ~azure.mgmt.datafactory.models.IntegrationRuntimeLicenseType + :param custom_setup_script_properties: Custom setup script properties for + a managed dedicated integration runtime. + :type custom_setup_script_properties: + ~azure.mgmt.datafactory.models.IntegrationRuntimeCustomSetupScriptProperties + :param data_proxy_properties: Data proxy properties for a managed + dedicated integration runtime. + :type data_proxy_properties: + ~azure.mgmt.datafactory.models.IntegrationRuntimeDataProxyProperties + :param edition: The edition for the SSIS Integration Runtime. Possible + values include: 'Standard', 'Enterprise' + :type edition: str or + ~azure.mgmt.datafactory.models.IntegrationRuntimeEdition + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'catalog_info': {'key': 'catalogInfo', 'type': 'IntegrationRuntimeSsisCatalogInfo'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + 'custom_setup_script_properties': {'key': 'customSetupScriptProperties', 'type': 'IntegrationRuntimeCustomSetupScriptProperties'}, + 'data_proxy_properties': {'key': 'dataProxyProperties', 'type': 'IntegrationRuntimeDataProxyProperties'}, + 'edition': {'key': 'edition', 'type': 'str'}, + } + + def __init__(self, *, additional_properties=None, catalog_info=None, license_type=None, custom_setup_script_properties=None, data_proxy_properties=None, edition=None, **kwargs) -> None: + super(IntegrationRuntimeSsisProperties, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.catalog_info = catalog_info + self.license_type = license_type + self.custom_setup_script_properties = custom_setup_script_properties + self.data_proxy_properties = data_proxy_properties + self.edition = edition + + +class IntegrationRuntimeStatus(Model): + """Integration runtime status. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SelfHostedIntegrationRuntimeStatus, + ManagedIntegrationRuntimeStatus + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar data_factory_name: The data factory name which the integration + runtime belong to. + :vartype data_factory_name: str + :ivar state: The state of integration runtime. Possible values include: + 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', + 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied' + :vartype state: str or + ~azure.mgmt.datafactory.models.IntegrationRuntimeState + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'data_factory_name': {'readonly': True}, + 'state': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'data_factory_name': {'key': 'dataFactoryName', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'SelfHosted': 'SelfHostedIntegrationRuntimeStatus', 'Managed': 'ManagedIntegrationRuntimeStatus'} + } + + def __init__(self, *, additional_properties=None, **kwargs) -> None: + super(IntegrationRuntimeStatus, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.data_factory_name = None + self.state = None + self.type = None + + +class IntegrationRuntimeStatusListResponse(Model): + """A list of integration runtime status. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of integration runtime status. + :type value: + list[~azure.mgmt.datafactory.models.IntegrationRuntimeStatusResponse] + :param next_link: The link to the next page of results, if any remaining + results exist. + :type next_link: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IntegrationRuntimeStatusResponse]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value, next_link: str=None, **kwargs) -> None: + super(IntegrationRuntimeStatusListResponse, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class IntegrationRuntimeStatusResponse(Model): + """Integration runtime status response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar name: The integration runtime name. + :vartype name: str + :param properties: Required. Integration runtime properties. + :type properties: ~azure.mgmt.datafactory.models.IntegrationRuntimeStatus + """ + + _validation = { + 'name': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'IntegrationRuntimeStatus'}, + } + + def __init__(self, *, properties, **kwargs) -> None: + super(IntegrationRuntimeStatusResponse, self).__init__(**kwargs) + self.name = None + self.properties = properties + + +class IntegrationRuntimeVNetProperties(Model): + """VNet properties for managed integration runtime. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param v_net_id: The ID of the VNet that this integration runtime will + join. + :type v_net_id: str + :param subnet: The name of the subnet this integration runtime will join. + :type subnet: str + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'v_net_id': {'key': 'vNetId', 'type': 'str'}, + 'subnet': {'key': 'subnet', 'type': 'str'}, + } + + def __init__(self, *, additional_properties=None, v_net_id: str=None, subnet: str=None, **kwargs) -> None: + super(IntegrationRuntimeVNetProperties, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.v_net_id = v_net_id + self.subnet = subnet + + +class JiraLinkedService(LinkedService): + """Jira Service linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param host: Required. The IP address or host name of the Jira service. + (e.g. jira.example.com) + :type host: object + :param port: The TCP port that the Jira server uses to listen for client + connections. The default value is 443 if connecting through HTTPS, or 8080 + if connecting through HTTP. + :type port: object + :param username: Required. The user name that you use to access Jira + Service. + :type username: object + :param password: The password corresponding to the user name that you + provided in the username field. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param use_encrypted_endpoints: Specifies whether the data source + endpoints are encrypted using HTTPS. The default value is true. + :type use_encrypted_endpoints: object + :param use_host_verification: Specifies whether to require the host name + in the server's certificate to match the host name of the server when + connecting over SSL. The default value is true. + :type use_host_verification: object + :param use_peer_verification: Specifies whether to verify the identity of + the server when connecting over SSL. The default value is true. + :type use_peer_verification: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'host': {'required': True}, + 'username': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'host': {'key': 'typeProperties.host', 'type': 'object'}, + 'port': {'key': 'typeProperties.port', 'type': 'object'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, + 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, + 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, host, username, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, port=None, password=None, use_encrypted_endpoints=None, use_host_verification=None, use_peer_verification=None, encrypted_credential=None, **kwargs) -> None: + super(JiraLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.host = host + self.port = port + self.username = username + self.password = password + self.use_encrypted_endpoints = use_encrypted_endpoints + self.use_host_verification = use_host_verification + self.use_peer_verification = use_peer_verification + self.encrypted_credential = encrypted_credential + self.type = 'Jira' + + +class JiraObjectDataset(Dataset): + """Jira Service dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: + super(JiraObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.type = 'JiraObject' + + +class JiraSource(CopySource): + """A copy activity Jira Service source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(JiraSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'JiraSource' + + +class JsonFormat(DatasetStorageFormat): + """The data stored in JSON format. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param serializer: Serializer. Type: string (or Expression with resultType + string). + :type serializer: object + :param deserializer: Deserializer. Type: string (or Expression with + resultType string). + :type deserializer: object + :param type: Required. Constant filled by server. + :type type: str + :param file_pattern: File pattern of JSON. To be more specific, the way of + separating a collection of JSON objects. The default value is + 'setOfObjects'. It is case-sensitive. + :type file_pattern: object + :param nesting_separator: The character used to separate nesting levels. + Default value is '.' (dot). Type: string (or Expression with resultType + string). + :type nesting_separator: object + :param encoding_name: The code page name of the preferred encoding. If not + provided, the default value is 'utf-8', unless the byte order mark (BOM) + denotes another Unicode encoding. The full list of supported values can be + found in the 'Name' column of the table of encodings in the following + reference: https://go.microsoft.com/fwlink/?linkid=861078. Type: string + (or Expression with resultType string). + :type encoding_name: object + :param json_node_reference: The JSONPath of the JSON array element to be + flattened. Example: "$.ArrayPath". Type: string (or Expression with + resultType string). + :type json_node_reference: object + :param json_path_definition: The JSONPath definition for each column + mapping with a customized column name to extract data from JSON file. For + fields under root object, start with "$"; for fields inside the array + chosen by jsonNodeReference property, start from the array element. + Example: {"Column1": "$.Column1Path", "Column2": "Column2PathInArray"}. + Type: object (or Expression with resultType object). + :type json_path_definition: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'serializer': {'key': 'serializer', 'type': 'object'}, + 'deserializer': {'key': 'deserializer', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'file_pattern': {'key': 'filePattern', 'type': 'object'}, + 'nesting_separator': {'key': 'nestingSeparator', 'type': 'object'}, + 'encoding_name': {'key': 'encodingName', 'type': 'object'}, + 'json_node_reference': {'key': 'jsonNodeReference', 'type': 'object'}, + 'json_path_definition': {'key': 'jsonPathDefinition', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, serializer=None, deserializer=None, file_pattern=None, nesting_separator=None, encoding_name=None, json_node_reference=None, json_path_definition=None, **kwargs) -> None: + super(JsonFormat, self).__init__(additional_properties=additional_properties, serializer=serializer, deserializer=deserializer, **kwargs) + self.file_pattern = file_pattern + self.nesting_separator = nesting_separator + self.encoding_name = encoding_name + self.json_node_reference = json_node_reference + self.json_path_definition = json_path_definition + self.type = 'JsonFormat' + + +class LinkedIntegrationRuntime(Model): + """The linked integration runtime information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the linked integration runtime. + :vartype name: str + :ivar subscription_id: The subscription ID for which the linked + integration runtime belong to. + :vartype subscription_id: str + :ivar data_factory_name: The name of the data factory for which the linked + integration runtime belong to. + :vartype data_factory_name: str + :ivar data_factory_location: The location of the data factory for which + the linked integration runtime belong to. + :vartype data_factory_location: str + :ivar create_time: The creating time of the linked integration runtime. + :vartype create_time: datetime + """ + + _validation = { + 'name': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'data_factory_name': {'readonly': True}, + 'data_factory_location': {'readonly': True}, + 'create_time': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'data_factory_name': {'key': 'dataFactoryName', 'type': 'str'}, + 'data_factory_location': {'key': 'dataFactoryLocation', 'type': 'str'}, + 'create_time': {'key': 'createTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(LinkedIntegrationRuntime, self).__init__(**kwargs) + self.name = None + self.subscription_id = None + self.data_factory_name = None + self.data_factory_location = None + self.create_time = None + + +class LinkedIntegrationRuntimeType(Model): + """The base definition of a linked integration runtime. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: LinkedIntegrationRuntimeRbacAuthorization, + LinkedIntegrationRuntimeKeyAuthorization + + All required parameters must be populated in order to send to Azure. + + :param authorization_type: Required. Constant filled by server. + :type authorization_type: str + """ + + _validation = { + 'authorization_type': {'required': True}, + } + + _attribute_map = { + 'authorization_type': {'key': 'authorizationType', 'type': 'str'}, + } + + _subtype_map = { + 'authorization_type': {'RBAC': 'LinkedIntegrationRuntimeRbacAuthorization', 'Key': 'LinkedIntegrationRuntimeKeyAuthorization'} + } + + def __init__(self, **kwargs) -> None: + super(LinkedIntegrationRuntimeType, self).__init__(**kwargs) + self.authorization_type = None + + +class LinkedIntegrationRuntimeKeyAuthorization(LinkedIntegrationRuntimeType): + """The key authorization type integration runtime. + + All required parameters must be populated in order to send to Azure. + + :param authorization_type: Required. Constant filled by server. + :type authorization_type: str + :param key: Required. The key used for authorization. + :type key: ~azure.mgmt.datafactory.models.SecureString + """ + + _validation = { + 'authorization_type': {'required': True}, + 'key': {'required': True}, + } + + _attribute_map = { + 'authorization_type': {'key': 'authorizationType', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'SecureString'}, + } + + def __init__(self, *, key, **kwargs) -> None: + super(LinkedIntegrationRuntimeKeyAuthorization, self).__init__(**kwargs) + self.key = key + self.authorization_type = 'Key' + + +class LinkedIntegrationRuntimeRbacAuthorization(LinkedIntegrationRuntimeType): + """The role based access control (RBAC) authorization type integration + runtime. + + All required parameters must be populated in order to send to Azure. + + :param authorization_type: Required. Constant filled by server. + :type authorization_type: str + :param resource_id: Required. The resource identifier of the integration + runtime to be shared. + :type resource_id: str + """ + + _validation = { + 'authorization_type': {'required': True}, + 'resource_id': {'required': True}, + } + + _attribute_map = { + 'authorization_type': {'key': 'authorizationType', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + } + + def __init__(self, *, resource_id: str, **kwargs) -> None: + super(LinkedIntegrationRuntimeRbacAuthorization, self).__init__(**kwargs) + self.resource_id = resource_id + self.authorization_type = 'RBAC' + + +class LinkedIntegrationRuntimeRequest(Model): + """Data factory name for linked integration runtime request. + + All required parameters must be populated in order to send to Azure. + + :param linked_factory_name: Required. The data factory name for linked + integration runtime. + :type linked_factory_name: str + """ + + _validation = { + 'linked_factory_name': {'required': True}, + } + + _attribute_map = { + 'linked_factory_name': {'key': 'factoryName', 'type': 'str'}, + } + + def __init__(self, *, linked_factory_name: str, **kwargs) -> None: + super(LinkedIntegrationRuntimeRequest, self).__init__(**kwargs) + self.linked_factory_name = linked_factory_name + + +class LinkedServiceReference(Model): + """Linked service reference type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. Linked service reference type. Default value: + "LinkedServiceReference" . + :vartype type: str + :param reference_name: Required. Reference LinkedService name. + :type reference_name: str + :param parameters: Arguments for LinkedService. + :type parameters: dict[str, object] + """ + + _validation = { + 'type': {'required': True, 'constant': True}, + 'reference_name': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'reference_name': {'key': 'referenceName', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{object}'}, + } + + type = "LinkedServiceReference" + + def __init__(self, *, reference_name: str, parameters=None, **kwargs) -> None: + super(LinkedServiceReference, self).__init__(**kwargs) + self.reference_name = reference_name + self.parameters = parameters + + +class LinkedServiceResource(SubResource): + """Linked service resource type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar etag: Etag identifies change in the resource. + :vartype etag: str + :param properties: Required. Properties of linked service. + :type properties: ~azure.mgmt.datafactory.models.LinkedService + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'LinkedService'}, + } + + def __init__(self, *, properties, **kwargs) -> None: + super(LinkedServiceResource, self).__init__(**kwargs) + self.properties = properties + + +class LogStorageSettings(Model): + """Log storage settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param linked_service_name: Required. Log storage linked service + reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param path: The path to storage for storing detailed logs of activity + execution. Type: string (or Expression with resultType string). + :type path: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'path': {'key': 'path', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, path=None, **kwargs) -> None: + super(LogStorageSettings, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.linked_service_name = linked_service_name + self.path = path + + +class LookupActivity(ExecutionActivity): + """Lookup activity. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param source: Required. Dataset-specific source properties, same as copy + activity source. + :type source: ~azure.mgmt.datafactory.models.CopySource + :param dataset: Required. Lookup activity dataset reference. + :type dataset: ~azure.mgmt.datafactory.models.DatasetReference + :param first_row_only: Whether to return first row or all rows. Default + value is true. Type: boolean (or Expression with resultType boolean). + :type first_row_only: object + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'source': {'required': True}, + 'dataset': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'source': {'key': 'typeProperties.source', 'type': 'CopySource'}, + 'dataset': {'key': 'typeProperties.dataset', 'type': 'DatasetReference'}, + 'first_row_only': {'key': 'typeProperties.firstRowOnly', 'type': 'object'}, + } + + def __init__(self, *, name: str, source, dataset, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, first_row_only=None, **kwargs) -> None: + super(LookupActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) + self.source = source + self.dataset = dataset + self.first_row_only = first_row_only + self.type = 'Lookup' + + +class MagentoLinkedService(LinkedService): + """Magento server linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param host: Required. The URL of the Magento instance. (i.e. + 192.168.222.110/magento3) + :type host: object + :param access_token: The access token from Magento. + :type access_token: ~azure.mgmt.datafactory.models.SecretBase + :param use_encrypted_endpoints: Specifies whether the data source + endpoints are encrypted using HTTPS. The default value is true. + :type use_encrypted_endpoints: object + :param use_host_verification: Specifies whether to require the host name + in the server's certificate to match the host name of the server when + connecting over SSL. The default value is true. + :type use_host_verification: object + :param use_peer_verification: Specifies whether to verify the identity of + the server when connecting over SSL. The default value is true. + :type use_peer_verification: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'host': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'host': {'key': 'typeProperties.host', 'type': 'object'}, + 'access_token': {'key': 'typeProperties.accessToken', 'type': 'SecretBase'}, + 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, + 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, + 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, host, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, access_token=None, use_encrypted_endpoints=None, use_host_verification=None, use_peer_verification=None, encrypted_credential=None, **kwargs) -> None: + super(MagentoLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.host = host + self.access_token = access_token + self.use_encrypted_endpoints = use_encrypted_endpoints + self.use_host_verification = use_host_verification + self.use_peer_verification = use_peer_verification + self.encrypted_credential = encrypted_credential + self.type = 'Magento' + + +class MagentoObjectDataset(Dataset): + """Magento server dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: + super(MagentoObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.type = 'MagentoObject' + + +class MagentoSource(CopySource): + """A copy activity Magento server source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(MagentoSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'MagentoSource' + + +class ManagedIntegrationRuntime(IntegrationRuntime): + """Managed integration runtime, including managed elastic and managed + dedicated integration runtimes. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Integration runtime description. + :type description: str + :param type: Required. Constant filled by server. + :type type: str + :ivar state: Integration runtime state, only valid for managed dedicated + integration runtime. Possible values include: 'Initial', 'Stopped', + 'Started', 'Starting', 'Stopping', 'NeedRegistration', 'Online', + 'Limited', 'Offline', 'AccessDenied' + :vartype state: str or + ~azure.mgmt.datafactory.models.IntegrationRuntimeState + :param compute_properties: The compute resource for managed integration + runtime. + :type compute_properties: + ~azure.mgmt.datafactory.models.IntegrationRuntimeComputeProperties + :param ssis_properties: SSIS properties for managed integration runtime. + :type ssis_properties: + ~azure.mgmt.datafactory.models.IntegrationRuntimeSsisProperties + """ + + _validation = { + 'type': {'required': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'compute_properties': {'key': 'typeProperties.computeProperties', 'type': 'IntegrationRuntimeComputeProperties'}, + 'ssis_properties': {'key': 'typeProperties.ssisProperties', 'type': 'IntegrationRuntimeSsisProperties'}, + } + + def __init__(self, *, additional_properties=None, description: str=None, compute_properties=None, ssis_properties=None, **kwargs) -> None: + super(ManagedIntegrationRuntime, self).__init__(additional_properties=additional_properties, description=description, **kwargs) + self.state = None + self.compute_properties = compute_properties + self.ssis_properties = ssis_properties + self.type = 'Managed' + + +class ManagedIntegrationRuntimeError(Model): + """Error definition for managed integration runtime. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar time: The time when the error occurred. + :vartype time: datetime + :ivar code: Error code. + :vartype code: str + :ivar parameters: Managed integration runtime error parameters. + :vartype parameters: list[str] + :ivar message: Error message. + :vartype message: str + """ + + _validation = { + 'time': {'readonly': True}, + 'code': {'readonly': True}, + 'parameters': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'time': {'key': 'time', 'type': 'iso-8601'}, + 'code': {'key': 'code', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[str]'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, additional_properties=None, **kwargs) -> None: + super(ManagedIntegrationRuntimeError, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.time = None + self.code = None + self.parameters = None + self.message = None + + +class ManagedIntegrationRuntimeNode(Model): + """Properties of integration runtime node. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar node_id: The managed integration runtime node id. + :vartype node_id: str + :ivar status: The managed integration runtime node status. Possible values + include: 'Starting', 'Available', 'Recycling', 'Unavailable' + :vartype status: str or + ~azure.mgmt.datafactory.models.ManagedIntegrationRuntimeNodeStatus + :param errors: The errors that occurred on this integration runtime node. + :type errors: + list[~azure.mgmt.datafactory.models.ManagedIntegrationRuntimeError] + """ + + _validation = { + 'node_id': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'node_id': {'key': 'nodeId', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ManagedIntegrationRuntimeError]'}, + } + + def __init__(self, *, additional_properties=None, errors=None, **kwargs) -> None: + super(ManagedIntegrationRuntimeNode, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.node_id = None + self.status = None + self.errors = errors + + +class ManagedIntegrationRuntimeOperationResult(Model): + """Properties of managed integration runtime operation result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar type: The operation type. Could be start or stop. + :vartype type: str + :ivar start_time: The start time of the operation. + :vartype start_time: datetime + :ivar result: The operation result. + :vartype result: str + :ivar error_code: The error code. + :vartype error_code: str + :ivar parameters: Managed integration runtime error parameters. + :vartype parameters: list[str] + :ivar activity_id: The activity id for the operation request. + :vartype activity_id: str + """ + + _validation = { + 'type': {'readonly': True}, + 'start_time': {'readonly': True}, + 'result': {'readonly': True}, + 'error_code': {'readonly': True}, + 'parameters': {'readonly': True}, + 'activity_id': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'result': {'key': 'result', 'type': 'str'}, + 'error_code': {'key': 'errorCode', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[str]'}, + 'activity_id': {'key': 'activityId', 'type': 'str'}, + } + + def __init__(self, *, additional_properties=None, **kwargs) -> None: + super(ManagedIntegrationRuntimeOperationResult, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.type = None + self.start_time = None + self.result = None + self.error_code = None + self.parameters = None + self.activity_id = None + + +class ManagedIntegrationRuntimeStatus(IntegrationRuntimeStatus): + """Managed integration runtime status. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar data_factory_name: The data factory name which the integration + runtime belong to. + :vartype data_factory_name: str + :ivar state: The state of integration runtime. Possible values include: + 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', + 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied' + :vartype state: str or + ~azure.mgmt.datafactory.models.IntegrationRuntimeState + :param type: Required. Constant filled by server. + :type type: str + :ivar create_time: The time at which the integration runtime was created, + in ISO8601 format. + :vartype create_time: datetime + :ivar nodes: The list of nodes for managed integration runtime. + :vartype nodes: + list[~azure.mgmt.datafactory.models.ManagedIntegrationRuntimeNode] + :ivar other_errors: The errors that occurred on this integration runtime. + :vartype other_errors: + list[~azure.mgmt.datafactory.models.ManagedIntegrationRuntimeError] + :ivar last_operation: The last operation result that occurred on this + integration runtime. + :vartype last_operation: + ~azure.mgmt.datafactory.models.ManagedIntegrationRuntimeOperationResult + """ + + _validation = { + 'data_factory_name': {'readonly': True}, + 'state': {'readonly': True}, + 'type': {'required': True}, + 'create_time': {'readonly': True}, + 'nodes': {'readonly': True}, + 'other_errors': {'readonly': True}, + 'last_operation': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'data_factory_name': {'key': 'dataFactoryName', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'create_time': {'key': 'typeProperties.createTime', 'type': 'iso-8601'}, + 'nodes': {'key': 'typeProperties.nodes', 'type': '[ManagedIntegrationRuntimeNode]'}, + 'other_errors': {'key': 'typeProperties.otherErrors', 'type': '[ManagedIntegrationRuntimeError]'}, + 'last_operation': {'key': 'typeProperties.lastOperation', 'type': 'ManagedIntegrationRuntimeOperationResult'}, + } + + def __init__(self, *, additional_properties=None, **kwargs) -> None: + super(ManagedIntegrationRuntimeStatus, self).__init__(additional_properties=additional_properties, **kwargs) + self.create_time = None + self.nodes = None + self.other_errors = None + self.last_operation = None + self.type = 'Managed' + + +class MariaDBLinkedService(LinkedService): + """MariaDB server linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: An ODBC connection string. Type: string, + SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param pwd: The Azure key vault secret reference of password in connection + string. + :type pwd: ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'pwd': {'key': 'typeProperties.pwd', 'type': 'AzureKeyVaultSecretReference'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, connection_string=None, pwd=None, encrypted_credential=None, **kwargs) -> None: + super(MariaDBLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.connection_string = connection_string + self.pwd = pwd + self.encrypted_credential = encrypted_credential + self.type = 'MariaDB' + + +class MariaDBSource(CopySource): + """A copy activity MariaDB server source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(MariaDBSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'MariaDBSource' + + +class MariaDBTableDataset(Dataset): + """MariaDB server dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: + super(MariaDBTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.type = 'MariaDBTable' + + +class MarketoLinkedService(LinkedService): + """Marketo server linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param endpoint: Required. The endpoint of the Marketo server. (i.e. + 123-ABC-321.mktorest.com) + :type endpoint: object + :param client_id: Required. The client Id of your Marketo service. + :type client_id: object + :param client_secret: The client secret of your Marketo service. + :type client_secret: ~azure.mgmt.datafactory.models.SecretBase + :param use_encrypted_endpoints: Specifies whether the data source + endpoints are encrypted using HTTPS. The default value is true. + :type use_encrypted_endpoints: object + :param use_host_verification: Specifies whether to require the host name + in the server's certificate to match the host name of the server when + connecting over SSL. The default value is true. + :type use_host_verification: object + :param use_peer_verification: Specifies whether to verify the identity of + the server when connecting over SSL. The default value is true. + :type use_peer_verification: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'endpoint': {'required': True}, + 'client_id': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'endpoint': {'key': 'typeProperties.endpoint', 'type': 'object'}, + 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, + 'client_secret': {'key': 'typeProperties.clientSecret', 'type': 'SecretBase'}, + 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, + 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, + 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, endpoint, client_id, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, client_secret=None, use_encrypted_endpoints=None, use_host_verification=None, use_peer_verification=None, encrypted_credential=None, **kwargs) -> None: + super(MarketoLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.endpoint = endpoint + self.client_id = client_id + self.client_secret = client_secret + self.use_encrypted_endpoints = use_encrypted_endpoints + self.use_host_verification = use_host_verification + self.use_peer_verification = use_peer_verification + self.encrypted_credential = encrypted_credential + self.type = 'Marketo' + + +class MarketoObjectDataset(Dataset): + """Marketo server dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: + super(MarketoObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.type = 'MarketoObject' + + +class MarketoSource(CopySource): + """A copy activity Marketo server source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(MarketoSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'MarketoSource' + + +class MicrosoftAccessLinkedService(LinkedService): + """Microsoft Access linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: Required. The non-access credential portion of + the connection string as well as an optional encrypted credential. Type: + string, SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param authentication_type: Type of authentication used to connect to the + Microsoft Access as ODBC data store. Possible values are: Anonymous and + Basic. Type: string (or Expression with resultType string). + :type authentication_type: object + :param credential: The access credential portion of the connection string + specified in driver-specific property-value format. + :type credential: ~azure.mgmt.datafactory.models.SecretBase + :param user_name: User name for Basic authentication. Type: string (or + Expression with resultType string). + :type user_name: object + :param password: Password for Basic authentication. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'connection_string': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'object'}, + 'credential': {'key': 'typeProperties.credential', 'type': 'SecretBase'}, + 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, connection_string, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, authentication_type=None, credential=None, user_name=None, password=None, encrypted_credential=None, **kwargs) -> None: + super(MicrosoftAccessLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.connection_string = connection_string + self.authentication_type = authentication_type + self.credential = credential + self.user_name = user_name + self.password = password + self.encrypted_credential = encrypted_credential + self.type = 'MicrosoftAccess' + + +class MicrosoftAccessSink(CopySink): + """A copy activity Microsoft Access sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param pre_copy_script: A query to execute before starting the copy. Type: + string (or Expression with resultType string). + :type pre_copy_script: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'pre_copy_script': {'key': 'preCopyScript', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, max_concurrent_connections=None, pre_copy_script=None, **kwargs) -> None: + super(MicrosoftAccessSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.pre_copy_script = pre_copy_script + self.type = 'MicrosoftAccessSink' + + +class MicrosoftAccessSource(CopySource): + """A copy activity source for Microsoft Access. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: Database query. Type: string (or Expression with resultType + string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(MicrosoftAccessSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'MicrosoftAccessSource' + + +class MicrosoftAccessTableDataset(Dataset): + """The Microsoft Access table dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The Microsoft Access table name. Type: string (or + Expression with resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: + super(MicrosoftAccessTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.type = 'MicrosoftAccessTable' + + +class MongoDbCollectionDataset(Dataset): + """The MongoDB database dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param collection_name: Required. The table name of the MongoDB database. + Type: string (or Expression with resultType string). + :type collection_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + 'collection_name': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'collection_name': {'key': 'typeProperties.collectionName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, collection_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, **kwargs) -> None: + super(MongoDbCollectionDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.collection_name = collection_name + self.type = 'MongoDbCollection' + + +class MongoDbCursorMethodsProperties(Model): + """Cursor methods for Mongodb query. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param project: Specifies the fields to return in the documents that match + the query filter. To return all fields in the matching documents, omit + this parameter. Type: string (or Expression with resultType string). + :type project: object + :param sort: Specifies the order in which the query returns matching + documents. Type: string (or Expression with resultType string). Type: + string (or Expression with resultType string). + :type sort: object + :param skip: Specifies the how many documents skipped and where MongoDB + begins returning results. This approach may be useful in implementing + paginated results. Type: integer (or Expression with resultType integer). + :type skip: object + :param limit: Specifies the maximum number of documents the server + returns. limit() is analogous to the LIMIT statement in a SQL database. + Type: integer (or Expression with resultType integer). + :type limit: object + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'project': {'key': 'project', 'type': 'object'}, + 'sort': {'key': 'sort', 'type': 'object'}, + 'skip': {'key': 'skip', 'type': 'object'}, + 'limit': {'key': 'limit', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, project=None, sort=None, skip=None, limit=None, **kwargs) -> None: + super(MongoDbCursorMethodsProperties, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.project = project + self.sort = sort + self.skip = skip + self.limit = limit + + +class MongoDbLinkedService(LinkedService): + """Linked service for MongoDb data source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param server: Required. The IP address or server name of the MongoDB + server. Type: string (or Expression with resultType string). + :type server: object + :param authentication_type: The authentication type to be used to connect + to the MongoDB database. Possible values include: 'Basic', 'Anonymous' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.MongoDbAuthenticationType + :param database_name: Required. The name of the MongoDB database that you + want to access. Type: string (or Expression with resultType string). + :type database_name: object + :param username: Username for authentication. Type: string (or Expression + with resultType string). + :type username: object + :param password: Password for authentication. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param auth_source: Database to verify the username and password. Type: + string (or Expression with resultType string). + :type auth_source: object + :param port: The TCP port number that the MongoDB server uses to listen + for client connections. The default value is 27017. Type: integer (or + Expression with resultType integer), minimum: 0. + :type port: object + :param enable_ssl: Specifies whether the connections to the server are + encrypted using SSL. The default value is false. Type: boolean (or + Expression with resultType boolean). + :type enable_ssl: object + :param allow_self_signed_server_cert: Specifies whether to allow + self-signed certificates from the server. The default value is false. + Type: boolean (or Expression with resultType boolean). + :type allow_self_signed_server_cert: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'server': {'required': True}, + 'database_name': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server': {'key': 'typeProperties.server', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'database_name': {'key': 'typeProperties.databaseName', 'type': 'object'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'auth_source': {'key': 'typeProperties.authSource', 'type': 'object'}, + 'port': {'key': 'typeProperties.port', 'type': 'object'}, + 'enable_ssl': {'key': 'typeProperties.enableSsl', 'type': 'object'}, + 'allow_self_signed_server_cert': {'key': 'typeProperties.allowSelfSignedServerCert', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, server, database_name, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, authentication_type=None, username=None, password=None, auth_source=None, port=None, enable_ssl=None, allow_self_signed_server_cert=None, encrypted_credential=None, **kwargs) -> None: + super(MongoDbLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.server = server + self.authentication_type = authentication_type + self.database_name = database_name + self.username = username + self.password = password + self.auth_source = auth_source + self.port = port + self.enable_ssl = enable_ssl + self.allow_self_signed_server_cert = allow_self_signed_server_cert + self.encrypted_credential = encrypted_credential + self.type = 'MongoDb' + + +class MongoDbSource(CopySource): + """A copy activity source for a MongoDB database. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: Database query. Should be a SQL-92 query expression. Type: + string (or Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(MongoDbSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'MongoDbSource' + + +class MongoDbV2CollectionDataset(Dataset): + """The MongoDB database dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param collection: Required. The collection name of the MongoDB database. + Type: string (or Expression with resultType string). + :type collection: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + 'collection': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'collection': {'key': 'typeProperties.collection', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, collection, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, **kwargs) -> None: + super(MongoDbV2CollectionDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.collection = collection + self.type = 'MongoDbV2Collection' + + +class MongoDbV2LinkedService(LinkedService): + """Linked service for MongoDB data source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: Required. The MongoDB connection string. Type: + string, SecureString or AzureKeyVaultSecretReference. Type: string, + SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param database: Required. The name of the MongoDB database that you want + to access. Type: string (or Expression with resultType string). + :type database: object + """ + + _validation = { + 'type': {'required': True}, + 'connection_string': {'required': True}, + 'database': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'database': {'key': 'typeProperties.database', 'type': 'object'}, + } + + def __init__(self, *, connection_string, database, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, **kwargs) -> None: + super(MongoDbV2LinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.connection_string = connection_string + self.database = database + self.type = 'MongoDbV2' + + +class MongoDbV2Source(CopySource): + """A copy activity source for a MongoDB database. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param filter: Specifies selection filter using query operators. To return + all documents in a collection, omit this parameter or pass an empty + document ({}). Type: string (or Expression with resultType string). + :type filter: object + :param cursor_methods: Cursor methods for Mongodb query + :type cursor_methods: + ~azure.mgmt.datafactory.models.MongoDbCursorMethodsProperties + :param batch_size: Specifies the number of documents to return in each + batch of the response from MongoDB instance. In most cases, modifying the + batch size will not affect the user or the application. This property's + main purpose is to avoid hit the limitation of response size. Type: + integer (or Expression with resultType integer). + :type batch_size: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'filter': {'key': 'filter', 'type': 'object'}, + 'cursor_methods': {'key': 'cursorMethods', 'type': 'MongoDbCursorMethodsProperties'}, + 'batch_size': {'key': 'batchSize', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, filter=None, cursor_methods=None, batch_size=None, **kwargs) -> None: + super(MongoDbV2Source, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.filter = filter + self.cursor_methods = cursor_methods + self.batch_size = batch_size + self.type = 'MongoDbV2Source' + + +class MySqlLinkedService(LinkedService): + """Linked service for MySQL data source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: Required. The connection string. + :type connection_string: ~azure.mgmt.datafactory.models.SecretBase + :param password: The Azure key vault secret reference of password in + connection string. + :type password: + ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'connection_string': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'SecretBase'}, + 'password': {'key': 'typeProperties.password', 'type': 'AzureKeyVaultSecretReference'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, connection_string, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, password=None, encrypted_credential=None, **kwargs) -> None: + super(MySqlLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.connection_string = connection_string + self.password = password + self.encrypted_credential = encrypted_credential + self.type = 'MySql' + + +class MySqlSource(CopySource): + """A copy activity source for MySQL databases. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: Database query. Type: string (or Expression with resultType + string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(MySqlSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'MySqlSource' + + +class MySqlTableDataset(Dataset): + """The MySQL table dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The MySQL table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: + super(MySqlTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.type = 'MySqlTable' + + +class NetezzaLinkedService(LinkedService): + """Netezza linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: An ODBC connection string. Type: string, + SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param pwd: The Azure key vault secret reference of password in connection + string. + :type pwd: ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'pwd': {'key': 'typeProperties.pwd', 'type': 'AzureKeyVaultSecretReference'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, connection_string=None, pwd=None, encrypted_credential=None, **kwargs) -> None: + super(NetezzaLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.connection_string = connection_string + self.pwd = pwd + self.encrypted_credential = encrypted_credential + self.type = 'Netezza' + + +class NetezzaPartitionSettings(Model): + """The settings that will be leveraged for Netezza source partitioning. + + :param partition_column_name: The name of the column in integer type that + will be used for proceeding range partitioning. Type: string (or + Expression with resultType string). + :type partition_column_name: object + :param partition_upper_bound: The maximum value of column specified in + partitionColumnName that will be used for proceeding range partitioning. + Type: string (or Expression with resultType string). + :type partition_upper_bound: object + :param partition_lower_bound: The minimum value of column specified in + partitionColumnName that will be used for proceeding range partitioning. + Type: string (or Expression with resultType string). + :type partition_lower_bound: object + """ + + _attribute_map = { + 'partition_column_name': {'key': 'partitionColumnName', 'type': 'object'}, + 'partition_upper_bound': {'key': 'partitionUpperBound', 'type': 'object'}, + 'partition_lower_bound': {'key': 'partitionLowerBound', 'type': 'object'}, + } + + def __init__(self, *, partition_column_name=None, partition_upper_bound=None, partition_lower_bound=None, **kwargs) -> None: + super(NetezzaPartitionSettings, self).__init__(**kwargs) + self.partition_column_name = partition_column_name + self.partition_upper_bound = partition_upper_bound + self.partition_lower_bound = partition_lower_bound + + +class NetezzaSource(CopySource): + """A copy activity Netezza source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + :param partition_option: The partition mechanism that will be used for + Netezza read in parallel. Possible values include: 'None', 'DataSlice', + 'DynamicRange' + :type partition_option: str or + ~azure.mgmt.datafactory.models.NetezzaPartitionOption + :param partition_settings: The settings that will be leveraged for Netezza + source partitioning. + :type partition_settings: + ~azure.mgmt.datafactory.models.NetezzaPartitionSettings + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + 'partition_option': {'key': 'partitionOption', 'type': 'str'}, + 'partition_settings': {'key': 'partitionSettings', 'type': 'NetezzaPartitionSettings'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, partition_option=None, partition_settings=None, **kwargs) -> None: + super(NetezzaSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.partition_option = partition_option + self.partition_settings = partition_settings + self.type = 'NetezzaSource' + + +class NetezzaTableDataset(Dataset): + """Netezza dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: + super(NetezzaTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.type = 'NetezzaTable' + + +class ODataLinkedService(LinkedService): + """Open Data Protocol (OData) linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param url: Required. The URL of the OData service endpoint. Type: string + (or Expression with resultType string). + :type url: object + :param authentication_type: Type of authentication used to connect to the + OData service. Possible values include: 'Basic', 'Anonymous', 'Windows', + 'AadServicePrincipal', 'ManagedServiceIdentity' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.ODataAuthenticationType + :param user_name: User name of the OData service. Type: string (or + Expression with resultType string). + :type user_name: object + :param password: Password of the OData service. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param tenant: Specify the tenant information (domain name or tenant ID) + under which your application resides. Type: string (or Expression with + resultType string). + :type tenant: object + :param service_principal_id: Specify the application id of your + application registered in Azure Active Directory. Type: string (or + Expression with resultType string). + :type service_principal_id: object + :param aad_resource_id: Specify the resource you are requesting + authorization to use Directory. Type: string (or Expression with + resultType string). + :type aad_resource_id: object + :param aad_service_principal_credential_type: Specify the credential type + (key or cert) is used for service principal. Possible values include: + 'ServicePrincipalKey', 'ServicePrincipalCert' + :type aad_service_principal_credential_type: str or + ~azure.mgmt.datafactory.models.ODataAadServicePrincipalCredentialType + :param service_principal_key: Specify the secret of your application + registered in Azure Active Directory. Type: string (or Expression with + resultType string). + :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase + :param service_principal_embedded_cert: Specify the base64 encoded + certificate of your application registered in Azure Active Directory. + Type: string (or Expression with resultType string). + :type service_principal_embedded_cert: + ~azure.mgmt.datafactory.models.SecretBase + :param service_principal_embedded_cert_password: Specify the password of + your certificate if your certificate has a password and you are using + AadServicePrincipal authentication. Type: string (or Expression with + resultType string). + :type service_principal_embedded_cert_password: + ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'url': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'url': {'key': 'typeProperties.url', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, + 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, + 'aad_resource_id': {'key': 'typeProperties.aadResourceId', 'type': 'object'}, + 'aad_service_principal_credential_type': {'key': 'typeProperties.aadServicePrincipalCredentialType', 'type': 'str'}, + 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, + 'service_principal_embedded_cert': {'key': 'typeProperties.servicePrincipalEmbeddedCert', 'type': 'SecretBase'}, + 'service_principal_embedded_cert_password': {'key': 'typeProperties.servicePrincipalEmbeddedCertPassword', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, url, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, authentication_type=None, user_name=None, password=None, tenant=None, service_principal_id=None, aad_resource_id=None, aad_service_principal_credential_type=None, service_principal_key=None, service_principal_embedded_cert=None, service_principal_embedded_cert_password=None, encrypted_credential=None, **kwargs) -> None: + super(ODataLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.url = url + self.authentication_type = authentication_type + self.user_name = user_name + self.password = password + self.tenant = tenant + self.service_principal_id = service_principal_id + self.aad_resource_id = aad_resource_id + self.aad_service_principal_credential_type = aad_service_principal_credential_type + self.service_principal_key = service_principal_key + self.service_principal_embedded_cert = service_principal_embedded_cert + self.service_principal_embedded_cert_password = service_principal_embedded_cert_password + self.encrypted_credential = encrypted_credential + self.type = 'OData' + + +class ODataResourceDataset(Dataset): + """The Open Data Protocol (OData) resource dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param path: The OData resource path. Type: string (or Expression with + resultType string). + :type path: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'path': {'key': 'typeProperties.path', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, path=None, **kwargs) -> None: + super(ODataResourceDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.path = path + self.type = 'ODataResource' + + +class ODataSource(CopySource): + """A copy activity source for OData source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: OData query. For example, "$top=1". Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(ODataSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'ODataSource' + + +class OdbcLinkedService(LinkedService): + """Open Database Connectivity (ODBC) linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: Required. The non-access credential portion of + the connection string as well as an optional encrypted credential. Type: + string, SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param authentication_type: Type of authentication used to connect to the + ODBC data store. Possible values are: Anonymous and Basic. Type: string + (or Expression with resultType string). + :type authentication_type: object + :param credential: The access credential portion of the connection string + specified in driver-specific property-value format. + :type credential: ~azure.mgmt.datafactory.models.SecretBase + :param user_name: User name for Basic authentication. Type: string (or + Expression with resultType string). + :type user_name: object + :param password: Password for Basic authentication. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'connection_string': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'object'}, + 'credential': {'key': 'typeProperties.credential', 'type': 'SecretBase'}, + 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, connection_string, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, authentication_type=None, credential=None, user_name=None, password=None, encrypted_credential=None, **kwargs) -> None: + super(OdbcLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.connection_string = connection_string + self.authentication_type = authentication_type + self.credential = credential + self.user_name = user_name + self.password = password + self.encrypted_credential = encrypted_credential + self.type = 'Odbc' + + +class OdbcSink(CopySink): + """A copy activity ODBC sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param pre_copy_script: A query to execute before starting the copy. Type: + string (or Expression with resultType string). + :type pre_copy_script: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'pre_copy_script': {'key': 'preCopyScript', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, max_concurrent_connections=None, pre_copy_script=None, **kwargs) -> None: + super(OdbcSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.pre_copy_script = pre_copy_script + self.type = 'OdbcSink' + + +class OdbcSource(CopySource): + """A copy activity source for ODBC databases. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: Database query. Type: string (or Expression with resultType + string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(OdbcSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'OdbcSource' + + +class OdbcTableDataset(Dataset): + """The ODBC table dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The ODBC table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: + super(OdbcTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.type = 'OdbcTable' + + +class Office365Dataset(Dataset): + """The Office365 account. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: Required. Name of the dataset to extract from Office + 365. Type: string (or Expression with resultType string). + :type table_name: object + :param predicate: A predicate expression that can be used to filter the + specific rows to extract from Office 365. Type: string (or Expression with + resultType string). + :type predicate: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + 'table_name': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + 'predicate': {'key': 'typeProperties.predicate', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, table_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, predicate=None, **kwargs) -> None: + super(Office365Dataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.predicate = predicate + self.type = 'Office365Table' + + +class Office365LinkedService(LinkedService): + """Office365 linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param office365_tenant_id: Required. Azure tenant ID to which the Office + 365 account belongs. Type: string (or Expression with resultType string). + :type office365_tenant_id: object + :param service_principal_tenant_id: Required. Specify the tenant + information under which your Azure AD web application resides. Type: + string (or Expression with resultType string). + :type service_principal_tenant_id: object + :param service_principal_id: Required. Specify the application's client + ID. Type: string (or Expression with resultType string). + :type service_principal_id: object + :param service_principal_key: Required. Specify the application's key. + :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'office365_tenant_id': {'required': True}, + 'service_principal_tenant_id': {'required': True}, + 'service_principal_id': {'required': True}, + 'service_principal_key': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'office365_tenant_id': {'key': 'typeProperties.office365TenantId', 'type': 'object'}, + 'service_principal_tenant_id': {'key': 'typeProperties.servicePrincipalTenantId', 'type': 'object'}, + 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, + 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, office365_tenant_id, service_principal_tenant_id, service_principal_id, service_principal_key, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, encrypted_credential=None, **kwargs) -> None: + super(Office365LinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.office365_tenant_id = office365_tenant_id + self.service_principal_tenant_id = service_principal_tenant_id + self.service_principal_id = service_principal_id + self.service_principal_key = service_principal_key + self.encrypted_credential = encrypted_credential + self.type = 'Office365' + + +class Office365Source(CopySource): + """A copy activity source for an Office365 service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param allowed_groups: The groups containing all the users. Type: array of + strings (or Expression with resultType array of strings). + :type allowed_groups: object + :param user_scope_filter_uri: The user scope uri. Type: string (or + Expression with resultType string). + :type user_scope_filter_uri: object + :param date_filter_column: The Column to apply the and . Type: string (or + Expression with resultType string). + :type date_filter_column: object + :param start_time: Start time of the requested range for this dataset. + Type: string (or Expression with resultType string). + :type start_time: object + :param end_time: End time of the requested range for this dataset. Type: + string (or Expression with resultType string). + :type end_time: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'allowed_groups': {'key': 'allowedGroups', 'type': 'object'}, + 'user_scope_filter_uri': {'key': 'userScopeFilterUri', 'type': 'object'}, + 'date_filter_column': {'key': 'dateFilterColumn', 'type': 'object'}, + 'start_time': {'key': 'startTime', 'type': 'object'}, + 'end_time': {'key': 'endTime', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, allowed_groups=None, user_scope_filter_uri=None, date_filter_column=None, start_time=None, end_time=None, **kwargs) -> None: + super(Office365Source, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.allowed_groups = allowed_groups + self.user_scope_filter_uri = user_scope_filter_uri + self.date_filter_column = date_filter_column + self.start_time = start_time + self.end_time = end_time + self.type = 'Office365Source' + + +class Operation(Model): + """Azure Data Factory API operation definition. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param origin: The intended executor of the operation. + :type origin: str + :param display: Metadata associated with the operation. + :type display: ~azure.mgmt.datafactory.models.OperationDisplay + :param service_specification: Details about a service operation. + :type service_specification: + ~azure.mgmt.datafactory.models.OperationServiceSpecification + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'OperationServiceSpecification'}, + } + + def __init__(self, *, name: str=None, origin: str=None, display=None, service_specification=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.origin = origin + self.display = display + self.service_specification = service_specification + + +class OperationDisplay(Model): + """Metadata associated with the operation. + + :param description: The description of the operation. + :type description: str + :param provider: The name of the provider. + :type provider: str + :param resource: The name of the resource type on which the operation is + performed. + :type resource: str + :param operation: The type of operation: get, read, delete, etc. + :type operation: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, *, description: str=None, provider: str=None, resource: str=None, operation: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.description = description + self.provider = provider + self.resource = resource + self.operation = operation + + +class OperationLogSpecification(Model): + """Details about an operation related to logs. + + :param name: The name of the log category. + :type name: str + :param display_name: Localized display name. + :type display_name: str + :param blob_duration: Blobs created in the customer storage account, per + hour. + :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(OperationLogSpecification, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.blob_duration = blob_duration + + +class OperationMetricAvailability(Model): + """Defines how often data for a metric becomes available. + + :param time_grain: The granularity for the metric. + :type time_grain: str + :param blob_duration: Blob created in the customer storage account, per + hour. + :type blob_duration: str + """ + + _attribute_map = { + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + def __init__(self, *, time_grain: str=None, blob_duration: str=None, **kwargs) -> None: + super(OperationMetricAvailability, self).__init__(**kwargs) + self.time_grain = time_grain + self.blob_duration = blob_duration + + +class OperationMetricDimension(Model): + """Defines the metric dimension. + + :param name: The name of the dimension for the metric. + :type name: str + :param display_name: The display name of the metric dimension. + :type display_name: str + :param to_be_exported_for_shoebox: Whether the dimension should be + exported to Azure Monitor. + :type to_be_exported_for_shoebox: bool + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, to_be_exported_for_shoebox: bool=None, **kwargs) -> None: + super(OperationMetricDimension, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.to_be_exported_for_shoebox = to_be_exported_for_shoebox + + +class OperationMetricSpecification(Model): + """Details about an operation related to metrics. + + :param name: The name of the metric. + :type name: str + :param display_name: Localized display name of the metric. + :type display_name: str + :param display_description: The description of the metric. + :type display_description: str + :param unit: The unit that the metric is measured in. + :type unit: str + :param aggregation_type: The type of metric aggregation. + :type aggregation_type: str + :param enable_regional_mdm_account: Whether or not the service is using + regional MDM accounts. + :type enable_regional_mdm_account: str + :param source_mdm_account: The name of the MDM account. + :type source_mdm_account: str + :param source_mdm_namespace: The name of the MDM namespace. + :type source_mdm_namespace: str + :param availabilities: Defines how often data for metrics becomes + available. + :type availabilities: + list[~azure.mgmt.datafactory.models.OperationMetricAvailability] + :param dimensions: Defines the metric dimension. + :type dimensions: + list[~azure.mgmt.datafactory.models.OperationMetricDimension] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'str'}, + 'source_mdm_account': {'key': 'sourceMdmAccount', 'type': 'str'}, + 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, + 'availabilities': {'key': 'availabilities', 'type': '[OperationMetricAvailability]'}, + 'dimensions': {'key': 'dimensions', 'type': '[OperationMetricDimension]'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, display_description: str=None, unit: str=None, aggregation_type: str=None, enable_regional_mdm_account: str=None, source_mdm_account: str=None, source_mdm_namespace: str=None, availabilities=None, dimensions=None, **kwargs) -> None: + super(OperationMetricSpecification, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.display_description = display_description + self.unit = unit + self.aggregation_type = aggregation_type + self.enable_regional_mdm_account = enable_regional_mdm_account + self.source_mdm_account = source_mdm_account + self.source_mdm_namespace = source_mdm_namespace + self.availabilities = availabilities + self.dimensions = dimensions + + +class OperationServiceSpecification(Model): + """Details about a service operation. + + :param log_specifications: Details about operations related to logs. + :type log_specifications: + list[~azure.mgmt.datafactory.models.OperationLogSpecification] + :param metric_specifications: Details about operations related to metrics. + :type metric_specifications: + list[~azure.mgmt.datafactory.models.OperationMetricSpecification] + """ + + _attribute_map = { + 'log_specifications': {'key': 'logSpecifications', 'type': '[OperationLogSpecification]'}, + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[OperationMetricSpecification]'}, + } + + def __init__(self, *, log_specifications=None, metric_specifications=None, **kwargs) -> None: + super(OperationServiceSpecification, self).__init__(**kwargs) + self.log_specifications = log_specifications + self.metric_specifications = metric_specifications + + +class OracleLinkedService(LinkedService): + """Oracle database. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: Required. The connection string. Type: string, + SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param password: The Azure key vault secret reference of password in + connection string. + :type password: + ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'connection_string': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'AzureKeyVaultSecretReference'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, connection_string, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, password=None, encrypted_credential=None, **kwargs) -> None: + super(OracleLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.connection_string = connection_string + self.password = password + self.encrypted_credential = encrypted_credential + self.type = 'Oracle' + + +class OraclePartitionSettings(Model): + """The settings that will be leveraged for Oracle source partitioning. + + :param partition_names: Names of the physical partitions of Oracle table. + :type partition_names: object + :param partition_column_name: The name of the column in integer type that + will be used for proceeding range partitioning. Type: string (or + Expression with resultType string). + :type partition_column_name: object + :param partition_upper_bound: The maximum value of column specified in + partitionColumnName that will be used for proceeding range partitioning. + Type: string (or Expression with resultType string). + :type partition_upper_bound: object + :param partition_lower_bound: The minimum value of column specified in + partitionColumnName that will be used for proceeding range partitioning. + Type: string (or Expression with resultType string). + :type partition_lower_bound: object + """ + + _attribute_map = { + 'partition_names': {'key': 'partitionNames', 'type': 'object'}, + 'partition_column_name': {'key': 'partitionColumnName', 'type': 'object'}, + 'partition_upper_bound': {'key': 'partitionUpperBound', 'type': 'object'}, + 'partition_lower_bound': {'key': 'partitionLowerBound', 'type': 'object'}, + } + + def __init__(self, *, partition_names=None, partition_column_name=None, partition_upper_bound=None, partition_lower_bound=None, **kwargs) -> None: + super(OraclePartitionSettings, self).__init__(**kwargs) + self.partition_names = partition_names + self.partition_column_name = partition_column_name + self.partition_upper_bound = partition_upper_bound + self.partition_lower_bound = partition_lower_bound + + +class OracleServiceCloudLinkedService(LinkedService): + """Oracle Service Cloud linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param host: Required. The URL of the Oracle Service Cloud instance. + :type host: object + :param username: Required. The user name that you use to access Oracle + Service Cloud server. + :type username: object + :param password: Required. The password corresponding to the user name + that you provided in the username key. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param use_encrypted_endpoints: Specifies whether the data source + endpoints are encrypted using HTTPS. The default value is true. Type: + boolean (or Expression with resultType boolean). + :type use_encrypted_endpoints: object + :param use_host_verification: Specifies whether to require the host name + in the server's certificate to match the host name of the server when + connecting over SSL. The default value is true. Type: boolean (or + Expression with resultType boolean). + :type use_host_verification: object + :param use_peer_verification: Specifies whether to verify the identity of + the server when connecting over SSL. The default value is true. Type: + boolean (or Expression with resultType boolean). + :type use_peer_verification: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'host': {'required': True}, + 'username': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'host': {'key': 'typeProperties.host', 'type': 'object'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, + 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, + 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, host, username, password, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, use_encrypted_endpoints=None, use_host_verification=None, use_peer_verification=None, encrypted_credential=None, **kwargs) -> None: + super(OracleServiceCloudLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.host = host + self.username = username + self.password = password + self.use_encrypted_endpoints = use_encrypted_endpoints + self.use_host_verification = use_host_verification + self.use_peer_verification = use_peer_verification + self.encrypted_credential = encrypted_credential + self.type = 'OracleServiceCloud' + + +class OracleServiceCloudObjectDataset(Dataset): + """Oracle Service Cloud dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: + super(OracleServiceCloudObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.type = 'OracleServiceCloudObject' + + +class OracleServiceCloudSource(CopySource): + """A copy activity Oracle Service Cloud source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(OracleServiceCloudSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'OracleServiceCloudSource' + + +class OracleSink(CopySink): + """A copy activity Oracle sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param pre_copy_script: SQL pre-copy script. Type: string (or Expression + with resultType string). + :type pre_copy_script: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'pre_copy_script': {'key': 'preCopyScript', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, max_concurrent_connections=None, pre_copy_script=None, **kwargs) -> None: + super(OracleSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.pre_copy_script = pre_copy_script + self.type = 'OracleSink' + + +class OracleSource(CopySource): + """A copy activity Oracle source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param oracle_reader_query: Oracle reader query. Type: string (or + Expression with resultType string). + :type oracle_reader_query: object + :param query_timeout: Query timeout. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type query_timeout: object + :param partition_option: The partition mechanism that will be used for + Oracle read in parallel. Possible values include: 'None', + 'PhysicalPartitionsOfTable', 'DynamicRange' + :type partition_option: str or + ~azure.mgmt.datafactory.models.OraclePartitionOption + :param partition_settings: The settings that will be leveraged for Oracle + source partitioning. + :type partition_settings: + ~azure.mgmt.datafactory.models.OraclePartitionSettings + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'oracle_reader_query': {'key': 'oracleReaderQuery', 'type': 'object'}, + 'query_timeout': {'key': 'queryTimeout', 'type': 'object'}, + 'partition_option': {'key': 'partitionOption', 'type': 'str'}, + 'partition_settings': {'key': 'partitionSettings', 'type': 'OraclePartitionSettings'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, oracle_reader_query=None, query_timeout=None, partition_option=None, partition_settings=None, **kwargs) -> None: + super(OracleSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.oracle_reader_query = oracle_reader_query + self.query_timeout = query_timeout + self.partition_option = partition_option + self.partition_settings = partition_settings + self.type = 'OracleSource' + + +class OracleTableDataset(Dataset): + """The on-premises Oracle database dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: This property will be retired. Please consider using + schema + table properties instead. + :type table_name: object + :param oracle_table_dataset_schema: The schema name of the on-premises + Oracle database. Type: string (or Expression with resultType string). + :type oracle_table_dataset_schema: object + :param table: The table name of the on-premises Oracle database. Type: + string (or Expression with resultType string). + :type table: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + 'oracle_table_dataset_schema': {'key': 'typeProperties.schema', 'type': 'object'}, + 'table': {'key': 'typeProperties.table', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, oracle_table_dataset_schema=None, table=None, **kwargs) -> None: + super(OracleTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.oracle_table_dataset_schema = oracle_table_dataset_schema + self.table = table + self.type = 'OracleTable' + + +class OrcFormat(DatasetStorageFormat): + """The data stored in Optimized Row Columnar (ORC) format. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param serializer: Serializer. Type: string (or Expression with resultType + string). + :type serializer: object + :param deserializer: Deserializer. Type: string (or Expression with + resultType string). + :type deserializer: object + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'serializer': {'key': 'serializer', 'type': 'object'}, + 'deserializer': {'key': 'deserializer', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, additional_properties=None, serializer=None, deserializer=None, **kwargs) -> None: + super(OrcFormat, self).__init__(additional_properties=additional_properties, serializer=serializer, deserializer=deserializer, **kwargs) + self.type = 'OrcFormat' + + +class ParameterSpecification(Model): + """Definition of a single parameter for an entity. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Parameter type. Possible values include: 'Object', + 'String', 'Int', 'Float', 'Bool', 'Array', 'SecureString' + :type type: str or ~azure.mgmt.datafactory.models.ParameterType + :param default_value: Default value of parameter. + :type default_value: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'default_value': {'key': 'defaultValue', 'type': 'object'}, + } + + def __init__(self, *, type, default_value=None, **kwargs) -> None: + super(ParameterSpecification, self).__init__(**kwargs) + self.type = type + self.default_value = default_value + + +class ParquetDataset(Dataset): + """Parquet dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param location: Required. The location of the parquet storage. + :type location: ~azure.mgmt.datafactory.models.DatasetLocation + :param compression_codec: + :type compression_codec: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'typeProperties.location', 'type': 'DatasetLocation'}, + 'compression_codec': {'key': 'typeProperties.compressionCodec', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, location, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, compression_codec=None, **kwargs) -> None: + super(ParquetDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.location = location + self.compression_codec = compression_codec + self.type = 'Parquet' + + +class ParquetFormat(DatasetStorageFormat): + """The data stored in Parquet format. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param serializer: Serializer. Type: string (or Expression with resultType + string). + :type serializer: object + :param deserializer: Deserializer. Type: string (or Expression with + resultType string). + :type deserializer: object + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'serializer': {'key': 'serializer', 'type': 'object'}, + 'deserializer': {'key': 'deserializer', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, additional_properties=None, serializer=None, deserializer=None, **kwargs) -> None: + super(ParquetFormat, self).__init__(additional_properties=additional_properties, serializer=serializer, deserializer=deserializer, **kwargs) + self.type = 'ParquetFormat' + + +class ParquetSink(CopySink): + """A copy activity Parquet sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param store_settings: Parquet store settings. + :type store_settings: ~azure.mgmt.datafactory.models.StoreWriteSettings + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'store_settings': {'key': 'storeSettings', 'type': 'StoreWriteSettings'}, + } + + def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, max_concurrent_connections=None, store_settings=None, **kwargs) -> None: + super(ParquetSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.store_settings = store_settings + self.type = 'ParquetSink' + + +class ParquetSource(CopySource): + """A copy activity Parquet source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param store_settings: Parquet store settings. + :type store_settings: ~azure.mgmt.datafactory.models.StoreReadSettings + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'store_settings': {'key': 'storeSettings', 'type': 'StoreReadSettings'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, store_settings=None, **kwargs) -> None: + super(ParquetSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.store_settings = store_settings + self.type = 'ParquetSource' + + +class PaypalLinkedService(LinkedService): + """Paypal Service linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param host: Required. The URL of the PayPal instance. (i.e. + api.sandbox.paypal.com) + :type host: object + :param client_id: Required. The client ID associated with your PayPal + application. + :type client_id: object + :param client_secret: The client secret associated with your PayPal + application. + :type client_secret: ~azure.mgmt.datafactory.models.SecretBase + :param use_encrypted_endpoints: Specifies whether the data source + endpoints are encrypted using HTTPS. The default value is true. + :type use_encrypted_endpoints: object + :param use_host_verification: Specifies whether to require the host name + in the server's certificate to match the host name of the server when + connecting over SSL. The default value is true. + :type use_host_verification: object + :param use_peer_verification: Specifies whether to verify the identity of + the server when connecting over SSL. The default value is true. + :type use_peer_verification: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'host': {'required': True}, + 'client_id': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'host': {'key': 'typeProperties.host', 'type': 'object'}, + 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, + 'client_secret': {'key': 'typeProperties.clientSecret', 'type': 'SecretBase'}, + 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, + 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, + 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, host, client_id, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, client_secret=None, use_encrypted_endpoints=None, use_host_verification=None, use_peer_verification=None, encrypted_credential=None, **kwargs) -> None: + super(PaypalLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.host = host + self.client_id = client_id + self.client_secret = client_secret + self.use_encrypted_endpoints = use_encrypted_endpoints + self.use_host_verification = use_host_verification + self.use_peer_verification = use_peer_verification + self.encrypted_credential = encrypted_credential + self.type = 'Paypal' + + +class PaypalObjectDataset(Dataset): + """Paypal Service dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: + super(PaypalObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.type = 'PaypalObject' + + +class PaypalSource(CopySource): + """A copy activity Paypal Service source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(PaypalSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'PaypalSource' + + +class PhoenixLinkedService(LinkedService): + """Phoenix server linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param host: Required. The IP address or host name of the Phoenix server. + (i.e. 192.168.222.160) + :type host: object + :param port: The TCP port that the Phoenix server uses to listen for + client connections. The default value is 8765. + :type port: object + :param http_path: The partial URL corresponding to the Phoenix server. + (i.e. /gateway/sandbox/phoenix/version). The default value is hbasephoenix + if using WindowsAzureHDInsightService. + :type http_path: object + :param authentication_type: Required. The authentication mechanism used to + connect to the Phoenix server. Possible values include: 'Anonymous', + 'UsernameAndPassword', 'WindowsAzureHDInsightService' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.PhoenixAuthenticationType + :param username: The user name used to connect to the Phoenix server. + :type username: object + :param password: The password corresponding to the user name. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param enable_ssl: Specifies whether the connections to the server are + encrypted using SSL. The default value is false. + :type enable_ssl: object + :param trusted_cert_path: The full path of the .pem file containing + trusted CA certificates for verifying the server when connecting over SSL. + This property can only be set when using SSL on self-hosted IR. The + default value is the cacerts.pem file installed with the IR. + :type trusted_cert_path: object + :param use_system_trust_store: Specifies whether to use a CA certificate + from the system trust store or from a specified PEM file. The default + value is false. + :type use_system_trust_store: object + :param allow_host_name_cn_mismatch: Specifies whether to require a + CA-issued SSL certificate name to match the host name of the server when + connecting over SSL. The default value is false. + :type allow_host_name_cn_mismatch: object + :param allow_self_signed_server_cert: Specifies whether to allow + self-signed certificates from the server. The default value is false. + :type allow_self_signed_server_cert: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'host': {'required': True}, + 'authentication_type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'host': {'key': 'typeProperties.host', 'type': 'object'}, + 'port': {'key': 'typeProperties.port', 'type': 'object'}, + 'http_path': {'key': 'typeProperties.httpPath', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'enable_ssl': {'key': 'typeProperties.enableSsl', 'type': 'object'}, + 'trusted_cert_path': {'key': 'typeProperties.trustedCertPath', 'type': 'object'}, + 'use_system_trust_store': {'key': 'typeProperties.useSystemTrustStore', 'type': 'object'}, + 'allow_host_name_cn_mismatch': {'key': 'typeProperties.allowHostNameCNMismatch', 'type': 'object'}, + 'allow_self_signed_server_cert': {'key': 'typeProperties.allowSelfSignedServerCert', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, host, authentication_type, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, port=None, http_path=None, username=None, password=None, enable_ssl=None, trusted_cert_path=None, use_system_trust_store=None, allow_host_name_cn_mismatch=None, allow_self_signed_server_cert=None, encrypted_credential=None, **kwargs) -> None: + super(PhoenixLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.host = host + self.port = port + self.http_path = http_path + self.authentication_type = authentication_type + self.username = username + self.password = password + self.enable_ssl = enable_ssl + self.trusted_cert_path = trusted_cert_path + self.use_system_trust_store = use_system_trust_store + self.allow_host_name_cn_mismatch = allow_host_name_cn_mismatch + self.allow_self_signed_server_cert = allow_self_signed_server_cert + self.encrypted_credential = encrypted_credential + self.type = 'Phoenix' + + +class PhoenixObjectDataset(Dataset): + """Phoenix server dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: This property will be retired. Please consider using + schema + table properties instead. + :type table_name: object + :param table: The table name of the Phoenix. Type: string (or Expression + with resultType string). + :type table: object + :param phoenix_object_dataset_schema: The schema name of the Phoenix. + Type: string (or Expression with resultType string). + :type phoenix_object_dataset_schema: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + 'table': {'key': 'typeProperties.table', 'type': 'object'}, + 'phoenix_object_dataset_schema': {'key': 'typeProperties.schema', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, table=None, phoenix_object_dataset_schema=None, **kwargs) -> None: + super(PhoenixObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.table = table + self.phoenix_object_dataset_schema = phoenix_object_dataset_schema + self.type = 'PhoenixObject' + + +class PhoenixSource(CopySource): + """A copy activity Phoenix server source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(PhoenixSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'PhoenixSource' + + +class PipelineFolder(Model): + """The folder that this Pipeline is in. If not specified, Pipeline will appear + at the root level. + + :param name: The name of the folder that this Pipeline is in. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, **kwargs) -> None: + super(PipelineFolder, self).__init__(**kwargs) + self.name = name + + +class PipelineReference(Model): + """Pipeline reference type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. Pipeline reference type. Default value: + "PipelineReference" . + :vartype type: str + :param reference_name: Required. Reference pipeline name. + :type reference_name: str + :param name: Reference name. + :type name: str + """ + + _validation = { + 'type': {'required': True, 'constant': True}, + 'reference_name': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'reference_name': {'key': 'referenceName', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + type = "PipelineReference" + + def __init__(self, *, reference_name: str, name: str=None, **kwargs) -> None: + super(PipelineReference, self).__init__(**kwargs) + self.reference_name = reference_name + self.name = name + + +class PipelineResource(SubResource): + """Pipeline resource type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar etag: Etag identifies change in the resource. + :vartype etag: str + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: The description of the pipeline. + :type description: str + :param activities: List of activities in pipeline. + :type activities: list[~azure.mgmt.datafactory.models.Activity] + :param parameters: List of parameters for pipeline. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param variables: List of variables for pipeline. + :type variables: dict[str, + ~azure.mgmt.datafactory.models.VariableSpecification] + :param concurrency: The max number of concurrent runs for the pipeline. + :type concurrency: int + :param annotations: List of tags that can be used for describing the + Pipeline. + :type annotations: list[object] + :param folder: The folder that this Pipeline is in. If not specified, + Pipeline will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.PipelineFolder + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'concurrency': {'minimum': 1}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'activities': {'key': 'properties.activities', 'type': '[Activity]'}, + 'parameters': {'key': 'properties.parameters', 'type': '{ParameterSpecification}'}, + 'variables': {'key': 'properties.variables', 'type': '{VariableSpecification}'}, + 'concurrency': {'key': 'properties.concurrency', 'type': 'int'}, + 'annotations': {'key': 'properties.annotations', 'type': '[object]'}, + 'folder': {'key': 'properties.folder', 'type': 'PipelineFolder'}, + } + + def __init__(self, *, additional_properties=None, description: str=None, activities=None, parameters=None, variables=None, concurrency: int=None, annotations=None, folder=None, **kwargs) -> None: + super(PipelineResource, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.description = description + self.activities = activities + self.parameters = parameters + self.variables = variables + self.concurrency = concurrency + self.annotations = annotations + self.folder = folder + + +class PipelineRun(Model): + """Information about a pipeline run. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar run_id: Identifier of a run. + :vartype run_id: str + :ivar run_group_id: Identifier that correlates all the recovery runs of a + pipeline run. + :vartype run_group_id: str + :ivar is_latest: Indicates if the recovered pipeline run is the latest in + its group. + :vartype is_latest: bool + :ivar pipeline_name: The pipeline name. + :vartype pipeline_name: str + :ivar parameters: The full or partial list of parameter name, value pair + used in the pipeline run. + :vartype parameters: dict[str, str] + :ivar invoked_by: Entity that started the pipeline run. + :vartype invoked_by: ~azure.mgmt.datafactory.models.PipelineRunInvokedBy + :ivar last_updated: The last updated timestamp for the pipeline run event + in ISO8601 format. + :vartype last_updated: datetime + :ivar run_start: The start time of a pipeline run in ISO8601 format. + :vartype run_start: datetime + :ivar run_end: The end time of a pipeline run in ISO8601 format. + :vartype run_end: datetime + :ivar duration_in_ms: The duration of a pipeline run. + :vartype duration_in_ms: int + :ivar status: The status of a pipeline run. + :vartype status: str + :ivar message: The message from a pipeline run. + :vartype message: str + """ + + _validation = { + 'run_id': {'readonly': True}, + 'run_group_id': {'readonly': True}, + 'is_latest': {'readonly': True}, + 'pipeline_name': {'readonly': True}, + 'parameters': {'readonly': True}, + 'invoked_by': {'readonly': True}, + 'last_updated': {'readonly': True}, + 'run_start': {'readonly': True}, + 'run_end': {'readonly': True}, + 'duration_in_ms': {'readonly': True}, + 'status': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'run_id': {'key': 'runId', 'type': 'str'}, + 'run_group_id': {'key': 'runGroupId', 'type': 'str'}, + 'is_latest': {'key': 'isLatest', 'type': 'bool'}, + 'pipeline_name': {'key': 'pipelineName', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{str}'}, + 'invoked_by': {'key': 'invokedBy', 'type': 'PipelineRunInvokedBy'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, + 'run_start': {'key': 'runStart', 'type': 'iso-8601'}, + 'run_end': {'key': 'runEnd', 'type': 'iso-8601'}, + 'duration_in_ms': {'key': 'durationInMs', 'type': 'int'}, + 'status': {'key': 'status', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, additional_properties=None, **kwargs) -> None: + super(PipelineRun, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.run_id = None + self.run_group_id = None + self.is_latest = None + self.pipeline_name = None + self.parameters = None + self.invoked_by = None + self.last_updated = None + self.run_start = None + self.run_end = None + self.duration_in_ms = None + self.status = None + self.message = None + + +class PipelineRunInvokedBy(Model): + """Provides entity name and id that started the pipeline run. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of the entity that started the pipeline run. + :vartype name: str + :ivar id: The ID of the entity that started the run. + :vartype id: str + :ivar invoked_by_type: The type of the entity that started the run. + :vartype invoked_by_type: str + """ + + _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'invoked_by_type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'invoked_by_type': {'key': 'invokedByType', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(PipelineRunInvokedBy, self).__init__(**kwargs) + self.name = None + self.id = None + self.invoked_by_type = None + + +class PipelineRunsQueryResponse(Model): + """A list pipeline runs. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of pipeline runs. + :type value: list[~azure.mgmt.datafactory.models.PipelineRun] + :param continuation_token: The continuation token for getting the next + page of results, if any remaining results exist, null otherwise. + :type continuation_token: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PipelineRun]'}, + 'continuation_token': {'key': 'continuationToken', 'type': 'str'}, + } + + def __init__(self, *, value, continuation_token: str=None, **kwargs) -> None: + super(PipelineRunsQueryResponse, self).__init__(**kwargs) + self.value = value + self.continuation_token = continuation_token + + +class PolybaseSettings(Model): + """PolyBase settings. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param reject_type: Reject type. Possible values include: 'value', + 'percentage' + :type reject_type: str or + ~azure.mgmt.datafactory.models.PolybaseSettingsRejectType + :param reject_value: Specifies the value or the percentage of rows that + can be rejected before the query fails. Type: number (or Expression with + resultType number), minimum: 0. + :type reject_value: object + :param reject_sample_value: Determines the number of rows to attempt to + retrieve before the PolyBase recalculates the percentage of rejected rows. + Type: integer (or Expression with resultType integer), minimum: 0. + :type reject_sample_value: object + :param use_type_default: Specifies how to handle missing values in + delimited text files when PolyBase retrieves data from the text file. + Type: boolean (or Expression with resultType boolean). + :type use_type_default: object + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'reject_type': {'key': 'rejectType', 'type': 'str'}, + 'reject_value': {'key': 'rejectValue', 'type': 'object'}, + 'reject_sample_value': {'key': 'rejectSampleValue', 'type': 'object'}, + 'use_type_default': {'key': 'useTypeDefault', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, reject_type=None, reject_value=None, reject_sample_value=None, use_type_default=None, **kwargs) -> None: + super(PolybaseSettings, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.reject_type = reject_type + self.reject_value = reject_value + self.reject_sample_value = reject_sample_value + self.use_type_default = use_type_default + + +class PostgreSqlLinkedService(LinkedService): + """Linked service for PostgreSQL data source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: Required. The connection string. + :type connection_string: ~azure.mgmt.datafactory.models.SecretBase + :param password: The Azure key vault secret reference of password in + connection string. + :type password: + ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'connection_string': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'SecretBase'}, + 'password': {'key': 'typeProperties.password', 'type': 'AzureKeyVaultSecretReference'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, connection_string, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, password=None, encrypted_credential=None, **kwargs) -> None: + super(PostgreSqlLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.connection_string = connection_string + self.password = password + self.encrypted_credential = encrypted_credential + self.type = 'PostgreSql' + + +class PostgreSqlSource(CopySource): + """A copy activity source for PostgreSQL databases. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: Database query. Type: string (or Expression with resultType + string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(PostgreSqlSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'PostgreSqlSource' + + +class PostgreSqlTableDataset(Dataset): + """The PostgreSQL table dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The PostgreSQL table name. Type: string (or Expression + with resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: + super(PostgreSqlTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.type = 'PostgreSqlTable' + + +class PrestoLinkedService(LinkedService): + """Presto server linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param host: Required. The IP address or host name of the Presto server. + (i.e. 192.168.222.160) + :type host: object + :param server_version: Required. The version of the Presto server. (i.e. + 0.148-t) + :type server_version: object + :param catalog: Required. The catalog context for all request against the + server. + :type catalog: object + :param port: The TCP port that the Presto server uses to listen for client + connections. The default value is 8080. + :type port: object + :param authentication_type: Required. The authentication mechanism used to + connect to the Presto server. Possible values include: 'Anonymous', 'LDAP' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.PrestoAuthenticationType + :param username: The user name used to connect to the Presto server. + :type username: object + :param password: The password corresponding to the user name. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param enable_ssl: Specifies whether the connections to the server are + encrypted using SSL. The default value is false. + :type enable_ssl: object + :param trusted_cert_path: The full path of the .pem file containing + trusted CA certificates for verifying the server when connecting over SSL. + This property can only be set when using SSL on self-hosted IR. The + default value is the cacerts.pem file installed with the IR. + :type trusted_cert_path: object + :param use_system_trust_store: Specifies whether to use a CA certificate + from the system trust store or from a specified PEM file. The default + value is false. + :type use_system_trust_store: object + :param allow_host_name_cn_mismatch: Specifies whether to require a + CA-issued SSL certificate name to match the host name of the server when + connecting over SSL. The default value is false. + :type allow_host_name_cn_mismatch: object + :param allow_self_signed_server_cert: Specifies whether to allow + self-signed certificates from the server. The default value is false. + :type allow_self_signed_server_cert: object + :param time_zone_id: The local time zone used by the connection. Valid + values for this option are specified in the IANA Time Zone Database. The + default value is the system time zone. + :type time_zone_id: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'host': {'required': True}, + 'server_version': {'required': True}, + 'catalog': {'required': True}, + 'authentication_type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'host': {'key': 'typeProperties.host', 'type': 'object'}, + 'server_version': {'key': 'typeProperties.serverVersion', 'type': 'object'}, + 'catalog': {'key': 'typeProperties.catalog', 'type': 'object'}, + 'port': {'key': 'typeProperties.port', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'enable_ssl': {'key': 'typeProperties.enableSsl', 'type': 'object'}, + 'trusted_cert_path': {'key': 'typeProperties.trustedCertPath', 'type': 'object'}, + 'use_system_trust_store': {'key': 'typeProperties.useSystemTrustStore', 'type': 'object'}, + 'allow_host_name_cn_mismatch': {'key': 'typeProperties.allowHostNameCNMismatch', 'type': 'object'}, + 'allow_self_signed_server_cert': {'key': 'typeProperties.allowSelfSignedServerCert', 'type': 'object'}, + 'time_zone_id': {'key': 'typeProperties.timeZoneID', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, host, server_version, catalog, authentication_type, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, port=None, username=None, password=None, enable_ssl=None, trusted_cert_path=None, use_system_trust_store=None, allow_host_name_cn_mismatch=None, allow_self_signed_server_cert=None, time_zone_id=None, encrypted_credential=None, **kwargs) -> None: + super(PrestoLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.host = host + self.server_version = server_version + self.catalog = catalog + self.port = port + self.authentication_type = authentication_type + self.username = username + self.password = password + self.enable_ssl = enable_ssl + self.trusted_cert_path = trusted_cert_path + self.use_system_trust_store = use_system_trust_store + self.allow_host_name_cn_mismatch = allow_host_name_cn_mismatch + self.allow_self_signed_server_cert = allow_self_signed_server_cert + self.time_zone_id = time_zone_id + self.encrypted_credential = encrypted_credential + self.type = 'Presto' + + +class PrestoObjectDataset(Dataset): + """Presto server dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: This property will be retired. Please consider using + schema + table properties instead. + :type table_name: object + :param table: The table name of the Presto. Type: string (or Expression + with resultType string). + :type table: object + :param presto_object_dataset_schema: The schema name of the Presto. Type: + string (or Expression with resultType string). + :type presto_object_dataset_schema: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + 'table': {'key': 'typeProperties.table', 'type': 'object'}, + 'presto_object_dataset_schema': {'key': 'typeProperties.schema', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, table=None, presto_object_dataset_schema=None, **kwargs) -> None: + super(PrestoObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.table = table + self.presto_object_dataset_schema = presto_object_dataset_schema + self.type = 'PrestoObject' + + +class PrestoSource(CopySource): + """A copy activity Presto server source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(PrestoSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'PrestoSource' + + +class QuickBooksLinkedService(LinkedService): + """QuickBooks server linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param endpoint: Required. The endpoint of the QuickBooks server. (i.e. + quickbooks.api.intuit.com) + :type endpoint: object + :param company_id: Required. The company ID of the QuickBooks company to + authorize. + :type company_id: object + :param consumer_key: Required. The consumer key for OAuth 1.0 + authentication. + :type consumer_key: object + :param consumer_secret: Required. The consumer secret for OAuth 1.0 + authentication. + :type consumer_secret: ~azure.mgmt.datafactory.models.SecretBase + :param access_token: Required. The access token for OAuth 1.0 + authentication. + :type access_token: ~azure.mgmt.datafactory.models.SecretBase + :param access_token_secret: Required. The access token secret for OAuth + 1.0 authentication. + :type access_token_secret: ~azure.mgmt.datafactory.models.SecretBase + :param use_encrypted_endpoints: Specifies whether the data source + endpoints are encrypted using HTTPS. The default value is true. + :type use_encrypted_endpoints: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'endpoint': {'required': True}, + 'company_id': {'required': True}, + 'consumer_key': {'required': True}, + 'consumer_secret': {'required': True}, + 'access_token': {'required': True}, + 'access_token_secret': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'endpoint': {'key': 'typeProperties.endpoint', 'type': 'object'}, + 'company_id': {'key': 'typeProperties.companyId', 'type': 'object'}, + 'consumer_key': {'key': 'typeProperties.consumerKey', 'type': 'object'}, + 'consumer_secret': {'key': 'typeProperties.consumerSecret', 'type': 'SecretBase'}, + 'access_token': {'key': 'typeProperties.accessToken', 'type': 'SecretBase'}, + 'access_token_secret': {'key': 'typeProperties.accessTokenSecret', 'type': 'SecretBase'}, + 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, endpoint, company_id, consumer_key, consumer_secret, access_token, access_token_secret, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, use_encrypted_endpoints=None, encrypted_credential=None, **kwargs) -> None: + super(QuickBooksLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.endpoint = endpoint + self.company_id = company_id + self.consumer_key = consumer_key + self.consumer_secret = consumer_secret + self.access_token = access_token + self.access_token_secret = access_token_secret + self.use_encrypted_endpoints = use_encrypted_endpoints + self.encrypted_credential = encrypted_credential + self.type = 'QuickBooks' + + +class QuickBooksObjectDataset(Dataset): + """QuickBooks server dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: + super(QuickBooksObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.type = 'QuickBooksObject' + + +class QuickBooksSource(CopySource): + """A copy activity QuickBooks server source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(QuickBooksSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'QuickBooksSource' + + +class RecurrenceSchedule(Model): + """The recurrence schedule. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param minutes: The minutes. + :type minutes: list[int] + :param hours: The hours. + :type hours: list[int] + :param week_days: The days of the week. + :type week_days: list[str or ~azure.mgmt.datafactory.models.DaysOfWeek] + :param month_days: The month days. + :type month_days: list[int] + :param monthly_occurrences: The monthly occurrences. + :type monthly_occurrences: + list[~azure.mgmt.datafactory.models.RecurrenceScheduleOccurrence] + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'minutes': {'key': 'minutes', 'type': '[int]'}, + 'hours': {'key': 'hours', 'type': '[int]'}, + 'week_days': {'key': 'weekDays', 'type': '[DaysOfWeek]'}, + 'month_days': {'key': 'monthDays', 'type': '[int]'}, + 'monthly_occurrences': {'key': 'monthlyOccurrences', 'type': '[RecurrenceScheduleOccurrence]'}, + } + + def __init__(self, *, additional_properties=None, minutes=None, hours=None, week_days=None, month_days=None, monthly_occurrences=None, **kwargs) -> None: + super(RecurrenceSchedule, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.minutes = minutes + self.hours = hours + self.week_days = week_days + self.month_days = month_days + self.monthly_occurrences = monthly_occurrences + + +class RecurrenceScheduleOccurrence(Model): + """The recurrence schedule occurrence. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param day: The day of the week. Possible values include: 'Sunday', + 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' + :type day: str or ~azure.mgmt.datafactory.models.DayOfWeek + :param occurrence: The occurrence. + :type occurrence: int + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'day': {'key': 'day', 'type': 'DayOfWeek'}, + 'occurrence': {'key': 'occurrence', 'type': 'int'}, + } + + def __init__(self, *, additional_properties=None, day=None, occurrence: int=None, **kwargs) -> None: + super(RecurrenceScheduleOccurrence, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.day = day + self.occurrence = occurrence + + +class RedirectIncompatibleRowSettings(Model): + """Redirect incompatible row settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param linked_service_name: Required. Name of the Azure Storage, Storage + SAS, or Azure Data Lake Store linked service used for redirecting + incompatible row. Must be specified if redirectIncompatibleRowSettings is + specified. Type: string (or Expression with resultType string). + :type linked_service_name: object + :param path: The path for storing the redirect incompatible row data. + Type: string (or Expression with resultType string). + :type path: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'object'}, + 'path': {'key': 'path', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, path=None, **kwargs) -> None: + super(RedirectIncompatibleRowSettings, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.linked_service_name = linked_service_name + self.path = path + + +class RedshiftUnloadSettings(Model): + """The Amazon S3 settings needed for the interim Amazon S3 when copying from + Amazon Redshift with unload. With this, data from Amazon Redshift source + will be unloaded into S3 first and then copied into the targeted sink from + the interim S3. + + All required parameters must be populated in order to send to Azure. + + :param s3_linked_service_name: Required. The name of the Amazon S3 linked + service which will be used for the unload operation when copying from the + Amazon Redshift source. + :type s3_linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param bucket_name: Required. The bucket of the interim Amazon S3 which + will be used to store the unloaded data from Amazon Redshift source. The + bucket must be in the same region as the Amazon Redshift source. Type: + string (or Expression with resultType string). + :type bucket_name: object + """ + + _validation = { + 's3_linked_service_name': {'required': True}, + 'bucket_name': {'required': True}, + } + + _attribute_map = { + 's3_linked_service_name': {'key': 's3LinkedServiceName', 'type': 'LinkedServiceReference'}, + 'bucket_name': {'key': 'bucketName', 'type': 'object'}, + } + + def __init__(self, *, s3_linked_service_name, bucket_name, **kwargs) -> None: + super(RedshiftUnloadSettings, self).__init__(**kwargs) + self.s3_linked_service_name = s3_linked_service_name + self.bucket_name = bucket_name + + +class RelationalSource(CopySource): + """A copy activity source for various relational databases. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: Database query. Type: string (or Expression with resultType + string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(RelationalSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'RelationalSource' + + +class RelationalTableDataset(Dataset): + """The relational table dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The relational table name. Type: string (or Expression + with resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: + super(RelationalTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.type = 'RelationalTable' + + +class RerunTriggerResource(SubResource): + """RerunTrigger resource type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar etag: Etag identifies change in the resource. + :vartype etag: str + :param properties: Required. Properties of the rerun trigger. + :type properties: + ~azure.mgmt.datafactory.models.RerunTumblingWindowTrigger + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'RerunTumblingWindowTrigger'}, + } + + def __init__(self, *, properties, **kwargs) -> None: + super(RerunTriggerResource, self).__init__(**kwargs) + self.properties = properties + + +class RerunTumblingWindowTrigger(Trigger): + """Trigger that schedules pipeline reruns for all fixed time interval windows + from a requested start time to requested end time. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Trigger description. + :type description: str + :ivar runtime_state: Indicates if trigger is running or not. Updated when + Start/Stop APIs are called on the Trigger. Possible values include: + 'Started', 'Stopped', 'Disabled' + :vartype runtime_state: str or + ~azure.mgmt.datafactory.models.TriggerRuntimeState + :param annotations: List of tags that can be used for describing the + trigger. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param parent_trigger: The parent trigger reference. + :type parent_trigger: object + :param requested_start_time: Required. The start time for the time period + for which restatement is initiated. Only UTC time is currently supported. + :type requested_start_time: datetime + :param requested_end_time: Required. The end time for the time period for + which restatement is initiated. Only UTC time is currently supported. + :type requested_end_time: datetime + :param max_concurrency: Required. The max number of parallel time windows + (ready for execution) for which a rerun is triggered. + :type max_concurrency: int + """ + + _validation = { + 'runtime_state': {'readonly': True}, + 'type': {'required': True}, + 'requested_start_time': {'required': True}, + 'requested_end_time': {'required': True}, + 'max_concurrency': {'required': True, 'maximum': 50, 'minimum': 1}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'runtime_state': {'key': 'runtimeState', 'type': 'str'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'parent_trigger': {'key': 'typeProperties.parentTrigger', 'type': 'object'}, + 'requested_start_time': {'key': 'typeProperties.requestedStartTime', 'type': 'iso-8601'}, + 'requested_end_time': {'key': 'typeProperties.requestedEndTime', 'type': 'iso-8601'}, + 'max_concurrency': {'key': 'typeProperties.maxConcurrency', 'type': 'int'}, + } + + def __init__(self, *, requested_start_time, requested_end_time, max_concurrency: int, additional_properties=None, description: str=None, annotations=None, parent_trigger=None, **kwargs) -> None: + super(RerunTumblingWindowTrigger, self).__init__(additional_properties=additional_properties, description=description, annotations=annotations, **kwargs) + self.parent_trigger = parent_trigger + self.requested_start_time = requested_start_time + self.requested_end_time = requested_end_time + self.max_concurrency = max_concurrency + self.type = 'RerunTumblingWindowTrigger' + + +class RerunTumblingWindowTriggerActionParameters(Model): + """Rerun tumbling window trigger Parameters. + + All required parameters must be populated in order to send to Azure. + + :param start_time: Required. The start time for the time period for which + restatement is initiated. Only UTC time is currently supported. + :type start_time: datetime + :param end_time: Required. The end time for the time period for which + restatement is initiated. Only UTC time is currently supported. + :type end_time: datetime + :param max_concurrency: Required. The max number of parallel time windows + (ready for execution) for which a rerun is triggered. + :type max_concurrency: int + """ + + _validation = { + 'start_time': {'required': True}, + 'end_time': {'required': True}, + 'max_concurrency': {'required': True, 'maximum': 50, 'minimum': 1}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'max_concurrency': {'key': 'maxConcurrency', 'type': 'int'}, + } + + def __init__(self, *, start_time, end_time, max_concurrency: int, **kwargs) -> None: + super(RerunTumblingWindowTriggerActionParameters, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time + self.max_concurrency = max_concurrency + + +class ResponsysLinkedService(LinkedService): + """Responsys linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param endpoint: Required. The endpoint of the Responsys server. + :type endpoint: object + :param client_id: Required. The client ID associated with the Responsys + application. Type: string (or Expression with resultType string). + :type client_id: object + :param client_secret: The client secret associated with the Responsys + application. Type: string (or Expression with resultType string). + :type client_secret: ~azure.mgmt.datafactory.models.SecretBase + :param use_encrypted_endpoints: Specifies whether the data source + endpoints are encrypted using HTTPS. The default value is true. Type: + boolean (or Expression with resultType boolean). + :type use_encrypted_endpoints: object + :param use_host_verification: Specifies whether to require the host name + in the server's certificate to match the host name of the server when + connecting over SSL. The default value is true. Type: boolean (or + Expression with resultType boolean). + :type use_host_verification: object + :param use_peer_verification: Specifies whether to verify the identity of + the server when connecting over SSL. The default value is true. Type: + boolean (or Expression with resultType boolean). + :type use_peer_verification: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'endpoint': {'required': True}, + 'client_id': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'endpoint': {'key': 'typeProperties.endpoint', 'type': 'object'}, + 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, + 'client_secret': {'key': 'typeProperties.clientSecret', 'type': 'SecretBase'}, + 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, + 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, + 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, endpoint, client_id, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, client_secret=None, use_encrypted_endpoints=None, use_host_verification=None, use_peer_verification=None, encrypted_credential=None, **kwargs) -> None: + super(ResponsysLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.endpoint = endpoint + self.client_id = client_id + self.client_secret = client_secret + self.use_encrypted_endpoints = use_encrypted_endpoints + self.use_host_verification = use_host_verification + self.use_peer_verification = use_peer_verification + self.encrypted_credential = encrypted_credential + self.type = 'Responsys' + + +class ResponsysObjectDataset(Dataset): + """Responsys dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: + super(ResponsysObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.type = 'ResponsysObject' + + +class ResponsysSource(CopySource): + """A copy activity Responsys source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(ResponsysSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'ResponsysSource' + + +class RestResourceDataset(Dataset): + """A Rest service dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param relative_url: The relative URL to the resource that the RESTful API + provides. Type: string (or Expression with resultType string). + :type relative_url: object + :param request_method: The HTTP method used to call the RESTful API. The + default is GET. Type: string (or Expression with resultType string). + :type request_method: object + :param request_body: The HTTP request body to the RESTful API if + requestMethod is POST. Type: string (or Expression with resultType + string). + :type request_body: object + :param additional_headers: The additional HTTP headers in the request to + the RESTful API. Type: string (or Expression with resultType string). + :type additional_headers: object + :param pagination_rules: The pagination rules to compose next page + requests. Type: string (or Expression with resultType string). + :type pagination_rules: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'relative_url': {'key': 'typeProperties.relativeUrl', 'type': 'object'}, + 'request_method': {'key': 'typeProperties.requestMethod', 'type': 'object'}, + 'request_body': {'key': 'typeProperties.requestBody', 'type': 'object'}, + 'additional_headers': {'key': 'typeProperties.additionalHeaders', 'type': 'object'}, + 'pagination_rules': {'key': 'typeProperties.paginationRules', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, relative_url=None, request_method=None, request_body=None, additional_headers=None, pagination_rules=None, **kwargs) -> None: + super(RestResourceDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.relative_url = relative_url + self.request_method = request_method + self.request_body = request_body + self.additional_headers = additional_headers + self.pagination_rules = pagination_rules + self.type = 'RestResource' + + +class RestServiceLinkedService(LinkedService): + """Rest Service linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param url: Required. The base URL of the REST service. + :type url: object + :param enable_server_certificate_validation: Whether to validate server + side SSL certificate when connecting to the endpoint.The default value is + true. Type: boolean (or Expression with resultType boolean). + :type enable_server_certificate_validation: object + :param authentication_type: Required. Type of authentication used to + connect to the REST service. Possible values include: 'Anonymous', + 'Basic', 'AadServicePrincipal', 'ManagedServiceIdentity' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.RestServiceAuthenticationType + :param user_name: The user name used in Basic authentication type. + :type user_name: object + :param password: The password used in Basic authentication type. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param service_principal_id: The application's client ID used in + AadServicePrincipal authentication type. + :type service_principal_id: object + :param service_principal_key: The application's key used in + AadServicePrincipal authentication type. + :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase + :param tenant: The tenant information (domain name or tenant ID) used in + AadServicePrincipal authentication type under which your application + resides. + :type tenant: object + :param aad_resource_id: The resource you are requesting authorization to + use. + :type aad_resource_id: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'url': {'required': True}, + 'authentication_type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'url': {'key': 'typeProperties.url', 'type': 'object'}, + 'enable_server_certificate_validation': {'key': 'typeProperties.enableServerCertificateValidation', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, + 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, + 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, + 'aad_resource_id': {'key': 'typeProperties.aadResourceId', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, url, authentication_type, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, enable_server_certificate_validation=None, user_name=None, password=None, service_principal_id=None, service_principal_key=None, tenant=None, aad_resource_id=None, encrypted_credential=None, **kwargs) -> None: + super(RestServiceLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.url = url + self.enable_server_certificate_validation = enable_server_certificate_validation + self.authentication_type = authentication_type + self.user_name = user_name + self.password = password + self.service_principal_id = service_principal_id + self.service_principal_key = service_principal_key + self.tenant = tenant + self.aad_resource_id = aad_resource_id + self.encrypted_credential = encrypted_credential + self.type = 'RestService' + + +class RestSource(CopySource): + """A copy activity Rest service source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param request_method: The HTTP method used to call the RESTful API. The + default is GET. Type: string (or Expression with resultType string). + :type request_method: object + :param request_body: The HTTP request body to the RESTful API if + requestMethod is POST. Type: string (or Expression with resultType + string). + :type request_body: object + :param additional_headers: The additional HTTP headers in the request to + the RESTful API. Type: string (or Expression with resultType string). + :type additional_headers: object + :param pagination_rules: The pagination rules to compose next page + requests. Type: string (or Expression with resultType string). + :type pagination_rules: object + :param http_request_timeout: The timeout (TimeSpan) to get an HTTP + response. It is the timeout to get a response, not the timeout to read + response data. Default value: 00:01:40. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type http_request_timeout: object + :param request_interval: The time to await before sending next page + request. + :type request_interval: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'request_method': {'key': 'requestMethod', 'type': 'object'}, + 'request_body': {'key': 'requestBody', 'type': 'object'}, + 'additional_headers': {'key': 'additionalHeaders', 'type': 'object'}, + 'pagination_rules': {'key': 'paginationRules', 'type': 'object'}, + 'http_request_timeout': {'key': 'httpRequestTimeout', 'type': 'object'}, + 'request_interval': {'key': 'requestInterval', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, request_method=None, request_body=None, additional_headers=None, pagination_rules=None, http_request_timeout=None, request_interval=None, **kwargs) -> None: + super(RestSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.request_method = request_method + self.request_body = request_body + self.additional_headers = additional_headers + self.pagination_rules = pagination_rules + self.http_request_timeout = http_request_timeout + self.request_interval = request_interval + self.type = 'RestSource' + + +class RetryPolicy(Model): + """Execution policy for an activity. + + :param count: Maximum ordinary retry attempts. Default is 0. Type: integer + (or Expression with resultType integer), minimum: 0. + :type count: object + :param interval_in_seconds: Interval between retries in seconds. Default + is 30. + :type interval_in_seconds: int + """ + + _validation = { + 'interval_in_seconds': {'maximum': 86400, 'minimum': 30}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'object'}, + 'interval_in_seconds': {'key': 'intervalInSeconds', 'type': 'int'}, + } + + def __init__(self, *, count=None, interval_in_seconds: int=None, **kwargs) -> None: + super(RetryPolicy, self).__init__(**kwargs) + self.count = count + self.interval_in_seconds = interval_in_seconds + + +class RunFilterParameters(Model): + """Query parameters for listing runs. + + All required parameters must be populated in order to send to Azure. + + :param continuation_token: The continuation token for getting the next + page of results. Null for first page. + :type continuation_token: str + :param last_updated_after: Required. The time at or after which the run + event was updated in 'ISO 8601' format. + :type last_updated_after: datetime + :param last_updated_before: Required. The time at or before which the run + event was updated in 'ISO 8601' format. + :type last_updated_before: datetime + :param filters: List of filters. + :type filters: list[~azure.mgmt.datafactory.models.RunQueryFilter] + :param order_by: List of OrderBy option. + :type order_by: list[~azure.mgmt.datafactory.models.RunQueryOrderBy] + """ + + _validation = { + 'last_updated_after': {'required': True}, + 'last_updated_before': {'required': True}, + } + + _attribute_map = { + 'continuation_token': {'key': 'continuationToken', 'type': 'str'}, + 'last_updated_after': {'key': 'lastUpdatedAfter', 'type': 'iso-8601'}, + 'last_updated_before': {'key': 'lastUpdatedBefore', 'type': 'iso-8601'}, + 'filters': {'key': 'filters', 'type': '[RunQueryFilter]'}, + 'order_by': {'key': 'orderBy', 'type': '[RunQueryOrderBy]'}, + } + + def __init__(self, *, last_updated_after, last_updated_before, continuation_token: str=None, filters=None, order_by=None, **kwargs) -> None: + super(RunFilterParameters, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.last_updated_after = last_updated_after + self.last_updated_before = last_updated_before + self.filters = filters + self.order_by = order_by + + +class RunQueryFilter(Model): + """Query filter option for listing runs. + + All required parameters must be populated in order to send to Azure. + + :param operand: Required. Parameter name to be used for filter. The + allowed operands to query pipeline runs are PipelineName, RunStart, RunEnd + and Status; to query activity runs are ActivityName, ActivityRunStart, + ActivityRunEnd, ActivityType and Status, and to query trigger runs are + TriggerName, TriggerRunTimestamp and Status. Possible values include: + 'PipelineName', 'Status', 'RunStart', 'RunEnd', 'ActivityName', + 'ActivityRunStart', 'ActivityRunEnd', 'ActivityType', 'TriggerName', + 'TriggerRunTimestamp', 'RunGroupId', 'LatestOnly' + :type operand: str or ~azure.mgmt.datafactory.models.RunQueryFilterOperand + :param operator: Required. Operator to be used for filter. Possible values + include: 'Equals', 'NotEquals', 'In', 'NotIn' + :type operator: str or + ~azure.mgmt.datafactory.models.RunQueryFilterOperator + :param values: Required. List of filter values. + :type values: list[str] + """ + + _validation = { + 'operand': {'required': True}, + 'operator': {'required': True}, + 'values': {'required': True}, + } + + _attribute_map = { + 'operand': {'key': 'operand', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, *, operand, operator, values, **kwargs) -> None: + super(RunQueryFilter, self).__init__(**kwargs) + self.operand = operand + self.operator = operator + self.values = values + + +class RunQueryOrderBy(Model): + """An object to provide order by options for listing runs. + + All required parameters must be populated in order to send to Azure. + + :param order_by: Required. Parameter name to be used for order by. The + allowed parameters to order by for pipeline runs are PipelineName, + RunStart, RunEnd and Status; for activity runs are ActivityName, + ActivityRunStart, ActivityRunEnd and Status; for trigger runs are + TriggerName, TriggerRunTimestamp and Status. Possible values include: + 'RunStart', 'RunEnd', 'PipelineName', 'Status', 'ActivityName', + 'ActivityRunStart', 'ActivityRunEnd', 'TriggerName', 'TriggerRunTimestamp' + :type order_by: str or ~azure.mgmt.datafactory.models.RunQueryOrderByField + :param order: Required. Sorting order of the parameter. Possible values + include: 'ASC', 'DESC' + :type order: str or ~azure.mgmt.datafactory.models.RunQueryOrder + """ + + _validation = { + 'order_by': {'required': True}, + 'order': {'required': True}, + } + + _attribute_map = { + 'order_by': {'key': 'orderBy', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'str'}, + } + + def __init__(self, *, order_by, order, **kwargs) -> None: + super(RunQueryOrderBy, self).__init__(**kwargs) + self.order_by = order_by + self.order = order + + +class SalesforceLinkedService(LinkedService): + """Linked service for Salesforce. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param environment_url: The URL of Salesforce instance. Default is + 'https://login.salesforce.com'. To copy data from sandbox, specify + 'https://test.salesforce.com'. To copy data from custom domain, specify, + for example, 'https://[domain].my.salesforce.com'. Type: string (or + Expression with resultType string). + :type environment_url: object + :param username: The username for Basic authentication of the Salesforce + instance. Type: string (or Expression with resultType string). + :type username: object + :param password: The password for Basic authentication of the Salesforce + instance. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param security_token: The security token is required to remotely access + Salesforce instance. + :type security_token: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'environment_url': {'key': 'typeProperties.environmentUrl', 'type': 'object'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'security_token': {'key': 'typeProperties.securityToken', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, environment_url=None, username=None, password=None, security_token=None, encrypted_credential=None, **kwargs) -> None: + super(SalesforceLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.environment_url = environment_url + self.username = username + self.password = password + self.security_token = security_token + self.encrypted_credential = encrypted_credential + self.type = 'Salesforce' + + +class SalesforceMarketingCloudLinkedService(LinkedService): + """Salesforce Marketing Cloud linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param client_id: Required. The client ID associated with the Salesforce + Marketing Cloud application. Type: string (or Expression with resultType + string). + :type client_id: object + :param client_secret: The client secret associated with the Salesforce + Marketing Cloud application. Type: string (or Expression with resultType + string). + :type client_secret: ~azure.mgmt.datafactory.models.SecretBase + :param use_encrypted_endpoints: Specifies whether the data source + endpoints are encrypted using HTTPS. The default value is true. Type: + boolean (or Expression with resultType boolean). + :type use_encrypted_endpoints: object + :param use_host_verification: Specifies whether to require the host name + in the server's certificate to match the host name of the server when + connecting over SSL. The default value is true. Type: boolean (or + Expression with resultType boolean). + :type use_host_verification: object + :param use_peer_verification: Specifies whether to verify the identity of + the server when connecting over SSL. The default value is true. Type: + boolean (or Expression with resultType boolean). + :type use_peer_verification: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'client_id': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, + 'client_secret': {'key': 'typeProperties.clientSecret', 'type': 'SecretBase'}, + 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, + 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, + 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, client_id, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, client_secret=None, use_encrypted_endpoints=None, use_host_verification=None, use_peer_verification=None, encrypted_credential=None, **kwargs) -> None: + super(SalesforceMarketingCloudLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.client_id = client_id + self.client_secret = client_secret + self.use_encrypted_endpoints = use_encrypted_endpoints + self.use_host_verification = use_host_verification + self.use_peer_verification = use_peer_verification + self.encrypted_credential = encrypted_credential + self.type = 'SalesforceMarketingCloud' + + +class SalesforceMarketingCloudObjectDataset(Dataset): + """Salesforce Marketing Cloud dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: + super(SalesforceMarketingCloudObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.type = 'SalesforceMarketingCloudObject' + + +class SalesforceMarketingCloudSource(CopySource): + """A copy activity Salesforce Marketing Cloud source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(SalesforceMarketingCloudSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'SalesforceMarketingCloudSource' + + +class SalesforceObjectDataset(Dataset): + """The Salesforce object dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param object_api_name: The Salesforce object API name. Type: string (or + Expression with resultType string). + :type object_api_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'object_api_name': {'key': 'typeProperties.objectApiName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, object_api_name=None, **kwargs) -> None: + super(SalesforceObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.object_api_name = object_api_name + self.type = 'SalesforceObject' + + +class SalesforceServiceCloudLinkedService(LinkedService): + """Linked service for Salesforce Service Cloud. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param environment_url: The URL of Salesforce Service Cloud instance. + Default is 'https://login.salesforce.com'. To copy data from sandbox, + specify 'https://test.salesforce.com'. To copy data from custom domain, + specify, for example, 'https://[domain].my.salesforce.com'. Type: string + (or Expression with resultType string). + :type environment_url: object + :param username: The username for Basic authentication of the Salesforce + instance. Type: string (or Expression with resultType string). + :type username: object + :param password: The password for Basic authentication of the Salesforce + instance. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param security_token: The security token is required to remotely access + Salesforce instance. + :type security_token: ~azure.mgmt.datafactory.models.SecretBase + :param extended_properties: Extended properties appended to the connection + string. Type: string (or Expression with resultType string). + :type extended_properties: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'environment_url': {'key': 'typeProperties.environmentUrl', 'type': 'object'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'security_token': {'key': 'typeProperties.securityToken', 'type': 'SecretBase'}, + 'extended_properties': {'key': 'typeProperties.extendedProperties', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, environment_url=None, username=None, password=None, security_token=None, extended_properties=None, encrypted_credential=None, **kwargs) -> None: + super(SalesforceServiceCloudLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.environment_url = environment_url + self.username = username + self.password = password + self.security_token = security_token + self.extended_properties = extended_properties + self.encrypted_credential = encrypted_credential + self.type = 'SalesforceServiceCloud' + + +class SalesforceServiceCloudObjectDataset(Dataset): + """The Salesforce Service Cloud object dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param object_api_name: The Salesforce Service Cloud object API name. + Type: string (or Expression with resultType string). + :type object_api_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'object_api_name': {'key': 'typeProperties.objectApiName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, object_api_name=None, **kwargs) -> None: + super(SalesforceServiceCloudObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.object_api_name = object_api_name + self.type = 'SalesforceServiceCloudObject' + + +class SalesforceServiceCloudSink(CopySink): + """A copy activity Salesforce Service Cloud sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param write_behavior: The write behavior for the operation. Default is + Insert. Possible values include: 'Insert', 'Upsert' + :type write_behavior: str or + ~azure.mgmt.datafactory.models.SalesforceSinkWriteBehavior + :param external_id_field_name: The name of the external ID field for + upsert operation. Default value is 'Id' column. Type: string (or + Expression with resultType string). + :type external_id_field_name: object + :param ignore_null_values: The flag indicating whether or not to ignore + null values from input dataset (except key fields) during write operation. + Default value is false. If set it to true, it means ADF will leave the + data in the destination object unchanged when doing upsert/update + operation and insert defined default value when doing insert operation, + versus ADF will update the data in the destination object to NULL when + doing upsert/update operation and insert NULL value when doing insert + operation. Type: boolean (or Expression with resultType boolean). + :type ignore_null_values: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'write_behavior': {'key': 'writeBehavior', 'type': 'str'}, + 'external_id_field_name': {'key': 'externalIdFieldName', 'type': 'object'}, + 'ignore_null_values': {'key': 'ignoreNullValues', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, max_concurrent_connections=None, write_behavior=None, external_id_field_name=None, ignore_null_values=None, **kwargs) -> None: + super(SalesforceServiceCloudSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.write_behavior = write_behavior + self.external_id_field_name = external_id_field_name + self.ignore_null_values = ignore_null_values + self.type = 'SalesforceServiceCloudSink' + + +class SalesforceServiceCloudSource(CopySource): + """A copy activity Salesforce Service Cloud source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: Database query. Type: string (or Expression with resultType + string). + :type query: object + :param read_behavior: The read behavior for the operation. Default is + Query. Possible values include: 'Query', 'QueryAll' + :type read_behavior: str or + ~azure.mgmt.datafactory.models.SalesforceSourceReadBehavior + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + 'read_behavior': {'key': 'readBehavior', 'type': 'str'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, read_behavior=None, **kwargs) -> None: + super(SalesforceServiceCloudSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.read_behavior = read_behavior + self.type = 'SalesforceServiceCloudSource' + + +class SalesforceSink(CopySink): + """A copy activity Salesforce sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param write_behavior: The write behavior for the operation. Default is + Insert. Possible values include: 'Insert', 'Upsert' + :type write_behavior: str or + ~azure.mgmt.datafactory.models.SalesforceSinkWriteBehavior + :param external_id_field_name: The name of the external ID field for + upsert operation. Default value is 'Id' column. Type: string (or + Expression with resultType string). + :type external_id_field_name: object + :param ignore_null_values: The flag indicating whether or not to ignore + null values from input dataset (except key fields) during write operation. + Default value is false. If set it to true, it means ADF will leave the + data in the destination object unchanged when doing upsert/update + operation and insert defined default value when doing insert operation, + versus ADF will update the data in the destination object to NULL when + doing upsert/update operation and insert NULL value when doing insert + operation. Type: boolean (or Expression with resultType boolean). + :type ignore_null_values: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'write_behavior': {'key': 'writeBehavior', 'type': 'str'}, + 'external_id_field_name': {'key': 'externalIdFieldName', 'type': 'object'}, + 'ignore_null_values': {'key': 'ignoreNullValues', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, max_concurrent_connections=None, write_behavior=None, external_id_field_name=None, ignore_null_values=None, **kwargs) -> None: + super(SalesforceSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.write_behavior = write_behavior + self.external_id_field_name = external_id_field_name + self.ignore_null_values = ignore_null_values + self.type = 'SalesforceSink' + + +class SalesforceSource(CopySource): + """A copy activity Salesforce source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: Database query. Type: string (or Expression with resultType + string). + :type query: object + :param read_behavior: The read behavior for the operation. Default is + Query. Possible values include: 'Query', 'QueryAll' + :type read_behavior: str or + ~azure.mgmt.datafactory.models.SalesforceSourceReadBehavior + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + 'read_behavior': {'key': 'readBehavior', 'type': 'str'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, read_behavior=None, **kwargs) -> None: + super(SalesforceSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.read_behavior = read_behavior + self.type = 'SalesforceSource' + + +class SapBwCubeDataset(Dataset): + """The SAP BW cube dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, **kwargs) -> None: + super(SapBwCubeDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.type = 'SapBwCube' + + +class SapBWLinkedService(LinkedService): + """SAP Business Warehouse Linked Service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param server: Required. Host name of the SAP BW instance. Type: string + (or Expression with resultType string). + :type server: object + :param system_number: Required. System number of the BW system. (Usually a + two-digit decimal number represented as a string.) Type: string (or + Expression with resultType string). + :type system_number: object + :param client_id: Required. Client ID of the client on the BW system. + (Usually a three-digit decimal number represented as a string) Type: + string (or Expression with resultType string). + :type client_id: object + :param user_name: Username to access the SAP BW server. Type: string (or + Expression with resultType string). + :type user_name: object + :param password: Password to access the SAP BW server. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'server': {'required': True}, + 'system_number': {'required': True}, + 'client_id': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server': {'key': 'typeProperties.server', 'type': 'object'}, + 'system_number': {'key': 'typeProperties.systemNumber', 'type': 'object'}, + 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, + 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, server, system_number, client_id, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, user_name=None, password=None, encrypted_credential=None, **kwargs) -> None: + super(SapBWLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.server = server + self.system_number = system_number + self.client_id = client_id + self.user_name = user_name + self.password = password + self.encrypted_credential = encrypted_credential + self.type = 'SapBW' + + +class SapBwSource(CopySource): + """A copy activity source for SapBW server via MDX. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: MDX query. Type: string (or Expression with resultType + string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(SapBwSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'SapBwSource' + + +class SapCloudForCustomerLinkedService(LinkedService): + """Linked service for SAP Cloud for Customer. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param url: Required. The URL of SAP Cloud for Customer OData API. For + example, '[https://[tenantname].crm.ondemand.com/sap/c4c/odata/v1]'. Type: + string (or Expression with resultType string). + :type url: object + :param username: The username for Basic authentication. Type: string (or + Expression with resultType string). + :type username: object + :param password: The password for Basic authentication. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Either encryptedCredential or username/password must + be provided. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'url': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'url': {'key': 'typeProperties.url', 'type': 'object'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, url, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, username=None, password=None, encrypted_credential=None, **kwargs) -> None: + super(SapCloudForCustomerLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.url = url + self.username = username + self.password = password + self.encrypted_credential = encrypted_credential + self.type = 'SapCloudForCustomer' + + +class SapCloudForCustomerResourceDataset(Dataset): + """The path of the SAP Cloud for Customer OData entity. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param path: Required. The path of the SAP Cloud for Customer OData + entity. Type: string (or Expression with resultType string). + :type path: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + 'path': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'path': {'key': 'typeProperties.path', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, path, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, **kwargs) -> None: + super(SapCloudForCustomerResourceDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.path = path + self.type = 'SapCloudForCustomerResource' + + +class SapCloudForCustomerSink(CopySink): + """A copy activity SAP Cloud for Customer sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param write_behavior: The write behavior for the operation. Default is + 'Insert'. Possible values include: 'Insert', 'Update' + :type write_behavior: str or + ~azure.mgmt.datafactory.models.SapCloudForCustomerSinkWriteBehavior + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'write_behavior': {'key': 'writeBehavior', 'type': 'str'}, + } + + def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, max_concurrent_connections=None, write_behavior=None, **kwargs) -> None: + super(SapCloudForCustomerSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.write_behavior = write_behavior + self.type = 'SapCloudForCustomerSink' + + +class SapCloudForCustomerSource(CopySource): + """A copy activity source for SAP Cloud for Customer source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: SAP Cloud for Customer OData query. For example, "$top=1". + Type: string (or Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(SapCloudForCustomerSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'SapCloudForCustomerSource' + + +class SapEccLinkedService(LinkedService): + """Linked service for SAP ERP Central Component(SAP ECC). + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param url: Required. The URL of SAP ECC OData API. For example, + '[https://hostname:port/sap/opu/odata/sap/servicename/]'. Type: string (or + Expression with resultType string). + :type url: str + :param username: The username for Basic authentication. Type: string (or + Expression with resultType string). + :type username: str + :param password: The password for Basic authentication. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Either encryptedCredential or username/password must + be provided. Type: string (or Expression with resultType string). + :type encrypted_credential: str + """ + + _validation = { + 'type': {'required': True}, + 'url': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'url': {'key': 'typeProperties.url', 'type': 'str'}, + 'username': {'key': 'typeProperties.username', 'type': 'str'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'str'}, + } + + def __init__(self, *, url: str, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, username: str=None, password=None, encrypted_credential: str=None, **kwargs) -> None: + super(SapEccLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.url = url + self.username = username + self.password = password + self.encrypted_credential = encrypted_credential + self.type = 'SapEcc' + + +class SapEccResourceDataset(Dataset): + """The path of the SAP ECC OData entity. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param path: Required. The path of the SAP ECC OData entity. Type: string + (or Expression with resultType string). + :type path: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + 'path': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'path': {'key': 'typeProperties.path', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, path, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, **kwargs) -> None: + super(SapEccResourceDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.path = path + self.type = 'SapEccResource' + + +class SapEccSource(CopySource): + """A copy activity source for SAP ECC source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: SAP ECC OData query. For example, "$top=1". Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(SapEccSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'SapEccSource' + + +class SapHanaLinkedService(LinkedService): + """SAP HANA Linked Service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: SAP HANA ODBC connection string. Type: string, + SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param server: Required. Host name of the SAP HANA server. Type: string + (or Expression with resultType string). + :type server: object + :param authentication_type: The authentication type to be used to connect + to the SAP HANA server. Possible values include: 'Basic', 'Windows' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.SapHanaAuthenticationType + :param user_name: Username to access the SAP HANA server. Type: string (or + Expression with resultType string). + :type user_name: object + :param password: Password to access the SAP HANA server. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'server': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'server': {'key': 'typeProperties.server', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, server, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, connection_string=None, authentication_type=None, user_name=None, password=None, encrypted_credential=None, **kwargs) -> None: + super(SapHanaLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.connection_string = connection_string + self.server = server + self.authentication_type = authentication_type + self.user_name = user_name + self.password = password + self.encrypted_credential = encrypted_credential + self.type = 'SapHana' + + +class SapHanaSource(CopySource): + """A copy activity source for SAP HANA source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: SAP HANA Sql query. Type: string (or Expression with + resultType string). + :type query: object + :param packet_size: The packet size of data read from SAP HANA. Type: + integer(or Expression with resultType integer). + :type packet_size: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + 'packet_size': {'key': 'packetSize', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, packet_size=None, **kwargs) -> None: + super(SapHanaSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.packet_size = packet_size + self.type = 'SapHanaSource' + + +class SapHanaTableDataset(Dataset): + """SAP HANA Table properties. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param sap_hana_table_dataset_schema: The schema name of SAP HANA. Type: + string (or Expression with resultType string). + :type sap_hana_table_dataset_schema: object + :param table: The table name of SAP HANA. Type: string (or Expression with + resultType string). + :type table: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sap_hana_table_dataset_schema': {'key': 'typeProperties.schema', 'type': 'object'}, + 'table': {'key': 'typeProperties.table', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, sap_hana_table_dataset_schema=None, table=None, **kwargs) -> None: + super(SapHanaTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.sap_hana_table_dataset_schema = sap_hana_table_dataset_schema + self.table = table + self.type = 'SapHanaTable' + + +class SapOpenHubLinkedService(LinkedService): + """SAP Business Warehouse Open Hub Destination Linked Service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param server: Required. Host name of the SAP BW instance where the open + hub destination is located. Type: string (or Expression with resultType + string). + :type server: object + :param system_number: Required. System number of the BW system where the + open hub destination is located. (Usually a two-digit decimal number + represented as a string.) Type: string (or Expression with resultType + string). + :type system_number: object + :param client_id: Required. Client ID of the client on the BW system where + the open hub destination is located. (Usually a three-digit decimal number + represented as a string) Type: string (or Expression with resultType + string). + :type client_id: object + :param language: Language of the BW system where the open hub destination + is located. The default value is EN. Type: string (or Expression with + resultType string). + :type language: object + :param user_name: Username to access the SAP BW server where the open hub + destination is located. Type: string (or Expression with resultType + string). + :type user_name: object + :param password: Password to access the SAP BW server where the open hub + destination is located. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'server': {'required': True}, + 'system_number': {'required': True}, + 'client_id': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server': {'key': 'typeProperties.server', 'type': 'object'}, + 'system_number': {'key': 'typeProperties.systemNumber', 'type': 'object'}, + 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, + 'language': {'key': 'typeProperties.language', 'type': 'object'}, + 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, server, system_number, client_id, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, language=None, user_name=None, password=None, encrypted_credential=None, **kwargs) -> None: + super(SapOpenHubLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.server = server + self.system_number = system_number + self.client_id = client_id + self.language = language + self.user_name = user_name + self.password = password + self.encrypted_credential = encrypted_credential + self.type = 'SapOpenHub' + + +class SapOpenHubSource(CopySource): + """A copy activity source for SAP Business Warehouse Open Hub Destination + source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param exclude_last_request: Whether to exclude the records of the last + request. The default value is true. Type: boolean (or Expression with + resultType boolean). + :type exclude_last_request: object + :param base_request_id: The ID of request for delta loading. Once it is + set, only data with requestId larger than the value of this property will + be retrieved. The default value is 0. Type: integer (or Expression with + resultType integer ). + :type base_request_id: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'exclude_last_request': {'key': 'excludeLastRequest', 'type': 'object'}, + 'base_request_id': {'key': 'baseRequestId', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, exclude_last_request=None, base_request_id=None, **kwargs) -> None: + super(SapOpenHubSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.exclude_last_request = exclude_last_request + self.base_request_id = base_request_id + self.type = 'SapOpenHubSource' + + +class SapOpenHubTableDataset(Dataset): + """Sap Business Warehouse Open Hub Destination Table properties. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param open_hub_destination_name: Required. The name of the Open Hub + Destination with destination type as Database Table. Type: string (or + Expression with resultType string). + :type open_hub_destination_name: object + :param exclude_last_request: Whether to exclude the records of the last + request. The default value is true. Type: boolean (or Expression with + resultType boolean). + :type exclude_last_request: object + :param base_request_id: The ID of request for delta loading. Once it is + set, only data with requestId larger than the value of this property will + be retrieved. The default value is 0. Type: integer (or Expression with + resultType integer ). + :type base_request_id: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + 'open_hub_destination_name': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'open_hub_destination_name': {'key': 'typeProperties.openHubDestinationName', 'type': 'object'}, + 'exclude_last_request': {'key': 'typeProperties.excludeLastRequest', 'type': 'object'}, + 'base_request_id': {'key': 'typeProperties.baseRequestId', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, open_hub_destination_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, exclude_last_request=None, base_request_id=None, **kwargs) -> None: + super(SapOpenHubTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.open_hub_destination_name = open_hub_destination_name + self.exclude_last_request = exclude_last_request + self.base_request_id = base_request_id + self.type = 'SapOpenHubTable' + + +class SapTableLinkedService(LinkedService): + """SAP Table Linked Service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param server: Host name of the SAP instance where the table is located. + Type: string (or Expression with resultType string). + :type server: object + :param system_number: System number of the SAP system where the table is + located. (Usually a two-digit decimal number represented as a string.) + Type: string (or Expression with resultType string). + :type system_number: object + :param client_id: Client ID of the client on the SAP system where the + table is located. (Usually a three-digit decimal number represented as a + string) Type: string (or Expression with resultType string). + :type client_id: object + :param language: Language of the SAP system where the table is located. + The default value is EN. Type: string (or Expression with resultType + string). + :type language: object + :param system_id: SystemID of the SAP system where the table is located. + Type: string (or Expression with resultType string). + :type system_id: object + :param user_name: Username to access the SAP server where the table is + located. Type: string (or Expression with resultType string). + :type user_name: object + :param password: Password to access the SAP server where the table is + located. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param message_server: The hostname of the SAP Message Server. Type: + string (or Expression with resultType string). + :type message_server: object + :param message_server_service: The service name or port number of the + Message Server. Type: string (or Expression with resultType string). + :type message_server_service: object + :param snc_mode: SNC activation indicator to access the SAP server where + the table is located. Must be either 0 (off) or 1 (on). Type: string (or + Expression with resultType string). + :type snc_mode: object + :param snc_my_name: Initiator's SNC name to access the SAP server where + the table is located. Type: string (or Expression with resultType string). + :type snc_my_name: object + :param snc_partner_name: Communication partner's SNC name to access the + SAP server where the table is located. Type: string (or Expression with + resultType string). + :type snc_partner_name: object + :param snc_library_path: External security product's library to access the + SAP server where the table is located. Type: string (or Expression with + resultType string). + :type snc_library_path: object + :param snc_qop: SNC Quality of Protection. Allowed value include: 1, 2, 3, + 8, 9. Type: string (or Expression with resultType string). + :type snc_qop: object + :param logon_group: The Logon Group for the SAP System. Type: string (or + Expression with resultType string). + :type logon_group: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server': {'key': 'typeProperties.server', 'type': 'object'}, + 'system_number': {'key': 'typeProperties.systemNumber', 'type': 'object'}, + 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, + 'language': {'key': 'typeProperties.language', 'type': 'object'}, + 'system_id': {'key': 'typeProperties.systemId', 'type': 'object'}, + 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'message_server': {'key': 'typeProperties.messageServer', 'type': 'object'}, + 'message_server_service': {'key': 'typeProperties.messageServerService', 'type': 'object'}, + 'snc_mode': {'key': 'typeProperties.sncMode', 'type': 'object'}, + 'snc_my_name': {'key': 'typeProperties.sncMyName', 'type': 'object'}, + 'snc_partner_name': {'key': 'typeProperties.sncPartnerName', 'type': 'object'}, + 'snc_library_path': {'key': 'typeProperties.sncLibraryPath', 'type': 'object'}, + 'snc_qop': {'key': 'typeProperties.sncQop', 'type': 'object'}, + 'logon_group': {'key': 'typeProperties.logonGroup', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, server=None, system_number=None, client_id=None, language=None, system_id=None, user_name=None, password=None, message_server=None, message_server_service=None, snc_mode=None, snc_my_name=None, snc_partner_name=None, snc_library_path=None, snc_qop=None, logon_group=None, encrypted_credential=None, **kwargs) -> None: + super(SapTableLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.server = server + self.system_number = system_number + self.client_id = client_id + self.language = language + self.system_id = system_id + self.user_name = user_name + self.password = password + self.message_server = message_server + self.message_server_service = message_server_service + self.snc_mode = snc_mode + self.snc_my_name = snc_my_name + self.snc_partner_name = snc_partner_name + self.snc_library_path = snc_library_path + self.snc_qop = snc_qop + self.logon_group = logon_group + self.encrypted_credential = encrypted_credential + self.type = 'SapTable' + + +class SapTablePartitionSettings(Model): + """The settings that will be leveraged for SAP table source partitioning. + + :param partition_column_name: The name of the column that will be used for + proceeding range partitioning. Type: string (or Expression with resultType + string). + :type partition_column_name: object + :param partition_upper_bound: The maximum value of column specified in + partitionColumnName that will be used for proceeding range partitioning. + Type: string (or Expression with resultType string). + :type partition_upper_bound: object + :param partition_lower_bound: The minimum value of column specified in + partitionColumnName that will be used for proceeding range partitioning. + Type: string (or Expression with resultType string). + :type partition_lower_bound: object + :param max_partitions_number: The maximum value of partitions the table + will be split into. Type: integer (or Expression with resultType string). + :type max_partitions_number: object + """ + + _attribute_map = { + 'partition_column_name': {'key': 'partitionColumnName', 'type': 'object'}, + 'partition_upper_bound': {'key': 'partitionUpperBound', 'type': 'object'}, + 'partition_lower_bound': {'key': 'partitionLowerBound', 'type': 'object'}, + 'max_partitions_number': {'key': 'maxPartitionsNumber', 'type': 'object'}, + } + + def __init__(self, *, partition_column_name=None, partition_upper_bound=None, partition_lower_bound=None, max_partitions_number=None, **kwargs) -> None: + super(SapTablePartitionSettings, self).__init__(**kwargs) + self.partition_column_name = partition_column_name + self.partition_upper_bound = partition_upper_bound + self.partition_lower_bound = partition_lower_bound + self.max_partitions_number = max_partitions_number + + +class SapTableResourceDataset(Dataset): + """SAP Table Resource properties. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: Required. The name of the SAP Table. Type: string (or + Expression with resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + 'table_name': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, table_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, **kwargs) -> None: + super(SapTableResourceDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.type = 'SapTableResource' + + +class SapTableSource(CopySource): + """A copy activity source for SAP Table source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param row_count: The number of rows to be retrieved. Type: integer(or + Expression with resultType integer). + :type row_count: object + :param row_skips: The number of rows that will be skipped. Type: integer + (or Expression with resultType integer). + :type row_skips: object + :param rfc_table_fields: The fields of the SAP table that will be + retrieved. For example, column0, column1. Type: string (or Expression with + resultType string). + :type rfc_table_fields: object + :param rfc_table_options: The options for the filtering of the SAP Table. + For example, COLUMN0 EQ SOME VALUE. Type: string (or Expression with + resultType string). + :type rfc_table_options: object + :param batch_size: Specifies the maximum number of rows that will be + retrieved at a time when retrieving data from SAP Table. Type: integer (or + Expression with resultType integer). + :type batch_size: object + :param custom_rfc_read_table_function_module: Specifies the custom RFC + function module that will be used to read data from SAP Table. Type: + string (or Expression with resultType string). + :type custom_rfc_read_table_function_module: object + :param partition_option: The partition mechanism that will be used for SAP + table read in parallel. Possible values include: 'None', 'PartitionOnInt', + 'PartitionOnCalendarYear', 'PartitionOnCalendarMonth', + 'PartitionOnCalendarDate', 'PartitionOnTime' + :type partition_option: str or + ~azure.mgmt.datafactory.models.SapTablePartitionOption + :param partition_settings: The settings that will be leveraged for SAP + table source partitioning. + :type partition_settings: + ~azure.mgmt.datafactory.models.SapTablePartitionSettings + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'row_count': {'key': 'rowCount', 'type': 'object'}, + 'row_skips': {'key': 'rowSkips', 'type': 'object'}, + 'rfc_table_fields': {'key': 'rfcTableFields', 'type': 'object'}, + 'rfc_table_options': {'key': 'rfcTableOptions', 'type': 'object'}, + 'batch_size': {'key': 'batchSize', 'type': 'object'}, + 'custom_rfc_read_table_function_module': {'key': 'customRfcReadTableFunctionModule', 'type': 'object'}, + 'partition_option': {'key': 'partitionOption', 'type': 'str'}, + 'partition_settings': {'key': 'partitionSettings', 'type': 'SapTablePartitionSettings'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, row_count=None, row_skips=None, rfc_table_fields=None, rfc_table_options=None, batch_size=None, custom_rfc_read_table_function_module=None, partition_option=None, partition_settings=None, **kwargs) -> None: + super(SapTableSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.row_count = row_count + self.row_skips = row_skips + self.rfc_table_fields = rfc_table_fields + self.rfc_table_options = rfc_table_options + self.batch_size = batch_size + self.custom_rfc_read_table_function_module = custom_rfc_read_table_function_module + self.partition_option = partition_option + self.partition_settings = partition_settings + self.type = 'SapTableSource' + + +class ScheduleTrigger(MultiplePipelineTrigger): + """Trigger that creates pipeline runs periodically, on schedule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Trigger description. + :type description: str + :ivar runtime_state: Indicates if trigger is running or not. Updated when + Start/Stop APIs are called on the Trigger. Possible values include: + 'Started', 'Stopped', 'Disabled' + :vartype runtime_state: str or + ~azure.mgmt.datafactory.models.TriggerRuntimeState + :param annotations: List of tags that can be used for describing the + trigger. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param pipelines: Pipelines that need to be started. + :type pipelines: + list[~azure.mgmt.datafactory.models.TriggerPipelineReference] + :param recurrence: Required. Recurrence schedule configuration. + :type recurrence: ~azure.mgmt.datafactory.models.ScheduleTriggerRecurrence + """ + + _validation = { + 'runtime_state': {'readonly': True}, + 'type': {'required': True}, + 'recurrence': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'runtime_state': {'key': 'runtimeState', 'type': 'str'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'pipelines': {'key': 'pipelines', 'type': '[TriggerPipelineReference]'}, + 'recurrence': {'key': 'typeProperties.recurrence', 'type': 'ScheduleTriggerRecurrence'}, + } + + def __init__(self, *, recurrence, additional_properties=None, description: str=None, annotations=None, pipelines=None, **kwargs) -> None: + super(ScheduleTrigger, self).__init__(additional_properties=additional_properties, description=description, annotations=annotations, pipelines=pipelines, **kwargs) + self.recurrence = recurrence + self.type = 'ScheduleTrigger' + + +class ScheduleTriggerRecurrence(Model): + """The workflow trigger recurrence. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param frequency: The frequency. Possible values include: 'NotSpecified', + 'Minute', 'Hour', 'Day', 'Week', 'Month', 'Year' + :type frequency: str or ~azure.mgmt.datafactory.models.RecurrenceFrequency + :param interval: The interval. + :type interval: int + :param start_time: The start time. + :type start_time: datetime + :param end_time: The end time. + :type end_time: datetime + :param time_zone: The time zone. + :type time_zone: str + :param schedule: The recurrence schedule. + :type schedule: ~azure.mgmt.datafactory.models.RecurrenceSchedule + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'frequency': {'key': 'frequency', 'type': 'str'}, + 'interval': {'key': 'interval', 'type': 'int'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'schedule': {'key': 'schedule', 'type': 'RecurrenceSchedule'}, + } + + def __init__(self, *, additional_properties=None, frequency=None, interval: int=None, start_time=None, end_time=None, time_zone: str=None, schedule=None, **kwargs) -> None: + super(ScheduleTriggerRecurrence, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.frequency = frequency + self.interval = interval + self.start_time = start_time + self.end_time = end_time + self.time_zone = time_zone + self.schedule = schedule + + +class ScriptAction(Model): + """Custom script action to run on HDI ondemand cluster once it's up. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The user provided name of the script action. + :type name: str + :param uri: Required. The URI for the script action. + :type uri: str + :param roles: Required. The node types on which the script action should + be executed. + :type roles: object + :param parameters: The parameters for the script action. + :type parameters: str + """ + + _validation = { + 'name': {'required': True}, + 'uri': {'required': True}, + 'roles': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': 'object'}, + 'parameters': {'key': 'parameters', 'type': 'str'}, + } + + def __init__(self, *, name: str, uri: str, roles, parameters: str=None, **kwargs) -> None: + super(ScriptAction, self).__init__(**kwargs) + self.name = name + self.uri = uri + self.roles = roles + self.parameters = parameters + + +class SecureString(SecretBase): + """Azure Data Factory secure string definition. The string value will be + masked with asterisks '*' during Get or List API calls. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param value: Required. Value of secure string. + :type value: str + """ + + _validation = { + 'type': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, value: str, **kwargs) -> None: + super(SecureString, self).__init__(**kwargs) + self.value = value + self.type = 'SecureString' + + +class SelfDependencyTumblingWindowTriggerReference(DependencyReference): + """Self referenced tumbling window trigger dependency. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param offset: Required. Timespan applied to the start time of a tumbling + window when evaluating dependency. + :type offset: str + :param size: The size of the window when evaluating the dependency. If + undefined the frequency of the tumbling window will be used. + :type size: str + """ + + _validation = { + 'type': {'required': True}, + 'offset': {'required': True, 'max_length': 15, 'min_length': 8, 'pattern': r'((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9]))'}, + 'size': {'max_length': 15, 'min_length': 8, 'pattern': r'((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9]))'}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'offset': {'key': 'offset', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + } + + def __init__(self, *, offset: str, size: str=None, **kwargs) -> None: + super(SelfDependencyTumblingWindowTriggerReference, self).__init__(**kwargs) + self.offset = offset + self.size = size + self.type = 'SelfDependencyTumblingWindowTriggerReference' + + +class SelfHostedIntegrationRuntime(IntegrationRuntime): + """Self-hosted integration runtime. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Integration runtime description. + :type description: str + :param type: Required. Constant filled by server. + :type type: str + :param linked_info: + :type linked_info: + ~azure.mgmt.datafactory.models.LinkedIntegrationRuntimeType + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_info': {'key': 'typeProperties.linkedInfo', 'type': 'LinkedIntegrationRuntimeType'}, + } + + def __init__(self, *, additional_properties=None, description: str=None, linked_info=None, **kwargs) -> None: + super(SelfHostedIntegrationRuntime, self).__init__(additional_properties=additional_properties, description=description, **kwargs) + self.linked_info = linked_info + self.type = 'SelfHosted' + + +class SelfHostedIntegrationRuntimeNode(Model): + """Properties of Self-hosted integration runtime node. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar node_name: Name of the integration runtime node. + :vartype node_name: str + :ivar machine_name: Machine name of the integration runtime node. + :vartype machine_name: str + :ivar host_service_uri: URI for the host machine of the integration + runtime. + :vartype host_service_uri: str + :ivar status: Status of the integration runtime node. Possible values + include: 'NeedRegistration', 'Online', 'Limited', 'Offline', 'Upgrading', + 'Initializing', 'InitializeFailed' + :vartype status: str or + ~azure.mgmt.datafactory.models.SelfHostedIntegrationRuntimeNodeStatus + :ivar capabilities: The integration runtime capabilities dictionary + :vartype capabilities: dict[str, str] + :ivar version_status: Status of the integration runtime node version. + :vartype version_status: str + :ivar version: Version of the integration runtime node. + :vartype version: str + :ivar register_time: The time at which the integration runtime node was + registered in ISO8601 format. + :vartype register_time: datetime + :ivar last_connect_time: The most recent time at which the integration + runtime was connected in ISO8601 format. + :vartype last_connect_time: datetime + :ivar expiry_time: The time at which the integration runtime will expire + in ISO8601 format. + :vartype expiry_time: datetime + :ivar last_start_time: The time the node last started up. + :vartype last_start_time: datetime + :ivar last_stop_time: The integration runtime node last stop time. + :vartype last_stop_time: datetime + :ivar last_update_result: The result of the last integration runtime node + update. Possible values include: 'None', 'Succeed', 'Fail' + :vartype last_update_result: str or + ~azure.mgmt.datafactory.models.IntegrationRuntimeUpdateResult + :ivar last_start_update_time: The last time for the integration runtime + node update start. + :vartype last_start_update_time: datetime + :ivar last_end_update_time: The last time for the integration runtime node + update end. + :vartype last_end_update_time: datetime + :ivar is_active_dispatcher: Indicates whether this node is the active + dispatcher for integration runtime requests. + :vartype is_active_dispatcher: bool + :ivar concurrent_jobs_limit: Maximum concurrent jobs on the integration + runtime node. + :vartype concurrent_jobs_limit: int + :ivar max_concurrent_jobs: The maximum concurrent jobs in this integration + runtime. + :vartype max_concurrent_jobs: int + """ + + _validation = { + 'node_name': {'readonly': True}, + 'machine_name': {'readonly': True}, + 'host_service_uri': {'readonly': True}, + 'status': {'readonly': True}, + 'capabilities': {'readonly': True}, + 'version_status': {'readonly': True}, + 'version': {'readonly': True}, + 'register_time': {'readonly': True}, + 'last_connect_time': {'readonly': True}, + 'expiry_time': {'readonly': True}, + 'last_start_time': {'readonly': True}, + 'last_stop_time': {'readonly': True}, + 'last_update_result': {'readonly': True}, + 'last_start_update_time': {'readonly': True}, + 'last_end_update_time': {'readonly': True}, + 'is_active_dispatcher': {'readonly': True}, + 'concurrent_jobs_limit': {'readonly': True}, + 'max_concurrent_jobs': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'node_name': {'key': 'nodeName', 'type': 'str'}, + 'machine_name': {'key': 'machineName', 'type': 'str'}, + 'host_service_uri': {'key': 'hostServiceUri', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'capabilities': {'key': 'capabilities', 'type': '{str}'}, + 'version_status': {'key': 'versionStatus', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'register_time': {'key': 'registerTime', 'type': 'iso-8601'}, + 'last_connect_time': {'key': 'lastConnectTime', 'type': 'iso-8601'}, + 'expiry_time': {'key': 'expiryTime', 'type': 'iso-8601'}, + 'last_start_time': {'key': 'lastStartTime', 'type': 'iso-8601'}, + 'last_stop_time': {'key': 'lastStopTime', 'type': 'iso-8601'}, + 'last_update_result': {'key': 'lastUpdateResult', 'type': 'str'}, + 'last_start_update_time': {'key': 'lastStartUpdateTime', 'type': 'iso-8601'}, + 'last_end_update_time': {'key': 'lastEndUpdateTime', 'type': 'iso-8601'}, + 'is_active_dispatcher': {'key': 'isActiveDispatcher', 'type': 'bool'}, + 'concurrent_jobs_limit': {'key': 'concurrentJobsLimit', 'type': 'int'}, + 'max_concurrent_jobs': {'key': 'maxConcurrentJobs', 'type': 'int'}, + } + + def __init__(self, *, additional_properties=None, **kwargs) -> None: + super(SelfHostedIntegrationRuntimeNode, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.node_name = None + self.machine_name = None + self.host_service_uri = None + self.status = None + self.capabilities = None + self.version_status = None + self.version = None + self.register_time = None + self.last_connect_time = None + self.expiry_time = None + self.last_start_time = None + self.last_stop_time = None + self.last_update_result = None + self.last_start_update_time = None + self.last_end_update_time = None + self.is_active_dispatcher = None + self.concurrent_jobs_limit = None + self.max_concurrent_jobs = None + + +class SelfHostedIntegrationRuntimeStatus(IntegrationRuntimeStatus): + """Self-hosted integration runtime status. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar data_factory_name: The data factory name which the integration + runtime belong to. + :vartype data_factory_name: str + :ivar state: The state of integration runtime. Possible values include: + 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', + 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied' + :vartype state: str or + ~azure.mgmt.datafactory.models.IntegrationRuntimeState + :param type: Required. Constant filled by server. + :type type: str + :ivar create_time: The time at which the integration runtime was created, + in ISO8601 format. + :vartype create_time: datetime + :ivar task_queue_id: The task queue id of the integration runtime. + :vartype task_queue_id: str + :ivar internal_channel_encryption: It is used to set the encryption mode + for node-node communication channel (when more than 2 self-hosted + integration runtime nodes exist). Possible values include: 'NotSet', + 'SslEncrypted', 'NotEncrypted' + :vartype internal_channel_encryption: str or + ~azure.mgmt.datafactory.models.IntegrationRuntimeInternalChannelEncryptionMode + :ivar version: Version of the integration runtime. + :vartype version: str + :param nodes: The list of nodes for this integration runtime. + :type nodes: + list[~azure.mgmt.datafactory.models.SelfHostedIntegrationRuntimeNode] + :ivar scheduled_update_date: The date at which the integration runtime + will be scheduled to update, in ISO8601 format. + :vartype scheduled_update_date: datetime + :ivar update_delay_offset: The time in the date scheduled by service to + update the integration runtime, e.g., PT03H is 3 hours + :vartype update_delay_offset: str + :ivar local_time_zone_offset: The local time zone offset in hours. + :vartype local_time_zone_offset: str + :ivar capabilities: Object with additional information about integration + runtime capabilities. + :vartype capabilities: dict[str, str] + :ivar service_urls: The URLs for the services used in integration runtime + backend service. + :vartype service_urls: list[str] + :ivar auto_update: Whether Self-hosted integration runtime auto update has + been turned on. Possible values include: 'On', 'Off' + :vartype auto_update: str or + ~azure.mgmt.datafactory.models.IntegrationRuntimeAutoUpdate + :ivar version_status: Status of the integration runtime version. + :vartype version_status: str + :param links: The list of linked integration runtimes that are created to + share with this integration runtime. + :type links: list[~azure.mgmt.datafactory.models.LinkedIntegrationRuntime] + :ivar pushed_version: The version that the integration runtime is going to + update to. + :vartype pushed_version: str + :ivar latest_version: The latest version on download center. + :vartype latest_version: str + :ivar auto_update_eta: The estimated time when the self-hosted integration + runtime will be updated. + :vartype auto_update_eta: datetime + """ + + _validation = { + 'data_factory_name': {'readonly': True}, + 'state': {'readonly': True}, + 'type': {'required': True}, + 'create_time': {'readonly': True}, + 'task_queue_id': {'readonly': True}, + 'internal_channel_encryption': {'readonly': True}, + 'version': {'readonly': True}, + 'scheduled_update_date': {'readonly': True}, + 'update_delay_offset': {'readonly': True}, + 'local_time_zone_offset': {'readonly': True}, + 'capabilities': {'readonly': True}, + 'service_urls': {'readonly': True}, + 'auto_update': {'readonly': True}, + 'version_status': {'readonly': True}, + 'pushed_version': {'readonly': True}, + 'latest_version': {'readonly': True}, + 'auto_update_eta': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'data_factory_name': {'key': 'dataFactoryName', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'create_time': {'key': 'typeProperties.createTime', 'type': 'iso-8601'}, + 'task_queue_id': {'key': 'typeProperties.taskQueueId', 'type': 'str'}, + 'internal_channel_encryption': {'key': 'typeProperties.internalChannelEncryption', 'type': 'str'}, + 'version': {'key': 'typeProperties.version', 'type': 'str'}, + 'nodes': {'key': 'typeProperties.nodes', 'type': '[SelfHostedIntegrationRuntimeNode]'}, + 'scheduled_update_date': {'key': 'typeProperties.scheduledUpdateDate', 'type': 'iso-8601'}, + 'update_delay_offset': {'key': 'typeProperties.updateDelayOffset', 'type': 'str'}, + 'local_time_zone_offset': {'key': 'typeProperties.localTimeZoneOffset', 'type': 'str'}, + 'capabilities': {'key': 'typeProperties.capabilities', 'type': '{str}'}, + 'service_urls': {'key': 'typeProperties.serviceUrls', 'type': '[str]'}, + 'auto_update': {'key': 'typeProperties.autoUpdate', 'type': 'str'}, + 'version_status': {'key': 'typeProperties.versionStatus', 'type': 'str'}, + 'links': {'key': 'typeProperties.links', 'type': '[LinkedIntegrationRuntime]'}, + 'pushed_version': {'key': 'typeProperties.pushedVersion', 'type': 'str'}, + 'latest_version': {'key': 'typeProperties.latestVersion', 'type': 'str'}, + 'auto_update_eta': {'key': 'typeProperties.autoUpdateETA', 'type': 'iso-8601'}, + } + + def __init__(self, *, additional_properties=None, nodes=None, links=None, **kwargs) -> None: + super(SelfHostedIntegrationRuntimeStatus, self).__init__(additional_properties=additional_properties, **kwargs) + self.create_time = None + self.task_queue_id = None + self.internal_channel_encryption = None + self.version = None + self.nodes = nodes + self.scheduled_update_date = None + self.update_delay_offset = None + self.local_time_zone_offset = None + self.capabilities = None + self.service_urls = None + self.auto_update = None + self.version_status = None + self.links = links + self.pushed_version = None + self.latest_version = None + self.auto_update_eta = None + self.type = 'SelfHosted' + + +class ServiceNowLinkedService(LinkedService): + """ServiceNow server linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param endpoint: Required. The endpoint of the ServiceNow server. (i.e. + .service-now.com) + :type endpoint: object + :param authentication_type: Required. The authentication type to use. + Possible values include: 'Basic', 'OAuth2' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.ServiceNowAuthenticationType + :param username: The user name used to connect to the ServiceNow server + for Basic and OAuth2 authentication. + :type username: object + :param password: The password corresponding to the user name for Basic and + OAuth2 authentication. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param client_id: The client id for OAuth2 authentication. + :type client_id: object + :param client_secret: The client secret for OAuth2 authentication. + :type client_secret: ~azure.mgmt.datafactory.models.SecretBase + :param use_encrypted_endpoints: Specifies whether the data source + endpoints are encrypted using HTTPS. The default value is true. + :type use_encrypted_endpoints: object + :param use_host_verification: Specifies whether to require the host name + in the server's certificate to match the host name of the server when + connecting over SSL. The default value is true. + :type use_host_verification: object + :param use_peer_verification: Specifies whether to verify the identity of + the server when connecting over SSL. The default value is true. + :type use_peer_verification: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'endpoint': {'required': True}, + 'authentication_type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'endpoint': {'key': 'typeProperties.endpoint', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, + 'client_secret': {'key': 'typeProperties.clientSecret', 'type': 'SecretBase'}, + 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, + 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, + 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, endpoint, authentication_type, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, username=None, password=None, client_id=None, client_secret=None, use_encrypted_endpoints=None, use_host_verification=None, use_peer_verification=None, encrypted_credential=None, **kwargs) -> None: + super(ServiceNowLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.endpoint = endpoint + self.authentication_type = authentication_type + self.username = username + self.password = password + self.client_id = client_id + self.client_secret = client_secret + self.use_encrypted_endpoints = use_encrypted_endpoints + self.use_host_verification = use_host_verification + self.use_peer_verification = use_peer_verification + self.encrypted_credential = encrypted_credential + self.type = 'ServiceNow' + + +class ServiceNowObjectDataset(Dataset): + """ServiceNow server dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: + super(ServiceNowObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.type = 'ServiceNowObject' + + +class ServiceNowSource(CopySource): + """A copy activity ServiceNow server source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(ServiceNowSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'ServiceNowSource' + + +class SetVariableActivity(ControlActivity): + """Set value for a Variable. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param variable_name: Name of the variable whose value needs to be set. + :type variable_name: str + :param value: Value to be set. Could be a static value or Expression + :type value: object + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'variable_name': {'key': 'typeProperties.variableName', 'type': 'str'}, + 'value': {'key': 'typeProperties.value', 'type': 'object'}, + } + + def __init__(self, *, name: str, additional_properties=None, description: str=None, depends_on=None, user_properties=None, variable_name: str=None, value=None, **kwargs) -> None: + super(SetVariableActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, **kwargs) + self.variable_name = variable_name + self.value = value + self.type = 'SetVariable' + + +class SftpLocation(DatasetLocation): + """The location of SFTP dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. Type of dataset storage location. + :type type: str + :param folder_path: Specify the folder path of dataset. Type: string (or + Expression with resultType string) + :type folder_path: object + :param file_name: Specify the file name of dataset. Type: string (or + Expression with resultType string). + :type file_name: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'folder_path': {'key': 'folderPath', 'type': 'object'}, + 'file_name': {'key': 'fileName', 'type': 'object'}, + } + + def __init__(self, *, type: str, additional_properties=None, folder_path=None, file_name=None, **kwargs) -> None: + super(SftpLocation, self).__init__(additional_properties=additional_properties, type=type, folder_path=folder_path, file_name=file_name, **kwargs) + + +class SftpReadSettings(StoreReadSettings): + """Sftp read settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param type: Required. The read setting type. + :type type: str + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param recursive: If true, files under the folder path will be read + recursively. Default is true. Type: boolean (or Expression with resultType + boolean). + :type recursive: object + :param wildcard_folder_path: Sftp wildcardFolderPath. Type: string (or + Expression with resultType string). + :type wildcard_folder_path: object + :param wildcard_file_name: Sftp wildcardFileName. Type: string (or + Expression with resultType string). + :type wildcard_file_name: object + :param modified_datetime_start: The start of file's modified datetime. + Type: string (or Expression with resultType string). + :type modified_datetime_start: object + :param modified_datetime_end: The end of file's modified datetime. Type: + string (or Expression with resultType string). + :type modified_datetime_end: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'recursive': {'key': 'recursive', 'type': 'object'}, + 'wildcard_folder_path': {'key': 'wildcardFolderPath', 'type': 'object'}, + 'wildcard_file_name': {'key': 'wildcardFileName', 'type': 'object'}, + 'modified_datetime_start': {'key': 'modifiedDatetimeStart', 'type': 'object'}, + 'modified_datetime_end': {'key': 'modifiedDatetimeEnd', 'type': 'object'}, + } + + def __init__(self, *, type: str, additional_properties=None, max_concurrent_connections=None, recursive=None, wildcard_folder_path=None, wildcard_file_name=None, modified_datetime_start=None, modified_datetime_end=None, **kwargs) -> None: + super(SftpReadSettings, self).__init__(additional_properties=additional_properties, type=type, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.recursive = recursive + self.wildcard_folder_path = wildcard_folder_path + self.wildcard_file_name = wildcard_file_name + self.modified_datetime_start = modified_datetime_start + self.modified_datetime_end = modified_datetime_end + + +class SftpServerLinkedService(LinkedService): + """A linked service for an SSH File Transfer Protocol (SFTP) server. . + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param host: Required. The SFTP server host name. Type: string (or + Expression with resultType string). + :type host: object + :param port: The TCP port number that the SFTP server uses to listen for + client connections. Default value is 22. Type: integer (or Expression with + resultType integer), minimum: 0. + :type port: object + :param authentication_type: The authentication type to be used to connect + to the FTP server. Possible values include: 'Basic', 'SshPublicKey' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.SftpAuthenticationType + :param user_name: The username used to log on to the SFTP server. Type: + string (or Expression with resultType string). + :type user_name: object + :param password: Password to logon the SFTP server for Basic + authentication. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + :param private_key_path: The SSH private key file path for SshPublicKey + authentication. Only valid for on-premises copy. For on-premises copy with + SshPublicKey authentication, either PrivateKeyPath or PrivateKeyContent + should be specified. SSH private key should be OpenSSH format. Type: + string (or Expression with resultType string). + :type private_key_path: object + :param private_key_content: Base64 encoded SSH private key content for + SshPublicKey authentication. For on-premises copy with SshPublicKey + authentication, either PrivateKeyPath or PrivateKeyContent should be + specified. SSH private key should be OpenSSH format. + :type private_key_content: ~azure.mgmt.datafactory.models.SecretBase + :param pass_phrase: The password to decrypt the SSH private key if the SSH + private key is encrypted. + :type pass_phrase: ~azure.mgmt.datafactory.models.SecretBase + :param skip_host_key_validation: If true, skip the SSH host key + validation. Default value is false. Type: boolean (or Expression with + resultType boolean). + :type skip_host_key_validation: object + :param host_key_fingerprint: The host key finger-print of the SFTP server. + When SkipHostKeyValidation is false, HostKeyFingerprint should be + specified. Type: string (or Expression with resultType string). + :type host_key_fingerprint: object + """ + + _validation = { + 'type': {'required': True}, + 'host': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'host': {'key': 'typeProperties.host', 'type': 'object'}, + 'port': {'key': 'typeProperties.port', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + 'private_key_path': {'key': 'typeProperties.privateKeyPath', 'type': 'object'}, + 'private_key_content': {'key': 'typeProperties.privateKeyContent', 'type': 'SecretBase'}, + 'pass_phrase': {'key': 'typeProperties.passPhrase', 'type': 'SecretBase'}, + 'skip_host_key_validation': {'key': 'typeProperties.skipHostKeyValidation', 'type': 'object'}, + 'host_key_fingerprint': {'key': 'typeProperties.hostKeyFingerprint', 'type': 'object'}, + } + + def __init__(self, *, host, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, port=None, authentication_type=None, user_name=None, password=None, encrypted_credential=None, private_key_path=None, private_key_content=None, pass_phrase=None, skip_host_key_validation=None, host_key_fingerprint=None, **kwargs) -> None: + super(SftpServerLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.host = host + self.port = port + self.authentication_type = authentication_type + self.user_name = user_name + self.password = password + self.encrypted_credential = encrypted_credential + self.private_key_path = private_key_path + self.private_key_content = private_key_content + self.pass_phrase = pass_phrase + self.skip_host_key_validation = skip_host_key_validation + self.host_key_fingerprint = host_key_fingerprint + self.type = 'Sftp' + + +class ShopifyLinkedService(LinkedService): + """Shopify Service linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param host: Required. The endpoint of the Shopify server. (i.e. + mystore.myshopify.com) + :type host: object + :param access_token: The API access token that can be used to access + Shopify’s data. The token won't expire if it is offline mode. + :type access_token: ~azure.mgmt.datafactory.models.SecretBase + :param use_encrypted_endpoints: Specifies whether the data source + endpoints are encrypted using HTTPS. The default value is true. + :type use_encrypted_endpoints: object + :param use_host_verification: Specifies whether to require the host name + in the server's certificate to match the host name of the server when + connecting over SSL. The default value is true. + :type use_host_verification: object + :param use_peer_verification: Specifies whether to verify the identity of + the server when connecting over SSL. The default value is true. + :type use_peer_verification: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'host': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'host': {'key': 'typeProperties.host', 'type': 'object'}, + 'access_token': {'key': 'typeProperties.accessToken', 'type': 'SecretBase'}, + 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, + 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, + 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, host, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, access_token=None, use_encrypted_endpoints=None, use_host_verification=None, use_peer_verification=None, encrypted_credential=None, **kwargs) -> None: + super(ShopifyLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.host = host + self.access_token = access_token + self.use_encrypted_endpoints = use_encrypted_endpoints + self.use_host_verification = use_host_verification + self.use_peer_verification = use_peer_verification + self.encrypted_credential = encrypted_credential + self.type = 'Shopify' + + +class ShopifyObjectDataset(Dataset): + """Shopify Service dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: + super(ShopifyObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.type = 'ShopifyObject' + + +class ShopifySource(CopySource): + """A copy activity Shopify Service source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(ShopifySource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'ShopifySource' + + +class SparkLinkedService(LinkedService): + """Spark Server linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param host: Required. IP address or host name of the Spark server + :type host: object + :param port: Required. The TCP port that the Spark server uses to listen + for client connections. + :type port: object + :param server_type: The type of Spark server. Possible values include: + 'SharkServer', 'SharkServer2', 'SparkThriftServer' + :type server_type: str or ~azure.mgmt.datafactory.models.SparkServerType + :param thrift_transport_protocol: The transport protocol to use in the + Thrift layer. Possible values include: 'Binary', 'SASL', 'HTTP ' + :type thrift_transport_protocol: str or + ~azure.mgmt.datafactory.models.SparkThriftTransportProtocol + :param authentication_type: Required. The authentication method used to + access the Spark server. Possible values include: 'Anonymous', 'Username', + 'UsernameAndPassword', 'WindowsAzureHDInsightService' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.SparkAuthenticationType + :param username: The user name that you use to access Spark Server. + :type username: object + :param password: The password corresponding to the user name that you + provided in the Username field + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param http_path: The partial URL corresponding to the Spark server. + :type http_path: object + :param enable_ssl: Specifies whether the connections to the server are + encrypted using SSL. The default value is false. + :type enable_ssl: object + :param trusted_cert_path: The full path of the .pem file containing + trusted CA certificates for verifying the server when connecting over SSL. + This property can only be set when using SSL on self-hosted IR. The + default value is the cacerts.pem file installed with the IR. + :type trusted_cert_path: object + :param use_system_trust_store: Specifies whether to use a CA certificate + from the system trust store or from a specified PEM file. The default + value is false. + :type use_system_trust_store: object + :param allow_host_name_cn_mismatch: Specifies whether to require a + CA-issued SSL certificate name to match the host name of the server when + connecting over SSL. The default value is false. + :type allow_host_name_cn_mismatch: object + :param allow_self_signed_server_cert: Specifies whether to allow + self-signed certificates from the server. The default value is false. + :type allow_self_signed_server_cert: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'host': {'required': True}, + 'port': {'required': True}, + 'authentication_type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'host': {'key': 'typeProperties.host', 'type': 'object'}, + 'port': {'key': 'typeProperties.port', 'type': 'object'}, + 'server_type': {'key': 'typeProperties.serverType', 'type': 'str'}, + 'thrift_transport_protocol': {'key': 'typeProperties.thriftTransportProtocol', 'type': 'str'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'http_path': {'key': 'typeProperties.httpPath', 'type': 'object'}, + 'enable_ssl': {'key': 'typeProperties.enableSsl', 'type': 'object'}, + 'trusted_cert_path': {'key': 'typeProperties.trustedCertPath', 'type': 'object'}, + 'use_system_trust_store': {'key': 'typeProperties.useSystemTrustStore', 'type': 'object'}, + 'allow_host_name_cn_mismatch': {'key': 'typeProperties.allowHostNameCNMismatch', 'type': 'object'}, + 'allow_self_signed_server_cert': {'key': 'typeProperties.allowSelfSignedServerCert', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, host, port, authentication_type, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, server_type=None, thrift_transport_protocol=None, username=None, password=None, http_path=None, enable_ssl=None, trusted_cert_path=None, use_system_trust_store=None, allow_host_name_cn_mismatch=None, allow_self_signed_server_cert=None, encrypted_credential=None, **kwargs) -> None: + super(SparkLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.host = host + self.port = port + self.server_type = server_type + self.thrift_transport_protocol = thrift_transport_protocol + self.authentication_type = authentication_type + self.username = username + self.password = password + self.http_path = http_path + self.enable_ssl = enable_ssl + self.trusted_cert_path = trusted_cert_path + self.use_system_trust_store = use_system_trust_store + self.allow_host_name_cn_mismatch = allow_host_name_cn_mismatch + self.allow_self_signed_server_cert = allow_self_signed_server_cert + self.encrypted_credential = encrypted_credential + self.type = 'Spark' + + +class SparkObjectDataset(Dataset): + """Spark Server dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: This property will be retired. Please consider using + schema + table properties instead. + :type table_name: object + :param table: The table name of the Spark. Type: string (or Expression + with resultType string). + :type table: object + :param spark_object_dataset_schema: The schema name of the Spark. Type: + string (or Expression with resultType string). + :type spark_object_dataset_schema: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + 'table': {'key': 'typeProperties.table', 'type': 'object'}, + 'spark_object_dataset_schema': {'key': 'typeProperties.schema', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, table=None, spark_object_dataset_schema=None, **kwargs) -> None: + super(SparkObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.table = table + self.spark_object_dataset_schema = spark_object_dataset_schema + self.type = 'SparkObject' + + +class SparkSource(CopySource): + """A copy activity Spark Server source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(SparkSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'SparkSource' + + +class SqlDWSink(CopySink): + """A copy activity SQL Data Warehouse sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param pre_copy_script: SQL pre-copy script. Type: string (or Expression + with resultType string). + :type pre_copy_script: object + :param allow_poly_base: Indicates to use PolyBase to copy data into SQL + Data Warehouse when applicable. Type: boolean (or Expression with + resultType boolean). + :type allow_poly_base: object + :param poly_base_settings: Specifies PolyBase-related settings when + allowPolyBase is true. + :type poly_base_settings: ~azure.mgmt.datafactory.models.PolybaseSettings + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'pre_copy_script': {'key': 'preCopyScript', 'type': 'object'}, + 'allow_poly_base': {'key': 'allowPolyBase', 'type': 'object'}, + 'poly_base_settings': {'key': 'polyBaseSettings', 'type': 'PolybaseSettings'}, + } + + def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, max_concurrent_connections=None, pre_copy_script=None, allow_poly_base=None, poly_base_settings=None, **kwargs) -> None: + super(SqlDWSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.pre_copy_script = pre_copy_script + self.allow_poly_base = allow_poly_base + self.poly_base_settings = poly_base_settings + self.type = 'SqlDWSink' + + +class SqlDWSource(CopySource): + """A copy activity SQL Data Warehouse source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param sql_reader_query: SQL Data Warehouse reader query. Type: string (or + Expression with resultType string). + :type sql_reader_query: object + :param sql_reader_stored_procedure_name: Name of the stored procedure for + a SQL Data Warehouse source. This cannot be used at the same time as + SqlReaderQuery. Type: string (or Expression with resultType string). + :type sql_reader_stored_procedure_name: object + :param stored_procedure_parameters: Value and type setting for stored + procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". + Type: object (or Expression with resultType object), itemType: + StoredProcedureParameter. + :type stored_procedure_parameters: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sql_reader_query': {'key': 'sqlReaderQuery', 'type': 'object'}, + 'sql_reader_stored_procedure_name': {'key': 'sqlReaderStoredProcedureName', 'type': 'object'}, + 'stored_procedure_parameters': {'key': 'storedProcedureParameters', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, sql_reader_query=None, sql_reader_stored_procedure_name=None, stored_procedure_parameters=None, **kwargs) -> None: + super(SqlDWSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.sql_reader_query = sql_reader_query + self.sql_reader_stored_procedure_name = sql_reader_stored_procedure_name + self.stored_procedure_parameters = stored_procedure_parameters + self.type = 'SqlDWSource' + + +class SqlMISink(CopySink): + """A copy activity Azure SQL Managed Instance sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param sql_writer_stored_procedure_name: SQL writer stored procedure name. + Type: string (or Expression with resultType string). + :type sql_writer_stored_procedure_name: object + :param sql_writer_table_type: SQL writer table type. Type: string (or + Expression with resultType string). + :type sql_writer_table_type: object + :param pre_copy_script: SQL pre-copy script. Type: string (or Expression + with resultType string). + :type pre_copy_script: object + :param stored_procedure_parameters: SQL stored procedure parameters. + :type stored_procedure_parameters: dict[str, + ~azure.mgmt.datafactory.models.StoredProcedureParameter] + :param stored_procedure_table_type_parameter_name: The stored procedure + parameter name of the table type. Type: string (or Expression with + resultType string). + :type stored_procedure_table_type_parameter_name: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sql_writer_stored_procedure_name': {'key': 'sqlWriterStoredProcedureName', 'type': 'object'}, + 'sql_writer_table_type': {'key': 'sqlWriterTableType', 'type': 'object'}, + 'pre_copy_script': {'key': 'preCopyScript', 'type': 'object'}, + 'stored_procedure_parameters': {'key': 'storedProcedureParameters', 'type': '{StoredProcedureParameter}'}, + 'stored_procedure_table_type_parameter_name': {'key': 'storedProcedureTableTypeParameterName', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, max_concurrent_connections=None, sql_writer_stored_procedure_name=None, sql_writer_table_type=None, pre_copy_script=None, stored_procedure_parameters=None, stored_procedure_table_type_parameter_name=None, **kwargs) -> None: + super(SqlMISink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.sql_writer_stored_procedure_name = sql_writer_stored_procedure_name + self.sql_writer_table_type = sql_writer_table_type + self.pre_copy_script = pre_copy_script + self.stored_procedure_parameters = stored_procedure_parameters + self.stored_procedure_table_type_parameter_name = stored_procedure_table_type_parameter_name + self.type = 'SqlMISink' + + +class SqlMISource(CopySource): + """A copy activity Azure SQL Managed Instance source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param sql_reader_query: SQL reader query. Type: string (or Expression + with resultType string). + :type sql_reader_query: object + :param sql_reader_stored_procedure_name: Name of the stored procedure for + a Azure SQL Managed Instance source. This cannot be used at the same time + as SqlReaderQuery. Type: string (or Expression with resultType string). + :type sql_reader_stored_procedure_name: object + :param stored_procedure_parameters: Value and type setting for stored + procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". + :type stored_procedure_parameters: dict[str, + ~azure.mgmt.datafactory.models.StoredProcedureParameter] + :param produce_additional_types: Which additional types to produce. + :type produce_additional_types: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sql_reader_query': {'key': 'sqlReaderQuery', 'type': 'object'}, + 'sql_reader_stored_procedure_name': {'key': 'sqlReaderStoredProcedureName', 'type': 'object'}, + 'stored_procedure_parameters': {'key': 'storedProcedureParameters', 'type': '{StoredProcedureParameter}'}, + 'produce_additional_types': {'key': 'produceAdditionalTypes', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, sql_reader_query=None, sql_reader_stored_procedure_name=None, stored_procedure_parameters=None, produce_additional_types=None, **kwargs) -> None: + super(SqlMISource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.sql_reader_query = sql_reader_query + self.sql_reader_stored_procedure_name = sql_reader_stored_procedure_name + self.stored_procedure_parameters = stored_procedure_parameters + self.produce_additional_types = produce_additional_types + self.type = 'SqlMISource' + + +class SqlServerLinkedService(LinkedService): + """SQL Server linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: Required. The connection string. Type: string, + SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param user_name: The on-premises Windows authentication user name. Type: + string (or Expression with resultType string). + :type user_name: object + :param password: The on-premises Windows authentication password. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'connection_string': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, connection_string, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, user_name=None, password=None, encrypted_credential=None, **kwargs) -> None: + super(SqlServerLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.connection_string = connection_string + self.user_name = user_name + self.password = password + self.encrypted_credential = encrypted_credential + self.type = 'SqlServer' + + +class SqlServerSink(CopySink): + """A copy activity SQL server sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param sql_writer_stored_procedure_name: SQL writer stored procedure name. + Type: string (or Expression with resultType string). + :type sql_writer_stored_procedure_name: object + :param sql_writer_table_type: SQL writer table type. Type: string (or + Expression with resultType string). + :type sql_writer_table_type: object + :param pre_copy_script: SQL pre-copy script. Type: string (or Expression + with resultType string). + :type pre_copy_script: object + :param stored_procedure_parameters: SQL stored procedure parameters. + :type stored_procedure_parameters: dict[str, + ~azure.mgmt.datafactory.models.StoredProcedureParameter] + :param stored_procedure_table_type_parameter_name: The stored procedure + parameter name of the table type. Type: string (or Expression with + resultType string). + :type stored_procedure_table_type_parameter_name: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sql_writer_stored_procedure_name': {'key': 'sqlWriterStoredProcedureName', 'type': 'object'}, + 'sql_writer_table_type': {'key': 'sqlWriterTableType', 'type': 'object'}, + 'pre_copy_script': {'key': 'preCopyScript', 'type': 'object'}, + 'stored_procedure_parameters': {'key': 'storedProcedureParameters', 'type': '{StoredProcedureParameter}'}, + 'stored_procedure_table_type_parameter_name': {'key': 'storedProcedureTableTypeParameterName', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, max_concurrent_connections=None, sql_writer_stored_procedure_name=None, sql_writer_table_type=None, pre_copy_script=None, stored_procedure_parameters=None, stored_procedure_table_type_parameter_name=None, **kwargs) -> None: + super(SqlServerSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.sql_writer_stored_procedure_name = sql_writer_stored_procedure_name + self.sql_writer_table_type = sql_writer_table_type + self.pre_copy_script = pre_copy_script + self.stored_procedure_parameters = stored_procedure_parameters + self.stored_procedure_table_type_parameter_name = stored_procedure_table_type_parameter_name + self.type = 'SqlServerSink' + + +class SqlServerSource(CopySource): + """A copy activity SQL server source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param sql_reader_query: SQL reader query. Type: string (or Expression + with resultType string). + :type sql_reader_query: object + :param sql_reader_stored_procedure_name: Name of the stored procedure for + a SQL Database source. This cannot be used at the same time as + SqlReaderQuery. Type: string (or Expression with resultType string). + :type sql_reader_stored_procedure_name: object + :param stored_procedure_parameters: Value and type setting for stored + procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". + :type stored_procedure_parameters: dict[str, + ~azure.mgmt.datafactory.models.StoredProcedureParameter] + :param produce_additional_types: Which additional types to produce. + :type produce_additional_types: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sql_reader_query': {'key': 'sqlReaderQuery', 'type': 'object'}, + 'sql_reader_stored_procedure_name': {'key': 'sqlReaderStoredProcedureName', 'type': 'object'}, + 'stored_procedure_parameters': {'key': 'storedProcedureParameters', 'type': '{StoredProcedureParameter}'}, + 'produce_additional_types': {'key': 'produceAdditionalTypes', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, sql_reader_query=None, sql_reader_stored_procedure_name=None, stored_procedure_parameters=None, produce_additional_types=None, **kwargs) -> None: + super(SqlServerSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.sql_reader_query = sql_reader_query + self.sql_reader_stored_procedure_name = sql_reader_stored_procedure_name + self.stored_procedure_parameters = stored_procedure_parameters + self.produce_additional_types = produce_additional_types + self.type = 'SqlServerSource' + + +class SqlServerStoredProcedureActivity(ExecutionActivity): + """SQL stored procedure activity type. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param stored_procedure_name: Required. Stored procedure name. Type: + string (or Expression with resultType string). + :type stored_procedure_name: object + :param stored_procedure_parameters: Value and type setting for stored + procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". + :type stored_procedure_parameters: dict[str, + ~azure.mgmt.datafactory.models.StoredProcedureParameter] + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'stored_procedure_name': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'stored_procedure_name': {'key': 'typeProperties.storedProcedureName', 'type': 'object'}, + 'stored_procedure_parameters': {'key': 'typeProperties.storedProcedureParameters', 'type': '{StoredProcedureParameter}'}, + } + + def __init__(self, *, name: str, stored_procedure_name, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, stored_procedure_parameters=None, **kwargs) -> None: + super(SqlServerStoredProcedureActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) + self.stored_procedure_name = stored_procedure_name + self.stored_procedure_parameters = stored_procedure_parameters + self.type = 'SqlServerStoredProcedure' + + +class SqlServerTableDataset(Dataset): + """The on-premises SQL Server dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: This property will be retired. Please consider using + schema + table properties instead. + :type table_name: object + :param sql_server_table_dataset_schema: The schema name of the SQL Server + dataset. Type: string (or Expression with resultType string). + :type sql_server_table_dataset_schema: object + :param table: The table name of the SQL Server dataset. Type: string (or + Expression with resultType string). + :type table: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + 'sql_server_table_dataset_schema': {'key': 'typeProperties.schema', 'type': 'object'}, + 'table': {'key': 'typeProperties.table', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, sql_server_table_dataset_schema=None, table=None, **kwargs) -> None: + super(SqlServerTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.sql_server_table_dataset_schema = sql_server_table_dataset_schema + self.table = table + self.type = 'SqlServerTable' + + +class SqlSink(CopySink): + """A copy activity SQL sink. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param write_batch_size: Write batch size. Type: integer (or Expression + with resultType integer), minimum: 0. + :type write_batch_size: object + :param write_batch_timeout: Write batch timeout. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type write_batch_timeout: object + :param sink_retry_count: Sink retry count. Type: integer (or Expression + with resultType integer). + :type sink_retry_count: object + :param sink_retry_wait: Sink retry wait. Type: string (or Expression with + resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type sink_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the sink data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param sql_writer_stored_procedure_name: SQL writer stored procedure name. + Type: string (or Expression with resultType string). + :type sql_writer_stored_procedure_name: object + :param sql_writer_table_type: SQL writer table type. Type: string (or + Expression with resultType string). + :type sql_writer_table_type: object + :param pre_copy_script: SQL pre-copy script. Type: string (or Expression + with resultType string). + :type pre_copy_script: object + :param stored_procedure_parameters: SQL stored procedure parameters. + :type stored_procedure_parameters: dict[str, + ~azure.mgmt.datafactory.models.StoredProcedureParameter] + :param stored_procedure_table_type_parameter_name: The stored procedure + parameter name of the table type. Type: string (or Expression with + resultType string). + :type stored_procedure_table_type_parameter_name: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, + 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, + 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, + 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sql_writer_stored_procedure_name': {'key': 'sqlWriterStoredProcedureName', 'type': 'object'}, + 'sql_writer_table_type': {'key': 'sqlWriterTableType', 'type': 'object'}, + 'pre_copy_script': {'key': 'preCopyScript', 'type': 'object'}, + 'stored_procedure_parameters': {'key': 'storedProcedureParameters', 'type': '{StoredProcedureParameter}'}, + 'stored_procedure_table_type_parameter_name': {'key': 'storedProcedureTableTypeParameterName', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, max_concurrent_connections=None, sql_writer_stored_procedure_name=None, sql_writer_table_type=None, pre_copy_script=None, stored_procedure_parameters=None, stored_procedure_table_type_parameter_name=None, **kwargs) -> None: + super(SqlSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.sql_writer_stored_procedure_name = sql_writer_stored_procedure_name + self.sql_writer_table_type = sql_writer_table_type + self.pre_copy_script = pre_copy_script + self.stored_procedure_parameters = stored_procedure_parameters + self.stored_procedure_table_type_parameter_name = stored_procedure_table_type_parameter_name + self.type = 'SqlSink' + + +class SqlSource(CopySource): + """A copy activity SQL source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param sql_reader_query: SQL reader query. Type: string (or Expression + with resultType string). + :type sql_reader_query: object + :param sql_reader_stored_procedure_name: Name of the stored procedure for + a SQL Database source. This cannot be used at the same time as + SqlReaderQuery. Type: string (or Expression with resultType string). + :type sql_reader_stored_procedure_name: object + :param stored_procedure_parameters: Value and type setting for stored + procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". + :type stored_procedure_parameters: dict[str, + ~azure.mgmt.datafactory.models.StoredProcedureParameter] + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sql_reader_query': {'key': 'sqlReaderQuery', 'type': 'object'}, + 'sql_reader_stored_procedure_name': {'key': 'sqlReaderStoredProcedureName', 'type': 'object'}, + 'stored_procedure_parameters': {'key': 'storedProcedureParameters', 'type': '{StoredProcedureParameter}'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, sql_reader_query=None, sql_reader_stored_procedure_name=None, stored_procedure_parameters=None, **kwargs) -> None: + super(SqlSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.sql_reader_query = sql_reader_query + self.sql_reader_stored_procedure_name = sql_reader_stored_procedure_name + self.stored_procedure_parameters = stored_procedure_parameters + self.type = 'SqlSource' + + +class SquareLinkedService(LinkedService): + """Square Service linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param host: Required. The URL of the Square instance. (i.e. + mystore.mysquare.com) + :type host: object + :param client_id: Required. The client ID associated with your Square + application. + :type client_id: object + :param client_secret: The client secret associated with your Square + application. + :type client_secret: ~azure.mgmt.datafactory.models.SecretBase + :param redirect_uri: Required. The redirect URL assigned in the Square + application dashboard. (i.e. http://localhost:2500) + :type redirect_uri: object + :param use_encrypted_endpoints: Specifies whether the data source + endpoints are encrypted using HTTPS. The default value is true. + :type use_encrypted_endpoints: object + :param use_host_verification: Specifies whether to require the host name + in the server's certificate to match the host name of the server when + connecting over SSL. The default value is true. + :type use_host_verification: object + :param use_peer_verification: Specifies whether to verify the identity of + the server when connecting over SSL. The default value is true. + :type use_peer_verification: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'host': {'required': True}, + 'client_id': {'required': True}, + 'redirect_uri': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'host': {'key': 'typeProperties.host', 'type': 'object'}, + 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, + 'client_secret': {'key': 'typeProperties.clientSecret', 'type': 'SecretBase'}, + 'redirect_uri': {'key': 'typeProperties.redirectUri', 'type': 'object'}, + 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, + 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, + 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, host, client_id, redirect_uri, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, client_secret=None, use_encrypted_endpoints=None, use_host_verification=None, use_peer_verification=None, encrypted_credential=None, **kwargs) -> None: + super(SquareLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.host = host + self.client_id = client_id + self.client_secret = client_secret + self.redirect_uri = redirect_uri + self.use_encrypted_endpoints = use_encrypted_endpoints + self.use_host_verification = use_host_verification + self.use_peer_verification = use_peer_verification + self.encrypted_credential = encrypted_credential + self.type = 'Square' + + +class SquareObjectDataset(Dataset): + """Square Service dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: + super(SquareObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.type = 'SquareObject' + + +class SquareSource(CopySource): + """A copy activity Square Service source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(SquareSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'SquareSource' + + +class SSISAccessCredential(Model): + """SSIS access credential. + + All required parameters must be populated in order to send to Azure. + + :param domain: Required. Domain for windows authentication. + :type domain: object + :param user_name: Required. UseName for windows authentication. + :type user_name: object + :param password: Required. Password for windows authentication. + :type password: ~azure.mgmt.datafactory.models.SecureString + """ + + _validation = { + 'domain': {'required': True}, + 'user_name': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'domain': {'key': 'domain', 'type': 'object'}, + 'user_name': {'key': 'userName', 'type': 'object'}, + 'password': {'key': 'password', 'type': 'SecureString'}, + } + + def __init__(self, *, domain, user_name, password, **kwargs) -> None: + super(SSISAccessCredential, self).__init__(**kwargs) + self.domain = domain + self.user_name = user_name + self.password = password + + +class SsisObjectMetadata(Model): + """SSIS object metadata. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SsisEnvironment, SsisPackage, SsisProject, SsisFolder + + All required parameters must be populated in order to send to Azure. + + :param id: Metadata id. + :type id: long + :param name: Metadata name. + :type name: str + :param description: Metadata description. + :type description: str + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'Environment': 'SsisEnvironment', 'Package': 'SsisPackage', 'Project': 'SsisProject', 'Folder': 'SsisFolder'} + } + + def __init__(self, *, id: int=None, name: str=None, description: str=None, **kwargs) -> None: + super(SsisObjectMetadata, self).__init__(**kwargs) + self.id = id + self.name = name + self.description = description + self.type = None + + +class SsisEnvironment(SsisObjectMetadata): + """Ssis environment. + + All required parameters must be populated in order to send to Azure. + + :param id: Metadata id. + :type id: long + :param name: Metadata name. + :type name: str + :param description: Metadata description. + :type description: str + :param type: Required. Constant filled by server. + :type type: str + :param folder_id: Folder id which contains environment. + :type folder_id: long + :param variables: Variable in environment + :type variables: list[~azure.mgmt.datafactory.models.SsisVariable] + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'folder_id': {'key': 'folderId', 'type': 'long'}, + 'variables': {'key': 'variables', 'type': '[SsisVariable]'}, + } + + def __init__(self, *, id: int=None, name: str=None, description: str=None, folder_id: int=None, variables=None, **kwargs) -> None: + super(SsisEnvironment, self).__init__(id=id, name=name, description=description, **kwargs) + self.folder_id = folder_id + self.variables = variables + self.type = 'Environment' + + +class SsisEnvironmentReference(Model): + """Ssis environment reference. + + :param id: Environment reference id. + :type id: long + :param environment_folder_name: Environment folder name. + :type environment_folder_name: str + :param environment_name: Environment name. + :type environment_name: str + :param reference_type: Reference type + :type reference_type: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'long'}, + 'environment_folder_name': {'key': 'environmentFolderName', 'type': 'str'}, + 'environment_name': {'key': 'environmentName', 'type': 'str'}, + 'reference_type': {'key': 'referenceType', 'type': 'str'}, + } + + def __init__(self, *, id: int=None, environment_folder_name: str=None, environment_name: str=None, reference_type: str=None, **kwargs) -> None: + super(SsisEnvironmentReference, self).__init__(**kwargs) + self.id = id + self.environment_folder_name = environment_folder_name + self.environment_name = environment_name + self.reference_type = reference_type + + +class SSISExecutionCredential(Model): + """SSIS package execution credential. + + All required parameters must be populated in order to send to Azure. + + :param domain: Required. Domain for windows authentication. + :type domain: object + :param user_name: Required. UseName for windows authentication. + :type user_name: object + :param password: Required. Password for windows authentication. + :type password: ~azure.mgmt.datafactory.models.SecureString + """ + + _validation = { + 'domain': {'required': True}, + 'user_name': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'domain': {'key': 'domain', 'type': 'object'}, + 'user_name': {'key': 'userName', 'type': 'object'}, + 'password': {'key': 'password', 'type': 'SecureString'}, + } + + def __init__(self, *, domain, user_name, password, **kwargs) -> None: + super(SSISExecutionCredential, self).__init__(**kwargs) + self.domain = domain + self.user_name = user_name + self.password = password + + +class SSISExecutionParameter(Model): + """SSIS execution parameter. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. SSIS package execution parameter value. Type: + string (or Expression with resultType string). + :type value: object + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'object'}, + } + + def __init__(self, *, value, **kwargs) -> None: + super(SSISExecutionParameter, self).__init__(**kwargs) + self.value = value + + +class SsisFolder(SsisObjectMetadata): + """Ssis folder. + + All required parameters must be populated in order to send to Azure. + + :param id: Metadata id. + :type id: long + :param name: Metadata name. + :type name: str + :param description: Metadata description. + :type description: str + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, id: int=None, name: str=None, description: str=None, **kwargs) -> None: + super(SsisFolder, self).__init__(id=id, name=name, description=description, **kwargs) + self.type = 'Folder' + + +class SSISLogLocation(Model): + """SSIS package execution log location. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param log_path: Required. The SSIS package execution log path. Type: + string (or Expression with resultType string). + :type log_path: object + :ivar type: Required. The type of SSIS log location. Default value: "File" + . + :vartype type: str + :param access_credential: The package execution log access credential. + :type access_credential: + ~azure.mgmt.datafactory.models.SSISAccessCredential + :param log_refresh_interval: Specifies the interval to refresh log. The + default interval is 5 minutes. Type: string (or Expression with resultType + string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type log_refresh_interval: object + """ + + _validation = { + 'log_path': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'log_path': {'key': 'logPath', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'access_credential': {'key': 'typeProperties.accessCredential', 'type': 'SSISAccessCredential'}, + 'log_refresh_interval': {'key': 'typeProperties.logRefreshInterval', 'type': 'object'}, + } + + type = "File" + + def __init__(self, *, log_path, access_credential=None, log_refresh_interval=None, **kwargs) -> None: + super(SSISLogLocation, self).__init__(**kwargs) + self.log_path = log_path + self.access_credential = access_credential + self.log_refresh_interval = log_refresh_interval + + +class SsisObjectMetadataListResponse(Model): + """A list of SSIS object metadata. + + :param value: List of SSIS object metadata. + :type value: list[~azure.mgmt.datafactory.models.SsisObjectMetadata] + :param next_link: The link to the next page of results, if any remaining + results exist. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SsisObjectMetadata]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value=None, next_link: str=None, **kwargs) -> None: + super(SsisObjectMetadataListResponse, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class SsisObjectMetadataStatusResponse(Model): + """The status of the operation. + + :param status: The status of the operation. + :type status: str + :param name: The operation name. + :type name: str + :param properties: The operation properties. + :type properties: str + :param error: The operation error message. + :type error: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'str'}, + } + + def __init__(self, *, status: str=None, name: str=None, properties: str=None, error: str=None, **kwargs) -> None: + super(SsisObjectMetadataStatusResponse, self).__init__(**kwargs) + self.status = status + self.name = name + self.properties = properties + self.error = error + + +class SsisPackage(SsisObjectMetadata): + """Ssis Package. + + All required parameters must be populated in order to send to Azure. + + :param id: Metadata id. + :type id: long + :param name: Metadata name. + :type name: str + :param description: Metadata description. + :type description: str + :param type: Required. Constant filled by server. + :type type: str + :param folder_id: Folder id which contains package. + :type folder_id: long + :param project_version: Project version which contains package. + :type project_version: long + :param project_id: Project id which contains package. + :type project_id: long + :param parameters: Parameters in package + :type parameters: list[~azure.mgmt.datafactory.models.SsisParameter] + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'folder_id': {'key': 'folderId', 'type': 'long'}, + 'project_version': {'key': 'projectVersion', 'type': 'long'}, + 'project_id': {'key': 'projectId', 'type': 'long'}, + 'parameters': {'key': 'parameters', 'type': '[SsisParameter]'}, + } + + def __init__(self, *, id: int=None, name: str=None, description: str=None, folder_id: int=None, project_version: int=None, project_id: int=None, parameters=None, **kwargs) -> None: + super(SsisPackage, self).__init__(id=id, name=name, description=description, **kwargs) + self.folder_id = folder_id + self.project_version = project_version + self.project_id = project_id + self.parameters = parameters + self.type = 'Package' + + +class SSISPackageLocation(Model): + """SSIS package location. + + All required parameters must be populated in order to send to Azure. + + :param package_path: Required. The SSIS package path. Type: string (or + Expression with resultType string). + :type package_path: object + :param type: The type of SSIS package location. Possible values include: + 'SSISDB', 'File' + :type type: str or ~azure.mgmt.datafactory.models.SsisPackageLocationType + :param package_password: Password of the package. + :type package_password: ~azure.mgmt.datafactory.models.SecureString + :param access_credential: The package access credential. + :type access_credential: + ~azure.mgmt.datafactory.models.SSISAccessCredential + :param configuration_path: The configuration file of the package + execution. Type: string (or Expression with resultType string). + :type configuration_path: object + """ + + _validation = { + 'package_path': {'required': True}, + } + + _attribute_map = { + 'package_path': {'key': 'packagePath', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'package_password': {'key': 'typeProperties.packagePassword', 'type': 'SecureString'}, + 'access_credential': {'key': 'typeProperties.accessCredential', 'type': 'SSISAccessCredential'}, + 'configuration_path': {'key': 'typeProperties.configurationPath', 'type': 'object'}, + } + + def __init__(self, *, package_path, type=None, package_password=None, access_credential=None, configuration_path=None, **kwargs) -> None: + super(SSISPackageLocation, self).__init__(**kwargs) + self.package_path = package_path + self.type = type + self.package_password = package_password + self.access_credential = access_credential + self.configuration_path = configuration_path + + +class SsisParameter(Model): + """Ssis parameter. + + :param id: Parameter id. + :type id: long + :param name: Parameter name. + :type name: str + :param description: Parameter description. + :type description: str + :param data_type: Parameter type. + :type data_type: str + :param required: Whether parameter is required. + :type required: bool + :param sensitive: Whether parameter is sensitive. + :type sensitive: bool + :param design_default_value: Design default value of parameter. + :type design_default_value: str + :param default_value: Default value of parameter. + :type default_value: str + :param sensitive_default_value: Default sensitive value of parameter. + :type sensitive_default_value: str + :param value_type: Parameter value type. + :type value_type: str + :param value_set: Parameter value set. + :type value_set: bool + :param variable: Parameter reference variable. + :type variable: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'data_type': {'key': 'dataType', 'type': 'str'}, + 'required': {'key': 'required', 'type': 'bool'}, + 'sensitive': {'key': 'sensitive', 'type': 'bool'}, + 'design_default_value': {'key': 'designDefaultValue', 'type': 'str'}, + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'sensitive_default_value': {'key': 'sensitiveDefaultValue', 'type': 'str'}, + 'value_type': {'key': 'valueType', 'type': 'str'}, + 'value_set': {'key': 'valueSet', 'type': 'bool'}, + 'variable': {'key': 'variable', 'type': 'str'}, + } + + def __init__(self, *, id: int=None, name: str=None, description: str=None, data_type: str=None, required: bool=None, sensitive: bool=None, design_default_value: str=None, default_value: str=None, sensitive_default_value: str=None, value_type: str=None, value_set: bool=None, variable: str=None, **kwargs) -> None: + super(SsisParameter, self).__init__(**kwargs) + self.id = id + self.name = name + self.description = description + self.data_type = data_type + self.required = required + self.sensitive = sensitive + self.design_default_value = design_default_value + self.default_value = default_value + self.sensitive_default_value = sensitive_default_value + self.value_type = value_type + self.value_set = value_set + self.variable = variable + + +class SsisProject(SsisObjectMetadata): + """Ssis project. + + All required parameters must be populated in order to send to Azure. + + :param id: Metadata id. + :type id: long + :param name: Metadata name. + :type name: str + :param description: Metadata description. + :type description: str + :param type: Required. Constant filled by server. + :type type: str + :param folder_id: Folder id which contains project. + :type folder_id: long + :param version: Project version. + :type version: long + :param environment_refs: Environment reference in project + :type environment_refs: + list[~azure.mgmt.datafactory.models.SsisEnvironmentReference] + :param parameters: Parameters in project + :type parameters: list[~azure.mgmt.datafactory.models.SsisParameter] + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'folder_id': {'key': 'folderId', 'type': 'long'}, + 'version': {'key': 'version', 'type': 'long'}, + 'environment_refs': {'key': 'environmentRefs', 'type': '[SsisEnvironmentReference]'}, + 'parameters': {'key': 'parameters', 'type': '[SsisParameter]'}, + } + + def __init__(self, *, id: int=None, name: str=None, description: str=None, folder_id: int=None, version: int=None, environment_refs=None, parameters=None, **kwargs) -> None: + super(SsisProject, self).__init__(id=id, name=name, description=description, **kwargs) + self.folder_id = folder_id + self.version = version + self.environment_refs = environment_refs + self.parameters = parameters + self.type = 'Project' + + +class SSISPropertyOverride(Model): + """SSIS property override. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. SSIS package property override value. Type: string + (or Expression with resultType string). + :type value: object + :param is_sensitive: Whether SSIS package property override value is + sensitive data. Value will be encrypted in SSISDB if it is true + :type is_sensitive: bool + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'object'}, + 'is_sensitive': {'key': 'isSensitive', 'type': 'bool'}, + } + + def __init__(self, *, value, is_sensitive: bool=None, **kwargs) -> None: + super(SSISPropertyOverride, self).__init__(**kwargs) + self.value = value + self.is_sensitive = is_sensitive + + +class SsisVariable(Model): + """Ssis variable. + + :param id: Variable id. + :type id: long + :param name: Variable name. + :type name: str + :param description: Variable description. + :type description: str + :param data_type: Variable type. + :type data_type: str + :param sensitive: Whether variable is sensitive. + :type sensitive: bool + :param value: Variable value. + :type value: str + :param sensitive_value: Variable sensitive value. + :type sensitive_value: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'data_type': {'key': 'dataType', 'type': 'str'}, + 'sensitive': {'key': 'sensitive', 'type': 'bool'}, + 'value': {'key': 'value', 'type': 'str'}, + 'sensitive_value': {'key': 'sensitiveValue', 'type': 'str'}, + } + + def __init__(self, *, id: int=None, name: str=None, description: str=None, data_type: str=None, sensitive: bool=None, value: str=None, sensitive_value: str=None, **kwargs) -> None: + super(SsisVariable, self).__init__(**kwargs) + self.id = id + self.name = name + self.description = description + self.data_type = data_type + self.sensitive = sensitive + self.value = value + self.sensitive_value = sensitive_value + + +class StagingSettings(Model): + """Staging settings. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param linked_service_name: Required. Staging linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param path: The path to storage for storing the interim data. Type: + string (or Expression with resultType string). + :type path: object + :param enable_compression: Specifies whether to use compression when + copying data via an interim staging. Default value is false. Type: boolean + (or Expression with resultType boolean). + :type enable_compression: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'path': {'key': 'path', 'type': 'object'}, + 'enable_compression': {'key': 'enableCompression', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, path=None, enable_compression=None, **kwargs) -> None: + super(StagingSettings, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.linked_service_name = linked_service_name + self.path = path + self.enable_compression = enable_compression + + +class StoredProcedureParameter(Model): + """SQL stored procedure parameter. + + :param value: Stored procedure parameter value. Type: string (or + Expression with resultType string). + :type value: object + :param type: Stored procedure parameter type. Possible values include: + 'String', 'Int', 'Int64', 'Decimal', 'Guid', 'Boolean', 'Date' + :type type: str or + ~azure.mgmt.datafactory.models.StoredProcedureParameterType + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, value=None, type=None, **kwargs) -> None: + super(StoredProcedureParameter, self).__init__(**kwargs) + self.value = value + self.type = type + + +class SybaseLinkedService(LinkedService): + """Linked service for Sybase data source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param server: Required. Server name for connection. Type: string (or + Expression with resultType string). + :type server: object + :param database: Required. Database name for connection. Type: string (or + Expression with resultType string). + :type database: object + :param schema: Schema name for connection. Type: string (or Expression + with resultType string). + :type schema: object + :param authentication_type: AuthenticationType to be used for connection. + Possible values include: 'Basic', 'Windows' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.SybaseAuthenticationType + :param username: Username for authentication. Type: string (or Expression + with resultType string). + :type username: object + :param password: Password for authentication. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'server': {'required': True}, + 'database': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server': {'key': 'typeProperties.server', 'type': 'object'}, + 'database': {'key': 'typeProperties.database', 'type': 'object'}, + 'schema': {'key': 'typeProperties.schema', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, server, database, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, schema=None, authentication_type=None, username=None, password=None, encrypted_credential=None, **kwargs) -> None: + super(SybaseLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.server = server + self.database = database + self.schema = schema + self.authentication_type = authentication_type + self.username = username + self.password = password + self.encrypted_credential = encrypted_credential + self.type = 'Sybase' + + +class SybaseSource(CopySource): + """A copy activity source for Sybase databases. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: Database query. Type: string (or Expression with resultType + string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(SybaseSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'SybaseSource' + + +class SybaseTableDataset(Dataset): + """The Sybase table dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The Sybase table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: + super(SybaseTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.type = 'SybaseTable' + + +class TeradataLinkedService(LinkedService): + """Linked service for Teradata data source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: Teradata ODBC connection string. Type: string, + SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param server: Server name for connection. Type: string (or Expression + with resultType string). + :type server: object + :param authentication_type: AuthenticationType to be used for connection. + Possible values include: 'Basic', 'Windows' + :type authentication_type: str or + ~azure.mgmt.datafactory.models.TeradataAuthenticationType + :param username: Username for authentication. Type: string (or Expression + with resultType string). + :type username: object + :param password: Password for authentication. + :type password: ~azure.mgmt.datafactory.models.SecretBase + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'server': {'key': 'typeProperties.server', 'type': 'object'}, + 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, + 'username': {'key': 'typeProperties.username', 'type': 'object'}, + 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, connection_string=None, server=None, authentication_type=None, username=None, password=None, encrypted_credential=None, **kwargs) -> None: + super(TeradataLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.connection_string = connection_string + self.server = server + self.authentication_type = authentication_type + self.username = username + self.password = password + self.encrypted_credential = encrypted_credential + self.type = 'Teradata' + + +class TeradataPartitionSettings(Model): + """The settings that will be leveraged for teradata source partitioning. + + :param partition_column_name: The name of the column that will be used for + proceeding range or hash partitioning. Type: string (or Expression with + resultType string). + :type partition_column_name: object + :param partition_upper_bound: The maximum value of column specified in + partitionColumnName that will be used for proceeding range partitioning. + Type: string (or Expression with resultType string). + :type partition_upper_bound: object + :param partition_lower_bound: The minimum value of column specified in + partitionColumnName that will be used for proceeding range partitioning. + Type: string (or Expression with resultType string). + :type partition_lower_bound: object + """ + + _attribute_map = { + 'partition_column_name': {'key': 'partitionColumnName', 'type': 'object'}, + 'partition_upper_bound': {'key': 'partitionUpperBound', 'type': 'object'}, + 'partition_lower_bound': {'key': 'partitionLowerBound', 'type': 'object'}, + } + + def __init__(self, *, partition_column_name=None, partition_upper_bound=None, partition_lower_bound=None, **kwargs) -> None: + super(TeradataPartitionSettings, self).__init__(**kwargs) + self.partition_column_name = partition_column_name + self.partition_upper_bound = partition_upper_bound + self.partition_lower_bound = partition_lower_bound + + +class TeradataSource(CopySource): + """A copy activity Teradata source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: Teradata query. Type: string (or Expression with resultType + string). + :type query: object + :param partition_option: The partition mechanism that will be used for + teradata read in parallel. Possible values include: 'None', 'Hash', + 'DynamicRange' + :type partition_option: str or + ~azure.mgmt.datafactory.models.TeradataPartitionOption + :param partition_settings: The settings that will be leveraged for + teradata source partitioning. + :type partition_settings: + ~azure.mgmt.datafactory.models.TeradataPartitionSettings + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + 'partition_option': {'key': 'partitionOption', 'type': 'str'}, + 'partition_settings': {'key': 'partitionSettings', 'type': 'TeradataPartitionSettings'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, partition_option=None, partition_settings=None, **kwargs) -> None: + super(TeradataSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.partition_option = partition_option + self.partition_settings = partition_settings + self.type = 'TeradataSource' + + +class TeradataTableDataset(Dataset): + """The Teradata database dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param database: The database name of Teradata. Type: string (or + Expression with resultType string). + :type database: object + :param table: The table name of Teradata. Type: string (or Expression with + resultType string). + :type table: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'database': {'key': 'typeProperties.database', 'type': 'object'}, + 'table': {'key': 'typeProperties.table', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, database=None, table=None, **kwargs) -> None: + super(TeradataTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.database = database + self.table = table + self.type = 'TeradataTable' + + +class TextFormat(DatasetStorageFormat): + """The data stored in text format. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param serializer: Serializer. Type: string (or Expression with resultType + string). + :type serializer: object + :param deserializer: Deserializer. Type: string (or Expression with + resultType string). + :type deserializer: object + :param type: Required. Constant filled by server. + :type type: str + :param column_delimiter: The column delimiter. Type: string (or Expression + with resultType string). + :type column_delimiter: object + :param row_delimiter: The row delimiter. Type: string (or Expression with + resultType string). + :type row_delimiter: object + :param escape_char: The escape character. Type: string (or Expression with + resultType string). + :type escape_char: object + :param quote_char: The quote character. Type: string (or Expression with + resultType string). + :type quote_char: object + :param null_value: The null value string. Type: string (or Expression with + resultType string). + :type null_value: object + :param encoding_name: The code page name of the preferred encoding. If + miss, the default value is ΓÇ£utf-8ΓÇ¥, unless BOM denotes another Unicode + encoding. Refer to the ΓÇ£NameΓÇ¥ column of the table in the following + link to set supported values: + https://msdn.microsoft.com/library/system.text.encoding.aspx. Type: string + (or Expression with resultType string). + :type encoding_name: object + :param treat_empty_as_null: Treat empty column values in the text file as + null. The default value is true. Type: boolean (or Expression with + resultType boolean). + :type treat_empty_as_null: object + :param skip_line_count: The number of lines/rows to be skipped when + parsing text files. The default value is 0. Type: integer (or Expression + with resultType integer). + :type skip_line_count: object + :param first_row_as_header: When used as input, treat the first row of + data as headers. When used as output,write the headers into the output as + the first row of data. The default value is false. Type: boolean (or + Expression with resultType boolean). + :type first_row_as_header: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'serializer': {'key': 'serializer', 'type': 'object'}, + 'deserializer': {'key': 'deserializer', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'column_delimiter': {'key': 'columnDelimiter', 'type': 'object'}, + 'row_delimiter': {'key': 'rowDelimiter', 'type': 'object'}, + 'escape_char': {'key': 'escapeChar', 'type': 'object'}, + 'quote_char': {'key': 'quoteChar', 'type': 'object'}, + 'null_value': {'key': 'nullValue', 'type': 'object'}, + 'encoding_name': {'key': 'encodingName', 'type': 'object'}, + 'treat_empty_as_null': {'key': 'treatEmptyAsNull', 'type': 'object'}, + 'skip_line_count': {'key': 'skipLineCount', 'type': 'object'}, + 'first_row_as_header': {'key': 'firstRowAsHeader', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, serializer=None, deserializer=None, column_delimiter=None, row_delimiter=None, escape_char=None, quote_char=None, null_value=None, encoding_name=None, treat_empty_as_null=None, skip_line_count=None, first_row_as_header=None, **kwargs) -> None: + super(TextFormat, self).__init__(additional_properties=additional_properties, serializer=serializer, deserializer=deserializer, **kwargs) + self.column_delimiter = column_delimiter + self.row_delimiter = row_delimiter + self.escape_char = escape_char + self.quote_char = quote_char + self.null_value = null_value + self.encoding_name = encoding_name + self.treat_empty_as_null = treat_empty_as_null + self.skip_line_count = skip_line_count + self.first_row_as_header = first_row_as_header + self.type = 'TextFormat' + + +class TriggerDependencyReference(DependencyReference): + """Trigger referenced dependency. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: TumblingWindowTriggerDependencyReference + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param reference_trigger: Required. Referenced trigger. + :type reference_trigger: ~azure.mgmt.datafactory.models.TriggerReference + """ + + _validation = { + 'type': {'required': True}, + 'reference_trigger': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'reference_trigger': {'key': 'referenceTrigger', 'type': 'TriggerReference'}, + } + + _subtype_map = { + 'type': {'TumblingWindowTriggerDependencyReference': 'TumblingWindowTriggerDependencyReference'} + } + + def __init__(self, *, reference_trigger, **kwargs) -> None: + super(TriggerDependencyReference, self).__init__(**kwargs) + self.reference_trigger = reference_trigger + self.type = 'TriggerDependencyReference' + + +class TriggerPipelineReference(Model): + """Pipeline that needs to be triggered with the given parameters. + + :param pipeline_reference: Pipeline reference. + :type pipeline_reference: ~azure.mgmt.datafactory.models.PipelineReference + :param parameters: Pipeline parameters. + :type parameters: dict[str, object] + """ + + _attribute_map = { + 'pipeline_reference': {'key': 'pipelineReference', 'type': 'PipelineReference'}, + 'parameters': {'key': 'parameters', 'type': '{object}'}, + } + + def __init__(self, *, pipeline_reference=None, parameters=None, **kwargs) -> None: + super(TriggerPipelineReference, self).__init__(**kwargs) + self.pipeline_reference = pipeline_reference + self.parameters = parameters + + +class TriggerReference(Model): + """Trigger reference type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. Trigger reference type. Default value: + "TriggerReference" . + :vartype type: str + :param reference_name: Required. Reference trigger name. + :type reference_name: str + """ + + _validation = { + 'type': {'required': True, 'constant': True}, + 'reference_name': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'reference_name': {'key': 'referenceName', 'type': 'str'}, + } + + type = "TriggerReference" + + def __init__(self, *, reference_name: str, **kwargs) -> None: + super(TriggerReference, self).__init__(**kwargs) + self.reference_name = reference_name + + +class TriggerResource(SubResource): + """Trigger resource type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar etag: Etag identifies change in the resource. + :vartype etag: str + :param properties: Required. Properties of the trigger. + :type properties: ~azure.mgmt.datafactory.models.Trigger + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'Trigger'}, + } + + def __init__(self, *, properties, **kwargs) -> None: + super(TriggerResource, self).__init__(**kwargs) + self.properties = properties + + +class TriggerRun(Model): + """Trigger runs. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar trigger_run_id: Trigger run id. + :vartype trigger_run_id: str + :ivar trigger_name: Trigger name. + :vartype trigger_name: str + :ivar trigger_type: Trigger type. + :vartype trigger_type: str + :ivar trigger_run_timestamp: Trigger run start time. + :vartype trigger_run_timestamp: datetime + :ivar status: Trigger run status. Possible values include: 'Succeeded', + 'Failed', 'Inprogress' + :vartype status: str or ~azure.mgmt.datafactory.models.TriggerRunStatus + :ivar message: Trigger error message. + :vartype message: str + :ivar properties: List of property name and value related to trigger run. + Name, value pair depends on type of trigger. + :vartype properties: dict[str, str] + :ivar triggered_pipelines: List of pipeline name and run Id triggered by + the trigger run. + :vartype triggered_pipelines: dict[str, str] + """ + + _validation = { + 'trigger_run_id': {'readonly': True}, + 'trigger_name': {'readonly': True}, + 'trigger_type': {'readonly': True}, + 'trigger_run_timestamp': {'readonly': True}, + 'status': {'readonly': True}, + 'message': {'readonly': True}, + 'properties': {'readonly': True}, + 'triggered_pipelines': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'trigger_run_id': {'key': 'triggerRunId', 'type': 'str'}, + 'trigger_name': {'key': 'triggerName', 'type': 'str'}, + 'trigger_type': {'key': 'triggerType', 'type': 'str'}, + 'trigger_run_timestamp': {'key': 'triggerRunTimestamp', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'triggered_pipelines': {'key': 'triggeredPipelines', 'type': '{str}'}, + } + + def __init__(self, *, additional_properties=None, **kwargs) -> None: + super(TriggerRun, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.trigger_run_id = None + self.trigger_name = None + self.trigger_type = None + self.trigger_run_timestamp = None + self.status = None + self.message = None + self.properties = None + self.triggered_pipelines = None + + +class TriggerRunsQueryResponse(Model): + """A list of trigger runs. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of trigger runs. + :type value: list[~azure.mgmt.datafactory.models.TriggerRun] + :param continuation_token: The continuation token for getting the next + page of results, if any remaining results exist, null otherwise. + :type continuation_token: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[TriggerRun]'}, + 'continuation_token': {'key': 'continuationToken', 'type': 'str'}, + } + + def __init__(self, *, value, continuation_token: str=None, **kwargs) -> None: + super(TriggerRunsQueryResponse, self).__init__(**kwargs) + self.value = value + self.continuation_token = continuation_token + + +class TumblingWindowTrigger(Trigger): + """Trigger that schedules pipeline runs for all fixed time interval windows + from a start time without gaps and also supports backfill scenarios (when + start time is in the past). + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Trigger description. + :type description: str + :ivar runtime_state: Indicates if trigger is running or not. Updated when + Start/Stop APIs are called on the Trigger. Possible values include: + 'Started', 'Stopped', 'Disabled' + :vartype runtime_state: str or + ~azure.mgmt.datafactory.models.TriggerRuntimeState + :param annotations: List of tags that can be used for describing the + trigger. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param pipeline: Required. Pipeline for which runs are created when an + event is fired for trigger window that is ready. + :type pipeline: ~azure.mgmt.datafactory.models.TriggerPipelineReference + :param frequency: Required. The frequency of the time windows. Possible + values include: 'Minute', 'Hour' + :type frequency: str or + ~azure.mgmt.datafactory.models.TumblingWindowFrequency + :param interval: Required. The interval of the time windows. The minimum + interval allowed is 15 Minutes. + :type interval: int + :param start_time: Required. The start time for the time period for the + trigger during which events are fired for windows that are ready. Only UTC + time is currently supported. + :type start_time: datetime + :param end_time: The end time for the time period for the trigger during + which events are fired for windows that are ready. Only UTC time is + currently supported. + :type end_time: datetime + :param delay: Specifies how long the trigger waits past due time before + triggering new run. It doesn't alter window start and end time. The + default is 0. Type: string (or Expression with resultType string), + pattern: ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type delay: object + :param max_concurrency: Required. The max number of parallel time windows + (ready for execution) for which a new run is triggered. + :type max_concurrency: int + :param retry_policy: Retry policy that will be applied for failed pipeline + runs. + :type retry_policy: ~azure.mgmt.datafactory.models.RetryPolicy + :param depends_on: Triggers that this trigger depends on. Only tumbling + window triggers are supported. + :type depends_on: list[~azure.mgmt.datafactory.models.DependencyReference] + """ + + _validation = { + 'runtime_state': {'readonly': True}, + 'type': {'required': True}, + 'pipeline': {'required': True}, + 'frequency': {'required': True}, + 'interval': {'required': True}, + 'start_time': {'required': True}, + 'max_concurrency': {'required': True, 'maximum': 50, 'minimum': 1}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'runtime_state': {'key': 'runtimeState', 'type': 'str'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'pipeline': {'key': 'pipeline', 'type': 'TriggerPipelineReference'}, + 'frequency': {'key': 'typeProperties.frequency', 'type': 'str'}, + 'interval': {'key': 'typeProperties.interval', 'type': 'int'}, + 'start_time': {'key': 'typeProperties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'typeProperties.endTime', 'type': 'iso-8601'}, + 'delay': {'key': 'typeProperties.delay', 'type': 'object'}, + 'max_concurrency': {'key': 'typeProperties.maxConcurrency', 'type': 'int'}, + 'retry_policy': {'key': 'typeProperties.retryPolicy', 'type': 'RetryPolicy'}, + 'depends_on': {'key': 'typeProperties.dependsOn', 'type': '[DependencyReference]'}, + } + + def __init__(self, *, pipeline, frequency, interval: int, start_time, max_concurrency: int, additional_properties=None, description: str=None, annotations=None, end_time=None, delay=None, retry_policy=None, depends_on=None, **kwargs) -> None: + super(TumblingWindowTrigger, self).__init__(additional_properties=additional_properties, description=description, annotations=annotations, **kwargs) + self.pipeline = pipeline + self.frequency = frequency + self.interval = interval + self.start_time = start_time + self.end_time = end_time + self.delay = delay + self.max_concurrency = max_concurrency + self.retry_policy = retry_policy + self.depends_on = depends_on + self.type = 'TumblingWindowTrigger' + + +class TumblingWindowTriggerDependencyReference(TriggerDependencyReference): + """Referenced tumbling window trigger dependency. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param reference_trigger: Required. Referenced trigger. + :type reference_trigger: ~azure.mgmt.datafactory.models.TriggerReference + :param offset: Timespan applied to the start time of a tumbling window + when evaluating dependency. + :type offset: str + :param size: The size of the window when evaluating the dependency. If + undefined the frequency of the tumbling window will be used. + :type size: str + """ + + _validation = { + 'type': {'required': True}, + 'reference_trigger': {'required': True}, + 'offset': {'max_length': 15, 'min_length': 8, 'pattern': r'((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9]))'}, + 'size': {'max_length': 15, 'min_length': 8, 'pattern': r'((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9]))'}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'reference_trigger': {'key': 'referenceTrigger', 'type': 'TriggerReference'}, + 'offset': {'key': 'offset', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + } + + def __init__(self, *, reference_trigger, offset: str=None, size: str=None, **kwargs) -> None: + super(TumblingWindowTriggerDependencyReference, self).__init__(reference_trigger=reference_trigger, **kwargs) + self.offset = offset + self.size = size + self.type = 'TumblingWindowTriggerDependencyReference' + + +class UntilActivity(ControlActivity): + """This activity executes inner activities until the specified boolean + expression results to true or timeout is reached, whichever is earlier. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param expression: Required. An expression that would evaluate to Boolean. + The loop will continue until this expression evaluates to true + :type expression: ~azure.mgmt.datafactory.models.Expression + :param timeout: Specifies the timeout for the activity to run. If there is + no value specified, it takes the value of TimeSpan.FromDays(7) which is 1 + week as default. Type: string (or Expression with resultType string), + pattern: ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). Type: + string (or Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type timeout: object + :param activities: Required. List of activities to execute. + :type activities: list[~azure.mgmt.datafactory.models.Activity] + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'expression': {'required': True}, + 'activities': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'expression': {'key': 'typeProperties.expression', 'type': 'Expression'}, + 'timeout': {'key': 'typeProperties.timeout', 'type': 'object'}, + 'activities': {'key': 'typeProperties.activities', 'type': '[Activity]'}, + } + + def __init__(self, *, name: str, expression, activities, additional_properties=None, description: str=None, depends_on=None, user_properties=None, timeout=None, **kwargs) -> None: + super(UntilActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, **kwargs) + self.expression = expression + self.timeout = timeout + self.activities = activities + self.type = 'Until' + + +class UpdateIntegrationRuntimeNodeRequest(Model): + """Update integration runtime node request. + + :param concurrent_jobs_limit: The number of concurrent jobs permitted to + run on the integration runtime node. Values between 1 and + maxConcurrentJobs(inclusive) are allowed. + :type concurrent_jobs_limit: int + """ + + _validation = { + 'concurrent_jobs_limit': {'minimum': 1}, + } + + _attribute_map = { + 'concurrent_jobs_limit': {'key': 'concurrentJobsLimit', 'type': 'int'}, + } + + def __init__(self, *, concurrent_jobs_limit: int=None, **kwargs) -> None: + super(UpdateIntegrationRuntimeNodeRequest, self).__init__(**kwargs) + self.concurrent_jobs_limit = concurrent_jobs_limit + + +class UpdateIntegrationRuntimeRequest(Model): + """Update integration runtime request. + + :param auto_update: Enables or disables the auto-update feature of the + self-hosted integration runtime. See + https://go.microsoft.com/fwlink/?linkid=854189. Possible values include: + 'On', 'Off' + :type auto_update: str or + ~azure.mgmt.datafactory.models.IntegrationRuntimeAutoUpdate + :param update_delay_offset: The time offset (in hours) in the day, e.g., + PT03H is 3 hours. The integration runtime auto update will happen on that + time. + :type update_delay_offset: str + """ + + _attribute_map = { + 'auto_update': {'key': 'autoUpdate', 'type': 'str'}, + 'update_delay_offset': {'key': 'updateDelayOffset', 'type': 'str'}, + } + + def __init__(self, *, auto_update=None, update_delay_offset: str=None, **kwargs) -> None: + super(UpdateIntegrationRuntimeRequest, self).__init__(**kwargs) + self.auto_update = auto_update + self.update_delay_offset = update_delay_offset + + +class UserAccessPolicy(Model): + """Get Data Plane read only token request definition. + + :param permissions: The string with permissions for Data Plane access. + Currently only 'r' is supported which grants read only access. + :type permissions: str + :param access_resource_path: The resource path to get access relative to + factory. Currently only empty string is supported which corresponds to the + factory resource. + :type access_resource_path: str + :param profile_name: The name of the profile. Currently only the default + is supported. The default value is DefaultProfile. + :type profile_name: str + :param start_time: Start time for the token. If not specified the current + time will be used. + :type start_time: str + :param expire_time: Expiration time for the token. Maximum duration for + the token is eight hours and by default the token will expire in eight + hours. + :type expire_time: str + """ + + _attribute_map = { + 'permissions': {'key': 'permissions', 'type': 'str'}, + 'access_resource_path': {'key': 'accessResourcePath', 'type': 'str'}, + 'profile_name': {'key': 'profileName', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'expire_time': {'key': 'expireTime', 'type': 'str'}, + } + + def __init__(self, *, permissions: str=None, access_resource_path: str=None, profile_name: str=None, start_time: str=None, expire_time: str=None, **kwargs) -> None: + super(UserAccessPolicy, self).__init__(**kwargs) + self.permissions = permissions + self.access_resource_path = access_resource_path + self.profile_name = profile_name + self.start_time = start_time + self.expire_time = expire_time + + +class UserProperty(Model): + """User property. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. User property name. + :type name: str + :param value: Required. User property value. Type: string (or Expression + with resultType string). + :type value: object + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'object'}, + } + + def __init__(self, *, name: str, value, **kwargs) -> None: + super(UserProperty, self).__init__(**kwargs) + self.name = name + self.value = value + + +class ValidationActivity(ControlActivity): + """This activity verifies that an external resource exists. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param timeout: Specifies the timeout for the activity to run. If there is + no value specified, it takes the value of TimeSpan.FromDays(7) which is 1 + week as default. Type: string (or Expression with resultType string), + pattern: ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type timeout: object + :param sleep: A delay in seconds between validation attempts. If no value + is specified, 10 seconds will be used as the default. Type: integer (or + Expression with resultType integer). + :type sleep: object + :param minimum_size: Can be used if dataset points to a file. The file + must be greater than or equal in size to the value specified. Type: + integer (or Expression with resultType integer). + :type minimum_size: object + :param child_items: Can be used if dataset points to a folder. If set to + true, the folder must have at least one file. If set to false, the folder + must be empty. Type: boolean (or Expression with resultType boolean). + :type child_items: object + :param dataset: Required. Validation activity dataset reference. + :type dataset: ~azure.mgmt.datafactory.models.DatasetReference + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'dataset': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'timeout': {'key': 'typeProperties.timeout', 'type': 'object'}, + 'sleep': {'key': 'typeProperties.sleep', 'type': 'object'}, + 'minimum_size': {'key': 'typeProperties.minimumSize', 'type': 'object'}, + 'child_items': {'key': 'typeProperties.childItems', 'type': 'object'}, + 'dataset': {'key': 'typeProperties.dataset', 'type': 'DatasetReference'}, + } + + def __init__(self, *, name: str, dataset, additional_properties=None, description: str=None, depends_on=None, user_properties=None, timeout=None, sleep=None, minimum_size=None, child_items=None, **kwargs) -> None: + super(ValidationActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, **kwargs) + self.timeout = timeout + self.sleep = sleep + self.minimum_size = minimum_size + self.child_items = child_items + self.dataset = dataset + self.type = 'Validation' + + +class VariableSpecification(Model): + """Definition of a single variable for a Pipeline. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Variable type. Possible values include: 'String', + 'Bool', 'Array' + :type type: str or ~azure.mgmt.datafactory.models.VariableType + :param default_value: Default value of variable. + :type default_value: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'default_value': {'key': 'defaultValue', 'type': 'object'}, + } + + def __init__(self, *, type, default_value=None, **kwargs) -> None: + super(VariableSpecification, self).__init__(**kwargs) + self.type = type + self.default_value = default_value + + +class VerticaLinkedService(LinkedService): + """Vertica linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param connection_string: An ODBC connection string. Type: string, + SecureString or AzureKeyVaultSecretReference. + :type connection_string: object + :param pwd: The Azure key vault secret reference of password in connection + string. + :type pwd: ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, + 'pwd': {'key': 'typeProperties.pwd', 'type': 'AzureKeyVaultSecretReference'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, connection_string=None, pwd=None, encrypted_credential=None, **kwargs) -> None: + super(VerticaLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.connection_string = connection_string + self.pwd = pwd + self.encrypted_credential = encrypted_credential + self.type = 'Vertica' + + +class VerticaSource(CopySource): + """A copy activity Vertica source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(VerticaSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'VerticaSource' + + +class VerticaTableDataset(Dataset): + """Vertica dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: This property will be retired. Please consider using + schema + table properties instead. + :type table_name: object + :param table: The table name of the Vertica. Type: string (or Expression + with resultType string). + :type table: object + :param vertica_table_dataset_schema: The schema name of the Vertica. Type: + string (or Expression with resultType string). + :type vertica_table_dataset_schema: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + 'table': {'key': 'typeProperties.table', 'type': 'object'}, + 'vertica_table_dataset_schema': {'key': 'typeProperties.schema', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, table=None, vertica_table_dataset_schema=None, **kwargs) -> None: + super(VerticaTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.table = table + self.vertica_table_dataset_schema = vertica_table_dataset_schema + self.type = 'VerticaTable' + + +class WaitActivity(ControlActivity): + """This activity suspends pipeline execution for the specified interval. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param wait_time_in_seconds: Required. Duration in seconds. + :type wait_time_in_seconds: int + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'wait_time_in_seconds': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'wait_time_in_seconds': {'key': 'typeProperties.waitTimeInSeconds', 'type': 'int'}, + } + + def __init__(self, *, name: str, wait_time_in_seconds: int, additional_properties=None, description: str=None, depends_on=None, user_properties=None, **kwargs) -> None: + super(WaitActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, **kwargs) + self.wait_time_in_seconds = wait_time_in_seconds + self.type = 'Wait' + + +class WebActivity(ExecutionActivity): + """Web activity. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :param linked_service_name: Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param policy: Activity policy. + :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy + :param method: Required. Rest API method for target endpoint. Possible + values include: 'GET', 'POST', 'PUT', 'DELETE' + :type method: str or ~azure.mgmt.datafactory.models.WebActivityMethod + :param url: Required. Web activity target endpoint and path. Type: string + (or Expression with resultType string). + :type url: object + :param headers: Represents the headers that will be sent to the request. + For example, to set the language and type on a request: "headers" : { + "Accept-Language": "en-us", "Content-Type": "application/json" }. Type: + string (or Expression with resultType string). + :type headers: object + :param body: Represents the payload that will be sent to the endpoint. + Required for POST/PUT method, not allowed for GET method Type: string (or + Expression with resultType string). + :type body: object + :param authentication: Authentication method used for calling the + endpoint. + :type authentication: + ~azure.mgmt.datafactory.models.WebActivityAuthentication + :param datasets: List of datasets passed to web endpoint. + :type datasets: list[~azure.mgmt.datafactory.models.DatasetReference] + :param linked_services: List of linked services passed to web endpoint. + :type linked_services: + list[~azure.mgmt.datafactory.models.LinkedServiceReference] + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'method': {'required': True}, + 'url': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, + 'method': {'key': 'typeProperties.method', 'type': 'str'}, + 'url': {'key': 'typeProperties.url', 'type': 'object'}, + 'headers': {'key': 'typeProperties.headers', 'type': 'object'}, + 'body': {'key': 'typeProperties.body', 'type': 'object'}, + 'authentication': {'key': 'typeProperties.authentication', 'type': 'WebActivityAuthentication'}, + 'datasets': {'key': 'typeProperties.datasets', 'type': '[DatasetReference]'}, + 'linked_services': {'key': 'typeProperties.linkedServices', 'type': '[LinkedServiceReference]'}, + } + + def __init__(self, *, name: str, method, url, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, headers=None, body=None, authentication=None, datasets=None, linked_services=None, **kwargs) -> None: + super(WebActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) + self.method = method + self.url = url + self.headers = headers + self.body = body + self.authentication = authentication + self.datasets = datasets + self.linked_services = linked_services + self.type = 'WebActivity' + + +class WebActivityAuthentication(Model): + """Web activity authentication properties. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Web activity authentication + (Basic/ClientCertificate/MSI) + :type type: str + :param pfx: Base64-encoded contents of a PFX file. + :type pfx: ~azure.mgmt.datafactory.models.SecureString + :param username: Web activity authentication user name for basic + authentication. + :type username: str + :param password: Password for the PFX file or basic authentication. + :type password: ~azure.mgmt.datafactory.models.SecureString + :param resource: Resource for which Azure Auth token will be requested + when using MSI Authentication. + :type resource: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'pfx': {'key': 'pfx', 'type': 'SecureString'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'SecureString'}, + 'resource': {'key': 'resource', 'type': 'str'}, + } + + def __init__(self, *, type: str, pfx=None, username: str=None, password=None, resource: str=None, **kwargs) -> None: + super(WebActivityAuthentication, self).__init__(**kwargs) + self.type = type + self.pfx = pfx + self.username = username + self.password = password + self.resource = resource + + +class WebLinkedServiceTypeProperties(Model): + """Base definition of WebLinkedServiceTypeProperties, this typeProperties is + polymorphic based on authenticationType, so not flattened in SDK models. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: WebClientCertificateAuthentication, + WebBasicAuthentication, WebAnonymousAuthentication + + All required parameters must be populated in order to send to Azure. + + :param url: Required. The URL of the web service endpoint, e.g. + http://www.microsoft.com . Type: string (or Expression with resultType + string). + :type url: object + :param authentication_type: Required. Constant filled by server. + :type authentication_type: str + """ + + _validation = { + 'url': {'required': True}, + 'authentication_type': {'required': True}, + } + + _attribute_map = { + 'url': {'key': 'url', 'type': 'object'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, + } + + _subtype_map = { + 'authentication_type': {'ClientCertificate': 'WebClientCertificateAuthentication', 'Basic': 'WebBasicAuthentication', 'Anonymous': 'WebAnonymousAuthentication'} + } + + def __init__(self, *, url, **kwargs) -> None: + super(WebLinkedServiceTypeProperties, self).__init__(**kwargs) + self.url = url + self.authentication_type = None + + +class WebAnonymousAuthentication(WebLinkedServiceTypeProperties): + """A WebLinkedService that uses anonymous authentication to communicate with + an HTTP endpoint. + + All required parameters must be populated in order to send to Azure. + + :param url: Required. The URL of the web service endpoint, e.g. + http://www.microsoft.com . Type: string (or Expression with resultType + string). + :type url: object + :param authentication_type: Required. Constant filled by server. + :type authentication_type: str + """ + + _validation = { + 'url': {'required': True}, + 'authentication_type': {'required': True}, + } + + _attribute_map = { + 'url': {'key': 'url', 'type': 'object'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, + } + + def __init__(self, *, url, **kwargs) -> None: + super(WebAnonymousAuthentication, self).__init__(url=url, **kwargs) + self.authentication_type = 'Anonymous' + + +class WebBasicAuthentication(WebLinkedServiceTypeProperties): + """A WebLinkedService that uses basic authentication to communicate with an + HTTP endpoint. + + All required parameters must be populated in order to send to Azure. + + :param url: Required. The URL of the web service endpoint, e.g. + http://www.microsoft.com . Type: string (or Expression with resultType + string). + :type url: object + :param authentication_type: Required. Constant filled by server. + :type authentication_type: str + :param username: Required. User name for Basic authentication. Type: + string (or Expression with resultType string). + :type username: object + :param password: Required. The password for Basic authentication. + :type password: ~azure.mgmt.datafactory.models.SecretBase + """ + + _validation = { + 'url': {'required': True}, + 'authentication_type': {'required': True}, + 'username': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'url': {'key': 'url', 'type': 'object'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'object'}, + 'password': {'key': 'password', 'type': 'SecretBase'}, + } + + def __init__(self, *, url, username, password, **kwargs) -> None: + super(WebBasicAuthentication, self).__init__(url=url, **kwargs) + self.username = username + self.password = password + self.authentication_type = 'Basic' + + +class WebClientCertificateAuthentication(WebLinkedServiceTypeProperties): + """A WebLinkedService that uses client certificate based authentication to + communicate with an HTTP endpoint. This scheme follows mutual + authentication; the server must also provide valid credentials to the + client. + + All required parameters must be populated in order to send to Azure. + + :param url: Required. The URL of the web service endpoint, e.g. + http://www.microsoft.com . Type: string (or Expression with resultType + string). + :type url: object + :param authentication_type: Required. Constant filled by server. + :type authentication_type: str + :param pfx: Required. Base64-encoded contents of a PFX file. + :type pfx: ~azure.mgmt.datafactory.models.SecretBase + :param password: Required. Password for the PFX file. + :type password: ~azure.mgmt.datafactory.models.SecretBase + """ + + _validation = { + 'url': {'required': True}, + 'authentication_type': {'required': True}, + 'pfx': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'url': {'key': 'url', 'type': 'object'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, + 'pfx': {'key': 'pfx', 'type': 'SecretBase'}, + 'password': {'key': 'password', 'type': 'SecretBase'}, + } + + def __init__(self, *, url, pfx, password, **kwargs) -> None: + super(WebClientCertificateAuthentication, self).__init__(url=url, **kwargs) + self.pfx = pfx + self.password = password + self.authentication_type = 'ClientCertificate' + + +class WebHookActivity(ControlActivity): + """WebHook activity. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :ivar method: Required. Rest API method for target endpoint. Default + value: "POST" . + :vartype method: str + :param url: Required. WebHook activity target endpoint and path. Type: + string (or Expression with resultType string). + :type url: object + :param timeout: The timeout within which the webhook should be called + back. If there is no value specified, it defaults to 10 minutes. Type: + string. Pattern: ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type timeout: str + :param headers: Represents the headers that will be sent to the request. + For example, to set the language and type on a request: "headers" : { + "Accept-Language": "en-us", "Content-Type": "application/json" }. Type: + string (or Expression with resultType string). + :type headers: object + :param body: Represents the payload that will be sent to the endpoint. + Required for POST/PUT method, not allowed for GET method Type: string (or + Expression with resultType string). + :type body: object + :param authentication: Authentication method used for calling the + endpoint. + :type authentication: + ~azure.mgmt.datafactory.models.WebActivityAuthentication + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'method': {'required': True, 'constant': True}, + 'url': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'method': {'key': 'typeProperties.method', 'type': 'str'}, + 'url': {'key': 'typeProperties.url', 'type': 'object'}, + 'timeout': {'key': 'typeProperties.timeout', 'type': 'str'}, + 'headers': {'key': 'typeProperties.headers', 'type': 'object'}, + 'body': {'key': 'typeProperties.body', 'type': 'object'}, + 'authentication': {'key': 'typeProperties.authentication', 'type': 'WebActivityAuthentication'}, + } + + method = "POST" + + def __init__(self, *, name: str, url, additional_properties=None, description: str=None, depends_on=None, user_properties=None, timeout: str=None, headers=None, body=None, authentication=None, **kwargs) -> None: + super(WebHookActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, **kwargs) + self.url = url + self.timeout = timeout + self.headers = headers + self.body = body + self.authentication = authentication + self.type = 'WebHook' + + +class WebLinkedService(LinkedService): + """Web linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param type_properties: Required. Web linked service properties. + :type type_properties: + ~azure.mgmt.datafactory.models.WebLinkedServiceTypeProperties + """ + + _validation = { + 'type': {'required': True}, + 'type_properties': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'type_properties': {'key': 'typeProperties', 'type': 'WebLinkedServiceTypeProperties'}, + } + + def __init__(self, *, type_properties, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, **kwargs) -> None: + super(WebLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.type_properties = type_properties + self.type = 'Web' + + +class WebSource(CopySource): + """A copy activity source for web page table. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, **kwargs) -> None: + super(WebSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.type = 'WebSource' + + +class WebTableDataset(Dataset): + """The dataset points to a HTML table in the web page. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param index: Required. The zero-based index of the table in the web page. + Type: integer (or Expression with resultType integer), minimum: 0. + :type index: object + :param path: The relative URL to the web page from the linked service URL. + Type: string (or Expression with resultType string). + :type path: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + 'index': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'index': {'key': 'typeProperties.index', 'type': 'object'}, + 'path': {'key': 'typeProperties.path', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, index, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, path=None, **kwargs) -> None: + super(WebTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.index = index + self.path = path + self.type = 'WebTable' + + +class XeroLinkedService(LinkedService): + """Xero Service linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param host: Required. The endpoint of the Xero server. (i.e. + api.xero.com) + :type host: object + :param consumer_key: The consumer key associated with the Xero + application. + :type consumer_key: ~azure.mgmt.datafactory.models.SecretBase + :param private_key: The private key from the .pem file that was generated + for your Xero private application. You must include all the text from the + .pem file, including the Unix line endings( + ). + :type private_key: ~azure.mgmt.datafactory.models.SecretBase + :param use_encrypted_endpoints: Specifies whether the data source + endpoints are encrypted using HTTPS. The default value is true. + :type use_encrypted_endpoints: object + :param use_host_verification: Specifies whether to require the host name + in the server's certificate to match the host name of the server when + connecting over SSL. The default value is true. + :type use_host_verification: object + :param use_peer_verification: Specifies whether to verify the identity of + the server when connecting over SSL. The default value is true. + :type use_peer_verification: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'host': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'host': {'key': 'typeProperties.host', 'type': 'object'}, + 'consumer_key': {'key': 'typeProperties.consumerKey', 'type': 'SecretBase'}, + 'private_key': {'key': 'typeProperties.privateKey', 'type': 'SecretBase'}, + 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, + 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, + 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, host, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, consumer_key=None, private_key=None, use_encrypted_endpoints=None, use_host_verification=None, use_peer_verification=None, encrypted_credential=None, **kwargs) -> None: + super(XeroLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.host = host + self.consumer_key = consumer_key + self.private_key = private_key + self.use_encrypted_endpoints = use_encrypted_endpoints + self.use_host_verification = use_host_verification + self.use_peer_verification = use_peer_verification + self.encrypted_credential = encrypted_credential + self.type = 'Xero' + + +class XeroObjectDataset(Dataset): + """Xero Service dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: + super(XeroObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.type = 'XeroObject' + + +class XeroSource(CopySource): + """A copy activity Xero Service source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(XeroSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'XeroSource' + + +class ZohoLinkedService(LinkedService): + """Zoho server linked service. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param connect_via: The integration runtime reference. + :type connect_via: + ~azure.mgmt.datafactory.models.IntegrationRuntimeReference + :param description: Linked service description. + :type description: str + :param parameters: Parameters for linked service. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + linked service. + :type annotations: list[object] + :param type: Required. Constant filled by server. + :type type: str + :param endpoint: Required. The endpoint of the Zoho server. (i.e. + crm.zoho.com/crm/private) + :type endpoint: object + :param access_token: The access token for Zoho authentication. + :type access_token: ~azure.mgmt.datafactory.models.SecretBase + :param use_encrypted_endpoints: Specifies whether the data source + endpoints are encrypted using HTTPS. The default value is true. + :type use_encrypted_endpoints: object + :param use_host_verification: Specifies whether to require the host name + in the server's certificate to match the host name of the server when + connecting over SSL. The default value is true. + :type use_host_verification: object + :param use_peer_verification: Specifies whether to verify the identity of + the server when connecting over SSL. The default value is true. + :type use_peer_verification: object + :param encrypted_credential: The encrypted credential used for + authentication. Credentials are encrypted using the integration runtime + credential manager. Type: string (or Expression with resultType string). + :type encrypted_credential: object + """ + + _validation = { + 'type': {'required': True}, + 'endpoint': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'endpoint': {'key': 'typeProperties.endpoint', 'type': 'object'}, + 'access_token': {'key': 'typeProperties.accessToken', 'type': 'SecretBase'}, + 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, + 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, + 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, + 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, + } + + def __init__(self, *, endpoint, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, access_token=None, use_encrypted_endpoints=None, use_host_verification=None, use_peer_verification=None, encrypted_credential=None, **kwargs) -> None: + super(ZohoLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) + self.endpoint = endpoint + self.access_token = access_token + self.use_encrypted_endpoints = use_encrypted_endpoints + self.use_host_verification = use_host_verification + self.use_peer_verification = use_peer_verification + self.encrypted_credential = encrypted_credential + self.type = 'Zoho' + + +class ZohoObjectDataset(Dataset): + """Zoho server dataset. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Dataset description. + :type description: str + :param structure: Columns that define the structure of the dataset. Type: + array (or Expression with resultType array), itemType: DatasetDataElement. + :type structure: object + :param schema: Columns that define the physical type schema of the + dataset. Type: array (or Expression with resultType array), itemType: + DatasetSchemaDataElement. + :type schema: object + :param linked_service_name: Required. Linked service reference. + :type linked_service_name: + ~azure.mgmt.datafactory.models.LinkedServiceReference + :param parameters: Parameters for dataset. + :type parameters: dict[str, + ~azure.mgmt.datafactory.models.ParameterSpecification] + :param annotations: List of tags that can be used for describing the + Dataset. + :type annotations: list[object] + :param folder: The folder that this Dataset is in. If not specified, + Dataset will appear at the root level. + :type folder: ~azure.mgmt.datafactory.models.DatasetFolder + :param type: Required. Constant filled by server. + :type type: str + :param table_name: The table name. Type: string (or Expression with + resultType string). + :type table_name: object + """ + + _validation = { + 'linked_service_name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'structure': {'key': 'structure', 'type': 'object'}, + 'schema': {'key': 'schema', 'type': 'object'}, + 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, + 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, + 'annotations': {'key': 'annotations', 'type': '[object]'}, + 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, + 'type': {'key': 'type', 'type': 'str'}, + 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, + } + + def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: + super(ZohoObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) + self.table_name = table_name + self.type = 'ZohoObject' + + +class ZohoSource(CopySource): + """A copy activity Zoho server source. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param source_retry_count: Source retry count. Type: integer (or + Expression with resultType integer). + :type source_retry_count: object + :param source_retry_wait: Source retry wait. Type: string (or Expression + with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type source_retry_wait: object + :param max_concurrent_connections: The maximum concurrent connection count + for the source data store. Type: integer (or Expression with resultType + integer). + :type max_concurrent_connections: object + :param type: Required. Constant filled by server. + :type type: str + :param query: A query to retrieve data from source. Type: string (or + Expression with resultType string). + :type query: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, + 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, + 'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + 'query': {'key': 'query', 'type': 'object'}, + } + + def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, max_concurrent_connections=None, query=None, **kwargs) -> None: + super(ZohoSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, max_concurrent_connections=max_concurrent_connections, **kwargs) + self.query = query + self.type = 'ZohoSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/_paged_models.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/_paged_models.py new file mode 100644 index 000000000000..4092d2143a7c --- /dev/null +++ b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/_paged_models.py @@ -0,0 +1,118 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class FactoryPaged(Paged): + """ + A paging container for iterating over a list of :class:`Factory ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Factory]'} + } + + def __init__(self, *args, **kwargs): + + super(FactoryPaged, self).__init__(*args, **kwargs) +class IntegrationRuntimeResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`IntegrationRuntimeResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[IntegrationRuntimeResource]'} + } + + def __init__(self, *args, **kwargs): + + super(IntegrationRuntimeResourcePaged, self).__init__(*args, **kwargs) +class LinkedServiceResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`LinkedServiceResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[LinkedServiceResource]'} + } + + def __init__(self, *args, **kwargs): + + super(LinkedServiceResourcePaged, self).__init__(*args, **kwargs) +class DatasetResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`DatasetResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DatasetResource]'} + } + + def __init__(self, *args, **kwargs): + + super(DatasetResourcePaged, self).__init__(*args, **kwargs) +class PipelineResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`PipelineResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PipelineResource]'} + } + + def __init__(self, *args, **kwargs): + + super(PipelineResourcePaged, self).__init__(*args, **kwargs) +class TriggerResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`TriggerResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TriggerResource]'} + } + + def __init__(self, *args, **kwargs): + + super(TriggerResourcePaged, self).__init__(*args, **kwargs) +class RerunTriggerResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`RerunTriggerResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RerunTriggerResource]'} + } + + def __init__(self, *args, **kwargs): + + super(RerunTriggerResourcePaged, self).__init__(*args, **kwargs) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/access_policy_response.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/access_policy_response.py deleted file mode 100644 index 033d0fd9591f..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/access_policy_response.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AccessPolicyResponse(Model): - """Get Data Plane read only token response definition. - - :param policy: The user access policy. - :type policy: ~azure.mgmt.datafactory.models.UserAccessPolicy - :param access_token: Data Plane read only access token. - :type access_token: str - :param data_plane_url: Data Plane service base URL. - :type data_plane_url: str - """ - - _attribute_map = { - 'policy': {'key': 'policy', 'type': 'UserAccessPolicy'}, - 'access_token': {'key': 'accessToken', 'type': 'str'}, - 'data_plane_url': {'key': 'dataPlaneUrl', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AccessPolicyResponse, self).__init__(**kwargs) - self.policy = kwargs.get('policy', None) - self.access_token = kwargs.get('access_token', None) - self.data_plane_url = kwargs.get('data_plane_url', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/access_policy_response_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/access_policy_response_py3.py deleted file mode 100644 index 2932f547ff26..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/access_policy_response_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AccessPolicyResponse(Model): - """Get Data Plane read only token response definition. - - :param policy: The user access policy. - :type policy: ~azure.mgmt.datafactory.models.UserAccessPolicy - :param access_token: Data Plane read only access token. - :type access_token: str - :param data_plane_url: Data Plane service base URL. - :type data_plane_url: str - """ - - _attribute_map = { - 'policy': {'key': 'policy', 'type': 'UserAccessPolicy'}, - 'access_token': {'key': 'accessToken', 'type': 'str'}, - 'data_plane_url': {'key': 'dataPlaneUrl', 'type': 'str'}, - } - - def __init__(self, *, policy=None, access_token: str=None, data_plane_url: str=None, **kwargs) -> None: - super(AccessPolicyResponse, self).__init__(**kwargs) - self.policy = policy - self.access_token = access_token - self.data_plane_url = data_plane_url diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/activity.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/activity.py deleted file mode 100644 index 72d920f1d04c..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/activity.py +++ /dev/null @@ -1,63 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Activity(Model): - """A pipeline activity. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ExecutionActivity, ControlActivity - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'Execution': 'ExecutionActivity', 'Container': 'ControlActivity'} - } - - def __init__(self, **kwargs): - super(Activity, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.name = kwargs.get('name', None) - self.description = kwargs.get('description', None) - self.depends_on = kwargs.get('depends_on', None) - self.user_properties = kwargs.get('user_properties', None) - self.type = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/activity_dependency.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/activity_dependency.py deleted file mode 100644 index a15b34acc24f..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/activity_dependency.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ActivityDependency(Model): - """Activity dependency information. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param activity: Required. Activity name. - :type activity: str - :param dependency_conditions: Required. Match-Condition for the - dependency. - :type dependency_conditions: list[str or - ~azure.mgmt.datafactory.models.DependencyCondition] - """ - - _validation = { - 'activity': {'required': True}, - 'dependency_conditions': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'activity': {'key': 'activity', 'type': 'str'}, - 'dependency_conditions': {'key': 'dependencyConditions', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ActivityDependency, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.activity = kwargs.get('activity', None) - self.dependency_conditions = kwargs.get('dependency_conditions', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/activity_dependency_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/activity_dependency_py3.py deleted file mode 100644 index 2883a81a0adc..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/activity_dependency_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ActivityDependency(Model): - """Activity dependency information. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param activity: Required. Activity name. - :type activity: str - :param dependency_conditions: Required. Match-Condition for the - dependency. - :type dependency_conditions: list[str or - ~azure.mgmt.datafactory.models.DependencyCondition] - """ - - _validation = { - 'activity': {'required': True}, - 'dependency_conditions': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'activity': {'key': 'activity', 'type': 'str'}, - 'dependency_conditions': {'key': 'dependencyConditions', 'type': '[str]'}, - } - - def __init__(self, *, activity: str, dependency_conditions, additional_properties=None, **kwargs) -> None: - super(ActivityDependency, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.activity = activity - self.dependency_conditions = dependency_conditions diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/activity_policy.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/activity_policy.py deleted file mode 100644 index 4475cdbd9bea..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/activity_policy.py +++ /dev/null @@ -1,59 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ActivityPolicy(Model): - """Execution policy for an activity. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param timeout: Specifies the timeout for the activity to run. The default - timeout is 7 days. Type: string (or Expression with resultType string), - pattern: ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type timeout: object - :param retry: Maximum ordinary retry attempts. Default is 0. Type: integer - (or Expression with resultType integer), minimum: 0. - :type retry: object - :param retry_interval_in_seconds: Interval between each retry attempt (in - seconds). The default is 30 sec. - :type retry_interval_in_seconds: int - :param secure_input: When set to true, Input from activity is considered - as secure and will not be logged to monitoring. - :type secure_input: bool - :param secure_output: When set to true, Output from activity is considered - as secure and will not be logged to monitoring. - :type secure_output: bool - """ - - _validation = { - 'retry_interval_in_seconds': {'maximum': 86400, 'minimum': 30}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'timeout': {'key': 'timeout', 'type': 'object'}, - 'retry': {'key': 'retry', 'type': 'object'}, - 'retry_interval_in_seconds': {'key': 'retryIntervalInSeconds', 'type': 'int'}, - 'secure_input': {'key': 'secureInput', 'type': 'bool'}, - 'secure_output': {'key': 'secureOutput', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ActivityPolicy, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.timeout = kwargs.get('timeout', None) - self.retry = kwargs.get('retry', None) - self.retry_interval_in_seconds = kwargs.get('retry_interval_in_seconds', None) - self.secure_input = kwargs.get('secure_input', None) - self.secure_output = kwargs.get('secure_output', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/activity_policy_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/activity_policy_py3.py deleted file mode 100644 index 52d469679974..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/activity_policy_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ActivityPolicy(Model): - """Execution policy for an activity. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param timeout: Specifies the timeout for the activity to run. The default - timeout is 7 days. Type: string (or Expression with resultType string), - pattern: ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type timeout: object - :param retry: Maximum ordinary retry attempts. Default is 0. Type: integer - (or Expression with resultType integer), minimum: 0. - :type retry: object - :param retry_interval_in_seconds: Interval between each retry attempt (in - seconds). The default is 30 sec. - :type retry_interval_in_seconds: int - :param secure_input: When set to true, Input from activity is considered - as secure and will not be logged to monitoring. - :type secure_input: bool - :param secure_output: When set to true, Output from activity is considered - as secure and will not be logged to monitoring. - :type secure_output: bool - """ - - _validation = { - 'retry_interval_in_seconds': {'maximum': 86400, 'minimum': 30}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'timeout': {'key': 'timeout', 'type': 'object'}, - 'retry': {'key': 'retry', 'type': 'object'}, - 'retry_interval_in_seconds': {'key': 'retryIntervalInSeconds', 'type': 'int'}, - 'secure_input': {'key': 'secureInput', 'type': 'bool'}, - 'secure_output': {'key': 'secureOutput', 'type': 'bool'}, - } - - def __init__(self, *, additional_properties=None, timeout=None, retry=None, retry_interval_in_seconds: int=None, secure_input: bool=None, secure_output: bool=None, **kwargs) -> None: - super(ActivityPolicy, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.timeout = timeout - self.retry = retry - self.retry_interval_in_seconds = retry_interval_in_seconds - self.secure_input = secure_input - self.secure_output = secure_output diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/activity_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/activity_py3.py deleted file mode 100644 index b5997c9352e1..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/activity_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Activity(Model): - """A pipeline activity. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ExecutionActivity, ControlActivity - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'Execution': 'ExecutionActivity', 'Container': 'ControlActivity'} - } - - def __init__(self, *, name: str, additional_properties=None, description: str=None, depends_on=None, user_properties=None, **kwargs) -> None: - super(Activity, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.name = name - self.description = description - self.depends_on = depends_on - self.user_properties = user_properties - self.type = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/activity_run.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/activity_run.py deleted file mode 100644 index 901ffe23cd4e..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/activity_run.py +++ /dev/null @@ -1,102 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ActivityRun(Model): - """Information about an activity run in a pipeline. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar pipeline_name: The name of the pipeline. - :vartype pipeline_name: str - :ivar pipeline_run_id: The id of the pipeline run. - :vartype pipeline_run_id: str - :ivar activity_name: The name of the activity. - :vartype activity_name: str - :ivar activity_type: The type of the activity. - :vartype activity_type: str - :ivar activity_run_id: The id of the activity run. - :vartype activity_run_id: str - :ivar linked_service_name: The name of the compute linked service. - :vartype linked_service_name: str - :ivar status: The status of the activity run. - :vartype status: str - :ivar activity_run_start: The start time of the activity run in 'ISO 8601' - format. - :vartype activity_run_start: datetime - :ivar activity_run_end: The end time of the activity run in 'ISO 8601' - format. - :vartype activity_run_end: datetime - :ivar duration_in_ms: The duration of the activity run. - :vartype duration_in_ms: int - :ivar input: The input for the activity. - :vartype input: object - :ivar output: The output for the activity. - :vartype output: object - :ivar error: The error if any from the activity run. - :vartype error: object - """ - - _validation = { - 'pipeline_name': {'readonly': True}, - 'pipeline_run_id': {'readonly': True}, - 'activity_name': {'readonly': True}, - 'activity_type': {'readonly': True}, - 'activity_run_id': {'readonly': True}, - 'linked_service_name': {'readonly': True}, - 'status': {'readonly': True}, - 'activity_run_start': {'readonly': True}, - 'activity_run_end': {'readonly': True}, - 'duration_in_ms': {'readonly': True}, - 'input': {'readonly': True}, - 'output': {'readonly': True}, - 'error': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'pipeline_name': {'key': 'pipelineName', 'type': 'str'}, - 'pipeline_run_id': {'key': 'pipelineRunId', 'type': 'str'}, - 'activity_name': {'key': 'activityName', 'type': 'str'}, - 'activity_type': {'key': 'activityType', 'type': 'str'}, - 'activity_run_id': {'key': 'activityRunId', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'activity_run_start': {'key': 'activityRunStart', 'type': 'iso-8601'}, - 'activity_run_end': {'key': 'activityRunEnd', 'type': 'iso-8601'}, - 'duration_in_ms': {'key': 'durationInMs', 'type': 'int'}, - 'input': {'key': 'input', 'type': 'object'}, - 'output': {'key': 'output', 'type': 'object'}, - 'error': {'key': 'error', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ActivityRun, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.pipeline_name = None - self.pipeline_run_id = None - self.activity_name = None - self.activity_type = None - self.activity_run_id = None - self.linked_service_name = None - self.status = None - self.activity_run_start = None - self.activity_run_end = None - self.duration_in_ms = None - self.input = None - self.output = None - self.error = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/activity_run_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/activity_run_py3.py deleted file mode 100644 index 488e822de957..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/activity_run_py3.py +++ /dev/null @@ -1,102 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ActivityRun(Model): - """Information about an activity run in a pipeline. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar pipeline_name: The name of the pipeline. - :vartype pipeline_name: str - :ivar pipeline_run_id: The id of the pipeline run. - :vartype pipeline_run_id: str - :ivar activity_name: The name of the activity. - :vartype activity_name: str - :ivar activity_type: The type of the activity. - :vartype activity_type: str - :ivar activity_run_id: The id of the activity run. - :vartype activity_run_id: str - :ivar linked_service_name: The name of the compute linked service. - :vartype linked_service_name: str - :ivar status: The status of the activity run. - :vartype status: str - :ivar activity_run_start: The start time of the activity run in 'ISO 8601' - format. - :vartype activity_run_start: datetime - :ivar activity_run_end: The end time of the activity run in 'ISO 8601' - format. - :vartype activity_run_end: datetime - :ivar duration_in_ms: The duration of the activity run. - :vartype duration_in_ms: int - :ivar input: The input for the activity. - :vartype input: object - :ivar output: The output for the activity. - :vartype output: object - :ivar error: The error if any from the activity run. - :vartype error: object - """ - - _validation = { - 'pipeline_name': {'readonly': True}, - 'pipeline_run_id': {'readonly': True}, - 'activity_name': {'readonly': True}, - 'activity_type': {'readonly': True}, - 'activity_run_id': {'readonly': True}, - 'linked_service_name': {'readonly': True}, - 'status': {'readonly': True}, - 'activity_run_start': {'readonly': True}, - 'activity_run_end': {'readonly': True}, - 'duration_in_ms': {'readonly': True}, - 'input': {'readonly': True}, - 'output': {'readonly': True}, - 'error': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'pipeline_name': {'key': 'pipelineName', 'type': 'str'}, - 'pipeline_run_id': {'key': 'pipelineRunId', 'type': 'str'}, - 'activity_name': {'key': 'activityName', 'type': 'str'}, - 'activity_type': {'key': 'activityType', 'type': 'str'}, - 'activity_run_id': {'key': 'activityRunId', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'activity_run_start': {'key': 'activityRunStart', 'type': 'iso-8601'}, - 'activity_run_end': {'key': 'activityRunEnd', 'type': 'iso-8601'}, - 'duration_in_ms': {'key': 'durationInMs', 'type': 'int'}, - 'input': {'key': 'input', 'type': 'object'}, - 'output': {'key': 'output', 'type': 'object'}, - 'error': {'key': 'error', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, **kwargs) -> None: - super(ActivityRun, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.pipeline_name = None - self.pipeline_run_id = None - self.activity_name = None - self.activity_type = None - self.activity_run_id = None - self.linked_service_name = None - self.status = None - self.activity_run_start = None - self.activity_run_end = None - self.duration_in_ms = None - self.input = None - self.output = None - self.error = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/activity_runs_query_response.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/activity_runs_query_response.py deleted file mode 100644 index 2fcd25a5ced2..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/activity_runs_query_response.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ActivityRunsQueryResponse(Model): - """A list activity runs. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. List of activity runs. - :type value: list[~azure.mgmt.datafactory.models.ActivityRun] - :param continuation_token: The continuation token for getting the next - page of results, if any remaining results exist, null otherwise. - :type continuation_token: str - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ActivityRun]'}, - 'continuation_token': {'key': 'continuationToken', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ActivityRunsQueryResponse, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.continuation_token = kwargs.get('continuation_token', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/activity_runs_query_response_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/activity_runs_query_response_py3.py deleted file mode 100644 index ee3eae141635..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/activity_runs_query_response_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ActivityRunsQueryResponse(Model): - """A list activity runs. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. List of activity runs. - :type value: list[~azure.mgmt.datafactory.models.ActivityRun] - :param continuation_token: The continuation token for getting the next - page of results, if any remaining results exist, null otherwise. - :type continuation_token: str - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ActivityRun]'}, - 'continuation_token': {'key': 'continuationToken', 'type': 'str'}, - } - - def __init__(self, *, value, continuation_token: str=None, **kwargs) -> None: - super(ActivityRunsQueryResponse, self).__init__(**kwargs) - self.value = value - self.continuation_token = continuation_token diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_mws_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_mws_linked_service.py deleted file mode 100644 index 4531b28777c6..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_mws_linked_service.py +++ /dev/null @@ -1,106 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class AmazonMWSLinkedService(LinkedService): - """Amazon Marketplace Web Service linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param endpoint: Required. The endpoint of the Amazon MWS server, (i.e. - mws.amazonservices.com) - :type endpoint: object - :param marketplace_id: Required. The Amazon Marketplace ID you want to - retrieve data from. To retrieve data from multiple Marketplace IDs, - separate them with a comma (,). (i.e. A2EUQ1WTGCTBG2) - :type marketplace_id: object - :param seller_id: Required. The Amazon seller ID. - :type seller_id: object - :param mws_auth_token: The Amazon MWS authentication token. - :type mws_auth_token: ~azure.mgmt.datafactory.models.SecretBase - :param access_key_id: Required. The access key id used to access data. - :type access_key_id: object - :param secret_key: The secret key used to access data. - :type secret_key: ~azure.mgmt.datafactory.models.SecretBase - :param use_encrypted_endpoints: Specifies whether the data source - endpoints are encrypted using HTTPS. The default value is true. - :type use_encrypted_endpoints: object - :param use_host_verification: Specifies whether to require the host name - in the server's certificate to match the host name of the server when - connecting over SSL. The default value is true. - :type use_host_verification: object - :param use_peer_verification: Specifies whether to verify the identity of - the server when connecting over SSL. The default value is true. - :type use_peer_verification: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'endpoint': {'required': True}, - 'marketplace_id': {'required': True}, - 'seller_id': {'required': True}, - 'access_key_id': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'endpoint': {'key': 'typeProperties.endpoint', 'type': 'object'}, - 'marketplace_id': {'key': 'typeProperties.marketplaceID', 'type': 'object'}, - 'seller_id': {'key': 'typeProperties.sellerID', 'type': 'object'}, - 'mws_auth_token': {'key': 'typeProperties.mwsAuthToken', 'type': 'SecretBase'}, - 'access_key_id': {'key': 'typeProperties.accessKeyId', 'type': 'object'}, - 'secret_key': {'key': 'typeProperties.secretKey', 'type': 'SecretBase'}, - 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, - 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, - 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AmazonMWSLinkedService, self).__init__(**kwargs) - self.endpoint = kwargs.get('endpoint', None) - self.marketplace_id = kwargs.get('marketplace_id', None) - self.seller_id = kwargs.get('seller_id', None) - self.mws_auth_token = kwargs.get('mws_auth_token', None) - self.access_key_id = kwargs.get('access_key_id', None) - self.secret_key = kwargs.get('secret_key', None) - self.use_encrypted_endpoints = kwargs.get('use_encrypted_endpoints', None) - self.use_host_verification = kwargs.get('use_host_verification', None) - self.use_peer_verification = kwargs.get('use_peer_verification', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'AmazonMWS' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_mws_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_mws_linked_service_py3.py deleted file mode 100644 index 421c20dc2d4a..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_mws_linked_service_py3.py +++ /dev/null @@ -1,106 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class AmazonMWSLinkedService(LinkedService): - """Amazon Marketplace Web Service linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param endpoint: Required. The endpoint of the Amazon MWS server, (i.e. - mws.amazonservices.com) - :type endpoint: object - :param marketplace_id: Required. The Amazon Marketplace ID you want to - retrieve data from. To retrieve data from multiple Marketplace IDs, - separate them with a comma (,). (i.e. A2EUQ1WTGCTBG2) - :type marketplace_id: object - :param seller_id: Required. The Amazon seller ID. - :type seller_id: object - :param mws_auth_token: The Amazon MWS authentication token. - :type mws_auth_token: ~azure.mgmt.datafactory.models.SecretBase - :param access_key_id: Required. The access key id used to access data. - :type access_key_id: object - :param secret_key: The secret key used to access data. - :type secret_key: ~azure.mgmt.datafactory.models.SecretBase - :param use_encrypted_endpoints: Specifies whether the data source - endpoints are encrypted using HTTPS. The default value is true. - :type use_encrypted_endpoints: object - :param use_host_verification: Specifies whether to require the host name - in the server's certificate to match the host name of the server when - connecting over SSL. The default value is true. - :type use_host_verification: object - :param use_peer_verification: Specifies whether to verify the identity of - the server when connecting over SSL. The default value is true. - :type use_peer_verification: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'endpoint': {'required': True}, - 'marketplace_id': {'required': True}, - 'seller_id': {'required': True}, - 'access_key_id': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'endpoint': {'key': 'typeProperties.endpoint', 'type': 'object'}, - 'marketplace_id': {'key': 'typeProperties.marketplaceID', 'type': 'object'}, - 'seller_id': {'key': 'typeProperties.sellerID', 'type': 'object'}, - 'mws_auth_token': {'key': 'typeProperties.mwsAuthToken', 'type': 'SecretBase'}, - 'access_key_id': {'key': 'typeProperties.accessKeyId', 'type': 'object'}, - 'secret_key': {'key': 'typeProperties.secretKey', 'type': 'SecretBase'}, - 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, - 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, - 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, endpoint, marketplace_id, seller_id, access_key_id, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, mws_auth_token=None, secret_key=None, use_encrypted_endpoints=None, use_host_verification=None, use_peer_verification=None, encrypted_credential=None, **kwargs) -> None: - super(AmazonMWSLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.endpoint = endpoint - self.marketplace_id = marketplace_id - self.seller_id = seller_id - self.mws_auth_token = mws_auth_token - self.access_key_id = access_key_id - self.secret_key = secret_key - self.use_encrypted_endpoints = use_encrypted_endpoints - self.use_host_verification = use_host_verification - self.use_peer_verification = use_peer_verification - self.encrypted_credential = encrypted_credential - self.type = 'AmazonMWS' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_mws_object_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_mws_object_dataset.py deleted file mode 100644 index 9885f5c77d8c..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_mws_object_dataset.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class AmazonMWSObjectDataset(Dataset): - """Amazon Marketplace Web Service dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AmazonMWSObjectDataset, self).__init__(**kwargs) - self.table_name = kwargs.get('table_name', None) - self.type = 'AmazonMWSObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_mws_object_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_mws_object_dataset_py3.py deleted file mode 100644 index 015ed9401c15..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_mws_object_dataset_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class AmazonMWSObjectDataset(Dataset): - """Amazon Marketplace Web Service dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: - super(AmazonMWSObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.table_name = table_name - self.type = 'AmazonMWSObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_mws_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_mws_source.py deleted file mode 100644 index 1cabba2201c7..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_mws_source.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class AmazonMWSSource(CopySource): - """A copy activity Amazon Marketplace Web Service source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AmazonMWSSource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.type = 'AmazonMWSSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_mws_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_mws_source_py3.py deleted file mode 100644 index 895281f9af51..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_mws_source_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class AmazonMWSSource(CopySource): - """A copy activity Amazon Marketplace Web Service source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query=None, **kwargs) -> None: - super(AmazonMWSSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.type = 'AmazonMWSSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_redshift_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_redshift_linked_service.py deleted file mode 100644 index a85e73b458ae..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_redshift_linked_service.py +++ /dev/null @@ -1,86 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class AmazonRedshiftLinkedService(LinkedService): - """Linked service for Amazon Redshift. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param server: Required. The name of the Amazon Redshift server. Type: - string (or Expression with resultType string). - :type server: object - :param username: The username of the Amazon Redshift source. Type: string - (or Expression with resultType string). - :type username: object - :param password: The password of the Amazon Redshift source. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param database: Required. The database name of the Amazon Redshift - source. Type: string (or Expression with resultType string). - :type database: object - :param port: The TCP port number that the Amazon Redshift server uses to - listen for client connections. The default value is 5439. Type: integer - (or Expression with resultType integer). - :type port: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'server': {'required': True}, - 'database': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'server': {'key': 'typeProperties.server', 'type': 'object'}, - 'username': {'key': 'typeProperties.username', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'database': {'key': 'typeProperties.database', 'type': 'object'}, - 'port': {'key': 'typeProperties.port', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AmazonRedshiftLinkedService, self).__init__(**kwargs) - self.server = kwargs.get('server', None) - self.username = kwargs.get('username', None) - self.password = kwargs.get('password', None) - self.database = kwargs.get('database', None) - self.port = kwargs.get('port', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'AmazonRedshift' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_redshift_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_redshift_linked_service_py3.py deleted file mode 100644 index 7912ad040946..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_redshift_linked_service_py3.py +++ /dev/null @@ -1,86 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class AmazonRedshiftLinkedService(LinkedService): - """Linked service for Amazon Redshift. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param server: Required. The name of the Amazon Redshift server. Type: - string (or Expression with resultType string). - :type server: object - :param username: The username of the Amazon Redshift source. Type: string - (or Expression with resultType string). - :type username: object - :param password: The password of the Amazon Redshift source. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param database: Required. The database name of the Amazon Redshift - source. Type: string (or Expression with resultType string). - :type database: object - :param port: The TCP port number that the Amazon Redshift server uses to - listen for client connections. The default value is 5439. Type: integer - (or Expression with resultType integer). - :type port: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'server': {'required': True}, - 'database': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'server': {'key': 'typeProperties.server', 'type': 'object'}, - 'username': {'key': 'typeProperties.username', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'database': {'key': 'typeProperties.database', 'type': 'object'}, - 'port': {'key': 'typeProperties.port', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, server, database, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, username=None, password=None, port=None, encrypted_credential=None, **kwargs) -> None: - super(AmazonRedshiftLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.server = server - self.username = username - self.password = password - self.database = database - self.port = port - self.encrypted_credential = encrypted_credential - self.type = 'AmazonRedshift' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_redshift_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_redshift_source.py deleted file mode 100644 index 0fa9a82ff9db..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_redshift_source.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class AmazonRedshiftSource(CopySource): - """A copy activity source for Amazon Redshift Source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: Database query. Type: string (or Expression with resultType - string). - :type query: object - :param redshift_unload_settings: The Amazon S3 settings needed for the - interim Amazon S3 when copying from Amazon Redshift with unload. With - this, data from Amazon Redshift source will be unloaded into S3 first and - then copied into the targeted sink from the interim S3. - :type redshift_unload_settings: - ~azure.mgmt.datafactory.models.RedshiftUnloadSettings - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - 'redshift_unload_settings': {'key': 'redshiftUnloadSettings', 'type': 'RedshiftUnloadSettings'}, - } - - def __init__(self, **kwargs): - super(AmazonRedshiftSource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.redshift_unload_settings = kwargs.get('redshift_unload_settings', None) - self.type = 'AmazonRedshiftSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_redshift_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_redshift_source_py3.py deleted file mode 100644 index 9542e56e4850..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_redshift_source_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class AmazonRedshiftSource(CopySource): - """A copy activity source for Amazon Redshift Source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: Database query. Type: string (or Expression with resultType - string). - :type query: object - :param redshift_unload_settings: The Amazon S3 settings needed for the - interim Amazon S3 when copying from Amazon Redshift with unload. With - this, data from Amazon Redshift source will be unloaded into S3 first and - then copied into the targeted sink from the interim S3. - :type redshift_unload_settings: - ~azure.mgmt.datafactory.models.RedshiftUnloadSettings - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - 'redshift_unload_settings': {'key': 'redshiftUnloadSettings', 'type': 'RedshiftUnloadSettings'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query=None, redshift_unload_settings=None, **kwargs) -> None: - super(AmazonRedshiftSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.redshift_unload_settings = redshift_unload_settings - self.type = 'AmazonRedshiftSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_s3_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_s3_dataset.py deleted file mode 100644 index d6262a013b0d..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_s3_dataset.py +++ /dev/null @@ -1,97 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class AmazonS3Dataset(Dataset): - """A single Amazon Simple Storage Service (S3) object or a set of S3 objects. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param bucket_name: Required. The name of the Amazon S3 bucket. Type: - string (or Expression with resultType string). - :type bucket_name: object - :param key: The key of the Amazon S3 object. Type: string (or Expression - with resultType string). - :type key: object - :param prefix: The prefix filter for the S3 object name. Type: string (or - Expression with resultType string). - :type prefix: object - :param version: The version for the S3 object. Type: string (or Expression - with resultType string). - :type version: object - :param format: The format of files. - :type format: ~azure.mgmt.datafactory.models.DatasetStorageFormat - :param compression: The data compression method used for the Amazon S3 - object. - :type compression: ~azure.mgmt.datafactory.models.DatasetCompression - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - 'bucket_name': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'bucket_name': {'key': 'typeProperties.bucketName', 'type': 'object'}, - 'key': {'key': 'typeProperties.key', 'type': 'object'}, - 'prefix': {'key': 'typeProperties.prefix', 'type': 'object'}, - 'version': {'key': 'typeProperties.version', 'type': 'object'}, - 'format': {'key': 'typeProperties.format', 'type': 'DatasetStorageFormat'}, - 'compression': {'key': 'typeProperties.compression', 'type': 'DatasetCompression'}, - } - - def __init__(self, **kwargs): - super(AmazonS3Dataset, self).__init__(**kwargs) - self.bucket_name = kwargs.get('bucket_name', None) - self.key = kwargs.get('key', None) - self.prefix = kwargs.get('prefix', None) - self.version = kwargs.get('version', None) - self.format = kwargs.get('format', None) - self.compression = kwargs.get('compression', None) - self.type = 'AmazonS3Object' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_s3_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_s3_dataset_py3.py deleted file mode 100644 index 3936e9646a09..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_s3_dataset_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class AmazonS3Dataset(Dataset): - """A single Amazon Simple Storage Service (S3) object or a set of S3 objects. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param bucket_name: Required. The name of the Amazon S3 bucket. Type: - string (or Expression with resultType string). - :type bucket_name: object - :param key: The key of the Amazon S3 object. Type: string (or Expression - with resultType string). - :type key: object - :param prefix: The prefix filter for the S3 object name. Type: string (or - Expression with resultType string). - :type prefix: object - :param version: The version for the S3 object. Type: string (or Expression - with resultType string). - :type version: object - :param format: The format of files. - :type format: ~azure.mgmt.datafactory.models.DatasetStorageFormat - :param compression: The data compression method used for the Amazon S3 - object. - :type compression: ~azure.mgmt.datafactory.models.DatasetCompression - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - 'bucket_name': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'bucket_name': {'key': 'typeProperties.bucketName', 'type': 'object'}, - 'key': {'key': 'typeProperties.key', 'type': 'object'}, - 'prefix': {'key': 'typeProperties.prefix', 'type': 'object'}, - 'version': {'key': 'typeProperties.version', 'type': 'object'}, - 'format': {'key': 'typeProperties.format', 'type': 'DatasetStorageFormat'}, - 'compression': {'key': 'typeProperties.compression', 'type': 'DatasetCompression'}, - } - - def __init__(self, *, linked_service_name, bucket_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, key=None, prefix=None, version=None, format=None, compression=None, **kwargs) -> None: - super(AmazonS3Dataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.bucket_name = bucket_name - self.key = key - self.prefix = prefix - self.version = version - self.format = format - self.compression = compression - self.type = 'AmazonS3Object' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_s3_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_s3_linked_service.py deleted file mode 100644 index c9ff7261d915..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_s3_linked_service.py +++ /dev/null @@ -1,70 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class AmazonS3LinkedService(LinkedService): - """Linked service for Amazon S3. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param access_key_id: The access key identifier of the Amazon S3 Identity - and Access Management (IAM) user. Type: string (or Expression with - resultType string). - :type access_key_id: object - :param secret_access_key: The secret access key of the Amazon S3 Identity - and Access Management (IAM) user. - :type secret_access_key: ~azure.mgmt.datafactory.models.SecretBase - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'access_key_id': {'key': 'typeProperties.accessKeyId', 'type': 'object'}, - 'secret_access_key': {'key': 'typeProperties.secretAccessKey', 'type': 'SecretBase'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AmazonS3LinkedService, self).__init__(**kwargs) - self.access_key_id = kwargs.get('access_key_id', None) - self.secret_access_key = kwargs.get('secret_access_key', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'AmazonS3' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_s3_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_s3_linked_service_py3.py deleted file mode 100644 index 044e8bc299cf..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_s3_linked_service_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class AmazonS3LinkedService(LinkedService): - """Linked service for Amazon S3. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param access_key_id: The access key identifier of the Amazon S3 Identity - and Access Management (IAM) user. Type: string (or Expression with - resultType string). - :type access_key_id: object - :param secret_access_key: The secret access key of the Amazon S3 Identity - and Access Management (IAM) user. - :type secret_access_key: ~azure.mgmt.datafactory.models.SecretBase - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'access_key_id': {'key': 'typeProperties.accessKeyId', 'type': 'object'}, - 'secret_access_key': {'key': 'typeProperties.secretAccessKey', 'type': 'SecretBase'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, access_key_id=None, secret_access_key=None, encrypted_credential=None, **kwargs) -> None: - super(AmazonS3LinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.access_key_id = access_key_id - self.secret_access_key = secret_access_key - self.encrypted_credential = encrypted_credential - self.type = 'AmazonS3' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/append_variable_activity.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/append_variable_activity.py deleted file mode 100644 index 36a25e959061..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/append_variable_activity.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .control_activity import ControlActivity - - -class AppendVariableActivity(ControlActivity): - """Append value for a Variable of type Array. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param variable_name: Name of the variable whose value needs to be - appended to. - :type variable_name: str - :param value: Value to be appended. Could be a static value or Expression - :type value: object - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'variable_name': {'key': 'typeProperties.variableName', 'type': 'str'}, - 'value': {'key': 'typeProperties.value', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AppendVariableActivity, self).__init__(**kwargs) - self.variable_name = kwargs.get('variable_name', None) - self.value = kwargs.get('value', None) - self.type = 'AppendVariable' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/append_variable_activity_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/append_variable_activity_py3.py deleted file mode 100644 index 4526a6e4a45e..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/append_variable_activity_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .control_activity_py3 import ControlActivity - - -class AppendVariableActivity(ControlActivity): - """Append value for a Variable of type Array. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param variable_name: Name of the variable whose value needs to be - appended to. - :type variable_name: str - :param value: Value to be appended. Could be a static value or Expression - :type value: object - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'variable_name': {'key': 'typeProperties.variableName', 'type': 'str'}, - 'value': {'key': 'typeProperties.value', 'type': 'object'}, - } - - def __init__(self, *, name: str, additional_properties=None, description: str=None, depends_on=None, user_properties=None, variable_name: str=None, value=None, **kwargs) -> None: - super(AppendVariableActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, **kwargs) - self.variable_name = variable_name - self.value = value - self.type = 'AppendVariable' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/avro_format.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/avro_format.py deleted file mode 100644 index f0346a76080c..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/avro_format.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_storage_format import DatasetStorageFormat - - -class AvroFormat(DatasetStorageFormat): - """The data stored in Avro format. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param serializer: Serializer. Type: string (or Expression with resultType - string). - :type serializer: object - :param deserializer: Deserializer. Type: string (or Expression with - resultType string). - :type deserializer: object - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'serializer': {'key': 'serializer', 'type': 'object'}, - 'deserializer': {'key': 'deserializer', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AvroFormat, self).__init__(**kwargs) - self.type = 'AvroFormat' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/avro_format_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/avro_format_py3.py deleted file mode 100644 index 35d459c4b2a6..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/avro_format_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_storage_format_py3 import DatasetStorageFormat - - -class AvroFormat(DatasetStorageFormat): - """The data stored in Avro format. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param serializer: Serializer. Type: string (or Expression with resultType - string). - :type serializer: object - :param deserializer: Deserializer. Type: string (or Expression with - resultType string). - :type deserializer: object - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'serializer': {'key': 'serializer', 'type': 'object'}, - 'deserializer': {'key': 'deserializer', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, serializer=None, deserializer=None, **kwargs) -> None: - super(AvroFormat, self).__init__(additional_properties=additional_properties, serializer=serializer, deserializer=deserializer, **kwargs) - self.type = 'AvroFormat' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_batch_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_batch_linked_service.py deleted file mode 100644 index 2fcf33e8d0c8..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_batch_linked_service.py +++ /dev/null @@ -1,88 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class AzureBatchLinkedService(LinkedService): - """Azure Batch linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param account_name: Required. The Azure Batch account name. Type: string - (or Expression with resultType string). - :type account_name: object - :param access_key: The Azure Batch account access key. - :type access_key: ~azure.mgmt.datafactory.models.SecretBase - :param batch_uri: Required. The Azure Batch URI. Type: string (or - Expression with resultType string). - :type batch_uri: object - :param pool_name: Required. The Azure Batch pool name. Type: string (or - Expression with resultType string). - :type pool_name: object - :param linked_service_name: Required. The Azure Storage linked service - reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'account_name': {'required': True}, - 'batch_uri': {'required': True}, - 'pool_name': {'required': True}, - 'linked_service_name': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'account_name': {'key': 'typeProperties.accountName', 'type': 'object'}, - 'access_key': {'key': 'typeProperties.accessKey', 'type': 'SecretBase'}, - 'batch_uri': {'key': 'typeProperties.batchUri', 'type': 'object'}, - 'pool_name': {'key': 'typeProperties.poolName', 'type': 'object'}, - 'linked_service_name': {'key': 'typeProperties.linkedServiceName', 'type': 'LinkedServiceReference'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AzureBatchLinkedService, self).__init__(**kwargs) - self.account_name = kwargs.get('account_name', None) - self.access_key = kwargs.get('access_key', None) - self.batch_uri = kwargs.get('batch_uri', None) - self.pool_name = kwargs.get('pool_name', None) - self.linked_service_name = kwargs.get('linked_service_name', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'AzureBatch' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_batch_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_batch_linked_service_py3.py deleted file mode 100644 index 63724f76f13f..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_batch_linked_service_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class AzureBatchLinkedService(LinkedService): - """Azure Batch linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param account_name: Required. The Azure Batch account name. Type: string - (or Expression with resultType string). - :type account_name: object - :param access_key: The Azure Batch account access key. - :type access_key: ~azure.mgmt.datafactory.models.SecretBase - :param batch_uri: Required. The Azure Batch URI. Type: string (or - Expression with resultType string). - :type batch_uri: object - :param pool_name: Required. The Azure Batch pool name. Type: string (or - Expression with resultType string). - :type pool_name: object - :param linked_service_name: Required. The Azure Storage linked service - reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'account_name': {'required': True}, - 'batch_uri': {'required': True}, - 'pool_name': {'required': True}, - 'linked_service_name': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'account_name': {'key': 'typeProperties.accountName', 'type': 'object'}, - 'access_key': {'key': 'typeProperties.accessKey', 'type': 'SecretBase'}, - 'batch_uri': {'key': 'typeProperties.batchUri', 'type': 'object'}, - 'pool_name': {'key': 'typeProperties.poolName', 'type': 'object'}, - 'linked_service_name': {'key': 'typeProperties.linkedServiceName', 'type': 'LinkedServiceReference'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, account_name, batch_uri, pool_name, linked_service_name, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, access_key=None, encrypted_credential=None, **kwargs) -> None: - super(AzureBatchLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.account_name = account_name - self.access_key = access_key - self.batch_uri = batch_uri - self.pool_name = pool_name - self.linked_service_name = linked_service_name - self.encrypted_credential = encrypted_credential - self.type = 'AzureBatch' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_blob_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_blob_dataset.py deleted file mode 100644 index c3f4ffc118ba..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_blob_dataset.py +++ /dev/null @@ -1,90 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class AzureBlobDataset(Dataset): - """The Azure Blob storage. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param folder_path: The path of the Azure Blob storage. Type: string (or - Expression with resultType string). - :type folder_path: object - :param table_root_location: The root of blob path. Type: string (or - Expression with resultType string). - :type table_root_location: object - :param file_name: The name of the Azure Blob. Type: string (or Expression - with resultType string). - :type file_name: object - :param format: The format of the Azure Blob storage. - :type format: ~azure.mgmt.datafactory.models.DatasetStorageFormat - :param compression: The data compression method used for the blob storage. - :type compression: ~azure.mgmt.datafactory.models.DatasetCompression - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'folder_path': {'key': 'typeProperties.folderPath', 'type': 'object'}, - 'table_root_location': {'key': 'typeProperties.tableRootLocation', 'type': 'object'}, - 'file_name': {'key': 'typeProperties.fileName', 'type': 'object'}, - 'format': {'key': 'typeProperties.format', 'type': 'DatasetStorageFormat'}, - 'compression': {'key': 'typeProperties.compression', 'type': 'DatasetCompression'}, - } - - def __init__(self, **kwargs): - super(AzureBlobDataset, self).__init__(**kwargs) - self.folder_path = kwargs.get('folder_path', None) - self.table_root_location = kwargs.get('table_root_location', None) - self.file_name = kwargs.get('file_name', None) - self.format = kwargs.get('format', None) - self.compression = kwargs.get('compression', None) - self.type = 'AzureBlob' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_blob_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_blob_dataset_py3.py deleted file mode 100644 index 7567e1fba9fb..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_blob_dataset_py3.py +++ /dev/null @@ -1,90 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class AzureBlobDataset(Dataset): - """The Azure Blob storage. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param folder_path: The path of the Azure Blob storage. Type: string (or - Expression with resultType string). - :type folder_path: object - :param table_root_location: The root of blob path. Type: string (or - Expression with resultType string). - :type table_root_location: object - :param file_name: The name of the Azure Blob. Type: string (or Expression - with resultType string). - :type file_name: object - :param format: The format of the Azure Blob storage. - :type format: ~azure.mgmt.datafactory.models.DatasetStorageFormat - :param compression: The data compression method used for the blob storage. - :type compression: ~azure.mgmt.datafactory.models.DatasetCompression - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'folder_path': {'key': 'typeProperties.folderPath', 'type': 'object'}, - 'table_root_location': {'key': 'typeProperties.tableRootLocation', 'type': 'object'}, - 'file_name': {'key': 'typeProperties.fileName', 'type': 'object'}, - 'format': {'key': 'typeProperties.format', 'type': 'DatasetStorageFormat'}, - 'compression': {'key': 'typeProperties.compression', 'type': 'DatasetCompression'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, folder_path=None, table_root_location=None, file_name=None, format=None, compression=None, **kwargs) -> None: - super(AzureBlobDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.folder_path = folder_path - self.table_root_location = table_root_location - self.file_name = file_name - self.format = format - self.compression = compression - self.type = 'AzureBlob' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_blob_storage_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_blob_storage_linked_service.py deleted file mode 100644 index e4466c4ce9c9..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_blob_storage_linked_service.py +++ /dev/null @@ -1,104 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class AzureBlobStorageLinkedService(LinkedService): - """The azure blob storage linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param connection_string: The connection string. It is mutually exclusive - with sasUri, serviceEndpoint property. Type: string, SecureString or - AzureKeyVaultSecretReference. - :type connection_string: object - :param account_key: The Azure key vault secret reference of accountKey in - connection string. - :type account_key: - ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param sas_uri: SAS URI of the Azure Blob Storage resource. It is mutually - exclusive with connectionString, serviceEndpoint property. Type: string, - SecureString or AzureKeyVaultSecretReference. - :type sas_uri: object - :param sas_token: The Azure key vault secret reference of sasToken in sas - uri. - :type sas_token: - ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param service_endpoint: Blob service endpoint of the Azure Blob Storage - resource. It is mutually exclusive with connectionString, sasUri property. - :type service_endpoint: str - :param service_principal_id: The ID of the service principal used to - authenticate against Azure SQL Data Warehouse. Type: string (or Expression - with resultType string). - :type service_principal_id: object - :param service_principal_key: The key of the service principal used to - authenticate against Azure SQL Data Warehouse. - :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase - :param tenant: The name or ID of the tenant to which the service principal - belongs. Type: string (or Expression with resultType string). - :type tenant: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, - 'account_key': {'key': 'typeProperties.accountKey', 'type': 'AzureKeyVaultSecretReference'}, - 'sas_uri': {'key': 'typeProperties.sasUri', 'type': 'object'}, - 'sas_token': {'key': 'typeProperties.sasToken', 'type': 'AzureKeyVaultSecretReference'}, - 'service_endpoint': {'key': 'typeProperties.serviceEndpoint', 'type': 'str'}, - 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, - 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, - 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AzureBlobStorageLinkedService, self).__init__(**kwargs) - self.connection_string = kwargs.get('connection_string', None) - self.account_key = kwargs.get('account_key', None) - self.sas_uri = kwargs.get('sas_uri', None) - self.sas_token = kwargs.get('sas_token', None) - self.service_endpoint = kwargs.get('service_endpoint', None) - self.service_principal_id = kwargs.get('service_principal_id', None) - self.service_principal_key = kwargs.get('service_principal_key', None) - self.tenant = kwargs.get('tenant', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'AzureBlobStorage' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_blob_storage_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_blob_storage_linked_service_py3.py deleted file mode 100644 index 4587e0c95dad..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_blob_storage_linked_service_py3.py +++ /dev/null @@ -1,104 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class AzureBlobStorageLinkedService(LinkedService): - """The azure blob storage linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param connection_string: The connection string. It is mutually exclusive - with sasUri, serviceEndpoint property. Type: string, SecureString or - AzureKeyVaultSecretReference. - :type connection_string: object - :param account_key: The Azure key vault secret reference of accountKey in - connection string. - :type account_key: - ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param sas_uri: SAS URI of the Azure Blob Storage resource. It is mutually - exclusive with connectionString, serviceEndpoint property. Type: string, - SecureString or AzureKeyVaultSecretReference. - :type sas_uri: object - :param sas_token: The Azure key vault secret reference of sasToken in sas - uri. - :type sas_token: - ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param service_endpoint: Blob service endpoint of the Azure Blob Storage - resource. It is mutually exclusive with connectionString, sasUri property. - :type service_endpoint: str - :param service_principal_id: The ID of the service principal used to - authenticate against Azure SQL Data Warehouse. Type: string (or Expression - with resultType string). - :type service_principal_id: object - :param service_principal_key: The key of the service principal used to - authenticate against Azure SQL Data Warehouse. - :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase - :param tenant: The name or ID of the tenant to which the service principal - belongs. Type: string (or Expression with resultType string). - :type tenant: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, - 'account_key': {'key': 'typeProperties.accountKey', 'type': 'AzureKeyVaultSecretReference'}, - 'sas_uri': {'key': 'typeProperties.sasUri', 'type': 'object'}, - 'sas_token': {'key': 'typeProperties.sasToken', 'type': 'AzureKeyVaultSecretReference'}, - 'service_endpoint': {'key': 'typeProperties.serviceEndpoint', 'type': 'str'}, - 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, - 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, - 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, connection_string=None, account_key=None, sas_uri=None, sas_token=None, service_endpoint: str=None, service_principal_id=None, service_principal_key=None, tenant=None, encrypted_credential: str=None, **kwargs) -> None: - super(AzureBlobStorageLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.connection_string = connection_string - self.account_key = account_key - self.sas_uri = sas_uri - self.sas_token = sas_token - self.service_endpoint = service_endpoint - self.service_principal_id = service_principal_id - self.service_principal_key = service_principal_key - self.tenant = tenant - self.encrypted_credential = encrypted_credential - self.type = 'AzureBlobStorage' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_data_lake_analytics_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_data_lake_analytics_linked_service.py deleted file mode 100644 index 73ec2b6f9de9..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_data_lake_analytics_linked_service.py +++ /dev/null @@ -1,99 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class AzureDataLakeAnalyticsLinkedService(LinkedService): - """Azure Data Lake Analytics linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param account_name: Required. The Azure Data Lake Analytics account name. - Type: string (or Expression with resultType string). - :type account_name: object - :param service_principal_id: The ID of the application used to - authenticate against the Azure Data Lake Analytics account. Type: string - (or Expression with resultType string). - :type service_principal_id: object - :param service_principal_key: The Key of the application used to - authenticate against the Azure Data Lake Analytics account. - :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase - :param tenant: Required. The name or ID of the tenant to which the service - principal belongs. Type: string (or Expression with resultType string). - :type tenant: object - :param subscription_id: Data Lake Analytics account subscription ID (if - different from Data Factory account). Type: string (or Expression with - resultType string). - :type subscription_id: object - :param resource_group_name: Data Lake Analytics account resource group - name (if different from Data Factory account). Type: string (or Expression - with resultType string). - :type resource_group_name: object - :param data_lake_analytics_uri: Azure Data Lake Analytics URI Type: string - (or Expression with resultType string). - :type data_lake_analytics_uri: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'account_name': {'required': True}, - 'tenant': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'account_name': {'key': 'typeProperties.accountName', 'type': 'object'}, - 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, - 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, - 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, - 'subscription_id': {'key': 'typeProperties.subscriptionId', 'type': 'object'}, - 'resource_group_name': {'key': 'typeProperties.resourceGroupName', 'type': 'object'}, - 'data_lake_analytics_uri': {'key': 'typeProperties.dataLakeAnalyticsUri', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AzureDataLakeAnalyticsLinkedService, self).__init__(**kwargs) - self.account_name = kwargs.get('account_name', None) - self.service_principal_id = kwargs.get('service_principal_id', None) - self.service_principal_key = kwargs.get('service_principal_key', None) - self.tenant = kwargs.get('tenant', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group_name = kwargs.get('resource_group_name', None) - self.data_lake_analytics_uri = kwargs.get('data_lake_analytics_uri', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'AzureDataLakeAnalytics' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_data_lake_analytics_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_data_lake_analytics_linked_service_py3.py deleted file mode 100644 index b6c4b993cae7..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_data_lake_analytics_linked_service_py3.py +++ /dev/null @@ -1,99 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class AzureDataLakeAnalyticsLinkedService(LinkedService): - """Azure Data Lake Analytics linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param account_name: Required. The Azure Data Lake Analytics account name. - Type: string (or Expression with resultType string). - :type account_name: object - :param service_principal_id: The ID of the application used to - authenticate against the Azure Data Lake Analytics account. Type: string - (or Expression with resultType string). - :type service_principal_id: object - :param service_principal_key: The Key of the application used to - authenticate against the Azure Data Lake Analytics account. - :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase - :param tenant: Required. The name or ID of the tenant to which the service - principal belongs. Type: string (or Expression with resultType string). - :type tenant: object - :param subscription_id: Data Lake Analytics account subscription ID (if - different from Data Factory account). Type: string (or Expression with - resultType string). - :type subscription_id: object - :param resource_group_name: Data Lake Analytics account resource group - name (if different from Data Factory account). Type: string (or Expression - with resultType string). - :type resource_group_name: object - :param data_lake_analytics_uri: Azure Data Lake Analytics URI Type: string - (or Expression with resultType string). - :type data_lake_analytics_uri: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'account_name': {'required': True}, - 'tenant': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'account_name': {'key': 'typeProperties.accountName', 'type': 'object'}, - 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, - 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, - 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, - 'subscription_id': {'key': 'typeProperties.subscriptionId', 'type': 'object'}, - 'resource_group_name': {'key': 'typeProperties.resourceGroupName', 'type': 'object'}, - 'data_lake_analytics_uri': {'key': 'typeProperties.dataLakeAnalyticsUri', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, account_name, tenant, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, service_principal_id=None, service_principal_key=None, subscription_id=None, resource_group_name=None, data_lake_analytics_uri=None, encrypted_credential=None, **kwargs) -> None: - super(AzureDataLakeAnalyticsLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.account_name = account_name - self.service_principal_id = service_principal_id - self.service_principal_key = service_principal_key - self.tenant = tenant - self.subscription_id = subscription_id - self.resource_group_name = resource_group_name - self.data_lake_analytics_uri = data_lake_analytics_uri - self.encrypted_credential = encrypted_credential - self.type = 'AzureDataLakeAnalytics' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_data_lake_store_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_data_lake_store_dataset.py deleted file mode 100644 index e0299ba2bcad..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_data_lake_store_dataset.py +++ /dev/null @@ -1,87 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class AzureDataLakeStoreDataset(Dataset): - """Azure Data Lake Store dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param folder_path: Required. Path to the folder in the Azure Data Lake - Store. Type: string (or Expression with resultType string). - :type folder_path: object - :param file_name: The name of the file in the Azure Data Lake Store. Type: - string (or Expression with resultType string). - :type file_name: object - :param format: The format of the Data Lake Store. - :type format: ~azure.mgmt.datafactory.models.DatasetStorageFormat - :param compression: The data compression method used for the item(s) in - the Azure Data Lake Store. - :type compression: ~azure.mgmt.datafactory.models.DatasetCompression - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - 'folder_path': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'folder_path': {'key': 'typeProperties.folderPath', 'type': 'object'}, - 'file_name': {'key': 'typeProperties.fileName', 'type': 'object'}, - 'format': {'key': 'typeProperties.format', 'type': 'DatasetStorageFormat'}, - 'compression': {'key': 'typeProperties.compression', 'type': 'DatasetCompression'}, - } - - def __init__(self, **kwargs): - super(AzureDataLakeStoreDataset, self).__init__(**kwargs) - self.folder_path = kwargs.get('folder_path', None) - self.file_name = kwargs.get('file_name', None) - self.format = kwargs.get('format', None) - self.compression = kwargs.get('compression', None) - self.type = 'AzureDataLakeStoreFile' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_data_lake_store_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_data_lake_store_dataset_py3.py deleted file mode 100644 index 62e761dc9695..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_data_lake_store_dataset_py3.py +++ /dev/null @@ -1,87 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class AzureDataLakeStoreDataset(Dataset): - """Azure Data Lake Store dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param folder_path: Required. Path to the folder in the Azure Data Lake - Store. Type: string (or Expression with resultType string). - :type folder_path: object - :param file_name: The name of the file in the Azure Data Lake Store. Type: - string (or Expression with resultType string). - :type file_name: object - :param format: The format of the Data Lake Store. - :type format: ~azure.mgmt.datafactory.models.DatasetStorageFormat - :param compression: The data compression method used for the item(s) in - the Azure Data Lake Store. - :type compression: ~azure.mgmt.datafactory.models.DatasetCompression - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - 'folder_path': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'folder_path': {'key': 'typeProperties.folderPath', 'type': 'object'}, - 'file_name': {'key': 'typeProperties.fileName', 'type': 'object'}, - 'format': {'key': 'typeProperties.format', 'type': 'DatasetStorageFormat'}, - 'compression': {'key': 'typeProperties.compression', 'type': 'DatasetCompression'}, - } - - def __init__(self, *, linked_service_name, folder_path, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, file_name=None, format=None, compression=None, **kwargs) -> None: - super(AzureDataLakeStoreDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.folder_path = folder_path - self.file_name = file_name - self.format = format - self.compression = compression - self.type = 'AzureDataLakeStoreFile' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_data_lake_store_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_data_lake_store_linked_service.py deleted file mode 100644 index 0c39866887ef..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_data_lake_store_linked_service.py +++ /dev/null @@ -1,98 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class AzureDataLakeStoreLinkedService(LinkedService): - """Azure Data Lake Store linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param data_lake_store_uri: Required. Data Lake Store service URI. Type: - string (or Expression with resultType string). - :type data_lake_store_uri: object - :param service_principal_id: The ID of the application used to - authenticate against the Azure Data Lake Store account. Type: string (or - Expression with resultType string). - :type service_principal_id: object - :param service_principal_key: The Key of the application used to - authenticate against the Azure Data Lake Store account. - :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase - :param tenant: The name or ID of the tenant to which the service principal - belongs. Type: string (or Expression with resultType string). - :type tenant: object - :param account_name: Data Lake Store account name. Type: string (or - Expression with resultType string). - :type account_name: object - :param subscription_id: Data Lake Store account subscription ID (if - different from Data Factory account). Type: string (or Expression with - resultType string). - :type subscription_id: object - :param resource_group_name: Data Lake Store account resource group name - (if different from Data Factory account). Type: string (or Expression with - resultType string). - :type resource_group_name: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'data_lake_store_uri': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'data_lake_store_uri': {'key': 'typeProperties.dataLakeStoreUri', 'type': 'object'}, - 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, - 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, - 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, - 'account_name': {'key': 'typeProperties.accountName', 'type': 'object'}, - 'subscription_id': {'key': 'typeProperties.subscriptionId', 'type': 'object'}, - 'resource_group_name': {'key': 'typeProperties.resourceGroupName', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AzureDataLakeStoreLinkedService, self).__init__(**kwargs) - self.data_lake_store_uri = kwargs.get('data_lake_store_uri', None) - self.service_principal_id = kwargs.get('service_principal_id', None) - self.service_principal_key = kwargs.get('service_principal_key', None) - self.tenant = kwargs.get('tenant', None) - self.account_name = kwargs.get('account_name', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group_name = kwargs.get('resource_group_name', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'AzureDataLakeStore' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_data_lake_store_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_data_lake_store_linked_service_py3.py deleted file mode 100644 index 10e3b72e654e..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_data_lake_store_linked_service_py3.py +++ /dev/null @@ -1,98 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class AzureDataLakeStoreLinkedService(LinkedService): - """Azure Data Lake Store linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param data_lake_store_uri: Required. Data Lake Store service URI. Type: - string (or Expression with resultType string). - :type data_lake_store_uri: object - :param service_principal_id: The ID of the application used to - authenticate against the Azure Data Lake Store account. Type: string (or - Expression with resultType string). - :type service_principal_id: object - :param service_principal_key: The Key of the application used to - authenticate against the Azure Data Lake Store account. - :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase - :param tenant: The name or ID of the tenant to which the service principal - belongs. Type: string (or Expression with resultType string). - :type tenant: object - :param account_name: Data Lake Store account name. Type: string (or - Expression with resultType string). - :type account_name: object - :param subscription_id: Data Lake Store account subscription ID (if - different from Data Factory account). Type: string (or Expression with - resultType string). - :type subscription_id: object - :param resource_group_name: Data Lake Store account resource group name - (if different from Data Factory account). Type: string (or Expression with - resultType string). - :type resource_group_name: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'data_lake_store_uri': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'data_lake_store_uri': {'key': 'typeProperties.dataLakeStoreUri', 'type': 'object'}, - 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, - 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, - 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, - 'account_name': {'key': 'typeProperties.accountName', 'type': 'object'}, - 'subscription_id': {'key': 'typeProperties.subscriptionId', 'type': 'object'}, - 'resource_group_name': {'key': 'typeProperties.resourceGroupName', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, data_lake_store_uri, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, service_principal_id=None, service_principal_key=None, tenant=None, account_name=None, subscription_id=None, resource_group_name=None, encrypted_credential=None, **kwargs) -> None: - super(AzureDataLakeStoreLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.data_lake_store_uri = data_lake_store_uri - self.service_principal_id = service_principal_id - self.service_principal_key = service_principal_key - self.tenant = tenant - self.account_name = account_name - self.subscription_id = subscription_id - self.resource_group_name = resource_group_name - self.encrypted_credential = encrypted_credential - self.type = 'AzureDataLakeStore' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_data_lake_store_sink.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_data_lake_store_sink.py deleted file mode 100644 index ceaabf438097..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_data_lake_store_sink.py +++ /dev/null @@ -1,62 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_sink import CopySink - - -class AzureDataLakeStoreSink(CopySink): - """A copy activity Azure Data Lake Store sink. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param write_batch_size: Write batch size. Type: integer (or Expression - with resultType integer), minimum: 0. - :type write_batch_size: object - :param write_batch_timeout: Write batch timeout. Type: string (or - Expression with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type write_batch_timeout: object - :param sink_retry_count: Sink retry count. Type: integer (or Expression - with resultType integer). - :type sink_retry_count: object - :param sink_retry_wait: Sink retry wait. Type: string (or Expression with - resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type sink_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param copy_behavior: The type of copy behavior for copy sink. Possible - values include: 'PreserveHierarchy', 'FlattenHierarchy', 'MergeFiles' - :type copy_behavior: str or - ~azure.mgmt.datafactory.models.CopyBehaviorType - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, - 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, - 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, - 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'copy_behavior': {'key': 'copyBehavior', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AzureDataLakeStoreSink, self).__init__(**kwargs) - self.copy_behavior = kwargs.get('copy_behavior', None) - self.type = 'AzureDataLakeStoreSink' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_data_lake_store_sink_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_data_lake_store_sink_py3.py deleted file mode 100644 index 449c7b0a2a3e..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_data_lake_store_sink_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_sink_py3 import CopySink - - -class AzureDataLakeStoreSink(CopySink): - """A copy activity Azure Data Lake Store sink. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param write_batch_size: Write batch size. Type: integer (or Expression - with resultType integer), minimum: 0. - :type write_batch_size: object - :param write_batch_timeout: Write batch timeout. Type: string (or - Expression with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type write_batch_timeout: object - :param sink_retry_count: Sink retry count. Type: integer (or Expression - with resultType integer). - :type sink_retry_count: object - :param sink_retry_wait: Sink retry wait. Type: string (or Expression with - resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type sink_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param copy_behavior: The type of copy behavior for copy sink. Possible - values include: 'PreserveHierarchy', 'FlattenHierarchy', 'MergeFiles' - :type copy_behavior: str or - ~azure.mgmt.datafactory.models.CopyBehaviorType - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, - 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, - 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, - 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'copy_behavior': {'key': 'copyBehavior', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, copy_behavior=None, **kwargs) -> None: - super(AzureDataLakeStoreSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, **kwargs) - self.copy_behavior = copy_behavior - self.type = 'AzureDataLakeStoreSink' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_data_lake_store_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_data_lake_store_source.py deleted file mode 100644 index 60a6599c8fbb..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_data_lake_store_source.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class AzureDataLakeStoreSource(CopySource): - """A copy activity Azure Data Lake source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param recursive: If true, files under the folder path will be read - recursively. Default is true. Type: boolean (or Expression with resultType - boolean). - :type recursive: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'recursive': {'key': 'recursive', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AzureDataLakeStoreSource, self).__init__(**kwargs) - self.recursive = kwargs.get('recursive', None) - self.type = 'AzureDataLakeStoreSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_data_lake_store_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_data_lake_store_source_py3.py deleted file mode 100644 index d228d787bff4..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_data_lake_store_source_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class AzureDataLakeStoreSource(CopySource): - """A copy activity Azure Data Lake source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param recursive: If true, files under the folder path will be read - recursively. Default is true. Type: boolean (or Expression with resultType - boolean). - :type recursive: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'recursive': {'key': 'recursive', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, recursive=None, **kwargs) -> None: - super(AzureDataLakeStoreSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.recursive = recursive - self.type = 'AzureDataLakeStoreSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_databricks_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_databricks_linked_service.py deleted file mode 100644 index c036b299fff0..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_databricks_linked_service.py +++ /dev/null @@ -1,110 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class AzureDatabricksLinkedService(LinkedService): - """Azure Databricks linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param domain: Required. .azuredatabricks.net, domain name of your - Databricks deployment. Type: string (or Expression with resultType - string). - :type domain: object - :param access_token: Required. Access token for databricks REST API. Refer - to https://docs.azuredatabricks.net/api/latest/authentication.html. Type: - string (or Expression with resultType string). - :type access_token: ~azure.mgmt.datafactory.models.SecretBase - :param existing_cluster_id: The id of an existing cluster that will be - used for all runs of this job. Type: string (or Expression with resultType - string). - :type existing_cluster_id: object - :param new_cluster_version: The Spark version of new cluster. Type: string - (or Expression with resultType string). - :type new_cluster_version: object - :param new_cluster_num_of_worker: Number of worker nodes that new cluster - should have. A string formatted Int32, like '1' means numOfWorker is 1 or - '1:10' means auto-scale from 1 as min and 10 as max. Type: string (or - Expression with resultType string). - :type new_cluster_num_of_worker: object - :param new_cluster_node_type: The node types of new cluster. Type: string - (or Expression with resultType string). - :type new_cluster_node_type: object - :param new_cluster_spark_conf: A set of optional, user-specified Spark - configuration key-value pairs. - :type new_cluster_spark_conf: dict[str, object] - :param new_cluster_spark_env_vars: A set of optional, user-specified Spark - environment variables key-value pairs. - :type new_cluster_spark_env_vars: dict[str, object] - :param new_cluster_custom_tags: Additional tags for cluster resources. - :type new_cluster_custom_tags: dict[str, object] - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'domain': {'required': True}, - 'access_token': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'domain': {'key': 'typeProperties.domain', 'type': 'object'}, - 'access_token': {'key': 'typeProperties.accessToken', 'type': 'SecretBase'}, - 'existing_cluster_id': {'key': 'typeProperties.existingClusterId', 'type': 'object'}, - 'new_cluster_version': {'key': 'typeProperties.newClusterVersion', 'type': 'object'}, - 'new_cluster_num_of_worker': {'key': 'typeProperties.newClusterNumOfWorker', 'type': 'object'}, - 'new_cluster_node_type': {'key': 'typeProperties.newClusterNodeType', 'type': 'object'}, - 'new_cluster_spark_conf': {'key': 'typeProperties.newClusterSparkConf', 'type': '{object}'}, - 'new_cluster_spark_env_vars': {'key': 'typeProperties.newClusterSparkEnvVars', 'type': '{object}'}, - 'new_cluster_custom_tags': {'key': 'typeProperties.newClusterCustomTags', 'type': '{object}'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AzureDatabricksLinkedService, self).__init__(**kwargs) - self.domain = kwargs.get('domain', None) - self.access_token = kwargs.get('access_token', None) - self.existing_cluster_id = kwargs.get('existing_cluster_id', None) - self.new_cluster_version = kwargs.get('new_cluster_version', None) - self.new_cluster_num_of_worker = kwargs.get('new_cluster_num_of_worker', None) - self.new_cluster_node_type = kwargs.get('new_cluster_node_type', None) - self.new_cluster_spark_conf = kwargs.get('new_cluster_spark_conf', None) - self.new_cluster_spark_env_vars = kwargs.get('new_cluster_spark_env_vars', None) - self.new_cluster_custom_tags = kwargs.get('new_cluster_custom_tags', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'AzureDatabricks' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_databricks_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_databricks_linked_service_py3.py deleted file mode 100644 index 8060311a4e0d..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_databricks_linked_service_py3.py +++ /dev/null @@ -1,110 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class AzureDatabricksLinkedService(LinkedService): - """Azure Databricks linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param domain: Required. .azuredatabricks.net, domain name of your - Databricks deployment. Type: string (or Expression with resultType - string). - :type domain: object - :param access_token: Required. Access token for databricks REST API. Refer - to https://docs.azuredatabricks.net/api/latest/authentication.html. Type: - string (or Expression with resultType string). - :type access_token: ~azure.mgmt.datafactory.models.SecretBase - :param existing_cluster_id: The id of an existing cluster that will be - used for all runs of this job. Type: string (or Expression with resultType - string). - :type existing_cluster_id: object - :param new_cluster_version: The Spark version of new cluster. Type: string - (or Expression with resultType string). - :type new_cluster_version: object - :param new_cluster_num_of_worker: Number of worker nodes that new cluster - should have. A string formatted Int32, like '1' means numOfWorker is 1 or - '1:10' means auto-scale from 1 as min and 10 as max. Type: string (or - Expression with resultType string). - :type new_cluster_num_of_worker: object - :param new_cluster_node_type: The node types of new cluster. Type: string - (or Expression with resultType string). - :type new_cluster_node_type: object - :param new_cluster_spark_conf: A set of optional, user-specified Spark - configuration key-value pairs. - :type new_cluster_spark_conf: dict[str, object] - :param new_cluster_spark_env_vars: A set of optional, user-specified Spark - environment variables key-value pairs. - :type new_cluster_spark_env_vars: dict[str, object] - :param new_cluster_custom_tags: Additional tags for cluster resources. - :type new_cluster_custom_tags: dict[str, object] - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'domain': {'required': True}, - 'access_token': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'domain': {'key': 'typeProperties.domain', 'type': 'object'}, - 'access_token': {'key': 'typeProperties.accessToken', 'type': 'SecretBase'}, - 'existing_cluster_id': {'key': 'typeProperties.existingClusterId', 'type': 'object'}, - 'new_cluster_version': {'key': 'typeProperties.newClusterVersion', 'type': 'object'}, - 'new_cluster_num_of_worker': {'key': 'typeProperties.newClusterNumOfWorker', 'type': 'object'}, - 'new_cluster_node_type': {'key': 'typeProperties.newClusterNodeType', 'type': 'object'}, - 'new_cluster_spark_conf': {'key': 'typeProperties.newClusterSparkConf', 'type': '{object}'}, - 'new_cluster_spark_env_vars': {'key': 'typeProperties.newClusterSparkEnvVars', 'type': '{object}'}, - 'new_cluster_custom_tags': {'key': 'typeProperties.newClusterCustomTags', 'type': '{object}'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, domain, access_token, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, existing_cluster_id=None, new_cluster_version=None, new_cluster_num_of_worker=None, new_cluster_node_type=None, new_cluster_spark_conf=None, new_cluster_spark_env_vars=None, new_cluster_custom_tags=None, encrypted_credential=None, **kwargs) -> None: - super(AzureDatabricksLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.domain = domain - self.access_token = access_token - self.existing_cluster_id = existing_cluster_id - self.new_cluster_version = new_cluster_version - self.new_cluster_num_of_worker = new_cluster_num_of_worker - self.new_cluster_node_type = new_cluster_node_type - self.new_cluster_spark_conf = new_cluster_spark_conf - self.new_cluster_spark_env_vars = new_cluster_spark_env_vars - self.new_cluster_custom_tags = new_cluster_custom_tags - self.encrypted_credential = encrypted_credential - self.type = 'AzureDatabricks' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_function_activity.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_function_activity.py deleted file mode 100644 index 68b02e5f771f..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_function_activity.py +++ /dev/null @@ -1,85 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity import ExecutionActivity - - -class AzureFunctionActivity(ExecutionActivity): - """Azure Function activity. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param method: Required. Rest API method for target endpoint. Possible - values include: 'GET', 'POST', 'PUT', 'DELETE', 'OPTIONS', 'HEAD', 'TRACE' - :type method: str or - ~azure.mgmt.datafactory.models.AzureFunctionActivityMethod - :param function_name: Required. Name of the Function that the Azure - Function Activity will call. Type: string (or Expression with resultType - string) - :type function_name: object - :param headers: Represents the headers that will be sent to the request. - For example, to set the language and type on a request: "headers" : { - "Accept-Language": "en-us", "Content-Type": "application/json" }. Type: - string (or Expression with resultType string). - :type headers: object - :param body: Represents the payload that will be sent to the endpoint. - Required for POST/PUT method, not allowed for GET method Type: string (or - Expression with resultType string). - :type body: object - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'method': {'required': True}, - 'function_name': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'method': {'key': 'typeProperties.method', 'type': 'str'}, - 'function_name': {'key': 'typeProperties.functionName', 'type': 'object'}, - 'headers': {'key': 'typeProperties.headers', 'type': 'object'}, - 'body': {'key': 'typeProperties.body', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AzureFunctionActivity, self).__init__(**kwargs) - self.method = kwargs.get('method', None) - self.function_name = kwargs.get('function_name', None) - self.headers = kwargs.get('headers', None) - self.body = kwargs.get('body', None) - self.type = 'AzureFunctionActivity' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_function_activity_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_function_activity_py3.py deleted file mode 100644 index 95bb1ca260e7..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_function_activity_py3.py +++ /dev/null @@ -1,85 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity_py3 import ExecutionActivity - - -class AzureFunctionActivity(ExecutionActivity): - """Azure Function activity. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param method: Required. Rest API method for target endpoint. Possible - values include: 'GET', 'POST', 'PUT', 'DELETE', 'OPTIONS', 'HEAD', 'TRACE' - :type method: str or - ~azure.mgmt.datafactory.models.AzureFunctionActivityMethod - :param function_name: Required. Name of the Function that the Azure - Function Activity will call. Type: string (or Expression with resultType - string) - :type function_name: object - :param headers: Represents the headers that will be sent to the request. - For example, to set the language and type on a request: "headers" : { - "Accept-Language": "en-us", "Content-Type": "application/json" }. Type: - string (or Expression with resultType string). - :type headers: object - :param body: Represents the payload that will be sent to the endpoint. - Required for POST/PUT method, not allowed for GET method Type: string (or - Expression with resultType string). - :type body: object - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'method': {'required': True}, - 'function_name': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'method': {'key': 'typeProperties.method', 'type': 'str'}, - 'function_name': {'key': 'typeProperties.functionName', 'type': 'object'}, - 'headers': {'key': 'typeProperties.headers', 'type': 'object'}, - 'body': {'key': 'typeProperties.body', 'type': 'object'}, - } - - def __init__(self, *, name: str, method, function_name, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, headers=None, body=None, **kwargs) -> None: - super(AzureFunctionActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) - self.method = method - self.function_name = function_name - self.headers = headers - self.body = body - self.type = 'AzureFunctionActivity' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_function_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_function_linked_service.py deleted file mode 100644 index 44917d8d23b9..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_function_linked_service.py +++ /dev/null @@ -1,69 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class AzureFunctionLinkedService(LinkedService): - """Azure Function linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param function_app_url: Required. The endpoint of the Azure Function App. - URL will be in the format https://.azurewebsites.net. - :type function_app_url: object - :param function_key: Function or Host key for Azure Function App. - :type function_key: ~azure.mgmt.datafactory.models.SecretBase - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'function_app_url': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'function_app_url': {'key': 'typeProperties.functionAppUrl', 'type': 'object'}, - 'function_key': {'key': 'typeProperties.functionKey', 'type': 'SecretBase'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AzureFunctionLinkedService, self).__init__(**kwargs) - self.function_app_url = kwargs.get('function_app_url', None) - self.function_key = kwargs.get('function_key', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'AzureFunction' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_function_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_function_linked_service_py3.py deleted file mode 100644 index b6b0f9600da1..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_function_linked_service_py3.py +++ /dev/null @@ -1,69 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class AzureFunctionLinkedService(LinkedService): - """Azure Function linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param function_app_url: Required. The endpoint of the Azure Function App. - URL will be in the format https://.azurewebsites.net. - :type function_app_url: object - :param function_key: Function or Host key for Azure Function App. - :type function_key: ~azure.mgmt.datafactory.models.SecretBase - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'function_app_url': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'function_app_url': {'key': 'typeProperties.functionAppUrl', 'type': 'object'}, - 'function_key': {'key': 'typeProperties.functionKey', 'type': 'SecretBase'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, function_app_url, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, function_key=None, encrypted_credential=None, **kwargs) -> None: - super(AzureFunctionLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.function_app_url = function_app_url - self.function_key = function_key - self.encrypted_credential = encrypted_credential - self.type = 'AzureFunction' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_key_vault_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_key_vault_linked_service.py deleted file mode 100644 index c7ad622591ee..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_key_vault_linked_service.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class AzureKeyVaultLinkedService(LinkedService): - """Azure Key Vault linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param base_url: Required. The base URL of the Azure Key Vault. e.g. - https://myakv.vault.azure.net Type: string (or Expression with resultType - string). - :type base_url: object - """ - - _validation = { - 'type': {'required': True}, - 'base_url': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'base_url': {'key': 'typeProperties.baseUrl', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AzureKeyVaultLinkedService, self).__init__(**kwargs) - self.base_url = kwargs.get('base_url', None) - self.type = 'AzureKeyVault' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_key_vault_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_key_vault_linked_service_py3.py deleted file mode 100644 index e13cf7fb527a..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_key_vault_linked_service_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class AzureKeyVaultLinkedService(LinkedService): - """Azure Key Vault linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param base_url: Required. The base URL of the Azure Key Vault. e.g. - https://myakv.vault.azure.net Type: string (or Expression with resultType - string). - :type base_url: object - """ - - _validation = { - 'type': {'required': True}, - 'base_url': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'base_url': {'key': 'typeProperties.baseUrl', 'type': 'object'}, - } - - def __init__(self, *, base_url, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, **kwargs) -> None: - super(AzureKeyVaultLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.base_url = base_url - self.type = 'AzureKeyVault' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_key_vault_secret_reference.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_key_vault_secret_reference.py deleted file mode 100644 index 28d3e7d31cee..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_key_vault_secret_reference.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .secret_base import SecretBase - - -class AzureKeyVaultSecretReference(SecretBase): - """Azure Key Vault secret reference. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param store: Required. The Azure Key Vault linked service reference. - :type store: ~azure.mgmt.datafactory.models.LinkedServiceReference - :param secret_name: Required. The name of the secret in Azure Key Vault. - Type: string (or Expression with resultType string). - :type secret_name: object - :param secret_version: The version of the secret in Azure Key Vault. The - default value is the latest version of the secret. Type: string (or - Expression with resultType string). - :type secret_version: object - """ - - _validation = { - 'type': {'required': True}, - 'store': {'required': True}, - 'secret_name': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'store': {'key': 'store', 'type': 'LinkedServiceReference'}, - 'secret_name': {'key': 'secretName', 'type': 'object'}, - 'secret_version': {'key': 'secretVersion', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AzureKeyVaultSecretReference, self).__init__(**kwargs) - self.store = kwargs.get('store', None) - self.secret_name = kwargs.get('secret_name', None) - self.secret_version = kwargs.get('secret_version', None) - self.type = 'AzureKeyVaultSecret' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_key_vault_secret_reference_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_key_vault_secret_reference_py3.py deleted file mode 100644 index c5fe4c7afbd4..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_key_vault_secret_reference_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .secret_base_py3 import SecretBase - - -class AzureKeyVaultSecretReference(SecretBase): - """Azure Key Vault secret reference. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param store: Required. The Azure Key Vault linked service reference. - :type store: ~azure.mgmt.datafactory.models.LinkedServiceReference - :param secret_name: Required. The name of the secret in Azure Key Vault. - Type: string (or Expression with resultType string). - :type secret_name: object - :param secret_version: The version of the secret in Azure Key Vault. The - default value is the latest version of the secret. Type: string (or - Expression with resultType string). - :type secret_version: object - """ - - _validation = { - 'type': {'required': True}, - 'store': {'required': True}, - 'secret_name': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'store': {'key': 'store', 'type': 'LinkedServiceReference'}, - 'secret_name': {'key': 'secretName', 'type': 'object'}, - 'secret_version': {'key': 'secretVersion', 'type': 'object'}, - } - - def __init__(self, *, store, secret_name, secret_version=None, **kwargs) -> None: - super(AzureKeyVaultSecretReference, self).__init__(**kwargs) - self.store = store - self.secret_name = secret_name - self.secret_version = secret_version - self.type = 'AzureKeyVaultSecret' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_ml_batch_execution_activity.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_ml_batch_execution_activity.py deleted file mode 100644 index f6c7c75a1299..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_ml_batch_execution_activity.py +++ /dev/null @@ -1,82 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity import ExecutionActivity - - -class AzureMLBatchExecutionActivity(ExecutionActivity): - """Azure ML Batch Execution activity. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param global_parameters: Key,Value pairs to be passed to the Azure ML - Batch Execution Service endpoint. Keys must match the names of web service - parameters defined in the published Azure ML web service. Values will be - passed in the GlobalParameters property of the Azure ML batch execution - request. - :type global_parameters: dict[str, object] - :param web_service_outputs: Key,Value pairs, mapping the names of Azure ML - endpoint's Web Service Outputs to AzureMLWebServiceFile objects specifying - the output Blob locations. This information will be passed in the - WebServiceOutputs property of the Azure ML batch execution request. - :type web_service_outputs: dict[str, - ~azure.mgmt.datafactory.models.AzureMLWebServiceFile] - :param web_service_inputs: Key,Value pairs, mapping the names of Azure ML - endpoint's Web Service Inputs to AzureMLWebServiceFile objects specifying - the input Blob locations.. This information will be passed in the - WebServiceInputs property of the Azure ML batch execution request. - :type web_service_inputs: dict[str, - ~azure.mgmt.datafactory.models.AzureMLWebServiceFile] - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'global_parameters': {'key': 'typeProperties.globalParameters', 'type': '{object}'}, - 'web_service_outputs': {'key': 'typeProperties.webServiceOutputs', 'type': '{AzureMLWebServiceFile}'}, - 'web_service_inputs': {'key': 'typeProperties.webServiceInputs', 'type': '{AzureMLWebServiceFile}'}, - } - - def __init__(self, **kwargs): - super(AzureMLBatchExecutionActivity, self).__init__(**kwargs) - self.global_parameters = kwargs.get('global_parameters', None) - self.web_service_outputs = kwargs.get('web_service_outputs', None) - self.web_service_inputs = kwargs.get('web_service_inputs', None) - self.type = 'AzureMLBatchExecution' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_ml_batch_execution_activity_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_ml_batch_execution_activity_py3.py deleted file mode 100644 index e273c0b38128..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_ml_batch_execution_activity_py3.py +++ /dev/null @@ -1,82 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity_py3 import ExecutionActivity - - -class AzureMLBatchExecutionActivity(ExecutionActivity): - """Azure ML Batch Execution activity. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param global_parameters: Key,Value pairs to be passed to the Azure ML - Batch Execution Service endpoint. Keys must match the names of web service - parameters defined in the published Azure ML web service. Values will be - passed in the GlobalParameters property of the Azure ML batch execution - request. - :type global_parameters: dict[str, object] - :param web_service_outputs: Key,Value pairs, mapping the names of Azure ML - endpoint's Web Service Outputs to AzureMLWebServiceFile objects specifying - the output Blob locations. This information will be passed in the - WebServiceOutputs property of the Azure ML batch execution request. - :type web_service_outputs: dict[str, - ~azure.mgmt.datafactory.models.AzureMLWebServiceFile] - :param web_service_inputs: Key,Value pairs, mapping the names of Azure ML - endpoint's Web Service Inputs to AzureMLWebServiceFile objects specifying - the input Blob locations.. This information will be passed in the - WebServiceInputs property of the Azure ML batch execution request. - :type web_service_inputs: dict[str, - ~azure.mgmt.datafactory.models.AzureMLWebServiceFile] - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'global_parameters': {'key': 'typeProperties.globalParameters', 'type': '{object}'}, - 'web_service_outputs': {'key': 'typeProperties.webServiceOutputs', 'type': '{AzureMLWebServiceFile}'}, - 'web_service_inputs': {'key': 'typeProperties.webServiceInputs', 'type': '{AzureMLWebServiceFile}'}, - } - - def __init__(self, *, name: str, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, global_parameters=None, web_service_outputs=None, web_service_inputs=None, **kwargs) -> None: - super(AzureMLBatchExecutionActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) - self.global_parameters = global_parameters - self.web_service_outputs = web_service_outputs - self.web_service_inputs = web_service_inputs - self.type = 'AzureMLBatchExecution' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_ml_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_ml_linked_service.py deleted file mode 100644 index a6a19be4069b..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_ml_linked_service.py +++ /dev/null @@ -1,94 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class AzureMLLinkedService(LinkedService): - """Azure ML Web Service linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param ml_endpoint: Required. The Batch Execution REST URL for an Azure ML - Web Service endpoint. Type: string (or Expression with resultType string). - :type ml_endpoint: object - :param api_key: Required. The API key for accessing the Azure ML model - endpoint. - :type api_key: ~azure.mgmt.datafactory.models.SecretBase - :param update_resource_endpoint: The Update Resource REST URL for an Azure - ML Web Service endpoint. Type: string (or Expression with resultType - string). - :type update_resource_endpoint: object - :param service_principal_id: The ID of the service principal used to - authenticate against the ARM-based updateResourceEndpoint of an Azure ML - web service. Type: string (or Expression with resultType string). - :type service_principal_id: object - :param service_principal_key: The key of the service principal used to - authenticate against the ARM-based updateResourceEndpoint of an Azure ML - web service. - :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase - :param tenant: The name or ID of the tenant to which the service principal - belongs. Type: string (or Expression with resultType string). - :type tenant: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'ml_endpoint': {'required': True}, - 'api_key': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'ml_endpoint': {'key': 'typeProperties.mlEndpoint', 'type': 'object'}, - 'api_key': {'key': 'typeProperties.apiKey', 'type': 'SecretBase'}, - 'update_resource_endpoint': {'key': 'typeProperties.updateResourceEndpoint', 'type': 'object'}, - 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, - 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, - 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AzureMLLinkedService, self).__init__(**kwargs) - self.ml_endpoint = kwargs.get('ml_endpoint', None) - self.api_key = kwargs.get('api_key', None) - self.update_resource_endpoint = kwargs.get('update_resource_endpoint', None) - self.service_principal_id = kwargs.get('service_principal_id', None) - self.service_principal_key = kwargs.get('service_principal_key', None) - self.tenant = kwargs.get('tenant', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'AzureML' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_ml_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_ml_linked_service_py3.py deleted file mode 100644 index 0fff3cea9b8a..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_ml_linked_service_py3.py +++ /dev/null @@ -1,94 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class AzureMLLinkedService(LinkedService): - """Azure ML Web Service linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param ml_endpoint: Required. The Batch Execution REST URL for an Azure ML - Web Service endpoint. Type: string (or Expression with resultType string). - :type ml_endpoint: object - :param api_key: Required. The API key for accessing the Azure ML model - endpoint. - :type api_key: ~azure.mgmt.datafactory.models.SecretBase - :param update_resource_endpoint: The Update Resource REST URL for an Azure - ML Web Service endpoint. Type: string (or Expression with resultType - string). - :type update_resource_endpoint: object - :param service_principal_id: The ID of the service principal used to - authenticate against the ARM-based updateResourceEndpoint of an Azure ML - web service. Type: string (or Expression with resultType string). - :type service_principal_id: object - :param service_principal_key: The key of the service principal used to - authenticate against the ARM-based updateResourceEndpoint of an Azure ML - web service. - :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase - :param tenant: The name or ID of the tenant to which the service principal - belongs. Type: string (or Expression with resultType string). - :type tenant: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'ml_endpoint': {'required': True}, - 'api_key': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'ml_endpoint': {'key': 'typeProperties.mlEndpoint', 'type': 'object'}, - 'api_key': {'key': 'typeProperties.apiKey', 'type': 'SecretBase'}, - 'update_resource_endpoint': {'key': 'typeProperties.updateResourceEndpoint', 'type': 'object'}, - 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, - 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, - 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, ml_endpoint, api_key, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, update_resource_endpoint=None, service_principal_id=None, service_principal_key=None, tenant=None, encrypted_credential=None, **kwargs) -> None: - super(AzureMLLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.ml_endpoint = ml_endpoint - self.api_key = api_key - self.update_resource_endpoint = update_resource_endpoint - self.service_principal_id = service_principal_id - self.service_principal_key = service_principal_key - self.tenant = tenant - self.encrypted_credential = encrypted_credential - self.type = 'AzureML' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_ml_update_resource_activity.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_ml_update_resource_activity.py deleted file mode 100644 index c47a2d81648e..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_ml_update_resource_activity.py +++ /dev/null @@ -1,81 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity import ExecutionActivity - - -class AzureMLUpdateResourceActivity(ExecutionActivity): - """Azure ML Update Resource management activity. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param trained_model_name: Required. Name of the Trained Model module in - the Web Service experiment to be updated. Type: string (or Expression with - resultType string). - :type trained_model_name: object - :param trained_model_linked_service_name: Required. Name of Azure Storage - linked service holding the .ilearner file that will be uploaded by the - update operation. - :type trained_model_linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param trained_model_file_path: Required. The relative file path in - trainedModelLinkedService to represent the .ilearner file that will be - uploaded by the update operation. Type: string (or Expression with - resultType string). - :type trained_model_file_path: object - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'trained_model_name': {'required': True}, - 'trained_model_linked_service_name': {'required': True}, - 'trained_model_file_path': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'trained_model_name': {'key': 'typeProperties.trainedModelName', 'type': 'object'}, - 'trained_model_linked_service_name': {'key': 'typeProperties.trainedModelLinkedServiceName', 'type': 'LinkedServiceReference'}, - 'trained_model_file_path': {'key': 'typeProperties.trainedModelFilePath', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AzureMLUpdateResourceActivity, self).__init__(**kwargs) - self.trained_model_name = kwargs.get('trained_model_name', None) - self.trained_model_linked_service_name = kwargs.get('trained_model_linked_service_name', None) - self.trained_model_file_path = kwargs.get('trained_model_file_path', None) - self.type = 'AzureMLUpdateResource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_ml_update_resource_activity_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_ml_update_resource_activity_py3.py deleted file mode 100644 index 50a5932f0bf0..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_ml_update_resource_activity_py3.py +++ /dev/null @@ -1,81 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity_py3 import ExecutionActivity - - -class AzureMLUpdateResourceActivity(ExecutionActivity): - """Azure ML Update Resource management activity. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param trained_model_name: Required. Name of the Trained Model module in - the Web Service experiment to be updated. Type: string (or Expression with - resultType string). - :type trained_model_name: object - :param trained_model_linked_service_name: Required. Name of Azure Storage - linked service holding the .ilearner file that will be uploaded by the - update operation. - :type trained_model_linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param trained_model_file_path: Required. The relative file path in - trainedModelLinkedService to represent the .ilearner file that will be - uploaded by the update operation. Type: string (or Expression with - resultType string). - :type trained_model_file_path: object - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'trained_model_name': {'required': True}, - 'trained_model_linked_service_name': {'required': True}, - 'trained_model_file_path': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'trained_model_name': {'key': 'typeProperties.trainedModelName', 'type': 'object'}, - 'trained_model_linked_service_name': {'key': 'typeProperties.trainedModelLinkedServiceName', 'type': 'LinkedServiceReference'}, - 'trained_model_file_path': {'key': 'typeProperties.trainedModelFilePath', 'type': 'object'}, - } - - def __init__(self, *, name: str, trained_model_name, trained_model_linked_service_name, trained_model_file_path, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, **kwargs) -> None: - super(AzureMLUpdateResourceActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) - self.trained_model_name = trained_model_name - self.trained_model_linked_service_name = trained_model_linked_service_name - self.trained_model_file_path = trained_model_file_path - self.type = 'AzureMLUpdateResource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_ml_web_service_file.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_ml_web_service_file.py deleted file mode 100644 index 682b24fed830..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_ml_web_service_file.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AzureMLWebServiceFile(Model): - """Azure ML WebService Input/Output file. - - All required parameters must be populated in order to send to Azure. - - :param file_path: Required. The relative file path, including container - name, in the Azure Blob Storage specified by the LinkedService. Type: - string (or Expression with resultType string). - :type file_path: object - :param linked_service_name: Required. Reference to an Azure Storage - LinkedService, where Azure ML WebService Input/Output file located. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - """ - - _validation = { - 'file_path': {'required': True}, - 'linked_service_name': {'required': True}, - } - - _attribute_map = { - 'file_path': {'key': 'filePath', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - } - - def __init__(self, **kwargs): - super(AzureMLWebServiceFile, self).__init__(**kwargs) - self.file_path = kwargs.get('file_path', None) - self.linked_service_name = kwargs.get('linked_service_name', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_ml_web_service_file_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_ml_web_service_file_py3.py deleted file mode 100644 index abe75d9d9bf2..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_ml_web_service_file_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AzureMLWebServiceFile(Model): - """Azure ML WebService Input/Output file. - - All required parameters must be populated in order to send to Azure. - - :param file_path: Required. The relative file path, including container - name, in the Azure Blob Storage specified by the LinkedService. Type: - string (or Expression with resultType string). - :type file_path: object - :param linked_service_name: Required. Reference to an Azure Storage - LinkedService, where Azure ML WebService Input/Output file located. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - """ - - _validation = { - 'file_path': {'required': True}, - 'linked_service_name': {'required': True}, - } - - _attribute_map = { - 'file_path': {'key': 'filePath', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - } - - def __init__(self, *, file_path, linked_service_name, **kwargs) -> None: - super(AzureMLWebServiceFile, self).__init__(**kwargs) - self.file_path = file_path - self.linked_service_name = linked_service_name diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_my_sql_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_my_sql_linked_service.py deleted file mode 100644 index 64a072f1f38b..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_my_sql_linked_service.py +++ /dev/null @@ -1,71 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class AzureMySqlLinkedService(LinkedService): - """Azure MySQL database linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param connection_string: Required. The connection string. Type: string, - SecureString or AzureKeyVaultSecretReference. - :type connection_string: object - :param password: The Azure key vault secret reference of password in - connection string. - :type password: - ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'connection_string': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'AzureKeyVaultSecretReference'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AzureMySqlLinkedService, self).__init__(**kwargs) - self.connection_string = kwargs.get('connection_string', None) - self.password = kwargs.get('password', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'AzureMySql' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_my_sql_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_my_sql_linked_service_py3.py deleted file mode 100644 index dcf4861da573..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_my_sql_linked_service_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class AzureMySqlLinkedService(LinkedService): - """Azure MySQL database linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param connection_string: Required. The connection string. Type: string, - SecureString or AzureKeyVaultSecretReference. - :type connection_string: object - :param password: The Azure key vault secret reference of password in - connection string. - :type password: - ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'connection_string': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'AzureKeyVaultSecretReference'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, connection_string, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, password=None, encrypted_credential=None, **kwargs) -> None: - super(AzureMySqlLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.connection_string = connection_string - self.password = password - self.encrypted_credential = encrypted_credential - self.type = 'AzureMySql' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_my_sql_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_my_sql_source.py deleted file mode 100644 index 7409be73bd09..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_my_sql_source.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class AzureMySqlSource(CopySource): - """A copy activity Azure MySQL source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: Database query. Type: string (or Expression with resultType - string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AzureMySqlSource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.type = 'AzureMySqlSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_my_sql_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_my_sql_source_py3.py deleted file mode 100644 index 4e1d35981f78..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_my_sql_source_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class AzureMySqlSource(CopySource): - """A copy activity Azure MySQL source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: Database query. Type: string (or Expression with resultType - string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query=None, **kwargs) -> None: - super(AzureMySqlSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.type = 'AzureMySqlSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_my_sql_table_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_my_sql_table_dataset.py deleted file mode 100644 index 8f5d43478089..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_my_sql_table_dataset.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class AzureMySqlTableDataset(Dataset): - """The Azure MySQL database dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The Azure MySQL database table name. Type: string (or - Expression with resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AzureMySqlTableDataset, self).__init__(**kwargs) - self.table_name = kwargs.get('table_name', None) - self.type = 'AzureMySqlTable' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_my_sql_table_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_my_sql_table_dataset_py3.py deleted file mode 100644 index 7bd7eb6f17f8..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_my_sql_table_dataset_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class AzureMySqlTableDataset(Dataset): - """The Azure MySQL database dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The Azure MySQL database table name. Type: string (or - Expression with resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: - super(AzureMySqlTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.table_name = table_name - self.type = 'AzureMySqlTable' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_postgre_sql_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_postgre_sql_linked_service.py deleted file mode 100644 index 89c9b29cdcde..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_postgre_sql_linked_service.py +++ /dev/null @@ -1,70 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class AzurePostgreSqlLinkedService(LinkedService): - """Azure PostgreSQL linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param connection_string: An ODBC connection string. Type: string, - SecureString or AzureKeyVaultSecretReference. - :type connection_string: object - :param password: The Azure key vault secret reference of password in - connection string. - :type password: - ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'AzureKeyVaultSecretReference'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AzurePostgreSqlLinkedService, self).__init__(**kwargs) - self.connection_string = kwargs.get('connection_string', None) - self.password = kwargs.get('password', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'AzurePostgreSql' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_postgre_sql_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_postgre_sql_linked_service_py3.py deleted file mode 100644 index e885498530ed..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_postgre_sql_linked_service_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class AzurePostgreSqlLinkedService(LinkedService): - """Azure PostgreSQL linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param connection_string: An ODBC connection string. Type: string, - SecureString or AzureKeyVaultSecretReference. - :type connection_string: object - :param password: The Azure key vault secret reference of password in - connection string. - :type password: - ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'AzureKeyVaultSecretReference'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, connection_string=None, password=None, encrypted_credential=None, **kwargs) -> None: - super(AzurePostgreSqlLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.connection_string = connection_string - self.password = password - self.encrypted_credential = encrypted_credential - self.type = 'AzurePostgreSql' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_postgre_sql_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_postgre_sql_source.py deleted file mode 100644 index 816e066ecebb..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_postgre_sql_source.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class AzurePostgreSqlSource(CopySource): - """A copy activity Azure PostgreSQL source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AzurePostgreSqlSource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.type = 'AzurePostgreSqlSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_postgre_sql_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_postgre_sql_source_py3.py deleted file mode 100644 index 2af53cf91da2..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_postgre_sql_source_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class AzurePostgreSqlSource(CopySource): - """A copy activity Azure PostgreSQL source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query=None, **kwargs) -> None: - super(AzurePostgreSqlSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.type = 'AzurePostgreSqlSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_postgre_sql_table_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_postgre_sql_table_dataset.py deleted file mode 100644 index 8960acc0df75..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_postgre_sql_table_dataset.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class AzurePostgreSqlTableDataset(Dataset): - """Azure PostgreSQL dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AzurePostgreSqlTableDataset, self).__init__(**kwargs) - self.table_name = kwargs.get('table_name', None) - self.type = 'AzurePostgreSqlTable' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_postgre_sql_table_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_postgre_sql_table_dataset_py3.py deleted file mode 100644 index fddf0720c565..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_postgre_sql_table_dataset_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class AzurePostgreSqlTableDataset(Dataset): - """Azure PostgreSQL dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: - super(AzurePostgreSqlTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.table_name = table_name - self.type = 'AzurePostgreSqlTable' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_queue_sink.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_queue_sink.py deleted file mode 100644 index 5ecb911fb94a..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_queue_sink.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_sink import CopySink - - -class AzureQueueSink(CopySink): - """A copy activity Azure Queue sink. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param write_batch_size: Write batch size. Type: integer (or Expression - with resultType integer), minimum: 0. - :type write_batch_size: object - :param write_batch_timeout: Write batch timeout. Type: string (or - Expression with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type write_batch_timeout: object - :param sink_retry_count: Sink retry count. Type: integer (or Expression - with resultType integer). - :type sink_retry_count: object - :param sink_retry_wait: Sink retry wait. Type: string (or Expression with - resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type sink_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, - 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, - 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, - 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AzureQueueSink, self).__init__(**kwargs) - self.type = 'AzureQueueSink' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_queue_sink_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_queue_sink_py3.py deleted file mode 100644 index debc14c0c7e1..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_queue_sink_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_sink_py3 import CopySink - - -class AzureQueueSink(CopySink): - """A copy activity Azure Queue sink. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param write_batch_size: Write batch size. Type: integer (or Expression - with resultType integer), minimum: 0. - :type write_batch_size: object - :param write_batch_timeout: Write batch timeout. Type: string (or - Expression with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type write_batch_timeout: object - :param sink_retry_count: Sink retry count. Type: integer (or Expression - with resultType integer). - :type sink_retry_count: object - :param sink_retry_wait: Sink retry wait. Type: string (or Expression with - resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type sink_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, - 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, - 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, - 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, **kwargs) -> None: - super(AzureQueueSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, **kwargs) - self.type = 'AzureQueueSink' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_search_index_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_search_index_dataset.py deleted file mode 100644 index 1239bbad78fc..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_search_index_dataset.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class AzureSearchIndexDataset(Dataset): - """The Azure Search Index. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param index_name: Required. The name of the Azure Search Index. Type: - string (or Expression with resultType string). - :type index_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - 'index_name': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'index_name': {'key': 'typeProperties.indexName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AzureSearchIndexDataset, self).__init__(**kwargs) - self.index_name = kwargs.get('index_name', None) - self.type = 'AzureSearchIndex' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_search_index_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_search_index_dataset_py3.py deleted file mode 100644 index da5e92dd2edd..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_search_index_dataset_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class AzureSearchIndexDataset(Dataset): - """The Azure Search Index. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param index_name: Required. The name of the Azure Search Index. Type: - string (or Expression with resultType string). - :type index_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - 'index_name': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'index_name': {'key': 'typeProperties.indexName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, index_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, **kwargs) -> None: - super(AzureSearchIndexDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.index_name = index_name - self.type = 'AzureSearchIndex' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_search_index_sink.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_search_index_sink.py deleted file mode 100644 index c09cd94bfb51..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_search_index_sink.py +++ /dev/null @@ -1,62 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_sink import CopySink - - -class AzureSearchIndexSink(CopySink): - """A copy activity Azure Search Index sink. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param write_batch_size: Write batch size. Type: integer (or Expression - with resultType integer), minimum: 0. - :type write_batch_size: object - :param write_batch_timeout: Write batch timeout. Type: string (or - Expression with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type write_batch_timeout: object - :param sink_retry_count: Sink retry count. Type: integer (or Expression - with resultType integer). - :type sink_retry_count: object - :param sink_retry_wait: Sink retry wait. Type: string (or Expression with - resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type sink_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param write_behavior: Specify the write behavior when upserting documents - into Azure Search Index. Possible values include: 'Merge', 'Upload' - :type write_behavior: str or - ~azure.mgmt.datafactory.models.AzureSearchIndexWriteBehaviorType - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, - 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, - 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, - 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'write_behavior': {'key': 'writeBehavior', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AzureSearchIndexSink, self).__init__(**kwargs) - self.write_behavior = kwargs.get('write_behavior', None) - self.type = 'AzureSearchIndexSink' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_search_index_sink_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_search_index_sink_py3.py deleted file mode 100644 index 9ed48b36a588..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_search_index_sink_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_sink_py3 import CopySink - - -class AzureSearchIndexSink(CopySink): - """A copy activity Azure Search Index sink. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param write_batch_size: Write batch size. Type: integer (or Expression - with resultType integer), minimum: 0. - :type write_batch_size: object - :param write_batch_timeout: Write batch timeout. Type: string (or - Expression with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type write_batch_timeout: object - :param sink_retry_count: Sink retry count. Type: integer (or Expression - with resultType integer). - :type sink_retry_count: object - :param sink_retry_wait: Sink retry wait. Type: string (or Expression with - resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type sink_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param write_behavior: Specify the write behavior when upserting documents - into Azure Search Index. Possible values include: 'Merge', 'Upload' - :type write_behavior: str or - ~azure.mgmt.datafactory.models.AzureSearchIndexWriteBehaviorType - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, - 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, - 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, - 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'write_behavior': {'key': 'writeBehavior', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, write_behavior=None, **kwargs) -> None: - super(AzureSearchIndexSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, **kwargs) - self.write_behavior = write_behavior - self.type = 'AzureSearchIndexSink' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_search_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_search_linked_service.py deleted file mode 100644 index 18979ed87ca0..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_search_linked_service.py +++ /dev/null @@ -1,69 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class AzureSearchLinkedService(LinkedService): - """Linked service for Windows Azure Search Service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param url: Required. URL for Azure Search service. Type: string (or - Expression with resultType string). - :type url: object - :param key: Admin Key for Azure Search service - :type key: ~azure.mgmt.datafactory.models.SecretBase - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'url': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'url': {'key': 'typeProperties.url', 'type': 'object'}, - 'key': {'key': 'typeProperties.key', 'type': 'SecretBase'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AzureSearchLinkedService, self).__init__(**kwargs) - self.url = kwargs.get('url', None) - self.key = kwargs.get('key', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'AzureSearch' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_search_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_search_linked_service_py3.py deleted file mode 100644 index 6cc3cdc98b89..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_search_linked_service_py3.py +++ /dev/null @@ -1,69 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class AzureSearchLinkedService(LinkedService): - """Linked service for Windows Azure Search Service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param url: Required. URL for Azure Search service. Type: string (or - Expression with resultType string). - :type url: object - :param key: Admin Key for Azure Search service - :type key: ~azure.mgmt.datafactory.models.SecretBase - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'url': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'url': {'key': 'typeProperties.url', 'type': 'object'}, - 'key': {'key': 'typeProperties.key', 'type': 'SecretBase'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, url, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, key=None, encrypted_credential=None, **kwargs) -> None: - super(AzureSearchLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.url = url - self.key = key - self.encrypted_credential = encrypted_credential - self.type = 'AzureSearch' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_sql_database_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_sql_database_linked_service.py deleted file mode 100644 index 68ad549ed733..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_sql_database_linked_service.py +++ /dev/null @@ -1,87 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class AzureSqlDatabaseLinkedService(LinkedService): - """Microsoft Azure SQL Database linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param connection_string: Required. The connection string. Type: string, - SecureString or AzureKeyVaultSecretReference. - :type connection_string: object - :param password: The Azure key vault secret reference of password in - connection string. - :type password: - ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param service_principal_id: The ID of the service principal used to - authenticate against Azure SQL Database. Type: string (or Expression with - resultType string). - :type service_principal_id: object - :param service_principal_key: The key of the service principal used to - authenticate against Azure SQL Database. - :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase - :param tenant: The name or ID of the tenant to which the service principal - belongs. Type: string (or Expression with resultType string). - :type tenant: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'connection_string': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'AzureKeyVaultSecretReference'}, - 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, - 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, - 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AzureSqlDatabaseLinkedService, self).__init__(**kwargs) - self.connection_string = kwargs.get('connection_string', None) - self.password = kwargs.get('password', None) - self.service_principal_id = kwargs.get('service_principal_id', None) - self.service_principal_key = kwargs.get('service_principal_key', None) - self.tenant = kwargs.get('tenant', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'AzureSqlDatabase' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_sql_database_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_sql_database_linked_service_py3.py deleted file mode 100644 index afd58ae43354..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_sql_database_linked_service_py3.py +++ /dev/null @@ -1,87 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class AzureSqlDatabaseLinkedService(LinkedService): - """Microsoft Azure SQL Database linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param connection_string: Required. The connection string. Type: string, - SecureString or AzureKeyVaultSecretReference. - :type connection_string: object - :param password: The Azure key vault secret reference of password in - connection string. - :type password: - ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param service_principal_id: The ID of the service principal used to - authenticate against Azure SQL Database. Type: string (or Expression with - resultType string). - :type service_principal_id: object - :param service_principal_key: The key of the service principal used to - authenticate against Azure SQL Database. - :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase - :param tenant: The name or ID of the tenant to which the service principal - belongs. Type: string (or Expression with resultType string). - :type tenant: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'connection_string': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'AzureKeyVaultSecretReference'}, - 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, - 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, - 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, connection_string, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, password=None, service_principal_id=None, service_principal_key=None, tenant=None, encrypted_credential=None, **kwargs) -> None: - super(AzureSqlDatabaseLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.connection_string = connection_string - self.password = password - self.service_principal_id = service_principal_id - self.service_principal_key = service_principal_key - self.tenant = tenant - self.encrypted_credential = encrypted_credential - self.type = 'AzureSqlDatabase' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_sql_dw_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_sql_dw_linked_service.py deleted file mode 100644 index d4aa961cb424..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_sql_dw_linked_service.py +++ /dev/null @@ -1,88 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class AzureSqlDWLinkedService(LinkedService): - """Azure SQL Data Warehouse linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param connection_string: Required. The connection string. Type: string, - SecureString or AzureKeyVaultSecretReference. Type: string, SecureString - or AzureKeyVaultSecretReference. - :type connection_string: object - :param password: The Azure key vault secret reference of password in - connection string. - :type password: - ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param service_principal_id: The ID of the service principal used to - authenticate against Azure SQL Data Warehouse. Type: string (or Expression - with resultType string). - :type service_principal_id: object - :param service_principal_key: The key of the service principal used to - authenticate against Azure SQL Data Warehouse. - :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase - :param tenant: The name or ID of the tenant to which the service principal - belongs. Type: string (or Expression with resultType string). - :type tenant: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'connection_string': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'AzureKeyVaultSecretReference'}, - 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, - 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, - 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AzureSqlDWLinkedService, self).__init__(**kwargs) - self.connection_string = kwargs.get('connection_string', None) - self.password = kwargs.get('password', None) - self.service_principal_id = kwargs.get('service_principal_id', None) - self.service_principal_key = kwargs.get('service_principal_key', None) - self.tenant = kwargs.get('tenant', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'AzureSqlDW' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_sql_dw_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_sql_dw_linked_service_py3.py deleted file mode 100644 index a78551dff273..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_sql_dw_linked_service_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class AzureSqlDWLinkedService(LinkedService): - """Azure SQL Data Warehouse linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param connection_string: Required. The connection string. Type: string, - SecureString or AzureKeyVaultSecretReference. Type: string, SecureString - or AzureKeyVaultSecretReference. - :type connection_string: object - :param password: The Azure key vault secret reference of password in - connection string. - :type password: - ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param service_principal_id: The ID of the service principal used to - authenticate against Azure SQL Data Warehouse. Type: string (or Expression - with resultType string). - :type service_principal_id: object - :param service_principal_key: The key of the service principal used to - authenticate against Azure SQL Data Warehouse. - :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase - :param tenant: The name or ID of the tenant to which the service principal - belongs. Type: string (or Expression with resultType string). - :type tenant: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'connection_string': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'AzureKeyVaultSecretReference'}, - 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, - 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, - 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, connection_string, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, password=None, service_principal_id=None, service_principal_key=None, tenant=None, encrypted_credential=None, **kwargs) -> None: - super(AzureSqlDWLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.connection_string = connection_string - self.password = password - self.service_principal_id = service_principal_id - self.service_principal_key = service_principal_key - self.tenant = tenant - self.encrypted_credential = encrypted_credential - self.type = 'AzureSqlDW' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_sql_dw_table_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_sql_dw_table_dataset.py deleted file mode 100644 index e12464efdd49..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_sql_dw_table_dataset.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class AzureSqlDWTableDataset(Dataset): - """The Azure SQL Data Warehouse dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: Required. The table name of the Azure SQL Data - Warehouse. Type: string (or Expression with resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - 'table_name': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AzureSqlDWTableDataset, self).__init__(**kwargs) - self.table_name = kwargs.get('table_name', None) - self.type = 'AzureSqlDWTable' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_sql_dw_table_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_sql_dw_table_dataset_py3.py deleted file mode 100644 index a06073f86c5b..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_sql_dw_table_dataset_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class AzureSqlDWTableDataset(Dataset): - """The Azure SQL Data Warehouse dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: Required. The table name of the Azure SQL Data - Warehouse. Type: string (or Expression with resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - 'table_name': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, table_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, **kwargs) -> None: - super(AzureSqlDWTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.table_name = table_name - self.type = 'AzureSqlDWTable' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_sql_table_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_sql_table_dataset.py deleted file mode 100644 index 9a078241d620..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_sql_table_dataset.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class AzureSqlTableDataset(Dataset): - """The Azure SQL Server database dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: Required. The table name of the Azure SQL database. - Type: string (or Expression with resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - 'table_name': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AzureSqlTableDataset, self).__init__(**kwargs) - self.table_name = kwargs.get('table_name', None) - self.type = 'AzureSqlTable' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_sql_table_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_sql_table_dataset_py3.py deleted file mode 100644 index b3c388202f52..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_sql_table_dataset_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class AzureSqlTableDataset(Dataset): - """The Azure SQL Server database dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: Required. The table name of the Azure SQL database. - Type: string (or Expression with resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - 'table_name': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, table_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, **kwargs) -> None: - super(AzureSqlTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.table_name = table_name - self.type = 'AzureSqlTable' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_storage_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_storage_linked_service.py deleted file mode 100644 index 711b09a80004..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_storage_linked_service.py +++ /dev/null @@ -1,83 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class AzureStorageLinkedService(LinkedService): - """The storage account linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param connection_string: The connection string. It is mutually exclusive - with sasUri property. Type: string, SecureString or - AzureKeyVaultSecretReference. - :type connection_string: object - :param account_key: The Azure key vault secret reference of accountKey in - connection string. - :type account_key: - ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param sas_uri: SAS URI of the Azure Storage resource. It is mutually - exclusive with connectionString property. Type: string, SecureString or - AzureKeyVaultSecretReference. - :type sas_uri: object - :param sas_token: The Azure key vault secret reference of sasToken in sas - uri. - :type sas_token: - ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, - 'account_key': {'key': 'typeProperties.accountKey', 'type': 'AzureKeyVaultSecretReference'}, - 'sas_uri': {'key': 'typeProperties.sasUri', 'type': 'object'}, - 'sas_token': {'key': 'typeProperties.sasToken', 'type': 'AzureKeyVaultSecretReference'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AzureStorageLinkedService, self).__init__(**kwargs) - self.connection_string = kwargs.get('connection_string', None) - self.account_key = kwargs.get('account_key', None) - self.sas_uri = kwargs.get('sas_uri', None) - self.sas_token = kwargs.get('sas_token', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'AzureStorage' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_storage_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_storage_linked_service_py3.py deleted file mode 100644 index 428fb82e871a..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_storage_linked_service_py3.py +++ /dev/null @@ -1,83 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class AzureStorageLinkedService(LinkedService): - """The storage account linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param connection_string: The connection string. It is mutually exclusive - with sasUri property. Type: string, SecureString or - AzureKeyVaultSecretReference. - :type connection_string: object - :param account_key: The Azure key vault secret reference of accountKey in - connection string. - :type account_key: - ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param sas_uri: SAS URI of the Azure Storage resource. It is mutually - exclusive with connectionString property. Type: string, SecureString or - AzureKeyVaultSecretReference. - :type sas_uri: object - :param sas_token: The Azure key vault secret reference of sasToken in sas - uri. - :type sas_token: - ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, - 'account_key': {'key': 'typeProperties.accountKey', 'type': 'AzureKeyVaultSecretReference'}, - 'sas_uri': {'key': 'typeProperties.sasUri', 'type': 'object'}, - 'sas_token': {'key': 'typeProperties.sasToken', 'type': 'AzureKeyVaultSecretReference'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, connection_string=None, account_key=None, sas_uri=None, sas_token=None, encrypted_credential: str=None, **kwargs) -> None: - super(AzureStorageLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.connection_string = connection_string - self.account_key = account_key - self.sas_uri = sas_uri - self.sas_token = sas_token - self.encrypted_credential = encrypted_credential - self.type = 'AzureStorage' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_table_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_table_dataset.py deleted file mode 100644 index eb8dacbfbb98..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_table_dataset.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class AzureTableDataset(Dataset): - """The Azure Table storage dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: Required. The table name of the Azure Table storage. - Type: string (or Expression with resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - 'table_name': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AzureTableDataset, self).__init__(**kwargs) - self.table_name = kwargs.get('table_name', None) - self.type = 'AzureTable' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_table_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_table_dataset_py3.py deleted file mode 100644 index d70a15fdd6f1..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_table_dataset_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class AzureTableDataset(Dataset): - """The Azure Table storage dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: Required. The table name of the Azure Table storage. - Type: string (or Expression with resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - 'table_name': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, table_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, **kwargs) -> None: - super(AzureTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.table_name = table_name - self.type = 'AzureTable' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_table_sink.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_table_sink.py deleted file mode 100644 index faba497cc734..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_table_sink.py +++ /dev/null @@ -1,76 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_sink import CopySink - - -class AzureTableSink(CopySink): - """A copy activity Azure Table sink. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param write_batch_size: Write batch size. Type: integer (or Expression - with resultType integer), minimum: 0. - :type write_batch_size: object - :param write_batch_timeout: Write batch timeout. Type: string (or - Expression with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type write_batch_timeout: object - :param sink_retry_count: Sink retry count. Type: integer (or Expression - with resultType integer). - :type sink_retry_count: object - :param sink_retry_wait: Sink retry wait. Type: string (or Expression with - resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type sink_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param azure_table_default_partition_key_value: Azure Table default - partition key value. Type: string (or Expression with resultType string). - :type azure_table_default_partition_key_value: object - :param azure_table_partition_key_name: Azure Table partition key name. - Type: string (or Expression with resultType string). - :type azure_table_partition_key_name: object - :param azure_table_row_key_name: Azure Table row key name. Type: string - (or Expression with resultType string). - :type azure_table_row_key_name: object - :param azure_table_insert_type: Azure Table insert type. Type: string (or - Expression with resultType string). - :type azure_table_insert_type: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, - 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, - 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, - 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'azure_table_default_partition_key_value': {'key': 'azureTableDefaultPartitionKeyValue', 'type': 'object'}, - 'azure_table_partition_key_name': {'key': 'azureTablePartitionKeyName', 'type': 'object'}, - 'azure_table_row_key_name': {'key': 'azureTableRowKeyName', 'type': 'object'}, - 'azure_table_insert_type': {'key': 'azureTableInsertType', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AzureTableSink, self).__init__(**kwargs) - self.azure_table_default_partition_key_value = kwargs.get('azure_table_default_partition_key_value', None) - self.azure_table_partition_key_name = kwargs.get('azure_table_partition_key_name', None) - self.azure_table_row_key_name = kwargs.get('azure_table_row_key_name', None) - self.azure_table_insert_type = kwargs.get('azure_table_insert_type', None) - self.type = 'AzureTableSink' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_table_sink_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_table_sink_py3.py deleted file mode 100644 index 630df4f1f606..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_table_sink_py3.py +++ /dev/null @@ -1,76 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_sink_py3 import CopySink - - -class AzureTableSink(CopySink): - """A copy activity Azure Table sink. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param write_batch_size: Write batch size. Type: integer (or Expression - with resultType integer), minimum: 0. - :type write_batch_size: object - :param write_batch_timeout: Write batch timeout. Type: string (or - Expression with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type write_batch_timeout: object - :param sink_retry_count: Sink retry count. Type: integer (or Expression - with resultType integer). - :type sink_retry_count: object - :param sink_retry_wait: Sink retry wait. Type: string (or Expression with - resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type sink_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param azure_table_default_partition_key_value: Azure Table default - partition key value. Type: string (or Expression with resultType string). - :type azure_table_default_partition_key_value: object - :param azure_table_partition_key_name: Azure Table partition key name. - Type: string (or Expression with resultType string). - :type azure_table_partition_key_name: object - :param azure_table_row_key_name: Azure Table row key name. Type: string - (or Expression with resultType string). - :type azure_table_row_key_name: object - :param azure_table_insert_type: Azure Table insert type. Type: string (or - Expression with resultType string). - :type azure_table_insert_type: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, - 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, - 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, - 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'azure_table_default_partition_key_value': {'key': 'azureTableDefaultPartitionKeyValue', 'type': 'object'}, - 'azure_table_partition_key_name': {'key': 'azureTablePartitionKeyName', 'type': 'object'}, - 'azure_table_row_key_name': {'key': 'azureTableRowKeyName', 'type': 'object'}, - 'azure_table_insert_type': {'key': 'azureTableInsertType', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, azure_table_default_partition_key_value=None, azure_table_partition_key_name=None, azure_table_row_key_name=None, azure_table_insert_type=None, **kwargs) -> None: - super(AzureTableSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, **kwargs) - self.azure_table_default_partition_key_value = azure_table_default_partition_key_value - self.azure_table_partition_key_name = azure_table_partition_key_name - self.azure_table_row_key_name = azure_table_row_key_name - self.azure_table_insert_type = azure_table_insert_type - self.type = 'AzureTableSink' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_table_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_table_source.py deleted file mode 100644 index f4046c989f4e..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_table_source.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class AzureTableSource(CopySource): - """A copy activity Azure Table source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param azure_table_source_query: Azure Table source query. Type: string - (or Expression with resultType string). - :type azure_table_source_query: object - :param azure_table_source_ignore_table_not_found: Azure Table source - ignore table not found. Type: boolean (or Expression with resultType - boolean). - :type azure_table_source_ignore_table_not_found: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'azure_table_source_query': {'key': 'azureTableSourceQuery', 'type': 'object'}, - 'azure_table_source_ignore_table_not_found': {'key': 'azureTableSourceIgnoreTableNotFound', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AzureTableSource, self).__init__(**kwargs) - self.azure_table_source_query = kwargs.get('azure_table_source_query', None) - self.azure_table_source_ignore_table_not_found = kwargs.get('azure_table_source_ignore_table_not_found', None) - self.type = 'AzureTableSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_table_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_table_source_py3.py deleted file mode 100644 index 30ca05775f27..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_table_source_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class AzureTableSource(CopySource): - """A copy activity Azure Table source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param azure_table_source_query: Azure Table source query. Type: string - (or Expression with resultType string). - :type azure_table_source_query: object - :param azure_table_source_ignore_table_not_found: Azure Table source - ignore table not found. Type: boolean (or Expression with resultType - boolean). - :type azure_table_source_ignore_table_not_found: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'azure_table_source_query': {'key': 'azureTableSourceQuery', 'type': 'object'}, - 'azure_table_source_ignore_table_not_found': {'key': 'azureTableSourceIgnoreTableNotFound', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, azure_table_source_query=None, azure_table_source_ignore_table_not_found=None, **kwargs) -> None: - super(AzureTableSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.azure_table_source_query = azure_table_source_query - self.azure_table_source_ignore_table_not_found = azure_table_source_ignore_table_not_found - self.type = 'AzureTableSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_table_storage_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_table_storage_linked_service.py deleted file mode 100644 index 152fae6368a6..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_table_storage_linked_service.py +++ /dev/null @@ -1,83 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class AzureTableStorageLinkedService(LinkedService): - """The azure table storage linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param connection_string: The connection string. It is mutually exclusive - with sasUri property. Type: string, SecureString or - AzureKeyVaultSecretReference. - :type connection_string: object - :param account_key: The Azure key vault secret reference of accountKey in - connection string. - :type account_key: - ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param sas_uri: SAS URI of the Azure Storage resource. It is mutually - exclusive with connectionString property. Type: string, SecureString or - AzureKeyVaultSecretReference. - :type sas_uri: object - :param sas_token: The Azure key vault secret reference of sasToken in sas - uri. - :type sas_token: - ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, - 'account_key': {'key': 'typeProperties.accountKey', 'type': 'AzureKeyVaultSecretReference'}, - 'sas_uri': {'key': 'typeProperties.sasUri', 'type': 'object'}, - 'sas_token': {'key': 'typeProperties.sasToken', 'type': 'AzureKeyVaultSecretReference'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AzureTableStorageLinkedService, self).__init__(**kwargs) - self.connection_string = kwargs.get('connection_string', None) - self.account_key = kwargs.get('account_key', None) - self.sas_uri = kwargs.get('sas_uri', None) - self.sas_token = kwargs.get('sas_token', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'AzureTableStorage' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_table_storage_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_table_storage_linked_service_py3.py deleted file mode 100644 index 533ad3509483..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_table_storage_linked_service_py3.py +++ /dev/null @@ -1,83 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class AzureTableStorageLinkedService(LinkedService): - """The azure table storage linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param connection_string: The connection string. It is mutually exclusive - with sasUri property. Type: string, SecureString or - AzureKeyVaultSecretReference. - :type connection_string: object - :param account_key: The Azure key vault secret reference of accountKey in - connection string. - :type account_key: - ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param sas_uri: SAS URI of the Azure Storage resource. It is mutually - exclusive with connectionString property. Type: string, SecureString or - AzureKeyVaultSecretReference. - :type sas_uri: object - :param sas_token: The Azure key vault secret reference of sasToken in sas - uri. - :type sas_token: - ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, - 'account_key': {'key': 'typeProperties.accountKey', 'type': 'AzureKeyVaultSecretReference'}, - 'sas_uri': {'key': 'typeProperties.sasUri', 'type': 'object'}, - 'sas_token': {'key': 'typeProperties.sasToken', 'type': 'AzureKeyVaultSecretReference'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, connection_string=None, account_key=None, sas_uri=None, sas_token=None, encrypted_credential: str=None, **kwargs) -> None: - super(AzureTableStorageLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.connection_string = connection_string - self.account_key = account_key - self.sas_uri = sas_uri - self.sas_token = sas_token - self.encrypted_credential = encrypted_credential - self.type = 'AzureTableStorage' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/blob_events_trigger.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/blob_events_trigger.py deleted file mode 100644 index 681cc44d278b..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/blob_events_trigger.py +++ /dev/null @@ -1,81 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .multiple_pipeline_trigger import MultiplePipelineTrigger - - -class BlobEventsTrigger(MultiplePipelineTrigger): - """Trigger that runs every time a Blob event occurs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Trigger description. - :type description: str - :ivar runtime_state: Indicates if trigger is running or not. Updated when - Start/Stop APIs are called on the Trigger. Possible values include: - 'Started', 'Stopped', 'Disabled' - :vartype runtime_state: str or - ~azure.mgmt.datafactory.models.TriggerRuntimeState - :param type: Required. Constant filled by server. - :type type: str - :param pipelines: Pipelines that need to be started. - :type pipelines: - list[~azure.mgmt.datafactory.models.TriggerPipelineReference] - :param blob_path_begins_with: The blob path must begin with the pattern - provided for trigger to fire. For example, '/records/blobs/december/' will - only fire the trigger for blobs in the december folder under the records - container. At least one of these must be provided: blobPathBeginsWith, - blobPathEndsWith. - :type blob_path_begins_with: str - :param blob_path_ends_with: The blob path must end with the pattern - provided for trigger to fire. For example, 'december/boxes.csv' will only - fire the trigger for blobs named boxes in a december folder. At least one - of these must be provided: blobPathBeginsWith, blobPathEndsWith. - :type blob_path_ends_with: str - :param events: Required. The type of events that cause this trigger to - fire. - :type events: list[str or ~azure.mgmt.datafactory.models.BlobEventTypes] - :param scope: Required. The ARM resource ID of the Storage Account. - :type scope: str - """ - - _validation = { - 'runtime_state': {'readonly': True}, - 'type': {'required': True}, - 'events': {'required': True}, - 'scope': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'runtime_state': {'key': 'runtimeState', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'pipelines': {'key': 'pipelines', 'type': '[TriggerPipelineReference]'}, - 'blob_path_begins_with': {'key': 'typeProperties.blobPathBeginsWith', 'type': 'str'}, - 'blob_path_ends_with': {'key': 'typeProperties.blobPathEndsWith', 'type': 'str'}, - 'events': {'key': 'typeProperties.events', 'type': '[str]'}, - 'scope': {'key': 'typeProperties.scope', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(BlobEventsTrigger, self).__init__(**kwargs) - self.blob_path_begins_with = kwargs.get('blob_path_begins_with', None) - self.blob_path_ends_with = kwargs.get('blob_path_ends_with', None) - self.events = kwargs.get('events', None) - self.scope = kwargs.get('scope', None) - self.type = 'BlobEventsTrigger' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/blob_events_trigger_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/blob_events_trigger_py3.py deleted file mode 100644 index 08d9c542f4af..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/blob_events_trigger_py3.py +++ /dev/null @@ -1,81 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .multiple_pipeline_trigger_py3 import MultiplePipelineTrigger - - -class BlobEventsTrigger(MultiplePipelineTrigger): - """Trigger that runs every time a Blob event occurs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Trigger description. - :type description: str - :ivar runtime_state: Indicates if trigger is running or not. Updated when - Start/Stop APIs are called on the Trigger. Possible values include: - 'Started', 'Stopped', 'Disabled' - :vartype runtime_state: str or - ~azure.mgmt.datafactory.models.TriggerRuntimeState - :param type: Required. Constant filled by server. - :type type: str - :param pipelines: Pipelines that need to be started. - :type pipelines: - list[~azure.mgmt.datafactory.models.TriggerPipelineReference] - :param blob_path_begins_with: The blob path must begin with the pattern - provided for trigger to fire. For example, '/records/blobs/december/' will - only fire the trigger for blobs in the december folder under the records - container. At least one of these must be provided: blobPathBeginsWith, - blobPathEndsWith. - :type blob_path_begins_with: str - :param blob_path_ends_with: The blob path must end with the pattern - provided for trigger to fire. For example, 'december/boxes.csv' will only - fire the trigger for blobs named boxes in a december folder. At least one - of these must be provided: blobPathBeginsWith, blobPathEndsWith. - :type blob_path_ends_with: str - :param events: Required. The type of events that cause this trigger to - fire. - :type events: list[str or ~azure.mgmt.datafactory.models.BlobEventTypes] - :param scope: Required. The ARM resource ID of the Storage Account. - :type scope: str - """ - - _validation = { - 'runtime_state': {'readonly': True}, - 'type': {'required': True}, - 'events': {'required': True}, - 'scope': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'runtime_state': {'key': 'runtimeState', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'pipelines': {'key': 'pipelines', 'type': '[TriggerPipelineReference]'}, - 'blob_path_begins_with': {'key': 'typeProperties.blobPathBeginsWith', 'type': 'str'}, - 'blob_path_ends_with': {'key': 'typeProperties.blobPathEndsWith', 'type': 'str'}, - 'events': {'key': 'typeProperties.events', 'type': '[str]'}, - 'scope': {'key': 'typeProperties.scope', 'type': 'str'}, - } - - def __init__(self, *, events, scope: str, additional_properties=None, description: str=None, pipelines=None, blob_path_begins_with: str=None, blob_path_ends_with: str=None, **kwargs) -> None: - super(BlobEventsTrigger, self).__init__(additional_properties=additional_properties, description=description, pipelines=pipelines, **kwargs) - self.blob_path_begins_with = blob_path_begins_with - self.blob_path_ends_with = blob_path_ends_with - self.events = events - self.scope = scope - self.type = 'BlobEventsTrigger' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/blob_sink.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/blob_sink.py deleted file mode 100644 index fe90f5836faf..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/blob_sink.py +++ /dev/null @@ -1,77 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_sink import CopySink - - -class BlobSink(CopySink): - """A copy activity Azure Blob sink. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param write_batch_size: Write batch size. Type: integer (or Expression - with resultType integer), minimum: 0. - :type write_batch_size: object - :param write_batch_timeout: Write batch timeout. Type: string (or - Expression with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type write_batch_timeout: object - :param sink_retry_count: Sink retry count. Type: integer (or Expression - with resultType integer). - :type sink_retry_count: object - :param sink_retry_wait: Sink retry wait. Type: string (or Expression with - resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type sink_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param blob_writer_overwrite_files: Blob writer overwrite files. Type: - boolean (or Expression with resultType boolean). - :type blob_writer_overwrite_files: object - :param blob_writer_date_time_format: Blob writer date time format. Type: - string (or Expression with resultType string). - :type blob_writer_date_time_format: object - :param blob_writer_add_header: Blob writer add header. Type: boolean (or - Expression with resultType boolean). - :type blob_writer_add_header: object - :param copy_behavior: The type of copy behavior for copy sink. Possible - values include: 'PreserveHierarchy', 'FlattenHierarchy', 'MergeFiles' - :type copy_behavior: str or - ~azure.mgmt.datafactory.models.CopyBehaviorType - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, - 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, - 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, - 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'blob_writer_overwrite_files': {'key': 'blobWriterOverwriteFiles', 'type': 'object'}, - 'blob_writer_date_time_format': {'key': 'blobWriterDateTimeFormat', 'type': 'object'}, - 'blob_writer_add_header': {'key': 'blobWriterAddHeader', 'type': 'object'}, - 'copy_behavior': {'key': 'copyBehavior', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(BlobSink, self).__init__(**kwargs) - self.blob_writer_overwrite_files = kwargs.get('blob_writer_overwrite_files', None) - self.blob_writer_date_time_format = kwargs.get('blob_writer_date_time_format', None) - self.blob_writer_add_header = kwargs.get('blob_writer_add_header', None) - self.copy_behavior = kwargs.get('copy_behavior', None) - self.type = 'BlobSink' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/blob_sink_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/blob_sink_py3.py deleted file mode 100644 index 1d6ac96aff6e..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/blob_sink_py3.py +++ /dev/null @@ -1,77 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_sink_py3 import CopySink - - -class BlobSink(CopySink): - """A copy activity Azure Blob sink. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param write_batch_size: Write batch size. Type: integer (or Expression - with resultType integer), minimum: 0. - :type write_batch_size: object - :param write_batch_timeout: Write batch timeout. Type: string (or - Expression with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type write_batch_timeout: object - :param sink_retry_count: Sink retry count. Type: integer (or Expression - with resultType integer). - :type sink_retry_count: object - :param sink_retry_wait: Sink retry wait. Type: string (or Expression with - resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type sink_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param blob_writer_overwrite_files: Blob writer overwrite files. Type: - boolean (or Expression with resultType boolean). - :type blob_writer_overwrite_files: object - :param blob_writer_date_time_format: Blob writer date time format. Type: - string (or Expression with resultType string). - :type blob_writer_date_time_format: object - :param blob_writer_add_header: Blob writer add header. Type: boolean (or - Expression with resultType boolean). - :type blob_writer_add_header: object - :param copy_behavior: The type of copy behavior for copy sink. Possible - values include: 'PreserveHierarchy', 'FlattenHierarchy', 'MergeFiles' - :type copy_behavior: str or - ~azure.mgmt.datafactory.models.CopyBehaviorType - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, - 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, - 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, - 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'blob_writer_overwrite_files': {'key': 'blobWriterOverwriteFiles', 'type': 'object'}, - 'blob_writer_date_time_format': {'key': 'blobWriterDateTimeFormat', 'type': 'object'}, - 'blob_writer_add_header': {'key': 'blobWriterAddHeader', 'type': 'object'}, - 'copy_behavior': {'key': 'copyBehavior', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, blob_writer_overwrite_files=None, blob_writer_date_time_format=None, blob_writer_add_header=None, copy_behavior=None, **kwargs) -> None: - super(BlobSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, **kwargs) - self.blob_writer_overwrite_files = blob_writer_overwrite_files - self.blob_writer_date_time_format = blob_writer_date_time_format - self.blob_writer_add_header = blob_writer_add_header - self.copy_behavior = copy_behavior - self.type = 'BlobSink' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/blob_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/blob_source.py deleted file mode 100644 index f563d0af1e2d..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/blob_source.py +++ /dev/null @@ -1,63 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class BlobSource(CopySource): - """A copy activity Azure Blob source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param treat_empty_as_null: Treat empty as null. Type: boolean (or - Expression with resultType boolean). - :type treat_empty_as_null: object - :param skip_header_line_count: Number of header lines to skip from each - blob. Type: integer (or Expression with resultType integer). - :type skip_header_line_count: object - :param recursive: If true, files under the folder path will be read - recursively. Default is true. Type: boolean (or Expression with resultType - boolean). - :type recursive: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'treat_empty_as_null': {'key': 'treatEmptyAsNull', 'type': 'object'}, - 'skip_header_line_count': {'key': 'skipHeaderLineCount', 'type': 'object'}, - 'recursive': {'key': 'recursive', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(BlobSource, self).__init__(**kwargs) - self.treat_empty_as_null = kwargs.get('treat_empty_as_null', None) - self.skip_header_line_count = kwargs.get('skip_header_line_count', None) - self.recursive = kwargs.get('recursive', None) - self.type = 'BlobSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/blob_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/blob_source_py3.py deleted file mode 100644 index 5b9dc775f069..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/blob_source_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class BlobSource(CopySource): - """A copy activity Azure Blob source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param treat_empty_as_null: Treat empty as null. Type: boolean (or - Expression with resultType boolean). - :type treat_empty_as_null: object - :param skip_header_line_count: Number of header lines to skip from each - blob. Type: integer (or Expression with resultType integer). - :type skip_header_line_count: object - :param recursive: If true, files under the folder path will be read - recursively. Default is true. Type: boolean (or Expression with resultType - boolean). - :type recursive: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'treat_empty_as_null': {'key': 'treatEmptyAsNull', 'type': 'object'}, - 'skip_header_line_count': {'key': 'skipHeaderLineCount', 'type': 'object'}, - 'recursive': {'key': 'recursive', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, treat_empty_as_null=None, skip_header_line_count=None, recursive=None, **kwargs) -> None: - super(BlobSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.treat_empty_as_null = treat_empty_as_null - self.skip_header_line_count = skip_header_line_count - self.recursive = recursive - self.type = 'BlobSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/blob_trigger.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/blob_trigger.py deleted file mode 100644 index 6abdece68966..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/blob_trigger.py +++ /dev/null @@ -1,74 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .multiple_pipeline_trigger import MultiplePipelineTrigger - - -class BlobTrigger(MultiplePipelineTrigger): - """Trigger that runs every time the selected Blob container changes. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Trigger description. - :type description: str - :ivar runtime_state: Indicates if trigger is running or not. Updated when - Start/Stop APIs are called on the Trigger. Possible values include: - 'Started', 'Stopped', 'Disabled' - :vartype runtime_state: str or - ~azure.mgmt.datafactory.models.TriggerRuntimeState - :param type: Required. Constant filled by server. - :type type: str - :param pipelines: Pipelines that need to be started. - :type pipelines: - list[~azure.mgmt.datafactory.models.TriggerPipelineReference] - :param folder_path: Required. The path of the container/folder that will - trigger the pipeline. - :type folder_path: str - :param max_concurrency: Required. The max number of parallel files to - handle when it is triggered. - :type max_concurrency: int - :param linked_service: Required. The Azure Storage linked service - reference. - :type linked_service: - ~azure.mgmt.datafactory.models.LinkedServiceReference - """ - - _validation = { - 'runtime_state': {'readonly': True}, - 'type': {'required': True}, - 'folder_path': {'required': True}, - 'max_concurrency': {'required': True}, - 'linked_service': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'runtime_state': {'key': 'runtimeState', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'pipelines': {'key': 'pipelines', 'type': '[TriggerPipelineReference]'}, - 'folder_path': {'key': 'typeProperties.folderPath', 'type': 'str'}, - 'max_concurrency': {'key': 'typeProperties.maxConcurrency', 'type': 'int'}, - 'linked_service': {'key': 'typeProperties.linkedService', 'type': 'LinkedServiceReference'}, - } - - def __init__(self, **kwargs): - super(BlobTrigger, self).__init__(**kwargs) - self.folder_path = kwargs.get('folder_path', None) - self.max_concurrency = kwargs.get('max_concurrency', None) - self.linked_service = kwargs.get('linked_service', None) - self.type = 'BlobTrigger' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/blob_trigger_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/blob_trigger_py3.py deleted file mode 100644 index 2c80ac605368..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/blob_trigger_py3.py +++ /dev/null @@ -1,74 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .multiple_pipeline_trigger_py3 import MultiplePipelineTrigger - - -class BlobTrigger(MultiplePipelineTrigger): - """Trigger that runs every time the selected Blob container changes. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Trigger description. - :type description: str - :ivar runtime_state: Indicates if trigger is running or not. Updated when - Start/Stop APIs are called on the Trigger. Possible values include: - 'Started', 'Stopped', 'Disabled' - :vartype runtime_state: str or - ~azure.mgmt.datafactory.models.TriggerRuntimeState - :param type: Required. Constant filled by server. - :type type: str - :param pipelines: Pipelines that need to be started. - :type pipelines: - list[~azure.mgmt.datafactory.models.TriggerPipelineReference] - :param folder_path: Required. The path of the container/folder that will - trigger the pipeline. - :type folder_path: str - :param max_concurrency: Required. The max number of parallel files to - handle when it is triggered. - :type max_concurrency: int - :param linked_service: Required. The Azure Storage linked service - reference. - :type linked_service: - ~azure.mgmt.datafactory.models.LinkedServiceReference - """ - - _validation = { - 'runtime_state': {'readonly': True}, - 'type': {'required': True}, - 'folder_path': {'required': True}, - 'max_concurrency': {'required': True}, - 'linked_service': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'runtime_state': {'key': 'runtimeState', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'pipelines': {'key': 'pipelines', 'type': '[TriggerPipelineReference]'}, - 'folder_path': {'key': 'typeProperties.folderPath', 'type': 'str'}, - 'max_concurrency': {'key': 'typeProperties.maxConcurrency', 'type': 'int'}, - 'linked_service': {'key': 'typeProperties.linkedService', 'type': 'LinkedServiceReference'}, - } - - def __init__(self, *, folder_path: str, max_concurrency: int, linked_service, additional_properties=None, description: str=None, pipelines=None, **kwargs) -> None: - super(BlobTrigger, self).__init__(additional_properties=additional_properties, description=description, pipelines=pipelines, **kwargs) - self.folder_path = folder_path - self.max_concurrency = max_concurrency - self.linked_service = linked_service - self.type = 'BlobTrigger' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/cassandra_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/cassandra_linked_service.py deleted file mode 100644 index 974ce49a1c62..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/cassandra_linked_service.py +++ /dev/null @@ -1,84 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class CassandraLinkedService(LinkedService): - """Linked service for Cassandra data source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param host: Required. Host name for connection. Type: string (or - Expression with resultType string). - :type host: object - :param authentication_type: AuthenticationType to be used for connection. - Type: string (or Expression with resultType string). - :type authentication_type: object - :param port: The port for the connection. Type: integer (or Expression - with resultType integer). - :type port: object - :param username: Username for authentication. Type: string (or Expression - with resultType string). - :type username: object - :param password: Password for authentication. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'host': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'host': {'key': 'typeProperties.host', 'type': 'object'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'object'}, - 'port': {'key': 'typeProperties.port', 'type': 'object'}, - 'username': {'key': 'typeProperties.username', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(CassandraLinkedService, self).__init__(**kwargs) - self.host = kwargs.get('host', None) - self.authentication_type = kwargs.get('authentication_type', None) - self.port = kwargs.get('port', None) - self.username = kwargs.get('username', None) - self.password = kwargs.get('password', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'Cassandra' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/cassandra_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/cassandra_linked_service_py3.py deleted file mode 100644 index dbc74f10002f..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/cassandra_linked_service_py3.py +++ /dev/null @@ -1,84 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class CassandraLinkedService(LinkedService): - """Linked service for Cassandra data source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param host: Required. Host name for connection. Type: string (or - Expression with resultType string). - :type host: object - :param authentication_type: AuthenticationType to be used for connection. - Type: string (or Expression with resultType string). - :type authentication_type: object - :param port: The port for the connection. Type: integer (or Expression - with resultType integer). - :type port: object - :param username: Username for authentication. Type: string (or Expression - with resultType string). - :type username: object - :param password: Password for authentication. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'host': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'host': {'key': 'typeProperties.host', 'type': 'object'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'object'}, - 'port': {'key': 'typeProperties.port', 'type': 'object'}, - 'username': {'key': 'typeProperties.username', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, host, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, authentication_type=None, port=None, username=None, password=None, encrypted_credential=None, **kwargs) -> None: - super(CassandraLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.host = host - self.authentication_type = authentication_type - self.port = port - self.username = username - self.password = password - self.encrypted_credential = encrypted_credential - self.type = 'Cassandra' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/cassandra_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/cassandra_source.py deleted file mode 100644 index fdd0a228d001..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/cassandra_source.py +++ /dev/null @@ -1,65 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class CassandraSource(CopySource): - """A copy activity source for a Cassandra database. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: Database query. Should be a SQL-92 query expression or - Cassandra Query Language (CQL) command. Type: string (or Expression with - resultType string). - :type query: object - :param consistency_level: The consistency level specifies how many - Cassandra servers must respond to a read request before returning data to - the client application. Cassandra checks the specified number of Cassandra - servers for data to satisfy the read request. Must be one of - cassandraSourceReadConsistencyLevels. The default value is 'ONE'. It is - case-insensitive. Possible values include: 'ALL', 'EACH_QUORUM', 'QUORUM', - 'LOCAL_QUORUM', 'ONE', 'TWO', 'THREE', 'LOCAL_ONE', 'SERIAL', - 'LOCAL_SERIAL' - :type consistency_level: str or - ~azure.mgmt.datafactory.models.CassandraSourceReadConsistencyLevels - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - 'consistency_level': {'key': 'consistencyLevel', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CassandraSource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.consistency_level = kwargs.get('consistency_level', None) - self.type = 'CassandraSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/cassandra_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/cassandra_source_py3.py deleted file mode 100644 index 323d85d1e742..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/cassandra_source_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class CassandraSource(CopySource): - """A copy activity source for a Cassandra database. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: Database query. Should be a SQL-92 query expression or - Cassandra Query Language (CQL) command. Type: string (or Expression with - resultType string). - :type query: object - :param consistency_level: The consistency level specifies how many - Cassandra servers must respond to a read request before returning data to - the client application. Cassandra checks the specified number of Cassandra - servers for data to satisfy the read request. Must be one of - cassandraSourceReadConsistencyLevels. The default value is 'ONE'. It is - case-insensitive. Possible values include: 'ALL', 'EACH_QUORUM', 'QUORUM', - 'LOCAL_QUORUM', 'ONE', 'TWO', 'THREE', 'LOCAL_ONE', 'SERIAL', - 'LOCAL_SERIAL' - :type consistency_level: str or - ~azure.mgmt.datafactory.models.CassandraSourceReadConsistencyLevels - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - 'consistency_level': {'key': 'consistencyLevel', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query=None, consistency_level=None, **kwargs) -> None: - super(CassandraSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.consistency_level = consistency_level - self.type = 'CassandraSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/cassandra_table_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/cassandra_table_dataset.py deleted file mode 100644 index b89c324fd4d4..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/cassandra_table_dataset.py +++ /dev/null @@ -1,77 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class CassandraTableDataset(Dataset): - """The Cassandra database dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name of the Cassandra database. Type: string - (or Expression with resultType string). - :type table_name: object - :param keyspace: The keyspace of the Cassandra database. Type: string (or - Expression with resultType string). - :type keyspace: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - 'keyspace': {'key': 'typeProperties.keyspace', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(CassandraTableDataset, self).__init__(**kwargs) - self.table_name = kwargs.get('table_name', None) - self.keyspace = kwargs.get('keyspace', None) - self.type = 'CassandraTable' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/cassandra_table_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/cassandra_table_dataset_py3.py deleted file mode 100644 index 256358ce50cb..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/cassandra_table_dataset_py3.py +++ /dev/null @@ -1,77 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class CassandraTableDataset(Dataset): - """The Cassandra database dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name of the Cassandra database. Type: string - (or Expression with resultType string). - :type table_name: object - :param keyspace: The keyspace of the Cassandra database. Type: string (or - Expression with resultType string). - :type keyspace: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - 'keyspace': {'key': 'typeProperties.keyspace', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, keyspace=None, **kwargs) -> None: - super(CassandraTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.table_name = table_name - self.keyspace = keyspace - self.type = 'CassandraTable' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/concur_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/concur_linked_service.py deleted file mode 100644 index 7b85f1400ff6..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/concur_linked_service.py +++ /dev/null @@ -1,92 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class ConcurLinkedService(LinkedService): - """Concur Service linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param client_id: Required. Application client_id supplied by Concur App - Management. - :type client_id: object - :param username: Required. The user name that you use to access Concur - Service. - :type username: object - :param password: The password corresponding to the user name that you - provided in the username field. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param use_encrypted_endpoints: Specifies whether the data source - endpoints are encrypted using HTTPS. The default value is true. - :type use_encrypted_endpoints: object - :param use_host_verification: Specifies whether to require the host name - in the server's certificate to match the host name of the server when - connecting over SSL. The default value is true. - :type use_host_verification: object - :param use_peer_verification: Specifies whether to verify the identity of - the server when connecting over SSL. The default value is true. - :type use_peer_verification: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'client_id': {'required': True}, - 'username': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, - 'username': {'key': 'typeProperties.username', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, - 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, - 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ConcurLinkedService, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.username = kwargs.get('username', None) - self.password = kwargs.get('password', None) - self.use_encrypted_endpoints = kwargs.get('use_encrypted_endpoints', None) - self.use_host_verification = kwargs.get('use_host_verification', None) - self.use_peer_verification = kwargs.get('use_peer_verification', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'Concur' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/concur_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/concur_linked_service_py3.py deleted file mode 100644 index 6e17a2c9cc8e..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/concur_linked_service_py3.py +++ /dev/null @@ -1,92 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class ConcurLinkedService(LinkedService): - """Concur Service linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param client_id: Required. Application client_id supplied by Concur App - Management. - :type client_id: object - :param username: Required. The user name that you use to access Concur - Service. - :type username: object - :param password: The password corresponding to the user name that you - provided in the username field. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param use_encrypted_endpoints: Specifies whether the data source - endpoints are encrypted using HTTPS. The default value is true. - :type use_encrypted_endpoints: object - :param use_host_verification: Specifies whether to require the host name - in the server's certificate to match the host name of the server when - connecting over SSL. The default value is true. - :type use_host_verification: object - :param use_peer_verification: Specifies whether to verify the identity of - the server when connecting over SSL. The default value is true. - :type use_peer_verification: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'client_id': {'required': True}, - 'username': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, - 'username': {'key': 'typeProperties.username', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, - 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, - 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, client_id, username, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, password=None, use_encrypted_endpoints=None, use_host_verification=None, use_peer_verification=None, encrypted_credential=None, **kwargs) -> None: - super(ConcurLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.client_id = client_id - self.username = username - self.password = password - self.use_encrypted_endpoints = use_encrypted_endpoints - self.use_host_verification = use_host_verification - self.use_peer_verification = use_peer_verification - self.encrypted_credential = encrypted_credential - self.type = 'Concur' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/concur_object_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/concur_object_dataset.py deleted file mode 100644 index e2595f9d8aff..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/concur_object_dataset.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class ConcurObjectDataset(Dataset): - """Concur Service dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ConcurObjectDataset, self).__init__(**kwargs) - self.table_name = kwargs.get('table_name', None) - self.type = 'ConcurObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/concur_object_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/concur_object_dataset_py3.py deleted file mode 100644 index 9543a6395a32..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/concur_object_dataset_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class ConcurObjectDataset(Dataset): - """Concur Service dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: - super(ConcurObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.table_name = table_name - self.type = 'ConcurObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/concur_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/concur_source.py deleted file mode 100644 index f8053415520c..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/concur_source.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class ConcurSource(CopySource): - """A copy activity Concur Service source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ConcurSource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.type = 'ConcurSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/concur_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/concur_source_py3.py deleted file mode 100644 index db9104869417..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/concur_source_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class ConcurSource(CopySource): - """A copy activity Concur Service source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query=None, **kwargs) -> None: - super(ConcurSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.type = 'ConcurSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/control_activity.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/control_activity.py deleted file mode 100644 index 16581581786b..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/control_activity.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .activity import Activity - - -class ControlActivity(Activity): - """Base class for all control activities like IfCondition, ForEach , Until. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AppendVariableActivity, SetVariableActivity, - FilterActivity, UntilActivity, WaitActivity, ForEachActivity, - IfConditionActivity, ExecutePipelineActivity - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'AppendVariable': 'AppendVariableActivity', 'SetVariable': 'SetVariableActivity', 'Filter': 'FilterActivity', 'Until': 'UntilActivity', 'Wait': 'WaitActivity', 'ForEach': 'ForEachActivity', 'IfCondition': 'IfConditionActivity', 'ExecutePipeline': 'ExecutePipelineActivity'} - } - - def __init__(self, **kwargs): - super(ControlActivity, self).__init__(**kwargs) - self.type = 'Container' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/control_activity_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/control_activity_py3.py deleted file mode 100644 index 739d8b9c311b..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/control_activity_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .activity_py3 import Activity - - -class ControlActivity(Activity): - """Base class for all control activities like IfCondition, ForEach , Until. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AppendVariableActivity, SetVariableActivity, - FilterActivity, UntilActivity, WaitActivity, ForEachActivity, - IfConditionActivity, ExecutePipelineActivity - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'AppendVariable': 'AppendVariableActivity', 'SetVariable': 'SetVariableActivity', 'Filter': 'FilterActivity', 'Until': 'UntilActivity', 'Wait': 'WaitActivity', 'ForEach': 'ForEachActivity', 'IfCondition': 'IfConditionActivity', 'ExecutePipeline': 'ExecutePipelineActivity'} - } - - def __init__(self, *, name: str, additional_properties=None, description: str=None, depends_on=None, user_properties=None, **kwargs) -> None: - super(ControlActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, **kwargs) - self.type = 'Container' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/copy_activity.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/copy_activity.py deleted file mode 100644 index 9182efe2469a..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/copy_activity.py +++ /dev/null @@ -1,116 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity import ExecutionActivity - - -class CopyActivity(ExecutionActivity): - """Copy activity. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param source: Required. Copy activity source. - :type source: ~azure.mgmt.datafactory.models.CopySource - :param sink: Required. Copy activity sink. - :type sink: ~azure.mgmt.datafactory.models.CopySink - :param translator: Copy activity translator. If not specified, tabular - translator is used. - :type translator: ~azure.mgmt.datafactory.models.CopyTranslator - :param enable_staging: Specifies whether to copy data via an interim - staging. Default value is false. Type: boolean (or Expression with - resultType boolean). - :type enable_staging: object - :param staging_settings: Specifies interim staging settings when - EnableStaging is true. - :type staging_settings: ~azure.mgmt.datafactory.models.StagingSettings - :param parallel_copies: Maximum number of concurrent sessions opened on - the source or sink to avoid overloading the data store. Type: integer (or - Expression with resultType integer), minimum: 0. - :type parallel_copies: object - :param data_integration_units: Maximum number of data integration units - that can be used to perform this data movement. Type: integer (or - Expression with resultType integer), minimum: 0. - :type data_integration_units: object - :param enable_skip_incompatible_row: Whether to skip incompatible row. - Default value is false. Type: boolean (or Expression with resultType - boolean). - :type enable_skip_incompatible_row: object - :param redirect_incompatible_row_settings: Redirect incompatible row - settings when EnableSkipIncompatibleRow is true. - :type redirect_incompatible_row_settings: - ~azure.mgmt.datafactory.models.RedirectIncompatibleRowSettings - :param inputs: List of inputs for the activity. - :type inputs: list[~azure.mgmt.datafactory.models.DatasetReference] - :param outputs: List of outputs for the activity. - :type outputs: list[~azure.mgmt.datafactory.models.DatasetReference] - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'source': {'required': True}, - 'sink': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'source': {'key': 'typeProperties.source', 'type': 'CopySource'}, - 'sink': {'key': 'typeProperties.sink', 'type': 'CopySink'}, - 'translator': {'key': 'typeProperties.translator', 'type': 'CopyTranslator'}, - 'enable_staging': {'key': 'typeProperties.enableStaging', 'type': 'object'}, - 'staging_settings': {'key': 'typeProperties.stagingSettings', 'type': 'StagingSettings'}, - 'parallel_copies': {'key': 'typeProperties.parallelCopies', 'type': 'object'}, - 'data_integration_units': {'key': 'typeProperties.dataIntegrationUnits', 'type': 'object'}, - 'enable_skip_incompatible_row': {'key': 'typeProperties.enableSkipIncompatibleRow', 'type': 'object'}, - 'redirect_incompatible_row_settings': {'key': 'typeProperties.redirectIncompatibleRowSettings', 'type': 'RedirectIncompatibleRowSettings'}, - 'inputs': {'key': 'inputs', 'type': '[DatasetReference]'}, - 'outputs': {'key': 'outputs', 'type': '[DatasetReference]'}, - } - - def __init__(self, **kwargs): - super(CopyActivity, self).__init__(**kwargs) - self.source = kwargs.get('source', None) - self.sink = kwargs.get('sink', None) - self.translator = kwargs.get('translator', None) - self.enable_staging = kwargs.get('enable_staging', None) - self.staging_settings = kwargs.get('staging_settings', None) - self.parallel_copies = kwargs.get('parallel_copies', None) - self.data_integration_units = kwargs.get('data_integration_units', None) - self.enable_skip_incompatible_row = kwargs.get('enable_skip_incompatible_row', None) - self.redirect_incompatible_row_settings = kwargs.get('redirect_incompatible_row_settings', None) - self.inputs = kwargs.get('inputs', None) - self.outputs = kwargs.get('outputs', None) - self.type = 'Copy' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/copy_activity_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/copy_activity_py3.py deleted file mode 100644 index fd663bd71dc6..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/copy_activity_py3.py +++ /dev/null @@ -1,116 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity_py3 import ExecutionActivity - - -class CopyActivity(ExecutionActivity): - """Copy activity. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param source: Required. Copy activity source. - :type source: ~azure.mgmt.datafactory.models.CopySource - :param sink: Required. Copy activity sink. - :type sink: ~azure.mgmt.datafactory.models.CopySink - :param translator: Copy activity translator. If not specified, tabular - translator is used. - :type translator: ~azure.mgmt.datafactory.models.CopyTranslator - :param enable_staging: Specifies whether to copy data via an interim - staging. Default value is false. Type: boolean (or Expression with - resultType boolean). - :type enable_staging: object - :param staging_settings: Specifies interim staging settings when - EnableStaging is true. - :type staging_settings: ~azure.mgmt.datafactory.models.StagingSettings - :param parallel_copies: Maximum number of concurrent sessions opened on - the source or sink to avoid overloading the data store. Type: integer (or - Expression with resultType integer), minimum: 0. - :type parallel_copies: object - :param data_integration_units: Maximum number of data integration units - that can be used to perform this data movement. Type: integer (or - Expression with resultType integer), minimum: 0. - :type data_integration_units: object - :param enable_skip_incompatible_row: Whether to skip incompatible row. - Default value is false. Type: boolean (or Expression with resultType - boolean). - :type enable_skip_incompatible_row: object - :param redirect_incompatible_row_settings: Redirect incompatible row - settings when EnableSkipIncompatibleRow is true. - :type redirect_incompatible_row_settings: - ~azure.mgmt.datafactory.models.RedirectIncompatibleRowSettings - :param inputs: List of inputs for the activity. - :type inputs: list[~azure.mgmt.datafactory.models.DatasetReference] - :param outputs: List of outputs for the activity. - :type outputs: list[~azure.mgmt.datafactory.models.DatasetReference] - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'source': {'required': True}, - 'sink': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'source': {'key': 'typeProperties.source', 'type': 'CopySource'}, - 'sink': {'key': 'typeProperties.sink', 'type': 'CopySink'}, - 'translator': {'key': 'typeProperties.translator', 'type': 'CopyTranslator'}, - 'enable_staging': {'key': 'typeProperties.enableStaging', 'type': 'object'}, - 'staging_settings': {'key': 'typeProperties.stagingSettings', 'type': 'StagingSettings'}, - 'parallel_copies': {'key': 'typeProperties.parallelCopies', 'type': 'object'}, - 'data_integration_units': {'key': 'typeProperties.dataIntegrationUnits', 'type': 'object'}, - 'enable_skip_incompatible_row': {'key': 'typeProperties.enableSkipIncompatibleRow', 'type': 'object'}, - 'redirect_incompatible_row_settings': {'key': 'typeProperties.redirectIncompatibleRowSettings', 'type': 'RedirectIncompatibleRowSettings'}, - 'inputs': {'key': 'inputs', 'type': '[DatasetReference]'}, - 'outputs': {'key': 'outputs', 'type': '[DatasetReference]'}, - } - - def __init__(self, *, name: str, source, sink, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, translator=None, enable_staging=None, staging_settings=None, parallel_copies=None, data_integration_units=None, enable_skip_incompatible_row=None, redirect_incompatible_row_settings=None, inputs=None, outputs=None, **kwargs) -> None: - super(CopyActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) - self.source = source - self.sink = sink - self.translator = translator - self.enable_staging = enable_staging - self.staging_settings = staging_settings - self.parallel_copies = parallel_copies - self.data_integration_units = data_integration_units - self.enable_skip_incompatible_row = enable_skip_incompatible_row - self.redirect_incompatible_row_settings = redirect_incompatible_row_settings - self.inputs = inputs - self.outputs = outputs - self.type = 'Copy' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/copy_sink.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/copy_sink.py deleted file mode 100644 index 58b55bf39bbc..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/copy_sink.py +++ /dev/null @@ -1,71 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CopySink(Model): - """A copy activity sink. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: SalesforceSink, DynamicsSink, OdbcSink, - AzureSearchIndexSink, AzureDataLakeStoreSink, OracleSink, SqlDWSink, - SqlSink, DocumentDbCollectionSink, FileSystemSink, BlobSink, - AzureTableSink, AzureQueueSink, SapCloudForCustomerSink - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param write_batch_size: Write batch size. Type: integer (or Expression - with resultType integer), minimum: 0. - :type write_batch_size: object - :param write_batch_timeout: Write batch timeout. Type: string (or - Expression with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type write_batch_timeout: object - :param sink_retry_count: Sink retry count. Type: integer (or Expression - with resultType integer). - :type sink_retry_count: object - :param sink_retry_wait: Sink retry wait. Type: string (or Expression with - resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type sink_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, - 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, - 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, - 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'SalesforceSink': 'SalesforceSink', 'DynamicsSink': 'DynamicsSink', 'OdbcSink': 'OdbcSink', 'AzureSearchIndexSink': 'AzureSearchIndexSink', 'AzureDataLakeStoreSink': 'AzureDataLakeStoreSink', 'OracleSink': 'OracleSink', 'SqlDWSink': 'SqlDWSink', 'SqlSink': 'SqlSink', 'DocumentDbCollectionSink': 'DocumentDbCollectionSink', 'FileSystemSink': 'FileSystemSink', 'BlobSink': 'BlobSink', 'AzureTableSink': 'AzureTableSink', 'AzureQueueSink': 'AzureQueueSink', 'SapCloudForCustomerSink': 'SapCloudForCustomerSink'} - } - - def __init__(self, **kwargs): - super(CopySink, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.write_batch_size = kwargs.get('write_batch_size', None) - self.write_batch_timeout = kwargs.get('write_batch_timeout', None) - self.sink_retry_count = kwargs.get('sink_retry_count', None) - self.sink_retry_wait = kwargs.get('sink_retry_wait', None) - self.type = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/copy_sink_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/copy_sink_py3.py deleted file mode 100644 index 02dfd30c931e..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/copy_sink_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CopySink(Model): - """A copy activity sink. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: SalesforceSink, DynamicsSink, OdbcSink, - AzureSearchIndexSink, AzureDataLakeStoreSink, OracleSink, SqlDWSink, - SqlSink, DocumentDbCollectionSink, FileSystemSink, BlobSink, - AzureTableSink, AzureQueueSink, SapCloudForCustomerSink - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param write_batch_size: Write batch size. Type: integer (or Expression - with resultType integer), minimum: 0. - :type write_batch_size: object - :param write_batch_timeout: Write batch timeout. Type: string (or - Expression with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type write_batch_timeout: object - :param sink_retry_count: Sink retry count. Type: integer (or Expression - with resultType integer). - :type sink_retry_count: object - :param sink_retry_wait: Sink retry wait. Type: string (or Expression with - resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type sink_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, - 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, - 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, - 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'SalesforceSink': 'SalesforceSink', 'DynamicsSink': 'DynamicsSink', 'OdbcSink': 'OdbcSink', 'AzureSearchIndexSink': 'AzureSearchIndexSink', 'AzureDataLakeStoreSink': 'AzureDataLakeStoreSink', 'OracleSink': 'OracleSink', 'SqlDWSink': 'SqlDWSink', 'SqlSink': 'SqlSink', 'DocumentDbCollectionSink': 'DocumentDbCollectionSink', 'FileSystemSink': 'FileSystemSink', 'BlobSink': 'BlobSink', 'AzureTableSink': 'AzureTableSink', 'AzureQueueSink': 'AzureQueueSink', 'SapCloudForCustomerSink': 'SapCloudForCustomerSink'} - } - - def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, **kwargs) -> None: - super(CopySink, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.write_batch_size = write_batch_size - self.write_batch_timeout = write_batch_timeout - self.sink_retry_count = sink_retry_count - self.sink_retry_wait = sink_retry_wait - self.type = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/copy_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/copy_source.py deleted file mode 100644 index 9a11107fc8e8..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/copy_source.py +++ /dev/null @@ -1,69 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CopySource(Model): - """A copy activity source. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AmazonRedshiftSource, ResponsysSource, - SalesforceMarketingCloudSource, VerticaSource, NetezzaSource, ZohoSource, - XeroSource, SquareSource, SparkSource, ShopifySource, ServiceNowSource, - QuickBooksSource, PrestoSource, PhoenixSource, PaypalSource, MarketoSource, - MariaDBSource, MagentoSource, JiraSource, ImpalaSource, HubspotSource, - HiveSource, HBaseSource, GreenplumSource, GoogleBigQuerySource, - EloquaSource, DrillSource, CouchbaseSource, ConcurSource, - AzurePostgreSqlSource, AmazonMWSSource, HttpSource, - AzureDataLakeStoreSource, MongoDbSource, CassandraSource, WebSource, - OracleSource, AzureMySqlSource, HdfsSource, FileSystemSource, SqlDWSource, - SqlSource, SapEccSource, SapCloudForCustomerSource, SalesforceSource, - RelationalSource, DynamicsSource, DocumentDbCollectionSource, BlobSource, - AzureTableSource - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'AmazonRedshiftSource': 'AmazonRedshiftSource', 'ResponsysSource': 'ResponsysSource', 'SalesforceMarketingCloudSource': 'SalesforceMarketingCloudSource', 'VerticaSource': 'VerticaSource', 'NetezzaSource': 'NetezzaSource', 'ZohoSource': 'ZohoSource', 'XeroSource': 'XeroSource', 'SquareSource': 'SquareSource', 'SparkSource': 'SparkSource', 'ShopifySource': 'ShopifySource', 'ServiceNowSource': 'ServiceNowSource', 'QuickBooksSource': 'QuickBooksSource', 'PrestoSource': 'PrestoSource', 'PhoenixSource': 'PhoenixSource', 'PaypalSource': 'PaypalSource', 'MarketoSource': 'MarketoSource', 'MariaDBSource': 'MariaDBSource', 'MagentoSource': 'MagentoSource', 'JiraSource': 'JiraSource', 'ImpalaSource': 'ImpalaSource', 'HubspotSource': 'HubspotSource', 'HiveSource': 'HiveSource', 'HBaseSource': 'HBaseSource', 'GreenplumSource': 'GreenplumSource', 'GoogleBigQuerySource': 'GoogleBigQuerySource', 'EloquaSource': 'EloquaSource', 'DrillSource': 'DrillSource', 'CouchbaseSource': 'CouchbaseSource', 'ConcurSource': 'ConcurSource', 'AzurePostgreSqlSource': 'AzurePostgreSqlSource', 'AmazonMWSSource': 'AmazonMWSSource', 'HttpSource': 'HttpSource', 'AzureDataLakeStoreSource': 'AzureDataLakeStoreSource', 'MongoDbSource': 'MongoDbSource', 'CassandraSource': 'CassandraSource', 'WebSource': 'WebSource', 'OracleSource': 'OracleSource', 'AzureMySqlSource': 'AzureMySqlSource', 'HdfsSource': 'HdfsSource', 'FileSystemSource': 'FileSystemSource', 'SqlDWSource': 'SqlDWSource', 'SqlSource': 'SqlSource', 'SapEccSource': 'SapEccSource', 'SapCloudForCustomerSource': 'SapCloudForCustomerSource', 'SalesforceSource': 'SalesforceSource', 'RelationalSource': 'RelationalSource', 'DynamicsSource': 'DynamicsSource', 'DocumentDbCollectionSource': 'DocumentDbCollectionSource', 'BlobSource': 'BlobSource', 'AzureTableSource': 'AzureTableSource'} - } - - def __init__(self, **kwargs): - super(CopySource, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.source_retry_count = kwargs.get('source_retry_count', None) - self.source_retry_wait = kwargs.get('source_retry_wait', None) - self.type = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/copy_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/copy_source_py3.py deleted file mode 100644 index 7c1a96b2897a..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/copy_source_py3.py +++ /dev/null @@ -1,69 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CopySource(Model): - """A copy activity source. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AmazonRedshiftSource, ResponsysSource, - SalesforceMarketingCloudSource, VerticaSource, NetezzaSource, ZohoSource, - XeroSource, SquareSource, SparkSource, ShopifySource, ServiceNowSource, - QuickBooksSource, PrestoSource, PhoenixSource, PaypalSource, MarketoSource, - MariaDBSource, MagentoSource, JiraSource, ImpalaSource, HubspotSource, - HiveSource, HBaseSource, GreenplumSource, GoogleBigQuerySource, - EloquaSource, DrillSource, CouchbaseSource, ConcurSource, - AzurePostgreSqlSource, AmazonMWSSource, HttpSource, - AzureDataLakeStoreSource, MongoDbSource, CassandraSource, WebSource, - OracleSource, AzureMySqlSource, HdfsSource, FileSystemSource, SqlDWSource, - SqlSource, SapEccSource, SapCloudForCustomerSource, SalesforceSource, - RelationalSource, DynamicsSource, DocumentDbCollectionSource, BlobSource, - AzureTableSource - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'AmazonRedshiftSource': 'AmazonRedshiftSource', 'ResponsysSource': 'ResponsysSource', 'SalesforceMarketingCloudSource': 'SalesforceMarketingCloudSource', 'VerticaSource': 'VerticaSource', 'NetezzaSource': 'NetezzaSource', 'ZohoSource': 'ZohoSource', 'XeroSource': 'XeroSource', 'SquareSource': 'SquareSource', 'SparkSource': 'SparkSource', 'ShopifySource': 'ShopifySource', 'ServiceNowSource': 'ServiceNowSource', 'QuickBooksSource': 'QuickBooksSource', 'PrestoSource': 'PrestoSource', 'PhoenixSource': 'PhoenixSource', 'PaypalSource': 'PaypalSource', 'MarketoSource': 'MarketoSource', 'MariaDBSource': 'MariaDBSource', 'MagentoSource': 'MagentoSource', 'JiraSource': 'JiraSource', 'ImpalaSource': 'ImpalaSource', 'HubspotSource': 'HubspotSource', 'HiveSource': 'HiveSource', 'HBaseSource': 'HBaseSource', 'GreenplumSource': 'GreenplumSource', 'GoogleBigQuerySource': 'GoogleBigQuerySource', 'EloquaSource': 'EloquaSource', 'DrillSource': 'DrillSource', 'CouchbaseSource': 'CouchbaseSource', 'ConcurSource': 'ConcurSource', 'AzurePostgreSqlSource': 'AzurePostgreSqlSource', 'AmazonMWSSource': 'AmazonMWSSource', 'HttpSource': 'HttpSource', 'AzureDataLakeStoreSource': 'AzureDataLakeStoreSource', 'MongoDbSource': 'MongoDbSource', 'CassandraSource': 'CassandraSource', 'WebSource': 'WebSource', 'OracleSource': 'OracleSource', 'AzureMySqlSource': 'AzureMySqlSource', 'HdfsSource': 'HdfsSource', 'FileSystemSource': 'FileSystemSource', 'SqlDWSource': 'SqlDWSource', 'SqlSource': 'SqlSource', 'SapEccSource': 'SapEccSource', 'SapCloudForCustomerSource': 'SapCloudForCustomerSource', 'SalesforceSource': 'SalesforceSource', 'RelationalSource': 'RelationalSource', 'DynamicsSource': 'DynamicsSource', 'DocumentDbCollectionSource': 'DocumentDbCollectionSource', 'BlobSource': 'BlobSource', 'AzureTableSource': 'AzureTableSource'} - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, **kwargs) -> None: - super(CopySource, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.source_retry_count = source_retry_count - self.source_retry_wait = source_retry_wait - self.type = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/copy_translator.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/copy_translator.py deleted file mode 100644 index 2b0242ef997c..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/copy_translator.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CopyTranslator(Model): - """A copy activity translator. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: TabularTranslator - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'TabularTranslator': 'TabularTranslator'} - } - - def __init__(self, **kwargs): - super(CopyTranslator, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.type = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/copy_translator_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/copy_translator_py3.py deleted file mode 100644 index 3fef58394fd0..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/copy_translator_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CopyTranslator(Model): - """A copy activity translator. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: TabularTranslator - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'TabularTranslator': 'TabularTranslator'} - } - - def __init__(self, *, additional_properties=None, **kwargs) -> None: - super(CopyTranslator, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.type = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/cosmos_db_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/cosmos_db_linked_service.py deleted file mode 100644 index ed9136eee5fe..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/cosmos_db_linked_service.py +++ /dev/null @@ -1,71 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class CosmosDbLinkedService(LinkedService): - """Microsoft Azure Cosmos Database (CosmosDB) linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param connection_string: Required. The connection string. Type: string, - SecureString or AzureKeyVaultSecretReference. - :type connection_string: object - :param account_key: The Azure key vault secret reference of accountKey in - connection string. - :type account_key: - ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'connection_string': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, - 'account_key': {'key': 'typeProperties.accountKey', 'type': 'AzureKeyVaultSecretReference'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(CosmosDbLinkedService, self).__init__(**kwargs) - self.connection_string = kwargs.get('connection_string', None) - self.account_key = kwargs.get('account_key', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'CosmosDb' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/cosmos_db_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/cosmos_db_linked_service_py3.py deleted file mode 100644 index 3b951a68a65a..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/cosmos_db_linked_service_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class CosmosDbLinkedService(LinkedService): - """Microsoft Azure Cosmos Database (CosmosDB) linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param connection_string: Required. The connection string. Type: string, - SecureString or AzureKeyVaultSecretReference. - :type connection_string: object - :param account_key: The Azure key vault secret reference of accountKey in - connection string. - :type account_key: - ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'connection_string': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, - 'account_key': {'key': 'typeProperties.accountKey', 'type': 'AzureKeyVaultSecretReference'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, connection_string, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, account_key=None, encrypted_credential=None, **kwargs) -> None: - super(CosmosDbLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.connection_string = connection_string - self.account_key = account_key - self.encrypted_credential = encrypted_credential - self.type = 'CosmosDb' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/couchbase_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/couchbase_linked_service.py deleted file mode 100644 index f5c02a071718..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/couchbase_linked_service.py +++ /dev/null @@ -1,70 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class CouchbaseLinkedService(LinkedService): - """Couchbase server linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param connection_string: An ODBC connection string. Type: string, - SecureString or AzureKeyVaultSecretReference. - :type connection_string: object - :param cred_string: The Azure key vault secret reference of credString in - connection string. - :type cred_string: - ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, - 'cred_string': {'key': 'typeProperties.credString', 'type': 'AzureKeyVaultSecretReference'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(CouchbaseLinkedService, self).__init__(**kwargs) - self.connection_string = kwargs.get('connection_string', None) - self.cred_string = kwargs.get('cred_string', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'Couchbase' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/couchbase_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/couchbase_linked_service_py3.py deleted file mode 100644 index 1507d6ab7b32..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/couchbase_linked_service_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class CouchbaseLinkedService(LinkedService): - """Couchbase server linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param connection_string: An ODBC connection string. Type: string, - SecureString or AzureKeyVaultSecretReference. - :type connection_string: object - :param cred_string: The Azure key vault secret reference of credString in - connection string. - :type cred_string: - ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, - 'cred_string': {'key': 'typeProperties.credString', 'type': 'AzureKeyVaultSecretReference'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, connection_string=None, cred_string=None, encrypted_credential=None, **kwargs) -> None: - super(CouchbaseLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.connection_string = connection_string - self.cred_string = cred_string - self.encrypted_credential = encrypted_credential - self.type = 'Couchbase' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/couchbase_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/couchbase_source.py deleted file mode 100644 index bfab638594a3..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/couchbase_source.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class CouchbaseSource(CopySource): - """A copy activity Couchbase server source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(CouchbaseSource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.type = 'CouchbaseSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/couchbase_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/couchbase_source_py3.py deleted file mode 100644 index cc661253a13d..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/couchbase_source_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class CouchbaseSource(CopySource): - """A copy activity Couchbase server source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query=None, **kwargs) -> None: - super(CouchbaseSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.type = 'CouchbaseSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/couchbase_table_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/couchbase_table_dataset.py deleted file mode 100644 index 821274b9aae4..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/couchbase_table_dataset.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class CouchbaseTableDataset(Dataset): - """Couchbase server dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(CouchbaseTableDataset, self).__init__(**kwargs) - self.table_name = kwargs.get('table_name', None) - self.type = 'CouchbaseTable' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/couchbase_table_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/couchbase_table_dataset_py3.py deleted file mode 100644 index cf5299fd55a5..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/couchbase_table_dataset_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class CouchbaseTableDataset(Dataset): - """Couchbase server dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: - super(CouchbaseTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.table_name = table_name - self.type = 'CouchbaseTable' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/create_linked_integration_runtime_request.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/create_linked_integration_runtime_request.py deleted file mode 100644 index 0e7002dcf68a..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/create_linked_integration_runtime_request.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CreateLinkedIntegrationRuntimeRequest(Model): - """The linked integration runtime information. - - :param name: The name of the linked integration runtime. - :type name: str - :param subscription_id: The ID of the subscription that the linked - integration runtime belongs to. - :type subscription_id: str - :param data_factory_name: The name of the data factory that the linked - integration runtime belongs to. - :type data_factory_name: str - :param data_factory_location: The location of the data factory that the - linked integration runtime belongs to. - :type data_factory_location: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'data_factory_name': {'key': 'dataFactoryName', 'type': 'str'}, - 'data_factory_location': {'key': 'dataFactoryLocation', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CreateLinkedIntegrationRuntimeRequest, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.data_factory_name = kwargs.get('data_factory_name', None) - self.data_factory_location = kwargs.get('data_factory_location', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/create_linked_integration_runtime_request_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/create_linked_integration_runtime_request_py3.py deleted file mode 100644 index aad7d6fa5ac0..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/create_linked_integration_runtime_request_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CreateLinkedIntegrationRuntimeRequest(Model): - """The linked integration runtime information. - - :param name: The name of the linked integration runtime. - :type name: str - :param subscription_id: The ID of the subscription that the linked - integration runtime belongs to. - :type subscription_id: str - :param data_factory_name: The name of the data factory that the linked - integration runtime belongs to. - :type data_factory_name: str - :param data_factory_location: The location of the data factory that the - linked integration runtime belongs to. - :type data_factory_location: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'data_factory_name': {'key': 'dataFactoryName', 'type': 'str'}, - 'data_factory_location': {'key': 'dataFactoryLocation', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, subscription_id: str=None, data_factory_name: str=None, data_factory_location: str=None, **kwargs) -> None: - super(CreateLinkedIntegrationRuntimeRequest, self).__init__(**kwargs) - self.name = name - self.subscription_id = subscription_id - self.data_factory_name = data_factory_name - self.data_factory_location = data_factory_location diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/create_run_response.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/create_run_response.py deleted file mode 100644 index 18ec9f963e65..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/create_run_response.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CreateRunResponse(Model): - """Response body with a run identifier. - - All required parameters must be populated in order to send to Azure. - - :param run_id: Required. Identifier of a run. - :type run_id: str - """ - - _validation = { - 'run_id': {'required': True}, - } - - _attribute_map = { - 'run_id': {'key': 'runId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CreateRunResponse, self).__init__(**kwargs) - self.run_id = kwargs.get('run_id', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/create_run_response_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/create_run_response_py3.py deleted file mode 100644 index bb280441ae90..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/create_run_response_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CreateRunResponse(Model): - """Response body with a run identifier. - - All required parameters must be populated in order to send to Azure. - - :param run_id: Required. Identifier of a run. - :type run_id: str - """ - - _validation = { - 'run_id': {'required': True}, - } - - _attribute_map = { - 'run_id': {'key': 'runId', 'type': 'str'}, - } - - def __init__(self, *, run_id: str, **kwargs) -> None: - super(CreateRunResponse, self).__init__(**kwargs) - self.run_id = run_id diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/custom_activity.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/custom_activity.py deleted file mode 100644 index f7eceb72ff3b..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/custom_activity.py +++ /dev/null @@ -1,86 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity import ExecutionActivity - - -class CustomActivity(ExecutionActivity): - """Custom activity type. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param command: Required. Command for custom activity Type: string (or - Expression with resultType string). - :type command: object - :param resource_linked_service: Resource linked service reference. - :type resource_linked_service: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param folder_path: Folder path for resource files Type: string (or - Expression with resultType string). - :type folder_path: object - :param reference_objects: Reference objects - :type reference_objects: - ~azure.mgmt.datafactory.models.CustomActivityReferenceObject - :param extended_properties: User defined property bag. There is no - restriction on the keys or values that can be used. The user specified - custom activity has the full responsibility to consume and interpret the - content defined. - :type extended_properties: dict[str, object] - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'command': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'command': {'key': 'typeProperties.command', 'type': 'object'}, - 'resource_linked_service': {'key': 'typeProperties.resourceLinkedService', 'type': 'LinkedServiceReference'}, - 'folder_path': {'key': 'typeProperties.folderPath', 'type': 'object'}, - 'reference_objects': {'key': 'typeProperties.referenceObjects', 'type': 'CustomActivityReferenceObject'}, - 'extended_properties': {'key': 'typeProperties.extendedProperties', 'type': '{object}'}, - } - - def __init__(self, **kwargs): - super(CustomActivity, self).__init__(**kwargs) - self.command = kwargs.get('command', None) - self.resource_linked_service = kwargs.get('resource_linked_service', None) - self.folder_path = kwargs.get('folder_path', None) - self.reference_objects = kwargs.get('reference_objects', None) - self.extended_properties = kwargs.get('extended_properties', None) - self.type = 'Custom' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/custom_activity_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/custom_activity_py3.py deleted file mode 100644 index b82ac57bca4d..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/custom_activity_py3.py +++ /dev/null @@ -1,86 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity_py3 import ExecutionActivity - - -class CustomActivity(ExecutionActivity): - """Custom activity type. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param command: Required. Command for custom activity Type: string (or - Expression with resultType string). - :type command: object - :param resource_linked_service: Resource linked service reference. - :type resource_linked_service: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param folder_path: Folder path for resource files Type: string (or - Expression with resultType string). - :type folder_path: object - :param reference_objects: Reference objects - :type reference_objects: - ~azure.mgmt.datafactory.models.CustomActivityReferenceObject - :param extended_properties: User defined property bag. There is no - restriction on the keys or values that can be used. The user specified - custom activity has the full responsibility to consume and interpret the - content defined. - :type extended_properties: dict[str, object] - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'command': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'command': {'key': 'typeProperties.command', 'type': 'object'}, - 'resource_linked_service': {'key': 'typeProperties.resourceLinkedService', 'type': 'LinkedServiceReference'}, - 'folder_path': {'key': 'typeProperties.folderPath', 'type': 'object'}, - 'reference_objects': {'key': 'typeProperties.referenceObjects', 'type': 'CustomActivityReferenceObject'}, - 'extended_properties': {'key': 'typeProperties.extendedProperties', 'type': '{object}'}, - } - - def __init__(self, *, name: str, command, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, resource_linked_service=None, folder_path=None, reference_objects=None, extended_properties=None, **kwargs) -> None: - super(CustomActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) - self.command = command - self.resource_linked_service = resource_linked_service - self.folder_path = folder_path - self.reference_objects = reference_objects - self.extended_properties = extended_properties - self.type = 'Custom' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/custom_activity_reference_object.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/custom_activity_reference_object.py deleted file mode 100644 index 5f95a54612dd..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/custom_activity_reference_object.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomActivityReferenceObject(Model): - """Reference objects for custom activity. - - :param linked_services: Linked service references. - :type linked_services: - list[~azure.mgmt.datafactory.models.LinkedServiceReference] - :param datasets: Dataset references. - :type datasets: list[~azure.mgmt.datafactory.models.DatasetReference] - """ - - _attribute_map = { - 'linked_services': {'key': 'linkedServices', 'type': '[LinkedServiceReference]'}, - 'datasets': {'key': 'datasets', 'type': '[DatasetReference]'}, - } - - def __init__(self, **kwargs): - super(CustomActivityReferenceObject, self).__init__(**kwargs) - self.linked_services = kwargs.get('linked_services', None) - self.datasets = kwargs.get('datasets', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/custom_activity_reference_object_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/custom_activity_reference_object_py3.py deleted file mode 100644 index f860f0141bd0..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/custom_activity_reference_object_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CustomActivityReferenceObject(Model): - """Reference objects for custom activity. - - :param linked_services: Linked service references. - :type linked_services: - list[~azure.mgmt.datafactory.models.LinkedServiceReference] - :param datasets: Dataset references. - :type datasets: list[~azure.mgmt.datafactory.models.DatasetReference] - """ - - _attribute_map = { - 'linked_services': {'key': 'linkedServices', 'type': '[LinkedServiceReference]'}, - 'datasets': {'key': 'datasets', 'type': '[DatasetReference]'}, - } - - def __init__(self, *, linked_services=None, datasets=None, **kwargs) -> None: - super(CustomActivityReferenceObject, self).__init__(**kwargs) - self.linked_services = linked_services - self.datasets = datasets diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/custom_data_source_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/custom_data_source_linked_service.py deleted file mode 100644 index 4bc3a2863fc3..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/custom_data_source_linked_service.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class CustomDataSourceLinkedService(LinkedService): - """Custom linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param type_properties: Required. Custom linked service properties. - :type type_properties: object - """ - - _validation = { - 'type': {'required': True}, - 'type_properties': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'type_properties': {'key': 'typeProperties', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(CustomDataSourceLinkedService, self).__init__(**kwargs) - self.type_properties = kwargs.get('type_properties', None) - self.type = 'CustomDataSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/custom_data_source_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/custom_data_source_linked_service_py3.py deleted file mode 100644 index 2ec05f7a32d9..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/custom_data_source_linked_service_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class CustomDataSourceLinkedService(LinkedService): - """Custom linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param type_properties: Required. Custom linked service properties. - :type type_properties: object - """ - - _validation = { - 'type': {'required': True}, - 'type_properties': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'type_properties': {'key': 'typeProperties', 'type': 'object'}, - } - - def __init__(self, *, type_properties, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, **kwargs) -> None: - super(CustomDataSourceLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.type_properties = type_properties - self.type = 'CustomDataSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/custom_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/custom_dataset.py deleted file mode 100644 index 8a6a8ac662a8..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/custom_dataset.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class CustomDataset(Dataset): - """The custom dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param type_properties: Required. Custom dataset properties. - :type type_properties: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - 'type_properties': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'type_properties': {'key': 'typeProperties', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(CustomDataset, self).__init__(**kwargs) - self.type_properties = kwargs.get('type_properties', None) - self.type = 'CustomDataset' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/custom_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/custom_dataset_py3.py deleted file mode 100644 index da681e8360b8..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/custom_dataset_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class CustomDataset(Dataset): - """The custom dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param type_properties: Required. Custom dataset properties. - :type type_properties: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - 'type_properties': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'type_properties': {'key': 'typeProperties', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, type_properties, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, **kwargs) -> None: - super(CustomDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.type_properties = type_properties - self.type = 'CustomDataset' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/data_factory_management_client_enums.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/data_factory_management_client_enums.py deleted file mode 100644 index 2992964b1799..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/data_factory_management_client_enums.py +++ /dev/null @@ -1,468 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class IntegrationRuntimeState(str, Enum): - - initial = "Initial" - stopped = "Stopped" - started = "Started" - starting = "Starting" - stopping = "Stopping" - need_registration = "NeedRegistration" - online = "Online" - limited = "Limited" - offline = "Offline" - access_denied = "AccessDenied" - - -class IntegrationRuntimeAutoUpdate(str, Enum): - - on = "On" - off = "Off" - - -class ParameterType(str, Enum): - - object_enum = "Object" - string = "String" - int_enum = "Int" - float_enum = "Float" - bool_enum = "Bool" - array = "Array" - secure_string = "SecureString" - - -class DependencyCondition(str, Enum): - - succeeded = "Succeeded" - failed = "Failed" - skipped = "Skipped" - completed = "Completed" - - -class VariableType(str, Enum): - - string = "String" - bool_enum = "Bool" - array = "Array" - - -class TriggerRuntimeState(str, Enum): - - started = "Started" - stopped = "Stopped" - disabled = "Disabled" - - -class RunQueryFilterOperand(str, Enum): - - pipeline_name = "PipelineName" - status = "Status" - run_start = "RunStart" - run_end = "RunEnd" - activity_name = "ActivityName" - activity_run_start = "ActivityRunStart" - activity_run_end = "ActivityRunEnd" - activity_type = "ActivityType" - trigger_name = "TriggerName" - trigger_run_timestamp = "TriggerRunTimestamp" - - -class RunQueryFilterOperator(str, Enum): - - equals = "Equals" - not_equals = "NotEquals" - in_enum = "In" - not_in = "NotIn" - - -class RunQueryOrderByField(str, Enum): - - run_start = "RunStart" - run_end = "RunEnd" - pipeline_name = "PipelineName" - status = "Status" - activity_name = "ActivityName" - activity_run_start = "ActivityRunStart" - activity_run_end = "ActivityRunEnd" - trigger_name = "TriggerName" - trigger_run_timestamp = "TriggerRunTimestamp" - - -class RunQueryOrder(str, Enum): - - asc = "ASC" - desc = "DESC" - - -class TriggerRunStatus(str, Enum): - - succeeded = "Succeeded" - failed = "Failed" - inprogress = "Inprogress" - - -class TumblingWindowFrequency(str, Enum): - - minute = "Minute" - hour = "Hour" - - -class BlobEventTypes(str, Enum): - - microsoft_storage_blob_created = "Microsoft.Storage.BlobCreated" - microsoft_storage_blob_deleted = "Microsoft.Storage.BlobDeleted" - - -class DayOfWeek(str, Enum): - - sunday = "Sunday" - monday = "Monday" - tuesday = "Tuesday" - wednesday = "Wednesday" - thursday = "Thursday" - friday = "Friday" - saturday = "Saturday" - - -class DaysOfWeek(str, Enum): - - sunday = "Sunday" - monday = "Monday" - tuesday = "Tuesday" - wednesday = "Wednesday" - thursday = "Thursday" - friday = "Friday" - saturday = "Saturday" - - -class RecurrenceFrequency(str, Enum): - - not_specified = "NotSpecified" - minute = "Minute" - hour = "Hour" - day = "Day" - week = "Week" - month = "Month" - year = "Year" - - -class SparkServerType(str, Enum): - - shark_server = "SharkServer" - shark_server2 = "SharkServer2" - spark_thrift_server = "SparkThriftServer" - - -class SparkThriftTransportProtocol(str, Enum): - - binary = "Binary" - sasl = "SASL" - http = "HTTP " - - -class SparkAuthenticationType(str, Enum): - - anonymous = "Anonymous" - username = "Username" - username_and_password = "UsernameAndPassword" - windows_azure_hd_insight_service = "WindowsAzureHDInsightService" - - -class ServiceNowAuthenticationType(str, Enum): - - basic = "Basic" - oauth2 = "OAuth2" - - -class PrestoAuthenticationType(str, Enum): - - anonymous = "Anonymous" - ldap = "LDAP" - - -class PhoenixAuthenticationType(str, Enum): - - anonymous = "Anonymous" - username_and_password = "UsernameAndPassword" - windows_azure_hd_insight_service = "WindowsAzureHDInsightService" - - -class ImpalaAuthenticationType(str, Enum): - - anonymous = "Anonymous" - sasl_username = "SASLUsername" - username_and_password = "UsernameAndPassword" - - -class HiveServerType(str, Enum): - - hive_server1 = "HiveServer1" - hive_server2 = "HiveServer2" - hive_thrift_server = "HiveThriftServer" - - -class HiveThriftTransportProtocol(str, Enum): - - binary = "Binary" - sasl = "SASL" - http = "HTTP " - - -class HiveAuthenticationType(str, Enum): - - anonymous = "Anonymous" - username = "Username" - username_and_password = "UsernameAndPassword" - windows_azure_hd_insight_service = "WindowsAzureHDInsightService" - - -class HBaseAuthenticationType(str, Enum): - - anonymous = "Anonymous" - basic = "Basic" - - -class GoogleBigQueryAuthenticationType(str, Enum): - - service_authentication = "ServiceAuthentication" - user_authentication = "UserAuthentication" - - -class SapHanaAuthenticationType(str, Enum): - - basic = "Basic" - windows = "Windows" - - -class SftpAuthenticationType(str, Enum): - - basic = "Basic" - ssh_public_key = "SshPublicKey" - - -class FtpAuthenticationType(str, Enum): - - basic = "Basic" - anonymous = "Anonymous" - - -class HttpAuthenticationType(str, Enum): - - basic = "Basic" - anonymous = "Anonymous" - digest = "Digest" - windows = "Windows" - client_certificate = "ClientCertificate" - - -class MongoDbAuthenticationType(str, Enum): - - basic = "Basic" - anonymous = "Anonymous" - - -class ODataAuthenticationType(str, Enum): - - basic = "Basic" - anonymous = "Anonymous" - - -class TeradataAuthenticationType(str, Enum): - - basic = "Basic" - windows = "Windows" - - -class Db2AuthenticationType(str, Enum): - - basic = "Basic" - - -class SybaseAuthenticationType(str, Enum): - - basic = "Basic" - windows = "Windows" - - -class DatasetCompressionLevel(str, Enum): - - optimal = "Optimal" - fastest = "Fastest" - - -class JsonFormatFilePattern(str, Enum): - - set_of_objects = "setOfObjects" - array_of_objects = "arrayOfObjects" - - -class AzureFunctionActivityMethod(str, Enum): - - get = "GET" - post = "POST" - put = "PUT" - delete = "DELETE" - options = "OPTIONS" - head = "HEAD" - trace = "TRACE" - - -class WebActivityMethod(str, Enum): - - get = "GET" - post = "POST" - put = "PUT" - delete = "DELETE" - - -class CassandraSourceReadConsistencyLevels(str, Enum): - - all = "ALL" - each_quorum = "EACH_QUORUM" - quorum = "QUORUM" - local_quorum = "LOCAL_QUORUM" - one = "ONE" - two = "TWO" - three = "THREE" - local_one = "LOCAL_ONE" - serial = "SERIAL" - local_serial = "LOCAL_SERIAL" - - -class StoredProcedureParameterType(str, Enum): - - string = "String" - int_enum = "Int" - decimal_enum = "Decimal" - guid = "Guid" - boolean = "Boolean" - date_enum = "Date" - - -class SalesforceSourceReadBehavior(str, Enum): - - query = "Query" - query_all = "QueryAll" - - -class HDInsightActivityDebugInfoOption(str, Enum): - - none = "None" - always = "Always" - failure = "Failure" - - -class SalesforceSinkWriteBehavior(str, Enum): - - insert = "Insert" - upsert = "Upsert" - - -class AzureSearchIndexWriteBehaviorType(str, Enum): - - merge = "Merge" - upload = "Upload" - - -class CopyBehaviorType(str, Enum): - - preserve_hierarchy = "PreserveHierarchy" - flatten_hierarchy = "FlattenHierarchy" - merge_files = "MergeFiles" - - -class PolybaseSettingsRejectType(str, Enum): - - value = "value" - percentage = "percentage" - - -class SapCloudForCustomerSinkWriteBehavior(str, Enum): - - insert = "Insert" - update = "Update" - - -class IntegrationRuntimeType(str, Enum): - - managed = "Managed" - self_hosted = "SelfHosted" - - -class SelfHostedIntegrationRuntimeNodeStatus(str, Enum): - - need_registration = "NeedRegistration" - online = "Online" - limited = "Limited" - offline = "Offline" - upgrading = "Upgrading" - initializing = "Initializing" - initialize_failed = "InitializeFailed" - - -class IntegrationRuntimeUpdateResult(str, Enum): - - none = "None" - succeed = "Succeed" - fail = "Fail" - - -class IntegrationRuntimeInternalChannelEncryptionMode(str, Enum): - - not_set = "NotSet" - ssl_encrypted = "SslEncrypted" - not_encrypted = "NotEncrypted" - - -class ManagedIntegrationRuntimeNodeStatus(str, Enum): - - starting = "Starting" - available = "Available" - recycling = "Recycling" - unavailable = "Unavailable" - - -class IntegrationRuntimeSsisCatalogPricingTier(str, Enum): - - basic = "Basic" - standard = "Standard" - premium = "Premium" - premium_rs = "PremiumRS" - - -class IntegrationRuntimeLicenseType(str, Enum): - - base_price = "BasePrice" - license_included = "LicenseIncluded" - - -class IntegrationRuntimeEdition(str, Enum): - - standard = "Standard" - enterprise = "Enterprise" - - -class SsisObjectMetadataType(str, Enum): - - folder = "Folder" - project = "Project" - package = "Package" - environment = "Environment" - - -class IntegrationRuntimeAuthKeyName(str, Enum): - - auth_key1 = "authKey1" - auth_key2 = "authKey2" diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/data_lake_analytics_usql_activity.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/data_lake_analytics_usql_activity.py deleted file mode 100644 index 364dfd79d71a..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/data_lake_analytics_usql_activity.py +++ /dev/null @@ -1,98 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity import ExecutionActivity - - -class DataLakeAnalyticsUSQLActivity(ExecutionActivity): - """Data Lake Analytics U-SQL activity. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param script_path: Required. Case-sensitive path to folder that contains - the U-SQL script. Type: string (or Expression with resultType string). - :type script_path: object - :param script_linked_service: Required. Script linked service reference. - :type script_linked_service: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param degree_of_parallelism: The maximum number of nodes simultaneously - used to run the job. Default value is 1. Type: integer (or Expression with - resultType integer), minimum: 1. - :type degree_of_parallelism: object - :param priority: Determines which jobs out of all that are queued should - be selected to run first. The lower the number, the higher the priority. - Default value is 1000. Type: integer (or Expression with resultType - integer), minimum: 1. - :type priority: object - :param parameters: Parameters for U-SQL job request. - :type parameters: dict[str, object] - :param runtime_version: Runtime version of the U-SQL engine to use. Type: - string (or Expression with resultType string). - :type runtime_version: object - :param compilation_mode: Compilation mode of U-SQL. Must be one of these - values : Semantic, Full and SingleBox. Type: string (or Expression with - resultType string). - :type compilation_mode: object - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'script_path': {'required': True}, - 'script_linked_service': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'script_path': {'key': 'typeProperties.scriptPath', 'type': 'object'}, - 'script_linked_service': {'key': 'typeProperties.scriptLinkedService', 'type': 'LinkedServiceReference'}, - 'degree_of_parallelism': {'key': 'typeProperties.degreeOfParallelism', 'type': 'object'}, - 'priority': {'key': 'typeProperties.priority', 'type': 'object'}, - 'parameters': {'key': 'typeProperties.parameters', 'type': '{object}'}, - 'runtime_version': {'key': 'typeProperties.runtimeVersion', 'type': 'object'}, - 'compilation_mode': {'key': 'typeProperties.compilationMode', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(DataLakeAnalyticsUSQLActivity, self).__init__(**kwargs) - self.script_path = kwargs.get('script_path', None) - self.script_linked_service = kwargs.get('script_linked_service', None) - self.degree_of_parallelism = kwargs.get('degree_of_parallelism', None) - self.priority = kwargs.get('priority', None) - self.parameters = kwargs.get('parameters', None) - self.runtime_version = kwargs.get('runtime_version', None) - self.compilation_mode = kwargs.get('compilation_mode', None) - self.type = 'DataLakeAnalyticsU-SQL' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/data_lake_analytics_usql_activity_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/data_lake_analytics_usql_activity_py3.py deleted file mode 100644 index 22623aa3622c..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/data_lake_analytics_usql_activity_py3.py +++ /dev/null @@ -1,98 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity_py3 import ExecutionActivity - - -class DataLakeAnalyticsUSQLActivity(ExecutionActivity): - """Data Lake Analytics U-SQL activity. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param script_path: Required. Case-sensitive path to folder that contains - the U-SQL script. Type: string (or Expression with resultType string). - :type script_path: object - :param script_linked_service: Required. Script linked service reference. - :type script_linked_service: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param degree_of_parallelism: The maximum number of nodes simultaneously - used to run the job. Default value is 1. Type: integer (or Expression with - resultType integer), minimum: 1. - :type degree_of_parallelism: object - :param priority: Determines which jobs out of all that are queued should - be selected to run first. The lower the number, the higher the priority. - Default value is 1000. Type: integer (or Expression with resultType - integer), minimum: 1. - :type priority: object - :param parameters: Parameters for U-SQL job request. - :type parameters: dict[str, object] - :param runtime_version: Runtime version of the U-SQL engine to use. Type: - string (or Expression with resultType string). - :type runtime_version: object - :param compilation_mode: Compilation mode of U-SQL. Must be one of these - values : Semantic, Full and SingleBox. Type: string (or Expression with - resultType string). - :type compilation_mode: object - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'script_path': {'required': True}, - 'script_linked_service': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'script_path': {'key': 'typeProperties.scriptPath', 'type': 'object'}, - 'script_linked_service': {'key': 'typeProperties.scriptLinkedService', 'type': 'LinkedServiceReference'}, - 'degree_of_parallelism': {'key': 'typeProperties.degreeOfParallelism', 'type': 'object'}, - 'priority': {'key': 'typeProperties.priority', 'type': 'object'}, - 'parameters': {'key': 'typeProperties.parameters', 'type': '{object}'}, - 'runtime_version': {'key': 'typeProperties.runtimeVersion', 'type': 'object'}, - 'compilation_mode': {'key': 'typeProperties.compilationMode', 'type': 'object'}, - } - - def __init__(self, *, name: str, script_path, script_linked_service, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, degree_of_parallelism=None, priority=None, parameters=None, runtime_version=None, compilation_mode=None, **kwargs) -> None: - super(DataLakeAnalyticsUSQLActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) - self.script_path = script_path - self.script_linked_service = script_linked_service - self.degree_of_parallelism = degree_of_parallelism - self.priority = priority - self.parameters = parameters - self.runtime_version = runtime_version - self.compilation_mode = compilation_mode - self.type = 'DataLakeAnalyticsU-SQL' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/databricks_notebook_activity.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/databricks_notebook_activity.py deleted file mode 100644 index a49bd973e2b9..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/databricks_notebook_activity.py +++ /dev/null @@ -1,76 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity import ExecutionActivity - - -class DatabricksNotebookActivity(ExecutionActivity): - """DatabricksNotebook activity. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param notebook_path: Required. The absolute path of the notebook to be - run in the Databricks Workspace. This path must begin with a slash. Type: - string (or Expression with resultType string). - :type notebook_path: object - :param base_parameters: Base parameters to be used for each run of this - job.If the notebook takes a parameter that is not specified, the default - value from the notebook will be used. - :type base_parameters: dict[str, object] - :param libraries: A list of libraries to be installed on the cluster that - will execute the job. - :type libraries: list[dict[str, object]] - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'notebook_path': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'notebook_path': {'key': 'typeProperties.notebookPath', 'type': 'object'}, - 'base_parameters': {'key': 'typeProperties.baseParameters', 'type': '{object}'}, - 'libraries': {'key': 'typeProperties.libraries', 'type': '[{object}]'}, - } - - def __init__(self, **kwargs): - super(DatabricksNotebookActivity, self).__init__(**kwargs) - self.notebook_path = kwargs.get('notebook_path', None) - self.base_parameters = kwargs.get('base_parameters', None) - self.libraries = kwargs.get('libraries', None) - self.type = 'DatabricksNotebook' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/databricks_notebook_activity_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/databricks_notebook_activity_py3.py deleted file mode 100644 index 7d2d464b7a1a..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/databricks_notebook_activity_py3.py +++ /dev/null @@ -1,76 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity_py3 import ExecutionActivity - - -class DatabricksNotebookActivity(ExecutionActivity): - """DatabricksNotebook activity. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param notebook_path: Required. The absolute path of the notebook to be - run in the Databricks Workspace. This path must begin with a slash. Type: - string (or Expression with resultType string). - :type notebook_path: object - :param base_parameters: Base parameters to be used for each run of this - job.If the notebook takes a parameter that is not specified, the default - value from the notebook will be used. - :type base_parameters: dict[str, object] - :param libraries: A list of libraries to be installed on the cluster that - will execute the job. - :type libraries: list[dict[str, object]] - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'notebook_path': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'notebook_path': {'key': 'typeProperties.notebookPath', 'type': 'object'}, - 'base_parameters': {'key': 'typeProperties.baseParameters', 'type': '{object}'}, - 'libraries': {'key': 'typeProperties.libraries', 'type': '[{object}]'}, - } - - def __init__(self, *, name: str, notebook_path, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, base_parameters=None, libraries=None, **kwargs) -> None: - super(DatabricksNotebookActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) - self.notebook_path = notebook_path - self.base_parameters = base_parameters - self.libraries = libraries - self.type = 'DatabricksNotebook' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/databricks_spark_jar_activity.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/databricks_spark_jar_activity.py deleted file mode 100644 index 51e7245d12fe..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/databricks_spark_jar_activity.py +++ /dev/null @@ -1,75 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity import ExecutionActivity - - -class DatabricksSparkJarActivity(ExecutionActivity): - """DatabricksSparkJar activity. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param main_class_name: Required. The full name of the class containing - the main method to be executed. This class must be contained in a JAR - provided as a library. Type: string (or Expression with resultType - string). - :type main_class_name: object - :param parameters: Parameters that will be passed to the main method. - :type parameters: list[object] - :param libraries: A list of libraries to be installed on the cluster that - will execute the job. - :type libraries: list[dict[str, object]] - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'main_class_name': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'main_class_name': {'key': 'typeProperties.mainClassName', 'type': 'object'}, - 'parameters': {'key': 'typeProperties.parameters', 'type': '[object]'}, - 'libraries': {'key': 'typeProperties.libraries', 'type': '[{object}]'}, - } - - def __init__(self, **kwargs): - super(DatabricksSparkJarActivity, self).__init__(**kwargs) - self.main_class_name = kwargs.get('main_class_name', None) - self.parameters = kwargs.get('parameters', None) - self.libraries = kwargs.get('libraries', None) - self.type = 'DatabricksSparkJar' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/databricks_spark_jar_activity_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/databricks_spark_jar_activity_py3.py deleted file mode 100644 index 6c33f3b51d1e..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/databricks_spark_jar_activity_py3.py +++ /dev/null @@ -1,75 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity_py3 import ExecutionActivity - - -class DatabricksSparkJarActivity(ExecutionActivity): - """DatabricksSparkJar activity. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param main_class_name: Required. The full name of the class containing - the main method to be executed. This class must be contained in a JAR - provided as a library. Type: string (or Expression with resultType - string). - :type main_class_name: object - :param parameters: Parameters that will be passed to the main method. - :type parameters: list[object] - :param libraries: A list of libraries to be installed on the cluster that - will execute the job. - :type libraries: list[dict[str, object]] - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'main_class_name': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'main_class_name': {'key': 'typeProperties.mainClassName', 'type': 'object'}, - 'parameters': {'key': 'typeProperties.parameters', 'type': '[object]'}, - 'libraries': {'key': 'typeProperties.libraries', 'type': '[{object}]'}, - } - - def __init__(self, *, name: str, main_class_name, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, parameters=None, libraries=None, **kwargs) -> None: - super(DatabricksSparkJarActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) - self.main_class_name = main_class_name - self.parameters = parameters - self.libraries = libraries - self.type = 'DatabricksSparkJar' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/databricks_spark_python_activity.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/databricks_spark_python_activity.py deleted file mode 100644 index 56178d3882c5..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/databricks_spark_python_activity.py +++ /dev/null @@ -1,75 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity import ExecutionActivity - - -class DatabricksSparkPythonActivity(ExecutionActivity): - """DatabricksSparkPython activity. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param python_file: Required. The URI of the Python file to be executed. - DBFS paths are supported. Type: string (or Expression with resultType - string). - :type python_file: object - :param parameters: Command line parameters that will be passed to the - Python file. - :type parameters: list[object] - :param libraries: A list of libraries to be installed on the cluster that - will execute the job. - :type libraries: list[dict[str, object]] - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'python_file': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'python_file': {'key': 'typeProperties.pythonFile', 'type': 'object'}, - 'parameters': {'key': 'typeProperties.parameters', 'type': '[object]'}, - 'libraries': {'key': 'typeProperties.libraries', 'type': '[{object}]'}, - } - - def __init__(self, **kwargs): - super(DatabricksSparkPythonActivity, self).__init__(**kwargs) - self.python_file = kwargs.get('python_file', None) - self.parameters = kwargs.get('parameters', None) - self.libraries = kwargs.get('libraries', None) - self.type = 'DatabricksSparkPython' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/databricks_spark_python_activity_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/databricks_spark_python_activity_py3.py deleted file mode 100644 index 5b16d0d5e9ef..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/databricks_spark_python_activity_py3.py +++ /dev/null @@ -1,75 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity_py3 import ExecutionActivity - - -class DatabricksSparkPythonActivity(ExecutionActivity): - """DatabricksSparkPython activity. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param python_file: Required. The URI of the Python file to be executed. - DBFS paths are supported. Type: string (or Expression with resultType - string). - :type python_file: object - :param parameters: Command line parameters that will be passed to the - Python file. - :type parameters: list[object] - :param libraries: A list of libraries to be installed on the cluster that - will execute the job. - :type libraries: list[dict[str, object]] - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'python_file': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'python_file': {'key': 'typeProperties.pythonFile', 'type': 'object'}, - 'parameters': {'key': 'typeProperties.parameters', 'type': '[object]'}, - 'libraries': {'key': 'typeProperties.libraries', 'type': '[{object}]'}, - } - - def __init__(self, *, name: str, python_file, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, parameters=None, libraries=None, **kwargs) -> None: - super(DatabricksSparkPythonActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) - self.python_file = python_file - self.parameters = parameters - self.libraries = libraries - self.type = 'DatabricksSparkPython' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset.py deleted file mode 100644 index de812815bd26..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset.py +++ /dev/null @@ -1,102 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Dataset(Model): - """The Azure Data Factory nested object which identifies data within different - data stores, such as tables, files, folders, and documents. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ResponsysObjectDataset, - SalesforceMarketingCloudObjectDataset, VerticaTableDataset, - NetezzaTableDataset, ZohoObjectDataset, XeroObjectDataset, - SquareObjectDataset, SparkObjectDataset, ShopifyObjectDataset, - ServiceNowObjectDataset, QuickBooksObjectDataset, PrestoObjectDataset, - PhoenixObjectDataset, PaypalObjectDataset, MarketoObjectDataset, - MariaDBTableDataset, MagentoObjectDataset, JiraObjectDataset, - ImpalaObjectDataset, HubspotObjectDataset, HiveObjectDataset, - HBaseObjectDataset, GreenplumTableDataset, GoogleBigQueryObjectDataset, - EloquaObjectDataset, DrillTableDataset, CouchbaseTableDataset, - ConcurObjectDataset, AzurePostgreSqlTableDataset, AmazonMWSObjectDataset, - HttpDataset, AzureSearchIndexDataset, WebTableDataset, - SqlServerTableDataset, SapEccResourceDataset, - SapCloudForCustomerResourceDataset, SalesforceObjectDataset, - RelationalTableDataset, AzureMySqlTableDataset, OracleTableDataset, - ODataResourceDataset, MongoDbCollectionDataset, FileShareDataset, - AzureDataLakeStoreDataset, DynamicsEntityDataset, - DocumentDbCollectionDataset, CustomDataset, CassandraTableDataset, - AzureSqlDWTableDataset, AzureSqlTableDataset, AzureTableDataset, - AzureBlobDataset, AmazonS3Dataset - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'ResponsysObject': 'ResponsysObjectDataset', 'SalesforceMarketingCloudObject': 'SalesforceMarketingCloudObjectDataset', 'VerticaTable': 'VerticaTableDataset', 'NetezzaTable': 'NetezzaTableDataset', 'ZohoObject': 'ZohoObjectDataset', 'XeroObject': 'XeroObjectDataset', 'SquareObject': 'SquareObjectDataset', 'SparkObject': 'SparkObjectDataset', 'ShopifyObject': 'ShopifyObjectDataset', 'ServiceNowObject': 'ServiceNowObjectDataset', 'QuickBooksObject': 'QuickBooksObjectDataset', 'PrestoObject': 'PrestoObjectDataset', 'PhoenixObject': 'PhoenixObjectDataset', 'PaypalObject': 'PaypalObjectDataset', 'MarketoObject': 'MarketoObjectDataset', 'MariaDBTable': 'MariaDBTableDataset', 'MagentoObject': 'MagentoObjectDataset', 'JiraObject': 'JiraObjectDataset', 'ImpalaObject': 'ImpalaObjectDataset', 'HubspotObject': 'HubspotObjectDataset', 'HiveObject': 'HiveObjectDataset', 'HBaseObject': 'HBaseObjectDataset', 'GreenplumTable': 'GreenplumTableDataset', 'GoogleBigQueryObject': 'GoogleBigQueryObjectDataset', 'EloquaObject': 'EloquaObjectDataset', 'DrillTable': 'DrillTableDataset', 'CouchbaseTable': 'CouchbaseTableDataset', 'ConcurObject': 'ConcurObjectDataset', 'AzurePostgreSqlTable': 'AzurePostgreSqlTableDataset', 'AmazonMWSObject': 'AmazonMWSObjectDataset', 'HttpFile': 'HttpDataset', 'AzureSearchIndex': 'AzureSearchIndexDataset', 'WebTable': 'WebTableDataset', 'SqlServerTable': 'SqlServerTableDataset', 'SapEccResource': 'SapEccResourceDataset', 'SapCloudForCustomerResource': 'SapCloudForCustomerResourceDataset', 'SalesforceObject': 'SalesforceObjectDataset', 'RelationalTable': 'RelationalTableDataset', 'AzureMySqlTable': 'AzureMySqlTableDataset', 'OracleTable': 'OracleTableDataset', 'ODataResource': 'ODataResourceDataset', 'MongoDbCollection': 'MongoDbCollectionDataset', 'FileShare': 'FileShareDataset', 'AzureDataLakeStoreFile': 'AzureDataLakeStoreDataset', 'DynamicsEntity': 'DynamicsEntityDataset', 'DocumentDbCollection': 'DocumentDbCollectionDataset', 'CustomDataset': 'CustomDataset', 'CassandraTable': 'CassandraTableDataset', 'AzureSqlDWTable': 'AzureSqlDWTableDataset', 'AzureSqlTable': 'AzureSqlTableDataset', 'AzureTable': 'AzureTableDataset', 'AzureBlob': 'AzureBlobDataset', 'AmazonS3Object': 'AmazonS3Dataset'} - } - - def __init__(self, **kwargs): - super(Dataset, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.description = kwargs.get('description', None) - self.structure = kwargs.get('structure', None) - self.schema = kwargs.get('schema', None) - self.linked_service_name = kwargs.get('linked_service_name', None) - self.parameters = kwargs.get('parameters', None) - self.annotations = kwargs.get('annotations', None) - self.folder = kwargs.get('folder', None) - self.type = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_bzip2_compression.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_bzip2_compression.py deleted file mode 100644 index 71b041c5eb5b..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_bzip2_compression.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_compression import DatasetCompression - - -class DatasetBZip2Compression(DatasetCompression): - """The BZip2 compression method used on a dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DatasetBZip2Compression, self).__init__(**kwargs) - self.type = 'BZip2' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_bzip2_compression_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_bzip2_compression_py3.py deleted file mode 100644 index f97af4588e0a..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_bzip2_compression_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_compression_py3 import DatasetCompression - - -class DatasetBZip2Compression(DatasetCompression): - """The BZip2 compression method used on a dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, **kwargs) -> None: - super(DatasetBZip2Compression, self).__init__(additional_properties=additional_properties, **kwargs) - self.type = 'BZip2' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_compression.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_compression.py deleted file mode 100644 index c0c4e3d52624..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_compression.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatasetCompression(Model): - """The compression method used on a dataset. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DatasetZipDeflateCompression, DatasetDeflateCompression, - DatasetGZipCompression, DatasetBZip2Compression - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'ZipDeflate': 'DatasetZipDeflateCompression', 'Deflate': 'DatasetDeflateCompression', 'GZip': 'DatasetGZipCompression', 'BZip2': 'DatasetBZip2Compression'} - } - - def __init__(self, **kwargs): - super(DatasetCompression, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.type = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_compression_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_compression_py3.py deleted file mode 100644 index 3b10abc69abf..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_compression_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatasetCompression(Model): - """The compression method used on a dataset. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DatasetZipDeflateCompression, DatasetDeflateCompression, - DatasetGZipCompression, DatasetBZip2Compression - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'ZipDeflate': 'DatasetZipDeflateCompression', 'Deflate': 'DatasetDeflateCompression', 'GZip': 'DatasetGZipCompression', 'BZip2': 'DatasetBZip2Compression'} - } - - def __init__(self, *, additional_properties=None, **kwargs) -> None: - super(DatasetCompression, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.type = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_deflate_compression.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_deflate_compression.py deleted file mode 100644 index c16c0611b364..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_deflate_compression.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_compression import DatasetCompression - - -class DatasetDeflateCompression(DatasetCompression): - """The Deflate compression method used on a dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param type: Required. Constant filled by server. - :type type: str - :param level: The Deflate compression level. Possible values include: - 'Optimal', 'Fastest' - :type level: str or ~azure.mgmt.datafactory.models.DatasetCompressionLevel - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'type': {'key': 'type', 'type': 'str'}, - 'level': {'key': 'level', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DatasetDeflateCompression, self).__init__(**kwargs) - self.level = kwargs.get('level', None) - self.type = 'Deflate' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_deflate_compression_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_deflate_compression_py3.py deleted file mode 100644 index 715fe91a12a3..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_deflate_compression_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_compression_py3 import DatasetCompression - - -class DatasetDeflateCompression(DatasetCompression): - """The Deflate compression method used on a dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param type: Required. Constant filled by server. - :type type: str - :param level: The Deflate compression level. Possible values include: - 'Optimal', 'Fastest' - :type level: str or ~azure.mgmt.datafactory.models.DatasetCompressionLevel - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'type': {'key': 'type', 'type': 'str'}, - 'level': {'key': 'level', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, level=None, **kwargs) -> None: - super(DatasetDeflateCompression, self).__init__(additional_properties=additional_properties, **kwargs) - self.level = level - self.type = 'Deflate' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_folder.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_folder.py deleted file mode 100644 index 882c84a1e84c..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_folder.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatasetFolder(Model): - """The folder that this Dataset is in. If not specified, Dataset will appear - at the root level. - - :param name: The name of the folder that this Dataset is in. - :type name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DatasetFolder, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_folder_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_folder_py3.py deleted file mode 100644 index ea7fc313f967..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_folder_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatasetFolder(Model): - """The folder that this Dataset is in. If not specified, Dataset will appear - at the root level. - - :param name: The name of the folder that this Dataset is in. - :type name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, **kwargs) -> None: - super(DatasetFolder, self).__init__(**kwargs) - self.name = name diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_gzip_compression.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_gzip_compression.py deleted file mode 100644 index 48317d06f34e..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_gzip_compression.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_compression import DatasetCompression - - -class DatasetGZipCompression(DatasetCompression): - """The GZip compression method used on a dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param type: Required. Constant filled by server. - :type type: str - :param level: The GZip compression level. Possible values include: - 'Optimal', 'Fastest' - :type level: str or ~azure.mgmt.datafactory.models.DatasetCompressionLevel - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'type': {'key': 'type', 'type': 'str'}, - 'level': {'key': 'level', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DatasetGZipCompression, self).__init__(**kwargs) - self.level = kwargs.get('level', None) - self.type = 'GZip' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_gzip_compression_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_gzip_compression_py3.py deleted file mode 100644 index 99b1081469f8..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_gzip_compression_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_compression_py3 import DatasetCompression - - -class DatasetGZipCompression(DatasetCompression): - """The GZip compression method used on a dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param type: Required. Constant filled by server. - :type type: str - :param level: The GZip compression level. Possible values include: - 'Optimal', 'Fastest' - :type level: str or ~azure.mgmt.datafactory.models.DatasetCompressionLevel - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'type': {'key': 'type', 'type': 'str'}, - 'level': {'key': 'level', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, level=None, **kwargs) -> None: - super(DatasetGZipCompression, self).__init__(additional_properties=additional_properties, **kwargs) - self.level = level - self.type = 'GZip' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_py3.py deleted file mode 100644 index 9538e6105a8f..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_py3.py +++ /dev/null @@ -1,102 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Dataset(Model): - """The Azure Data Factory nested object which identifies data within different - data stores, such as tables, files, folders, and documents. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ResponsysObjectDataset, - SalesforceMarketingCloudObjectDataset, VerticaTableDataset, - NetezzaTableDataset, ZohoObjectDataset, XeroObjectDataset, - SquareObjectDataset, SparkObjectDataset, ShopifyObjectDataset, - ServiceNowObjectDataset, QuickBooksObjectDataset, PrestoObjectDataset, - PhoenixObjectDataset, PaypalObjectDataset, MarketoObjectDataset, - MariaDBTableDataset, MagentoObjectDataset, JiraObjectDataset, - ImpalaObjectDataset, HubspotObjectDataset, HiveObjectDataset, - HBaseObjectDataset, GreenplumTableDataset, GoogleBigQueryObjectDataset, - EloquaObjectDataset, DrillTableDataset, CouchbaseTableDataset, - ConcurObjectDataset, AzurePostgreSqlTableDataset, AmazonMWSObjectDataset, - HttpDataset, AzureSearchIndexDataset, WebTableDataset, - SqlServerTableDataset, SapEccResourceDataset, - SapCloudForCustomerResourceDataset, SalesforceObjectDataset, - RelationalTableDataset, AzureMySqlTableDataset, OracleTableDataset, - ODataResourceDataset, MongoDbCollectionDataset, FileShareDataset, - AzureDataLakeStoreDataset, DynamicsEntityDataset, - DocumentDbCollectionDataset, CustomDataset, CassandraTableDataset, - AzureSqlDWTableDataset, AzureSqlTableDataset, AzureTableDataset, - AzureBlobDataset, AmazonS3Dataset - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'ResponsysObject': 'ResponsysObjectDataset', 'SalesforceMarketingCloudObject': 'SalesforceMarketingCloudObjectDataset', 'VerticaTable': 'VerticaTableDataset', 'NetezzaTable': 'NetezzaTableDataset', 'ZohoObject': 'ZohoObjectDataset', 'XeroObject': 'XeroObjectDataset', 'SquareObject': 'SquareObjectDataset', 'SparkObject': 'SparkObjectDataset', 'ShopifyObject': 'ShopifyObjectDataset', 'ServiceNowObject': 'ServiceNowObjectDataset', 'QuickBooksObject': 'QuickBooksObjectDataset', 'PrestoObject': 'PrestoObjectDataset', 'PhoenixObject': 'PhoenixObjectDataset', 'PaypalObject': 'PaypalObjectDataset', 'MarketoObject': 'MarketoObjectDataset', 'MariaDBTable': 'MariaDBTableDataset', 'MagentoObject': 'MagentoObjectDataset', 'JiraObject': 'JiraObjectDataset', 'ImpalaObject': 'ImpalaObjectDataset', 'HubspotObject': 'HubspotObjectDataset', 'HiveObject': 'HiveObjectDataset', 'HBaseObject': 'HBaseObjectDataset', 'GreenplumTable': 'GreenplumTableDataset', 'GoogleBigQueryObject': 'GoogleBigQueryObjectDataset', 'EloquaObject': 'EloquaObjectDataset', 'DrillTable': 'DrillTableDataset', 'CouchbaseTable': 'CouchbaseTableDataset', 'ConcurObject': 'ConcurObjectDataset', 'AzurePostgreSqlTable': 'AzurePostgreSqlTableDataset', 'AmazonMWSObject': 'AmazonMWSObjectDataset', 'HttpFile': 'HttpDataset', 'AzureSearchIndex': 'AzureSearchIndexDataset', 'WebTable': 'WebTableDataset', 'SqlServerTable': 'SqlServerTableDataset', 'SapEccResource': 'SapEccResourceDataset', 'SapCloudForCustomerResource': 'SapCloudForCustomerResourceDataset', 'SalesforceObject': 'SalesforceObjectDataset', 'RelationalTable': 'RelationalTableDataset', 'AzureMySqlTable': 'AzureMySqlTableDataset', 'OracleTable': 'OracleTableDataset', 'ODataResource': 'ODataResourceDataset', 'MongoDbCollection': 'MongoDbCollectionDataset', 'FileShare': 'FileShareDataset', 'AzureDataLakeStoreFile': 'AzureDataLakeStoreDataset', 'DynamicsEntity': 'DynamicsEntityDataset', 'DocumentDbCollection': 'DocumentDbCollectionDataset', 'CustomDataset': 'CustomDataset', 'CassandraTable': 'CassandraTableDataset', 'AzureSqlDWTable': 'AzureSqlDWTableDataset', 'AzureSqlTable': 'AzureSqlTableDataset', 'AzureTable': 'AzureTableDataset', 'AzureBlob': 'AzureBlobDataset', 'AmazonS3Object': 'AmazonS3Dataset'} - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, **kwargs) -> None: - super(Dataset, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.description = description - self.structure = structure - self.schema = schema - self.linked_service_name = linked_service_name - self.parameters = parameters - self.annotations = annotations - self.folder = folder - self.type = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_reference.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_reference.py deleted file mode 100644 index ca3d385f31ce..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_reference.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatasetReference(Model): - """Dataset reference type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. Dataset reference type. Default value: - "DatasetReference" . - :vartype type: str - :param reference_name: Required. Reference dataset name. - :type reference_name: str - :param parameters: Arguments for dataset. - :type parameters: dict[str, object] - """ - - _validation = { - 'type': {'required': True, 'constant': True}, - 'reference_name': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'reference_name': {'key': 'referenceName', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{object}'}, - } - - type = "DatasetReference" - - def __init__(self, **kwargs): - super(DatasetReference, self).__init__(**kwargs) - self.reference_name = kwargs.get('reference_name', None) - self.parameters = kwargs.get('parameters', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_reference_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_reference_py3.py deleted file mode 100644 index 80162fd77da1..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_reference_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatasetReference(Model): - """Dataset reference type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. Dataset reference type. Default value: - "DatasetReference" . - :vartype type: str - :param reference_name: Required. Reference dataset name. - :type reference_name: str - :param parameters: Arguments for dataset. - :type parameters: dict[str, object] - """ - - _validation = { - 'type': {'required': True, 'constant': True}, - 'reference_name': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'reference_name': {'key': 'referenceName', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{object}'}, - } - - type = "DatasetReference" - - def __init__(self, *, reference_name: str, parameters=None, **kwargs) -> None: - super(DatasetReference, self).__init__(**kwargs) - self.reference_name = reference_name - self.parameters = parameters diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_resource.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_resource.py deleted file mode 100644 index a68fb563e425..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_resource.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class DatasetResource(SubResource): - """Dataset resource type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :ivar etag: Etag identifies change in the resource. - :vartype etag: str - :param properties: Required. Dataset properties. - :type properties: ~azure.mgmt.datafactory.models.Dataset - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'properties': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'Dataset'}, - } - - def __init__(self, **kwargs): - super(DatasetResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_resource_paged.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_resource_paged.py deleted file mode 100644 index 9cedba8bbce9..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_resource_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DatasetResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`DatasetResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DatasetResource]'} - } - - def __init__(self, *args, **kwargs): - - super(DatasetResourcePaged, self).__init__(*args, **kwargs) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_resource_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_resource_py3.py deleted file mode 100644 index 6eb099dcb884..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_resource_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class DatasetResource(SubResource): - """Dataset resource type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :ivar etag: Etag identifies change in the resource. - :vartype etag: str - :param properties: Required. Dataset properties. - :type properties: ~azure.mgmt.datafactory.models.Dataset - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'properties': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'Dataset'}, - } - - def __init__(self, *, properties, **kwargs) -> None: - super(DatasetResource, self).__init__(**kwargs) - self.properties = properties diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_storage_format.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_storage_format.py deleted file mode 100644 index b3160565230d..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_storage_format.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatasetStorageFormat(Model): - """The format definition of a storage. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ParquetFormat, OrcFormat, AvroFormat, JsonFormat, - TextFormat - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param serializer: Serializer. Type: string (or Expression with resultType - string). - :type serializer: object - :param deserializer: Deserializer. Type: string (or Expression with - resultType string). - :type deserializer: object - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'serializer': {'key': 'serializer', 'type': 'object'}, - 'deserializer': {'key': 'deserializer', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'ParquetFormat': 'ParquetFormat', 'OrcFormat': 'OrcFormat', 'AvroFormat': 'AvroFormat', 'JsonFormat': 'JsonFormat', 'TextFormat': 'TextFormat'} - } - - def __init__(self, **kwargs): - super(DatasetStorageFormat, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.serializer = kwargs.get('serializer', None) - self.deserializer = kwargs.get('deserializer', None) - self.type = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_storage_format_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_storage_format_py3.py deleted file mode 100644 index faf746642d9e..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_storage_format_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DatasetStorageFormat(Model): - """The format definition of a storage. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ParquetFormat, OrcFormat, AvroFormat, JsonFormat, - TextFormat - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param serializer: Serializer. Type: string (or Expression with resultType - string). - :type serializer: object - :param deserializer: Deserializer. Type: string (or Expression with - resultType string). - :type deserializer: object - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'serializer': {'key': 'serializer', 'type': 'object'}, - 'deserializer': {'key': 'deserializer', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'ParquetFormat': 'ParquetFormat', 'OrcFormat': 'OrcFormat', 'AvroFormat': 'AvroFormat', 'JsonFormat': 'JsonFormat', 'TextFormat': 'TextFormat'} - } - - def __init__(self, *, additional_properties=None, serializer=None, deserializer=None, **kwargs) -> None: - super(DatasetStorageFormat, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.serializer = serializer - self.deserializer = deserializer - self.type = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_zip_deflate_compression.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_zip_deflate_compression.py deleted file mode 100644 index 9312098be5a3..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_zip_deflate_compression.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_compression import DatasetCompression - - -class DatasetZipDeflateCompression(DatasetCompression): - """The ZipDeflate compression method used on a dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param type: Required. Constant filled by server. - :type type: str - :param level: The ZipDeflate compression level. Possible values include: - 'Optimal', 'Fastest' - :type level: str or ~azure.mgmt.datafactory.models.DatasetCompressionLevel - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'type': {'key': 'type', 'type': 'str'}, - 'level': {'key': 'level', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DatasetZipDeflateCompression, self).__init__(**kwargs) - self.level = kwargs.get('level', None) - self.type = 'ZipDeflate' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_zip_deflate_compression_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_zip_deflate_compression_py3.py deleted file mode 100644 index 74fbb92ce1ab..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dataset_zip_deflate_compression_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_compression_py3 import DatasetCompression - - -class DatasetZipDeflateCompression(DatasetCompression): - """The ZipDeflate compression method used on a dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param type: Required. Constant filled by server. - :type type: str - :param level: The ZipDeflate compression level. Possible values include: - 'Optimal', 'Fastest' - :type level: str or ~azure.mgmt.datafactory.models.DatasetCompressionLevel - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'type': {'key': 'type', 'type': 'str'}, - 'level': {'key': 'level', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, level=None, **kwargs) -> None: - super(DatasetZipDeflateCompression, self).__init__(additional_properties=additional_properties, **kwargs) - self.level = level - self.type = 'ZipDeflate' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/db2_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/db2_linked_service.py deleted file mode 100644 index 9349bbcba5e0..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/db2_linked_service.py +++ /dev/null @@ -1,86 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class Db2LinkedService(LinkedService): - """Linked service for DB2 data source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param server: Required. Server name for connection. Type: string (or - Expression with resultType string). - :type server: object - :param database: Required. Database name for connection. Type: string (or - Expression with resultType string). - :type database: object - :param authentication_type: AuthenticationType to be used for connection. - Possible values include: 'Basic' - :type authentication_type: str or - ~azure.mgmt.datafactory.models.Db2AuthenticationType - :param username: Username for authentication. Type: string (or Expression - with resultType string). - :type username: object - :param password: Password for authentication. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'server': {'required': True}, - 'database': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'server': {'key': 'typeProperties.server', 'type': 'object'}, - 'database': {'key': 'typeProperties.database', 'type': 'object'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, - 'username': {'key': 'typeProperties.username', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(Db2LinkedService, self).__init__(**kwargs) - self.server = kwargs.get('server', None) - self.database = kwargs.get('database', None) - self.authentication_type = kwargs.get('authentication_type', None) - self.username = kwargs.get('username', None) - self.password = kwargs.get('password', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'Db2' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/db2_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/db2_linked_service_py3.py deleted file mode 100644 index d339860c3229..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/db2_linked_service_py3.py +++ /dev/null @@ -1,86 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class Db2LinkedService(LinkedService): - """Linked service for DB2 data source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param server: Required. Server name for connection. Type: string (or - Expression with resultType string). - :type server: object - :param database: Required. Database name for connection. Type: string (or - Expression with resultType string). - :type database: object - :param authentication_type: AuthenticationType to be used for connection. - Possible values include: 'Basic' - :type authentication_type: str or - ~azure.mgmt.datafactory.models.Db2AuthenticationType - :param username: Username for authentication. Type: string (or Expression - with resultType string). - :type username: object - :param password: Password for authentication. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'server': {'required': True}, - 'database': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'server': {'key': 'typeProperties.server', 'type': 'object'}, - 'database': {'key': 'typeProperties.database', 'type': 'object'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, - 'username': {'key': 'typeProperties.username', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, server, database, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, authentication_type=None, username=None, password=None, encrypted_credential=None, **kwargs) -> None: - super(Db2LinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.server = server - self.database = database - self.authentication_type = authentication_type - self.username = username - self.password = password - self.encrypted_credential = encrypted_credential - self.type = 'Db2' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/delete_activity.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/delete_activity.py deleted file mode 100644 index 34ba33a414d5..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/delete_activity.py +++ /dev/null @@ -1,87 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity import ExecutionActivity - - -class DeleteActivity(ExecutionActivity): - """Delete activity. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param recursive: If true, files or sub-folders under current folder path - will be deleted recursively. Default is false. Type: boolean (or - Expression with resultType boolean). - :type recursive: object - :param max_concurrent_connections: The max concurrent connections to - connect data source at the same time. - :type max_concurrent_connections: int - :param enable_logging: Whether to record detailed logs of delete-activity - execution. Default value is false. Type: boolean (or Expression with - resultType boolean). - :type enable_logging: object - :param log_storage_settings: Log storage settings customer need to provide - when enableLogging is true. - :type log_storage_settings: - ~azure.mgmt.datafactory.models.LogStorageSettings - :param dataset: Required. Delete activity dataset reference. - :type dataset: ~azure.mgmt.datafactory.models.DatasetReference - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'max_concurrent_connections': {'minimum': 1}, - 'dataset': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'recursive': {'key': 'typeProperties.recursive', 'type': 'object'}, - 'max_concurrent_connections': {'key': 'typeProperties.maxConcurrentConnections', 'type': 'int'}, - 'enable_logging': {'key': 'typeProperties.enableLogging', 'type': 'object'}, - 'log_storage_settings': {'key': 'typeProperties.logStorageSettings', 'type': 'LogStorageSettings'}, - 'dataset': {'key': 'typeProperties.dataset', 'type': 'DatasetReference'}, - } - - def __init__(self, **kwargs): - super(DeleteActivity, self).__init__(**kwargs) - self.recursive = kwargs.get('recursive', None) - self.max_concurrent_connections = kwargs.get('max_concurrent_connections', None) - self.enable_logging = kwargs.get('enable_logging', None) - self.log_storage_settings = kwargs.get('log_storage_settings', None) - self.dataset = kwargs.get('dataset', None) - self.type = 'Delete' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/delete_activity_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/delete_activity_py3.py deleted file mode 100644 index 5107d9a3381a..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/delete_activity_py3.py +++ /dev/null @@ -1,87 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity_py3 import ExecutionActivity - - -class DeleteActivity(ExecutionActivity): - """Delete activity. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param recursive: If true, files or sub-folders under current folder path - will be deleted recursively. Default is false. Type: boolean (or - Expression with resultType boolean). - :type recursive: object - :param max_concurrent_connections: The max concurrent connections to - connect data source at the same time. - :type max_concurrent_connections: int - :param enable_logging: Whether to record detailed logs of delete-activity - execution. Default value is false. Type: boolean (or Expression with - resultType boolean). - :type enable_logging: object - :param log_storage_settings: Log storage settings customer need to provide - when enableLogging is true. - :type log_storage_settings: - ~azure.mgmt.datafactory.models.LogStorageSettings - :param dataset: Required. Delete activity dataset reference. - :type dataset: ~azure.mgmt.datafactory.models.DatasetReference - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'max_concurrent_connections': {'minimum': 1}, - 'dataset': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'recursive': {'key': 'typeProperties.recursive', 'type': 'object'}, - 'max_concurrent_connections': {'key': 'typeProperties.maxConcurrentConnections', 'type': 'int'}, - 'enable_logging': {'key': 'typeProperties.enableLogging', 'type': 'object'}, - 'log_storage_settings': {'key': 'typeProperties.logStorageSettings', 'type': 'LogStorageSettings'}, - 'dataset': {'key': 'typeProperties.dataset', 'type': 'DatasetReference'}, - } - - def __init__(self, *, name: str, dataset, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, recursive=None, max_concurrent_connections: int=None, enable_logging=None, log_storage_settings=None, **kwargs) -> None: - super(DeleteActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) - self.recursive = recursive - self.max_concurrent_connections = max_concurrent_connections - self.enable_logging = enable_logging - self.log_storage_settings = log_storage_settings - self.dataset = dataset - self.type = 'Delete' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dependency_reference.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dependency_reference.py deleted file mode 100644 index 89e750df8f0d..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dependency_reference.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DependencyReference(Model): - """Referenced dependency. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: SelfDependencyTumblingWindowTriggerReference, - TriggerDependencyReference - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'SelfDependencyTumblingWindowTriggerReference': 'SelfDependencyTumblingWindowTriggerReference', 'TriggerDependencyReference': 'TriggerDependencyReference'} - } - - def __init__(self, **kwargs): - super(DependencyReference, self).__init__(**kwargs) - self.type = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dependency_reference_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dependency_reference_py3.py deleted file mode 100644 index 1b0647b74991..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dependency_reference_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DependencyReference(Model): - """Referenced dependency. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: SelfDependencyTumblingWindowTriggerReference, - TriggerDependencyReference - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'SelfDependencyTumblingWindowTriggerReference': 'SelfDependencyTumblingWindowTriggerReference', 'TriggerDependencyReference': 'TriggerDependencyReference'} - } - - def __init__(self, **kwargs) -> None: - super(DependencyReference, self).__init__(**kwargs) - self.type = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/distcp_settings.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/distcp_settings.py deleted file mode 100644 index a8065ec3cc06..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/distcp_settings.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DistcpSettings(Model): - """Distcp settings. - - All required parameters must be populated in order to send to Azure. - - :param resource_manager_endpoint: Required. Specifies the Yarn - ResourceManager endpoint. Type: string (or Expression with resultType - string). - :type resource_manager_endpoint: object - :param temp_script_path: Required. Specifies an existing folder path which - will be used to store temp Distcp command script. The script file is - generated by ADF and will be removed after Copy job finished. Type: string - (or Expression with resultType string). - :type temp_script_path: object - :param distcp_options: Specifies the Distcp options. Type: string (or - Expression with resultType string). - :type distcp_options: object - """ - - _validation = { - 'resource_manager_endpoint': {'required': True}, - 'temp_script_path': {'required': True}, - } - - _attribute_map = { - 'resource_manager_endpoint': {'key': 'resourceManagerEndpoint', 'type': 'object'}, - 'temp_script_path': {'key': 'tempScriptPath', 'type': 'object'}, - 'distcp_options': {'key': 'distcpOptions', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(DistcpSettings, self).__init__(**kwargs) - self.resource_manager_endpoint = kwargs.get('resource_manager_endpoint', None) - self.temp_script_path = kwargs.get('temp_script_path', None) - self.distcp_options = kwargs.get('distcp_options', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/distcp_settings_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/distcp_settings_py3.py deleted file mode 100644 index 628e2d207f8e..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/distcp_settings_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DistcpSettings(Model): - """Distcp settings. - - All required parameters must be populated in order to send to Azure. - - :param resource_manager_endpoint: Required. Specifies the Yarn - ResourceManager endpoint. Type: string (or Expression with resultType - string). - :type resource_manager_endpoint: object - :param temp_script_path: Required. Specifies an existing folder path which - will be used to store temp Distcp command script. The script file is - generated by ADF and will be removed after Copy job finished. Type: string - (or Expression with resultType string). - :type temp_script_path: object - :param distcp_options: Specifies the Distcp options. Type: string (or - Expression with resultType string). - :type distcp_options: object - """ - - _validation = { - 'resource_manager_endpoint': {'required': True}, - 'temp_script_path': {'required': True}, - } - - _attribute_map = { - 'resource_manager_endpoint': {'key': 'resourceManagerEndpoint', 'type': 'object'}, - 'temp_script_path': {'key': 'tempScriptPath', 'type': 'object'}, - 'distcp_options': {'key': 'distcpOptions', 'type': 'object'}, - } - - def __init__(self, *, resource_manager_endpoint, temp_script_path, distcp_options=None, **kwargs) -> None: - super(DistcpSettings, self).__init__(**kwargs) - self.resource_manager_endpoint = resource_manager_endpoint - self.temp_script_path = temp_script_path - self.distcp_options = distcp_options diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/document_db_collection_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/document_db_collection_dataset.py deleted file mode 100644 index fb2b8d46fa9c..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/document_db_collection_dataset.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class DocumentDbCollectionDataset(Dataset): - """Microsoft Azure Document Database Collection dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param collection_name: Required. Document Database collection name. Type: - string (or Expression with resultType string). - :type collection_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - 'collection_name': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'collection_name': {'key': 'typeProperties.collectionName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(DocumentDbCollectionDataset, self).__init__(**kwargs) - self.collection_name = kwargs.get('collection_name', None) - self.type = 'DocumentDbCollection' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/document_db_collection_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/document_db_collection_dataset_py3.py deleted file mode 100644 index 5eb4dbbf0997..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/document_db_collection_dataset_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class DocumentDbCollectionDataset(Dataset): - """Microsoft Azure Document Database Collection dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param collection_name: Required. Document Database collection name. Type: - string (or Expression with resultType string). - :type collection_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - 'collection_name': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'collection_name': {'key': 'typeProperties.collectionName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, collection_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, **kwargs) -> None: - super(DocumentDbCollectionDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.collection_name = collection_name - self.type = 'DocumentDbCollection' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/document_db_collection_sink.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/document_db_collection_sink.py deleted file mode 100644 index 43253aff51d0..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/document_db_collection_sink.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_sink import CopySink - - -class DocumentDbCollectionSink(CopySink): - """A copy activity Document Database Collection sink. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param write_batch_size: Write batch size. Type: integer (or Expression - with resultType integer), minimum: 0. - :type write_batch_size: object - :param write_batch_timeout: Write batch timeout. Type: string (or - Expression with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type write_batch_timeout: object - :param sink_retry_count: Sink retry count. Type: integer (or Expression - with resultType integer). - :type sink_retry_count: object - :param sink_retry_wait: Sink retry wait. Type: string (or Expression with - resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type sink_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param nesting_separator: Nested properties separator. Default is . (dot). - Type: string (or Expression with resultType string). - :type nesting_separator: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, - 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, - 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, - 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'nesting_separator': {'key': 'nestingSeparator', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(DocumentDbCollectionSink, self).__init__(**kwargs) - self.nesting_separator = kwargs.get('nesting_separator', None) - self.type = 'DocumentDbCollectionSink' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/document_db_collection_sink_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/document_db_collection_sink_py3.py deleted file mode 100644 index 5377d4ed5aa5..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/document_db_collection_sink_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_sink_py3 import CopySink - - -class DocumentDbCollectionSink(CopySink): - """A copy activity Document Database Collection sink. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param write_batch_size: Write batch size. Type: integer (or Expression - with resultType integer), minimum: 0. - :type write_batch_size: object - :param write_batch_timeout: Write batch timeout. Type: string (or - Expression with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type write_batch_timeout: object - :param sink_retry_count: Sink retry count. Type: integer (or Expression - with resultType integer). - :type sink_retry_count: object - :param sink_retry_wait: Sink retry wait. Type: string (or Expression with - resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type sink_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param nesting_separator: Nested properties separator. Default is . (dot). - Type: string (or Expression with resultType string). - :type nesting_separator: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, - 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, - 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, - 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'nesting_separator': {'key': 'nestingSeparator', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, nesting_separator=None, **kwargs) -> None: - super(DocumentDbCollectionSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, **kwargs) - self.nesting_separator = nesting_separator - self.type = 'DocumentDbCollectionSink' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/document_db_collection_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/document_db_collection_source.py deleted file mode 100644 index ac6bd77955c8..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/document_db_collection_source.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class DocumentDbCollectionSource(CopySource): - """A copy activity Document Database Collection source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: Documents query. Type: string (or Expression with resultType - string). - :type query: object - :param nesting_separator: Nested properties separator. Type: string (or - Expression with resultType string). - :type nesting_separator: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - 'nesting_separator': {'key': 'nestingSeparator', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(DocumentDbCollectionSource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.nesting_separator = kwargs.get('nesting_separator', None) - self.type = 'DocumentDbCollectionSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/document_db_collection_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/document_db_collection_source_py3.py deleted file mode 100644 index 9c20bfbfa132..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/document_db_collection_source_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class DocumentDbCollectionSource(CopySource): - """A copy activity Document Database Collection source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: Documents query. Type: string (or Expression with resultType - string). - :type query: object - :param nesting_separator: Nested properties separator. Type: string (or - Expression with resultType string). - :type nesting_separator: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - 'nesting_separator': {'key': 'nestingSeparator', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query=None, nesting_separator=None, **kwargs) -> None: - super(DocumentDbCollectionSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.nesting_separator = nesting_separator - self.type = 'DocumentDbCollectionSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/drill_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/drill_linked_service.py deleted file mode 100644 index 52ad5888f5f2..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/drill_linked_service.py +++ /dev/null @@ -1,69 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class DrillLinkedService(LinkedService): - """Drill server linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param connection_string: An ODBC connection string. Type: string, - SecureString or AzureKeyVaultSecretReference. - :type connection_string: object - :param pwd: The Azure key vault secret reference of password in connection - string. - :type pwd: ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, - 'pwd': {'key': 'typeProperties.pwd', 'type': 'AzureKeyVaultSecretReference'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(DrillLinkedService, self).__init__(**kwargs) - self.connection_string = kwargs.get('connection_string', None) - self.pwd = kwargs.get('pwd', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'Drill' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/drill_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/drill_linked_service_py3.py deleted file mode 100644 index b556d7e92be3..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/drill_linked_service_py3.py +++ /dev/null @@ -1,69 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class DrillLinkedService(LinkedService): - """Drill server linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param connection_string: An ODBC connection string. Type: string, - SecureString or AzureKeyVaultSecretReference. - :type connection_string: object - :param pwd: The Azure key vault secret reference of password in connection - string. - :type pwd: ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, - 'pwd': {'key': 'typeProperties.pwd', 'type': 'AzureKeyVaultSecretReference'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, connection_string=None, pwd=None, encrypted_credential=None, **kwargs) -> None: - super(DrillLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.connection_string = connection_string - self.pwd = pwd - self.encrypted_credential = encrypted_credential - self.type = 'Drill' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/drill_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/drill_source.py deleted file mode 100644 index c2e390308b81..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/drill_source.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class DrillSource(CopySource): - """A copy activity Drill server source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(DrillSource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.type = 'DrillSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/drill_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/drill_source_py3.py deleted file mode 100644 index ea67bbef64fb..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/drill_source_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class DrillSource(CopySource): - """A copy activity Drill server source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query=None, **kwargs) -> None: - super(DrillSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.type = 'DrillSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/drill_table_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/drill_table_dataset.py deleted file mode 100644 index c12b086b7824..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/drill_table_dataset.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class DrillTableDataset(Dataset): - """Drill server dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(DrillTableDataset, self).__init__(**kwargs) - self.table_name = kwargs.get('table_name', None) - self.type = 'DrillTable' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/drill_table_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/drill_table_dataset_py3.py deleted file mode 100644 index f4f5712f29e3..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/drill_table_dataset_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class DrillTableDataset(Dataset): - """Drill server dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: - super(DrillTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.table_name = table_name - self.type = 'DrillTable' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dynamics_entity_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dynamics_entity_dataset.py deleted file mode 100644 index 435c6d153066..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dynamics_entity_dataset.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class DynamicsEntityDataset(Dataset): - """The Dynamics entity dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param entity_name: The logical name of the entity. Type: string (or - Expression with resultType string). - :type entity_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'entity_name': {'key': 'typeProperties.entityName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(DynamicsEntityDataset, self).__init__(**kwargs) - self.entity_name = kwargs.get('entity_name', None) - self.type = 'DynamicsEntity' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dynamics_entity_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dynamics_entity_dataset_py3.py deleted file mode 100644 index 7ee671890354..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dynamics_entity_dataset_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class DynamicsEntityDataset(Dataset): - """The Dynamics entity dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param entity_name: The logical name of the entity. Type: string (or - Expression with resultType string). - :type entity_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'entity_name': {'key': 'typeProperties.entityName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, entity_name=None, **kwargs) -> None: - super(DynamicsEntityDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.entity_name = entity_name - self.type = 'DynamicsEntity' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dynamics_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dynamics_linked_service.py deleted file mode 100644 index 50ec75f79523..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dynamics_linked_service.py +++ /dev/null @@ -1,109 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class DynamicsLinkedService(LinkedService): - """Dynamics linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param deployment_type: Required. The deployment type of the Dynamics - instance. 'Online' for Dynamics Online and 'OnPremisesWithIfd' for - Dynamics on-premises with Ifd. Type: string (or Expression with resultType - string). - :type deployment_type: object - :param host_name: The host name of the on-premises Dynamics server. The - property is required for on-prem and not allowed for online. Type: string - (or Expression with resultType string). - :type host_name: object - :param port: The port of on-premises Dynamics server. The property is - required for on-prem and not allowed for online. Default is 443. Type: - integer (or Expression with resultType integer), minimum: 0. - :type port: object - :param service_uri: The URL to the Microsoft Dynamics server. The property - is required for on-line and not allowed for on-prem. Type: string (or - Expression with resultType string). - :type service_uri: object - :param organization_name: The organization name of the Dynamics instance. - The property is required for on-prem and required for online when there - are more than one Dynamics instances associated with the user. Type: - string (or Expression with resultType string). - :type organization_name: object - :param authentication_type: Required. The authentication type to connect - to Dynamics server. 'Office365' for online scenario, 'Ifd' for on-premises - with Ifd scenario. Type: string (or Expression with resultType string). - :type authentication_type: object - :param username: Required. User name to access the Dynamics instance. - Type: string (or Expression with resultType string). - :type username: object - :param password: Password to access the Dynamics instance. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'deployment_type': {'required': True}, - 'authentication_type': {'required': True}, - 'username': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'deployment_type': {'key': 'typeProperties.deploymentType', 'type': 'object'}, - 'host_name': {'key': 'typeProperties.hostName', 'type': 'object'}, - 'port': {'key': 'typeProperties.port', 'type': 'object'}, - 'service_uri': {'key': 'typeProperties.serviceUri', 'type': 'object'}, - 'organization_name': {'key': 'typeProperties.organizationName', 'type': 'object'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'object'}, - 'username': {'key': 'typeProperties.username', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(DynamicsLinkedService, self).__init__(**kwargs) - self.deployment_type = kwargs.get('deployment_type', None) - self.host_name = kwargs.get('host_name', None) - self.port = kwargs.get('port', None) - self.service_uri = kwargs.get('service_uri', None) - self.organization_name = kwargs.get('organization_name', None) - self.authentication_type = kwargs.get('authentication_type', None) - self.username = kwargs.get('username', None) - self.password = kwargs.get('password', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'Dynamics' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dynamics_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dynamics_linked_service_py3.py deleted file mode 100644 index 4971dabfba16..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dynamics_linked_service_py3.py +++ /dev/null @@ -1,109 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class DynamicsLinkedService(LinkedService): - """Dynamics linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param deployment_type: Required. The deployment type of the Dynamics - instance. 'Online' for Dynamics Online and 'OnPremisesWithIfd' for - Dynamics on-premises with Ifd. Type: string (or Expression with resultType - string). - :type deployment_type: object - :param host_name: The host name of the on-premises Dynamics server. The - property is required for on-prem and not allowed for online. Type: string - (or Expression with resultType string). - :type host_name: object - :param port: The port of on-premises Dynamics server. The property is - required for on-prem and not allowed for online. Default is 443. Type: - integer (or Expression with resultType integer), minimum: 0. - :type port: object - :param service_uri: The URL to the Microsoft Dynamics server. The property - is required for on-line and not allowed for on-prem. Type: string (or - Expression with resultType string). - :type service_uri: object - :param organization_name: The organization name of the Dynamics instance. - The property is required for on-prem and required for online when there - are more than one Dynamics instances associated with the user. Type: - string (or Expression with resultType string). - :type organization_name: object - :param authentication_type: Required. The authentication type to connect - to Dynamics server. 'Office365' for online scenario, 'Ifd' for on-premises - with Ifd scenario. Type: string (or Expression with resultType string). - :type authentication_type: object - :param username: Required. User name to access the Dynamics instance. - Type: string (or Expression with resultType string). - :type username: object - :param password: Password to access the Dynamics instance. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'deployment_type': {'required': True}, - 'authentication_type': {'required': True}, - 'username': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'deployment_type': {'key': 'typeProperties.deploymentType', 'type': 'object'}, - 'host_name': {'key': 'typeProperties.hostName', 'type': 'object'}, - 'port': {'key': 'typeProperties.port', 'type': 'object'}, - 'service_uri': {'key': 'typeProperties.serviceUri', 'type': 'object'}, - 'organization_name': {'key': 'typeProperties.organizationName', 'type': 'object'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'object'}, - 'username': {'key': 'typeProperties.username', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, deployment_type, authentication_type, username, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, host_name=None, port=None, service_uri=None, organization_name=None, password=None, encrypted_credential=None, **kwargs) -> None: - super(DynamicsLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.deployment_type = deployment_type - self.host_name = host_name - self.port = port - self.service_uri = service_uri - self.organization_name = organization_name - self.authentication_type = authentication_type - self.username = username - self.password = password - self.encrypted_credential = encrypted_credential - self.type = 'Dynamics' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dynamics_sink.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dynamics_sink.py deleted file mode 100644 index 7eb8be963583..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dynamics_sink.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_sink import CopySink - - -class DynamicsSink(CopySink): - """A copy activity Dynamics sink. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param write_batch_size: Write batch size. Type: integer (or Expression - with resultType integer), minimum: 0. - :type write_batch_size: object - :param write_batch_timeout: Write batch timeout. Type: string (or - Expression with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type write_batch_timeout: object - :param sink_retry_count: Sink retry count. Type: integer (or Expression - with resultType integer). - :type sink_retry_count: object - :param sink_retry_wait: Sink retry wait. Type: string (or Expression with - resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type sink_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :ivar write_behavior: Required. The write behavior for the operation. - Default value: "Upsert" . - :vartype write_behavior: str - :param ignore_null_values: The flag indicating whether ignore null values - from input dataset (except key fields) during write operation. Default is - false. Type: boolean (or Expression with resultType boolean). - :type ignore_null_values: object - """ - - _validation = { - 'type': {'required': True}, - 'write_behavior': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, - 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, - 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, - 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'write_behavior': {'key': 'writeBehavior', 'type': 'str'}, - 'ignore_null_values': {'key': 'ignoreNullValues', 'type': 'object'}, - } - - write_behavior = "Upsert" - - def __init__(self, **kwargs): - super(DynamicsSink, self).__init__(**kwargs) - self.ignore_null_values = kwargs.get('ignore_null_values', None) - self.type = 'DynamicsSink' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dynamics_sink_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dynamics_sink_py3.py deleted file mode 100644 index 2e2a64169797..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dynamics_sink_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_sink_py3 import CopySink - - -class DynamicsSink(CopySink): - """A copy activity Dynamics sink. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param write_batch_size: Write batch size. Type: integer (or Expression - with resultType integer), minimum: 0. - :type write_batch_size: object - :param write_batch_timeout: Write batch timeout. Type: string (or - Expression with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type write_batch_timeout: object - :param sink_retry_count: Sink retry count. Type: integer (or Expression - with resultType integer). - :type sink_retry_count: object - :param sink_retry_wait: Sink retry wait. Type: string (or Expression with - resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type sink_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :ivar write_behavior: Required. The write behavior for the operation. - Default value: "Upsert" . - :vartype write_behavior: str - :param ignore_null_values: The flag indicating whether ignore null values - from input dataset (except key fields) during write operation. Default is - false. Type: boolean (or Expression with resultType boolean). - :type ignore_null_values: object - """ - - _validation = { - 'type': {'required': True}, - 'write_behavior': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, - 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, - 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, - 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'write_behavior': {'key': 'writeBehavior', 'type': 'str'}, - 'ignore_null_values': {'key': 'ignoreNullValues', 'type': 'object'}, - } - - write_behavior = "Upsert" - - def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, ignore_null_values=None, **kwargs) -> None: - super(DynamicsSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, **kwargs) - self.ignore_null_values = ignore_null_values - self.type = 'DynamicsSink' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dynamics_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dynamics_source.py deleted file mode 100644 index 09c04a8d09a6..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dynamics_source.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class DynamicsSource(CopySource): - """A copy activity Dynamics source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: FetchXML is a proprietary query language that is used in - Microsoft Dynamics (online & on-premises). Type: string (or Expression - with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(DynamicsSource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.type = 'DynamicsSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dynamics_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dynamics_source_py3.py deleted file mode 100644 index 9c921cf40f3a..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dynamics_source_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class DynamicsSource(CopySource): - """A copy activity Dynamics source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: FetchXML is a proprietary query language that is used in - Microsoft Dynamics (online & on-premises). Type: string (or Expression - with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query=None, **kwargs) -> None: - super(DynamicsSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.type = 'DynamicsSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/eloqua_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/eloqua_linked_service.py deleted file mode 100644 index ae14064ae523..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/eloqua_linked_service.py +++ /dev/null @@ -1,91 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class EloquaLinkedService(LinkedService): - """Eloqua server linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param endpoint: Required. The endpoint of the Eloqua server. (i.e. - eloqua.example.com) - :type endpoint: object - :param username: Required. The site name and user name of your Eloqua - account in the form: sitename/username. (i.e. Eloqua/Alice) - :type username: object - :param password: The password corresponding to the user name. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param use_encrypted_endpoints: Specifies whether the data source - endpoints are encrypted using HTTPS. The default value is true. - :type use_encrypted_endpoints: object - :param use_host_verification: Specifies whether to require the host name - in the server's certificate to match the host name of the server when - connecting over SSL. The default value is true. - :type use_host_verification: object - :param use_peer_verification: Specifies whether to verify the identity of - the server when connecting over SSL. The default value is true. - :type use_peer_verification: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'endpoint': {'required': True}, - 'username': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'endpoint': {'key': 'typeProperties.endpoint', 'type': 'object'}, - 'username': {'key': 'typeProperties.username', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, - 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, - 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(EloquaLinkedService, self).__init__(**kwargs) - self.endpoint = kwargs.get('endpoint', None) - self.username = kwargs.get('username', None) - self.password = kwargs.get('password', None) - self.use_encrypted_endpoints = kwargs.get('use_encrypted_endpoints', None) - self.use_host_verification = kwargs.get('use_host_verification', None) - self.use_peer_verification = kwargs.get('use_peer_verification', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'Eloqua' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/eloqua_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/eloqua_linked_service_py3.py deleted file mode 100644 index 1c6bd97ecf9d..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/eloqua_linked_service_py3.py +++ /dev/null @@ -1,91 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class EloquaLinkedService(LinkedService): - """Eloqua server linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param endpoint: Required. The endpoint of the Eloqua server. (i.e. - eloqua.example.com) - :type endpoint: object - :param username: Required. The site name and user name of your Eloqua - account in the form: sitename/username. (i.e. Eloqua/Alice) - :type username: object - :param password: The password corresponding to the user name. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param use_encrypted_endpoints: Specifies whether the data source - endpoints are encrypted using HTTPS. The default value is true. - :type use_encrypted_endpoints: object - :param use_host_verification: Specifies whether to require the host name - in the server's certificate to match the host name of the server when - connecting over SSL. The default value is true. - :type use_host_verification: object - :param use_peer_verification: Specifies whether to verify the identity of - the server when connecting over SSL. The default value is true. - :type use_peer_verification: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'endpoint': {'required': True}, - 'username': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'endpoint': {'key': 'typeProperties.endpoint', 'type': 'object'}, - 'username': {'key': 'typeProperties.username', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, - 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, - 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, endpoint, username, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, password=None, use_encrypted_endpoints=None, use_host_verification=None, use_peer_verification=None, encrypted_credential=None, **kwargs) -> None: - super(EloquaLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.endpoint = endpoint - self.username = username - self.password = password - self.use_encrypted_endpoints = use_encrypted_endpoints - self.use_host_verification = use_host_verification - self.use_peer_verification = use_peer_verification - self.encrypted_credential = encrypted_credential - self.type = 'Eloqua' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/eloqua_object_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/eloqua_object_dataset.py deleted file mode 100644 index 56adc0ce47c4..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/eloqua_object_dataset.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class EloquaObjectDataset(Dataset): - """Eloqua server dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(EloquaObjectDataset, self).__init__(**kwargs) - self.table_name = kwargs.get('table_name', None) - self.type = 'EloquaObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/eloqua_object_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/eloqua_object_dataset_py3.py deleted file mode 100644 index 705f43cd225c..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/eloqua_object_dataset_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class EloquaObjectDataset(Dataset): - """Eloqua server dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: - super(EloquaObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.table_name = table_name - self.type = 'EloquaObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/eloqua_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/eloqua_source.py deleted file mode 100644 index 694282ebcd8a..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/eloqua_source.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class EloquaSource(CopySource): - """A copy activity Eloqua server source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(EloquaSource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.type = 'EloquaSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/eloqua_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/eloqua_source_py3.py deleted file mode 100644 index c9d96711743f..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/eloqua_source_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class EloquaSource(CopySource): - """A copy activity Eloqua server source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query=None, **kwargs) -> None: - super(EloquaSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.type = 'EloquaSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/execute_pipeline_activity.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/execute_pipeline_activity.py deleted file mode 100644 index 0008b5eee153..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/execute_pipeline_activity.py +++ /dev/null @@ -1,65 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .control_activity import ControlActivity - - -class ExecutePipelineActivity(ControlActivity): - """Execute pipeline activity. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param pipeline: Required. Pipeline reference. - :type pipeline: ~azure.mgmt.datafactory.models.PipelineReference - :param parameters: Pipeline parameters. - :type parameters: dict[str, object] - :param wait_on_completion: Defines whether activity execution will wait - for the dependent pipeline execution to finish. Default is false. - :type wait_on_completion: bool - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'pipeline': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'pipeline': {'key': 'typeProperties.pipeline', 'type': 'PipelineReference'}, - 'parameters': {'key': 'typeProperties.parameters', 'type': '{object}'}, - 'wait_on_completion': {'key': 'typeProperties.waitOnCompletion', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ExecutePipelineActivity, self).__init__(**kwargs) - self.pipeline = kwargs.get('pipeline', None) - self.parameters = kwargs.get('parameters', None) - self.wait_on_completion = kwargs.get('wait_on_completion', None) - self.type = 'ExecutePipeline' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/execute_pipeline_activity_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/execute_pipeline_activity_py3.py deleted file mode 100644 index addaafabe7b0..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/execute_pipeline_activity_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .control_activity_py3 import ControlActivity - - -class ExecutePipelineActivity(ControlActivity): - """Execute pipeline activity. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param pipeline: Required. Pipeline reference. - :type pipeline: ~azure.mgmt.datafactory.models.PipelineReference - :param parameters: Pipeline parameters. - :type parameters: dict[str, object] - :param wait_on_completion: Defines whether activity execution will wait - for the dependent pipeline execution to finish. Default is false. - :type wait_on_completion: bool - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'pipeline': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'pipeline': {'key': 'typeProperties.pipeline', 'type': 'PipelineReference'}, - 'parameters': {'key': 'typeProperties.parameters', 'type': '{object}'}, - 'wait_on_completion': {'key': 'typeProperties.waitOnCompletion', 'type': 'bool'}, - } - - def __init__(self, *, name: str, pipeline, additional_properties=None, description: str=None, depends_on=None, user_properties=None, parameters=None, wait_on_completion: bool=None, **kwargs) -> None: - super(ExecutePipelineActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, **kwargs) - self.pipeline = pipeline - self.parameters = parameters - self.wait_on_completion = wait_on_completion - self.type = 'ExecutePipeline' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/execute_ssis_package_activity.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/execute_ssis_package_activity.py deleted file mode 100644 index 3ea2abd2e734..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/execute_ssis_package_activity.py +++ /dev/null @@ -1,120 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity import ExecutionActivity - - -class ExecuteSSISPackageActivity(ExecutionActivity): - """Execute SSIS package activity. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param package_location: Required. SSIS package location. - :type package_location: ~azure.mgmt.datafactory.models.SSISPackageLocation - :param runtime: Specifies the runtime to execute SSIS package. The value - should be "x86" or "x64". Type: string (or Expression with resultType - string). - :type runtime: object - :param logging_level: The logging level of SSIS package execution. Type: - string (or Expression with resultType string). - :type logging_level: object - :param environment_path: The environment path to execute the SSIS package. - Type: string (or Expression with resultType string). - :type environment_path: object - :param execution_credential: The package execution credential. - :type execution_credential: - ~azure.mgmt.datafactory.models.SSISExecutionCredential - :param connect_via: Required. The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param project_parameters: The project level parameters to execute the - SSIS package. - :type project_parameters: dict[str, - ~azure.mgmt.datafactory.models.SSISExecutionParameter] - :param package_parameters: The package level parameters to execute the - SSIS package. - :type package_parameters: dict[str, - ~azure.mgmt.datafactory.models.SSISExecutionParameter] - :param project_connection_managers: The project level connection managers - to execute the SSIS package. - :type project_connection_managers: dict[str, dict[str, - ~azure.mgmt.datafactory.models.SSISExecutionParameter]] - :param package_connection_managers: The package level connection managers - to execute the SSIS package. - :type package_connection_managers: dict[str, dict[str, - ~azure.mgmt.datafactory.models.SSISExecutionParameter]] - :param property_overrides: The property overrides to execute the SSIS - package. - :type property_overrides: dict[str, - ~azure.mgmt.datafactory.models.SSISPropertyOverride] - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'package_location': {'required': True}, - 'connect_via': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'package_location': {'key': 'typeProperties.packageLocation', 'type': 'SSISPackageLocation'}, - 'runtime': {'key': 'typeProperties.runtime', 'type': 'object'}, - 'logging_level': {'key': 'typeProperties.loggingLevel', 'type': 'object'}, - 'environment_path': {'key': 'typeProperties.environmentPath', 'type': 'object'}, - 'execution_credential': {'key': 'typeProperties.executionCredential', 'type': 'SSISExecutionCredential'}, - 'connect_via': {'key': 'typeProperties.connectVia', 'type': 'IntegrationRuntimeReference'}, - 'project_parameters': {'key': 'typeProperties.projectParameters', 'type': '{SSISExecutionParameter}'}, - 'package_parameters': {'key': 'typeProperties.packageParameters', 'type': '{SSISExecutionParameter}'}, - 'project_connection_managers': {'key': 'typeProperties.projectConnectionManagers', 'type': '{{SSISExecutionParameter}}'}, - 'package_connection_managers': {'key': 'typeProperties.packageConnectionManagers', 'type': '{{SSISExecutionParameter}}'}, - 'property_overrides': {'key': 'typeProperties.propertyOverrides', 'type': '{SSISPropertyOverride}'}, - } - - def __init__(self, **kwargs): - super(ExecuteSSISPackageActivity, self).__init__(**kwargs) - self.package_location = kwargs.get('package_location', None) - self.runtime = kwargs.get('runtime', None) - self.logging_level = kwargs.get('logging_level', None) - self.environment_path = kwargs.get('environment_path', None) - self.execution_credential = kwargs.get('execution_credential', None) - self.connect_via = kwargs.get('connect_via', None) - self.project_parameters = kwargs.get('project_parameters', None) - self.package_parameters = kwargs.get('package_parameters', None) - self.project_connection_managers = kwargs.get('project_connection_managers', None) - self.package_connection_managers = kwargs.get('package_connection_managers', None) - self.property_overrides = kwargs.get('property_overrides', None) - self.type = 'ExecuteSSISPackage' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/execute_ssis_package_activity_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/execute_ssis_package_activity_py3.py deleted file mode 100644 index fb72bacf03d9..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/execute_ssis_package_activity_py3.py +++ /dev/null @@ -1,120 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity_py3 import ExecutionActivity - - -class ExecuteSSISPackageActivity(ExecutionActivity): - """Execute SSIS package activity. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param package_location: Required. SSIS package location. - :type package_location: ~azure.mgmt.datafactory.models.SSISPackageLocation - :param runtime: Specifies the runtime to execute SSIS package. The value - should be "x86" or "x64". Type: string (or Expression with resultType - string). - :type runtime: object - :param logging_level: The logging level of SSIS package execution. Type: - string (or Expression with resultType string). - :type logging_level: object - :param environment_path: The environment path to execute the SSIS package. - Type: string (or Expression with resultType string). - :type environment_path: object - :param execution_credential: The package execution credential. - :type execution_credential: - ~azure.mgmt.datafactory.models.SSISExecutionCredential - :param connect_via: Required. The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param project_parameters: The project level parameters to execute the - SSIS package. - :type project_parameters: dict[str, - ~azure.mgmt.datafactory.models.SSISExecutionParameter] - :param package_parameters: The package level parameters to execute the - SSIS package. - :type package_parameters: dict[str, - ~azure.mgmt.datafactory.models.SSISExecutionParameter] - :param project_connection_managers: The project level connection managers - to execute the SSIS package. - :type project_connection_managers: dict[str, dict[str, - ~azure.mgmt.datafactory.models.SSISExecutionParameter]] - :param package_connection_managers: The package level connection managers - to execute the SSIS package. - :type package_connection_managers: dict[str, dict[str, - ~azure.mgmt.datafactory.models.SSISExecutionParameter]] - :param property_overrides: The property overrides to execute the SSIS - package. - :type property_overrides: dict[str, - ~azure.mgmt.datafactory.models.SSISPropertyOverride] - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'package_location': {'required': True}, - 'connect_via': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'package_location': {'key': 'typeProperties.packageLocation', 'type': 'SSISPackageLocation'}, - 'runtime': {'key': 'typeProperties.runtime', 'type': 'object'}, - 'logging_level': {'key': 'typeProperties.loggingLevel', 'type': 'object'}, - 'environment_path': {'key': 'typeProperties.environmentPath', 'type': 'object'}, - 'execution_credential': {'key': 'typeProperties.executionCredential', 'type': 'SSISExecutionCredential'}, - 'connect_via': {'key': 'typeProperties.connectVia', 'type': 'IntegrationRuntimeReference'}, - 'project_parameters': {'key': 'typeProperties.projectParameters', 'type': '{SSISExecutionParameter}'}, - 'package_parameters': {'key': 'typeProperties.packageParameters', 'type': '{SSISExecutionParameter}'}, - 'project_connection_managers': {'key': 'typeProperties.projectConnectionManagers', 'type': '{{SSISExecutionParameter}}'}, - 'package_connection_managers': {'key': 'typeProperties.packageConnectionManagers', 'type': '{{SSISExecutionParameter}}'}, - 'property_overrides': {'key': 'typeProperties.propertyOverrides', 'type': '{SSISPropertyOverride}'}, - } - - def __init__(self, *, name: str, package_location, connect_via, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, runtime=None, logging_level=None, environment_path=None, execution_credential=None, project_parameters=None, package_parameters=None, project_connection_managers=None, package_connection_managers=None, property_overrides=None, **kwargs) -> None: - super(ExecuteSSISPackageActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) - self.package_location = package_location - self.runtime = runtime - self.logging_level = logging_level - self.environment_path = environment_path - self.execution_credential = execution_credential - self.connect_via = connect_via - self.project_parameters = project_parameters - self.package_parameters = package_parameters - self.project_connection_managers = project_connection_managers - self.package_connection_managers = package_connection_managers - self.property_overrides = property_overrides - self.type = 'ExecuteSSISPackage' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/execution_activity.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/execution_activity.py deleted file mode 100644 index aca89a009b8e..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/execution_activity.py +++ /dev/null @@ -1,74 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .activity import Activity - - -class ExecutionActivity(Activity): - """Base class for all execution activities. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureFunctionActivity, DatabricksSparkPythonActivity, - DatabricksSparkJarActivity, DatabricksNotebookActivity, - DataLakeAnalyticsUSQLActivity, AzureMLUpdateResourceActivity, - AzureMLBatchExecutionActivity, GetMetadataActivity, WebActivity, - LookupActivity, DeleteActivity, SqlServerStoredProcedureActivity, - CustomActivity, ExecuteSSISPackageActivity, HDInsightSparkActivity, - HDInsightStreamingActivity, HDInsightMapReduceActivity, - HDInsightPigActivity, HDInsightHiveActivity, CopyActivity - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - } - - _subtype_map = { - 'type': {'AzureFunctionActivity': 'AzureFunctionActivity', 'DatabricksSparkPython': 'DatabricksSparkPythonActivity', 'DatabricksSparkJar': 'DatabricksSparkJarActivity', 'DatabricksNotebook': 'DatabricksNotebookActivity', 'DataLakeAnalyticsU-SQL': 'DataLakeAnalyticsUSQLActivity', 'AzureMLUpdateResource': 'AzureMLUpdateResourceActivity', 'AzureMLBatchExecution': 'AzureMLBatchExecutionActivity', 'GetMetadata': 'GetMetadataActivity', 'WebActivity': 'WebActivity', 'Lookup': 'LookupActivity', 'Delete': 'DeleteActivity', 'SqlServerStoredProcedure': 'SqlServerStoredProcedureActivity', 'Custom': 'CustomActivity', 'ExecuteSSISPackage': 'ExecuteSSISPackageActivity', 'HDInsightSpark': 'HDInsightSparkActivity', 'HDInsightStreaming': 'HDInsightStreamingActivity', 'HDInsightMapReduce': 'HDInsightMapReduceActivity', 'HDInsightPig': 'HDInsightPigActivity', 'HDInsightHive': 'HDInsightHiveActivity', 'Copy': 'CopyActivity'} - } - - def __init__(self, **kwargs): - super(ExecutionActivity, self).__init__(**kwargs) - self.linked_service_name = kwargs.get('linked_service_name', None) - self.policy = kwargs.get('policy', None) - self.type = 'Execution' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/execution_activity_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/execution_activity_py3.py deleted file mode 100644 index 7f3b452fc3f9..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/execution_activity_py3.py +++ /dev/null @@ -1,74 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .activity_py3 import Activity - - -class ExecutionActivity(Activity): - """Base class for all execution activities. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureFunctionActivity, DatabricksSparkPythonActivity, - DatabricksSparkJarActivity, DatabricksNotebookActivity, - DataLakeAnalyticsUSQLActivity, AzureMLUpdateResourceActivity, - AzureMLBatchExecutionActivity, GetMetadataActivity, WebActivity, - LookupActivity, DeleteActivity, SqlServerStoredProcedureActivity, - CustomActivity, ExecuteSSISPackageActivity, HDInsightSparkActivity, - HDInsightStreamingActivity, HDInsightMapReduceActivity, - HDInsightPigActivity, HDInsightHiveActivity, CopyActivity - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - } - - _subtype_map = { - 'type': {'AzureFunctionActivity': 'AzureFunctionActivity', 'DatabricksSparkPython': 'DatabricksSparkPythonActivity', 'DatabricksSparkJar': 'DatabricksSparkJarActivity', 'DatabricksNotebook': 'DatabricksNotebookActivity', 'DataLakeAnalyticsU-SQL': 'DataLakeAnalyticsUSQLActivity', 'AzureMLUpdateResource': 'AzureMLUpdateResourceActivity', 'AzureMLBatchExecution': 'AzureMLBatchExecutionActivity', 'GetMetadata': 'GetMetadataActivity', 'WebActivity': 'WebActivity', 'Lookup': 'LookupActivity', 'Delete': 'DeleteActivity', 'SqlServerStoredProcedure': 'SqlServerStoredProcedureActivity', 'Custom': 'CustomActivity', 'ExecuteSSISPackage': 'ExecuteSSISPackageActivity', 'HDInsightSpark': 'HDInsightSparkActivity', 'HDInsightStreaming': 'HDInsightStreamingActivity', 'HDInsightMapReduce': 'HDInsightMapReduceActivity', 'HDInsightPig': 'HDInsightPigActivity', 'HDInsightHive': 'HDInsightHiveActivity', 'Copy': 'CopyActivity'} - } - - def __init__(self, *, name: str, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, **kwargs) -> None: - super(ExecutionActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, **kwargs) - self.linked_service_name = linked_service_name - self.policy = policy - self.type = 'Execution' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/exposure_control_request.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/exposure_control_request.py deleted file mode 100644 index a6a2cc280b4d..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/exposure_control_request.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExposureControlRequest(Model): - """The exposure control request. - - :param feature_name: The feature name. - :type feature_name: str - :param feature_type: The feature type. - :type feature_type: str - """ - - _attribute_map = { - 'feature_name': {'key': 'featureName', 'type': 'str'}, - 'feature_type': {'key': 'featureType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ExposureControlRequest, self).__init__(**kwargs) - self.feature_name = kwargs.get('feature_name', None) - self.feature_type = kwargs.get('feature_type', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/exposure_control_request_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/exposure_control_request_py3.py deleted file mode 100644 index b3f4099fb972..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/exposure_control_request_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExposureControlRequest(Model): - """The exposure control request. - - :param feature_name: The feature name. - :type feature_name: str - :param feature_type: The feature type. - :type feature_type: str - """ - - _attribute_map = { - 'feature_name': {'key': 'featureName', 'type': 'str'}, - 'feature_type': {'key': 'featureType', 'type': 'str'}, - } - - def __init__(self, *, feature_name: str=None, feature_type: str=None, **kwargs) -> None: - super(ExposureControlRequest, self).__init__(**kwargs) - self.feature_name = feature_name - self.feature_type = feature_type diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/exposure_control_response.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/exposure_control_response.py deleted file mode 100644 index 868647e3c5b3..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/exposure_control_response.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExposureControlResponse(Model): - """The exposure control response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar feature_name: The feature name. - :vartype feature_name: str - :ivar value: The feature value. - :vartype value: str - """ - - _validation = { - 'feature_name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'feature_name': {'key': 'featureName', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ExposureControlResponse, self).__init__(**kwargs) - self.feature_name = None - self.value = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/exposure_control_response_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/exposure_control_response_py3.py deleted file mode 100644 index 1ac7138e7984..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/exposure_control_response_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExposureControlResponse(Model): - """The exposure control response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar feature_name: The feature name. - :vartype feature_name: str - :ivar value: The feature value. - :vartype value: str - """ - - _validation = { - 'feature_name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'feature_name': {'key': 'featureName', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ExposureControlResponse, self).__init__(**kwargs) - self.feature_name = None - self.value = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/expression.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/expression.py deleted file mode 100644 index 4b16ceca2794..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/expression.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Expression(Model): - """Azure Data Factory expression definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. Expression type. Default value: "Expression" . - :vartype type: str - :param value: Required. Expression value. - :type value: str - """ - - _validation = { - 'type': {'required': True, 'constant': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - type = "Expression" - - def __init__(self, **kwargs): - super(Expression, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/expression_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/expression_py3.py deleted file mode 100644 index c6ad023a57ed..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/expression_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Expression(Model): - """Azure Data Factory expression definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. Expression type. Default value: "Expression" . - :vartype type: str - :param value: Required. Expression value. - :type value: str - """ - - _validation = { - 'type': {'required': True, 'constant': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - type = "Expression" - - def __init__(self, *, value: str, **kwargs) -> None: - super(Expression, self).__init__(**kwargs) - self.value = value diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory.py deleted file mode 100644 index 614b3d7fc97a..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory.py +++ /dev/null @@ -1,81 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Factory(Resource): - """Factory resource type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :ivar e_tag: Etag identifies change in the resource. - :vartype e_tag: str - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param identity: Managed service identity of the factory. - :type identity: ~azure.mgmt.datafactory.models.FactoryIdentity - :ivar provisioning_state: Factory provisioning state, example Succeeded. - :vartype provisioning_state: str - :ivar create_time: Time the factory was created in ISO8601 format. - :vartype create_time: datetime - :ivar version: Version of the factory. - :vartype version: str - :param repo_configuration: Git repo information of the factory. - :type repo_configuration: - ~azure.mgmt.datafactory.models.FactoryRepoConfiguration - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'e_tag': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'create_time': {'readonly': True}, - 'version': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'additional_properties': {'key': '', 'type': '{object}'}, - 'identity': {'key': 'identity', 'type': 'FactoryIdentity'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'create_time': {'key': 'properties.createTime', 'type': 'iso-8601'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'repo_configuration': {'key': 'properties.repoConfiguration', 'type': 'FactoryRepoConfiguration'}, - } - - def __init__(self, **kwargs): - super(Factory, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.identity = kwargs.get('identity', None) - self.provisioning_state = None - self.create_time = None - self.version = None - self.repo_configuration = kwargs.get('repo_configuration', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_git_hub_configuration.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_git_hub_configuration.py deleted file mode 100644 index 02cec39d8313..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_git_hub_configuration.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .factory_repo_configuration import FactoryRepoConfiguration - - -class FactoryGitHubConfiguration(FactoryRepoConfiguration): - """Factory's GitHub repo information. - - All required parameters must be populated in order to send to Azure. - - :param account_name: Required. Account name. - :type account_name: str - :param repository_name: Required. Repository name. - :type repository_name: str - :param collaboration_branch: Required. Collaboration branch. - :type collaboration_branch: str - :param root_folder: Required. Root folder. - :type root_folder: str - :param last_commit_id: Last commit id. - :type last_commit_id: str - :param type: Required. Constant filled by server. - :type type: str - :param host_name: GitHub Enterprise host name. For example: - https://github.mydomain.com - :type host_name: str - """ - - _validation = { - 'account_name': {'required': True}, - 'repository_name': {'required': True}, - 'collaboration_branch': {'required': True}, - 'root_folder': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'account_name': {'key': 'accountName', 'type': 'str'}, - 'repository_name': {'key': 'repositoryName', 'type': 'str'}, - 'collaboration_branch': {'key': 'collaborationBranch', 'type': 'str'}, - 'root_folder': {'key': 'rootFolder', 'type': 'str'}, - 'last_commit_id': {'key': 'lastCommitId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'host_name': {'key': 'hostName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FactoryGitHubConfiguration, self).__init__(**kwargs) - self.host_name = kwargs.get('host_name', None) - self.type = 'FactoryGitHubConfiguration' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_git_hub_configuration_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_git_hub_configuration_py3.py deleted file mode 100644 index 23c5dbf21f0c..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_git_hub_configuration_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .factory_repo_configuration_py3 import FactoryRepoConfiguration - - -class FactoryGitHubConfiguration(FactoryRepoConfiguration): - """Factory's GitHub repo information. - - All required parameters must be populated in order to send to Azure. - - :param account_name: Required. Account name. - :type account_name: str - :param repository_name: Required. Repository name. - :type repository_name: str - :param collaboration_branch: Required. Collaboration branch. - :type collaboration_branch: str - :param root_folder: Required. Root folder. - :type root_folder: str - :param last_commit_id: Last commit id. - :type last_commit_id: str - :param type: Required. Constant filled by server. - :type type: str - :param host_name: GitHub Enterprise host name. For example: - https://github.mydomain.com - :type host_name: str - """ - - _validation = { - 'account_name': {'required': True}, - 'repository_name': {'required': True}, - 'collaboration_branch': {'required': True}, - 'root_folder': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'account_name': {'key': 'accountName', 'type': 'str'}, - 'repository_name': {'key': 'repositoryName', 'type': 'str'}, - 'collaboration_branch': {'key': 'collaborationBranch', 'type': 'str'}, - 'root_folder': {'key': 'rootFolder', 'type': 'str'}, - 'last_commit_id': {'key': 'lastCommitId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'host_name': {'key': 'hostName', 'type': 'str'}, - } - - def __init__(self, *, account_name: str, repository_name: str, collaboration_branch: str, root_folder: str, last_commit_id: str=None, host_name: str=None, **kwargs) -> None: - super(FactoryGitHubConfiguration, self).__init__(account_name=account_name, repository_name=repository_name, collaboration_branch=collaboration_branch, root_folder=root_folder, last_commit_id=last_commit_id, **kwargs) - self.host_name = host_name - self.type = 'FactoryGitHubConfiguration' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_identity.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_identity.py deleted file mode 100644 index dad745424af3..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_identity.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FactoryIdentity(Model): - """Identity properties of the factory resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. The identity type. Currently the only supported type - is 'SystemAssigned'. Default value: "SystemAssigned" . - :vartype type: str - :ivar principal_id: The principal id of the identity. - :vartype principal_id: str - :ivar tenant_id: The client tenant id of the identity. - :vartype tenant_id: str - """ - - _validation = { - 'type': {'required': True, 'constant': True}, - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - } - - type = "SystemAssigned" - - def __init__(self, **kwargs): - super(FactoryIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_identity_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_identity_py3.py deleted file mode 100644 index 567100d8c19e..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_identity_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FactoryIdentity(Model): - """Identity properties of the factory resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. The identity type. Currently the only supported type - is 'SystemAssigned'. Default value: "SystemAssigned" . - :vartype type: str - :ivar principal_id: The principal id of the identity. - :vartype principal_id: str - :ivar tenant_id: The client tenant id of the identity. - :vartype tenant_id: str - """ - - _validation = { - 'type': {'required': True, 'constant': True}, - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - } - - type = "SystemAssigned" - - def __init__(self, **kwargs) -> None: - super(FactoryIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_paged.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_paged.py deleted file mode 100644 index 589b44defc56..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class FactoryPaged(Paged): - """ - A paging container for iterating over a list of :class:`Factory ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Factory]'} - } - - def __init__(self, *args, **kwargs): - - super(FactoryPaged, self).__init__(*args, **kwargs) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_py3.py deleted file mode 100644 index 0682aa5f8852..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_py3.py +++ /dev/null @@ -1,81 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Factory(Resource): - """Factory resource type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :ivar e_tag: Etag identifies change in the resource. - :vartype e_tag: str - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param identity: Managed service identity of the factory. - :type identity: ~azure.mgmt.datafactory.models.FactoryIdentity - :ivar provisioning_state: Factory provisioning state, example Succeeded. - :vartype provisioning_state: str - :ivar create_time: Time the factory was created in ISO8601 format. - :vartype create_time: datetime - :ivar version: Version of the factory. - :vartype version: str - :param repo_configuration: Git repo information of the factory. - :type repo_configuration: - ~azure.mgmt.datafactory.models.FactoryRepoConfiguration - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'e_tag': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'create_time': {'readonly': True}, - 'version': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'additional_properties': {'key': '', 'type': '{object}'}, - 'identity': {'key': 'identity', 'type': 'FactoryIdentity'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'create_time': {'key': 'properties.createTime', 'type': 'iso-8601'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'repo_configuration': {'key': 'properties.repoConfiguration', 'type': 'FactoryRepoConfiguration'}, - } - - def __init__(self, *, location: str=None, tags=None, additional_properties=None, identity=None, repo_configuration=None, **kwargs) -> None: - super(Factory, self).__init__(location=location, tags=tags, **kwargs) - self.additional_properties = additional_properties - self.identity = identity - self.provisioning_state = None - self.create_time = None - self.version = None - self.repo_configuration = repo_configuration diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_repo_configuration.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_repo_configuration.py deleted file mode 100644 index 7c20db016c71..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_repo_configuration.py +++ /dev/null @@ -1,65 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FactoryRepoConfiguration(Model): - """Factory's git repo information. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: FactoryVSTSConfiguration, FactoryGitHubConfiguration - - All required parameters must be populated in order to send to Azure. - - :param account_name: Required. Account name. - :type account_name: str - :param repository_name: Required. Repository name. - :type repository_name: str - :param collaboration_branch: Required. Collaboration branch. - :type collaboration_branch: str - :param root_folder: Required. Root folder. - :type root_folder: str - :param last_commit_id: Last commit id. - :type last_commit_id: str - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'account_name': {'required': True}, - 'repository_name': {'required': True}, - 'collaboration_branch': {'required': True}, - 'root_folder': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'account_name': {'key': 'accountName', 'type': 'str'}, - 'repository_name': {'key': 'repositoryName', 'type': 'str'}, - 'collaboration_branch': {'key': 'collaborationBranch', 'type': 'str'}, - 'root_folder': {'key': 'rootFolder', 'type': 'str'}, - 'last_commit_id': {'key': 'lastCommitId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'FactoryVSTSConfiguration': 'FactoryVSTSConfiguration', 'FactoryGitHubConfiguration': 'FactoryGitHubConfiguration'} - } - - def __init__(self, **kwargs): - super(FactoryRepoConfiguration, self).__init__(**kwargs) - self.account_name = kwargs.get('account_name', None) - self.repository_name = kwargs.get('repository_name', None) - self.collaboration_branch = kwargs.get('collaboration_branch', None) - self.root_folder = kwargs.get('root_folder', None) - self.last_commit_id = kwargs.get('last_commit_id', None) - self.type = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_repo_configuration_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_repo_configuration_py3.py deleted file mode 100644 index eefed7978850..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_repo_configuration_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FactoryRepoConfiguration(Model): - """Factory's git repo information. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: FactoryVSTSConfiguration, FactoryGitHubConfiguration - - All required parameters must be populated in order to send to Azure. - - :param account_name: Required. Account name. - :type account_name: str - :param repository_name: Required. Repository name. - :type repository_name: str - :param collaboration_branch: Required. Collaboration branch. - :type collaboration_branch: str - :param root_folder: Required. Root folder. - :type root_folder: str - :param last_commit_id: Last commit id. - :type last_commit_id: str - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'account_name': {'required': True}, - 'repository_name': {'required': True}, - 'collaboration_branch': {'required': True}, - 'root_folder': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'account_name': {'key': 'accountName', 'type': 'str'}, - 'repository_name': {'key': 'repositoryName', 'type': 'str'}, - 'collaboration_branch': {'key': 'collaborationBranch', 'type': 'str'}, - 'root_folder': {'key': 'rootFolder', 'type': 'str'}, - 'last_commit_id': {'key': 'lastCommitId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'FactoryVSTSConfiguration': 'FactoryVSTSConfiguration', 'FactoryGitHubConfiguration': 'FactoryGitHubConfiguration'} - } - - def __init__(self, *, account_name: str, repository_name: str, collaboration_branch: str, root_folder: str, last_commit_id: str=None, **kwargs) -> None: - super(FactoryRepoConfiguration, self).__init__(**kwargs) - self.account_name = account_name - self.repository_name = repository_name - self.collaboration_branch = collaboration_branch - self.root_folder = root_folder - self.last_commit_id = last_commit_id - self.type = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_repo_update.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_repo_update.py deleted file mode 100644 index 44eac9d287ce..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_repo_update.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FactoryRepoUpdate(Model): - """Factory's git repo information. - - :param factory_resource_id: The factory resource id. - :type factory_resource_id: str - :param repo_configuration: Git repo information of the factory. - :type repo_configuration: - ~azure.mgmt.datafactory.models.FactoryRepoConfiguration - """ - - _attribute_map = { - 'factory_resource_id': {'key': 'factoryResourceId', 'type': 'str'}, - 'repo_configuration': {'key': 'repoConfiguration', 'type': 'FactoryRepoConfiguration'}, - } - - def __init__(self, **kwargs): - super(FactoryRepoUpdate, self).__init__(**kwargs) - self.factory_resource_id = kwargs.get('factory_resource_id', None) - self.repo_configuration = kwargs.get('repo_configuration', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_repo_update_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_repo_update_py3.py deleted file mode 100644 index 68aca7a48db8..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_repo_update_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FactoryRepoUpdate(Model): - """Factory's git repo information. - - :param factory_resource_id: The factory resource id. - :type factory_resource_id: str - :param repo_configuration: Git repo information of the factory. - :type repo_configuration: - ~azure.mgmt.datafactory.models.FactoryRepoConfiguration - """ - - _attribute_map = { - 'factory_resource_id': {'key': 'factoryResourceId', 'type': 'str'}, - 'repo_configuration': {'key': 'repoConfiguration', 'type': 'FactoryRepoConfiguration'}, - } - - def __init__(self, *, factory_resource_id: str=None, repo_configuration=None, **kwargs) -> None: - super(FactoryRepoUpdate, self).__init__(**kwargs) - self.factory_resource_id = factory_resource_id - self.repo_configuration = repo_configuration diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_update_parameters.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_update_parameters.py deleted file mode 100644 index e9977fceff86..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_update_parameters.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FactoryUpdateParameters(Model): - """Parameters for updating a factory resource. - - :param tags: The resource tags. - :type tags: dict[str, str] - :param identity: Managed service identity of the factory. - :type identity: ~azure.mgmt.datafactory.models.FactoryIdentity - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'FactoryIdentity'}, - } - - def __init__(self, **kwargs): - super(FactoryUpdateParameters, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.identity = kwargs.get('identity', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_update_parameters_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_update_parameters_py3.py deleted file mode 100644 index 5bd523fedf3d..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_update_parameters_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FactoryUpdateParameters(Model): - """Parameters for updating a factory resource. - - :param tags: The resource tags. - :type tags: dict[str, str] - :param identity: Managed service identity of the factory. - :type identity: ~azure.mgmt.datafactory.models.FactoryIdentity - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'FactoryIdentity'}, - } - - def __init__(self, *, tags=None, identity=None, **kwargs) -> None: - super(FactoryUpdateParameters, self).__init__(**kwargs) - self.tags = tags - self.identity = identity diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_vsts_configuration.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_vsts_configuration.py deleted file mode 100644 index 6d07c68d23e3..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_vsts_configuration.py +++ /dev/null @@ -1,62 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .factory_repo_configuration import FactoryRepoConfiguration - - -class FactoryVSTSConfiguration(FactoryRepoConfiguration): - """Factory's VSTS repo information. - - All required parameters must be populated in order to send to Azure. - - :param account_name: Required. Account name. - :type account_name: str - :param repository_name: Required. Repository name. - :type repository_name: str - :param collaboration_branch: Required. Collaboration branch. - :type collaboration_branch: str - :param root_folder: Required. Root folder. - :type root_folder: str - :param last_commit_id: Last commit id. - :type last_commit_id: str - :param type: Required. Constant filled by server. - :type type: str - :param project_name: Required. VSTS project name. - :type project_name: str - :param tenant_id: VSTS tenant id. - :type tenant_id: str - """ - - _validation = { - 'account_name': {'required': True}, - 'repository_name': {'required': True}, - 'collaboration_branch': {'required': True}, - 'root_folder': {'required': True}, - 'type': {'required': True}, - 'project_name': {'required': True}, - } - - _attribute_map = { - 'account_name': {'key': 'accountName', 'type': 'str'}, - 'repository_name': {'key': 'repositoryName', 'type': 'str'}, - 'collaboration_branch': {'key': 'collaborationBranch', 'type': 'str'}, - 'root_folder': {'key': 'rootFolder', 'type': 'str'}, - 'last_commit_id': {'key': 'lastCommitId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'project_name': {'key': 'projectName', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FactoryVSTSConfiguration, self).__init__(**kwargs) - self.project_name = kwargs.get('project_name', None) - self.tenant_id = kwargs.get('tenant_id', None) - self.type = 'FactoryVSTSConfiguration' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_vsts_configuration_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_vsts_configuration_py3.py deleted file mode 100644 index 4f13c0959d63..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/factory_vsts_configuration_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .factory_repo_configuration_py3 import FactoryRepoConfiguration - - -class FactoryVSTSConfiguration(FactoryRepoConfiguration): - """Factory's VSTS repo information. - - All required parameters must be populated in order to send to Azure. - - :param account_name: Required. Account name. - :type account_name: str - :param repository_name: Required. Repository name. - :type repository_name: str - :param collaboration_branch: Required. Collaboration branch. - :type collaboration_branch: str - :param root_folder: Required. Root folder. - :type root_folder: str - :param last_commit_id: Last commit id. - :type last_commit_id: str - :param type: Required. Constant filled by server. - :type type: str - :param project_name: Required. VSTS project name. - :type project_name: str - :param tenant_id: VSTS tenant id. - :type tenant_id: str - """ - - _validation = { - 'account_name': {'required': True}, - 'repository_name': {'required': True}, - 'collaboration_branch': {'required': True}, - 'root_folder': {'required': True}, - 'type': {'required': True}, - 'project_name': {'required': True}, - } - - _attribute_map = { - 'account_name': {'key': 'accountName', 'type': 'str'}, - 'repository_name': {'key': 'repositoryName', 'type': 'str'}, - 'collaboration_branch': {'key': 'collaborationBranch', 'type': 'str'}, - 'root_folder': {'key': 'rootFolder', 'type': 'str'}, - 'last_commit_id': {'key': 'lastCommitId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'project_name': {'key': 'projectName', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - } - - def __init__(self, *, account_name: str, repository_name: str, collaboration_branch: str, root_folder: str, project_name: str, last_commit_id: str=None, tenant_id: str=None, **kwargs) -> None: - super(FactoryVSTSConfiguration, self).__init__(account_name=account_name, repository_name=repository_name, collaboration_branch=collaboration_branch, root_folder=root_folder, last_commit_id=last_commit_id, **kwargs) - self.project_name = project_name - self.tenant_id = tenant_id - self.type = 'FactoryVSTSConfiguration' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/file_server_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/file_server_linked_service.py deleted file mode 100644 index c3c90f30935d..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/file_server_linked_service.py +++ /dev/null @@ -1,74 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class FileServerLinkedService(LinkedService): - """File system linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param host: Required. Host name of the server. Type: string (or - Expression with resultType string). - :type host: object - :param user_id: User ID to logon the server. Type: string (or Expression - with resultType string). - :type user_id: object - :param password: Password to logon the server. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'host': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'host': {'key': 'typeProperties.host', 'type': 'object'}, - 'user_id': {'key': 'typeProperties.userId', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(FileServerLinkedService, self).__init__(**kwargs) - self.host = kwargs.get('host', None) - self.user_id = kwargs.get('user_id', None) - self.password = kwargs.get('password', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'FileServer' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/file_server_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/file_server_linked_service_py3.py deleted file mode 100644 index a9793d5b44fc..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/file_server_linked_service_py3.py +++ /dev/null @@ -1,74 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class FileServerLinkedService(LinkedService): - """File system linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param host: Required. Host name of the server. Type: string (or - Expression with resultType string). - :type host: object - :param user_id: User ID to logon the server. Type: string (or Expression - with resultType string). - :type user_id: object - :param password: Password to logon the server. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'host': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'host': {'key': 'typeProperties.host', 'type': 'object'}, - 'user_id': {'key': 'typeProperties.userId', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, host, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, user_id=None, password=None, encrypted_credential=None, **kwargs) -> None: - super(FileServerLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.host = host - self.user_id = user_id - self.password = password - self.encrypted_credential = encrypted_credential - self.type = 'FileServer' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/file_share_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/file_share_dataset.py deleted file mode 100644 index a851956ea319..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/file_share_dataset.py +++ /dev/null @@ -1,91 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class FileShareDataset(Dataset): - """An on-premises file system dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param folder_path: The path of the on-premises file system. Type: string - (or Expression with resultType string). - :type folder_path: object - :param file_name: The name of the on-premises file system. Type: string - (or Expression with resultType string). - :type file_name: object - :param format: The format of the files. - :type format: ~azure.mgmt.datafactory.models.DatasetStorageFormat - :param file_filter: Specify a filter to be used to select a subset of - files in the folderPath rather than all files. Type: string (or Expression - with resultType string). - :type file_filter: object - :param compression: The data compression method used for the file system. - :type compression: ~azure.mgmt.datafactory.models.DatasetCompression - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'folder_path': {'key': 'typeProperties.folderPath', 'type': 'object'}, - 'file_name': {'key': 'typeProperties.fileName', 'type': 'object'}, - 'format': {'key': 'typeProperties.format', 'type': 'DatasetStorageFormat'}, - 'file_filter': {'key': 'typeProperties.fileFilter', 'type': 'object'}, - 'compression': {'key': 'typeProperties.compression', 'type': 'DatasetCompression'}, - } - - def __init__(self, **kwargs): - super(FileShareDataset, self).__init__(**kwargs) - self.folder_path = kwargs.get('folder_path', None) - self.file_name = kwargs.get('file_name', None) - self.format = kwargs.get('format', None) - self.file_filter = kwargs.get('file_filter', None) - self.compression = kwargs.get('compression', None) - self.type = 'FileShare' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/file_share_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/file_share_dataset_py3.py deleted file mode 100644 index 675583ae2f2c..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/file_share_dataset_py3.py +++ /dev/null @@ -1,91 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class FileShareDataset(Dataset): - """An on-premises file system dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param folder_path: The path of the on-premises file system. Type: string - (or Expression with resultType string). - :type folder_path: object - :param file_name: The name of the on-premises file system. Type: string - (or Expression with resultType string). - :type file_name: object - :param format: The format of the files. - :type format: ~azure.mgmt.datafactory.models.DatasetStorageFormat - :param file_filter: Specify a filter to be used to select a subset of - files in the folderPath rather than all files. Type: string (or Expression - with resultType string). - :type file_filter: object - :param compression: The data compression method used for the file system. - :type compression: ~azure.mgmt.datafactory.models.DatasetCompression - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'folder_path': {'key': 'typeProperties.folderPath', 'type': 'object'}, - 'file_name': {'key': 'typeProperties.fileName', 'type': 'object'}, - 'format': {'key': 'typeProperties.format', 'type': 'DatasetStorageFormat'}, - 'file_filter': {'key': 'typeProperties.fileFilter', 'type': 'object'}, - 'compression': {'key': 'typeProperties.compression', 'type': 'DatasetCompression'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, folder_path=None, file_name=None, format=None, file_filter=None, compression=None, **kwargs) -> None: - super(FileShareDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.folder_path = folder_path - self.file_name = file_name - self.format = format - self.file_filter = file_filter - self.compression = compression - self.type = 'FileShare' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/file_system_sink.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/file_system_sink.py deleted file mode 100644 index 9f33cea7a261..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/file_system_sink.py +++ /dev/null @@ -1,62 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_sink import CopySink - - -class FileSystemSink(CopySink): - """A copy activity file system sink. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param write_batch_size: Write batch size. Type: integer (or Expression - with resultType integer), minimum: 0. - :type write_batch_size: object - :param write_batch_timeout: Write batch timeout. Type: string (or - Expression with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type write_batch_timeout: object - :param sink_retry_count: Sink retry count. Type: integer (or Expression - with resultType integer). - :type sink_retry_count: object - :param sink_retry_wait: Sink retry wait. Type: string (or Expression with - resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type sink_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param copy_behavior: The type of copy behavior for copy sink. Possible - values include: 'PreserveHierarchy', 'FlattenHierarchy', 'MergeFiles' - :type copy_behavior: str or - ~azure.mgmt.datafactory.models.CopyBehaviorType - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, - 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, - 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, - 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'copy_behavior': {'key': 'copyBehavior', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FileSystemSink, self).__init__(**kwargs) - self.copy_behavior = kwargs.get('copy_behavior', None) - self.type = 'FileSystemSink' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/file_system_sink_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/file_system_sink_py3.py deleted file mode 100644 index a940e39878f8..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/file_system_sink_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_sink_py3 import CopySink - - -class FileSystemSink(CopySink): - """A copy activity file system sink. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param write_batch_size: Write batch size. Type: integer (or Expression - with resultType integer), minimum: 0. - :type write_batch_size: object - :param write_batch_timeout: Write batch timeout. Type: string (or - Expression with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type write_batch_timeout: object - :param sink_retry_count: Sink retry count. Type: integer (or Expression - with resultType integer). - :type sink_retry_count: object - :param sink_retry_wait: Sink retry wait. Type: string (or Expression with - resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type sink_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param copy_behavior: The type of copy behavior for copy sink. Possible - values include: 'PreserveHierarchy', 'FlattenHierarchy', 'MergeFiles' - :type copy_behavior: str or - ~azure.mgmt.datafactory.models.CopyBehaviorType - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, - 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, - 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, - 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'copy_behavior': {'key': 'copyBehavior', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, copy_behavior=None, **kwargs) -> None: - super(FileSystemSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, **kwargs) - self.copy_behavior = copy_behavior - self.type = 'FileSystemSink' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/file_system_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/file_system_source.py deleted file mode 100644 index 1bbf97f1b31d..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/file_system_source.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class FileSystemSource(CopySource): - """A copy activity file system source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param recursive: If true, files under the folder path will be read - recursively. Default is true. Type: boolean (or Expression with resultType - boolean). - :type recursive: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'recursive': {'key': 'recursive', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(FileSystemSource, self).__init__(**kwargs) - self.recursive = kwargs.get('recursive', None) - self.type = 'FileSystemSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/file_system_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/file_system_source_py3.py deleted file mode 100644 index 6db0072329d4..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/file_system_source_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class FileSystemSource(CopySource): - """A copy activity file system source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param recursive: If true, files under the folder path will be read - recursively. Default is true. Type: boolean (or Expression with resultType - boolean). - :type recursive: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'recursive': {'key': 'recursive', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, recursive=None, **kwargs) -> None: - super(FileSystemSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.recursive = recursive - self.type = 'FileSystemSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/filter_activity.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/filter_activity.py deleted file mode 100644 index 1346bb234695..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/filter_activity.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .control_activity import ControlActivity - - -class FilterActivity(ControlActivity): - """Filter and return results from input array based on the conditions. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param items: Required. Input array on which filter should be applied. - :type items: ~azure.mgmt.datafactory.models.Expression - :param condition: Required. Condition to be used for filtering the input. - :type condition: ~azure.mgmt.datafactory.models.Expression - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'items': {'required': True}, - 'condition': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'items': {'key': 'typeProperties.items', 'type': 'Expression'}, - 'condition': {'key': 'typeProperties.condition', 'type': 'Expression'}, - } - - def __init__(self, **kwargs): - super(FilterActivity, self).__init__(**kwargs) - self.items = kwargs.get('items', None) - self.condition = kwargs.get('condition', None) - self.type = 'Filter' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/filter_activity_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/filter_activity_py3.py deleted file mode 100644 index a07cf01d1dd5..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/filter_activity_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .control_activity_py3 import ControlActivity - - -class FilterActivity(ControlActivity): - """Filter and return results from input array based on the conditions. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param items: Required. Input array on which filter should be applied. - :type items: ~azure.mgmt.datafactory.models.Expression - :param condition: Required. Condition to be used for filtering the input. - :type condition: ~azure.mgmt.datafactory.models.Expression - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'items': {'required': True}, - 'condition': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'items': {'key': 'typeProperties.items', 'type': 'Expression'}, - 'condition': {'key': 'typeProperties.condition', 'type': 'Expression'}, - } - - def __init__(self, *, name: str, items, condition, additional_properties=None, description: str=None, depends_on=None, user_properties=None, **kwargs) -> None: - super(FilterActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, **kwargs) - self.items = items - self.condition = condition - self.type = 'Filter' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/for_each_activity.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/for_each_activity.py deleted file mode 100644 index 5edfa2a8140e..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/for_each_activity.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .control_activity import ControlActivity - - -class ForEachActivity(ControlActivity): - """This activity is used for iterating over a collection and execute given - activities. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param is_sequential: Should the loop be executed in sequence or in - parallel (max 50) - :type is_sequential: bool - :param batch_count: Batch count to be used for controlling the number of - parallel execution (when isSequential is set to false). - :type batch_count: int - :param items: Required. Collection to iterate. - :type items: ~azure.mgmt.datafactory.models.Expression - :param activities: Required. List of activities to execute . - :type activities: list[~azure.mgmt.datafactory.models.Activity] - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'batch_count': {'maximum': 50}, - 'items': {'required': True}, - 'activities': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'is_sequential': {'key': 'typeProperties.isSequential', 'type': 'bool'}, - 'batch_count': {'key': 'typeProperties.batchCount', 'type': 'int'}, - 'items': {'key': 'typeProperties.items', 'type': 'Expression'}, - 'activities': {'key': 'typeProperties.activities', 'type': '[Activity]'}, - } - - def __init__(self, **kwargs): - super(ForEachActivity, self).__init__(**kwargs) - self.is_sequential = kwargs.get('is_sequential', None) - self.batch_count = kwargs.get('batch_count', None) - self.items = kwargs.get('items', None) - self.activities = kwargs.get('activities', None) - self.type = 'ForEach' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/for_each_activity_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/for_each_activity_py3.py deleted file mode 100644 index 7c5c887bb1d9..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/for_each_activity_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .control_activity_py3 import ControlActivity - - -class ForEachActivity(ControlActivity): - """This activity is used for iterating over a collection and execute given - activities. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param is_sequential: Should the loop be executed in sequence or in - parallel (max 50) - :type is_sequential: bool - :param batch_count: Batch count to be used for controlling the number of - parallel execution (when isSequential is set to false). - :type batch_count: int - :param items: Required. Collection to iterate. - :type items: ~azure.mgmt.datafactory.models.Expression - :param activities: Required. List of activities to execute . - :type activities: list[~azure.mgmt.datafactory.models.Activity] - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'batch_count': {'maximum': 50}, - 'items': {'required': True}, - 'activities': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'is_sequential': {'key': 'typeProperties.isSequential', 'type': 'bool'}, - 'batch_count': {'key': 'typeProperties.batchCount', 'type': 'int'}, - 'items': {'key': 'typeProperties.items', 'type': 'Expression'}, - 'activities': {'key': 'typeProperties.activities', 'type': '[Activity]'}, - } - - def __init__(self, *, name: str, items, activities, additional_properties=None, description: str=None, depends_on=None, user_properties=None, is_sequential: bool=None, batch_count: int=None, **kwargs) -> None: - super(ForEachActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, **kwargs) - self.is_sequential = is_sequential - self.batch_count = batch_count - self.items = items - self.activities = activities - self.type = 'ForEach' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ftp_server_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ftp_server_linked_service.py deleted file mode 100644 index 03a09f89c13e..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ftp_server_linked_service.py +++ /dev/null @@ -1,98 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class FtpServerLinkedService(LinkedService): - """A FTP server Linked Service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param host: Required. Host name of the FTP server. Type: string (or - Expression with resultType string). - :type host: object - :param port: The TCP port number that the FTP server uses to listen for - client connections. Default value is 21. Type: integer (or Expression with - resultType integer), minimum: 0. - :type port: object - :param authentication_type: The authentication type to be used to connect - to the FTP server. Possible values include: 'Basic', 'Anonymous' - :type authentication_type: str or - ~azure.mgmt.datafactory.models.FtpAuthenticationType - :param user_name: Username to logon the FTP server. Type: string (or - Expression with resultType string). - :type user_name: object - :param password: Password to logon the FTP server. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - :param enable_ssl: If true, connect to the FTP server over SSL/TLS - channel. Default value is true. Type: boolean (or Expression with - resultType boolean). - :type enable_ssl: object - :param enable_server_certificate_validation: If true, validate the FTP - server SSL certificate when connect over SSL/TLS channel. Default value is - true. Type: boolean (or Expression with resultType boolean). - :type enable_server_certificate_validation: object - """ - - _validation = { - 'type': {'required': True}, - 'host': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'host': {'key': 'typeProperties.host', 'type': 'object'}, - 'port': {'key': 'typeProperties.port', 'type': 'object'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, - 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - 'enable_ssl': {'key': 'typeProperties.enableSsl', 'type': 'object'}, - 'enable_server_certificate_validation': {'key': 'typeProperties.enableServerCertificateValidation', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(FtpServerLinkedService, self).__init__(**kwargs) - self.host = kwargs.get('host', None) - self.port = kwargs.get('port', None) - self.authentication_type = kwargs.get('authentication_type', None) - self.user_name = kwargs.get('user_name', None) - self.password = kwargs.get('password', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.enable_ssl = kwargs.get('enable_ssl', None) - self.enable_server_certificate_validation = kwargs.get('enable_server_certificate_validation', None) - self.type = 'FtpServer' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ftp_server_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ftp_server_linked_service_py3.py deleted file mode 100644 index 21fd1168165f..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ftp_server_linked_service_py3.py +++ /dev/null @@ -1,98 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class FtpServerLinkedService(LinkedService): - """A FTP server Linked Service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param host: Required. Host name of the FTP server. Type: string (or - Expression with resultType string). - :type host: object - :param port: The TCP port number that the FTP server uses to listen for - client connections. Default value is 21. Type: integer (or Expression with - resultType integer), minimum: 0. - :type port: object - :param authentication_type: The authentication type to be used to connect - to the FTP server. Possible values include: 'Basic', 'Anonymous' - :type authentication_type: str or - ~azure.mgmt.datafactory.models.FtpAuthenticationType - :param user_name: Username to logon the FTP server. Type: string (or - Expression with resultType string). - :type user_name: object - :param password: Password to logon the FTP server. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - :param enable_ssl: If true, connect to the FTP server over SSL/TLS - channel. Default value is true. Type: boolean (or Expression with - resultType boolean). - :type enable_ssl: object - :param enable_server_certificate_validation: If true, validate the FTP - server SSL certificate when connect over SSL/TLS channel. Default value is - true. Type: boolean (or Expression with resultType boolean). - :type enable_server_certificate_validation: object - """ - - _validation = { - 'type': {'required': True}, - 'host': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'host': {'key': 'typeProperties.host', 'type': 'object'}, - 'port': {'key': 'typeProperties.port', 'type': 'object'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, - 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - 'enable_ssl': {'key': 'typeProperties.enableSsl', 'type': 'object'}, - 'enable_server_certificate_validation': {'key': 'typeProperties.enableServerCertificateValidation', 'type': 'object'}, - } - - def __init__(self, *, host, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, port=None, authentication_type=None, user_name=None, password=None, encrypted_credential=None, enable_ssl=None, enable_server_certificate_validation=None, **kwargs) -> None: - super(FtpServerLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.host = host - self.port = port - self.authentication_type = authentication_type - self.user_name = user_name - self.password = password - self.encrypted_credential = encrypted_credential - self.enable_ssl = enable_ssl - self.enable_server_certificate_validation = enable_server_certificate_validation - self.type = 'FtpServer' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/get_metadata_activity.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/get_metadata_activity.py deleted file mode 100644 index 7941189f2dcd..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/get_metadata_activity.py +++ /dev/null @@ -1,67 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity import ExecutionActivity - - -class GetMetadataActivity(ExecutionActivity): - """Activity to get metadata of dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param dataset: Required. GetMetadata activity dataset reference. - :type dataset: ~azure.mgmt.datafactory.models.DatasetReference - :param field_list: Fields of metadata to get from dataset. - :type field_list: list[object] - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'dataset': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'dataset': {'key': 'typeProperties.dataset', 'type': 'DatasetReference'}, - 'field_list': {'key': 'typeProperties.fieldList', 'type': '[object]'}, - } - - def __init__(self, **kwargs): - super(GetMetadataActivity, self).__init__(**kwargs) - self.dataset = kwargs.get('dataset', None) - self.field_list = kwargs.get('field_list', None) - self.type = 'GetMetadata' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/get_metadata_activity_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/get_metadata_activity_py3.py deleted file mode 100644 index b4d8eb17cab1..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/get_metadata_activity_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity_py3 import ExecutionActivity - - -class GetMetadataActivity(ExecutionActivity): - """Activity to get metadata of dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param dataset: Required. GetMetadata activity dataset reference. - :type dataset: ~azure.mgmt.datafactory.models.DatasetReference - :param field_list: Fields of metadata to get from dataset. - :type field_list: list[object] - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'dataset': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'dataset': {'key': 'typeProperties.dataset', 'type': 'DatasetReference'}, - 'field_list': {'key': 'typeProperties.fieldList', 'type': '[object]'}, - } - - def __init__(self, *, name: str, dataset, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, field_list=None, **kwargs) -> None: - super(GetMetadataActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) - self.dataset = dataset - self.field_list = field_list - self.type = 'GetMetadata' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/get_ssis_object_metadata_request.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/get_ssis_object_metadata_request.py deleted file mode 100644 index 1be4a2afece0..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/get_ssis_object_metadata_request.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GetSsisObjectMetadataRequest(Model): - """The request payload of get SSIS object metadata. - - :param metadata_path: Metadata path. - :type metadata_path: str - """ - - _attribute_map = { - 'metadata_path': {'key': 'metadataPath', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GetSsisObjectMetadataRequest, self).__init__(**kwargs) - self.metadata_path = kwargs.get('metadata_path', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/get_ssis_object_metadata_request_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/get_ssis_object_metadata_request_py3.py deleted file mode 100644 index 310cd9783d81..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/get_ssis_object_metadata_request_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GetSsisObjectMetadataRequest(Model): - """The request payload of get SSIS object metadata. - - :param metadata_path: Metadata path. - :type metadata_path: str - """ - - _attribute_map = { - 'metadata_path': {'key': 'metadataPath', 'type': 'str'}, - } - - def __init__(self, *, metadata_path: str=None, **kwargs) -> None: - super(GetSsisObjectMetadataRequest, self).__init__(**kwargs) - self.metadata_path = metadata_path diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/git_hub_access_token_request.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/git_hub_access_token_request.py deleted file mode 100644 index cadecdf70f44..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/git_hub_access_token_request.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GitHubAccessTokenRequest(Model): - """Get GitHub access token request definition. - - All required parameters must be populated in order to send to Azure. - - :param git_hub_access_code: Required. GitHub access code. - :type git_hub_access_code: str - :param git_hub_client_id: GitHub application client ID. - :type git_hub_client_id: str - :param git_hub_access_token_base_url: Required. GitHub access token base - URL. - :type git_hub_access_token_base_url: str - """ - - _validation = { - 'git_hub_access_code': {'required': True}, - 'git_hub_access_token_base_url': {'required': True}, - } - - _attribute_map = { - 'git_hub_access_code': {'key': 'gitHubAccessCode', 'type': 'str'}, - 'git_hub_client_id': {'key': 'gitHubClientId', 'type': 'str'}, - 'git_hub_access_token_base_url': {'key': 'gitHubAccessTokenBaseUrl', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GitHubAccessTokenRequest, self).__init__(**kwargs) - self.git_hub_access_code = kwargs.get('git_hub_access_code', None) - self.git_hub_client_id = kwargs.get('git_hub_client_id', None) - self.git_hub_access_token_base_url = kwargs.get('git_hub_access_token_base_url', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/git_hub_access_token_request_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/git_hub_access_token_request_py3.py deleted file mode 100644 index 7961e1bc33ed..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/git_hub_access_token_request_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GitHubAccessTokenRequest(Model): - """Get GitHub access token request definition. - - All required parameters must be populated in order to send to Azure. - - :param git_hub_access_code: Required. GitHub access code. - :type git_hub_access_code: str - :param git_hub_client_id: GitHub application client ID. - :type git_hub_client_id: str - :param git_hub_access_token_base_url: Required. GitHub access token base - URL. - :type git_hub_access_token_base_url: str - """ - - _validation = { - 'git_hub_access_code': {'required': True}, - 'git_hub_access_token_base_url': {'required': True}, - } - - _attribute_map = { - 'git_hub_access_code': {'key': 'gitHubAccessCode', 'type': 'str'}, - 'git_hub_client_id': {'key': 'gitHubClientId', 'type': 'str'}, - 'git_hub_access_token_base_url': {'key': 'gitHubAccessTokenBaseUrl', 'type': 'str'}, - } - - def __init__(self, *, git_hub_access_code: str, git_hub_access_token_base_url: str, git_hub_client_id: str=None, **kwargs) -> None: - super(GitHubAccessTokenRequest, self).__init__(**kwargs) - self.git_hub_access_code = git_hub_access_code - self.git_hub_client_id = git_hub_client_id - self.git_hub_access_token_base_url = git_hub_access_token_base_url diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/git_hub_access_token_response.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/git_hub_access_token_response.py deleted file mode 100644 index 4a4afce8f0f0..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/git_hub_access_token_response.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GitHubAccessTokenResponse(Model): - """Get GitHub access token response definition. - - :param git_hub_access_token: GitHub access token. - :type git_hub_access_token: str - """ - - _attribute_map = { - 'git_hub_access_token': {'key': 'gitHubAccessToken', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GitHubAccessTokenResponse, self).__init__(**kwargs) - self.git_hub_access_token = kwargs.get('git_hub_access_token', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/git_hub_access_token_response_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/git_hub_access_token_response_py3.py deleted file mode 100644 index 4f28ade6e914..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/git_hub_access_token_response_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GitHubAccessTokenResponse(Model): - """Get GitHub access token response definition. - - :param git_hub_access_token: GitHub access token. - :type git_hub_access_token: str - """ - - _attribute_map = { - 'git_hub_access_token': {'key': 'gitHubAccessToken', 'type': 'str'}, - } - - def __init__(self, *, git_hub_access_token: str=None, **kwargs) -> None: - super(GitHubAccessTokenResponse, self).__init__(**kwargs) - self.git_hub_access_token = git_hub_access_token diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/google_big_query_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/google_big_query_linked_service.py deleted file mode 100644 index c9fa8239b452..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/google_big_query_linked_service.py +++ /dev/null @@ -1,124 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class GoogleBigQueryLinkedService(LinkedService): - """Google BigQuery service linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param project: Required. The default BigQuery project to query against. - :type project: object - :param additional_projects: A comma-separated list of public BigQuery - projects to access. - :type additional_projects: object - :param request_google_drive_scope: Whether to request access to Google - Drive. Allowing Google Drive access enables support for federated tables - that combine BigQuery data with data from Google Drive. The default value - is false. - :type request_google_drive_scope: object - :param authentication_type: Required. The OAuth 2.0 authentication - mechanism used for authentication. ServiceAuthentication can only be used - on self-hosted IR. Possible values include: 'ServiceAuthentication', - 'UserAuthentication' - :type authentication_type: str or - ~azure.mgmt.datafactory.models.GoogleBigQueryAuthenticationType - :param refresh_token: The refresh token obtained from Google for - authorizing access to BigQuery for UserAuthentication. - :type refresh_token: ~azure.mgmt.datafactory.models.SecretBase - :param client_id: The client id of the google application used to acquire - the refresh token. - :type client_id: ~azure.mgmt.datafactory.models.SecretBase - :param client_secret: The client secret of the google application used to - acquire the refresh token. - :type client_secret: ~azure.mgmt.datafactory.models.SecretBase - :param email: The service account email ID that is used for - ServiceAuthentication and can only be used on self-hosted IR. - :type email: object - :param key_file_path: The full path to the .p12 key file that is used to - authenticate the service account email address and can only be used on - self-hosted IR. - :type key_file_path: object - :param trusted_cert_path: The full path of the .pem file containing - trusted CA certificates for verifying the server when connecting over SSL. - This property can only be set when using SSL on self-hosted IR. The - default value is the cacerts.pem file installed with the IR. - :type trusted_cert_path: object - :param use_system_trust_store: Specifies whether to use a CA certificate - from the system trust store or from a specified PEM file. The default - value is false. - :type use_system_trust_store: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'project': {'required': True}, - 'authentication_type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'project': {'key': 'typeProperties.project', 'type': 'object'}, - 'additional_projects': {'key': 'typeProperties.additionalProjects', 'type': 'object'}, - 'request_google_drive_scope': {'key': 'typeProperties.requestGoogleDriveScope', 'type': 'object'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, - 'refresh_token': {'key': 'typeProperties.refreshToken', 'type': 'SecretBase'}, - 'client_id': {'key': 'typeProperties.clientId', 'type': 'SecretBase'}, - 'client_secret': {'key': 'typeProperties.clientSecret', 'type': 'SecretBase'}, - 'email': {'key': 'typeProperties.email', 'type': 'object'}, - 'key_file_path': {'key': 'typeProperties.keyFilePath', 'type': 'object'}, - 'trusted_cert_path': {'key': 'typeProperties.trustedCertPath', 'type': 'object'}, - 'use_system_trust_store': {'key': 'typeProperties.useSystemTrustStore', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(GoogleBigQueryLinkedService, self).__init__(**kwargs) - self.project = kwargs.get('project', None) - self.additional_projects = kwargs.get('additional_projects', None) - self.request_google_drive_scope = kwargs.get('request_google_drive_scope', None) - self.authentication_type = kwargs.get('authentication_type', None) - self.refresh_token = kwargs.get('refresh_token', None) - self.client_id = kwargs.get('client_id', None) - self.client_secret = kwargs.get('client_secret', None) - self.email = kwargs.get('email', None) - self.key_file_path = kwargs.get('key_file_path', None) - self.trusted_cert_path = kwargs.get('trusted_cert_path', None) - self.use_system_trust_store = kwargs.get('use_system_trust_store', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'GoogleBigQuery' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/google_big_query_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/google_big_query_linked_service_py3.py deleted file mode 100644 index a8582aca98b5..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/google_big_query_linked_service_py3.py +++ /dev/null @@ -1,124 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class GoogleBigQueryLinkedService(LinkedService): - """Google BigQuery service linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param project: Required. The default BigQuery project to query against. - :type project: object - :param additional_projects: A comma-separated list of public BigQuery - projects to access. - :type additional_projects: object - :param request_google_drive_scope: Whether to request access to Google - Drive. Allowing Google Drive access enables support for federated tables - that combine BigQuery data with data from Google Drive. The default value - is false. - :type request_google_drive_scope: object - :param authentication_type: Required. The OAuth 2.0 authentication - mechanism used for authentication. ServiceAuthentication can only be used - on self-hosted IR. Possible values include: 'ServiceAuthentication', - 'UserAuthentication' - :type authentication_type: str or - ~azure.mgmt.datafactory.models.GoogleBigQueryAuthenticationType - :param refresh_token: The refresh token obtained from Google for - authorizing access to BigQuery for UserAuthentication. - :type refresh_token: ~azure.mgmt.datafactory.models.SecretBase - :param client_id: The client id of the google application used to acquire - the refresh token. - :type client_id: ~azure.mgmt.datafactory.models.SecretBase - :param client_secret: The client secret of the google application used to - acquire the refresh token. - :type client_secret: ~azure.mgmt.datafactory.models.SecretBase - :param email: The service account email ID that is used for - ServiceAuthentication and can only be used on self-hosted IR. - :type email: object - :param key_file_path: The full path to the .p12 key file that is used to - authenticate the service account email address and can only be used on - self-hosted IR. - :type key_file_path: object - :param trusted_cert_path: The full path of the .pem file containing - trusted CA certificates for verifying the server when connecting over SSL. - This property can only be set when using SSL on self-hosted IR. The - default value is the cacerts.pem file installed with the IR. - :type trusted_cert_path: object - :param use_system_trust_store: Specifies whether to use a CA certificate - from the system trust store or from a specified PEM file. The default - value is false. - :type use_system_trust_store: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'project': {'required': True}, - 'authentication_type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'project': {'key': 'typeProperties.project', 'type': 'object'}, - 'additional_projects': {'key': 'typeProperties.additionalProjects', 'type': 'object'}, - 'request_google_drive_scope': {'key': 'typeProperties.requestGoogleDriveScope', 'type': 'object'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, - 'refresh_token': {'key': 'typeProperties.refreshToken', 'type': 'SecretBase'}, - 'client_id': {'key': 'typeProperties.clientId', 'type': 'SecretBase'}, - 'client_secret': {'key': 'typeProperties.clientSecret', 'type': 'SecretBase'}, - 'email': {'key': 'typeProperties.email', 'type': 'object'}, - 'key_file_path': {'key': 'typeProperties.keyFilePath', 'type': 'object'}, - 'trusted_cert_path': {'key': 'typeProperties.trustedCertPath', 'type': 'object'}, - 'use_system_trust_store': {'key': 'typeProperties.useSystemTrustStore', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, project, authentication_type, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, additional_projects=None, request_google_drive_scope=None, refresh_token=None, client_id=None, client_secret=None, email=None, key_file_path=None, trusted_cert_path=None, use_system_trust_store=None, encrypted_credential=None, **kwargs) -> None: - super(GoogleBigQueryLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.project = project - self.additional_projects = additional_projects - self.request_google_drive_scope = request_google_drive_scope - self.authentication_type = authentication_type - self.refresh_token = refresh_token - self.client_id = client_id - self.client_secret = client_secret - self.email = email - self.key_file_path = key_file_path - self.trusted_cert_path = trusted_cert_path - self.use_system_trust_store = use_system_trust_store - self.encrypted_credential = encrypted_credential - self.type = 'GoogleBigQuery' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/google_big_query_object_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/google_big_query_object_dataset.py deleted file mode 100644 index 5750875dc3a0..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/google_big_query_object_dataset.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class GoogleBigQueryObjectDataset(Dataset): - """Google BigQuery service dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(GoogleBigQueryObjectDataset, self).__init__(**kwargs) - self.table_name = kwargs.get('table_name', None) - self.type = 'GoogleBigQueryObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/google_big_query_object_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/google_big_query_object_dataset_py3.py deleted file mode 100644 index 625cd068b731..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/google_big_query_object_dataset_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class GoogleBigQueryObjectDataset(Dataset): - """Google BigQuery service dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: - super(GoogleBigQueryObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.table_name = table_name - self.type = 'GoogleBigQueryObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/google_big_query_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/google_big_query_source.py deleted file mode 100644 index c0598d88a6ed..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/google_big_query_source.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class GoogleBigQuerySource(CopySource): - """A copy activity Google BigQuery service source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(GoogleBigQuerySource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.type = 'GoogleBigQuerySource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/google_big_query_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/google_big_query_source_py3.py deleted file mode 100644 index eb5727bd43a5..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/google_big_query_source_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class GoogleBigQuerySource(CopySource): - """A copy activity Google BigQuery service source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query=None, **kwargs) -> None: - super(GoogleBigQuerySource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.type = 'GoogleBigQuerySource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/greenplum_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/greenplum_linked_service.py deleted file mode 100644 index d3de7ccab502..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/greenplum_linked_service.py +++ /dev/null @@ -1,69 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class GreenplumLinkedService(LinkedService): - """Greenplum Database linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param connection_string: An ODBC connection string. Type: string, - SecureString or AzureKeyVaultSecretReference. - :type connection_string: object - :param pwd: The Azure key vault secret reference of password in connection - string. - :type pwd: ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, - 'pwd': {'key': 'typeProperties.pwd', 'type': 'AzureKeyVaultSecretReference'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(GreenplumLinkedService, self).__init__(**kwargs) - self.connection_string = kwargs.get('connection_string', None) - self.pwd = kwargs.get('pwd', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'Greenplum' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/greenplum_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/greenplum_linked_service_py3.py deleted file mode 100644 index 886d38718ecd..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/greenplum_linked_service_py3.py +++ /dev/null @@ -1,69 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class GreenplumLinkedService(LinkedService): - """Greenplum Database linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param connection_string: An ODBC connection string. Type: string, - SecureString or AzureKeyVaultSecretReference. - :type connection_string: object - :param pwd: The Azure key vault secret reference of password in connection - string. - :type pwd: ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, - 'pwd': {'key': 'typeProperties.pwd', 'type': 'AzureKeyVaultSecretReference'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, connection_string=None, pwd=None, encrypted_credential=None, **kwargs) -> None: - super(GreenplumLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.connection_string = connection_string - self.pwd = pwd - self.encrypted_credential = encrypted_credential - self.type = 'Greenplum' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/greenplum_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/greenplum_source.py deleted file mode 100644 index a463ff2c3482..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/greenplum_source.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class GreenplumSource(CopySource): - """A copy activity Greenplum Database source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(GreenplumSource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.type = 'GreenplumSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/greenplum_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/greenplum_source_py3.py deleted file mode 100644 index 6a373bf9d6ae..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/greenplum_source_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class GreenplumSource(CopySource): - """A copy activity Greenplum Database source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query=None, **kwargs) -> None: - super(GreenplumSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.type = 'GreenplumSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/greenplum_table_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/greenplum_table_dataset.py deleted file mode 100644 index fa4a066f11a9..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/greenplum_table_dataset.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class GreenplumTableDataset(Dataset): - """Greenplum Database dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(GreenplumTableDataset, self).__init__(**kwargs) - self.table_name = kwargs.get('table_name', None) - self.type = 'GreenplumTable' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/greenplum_table_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/greenplum_table_dataset_py3.py deleted file mode 100644 index 7c698db22339..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/greenplum_table_dataset_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class GreenplumTableDataset(Dataset): - """Greenplum Database dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: - super(GreenplumTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.table_name = table_name - self.type = 'GreenplumTable' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hbase_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hbase_linked_service.py deleted file mode 100644 index 4d7f3bf5ccb6..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hbase_linked_service.py +++ /dev/null @@ -1,114 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class HBaseLinkedService(LinkedService): - """HBase server linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param host: Required. The IP address or host name of the HBase server. - (i.e. 192.168.222.160) - :type host: object - :param port: The TCP port that the HBase instance uses to listen for - client connections. The default value is 9090. - :type port: object - :param http_path: The partial URL corresponding to the HBase server. (i.e. - /gateway/sandbox/hbase/version) - :type http_path: object - :param authentication_type: Required. The authentication mechanism to use - to connect to the HBase server. Possible values include: 'Anonymous', - 'Basic' - :type authentication_type: str or - ~azure.mgmt.datafactory.models.HBaseAuthenticationType - :param username: The user name used to connect to the HBase instance. - :type username: object - :param password: The password corresponding to the user name. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param enable_ssl: Specifies whether the connections to the server are - encrypted using SSL. The default value is false. - :type enable_ssl: object - :param trusted_cert_path: The full path of the .pem file containing - trusted CA certificates for verifying the server when connecting over SSL. - This property can only be set when using SSL on self-hosted IR. The - default value is the cacerts.pem file installed with the IR. - :type trusted_cert_path: object - :param allow_host_name_cn_mismatch: Specifies whether to require a - CA-issued SSL certificate name to match the host name of the server when - connecting over SSL. The default value is false. - :type allow_host_name_cn_mismatch: object - :param allow_self_signed_server_cert: Specifies whether to allow - self-signed certificates from the server. The default value is false. - :type allow_self_signed_server_cert: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'host': {'required': True}, - 'authentication_type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'host': {'key': 'typeProperties.host', 'type': 'object'}, - 'port': {'key': 'typeProperties.port', 'type': 'object'}, - 'http_path': {'key': 'typeProperties.httpPath', 'type': 'object'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, - 'username': {'key': 'typeProperties.username', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'enable_ssl': {'key': 'typeProperties.enableSsl', 'type': 'object'}, - 'trusted_cert_path': {'key': 'typeProperties.trustedCertPath', 'type': 'object'}, - 'allow_host_name_cn_mismatch': {'key': 'typeProperties.allowHostNameCNMismatch', 'type': 'object'}, - 'allow_self_signed_server_cert': {'key': 'typeProperties.allowSelfSignedServerCert', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(HBaseLinkedService, self).__init__(**kwargs) - self.host = kwargs.get('host', None) - self.port = kwargs.get('port', None) - self.http_path = kwargs.get('http_path', None) - self.authentication_type = kwargs.get('authentication_type', None) - self.username = kwargs.get('username', None) - self.password = kwargs.get('password', None) - self.enable_ssl = kwargs.get('enable_ssl', None) - self.trusted_cert_path = kwargs.get('trusted_cert_path', None) - self.allow_host_name_cn_mismatch = kwargs.get('allow_host_name_cn_mismatch', None) - self.allow_self_signed_server_cert = kwargs.get('allow_self_signed_server_cert', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'HBase' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hbase_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hbase_linked_service_py3.py deleted file mode 100644 index 7963b3fc643c..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hbase_linked_service_py3.py +++ /dev/null @@ -1,114 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class HBaseLinkedService(LinkedService): - """HBase server linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param host: Required. The IP address or host name of the HBase server. - (i.e. 192.168.222.160) - :type host: object - :param port: The TCP port that the HBase instance uses to listen for - client connections. The default value is 9090. - :type port: object - :param http_path: The partial URL corresponding to the HBase server. (i.e. - /gateway/sandbox/hbase/version) - :type http_path: object - :param authentication_type: Required. The authentication mechanism to use - to connect to the HBase server. Possible values include: 'Anonymous', - 'Basic' - :type authentication_type: str or - ~azure.mgmt.datafactory.models.HBaseAuthenticationType - :param username: The user name used to connect to the HBase instance. - :type username: object - :param password: The password corresponding to the user name. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param enable_ssl: Specifies whether the connections to the server are - encrypted using SSL. The default value is false. - :type enable_ssl: object - :param trusted_cert_path: The full path of the .pem file containing - trusted CA certificates for verifying the server when connecting over SSL. - This property can only be set when using SSL on self-hosted IR. The - default value is the cacerts.pem file installed with the IR. - :type trusted_cert_path: object - :param allow_host_name_cn_mismatch: Specifies whether to require a - CA-issued SSL certificate name to match the host name of the server when - connecting over SSL. The default value is false. - :type allow_host_name_cn_mismatch: object - :param allow_self_signed_server_cert: Specifies whether to allow - self-signed certificates from the server. The default value is false. - :type allow_self_signed_server_cert: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'host': {'required': True}, - 'authentication_type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'host': {'key': 'typeProperties.host', 'type': 'object'}, - 'port': {'key': 'typeProperties.port', 'type': 'object'}, - 'http_path': {'key': 'typeProperties.httpPath', 'type': 'object'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, - 'username': {'key': 'typeProperties.username', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'enable_ssl': {'key': 'typeProperties.enableSsl', 'type': 'object'}, - 'trusted_cert_path': {'key': 'typeProperties.trustedCertPath', 'type': 'object'}, - 'allow_host_name_cn_mismatch': {'key': 'typeProperties.allowHostNameCNMismatch', 'type': 'object'}, - 'allow_self_signed_server_cert': {'key': 'typeProperties.allowSelfSignedServerCert', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, host, authentication_type, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, port=None, http_path=None, username=None, password=None, enable_ssl=None, trusted_cert_path=None, allow_host_name_cn_mismatch=None, allow_self_signed_server_cert=None, encrypted_credential=None, **kwargs) -> None: - super(HBaseLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.host = host - self.port = port - self.http_path = http_path - self.authentication_type = authentication_type - self.username = username - self.password = password - self.enable_ssl = enable_ssl - self.trusted_cert_path = trusted_cert_path - self.allow_host_name_cn_mismatch = allow_host_name_cn_mismatch - self.allow_self_signed_server_cert = allow_self_signed_server_cert - self.encrypted_credential = encrypted_credential - self.type = 'HBase' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hbase_object_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hbase_object_dataset.py deleted file mode 100644 index 5de32bcb6871..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hbase_object_dataset.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class HBaseObjectDataset(Dataset): - """HBase server dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(HBaseObjectDataset, self).__init__(**kwargs) - self.table_name = kwargs.get('table_name', None) - self.type = 'HBaseObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hbase_object_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hbase_object_dataset_py3.py deleted file mode 100644 index 27fc0d1514ea..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hbase_object_dataset_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class HBaseObjectDataset(Dataset): - """HBase server dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: - super(HBaseObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.table_name = table_name - self.type = 'HBaseObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hbase_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hbase_source.py deleted file mode 100644 index cc2c4fd1a843..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hbase_source.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class HBaseSource(CopySource): - """A copy activity HBase server source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(HBaseSource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.type = 'HBaseSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hbase_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hbase_source_py3.py deleted file mode 100644 index c17d8cf07003..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hbase_source_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class HBaseSource(CopySource): - """A copy activity HBase server source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query=None, **kwargs) -> None: - super(HBaseSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.type = 'HBaseSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_hive_activity.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_hive_activity.py deleted file mode 100644 index 4110b0f8b7de..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_hive_activity.py +++ /dev/null @@ -1,96 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity import ExecutionActivity - - -class HDInsightHiveActivity(ExecutionActivity): - """HDInsight Hive activity type. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param storage_linked_services: Storage linked service references. - :type storage_linked_services: - list[~azure.mgmt.datafactory.models.LinkedServiceReference] - :param arguments: User specified arguments to HDInsightActivity. - :type arguments: list[object] - :param get_debug_info: Debug info option. Possible values include: 'None', - 'Always', 'Failure' - :type get_debug_info: str or - ~azure.mgmt.datafactory.models.HDInsightActivityDebugInfoOption - :param script_path: Script path. Type: string (or Expression with - resultType string). - :type script_path: object - :param script_linked_service: Script linked service reference. - :type script_linked_service: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param defines: Allows user to specify defines for Hive job request. - :type defines: dict[str, object] - :param variables: User specified arguments under hivevar namespace. - :type variables: list[object] - :param query_timeout: Query timeout value (in minutes). Effective when - the HDInsight cluster is with ESP (Enterprise Security Package) - :type query_timeout: int - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'storage_linked_services': {'key': 'typeProperties.storageLinkedServices', 'type': '[LinkedServiceReference]'}, - 'arguments': {'key': 'typeProperties.arguments', 'type': '[object]'}, - 'get_debug_info': {'key': 'typeProperties.getDebugInfo', 'type': 'str'}, - 'script_path': {'key': 'typeProperties.scriptPath', 'type': 'object'}, - 'script_linked_service': {'key': 'typeProperties.scriptLinkedService', 'type': 'LinkedServiceReference'}, - 'defines': {'key': 'typeProperties.defines', 'type': '{object}'}, - 'variables': {'key': 'typeProperties.variables', 'type': '[object]'}, - 'query_timeout': {'key': 'typeProperties.queryTimeout', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(HDInsightHiveActivity, self).__init__(**kwargs) - self.storage_linked_services = kwargs.get('storage_linked_services', None) - self.arguments = kwargs.get('arguments', None) - self.get_debug_info = kwargs.get('get_debug_info', None) - self.script_path = kwargs.get('script_path', None) - self.script_linked_service = kwargs.get('script_linked_service', None) - self.defines = kwargs.get('defines', None) - self.variables = kwargs.get('variables', None) - self.query_timeout = kwargs.get('query_timeout', None) - self.type = 'HDInsightHive' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_hive_activity_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_hive_activity_py3.py deleted file mode 100644 index f8a5441fe767..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_hive_activity_py3.py +++ /dev/null @@ -1,96 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity_py3 import ExecutionActivity - - -class HDInsightHiveActivity(ExecutionActivity): - """HDInsight Hive activity type. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param storage_linked_services: Storage linked service references. - :type storage_linked_services: - list[~azure.mgmt.datafactory.models.LinkedServiceReference] - :param arguments: User specified arguments to HDInsightActivity. - :type arguments: list[object] - :param get_debug_info: Debug info option. Possible values include: 'None', - 'Always', 'Failure' - :type get_debug_info: str or - ~azure.mgmt.datafactory.models.HDInsightActivityDebugInfoOption - :param script_path: Script path. Type: string (or Expression with - resultType string). - :type script_path: object - :param script_linked_service: Script linked service reference. - :type script_linked_service: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param defines: Allows user to specify defines for Hive job request. - :type defines: dict[str, object] - :param variables: User specified arguments under hivevar namespace. - :type variables: list[object] - :param query_timeout: Query timeout value (in minutes). Effective when - the HDInsight cluster is with ESP (Enterprise Security Package) - :type query_timeout: int - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'storage_linked_services': {'key': 'typeProperties.storageLinkedServices', 'type': '[LinkedServiceReference]'}, - 'arguments': {'key': 'typeProperties.arguments', 'type': '[object]'}, - 'get_debug_info': {'key': 'typeProperties.getDebugInfo', 'type': 'str'}, - 'script_path': {'key': 'typeProperties.scriptPath', 'type': 'object'}, - 'script_linked_service': {'key': 'typeProperties.scriptLinkedService', 'type': 'LinkedServiceReference'}, - 'defines': {'key': 'typeProperties.defines', 'type': '{object}'}, - 'variables': {'key': 'typeProperties.variables', 'type': '[object]'}, - 'query_timeout': {'key': 'typeProperties.queryTimeout', 'type': 'int'}, - } - - def __init__(self, *, name: str, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, storage_linked_services=None, arguments=None, get_debug_info=None, script_path=None, script_linked_service=None, defines=None, variables=None, query_timeout: int=None, **kwargs) -> None: - super(HDInsightHiveActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) - self.storage_linked_services = storage_linked_services - self.arguments = arguments - self.get_debug_info = get_debug_info - self.script_path = script_path - self.script_linked_service = script_linked_service - self.defines = defines - self.variables = variables - self.query_timeout = query_timeout - self.type = 'HDInsightHive' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_linked_service.py deleted file mode 100644 index b18a138a855e..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_linked_service.py +++ /dev/null @@ -1,90 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class HDInsightLinkedService(LinkedService): - """HDInsight linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param cluster_uri: Required. HDInsight cluster URI. Type: string (or - Expression with resultType string). - :type cluster_uri: object - :param user_name: HDInsight cluster user name. Type: string (or Expression - with resultType string). - :type user_name: object - :param password: HDInsight cluster password. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param linked_service_name: The Azure Storage linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param hcatalog_linked_service_name: A reference to the Azure SQL linked - service that points to the HCatalog database. - :type hcatalog_linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - :param is_esp_enabled: Specify if the HDInsight is created with ESP - (Enterprise Security Package). Type: Boolean. - :type is_esp_enabled: object - """ - - _validation = { - 'type': {'required': True}, - 'cluster_uri': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'cluster_uri': {'key': 'typeProperties.clusterUri', 'type': 'object'}, - 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'linked_service_name': {'key': 'typeProperties.linkedServiceName', 'type': 'LinkedServiceReference'}, - 'hcatalog_linked_service_name': {'key': 'typeProperties.hcatalogLinkedServiceName', 'type': 'LinkedServiceReference'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - 'is_esp_enabled': {'key': 'typeProperties.isEspEnabled', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(HDInsightLinkedService, self).__init__(**kwargs) - self.cluster_uri = kwargs.get('cluster_uri', None) - self.user_name = kwargs.get('user_name', None) - self.password = kwargs.get('password', None) - self.linked_service_name = kwargs.get('linked_service_name', None) - self.hcatalog_linked_service_name = kwargs.get('hcatalog_linked_service_name', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.is_esp_enabled = kwargs.get('is_esp_enabled', None) - self.type = 'HDInsight' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_linked_service_py3.py deleted file mode 100644 index 769cf031a403..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_linked_service_py3.py +++ /dev/null @@ -1,90 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class HDInsightLinkedService(LinkedService): - """HDInsight linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param cluster_uri: Required. HDInsight cluster URI. Type: string (or - Expression with resultType string). - :type cluster_uri: object - :param user_name: HDInsight cluster user name. Type: string (or Expression - with resultType string). - :type user_name: object - :param password: HDInsight cluster password. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param linked_service_name: The Azure Storage linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param hcatalog_linked_service_name: A reference to the Azure SQL linked - service that points to the HCatalog database. - :type hcatalog_linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - :param is_esp_enabled: Specify if the HDInsight is created with ESP - (Enterprise Security Package). Type: Boolean. - :type is_esp_enabled: object - """ - - _validation = { - 'type': {'required': True}, - 'cluster_uri': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'cluster_uri': {'key': 'typeProperties.clusterUri', 'type': 'object'}, - 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'linked_service_name': {'key': 'typeProperties.linkedServiceName', 'type': 'LinkedServiceReference'}, - 'hcatalog_linked_service_name': {'key': 'typeProperties.hcatalogLinkedServiceName', 'type': 'LinkedServiceReference'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - 'is_esp_enabled': {'key': 'typeProperties.isEspEnabled', 'type': 'object'}, - } - - def __init__(self, *, cluster_uri, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, user_name=None, password=None, linked_service_name=None, hcatalog_linked_service_name=None, encrypted_credential=None, is_esp_enabled=None, **kwargs) -> None: - super(HDInsightLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.cluster_uri = cluster_uri - self.user_name = user_name - self.password = password - self.linked_service_name = linked_service_name - self.hcatalog_linked_service_name = hcatalog_linked_service_name - self.encrypted_credential = encrypted_credential - self.is_esp_enabled = is_esp_enabled - self.type = 'HDInsight' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_map_reduce_activity.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_map_reduce_activity.py deleted file mode 100644 index 20655843e1db..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_map_reduce_activity.py +++ /dev/null @@ -1,99 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity import ExecutionActivity - - -class HDInsightMapReduceActivity(ExecutionActivity): - """HDInsight MapReduce activity type. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param storage_linked_services: Storage linked service references. - :type storage_linked_services: - list[~azure.mgmt.datafactory.models.LinkedServiceReference] - :param arguments: User specified arguments to HDInsightActivity. - :type arguments: list[object] - :param get_debug_info: Debug info option. Possible values include: 'None', - 'Always', 'Failure' - :type get_debug_info: str or - ~azure.mgmt.datafactory.models.HDInsightActivityDebugInfoOption - :param class_name: Required. Class name. Type: string (or Expression with - resultType string). - :type class_name: object - :param jar_file_path: Required. Jar path. Type: string (or Expression with - resultType string). - :type jar_file_path: object - :param jar_linked_service: Jar linked service reference. - :type jar_linked_service: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param jar_libs: Jar libs. - :type jar_libs: list[object] - :param defines: Allows user to specify defines for the MapReduce job - request. - :type defines: dict[str, object] - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'class_name': {'required': True}, - 'jar_file_path': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'storage_linked_services': {'key': 'typeProperties.storageLinkedServices', 'type': '[LinkedServiceReference]'}, - 'arguments': {'key': 'typeProperties.arguments', 'type': '[object]'}, - 'get_debug_info': {'key': 'typeProperties.getDebugInfo', 'type': 'str'}, - 'class_name': {'key': 'typeProperties.className', 'type': 'object'}, - 'jar_file_path': {'key': 'typeProperties.jarFilePath', 'type': 'object'}, - 'jar_linked_service': {'key': 'typeProperties.jarLinkedService', 'type': 'LinkedServiceReference'}, - 'jar_libs': {'key': 'typeProperties.jarLibs', 'type': '[object]'}, - 'defines': {'key': 'typeProperties.defines', 'type': '{object}'}, - } - - def __init__(self, **kwargs): - super(HDInsightMapReduceActivity, self).__init__(**kwargs) - self.storage_linked_services = kwargs.get('storage_linked_services', None) - self.arguments = kwargs.get('arguments', None) - self.get_debug_info = kwargs.get('get_debug_info', None) - self.class_name = kwargs.get('class_name', None) - self.jar_file_path = kwargs.get('jar_file_path', None) - self.jar_linked_service = kwargs.get('jar_linked_service', None) - self.jar_libs = kwargs.get('jar_libs', None) - self.defines = kwargs.get('defines', None) - self.type = 'HDInsightMapReduce' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_map_reduce_activity_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_map_reduce_activity_py3.py deleted file mode 100644 index dffa9f119069..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_map_reduce_activity_py3.py +++ /dev/null @@ -1,99 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity_py3 import ExecutionActivity - - -class HDInsightMapReduceActivity(ExecutionActivity): - """HDInsight MapReduce activity type. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param storage_linked_services: Storage linked service references. - :type storage_linked_services: - list[~azure.mgmt.datafactory.models.LinkedServiceReference] - :param arguments: User specified arguments to HDInsightActivity. - :type arguments: list[object] - :param get_debug_info: Debug info option. Possible values include: 'None', - 'Always', 'Failure' - :type get_debug_info: str or - ~azure.mgmt.datafactory.models.HDInsightActivityDebugInfoOption - :param class_name: Required. Class name. Type: string (or Expression with - resultType string). - :type class_name: object - :param jar_file_path: Required. Jar path. Type: string (or Expression with - resultType string). - :type jar_file_path: object - :param jar_linked_service: Jar linked service reference. - :type jar_linked_service: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param jar_libs: Jar libs. - :type jar_libs: list[object] - :param defines: Allows user to specify defines for the MapReduce job - request. - :type defines: dict[str, object] - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'class_name': {'required': True}, - 'jar_file_path': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'storage_linked_services': {'key': 'typeProperties.storageLinkedServices', 'type': '[LinkedServiceReference]'}, - 'arguments': {'key': 'typeProperties.arguments', 'type': '[object]'}, - 'get_debug_info': {'key': 'typeProperties.getDebugInfo', 'type': 'str'}, - 'class_name': {'key': 'typeProperties.className', 'type': 'object'}, - 'jar_file_path': {'key': 'typeProperties.jarFilePath', 'type': 'object'}, - 'jar_linked_service': {'key': 'typeProperties.jarLinkedService', 'type': 'LinkedServiceReference'}, - 'jar_libs': {'key': 'typeProperties.jarLibs', 'type': '[object]'}, - 'defines': {'key': 'typeProperties.defines', 'type': '{object}'}, - } - - def __init__(self, *, name: str, class_name, jar_file_path, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, storage_linked_services=None, arguments=None, get_debug_info=None, jar_linked_service=None, jar_libs=None, defines=None, **kwargs) -> None: - super(HDInsightMapReduceActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) - self.storage_linked_services = storage_linked_services - self.arguments = arguments - self.get_debug_info = get_debug_info - self.class_name = class_name - self.jar_file_path = jar_file_path - self.jar_linked_service = jar_linked_service - self.jar_libs = jar_libs - self.defines = defines - self.type = 'HDInsightMapReduce' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_on_demand_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_on_demand_linked_service.py deleted file mode 100644 index bd84aabc5012..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_on_demand_linked_service.py +++ /dev/null @@ -1,225 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class HDInsightOnDemandLinkedService(LinkedService): - """HDInsight ondemand linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param cluster_size: Required. Number of worker/data nodes in the cluster. - Suggestion value: 4. Type: string (or Expression with resultType string). - :type cluster_size: object - :param time_to_live: Required. The allowed idle time for the on-demand - HDInsight cluster. Specifies how long the on-demand HDInsight cluster - stays alive after completion of an activity run if there are no other - active jobs in the cluster. The minimum value is 5 mins. Type: string (or - Expression with resultType string). - :type time_to_live: object - :param version: Required. Version of the HDInsight cluster.  Type: string - (or Expression with resultType string). - :type version: object - :param linked_service_name: Required. Azure Storage linked service to be - used by the on-demand cluster for storing and processing data. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param host_subscription_id: Required. The customer’s subscription to host - the cluster. Type: string (or Expression with resultType string). - :type host_subscription_id: object - :param service_principal_id: The service principal id for the - hostSubscriptionId. Type: string (or Expression with resultType string). - :type service_principal_id: object - :param service_principal_key: The key for the service principal id. - :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase - :param tenant: Required. The Tenant id/name to which the service principal - belongs. Type: string (or Expression with resultType string). - :type tenant: object - :param cluster_resource_group: Required. The resource group where the - cluster belongs. Type: string (or Expression with resultType string). - :type cluster_resource_group: object - :param cluster_name_prefix: The prefix of cluster name, postfix will be - distinct with timestamp. Type: string (or Expression with resultType - string). - :type cluster_name_prefix: object - :param cluster_user_name: The username to access the cluster. Type: string - (or Expression with resultType string). - :type cluster_user_name: object - :param cluster_password: The password to access the cluster. - :type cluster_password: ~azure.mgmt.datafactory.models.SecretBase - :param cluster_ssh_user_name: The username to SSH remotely connect to - cluster’s node (for Linux). Type: string (or Expression with resultType - string). - :type cluster_ssh_user_name: object - :param cluster_ssh_password: The password to SSH remotely connect - cluster’s node (for Linux). - :type cluster_ssh_password: ~azure.mgmt.datafactory.models.SecretBase - :param additional_linked_service_names: Specifies additional storage - accounts for the HDInsight linked service so that the Data Factory service - can register them on your behalf. - :type additional_linked_service_names: - list[~azure.mgmt.datafactory.models.LinkedServiceReference] - :param hcatalog_linked_service_name: The name of Azure SQL linked service - that point to the HCatalog database. The on-demand HDInsight cluster is - created by using the Azure SQL database as the metastore. - :type hcatalog_linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param cluster_type: The cluster type. Type: string (or Expression with - resultType string). - :type cluster_type: object - :param spark_version: The version of spark if the cluster type is 'spark'. - Type: string (or Expression with resultType string). - :type spark_version: object - :param core_configuration: Specifies the core configuration parameters (as - in core-site.xml) for the HDInsight cluster to be created. - :type core_configuration: object - :param h_base_configuration: Specifies the HBase configuration parameters - (hbase-site.xml) for the HDInsight cluster. - :type h_base_configuration: object - :param hdfs_configuration: Specifies the HDFS configuration parameters - (hdfs-site.xml) for the HDInsight cluster. - :type hdfs_configuration: object - :param hive_configuration: Specifies the hive configuration parameters - (hive-site.xml) for the HDInsight cluster. - :type hive_configuration: object - :param map_reduce_configuration: Specifies the MapReduce configuration - parameters (mapred-site.xml) for the HDInsight cluster. - :type map_reduce_configuration: object - :param oozie_configuration: Specifies the Oozie configuration parameters - (oozie-site.xml) for the HDInsight cluster. - :type oozie_configuration: object - :param storm_configuration: Specifies the Storm configuration parameters - (storm-site.xml) for the HDInsight cluster. - :type storm_configuration: object - :param yarn_configuration: Specifies the Yarn configuration parameters - (yarn-site.xml) for the HDInsight cluster. - :type yarn_configuration: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - :param head_node_size: Specifies the size of the head node for the - HDInsight cluster. - :type head_node_size: object - :param data_node_size: Specifies the size of the data node for the - HDInsight cluster. - :type data_node_size: object - :param zookeeper_node_size: Specifies the size of the Zoo Keeper node for - the HDInsight cluster. - :type zookeeper_node_size: object - :param script_actions: Custom script actions to run on HDI ondemand - cluster once it's up. Please refer to - https://docs.microsoft.com/en-us/azure/hdinsight/hdinsight-hadoop-customize-cluster-linux?toc=%2Fen-us%2Fazure%2Fhdinsight%2Fr-server%2FTOC.json&bc=%2Fen-us%2Fazure%2Fbread%2Ftoc.json#understanding-script-actions. - :type script_actions: list[~azure.mgmt.datafactory.models.ScriptAction] - """ - - _validation = { - 'type': {'required': True}, - 'cluster_size': {'required': True}, - 'time_to_live': {'required': True}, - 'version': {'required': True}, - 'linked_service_name': {'required': True}, - 'host_subscription_id': {'required': True}, - 'tenant': {'required': True}, - 'cluster_resource_group': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'cluster_size': {'key': 'typeProperties.clusterSize', 'type': 'object'}, - 'time_to_live': {'key': 'typeProperties.timeToLive', 'type': 'object'}, - 'version': {'key': 'typeProperties.version', 'type': 'object'}, - 'linked_service_name': {'key': 'typeProperties.linkedServiceName', 'type': 'LinkedServiceReference'}, - 'host_subscription_id': {'key': 'typeProperties.hostSubscriptionId', 'type': 'object'}, - 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, - 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, - 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, - 'cluster_resource_group': {'key': 'typeProperties.clusterResourceGroup', 'type': 'object'}, - 'cluster_name_prefix': {'key': 'typeProperties.clusterNamePrefix', 'type': 'object'}, - 'cluster_user_name': {'key': 'typeProperties.clusterUserName', 'type': 'object'}, - 'cluster_password': {'key': 'typeProperties.clusterPassword', 'type': 'SecretBase'}, - 'cluster_ssh_user_name': {'key': 'typeProperties.clusterSshUserName', 'type': 'object'}, - 'cluster_ssh_password': {'key': 'typeProperties.clusterSshPassword', 'type': 'SecretBase'}, - 'additional_linked_service_names': {'key': 'typeProperties.additionalLinkedServiceNames', 'type': '[LinkedServiceReference]'}, - 'hcatalog_linked_service_name': {'key': 'typeProperties.hcatalogLinkedServiceName', 'type': 'LinkedServiceReference'}, - 'cluster_type': {'key': 'typeProperties.clusterType', 'type': 'object'}, - 'spark_version': {'key': 'typeProperties.sparkVersion', 'type': 'object'}, - 'core_configuration': {'key': 'typeProperties.coreConfiguration', 'type': 'object'}, - 'h_base_configuration': {'key': 'typeProperties.hBaseConfiguration', 'type': 'object'}, - 'hdfs_configuration': {'key': 'typeProperties.hdfsConfiguration', 'type': 'object'}, - 'hive_configuration': {'key': 'typeProperties.hiveConfiguration', 'type': 'object'}, - 'map_reduce_configuration': {'key': 'typeProperties.mapReduceConfiguration', 'type': 'object'}, - 'oozie_configuration': {'key': 'typeProperties.oozieConfiguration', 'type': 'object'}, - 'storm_configuration': {'key': 'typeProperties.stormConfiguration', 'type': 'object'}, - 'yarn_configuration': {'key': 'typeProperties.yarnConfiguration', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - 'head_node_size': {'key': 'typeProperties.headNodeSize', 'type': 'object'}, - 'data_node_size': {'key': 'typeProperties.dataNodeSize', 'type': 'object'}, - 'zookeeper_node_size': {'key': 'typeProperties.zookeeperNodeSize', 'type': 'object'}, - 'script_actions': {'key': 'typeProperties.scriptActions', 'type': '[ScriptAction]'}, - } - - def __init__(self, **kwargs): - super(HDInsightOnDemandLinkedService, self).__init__(**kwargs) - self.cluster_size = kwargs.get('cluster_size', None) - self.time_to_live = kwargs.get('time_to_live', None) - self.version = kwargs.get('version', None) - self.linked_service_name = kwargs.get('linked_service_name', None) - self.host_subscription_id = kwargs.get('host_subscription_id', None) - self.service_principal_id = kwargs.get('service_principal_id', None) - self.service_principal_key = kwargs.get('service_principal_key', None) - self.tenant = kwargs.get('tenant', None) - self.cluster_resource_group = kwargs.get('cluster_resource_group', None) - self.cluster_name_prefix = kwargs.get('cluster_name_prefix', None) - self.cluster_user_name = kwargs.get('cluster_user_name', None) - self.cluster_password = kwargs.get('cluster_password', None) - self.cluster_ssh_user_name = kwargs.get('cluster_ssh_user_name', None) - self.cluster_ssh_password = kwargs.get('cluster_ssh_password', None) - self.additional_linked_service_names = kwargs.get('additional_linked_service_names', None) - self.hcatalog_linked_service_name = kwargs.get('hcatalog_linked_service_name', None) - self.cluster_type = kwargs.get('cluster_type', None) - self.spark_version = kwargs.get('spark_version', None) - self.core_configuration = kwargs.get('core_configuration', None) - self.h_base_configuration = kwargs.get('h_base_configuration', None) - self.hdfs_configuration = kwargs.get('hdfs_configuration', None) - self.hive_configuration = kwargs.get('hive_configuration', None) - self.map_reduce_configuration = kwargs.get('map_reduce_configuration', None) - self.oozie_configuration = kwargs.get('oozie_configuration', None) - self.storm_configuration = kwargs.get('storm_configuration', None) - self.yarn_configuration = kwargs.get('yarn_configuration', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.head_node_size = kwargs.get('head_node_size', None) - self.data_node_size = kwargs.get('data_node_size', None) - self.zookeeper_node_size = kwargs.get('zookeeper_node_size', None) - self.script_actions = kwargs.get('script_actions', None) - self.type = 'HDInsightOnDemand' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_on_demand_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_on_demand_linked_service_py3.py deleted file mode 100644 index 5566a022bda2..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_on_demand_linked_service_py3.py +++ /dev/null @@ -1,225 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class HDInsightOnDemandLinkedService(LinkedService): - """HDInsight ondemand linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param cluster_size: Required. Number of worker/data nodes in the cluster. - Suggestion value: 4. Type: string (or Expression with resultType string). - :type cluster_size: object - :param time_to_live: Required. The allowed idle time for the on-demand - HDInsight cluster. Specifies how long the on-demand HDInsight cluster - stays alive after completion of an activity run if there are no other - active jobs in the cluster. The minimum value is 5 mins. Type: string (or - Expression with resultType string). - :type time_to_live: object - :param version: Required. Version of the HDInsight cluster.  Type: string - (or Expression with resultType string). - :type version: object - :param linked_service_name: Required. Azure Storage linked service to be - used by the on-demand cluster for storing and processing data. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param host_subscription_id: Required. The customer’s subscription to host - the cluster. Type: string (or Expression with resultType string). - :type host_subscription_id: object - :param service_principal_id: The service principal id for the - hostSubscriptionId. Type: string (or Expression with resultType string). - :type service_principal_id: object - :param service_principal_key: The key for the service principal id. - :type service_principal_key: ~azure.mgmt.datafactory.models.SecretBase - :param tenant: Required. The Tenant id/name to which the service principal - belongs. Type: string (or Expression with resultType string). - :type tenant: object - :param cluster_resource_group: Required. The resource group where the - cluster belongs. Type: string (or Expression with resultType string). - :type cluster_resource_group: object - :param cluster_name_prefix: The prefix of cluster name, postfix will be - distinct with timestamp. Type: string (or Expression with resultType - string). - :type cluster_name_prefix: object - :param cluster_user_name: The username to access the cluster. Type: string - (or Expression with resultType string). - :type cluster_user_name: object - :param cluster_password: The password to access the cluster. - :type cluster_password: ~azure.mgmt.datafactory.models.SecretBase - :param cluster_ssh_user_name: The username to SSH remotely connect to - cluster’s node (for Linux). Type: string (or Expression with resultType - string). - :type cluster_ssh_user_name: object - :param cluster_ssh_password: The password to SSH remotely connect - cluster’s node (for Linux). - :type cluster_ssh_password: ~azure.mgmt.datafactory.models.SecretBase - :param additional_linked_service_names: Specifies additional storage - accounts for the HDInsight linked service so that the Data Factory service - can register them on your behalf. - :type additional_linked_service_names: - list[~azure.mgmt.datafactory.models.LinkedServiceReference] - :param hcatalog_linked_service_name: The name of Azure SQL linked service - that point to the HCatalog database. The on-demand HDInsight cluster is - created by using the Azure SQL database as the metastore. - :type hcatalog_linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param cluster_type: The cluster type. Type: string (or Expression with - resultType string). - :type cluster_type: object - :param spark_version: The version of spark if the cluster type is 'spark'. - Type: string (or Expression with resultType string). - :type spark_version: object - :param core_configuration: Specifies the core configuration parameters (as - in core-site.xml) for the HDInsight cluster to be created. - :type core_configuration: object - :param h_base_configuration: Specifies the HBase configuration parameters - (hbase-site.xml) for the HDInsight cluster. - :type h_base_configuration: object - :param hdfs_configuration: Specifies the HDFS configuration parameters - (hdfs-site.xml) for the HDInsight cluster. - :type hdfs_configuration: object - :param hive_configuration: Specifies the hive configuration parameters - (hive-site.xml) for the HDInsight cluster. - :type hive_configuration: object - :param map_reduce_configuration: Specifies the MapReduce configuration - parameters (mapred-site.xml) for the HDInsight cluster. - :type map_reduce_configuration: object - :param oozie_configuration: Specifies the Oozie configuration parameters - (oozie-site.xml) for the HDInsight cluster. - :type oozie_configuration: object - :param storm_configuration: Specifies the Storm configuration parameters - (storm-site.xml) for the HDInsight cluster. - :type storm_configuration: object - :param yarn_configuration: Specifies the Yarn configuration parameters - (yarn-site.xml) for the HDInsight cluster. - :type yarn_configuration: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - :param head_node_size: Specifies the size of the head node for the - HDInsight cluster. - :type head_node_size: object - :param data_node_size: Specifies the size of the data node for the - HDInsight cluster. - :type data_node_size: object - :param zookeeper_node_size: Specifies the size of the Zoo Keeper node for - the HDInsight cluster. - :type zookeeper_node_size: object - :param script_actions: Custom script actions to run on HDI ondemand - cluster once it's up. Please refer to - https://docs.microsoft.com/en-us/azure/hdinsight/hdinsight-hadoop-customize-cluster-linux?toc=%2Fen-us%2Fazure%2Fhdinsight%2Fr-server%2FTOC.json&bc=%2Fen-us%2Fazure%2Fbread%2Ftoc.json#understanding-script-actions. - :type script_actions: list[~azure.mgmt.datafactory.models.ScriptAction] - """ - - _validation = { - 'type': {'required': True}, - 'cluster_size': {'required': True}, - 'time_to_live': {'required': True}, - 'version': {'required': True}, - 'linked_service_name': {'required': True}, - 'host_subscription_id': {'required': True}, - 'tenant': {'required': True}, - 'cluster_resource_group': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'cluster_size': {'key': 'typeProperties.clusterSize', 'type': 'object'}, - 'time_to_live': {'key': 'typeProperties.timeToLive', 'type': 'object'}, - 'version': {'key': 'typeProperties.version', 'type': 'object'}, - 'linked_service_name': {'key': 'typeProperties.linkedServiceName', 'type': 'LinkedServiceReference'}, - 'host_subscription_id': {'key': 'typeProperties.hostSubscriptionId', 'type': 'object'}, - 'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'}, - 'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'}, - 'tenant': {'key': 'typeProperties.tenant', 'type': 'object'}, - 'cluster_resource_group': {'key': 'typeProperties.clusterResourceGroup', 'type': 'object'}, - 'cluster_name_prefix': {'key': 'typeProperties.clusterNamePrefix', 'type': 'object'}, - 'cluster_user_name': {'key': 'typeProperties.clusterUserName', 'type': 'object'}, - 'cluster_password': {'key': 'typeProperties.clusterPassword', 'type': 'SecretBase'}, - 'cluster_ssh_user_name': {'key': 'typeProperties.clusterSshUserName', 'type': 'object'}, - 'cluster_ssh_password': {'key': 'typeProperties.clusterSshPassword', 'type': 'SecretBase'}, - 'additional_linked_service_names': {'key': 'typeProperties.additionalLinkedServiceNames', 'type': '[LinkedServiceReference]'}, - 'hcatalog_linked_service_name': {'key': 'typeProperties.hcatalogLinkedServiceName', 'type': 'LinkedServiceReference'}, - 'cluster_type': {'key': 'typeProperties.clusterType', 'type': 'object'}, - 'spark_version': {'key': 'typeProperties.sparkVersion', 'type': 'object'}, - 'core_configuration': {'key': 'typeProperties.coreConfiguration', 'type': 'object'}, - 'h_base_configuration': {'key': 'typeProperties.hBaseConfiguration', 'type': 'object'}, - 'hdfs_configuration': {'key': 'typeProperties.hdfsConfiguration', 'type': 'object'}, - 'hive_configuration': {'key': 'typeProperties.hiveConfiguration', 'type': 'object'}, - 'map_reduce_configuration': {'key': 'typeProperties.mapReduceConfiguration', 'type': 'object'}, - 'oozie_configuration': {'key': 'typeProperties.oozieConfiguration', 'type': 'object'}, - 'storm_configuration': {'key': 'typeProperties.stormConfiguration', 'type': 'object'}, - 'yarn_configuration': {'key': 'typeProperties.yarnConfiguration', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - 'head_node_size': {'key': 'typeProperties.headNodeSize', 'type': 'object'}, - 'data_node_size': {'key': 'typeProperties.dataNodeSize', 'type': 'object'}, - 'zookeeper_node_size': {'key': 'typeProperties.zookeeperNodeSize', 'type': 'object'}, - 'script_actions': {'key': 'typeProperties.scriptActions', 'type': '[ScriptAction]'}, - } - - def __init__(self, *, cluster_size, time_to_live, version, linked_service_name, host_subscription_id, tenant, cluster_resource_group, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, service_principal_id=None, service_principal_key=None, cluster_name_prefix=None, cluster_user_name=None, cluster_password=None, cluster_ssh_user_name=None, cluster_ssh_password=None, additional_linked_service_names=None, hcatalog_linked_service_name=None, cluster_type=None, spark_version=None, core_configuration=None, h_base_configuration=None, hdfs_configuration=None, hive_configuration=None, map_reduce_configuration=None, oozie_configuration=None, storm_configuration=None, yarn_configuration=None, encrypted_credential=None, head_node_size=None, data_node_size=None, zookeeper_node_size=None, script_actions=None, **kwargs) -> None: - super(HDInsightOnDemandLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.cluster_size = cluster_size - self.time_to_live = time_to_live - self.version = version - self.linked_service_name = linked_service_name - self.host_subscription_id = host_subscription_id - self.service_principal_id = service_principal_id - self.service_principal_key = service_principal_key - self.tenant = tenant - self.cluster_resource_group = cluster_resource_group - self.cluster_name_prefix = cluster_name_prefix - self.cluster_user_name = cluster_user_name - self.cluster_password = cluster_password - self.cluster_ssh_user_name = cluster_ssh_user_name - self.cluster_ssh_password = cluster_ssh_password - self.additional_linked_service_names = additional_linked_service_names - self.hcatalog_linked_service_name = hcatalog_linked_service_name - self.cluster_type = cluster_type - self.spark_version = spark_version - self.core_configuration = core_configuration - self.h_base_configuration = h_base_configuration - self.hdfs_configuration = hdfs_configuration - self.hive_configuration = hive_configuration - self.map_reduce_configuration = map_reduce_configuration - self.oozie_configuration = oozie_configuration - self.storm_configuration = storm_configuration - self.yarn_configuration = yarn_configuration - self.encrypted_credential = encrypted_credential - self.head_node_size = head_node_size - self.data_node_size = data_node_size - self.zookeeper_node_size = zookeeper_node_size - self.script_actions = script_actions - self.type = 'HDInsightOnDemand' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_pig_activity.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_pig_activity.py deleted file mode 100644 index 61b939076db6..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_pig_activity.py +++ /dev/null @@ -1,87 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity import ExecutionActivity - - -class HDInsightPigActivity(ExecutionActivity): - """HDInsight Pig activity type. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param storage_linked_services: Storage linked service references. - :type storage_linked_services: - list[~azure.mgmt.datafactory.models.LinkedServiceReference] - :param arguments: User specified arguments to HDInsightActivity. - :type arguments: list[object] - :param get_debug_info: Debug info option. Possible values include: 'None', - 'Always', 'Failure' - :type get_debug_info: str or - ~azure.mgmt.datafactory.models.HDInsightActivityDebugInfoOption - :param script_path: Script path. Type: string (or Expression with - resultType string). - :type script_path: object - :param script_linked_service: Script linked service reference. - :type script_linked_service: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param defines: Allows user to specify defines for Pig job request. - :type defines: dict[str, object] - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'storage_linked_services': {'key': 'typeProperties.storageLinkedServices', 'type': '[LinkedServiceReference]'}, - 'arguments': {'key': 'typeProperties.arguments', 'type': '[object]'}, - 'get_debug_info': {'key': 'typeProperties.getDebugInfo', 'type': 'str'}, - 'script_path': {'key': 'typeProperties.scriptPath', 'type': 'object'}, - 'script_linked_service': {'key': 'typeProperties.scriptLinkedService', 'type': 'LinkedServiceReference'}, - 'defines': {'key': 'typeProperties.defines', 'type': '{object}'}, - } - - def __init__(self, **kwargs): - super(HDInsightPigActivity, self).__init__(**kwargs) - self.storage_linked_services = kwargs.get('storage_linked_services', None) - self.arguments = kwargs.get('arguments', None) - self.get_debug_info = kwargs.get('get_debug_info', None) - self.script_path = kwargs.get('script_path', None) - self.script_linked_service = kwargs.get('script_linked_service', None) - self.defines = kwargs.get('defines', None) - self.type = 'HDInsightPig' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_pig_activity_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_pig_activity_py3.py deleted file mode 100644 index fb149df91f39..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_pig_activity_py3.py +++ /dev/null @@ -1,87 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity_py3 import ExecutionActivity - - -class HDInsightPigActivity(ExecutionActivity): - """HDInsight Pig activity type. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param storage_linked_services: Storage linked service references. - :type storage_linked_services: - list[~azure.mgmt.datafactory.models.LinkedServiceReference] - :param arguments: User specified arguments to HDInsightActivity. - :type arguments: list[object] - :param get_debug_info: Debug info option. Possible values include: 'None', - 'Always', 'Failure' - :type get_debug_info: str or - ~azure.mgmt.datafactory.models.HDInsightActivityDebugInfoOption - :param script_path: Script path. Type: string (or Expression with - resultType string). - :type script_path: object - :param script_linked_service: Script linked service reference. - :type script_linked_service: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param defines: Allows user to specify defines for Pig job request. - :type defines: dict[str, object] - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'storage_linked_services': {'key': 'typeProperties.storageLinkedServices', 'type': '[LinkedServiceReference]'}, - 'arguments': {'key': 'typeProperties.arguments', 'type': '[object]'}, - 'get_debug_info': {'key': 'typeProperties.getDebugInfo', 'type': 'str'}, - 'script_path': {'key': 'typeProperties.scriptPath', 'type': 'object'}, - 'script_linked_service': {'key': 'typeProperties.scriptLinkedService', 'type': 'LinkedServiceReference'}, - 'defines': {'key': 'typeProperties.defines', 'type': '{object}'}, - } - - def __init__(self, *, name: str, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, storage_linked_services=None, arguments=None, get_debug_info=None, script_path=None, script_linked_service=None, defines=None, **kwargs) -> None: - super(HDInsightPigActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) - self.storage_linked_services = storage_linked_services - self.arguments = arguments - self.get_debug_info = get_debug_info - self.script_path = script_path - self.script_linked_service = script_linked_service - self.defines = defines - self.type = 'HDInsightPig' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_spark_activity.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_spark_activity.py deleted file mode 100644 index 7822344f012f..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_spark_activity.py +++ /dev/null @@ -1,100 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity import ExecutionActivity - - -class HDInsightSparkActivity(ExecutionActivity): - """HDInsight Spark activity. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param root_path: Required. The root path in 'sparkJobLinkedService' for - all the job’s files. Type: string (or Expression with resultType string). - :type root_path: object - :param entry_file_path: Required. The relative path to the root folder of - the code/package to be executed. Type: string (or Expression with - resultType string). - :type entry_file_path: object - :param arguments: The user-specified arguments to HDInsightSparkActivity. - :type arguments: list[object] - :param get_debug_info: Debug info option. Possible values include: 'None', - 'Always', 'Failure' - :type get_debug_info: str or - ~azure.mgmt.datafactory.models.HDInsightActivityDebugInfoOption - :param spark_job_linked_service: The storage linked service for uploading - the entry file and dependencies, and for receiving logs. - :type spark_job_linked_service: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param class_name: The application's Java/Spark main class. - :type class_name: str - :param proxy_user: The user to impersonate that will execute the job. - Type: string (or Expression with resultType string). - :type proxy_user: object - :param spark_config: Spark configuration property. - :type spark_config: dict[str, object] - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'root_path': {'required': True}, - 'entry_file_path': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'root_path': {'key': 'typeProperties.rootPath', 'type': 'object'}, - 'entry_file_path': {'key': 'typeProperties.entryFilePath', 'type': 'object'}, - 'arguments': {'key': 'typeProperties.arguments', 'type': '[object]'}, - 'get_debug_info': {'key': 'typeProperties.getDebugInfo', 'type': 'str'}, - 'spark_job_linked_service': {'key': 'typeProperties.sparkJobLinkedService', 'type': 'LinkedServiceReference'}, - 'class_name': {'key': 'typeProperties.className', 'type': 'str'}, - 'proxy_user': {'key': 'typeProperties.proxyUser', 'type': 'object'}, - 'spark_config': {'key': 'typeProperties.sparkConfig', 'type': '{object}'}, - } - - def __init__(self, **kwargs): - super(HDInsightSparkActivity, self).__init__(**kwargs) - self.root_path = kwargs.get('root_path', None) - self.entry_file_path = kwargs.get('entry_file_path', None) - self.arguments = kwargs.get('arguments', None) - self.get_debug_info = kwargs.get('get_debug_info', None) - self.spark_job_linked_service = kwargs.get('spark_job_linked_service', None) - self.class_name = kwargs.get('class_name', None) - self.proxy_user = kwargs.get('proxy_user', None) - self.spark_config = kwargs.get('spark_config', None) - self.type = 'HDInsightSpark' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_spark_activity_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_spark_activity_py3.py deleted file mode 100644 index 3f305901abb7..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_spark_activity_py3.py +++ /dev/null @@ -1,100 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity_py3 import ExecutionActivity - - -class HDInsightSparkActivity(ExecutionActivity): - """HDInsight Spark activity. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param root_path: Required. The root path in 'sparkJobLinkedService' for - all the job’s files. Type: string (or Expression with resultType string). - :type root_path: object - :param entry_file_path: Required. The relative path to the root folder of - the code/package to be executed. Type: string (or Expression with - resultType string). - :type entry_file_path: object - :param arguments: The user-specified arguments to HDInsightSparkActivity. - :type arguments: list[object] - :param get_debug_info: Debug info option. Possible values include: 'None', - 'Always', 'Failure' - :type get_debug_info: str or - ~azure.mgmt.datafactory.models.HDInsightActivityDebugInfoOption - :param spark_job_linked_service: The storage linked service for uploading - the entry file and dependencies, and for receiving logs. - :type spark_job_linked_service: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param class_name: The application's Java/Spark main class. - :type class_name: str - :param proxy_user: The user to impersonate that will execute the job. - Type: string (or Expression with resultType string). - :type proxy_user: object - :param spark_config: Spark configuration property. - :type spark_config: dict[str, object] - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'root_path': {'required': True}, - 'entry_file_path': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'root_path': {'key': 'typeProperties.rootPath', 'type': 'object'}, - 'entry_file_path': {'key': 'typeProperties.entryFilePath', 'type': 'object'}, - 'arguments': {'key': 'typeProperties.arguments', 'type': '[object]'}, - 'get_debug_info': {'key': 'typeProperties.getDebugInfo', 'type': 'str'}, - 'spark_job_linked_service': {'key': 'typeProperties.sparkJobLinkedService', 'type': 'LinkedServiceReference'}, - 'class_name': {'key': 'typeProperties.className', 'type': 'str'}, - 'proxy_user': {'key': 'typeProperties.proxyUser', 'type': 'object'}, - 'spark_config': {'key': 'typeProperties.sparkConfig', 'type': '{object}'}, - } - - def __init__(self, *, name: str, root_path, entry_file_path, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, arguments=None, get_debug_info=None, spark_job_linked_service=None, class_name: str=None, proxy_user=None, spark_config=None, **kwargs) -> None: - super(HDInsightSparkActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) - self.root_path = root_path - self.entry_file_path = entry_file_path - self.arguments = arguments - self.get_debug_info = get_debug_info - self.spark_job_linked_service = spark_job_linked_service - self.class_name = class_name - self.proxy_user = proxy_user - self.spark_config = spark_config - self.type = 'HDInsightSpark' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_streaming_activity.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_streaming_activity.py deleted file mode 100644 index 42146a5d6cc6..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_streaming_activity.py +++ /dev/null @@ -1,122 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity import ExecutionActivity - - -class HDInsightStreamingActivity(ExecutionActivity): - """HDInsight streaming activity type. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param storage_linked_services: Storage linked service references. - :type storage_linked_services: - list[~azure.mgmt.datafactory.models.LinkedServiceReference] - :param arguments: User specified arguments to HDInsightActivity. - :type arguments: list[object] - :param get_debug_info: Debug info option. Possible values include: 'None', - 'Always', 'Failure' - :type get_debug_info: str or - ~azure.mgmt.datafactory.models.HDInsightActivityDebugInfoOption - :param mapper: Required. Mapper executable name. Type: string (or - Expression with resultType string). - :type mapper: object - :param reducer: Required. Reducer executable name. Type: string (or - Expression with resultType string). - :type reducer: object - :param input: Required. Input blob path. Type: string (or Expression with - resultType string). - :type input: object - :param output: Required. Output blob path. Type: string (or Expression - with resultType string). - :type output: object - :param file_paths: Required. Paths to streaming job files. Can be - directories. - :type file_paths: list[object] - :param file_linked_service: Linked service reference where the files are - located. - :type file_linked_service: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param combiner: Combiner executable name. Type: string (or Expression - with resultType string). - :type combiner: object - :param command_environment: Command line environment values. - :type command_environment: list[object] - :param defines: Allows user to specify defines for streaming job request. - :type defines: dict[str, object] - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'mapper': {'required': True}, - 'reducer': {'required': True}, - 'input': {'required': True}, - 'output': {'required': True}, - 'file_paths': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'storage_linked_services': {'key': 'typeProperties.storageLinkedServices', 'type': '[LinkedServiceReference]'}, - 'arguments': {'key': 'typeProperties.arguments', 'type': '[object]'}, - 'get_debug_info': {'key': 'typeProperties.getDebugInfo', 'type': 'str'}, - 'mapper': {'key': 'typeProperties.mapper', 'type': 'object'}, - 'reducer': {'key': 'typeProperties.reducer', 'type': 'object'}, - 'input': {'key': 'typeProperties.input', 'type': 'object'}, - 'output': {'key': 'typeProperties.output', 'type': 'object'}, - 'file_paths': {'key': 'typeProperties.filePaths', 'type': '[object]'}, - 'file_linked_service': {'key': 'typeProperties.fileLinkedService', 'type': 'LinkedServiceReference'}, - 'combiner': {'key': 'typeProperties.combiner', 'type': 'object'}, - 'command_environment': {'key': 'typeProperties.commandEnvironment', 'type': '[object]'}, - 'defines': {'key': 'typeProperties.defines', 'type': '{object}'}, - } - - def __init__(self, **kwargs): - super(HDInsightStreamingActivity, self).__init__(**kwargs) - self.storage_linked_services = kwargs.get('storage_linked_services', None) - self.arguments = kwargs.get('arguments', None) - self.get_debug_info = kwargs.get('get_debug_info', None) - self.mapper = kwargs.get('mapper', None) - self.reducer = kwargs.get('reducer', None) - self.input = kwargs.get('input', None) - self.output = kwargs.get('output', None) - self.file_paths = kwargs.get('file_paths', None) - self.file_linked_service = kwargs.get('file_linked_service', None) - self.combiner = kwargs.get('combiner', None) - self.command_environment = kwargs.get('command_environment', None) - self.defines = kwargs.get('defines', None) - self.type = 'HDInsightStreaming' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_streaming_activity_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_streaming_activity_py3.py deleted file mode 100644 index 2f5a301ff880..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hd_insight_streaming_activity_py3.py +++ /dev/null @@ -1,122 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity_py3 import ExecutionActivity - - -class HDInsightStreamingActivity(ExecutionActivity): - """HDInsight streaming activity type. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param storage_linked_services: Storage linked service references. - :type storage_linked_services: - list[~azure.mgmt.datafactory.models.LinkedServiceReference] - :param arguments: User specified arguments to HDInsightActivity. - :type arguments: list[object] - :param get_debug_info: Debug info option. Possible values include: 'None', - 'Always', 'Failure' - :type get_debug_info: str or - ~azure.mgmt.datafactory.models.HDInsightActivityDebugInfoOption - :param mapper: Required. Mapper executable name. Type: string (or - Expression with resultType string). - :type mapper: object - :param reducer: Required. Reducer executable name. Type: string (or - Expression with resultType string). - :type reducer: object - :param input: Required. Input blob path. Type: string (or Expression with - resultType string). - :type input: object - :param output: Required. Output blob path. Type: string (or Expression - with resultType string). - :type output: object - :param file_paths: Required. Paths to streaming job files. Can be - directories. - :type file_paths: list[object] - :param file_linked_service: Linked service reference where the files are - located. - :type file_linked_service: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param combiner: Combiner executable name. Type: string (or Expression - with resultType string). - :type combiner: object - :param command_environment: Command line environment values. - :type command_environment: list[object] - :param defines: Allows user to specify defines for streaming job request. - :type defines: dict[str, object] - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'mapper': {'required': True}, - 'reducer': {'required': True}, - 'input': {'required': True}, - 'output': {'required': True}, - 'file_paths': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'storage_linked_services': {'key': 'typeProperties.storageLinkedServices', 'type': '[LinkedServiceReference]'}, - 'arguments': {'key': 'typeProperties.arguments', 'type': '[object]'}, - 'get_debug_info': {'key': 'typeProperties.getDebugInfo', 'type': 'str'}, - 'mapper': {'key': 'typeProperties.mapper', 'type': 'object'}, - 'reducer': {'key': 'typeProperties.reducer', 'type': 'object'}, - 'input': {'key': 'typeProperties.input', 'type': 'object'}, - 'output': {'key': 'typeProperties.output', 'type': 'object'}, - 'file_paths': {'key': 'typeProperties.filePaths', 'type': '[object]'}, - 'file_linked_service': {'key': 'typeProperties.fileLinkedService', 'type': 'LinkedServiceReference'}, - 'combiner': {'key': 'typeProperties.combiner', 'type': 'object'}, - 'command_environment': {'key': 'typeProperties.commandEnvironment', 'type': '[object]'}, - 'defines': {'key': 'typeProperties.defines', 'type': '{object}'}, - } - - def __init__(self, *, name: str, mapper, reducer, input, output, file_paths, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, storage_linked_services=None, arguments=None, get_debug_info=None, file_linked_service=None, combiner=None, command_environment=None, defines=None, **kwargs) -> None: - super(HDInsightStreamingActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) - self.storage_linked_services = storage_linked_services - self.arguments = arguments - self.get_debug_info = get_debug_info - self.mapper = mapper - self.reducer = reducer - self.input = input - self.output = output - self.file_paths = file_paths - self.file_linked_service = file_linked_service - self.combiner = combiner - self.command_environment = command_environment - self.defines = defines - self.type = 'HDInsightStreaming' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hdfs_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hdfs_linked_service.py deleted file mode 100644 index ab26ae10fe8c..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hdfs_linked_service.py +++ /dev/null @@ -1,81 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class HdfsLinkedService(LinkedService): - """Hadoop Distributed File System (HDFS) linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param url: Required. The URL of the HDFS service endpoint, e.g. - http://myhostname:50070/webhdfs/v1 . Type: string (or Expression with - resultType string). - :type url: object - :param authentication_type: Type of authentication used to connect to the - HDFS. Possible values are: Anonymous and Windows. Type: string (or - Expression with resultType string). - :type authentication_type: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - :param user_name: User name for Windows authentication. Type: string (or - Expression with resultType string). - :type user_name: object - :param password: Password for Windows authentication. - :type password: ~azure.mgmt.datafactory.models.SecretBase - """ - - _validation = { - 'type': {'required': True}, - 'url': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'url': {'key': 'typeProperties.url', 'type': 'object'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - } - - def __init__(self, **kwargs): - super(HdfsLinkedService, self).__init__(**kwargs) - self.url = kwargs.get('url', None) - self.authentication_type = kwargs.get('authentication_type', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.user_name = kwargs.get('user_name', None) - self.password = kwargs.get('password', None) - self.type = 'Hdfs' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hdfs_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hdfs_linked_service_py3.py deleted file mode 100644 index 3b854d945e27..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hdfs_linked_service_py3.py +++ /dev/null @@ -1,81 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class HdfsLinkedService(LinkedService): - """Hadoop Distributed File System (HDFS) linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param url: Required. The URL of the HDFS service endpoint, e.g. - http://myhostname:50070/webhdfs/v1 . Type: string (or Expression with - resultType string). - :type url: object - :param authentication_type: Type of authentication used to connect to the - HDFS. Possible values are: Anonymous and Windows. Type: string (or - Expression with resultType string). - :type authentication_type: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - :param user_name: User name for Windows authentication. Type: string (or - Expression with resultType string). - :type user_name: object - :param password: Password for Windows authentication. - :type password: ~azure.mgmt.datafactory.models.SecretBase - """ - - _validation = { - 'type': {'required': True}, - 'url': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'url': {'key': 'typeProperties.url', 'type': 'object'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - } - - def __init__(self, *, url, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, authentication_type=None, encrypted_credential=None, user_name=None, password=None, **kwargs) -> None: - super(HdfsLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.url = url - self.authentication_type = authentication_type - self.encrypted_credential = encrypted_credential - self.user_name = user_name - self.password = password - self.type = 'Hdfs' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hdfs_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hdfs_source.py deleted file mode 100644 index 1322a0e68cea..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hdfs_source.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class HdfsSource(CopySource): - """A copy activity HDFS source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param recursive: If true, files under the folder path will be read - recursively. Default is true. Type: boolean (or Expression with resultType - boolean). - :type recursive: object - :param distcp_settings: Specifies Distcp-related settings. - :type distcp_settings: ~azure.mgmt.datafactory.models.DistcpSettings - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'recursive': {'key': 'recursive', 'type': 'object'}, - 'distcp_settings': {'key': 'distcpSettings', 'type': 'DistcpSettings'}, - } - - def __init__(self, **kwargs): - super(HdfsSource, self).__init__(**kwargs) - self.recursive = kwargs.get('recursive', None) - self.distcp_settings = kwargs.get('distcp_settings', None) - self.type = 'HdfsSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hdfs_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hdfs_source_py3.py deleted file mode 100644 index 34b194f92d64..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hdfs_source_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class HdfsSource(CopySource): - """A copy activity HDFS source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param recursive: If true, files under the folder path will be read - recursively. Default is true. Type: boolean (or Expression with resultType - boolean). - :type recursive: object - :param distcp_settings: Specifies Distcp-related settings. - :type distcp_settings: ~azure.mgmt.datafactory.models.DistcpSettings - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'recursive': {'key': 'recursive', 'type': 'object'}, - 'distcp_settings': {'key': 'distcpSettings', 'type': 'DistcpSettings'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, recursive=None, distcp_settings=None, **kwargs) -> None: - super(HdfsSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.recursive = recursive - self.distcp_settings = distcp_settings - self.type = 'HdfsSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hive_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hive_linked_service.py deleted file mode 100644 index 57b40c30304a..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hive_linked_service.py +++ /dev/null @@ -1,147 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class HiveLinkedService(LinkedService): - """Hive Server linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param host: Required. IP address or host name of the Hive server, - separated by ';' for multiple hosts (only when serviceDiscoveryMode is - enable). - :type host: object - :param port: The TCP port that the Hive server uses to listen for client - connections. - :type port: object - :param server_type: The type of Hive server. Possible values include: - 'HiveServer1', 'HiveServer2', 'HiveThriftServer' - :type server_type: str or ~azure.mgmt.datafactory.models.HiveServerType - :param thrift_transport_protocol: The transport protocol to use in the - Thrift layer. Possible values include: 'Binary', 'SASL', 'HTTP ' - :type thrift_transport_protocol: str or - ~azure.mgmt.datafactory.models.HiveThriftTransportProtocol - :param authentication_type: Required. The authentication method used to - access the Hive server. Possible values include: 'Anonymous', 'Username', - 'UsernameAndPassword', 'WindowsAzureHDInsightService' - :type authentication_type: str or - ~azure.mgmt.datafactory.models.HiveAuthenticationType - :param service_discovery_mode: true to indicate using the ZooKeeper - service, false not. - :type service_discovery_mode: object - :param zoo_keeper_name_space: The namespace on ZooKeeper under which Hive - Server 2 nodes are added. - :type zoo_keeper_name_space: object - :param use_native_query: Specifies whether the driver uses native HiveQL - queries,or converts them into an equivalent form in HiveQL. - :type use_native_query: object - :param username: The user name that you use to access Hive Server. - :type username: object - :param password: The password corresponding to the user name that you - provided in the Username field - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param http_path: The partial URL corresponding to the Hive server. - :type http_path: object - :param enable_ssl: Specifies whether the connections to the server are - encrypted using SSL. The default value is false. - :type enable_ssl: object - :param trusted_cert_path: The full path of the .pem file containing - trusted CA certificates for verifying the server when connecting over SSL. - This property can only be set when using SSL on self-hosted IR. The - default value is the cacerts.pem file installed with the IR. - :type trusted_cert_path: object - :param use_system_trust_store: Specifies whether to use a CA certificate - from the system trust store or from a specified PEM file. The default - value is false. - :type use_system_trust_store: object - :param allow_host_name_cn_mismatch: Specifies whether to require a - CA-issued SSL certificate name to match the host name of the server when - connecting over SSL. The default value is false. - :type allow_host_name_cn_mismatch: object - :param allow_self_signed_server_cert: Specifies whether to allow - self-signed certificates from the server. The default value is false. - :type allow_self_signed_server_cert: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'host': {'required': True}, - 'authentication_type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'host': {'key': 'typeProperties.host', 'type': 'object'}, - 'port': {'key': 'typeProperties.port', 'type': 'object'}, - 'server_type': {'key': 'typeProperties.serverType', 'type': 'str'}, - 'thrift_transport_protocol': {'key': 'typeProperties.thriftTransportProtocol', 'type': 'str'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, - 'service_discovery_mode': {'key': 'typeProperties.serviceDiscoveryMode', 'type': 'object'}, - 'zoo_keeper_name_space': {'key': 'typeProperties.zooKeeperNameSpace', 'type': 'object'}, - 'use_native_query': {'key': 'typeProperties.useNativeQuery', 'type': 'object'}, - 'username': {'key': 'typeProperties.username', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'http_path': {'key': 'typeProperties.httpPath', 'type': 'object'}, - 'enable_ssl': {'key': 'typeProperties.enableSsl', 'type': 'object'}, - 'trusted_cert_path': {'key': 'typeProperties.trustedCertPath', 'type': 'object'}, - 'use_system_trust_store': {'key': 'typeProperties.useSystemTrustStore', 'type': 'object'}, - 'allow_host_name_cn_mismatch': {'key': 'typeProperties.allowHostNameCNMismatch', 'type': 'object'}, - 'allow_self_signed_server_cert': {'key': 'typeProperties.allowSelfSignedServerCert', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(HiveLinkedService, self).__init__(**kwargs) - self.host = kwargs.get('host', None) - self.port = kwargs.get('port', None) - self.server_type = kwargs.get('server_type', None) - self.thrift_transport_protocol = kwargs.get('thrift_transport_protocol', None) - self.authentication_type = kwargs.get('authentication_type', None) - self.service_discovery_mode = kwargs.get('service_discovery_mode', None) - self.zoo_keeper_name_space = kwargs.get('zoo_keeper_name_space', None) - self.use_native_query = kwargs.get('use_native_query', None) - self.username = kwargs.get('username', None) - self.password = kwargs.get('password', None) - self.http_path = kwargs.get('http_path', None) - self.enable_ssl = kwargs.get('enable_ssl', None) - self.trusted_cert_path = kwargs.get('trusted_cert_path', None) - self.use_system_trust_store = kwargs.get('use_system_trust_store', None) - self.allow_host_name_cn_mismatch = kwargs.get('allow_host_name_cn_mismatch', None) - self.allow_self_signed_server_cert = kwargs.get('allow_self_signed_server_cert', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'Hive' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hive_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hive_linked_service_py3.py deleted file mode 100644 index 2f742d72594c..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hive_linked_service_py3.py +++ /dev/null @@ -1,147 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class HiveLinkedService(LinkedService): - """Hive Server linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param host: Required. IP address or host name of the Hive server, - separated by ';' for multiple hosts (only when serviceDiscoveryMode is - enable). - :type host: object - :param port: The TCP port that the Hive server uses to listen for client - connections. - :type port: object - :param server_type: The type of Hive server. Possible values include: - 'HiveServer1', 'HiveServer2', 'HiveThriftServer' - :type server_type: str or ~azure.mgmt.datafactory.models.HiveServerType - :param thrift_transport_protocol: The transport protocol to use in the - Thrift layer. Possible values include: 'Binary', 'SASL', 'HTTP ' - :type thrift_transport_protocol: str or - ~azure.mgmt.datafactory.models.HiveThriftTransportProtocol - :param authentication_type: Required. The authentication method used to - access the Hive server. Possible values include: 'Anonymous', 'Username', - 'UsernameAndPassword', 'WindowsAzureHDInsightService' - :type authentication_type: str or - ~azure.mgmt.datafactory.models.HiveAuthenticationType - :param service_discovery_mode: true to indicate using the ZooKeeper - service, false not. - :type service_discovery_mode: object - :param zoo_keeper_name_space: The namespace on ZooKeeper under which Hive - Server 2 nodes are added. - :type zoo_keeper_name_space: object - :param use_native_query: Specifies whether the driver uses native HiveQL - queries,or converts them into an equivalent form in HiveQL. - :type use_native_query: object - :param username: The user name that you use to access Hive Server. - :type username: object - :param password: The password corresponding to the user name that you - provided in the Username field - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param http_path: The partial URL corresponding to the Hive server. - :type http_path: object - :param enable_ssl: Specifies whether the connections to the server are - encrypted using SSL. The default value is false. - :type enable_ssl: object - :param trusted_cert_path: The full path of the .pem file containing - trusted CA certificates for verifying the server when connecting over SSL. - This property can only be set when using SSL on self-hosted IR. The - default value is the cacerts.pem file installed with the IR. - :type trusted_cert_path: object - :param use_system_trust_store: Specifies whether to use a CA certificate - from the system trust store or from a specified PEM file. The default - value is false. - :type use_system_trust_store: object - :param allow_host_name_cn_mismatch: Specifies whether to require a - CA-issued SSL certificate name to match the host name of the server when - connecting over SSL. The default value is false. - :type allow_host_name_cn_mismatch: object - :param allow_self_signed_server_cert: Specifies whether to allow - self-signed certificates from the server. The default value is false. - :type allow_self_signed_server_cert: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'host': {'required': True}, - 'authentication_type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'host': {'key': 'typeProperties.host', 'type': 'object'}, - 'port': {'key': 'typeProperties.port', 'type': 'object'}, - 'server_type': {'key': 'typeProperties.serverType', 'type': 'str'}, - 'thrift_transport_protocol': {'key': 'typeProperties.thriftTransportProtocol', 'type': 'str'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, - 'service_discovery_mode': {'key': 'typeProperties.serviceDiscoveryMode', 'type': 'object'}, - 'zoo_keeper_name_space': {'key': 'typeProperties.zooKeeperNameSpace', 'type': 'object'}, - 'use_native_query': {'key': 'typeProperties.useNativeQuery', 'type': 'object'}, - 'username': {'key': 'typeProperties.username', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'http_path': {'key': 'typeProperties.httpPath', 'type': 'object'}, - 'enable_ssl': {'key': 'typeProperties.enableSsl', 'type': 'object'}, - 'trusted_cert_path': {'key': 'typeProperties.trustedCertPath', 'type': 'object'}, - 'use_system_trust_store': {'key': 'typeProperties.useSystemTrustStore', 'type': 'object'}, - 'allow_host_name_cn_mismatch': {'key': 'typeProperties.allowHostNameCNMismatch', 'type': 'object'}, - 'allow_self_signed_server_cert': {'key': 'typeProperties.allowSelfSignedServerCert', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, host, authentication_type, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, port=None, server_type=None, thrift_transport_protocol=None, service_discovery_mode=None, zoo_keeper_name_space=None, use_native_query=None, username=None, password=None, http_path=None, enable_ssl=None, trusted_cert_path=None, use_system_trust_store=None, allow_host_name_cn_mismatch=None, allow_self_signed_server_cert=None, encrypted_credential=None, **kwargs) -> None: - super(HiveLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.host = host - self.port = port - self.server_type = server_type - self.thrift_transport_protocol = thrift_transport_protocol - self.authentication_type = authentication_type - self.service_discovery_mode = service_discovery_mode - self.zoo_keeper_name_space = zoo_keeper_name_space - self.use_native_query = use_native_query - self.username = username - self.password = password - self.http_path = http_path - self.enable_ssl = enable_ssl - self.trusted_cert_path = trusted_cert_path - self.use_system_trust_store = use_system_trust_store - self.allow_host_name_cn_mismatch = allow_host_name_cn_mismatch - self.allow_self_signed_server_cert = allow_self_signed_server_cert - self.encrypted_credential = encrypted_credential - self.type = 'Hive' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hive_object_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hive_object_dataset.py deleted file mode 100644 index 7dc4fd367f8a..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hive_object_dataset.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class HiveObjectDataset(Dataset): - """Hive Server dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(HiveObjectDataset, self).__init__(**kwargs) - self.table_name = kwargs.get('table_name', None) - self.type = 'HiveObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hive_object_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hive_object_dataset_py3.py deleted file mode 100644 index c007333721be..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hive_object_dataset_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class HiveObjectDataset(Dataset): - """Hive Server dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: - super(HiveObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.table_name = table_name - self.type = 'HiveObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hive_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hive_source.py deleted file mode 100644 index ad7cd5dc5a8a..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hive_source.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class HiveSource(CopySource): - """A copy activity Hive Server source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(HiveSource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.type = 'HiveSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hive_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hive_source_py3.py deleted file mode 100644 index 7dc54994b25a..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hive_source_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class HiveSource(CopySource): - """A copy activity Hive Server source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query=None, **kwargs) -> None: - super(HiveSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.type = 'HiveSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/http_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/http_dataset.py deleted file mode 100644 index f2184dea151f..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/http_dataset.py +++ /dev/null @@ -1,99 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class HttpDataset(Dataset): - """A file in an HTTP web server. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param relative_url: The relative URL based on the URL in the - HttpLinkedService refers to an HTTP file Type: string (or Expression with - resultType string). - :type relative_url: object - :param request_method: The HTTP method for the HTTP request. Type: string - (or Expression with resultType string). - :type request_method: object - :param request_body: The body for the HTTP request. Type: string (or - Expression with resultType string). - :type request_body: object - :param additional_headers: The headers for the HTTP Request. e.g. - request-header-name-1:request-header-value-1 - ... - request-header-name-n:request-header-value-n Type: string (or Expression - with resultType string). - :type additional_headers: object - :param format: The format of files. - :type format: ~azure.mgmt.datafactory.models.DatasetStorageFormat - :param compression: The data compression method used on files. - :type compression: ~azure.mgmt.datafactory.models.DatasetCompression - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'relative_url': {'key': 'typeProperties.relativeUrl', 'type': 'object'}, - 'request_method': {'key': 'typeProperties.requestMethod', 'type': 'object'}, - 'request_body': {'key': 'typeProperties.requestBody', 'type': 'object'}, - 'additional_headers': {'key': 'typeProperties.additionalHeaders', 'type': 'object'}, - 'format': {'key': 'typeProperties.format', 'type': 'DatasetStorageFormat'}, - 'compression': {'key': 'typeProperties.compression', 'type': 'DatasetCompression'}, - } - - def __init__(self, **kwargs): - super(HttpDataset, self).__init__(**kwargs) - self.relative_url = kwargs.get('relative_url', None) - self.request_method = kwargs.get('request_method', None) - self.request_body = kwargs.get('request_body', None) - self.additional_headers = kwargs.get('additional_headers', None) - self.format = kwargs.get('format', None) - self.compression = kwargs.get('compression', None) - self.type = 'HttpFile' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/http_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/http_dataset_py3.py deleted file mode 100644 index 09f97a03a95d..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/http_dataset_py3.py +++ /dev/null @@ -1,99 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class HttpDataset(Dataset): - """A file in an HTTP web server. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param relative_url: The relative URL based on the URL in the - HttpLinkedService refers to an HTTP file Type: string (or Expression with - resultType string). - :type relative_url: object - :param request_method: The HTTP method for the HTTP request. Type: string - (or Expression with resultType string). - :type request_method: object - :param request_body: The body for the HTTP request. Type: string (or - Expression with resultType string). - :type request_body: object - :param additional_headers: The headers for the HTTP Request. e.g. - request-header-name-1:request-header-value-1 - ... - request-header-name-n:request-header-value-n Type: string (or Expression - with resultType string). - :type additional_headers: object - :param format: The format of files. - :type format: ~azure.mgmt.datafactory.models.DatasetStorageFormat - :param compression: The data compression method used on files. - :type compression: ~azure.mgmt.datafactory.models.DatasetCompression - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'relative_url': {'key': 'typeProperties.relativeUrl', 'type': 'object'}, - 'request_method': {'key': 'typeProperties.requestMethod', 'type': 'object'}, - 'request_body': {'key': 'typeProperties.requestBody', 'type': 'object'}, - 'additional_headers': {'key': 'typeProperties.additionalHeaders', 'type': 'object'}, - 'format': {'key': 'typeProperties.format', 'type': 'DatasetStorageFormat'}, - 'compression': {'key': 'typeProperties.compression', 'type': 'DatasetCompression'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, relative_url=None, request_method=None, request_body=None, additional_headers=None, format=None, compression=None, **kwargs) -> None: - super(HttpDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.relative_url = relative_url - self.request_method = request_method - self.request_body = request_body - self.additional_headers = additional_headers - self.format = format - self.compression = compression - self.type = 'HttpFile' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/http_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/http_linked_service.py deleted file mode 100644 index 86d6a072925e..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/http_linked_service.py +++ /dev/null @@ -1,105 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class HttpLinkedService(LinkedService): - """Linked service for an HTTP source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param url: Required. The base URL of the HTTP endpoint, e.g. - http://www.microsoft.com. Type: string (or Expression with resultType - string). - :type url: object - :param authentication_type: The authentication type to be used to connect - to the HTTP server. Possible values include: 'Basic', 'Anonymous', - 'Digest', 'Windows', 'ClientCertificate' - :type authentication_type: str or - ~azure.mgmt.datafactory.models.HttpAuthenticationType - :param user_name: User name for Basic, Digest, or Windows authentication. - Type: string (or Expression with resultType string). - :type user_name: object - :param password: Password for Basic, Digest, Windows, or ClientCertificate - with EmbeddedCertData authentication. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param embedded_cert_data: Base64 encoded certificate data for - ClientCertificate authentication. For on-premises copy with - ClientCertificate authentication, either CertThumbprint or - EmbeddedCertData/Password should be specified. Type: string (or Expression - with resultType string). - :type embedded_cert_data: object - :param cert_thumbprint: Thumbprint of certificate for ClientCertificate - authentication. Only valid for on-premises copy. For on-premises copy with - ClientCertificate authentication, either CertThumbprint or - EmbeddedCertData/Password should be specified. Type: string (or Expression - with resultType string). - :type cert_thumbprint: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - :param enable_server_certificate_validation: If true, validate the HTTPS - server SSL certificate. Default value is true. Type: boolean (or - Expression with resultType boolean). - :type enable_server_certificate_validation: object - """ - - _validation = { - 'type': {'required': True}, - 'url': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'url': {'key': 'typeProperties.url', 'type': 'object'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, - 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'embedded_cert_data': {'key': 'typeProperties.embeddedCertData', 'type': 'object'}, - 'cert_thumbprint': {'key': 'typeProperties.certThumbprint', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - 'enable_server_certificate_validation': {'key': 'typeProperties.enableServerCertificateValidation', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(HttpLinkedService, self).__init__(**kwargs) - self.url = kwargs.get('url', None) - self.authentication_type = kwargs.get('authentication_type', None) - self.user_name = kwargs.get('user_name', None) - self.password = kwargs.get('password', None) - self.embedded_cert_data = kwargs.get('embedded_cert_data', None) - self.cert_thumbprint = kwargs.get('cert_thumbprint', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.enable_server_certificate_validation = kwargs.get('enable_server_certificate_validation', None) - self.type = 'HttpServer' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/http_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/http_linked_service_py3.py deleted file mode 100644 index bd4f03006513..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/http_linked_service_py3.py +++ /dev/null @@ -1,105 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class HttpLinkedService(LinkedService): - """Linked service for an HTTP source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param url: Required. The base URL of the HTTP endpoint, e.g. - http://www.microsoft.com. Type: string (or Expression with resultType - string). - :type url: object - :param authentication_type: The authentication type to be used to connect - to the HTTP server. Possible values include: 'Basic', 'Anonymous', - 'Digest', 'Windows', 'ClientCertificate' - :type authentication_type: str or - ~azure.mgmt.datafactory.models.HttpAuthenticationType - :param user_name: User name for Basic, Digest, or Windows authentication. - Type: string (or Expression with resultType string). - :type user_name: object - :param password: Password for Basic, Digest, Windows, or ClientCertificate - with EmbeddedCertData authentication. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param embedded_cert_data: Base64 encoded certificate data for - ClientCertificate authentication. For on-premises copy with - ClientCertificate authentication, either CertThumbprint or - EmbeddedCertData/Password should be specified. Type: string (or Expression - with resultType string). - :type embedded_cert_data: object - :param cert_thumbprint: Thumbprint of certificate for ClientCertificate - authentication. Only valid for on-premises copy. For on-premises copy with - ClientCertificate authentication, either CertThumbprint or - EmbeddedCertData/Password should be specified. Type: string (or Expression - with resultType string). - :type cert_thumbprint: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - :param enable_server_certificate_validation: If true, validate the HTTPS - server SSL certificate. Default value is true. Type: boolean (or - Expression with resultType boolean). - :type enable_server_certificate_validation: object - """ - - _validation = { - 'type': {'required': True}, - 'url': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'url': {'key': 'typeProperties.url', 'type': 'object'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, - 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'embedded_cert_data': {'key': 'typeProperties.embeddedCertData', 'type': 'object'}, - 'cert_thumbprint': {'key': 'typeProperties.certThumbprint', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - 'enable_server_certificate_validation': {'key': 'typeProperties.enableServerCertificateValidation', 'type': 'object'}, - } - - def __init__(self, *, url, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, authentication_type=None, user_name=None, password=None, embedded_cert_data=None, cert_thumbprint=None, encrypted_credential=None, enable_server_certificate_validation=None, **kwargs) -> None: - super(HttpLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.url = url - self.authentication_type = authentication_type - self.user_name = user_name - self.password = password - self.embedded_cert_data = embedded_cert_data - self.cert_thumbprint = cert_thumbprint - self.encrypted_credential = encrypted_credential - self.enable_server_certificate_validation = enable_server_certificate_validation - self.type = 'HttpServer' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/http_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/http_source.py deleted file mode 100644 index 8c4a6ef6b8d7..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/http_source.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class HttpSource(CopySource): - """A copy activity source for an HTTP file. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param http_request_timeout: Specifies the timeout for a HTTP client to - get HTTP response from HTTP server. The default value is equivalent to - System.Net.HttpWebRequest.Timeout. Type: string (or Expression with - resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type http_request_timeout: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'http_request_timeout': {'key': 'httpRequestTimeout', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(HttpSource, self).__init__(**kwargs) - self.http_request_timeout = kwargs.get('http_request_timeout', None) - self.type = 'HttpSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/http_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/http_source_py3.py deleted file mode 100644 index 78bfe7216da6..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/http_source_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class HttpSource(CopySource): - """A copy activity source for an HTTP file. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param http_request_timeout: Specifies the timeout for a HTTP client to - get HTTP response from HTTP server. The default value is equivalent to - System.Net.HttpWebRequest.Timeout. Type: string (or Expression with - resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type http_request_timeout: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'http_request_timeout': {'key': 'httpRequestTimeout', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, http_request_timeout=None, **kwargs) -> None: - super(HttpSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.http_request_timeout = http_request_timeout - self.type = 'HttpSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hubspot_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hubspot_linked_service.py deleted file mode 100644 index 08af04633c12..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hubspot_linked_service.py +++ /dev/null @@ -1,96 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class HubspotLinkedService(LinkedService): - """Hubspot Service linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param client_id: Required. The client ID associated with your Hubspot - application. - :type client_id: object - :param client_secret: The client secret associated with your Hubspot - application. - :type client_secret: ~azure.mgmt.datafactory.models.SecretBase - :param access_token: The access token obtained when initially - authenticating your OAuth integration. - :type access_token: ~azure.mgmt.datafactory.models.SecretBase - :param refresh_token: The refresh token obtained when initially - authenticating your OAuth integration. - :type refresh_token: ~azure.mgmt.datafactory.models.SecretBase - :param use_encrypted_endpoints: Specifies whether the data source - endpoints are encrypted using HTTPS. The default value is true. - :type use_encrypted_endpoints: object - :param use_host_verification: Specifies whether to require the host name - in the server's certificate to match the host name of the server when - connecting over SSL. The default value is true. - :type use_host_verification: object - :param use_peer_verification: Specifies whether to verify the identity of - the server when connecting over SSL. The default value is true. - :type use_peer_verification: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'client_id': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, - 'client_secret': {'key': 'typeProperties.clientSecret', 'type': 'SecretBase'}, - 'access_token': {'key': 'typeProperties.accessToken', 'type': 'SecretBase'}, - 'refresh_token': {'key': 'typeProperties.refreshToken', 'type': 'SecretBase'}, - 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, - 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, - 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(HubspotLinkedService, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.client_secret = kwargs.get('client_secret', None) - self.access_token = kwargs.get('access_token', None) - self.refresh_token = kwargs.get('refresh_token', None) - self.use_encrypted_endpoints = kwargs.get('use_encrypted_endpoints', None) - self.use_host_verification = kwargs.get('use_host_verification', None) - self.use_peer_verification = kwargs.get('use_peer_verification', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'Hubspot' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hubspot_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hubspot_linked_service_py3.py deleted file mode 100644 index 93f66cd8e17b..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hubspot_linked_service_py3.py +++ /dev/null @@ -1,96 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class HubspotLinkedService(LinkedService): - """Hubspot Service linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param client_id: Required. The client ID associated with your Hubspot - application. - :type client_id: object - :param client_secret: The client secret associated with your Hubspot - application. - :type client_secret: ~azure.mgmt.datafactory.models.SecretBase - :param access_token: The access token obtained when initially - authenticating your OAuth integration. - :type access_token: ~azure.mgmt.datafactory.models.SecretBase - :param refresh_token: The refresh token obtained when initially - authenticating your OAuth integration. - :type refresh_token: ~azure.mgmt.datafactory.models.SecretBase - :param use_encrypted_endpoints: Specifies whether the data source - endpoints are encrypted using HTTPS. The default value is true. - :type use_encrypted_endpoints: object - :param use_host_verification: Specifies whether to require the host name - in the server's certificate to match the host name of the server when - connecting over SSL. The default value is true. - :type use_host_verification: object - :param use_peer_verification: Specifies whether to verify the identity of - the server when connecting over SSL. The default value is true. - :type use_peer_verification: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'client_id': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, - 'client_secret': {'key': 'typeProperties.clientSecret', 'type': 'SecretBase'}, - 'access_token': {'key': 'typeProperties.accessToken', 'type': 'SecretBase'}, - 'refresh_token': {'key': 'typeProperties.refreshToken', 'type': 'SecretBase'}, - 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, - 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, - 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, client_id, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, client_secret=None, access_token=None, refresh_token=None, use_encrypted_endpoints=None, use_host_verification=None, use_peer_verification=None, encrypted_credential=None, **kwargs) -> None: - super(HubspotLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.client_id = client_id - self.client_secret = client_secret - self.access_token = access_token - self.refresh_token = refresh_token - self.use_encrypted_endpoints = use_encrypted_endpoints - self.use_host_verification = use_host_verification - self.use_peer_verification = use_peer_verification - self.encrypted_credential = encrypted_credential - self.type = 'Hubspot' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hubspot_object_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hubspot_object_dataset.py deleted file mode 100644 index ce8994b4db4a..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hubspot_object_dataset.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class HubspotObjectDataset(Dataset): - """Hubspot Service dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(HubspotObjectDataset, self).__init__(**kwargs) - self.table_name = kwargs.get('table_name', None) - self.type = 'HubspotObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hubspot_object_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hubspot_object_dataset_py3.py deleted file mode 100644 index bd2309101f72..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hubspot_object_dataset_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class HubspotObjectDataset(Dataset): - """Hubspot Service dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: - super(HubspotObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.table_name = table_name - self.type = 'HubspotObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hubspot_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hubspot_source.py deleted file mode 100644 index bca6b525860c..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hubspot_source.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class HubspotSource(CopySource): - """A copy activity Hubspot Service source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(HubspotSource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.type = 'HubspotSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hubspot_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hubspot_source_py3.py deleted file mode 100644 index cfc2d2d815b5..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/hubspot_source_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class HubspotSource(CopySource): - """A copy activity Hubspot Service source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query=None, **kwargs) -> None: - super(HubspotSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.type = 'HubspotSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/if_condition_activity.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/if_condition_activity.py deleted file mode 100644 index a8cb1da690e1..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/if_condition_activity.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .control_activity import ControlActivity - - -class IfConditionActivity(ControlActivity): - """This activity evaluates a boolean expression and executes either the - activities under the ifTrueActivities property or the ifFalseActivities - property depending on the result of the expression. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param expression: Required. An expression that would evaluate to Boolean. - This is used to determine the block of activities (ifTrueActivities or - ifFalseActivities) that will be executed. - :type expression: ~azure.mgmt.datafactory.models.Expression - :param if_true_activities: List of activities to execute if expression is - evaluated to true. This is an optional property and if not provided, the - activity will exit without any action. - :type if_true_activities: list[~azure.mgmt.datafactory.models.Activity] - :param if_false_activities: List of activities to execute if expression is - evaluated to false. This is an optional property and if not provided, the - activity will exit without any action. - :type if_false_activities: list[~azure.mgmt.datafactory.models.Activity] - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'expression': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'expression': {'key': 'typeProperties.expression', 'type': 'Expression'}, - 'if_true_activities': {'key': 'typeProperties.ifTrueActivities', 'type': '[Activity]'}, - 'if_false_activities': {'key': 'typeProperties.ifFalseActivities', 'type': '[Activity]'}, - } - - def __init__(self, **kwargs): - super(IfConditionActivity, self).__init__(**kwargs) - self.expression = kwargs.get('expression', None) - self.if_true_activities = kwargs.get('if_true_activities', None) - self.if_false_activities = kwargs.get('if_false_activities', None) - self.type = 'IfCondition' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/if_condition_activity_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/if_condition_activity_py3.py deleted file mode 100644 index 7921a2602807..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/if_condition_activity_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .control_activity_py3 import ControlActivity - - -class IfConditionActivity(ControlActivity): - """This activity evaluates a boolean expression and executes either the - activities under the ifTrueActivities property or the ifFalseActivities - property depending on the result of the expression. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param expression: Required. An expression that would evaluate to Boolean. - This is used to determine the block of activities (ifTrueActivities or - ifFalseActivities) that will be executed. - :type expression: ~azure.mgmt.datafactory.models.Expression - :param if_true_activities: List of activities to execute if expression is - evaluated to true. This is an optional property and if not provided, the - activity will exit without any action. - :type if_true_activities: list[~azure.mgmt.datafactory.models.Activity] - :param if_false_activities: List of activities to execute if expression is - evaluated to false. This is an optional property and if not provided, the - activity will exit without any action. - :type if_false_activities: list[~azure.mgmt.datafactory.models.Activity] - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'expression': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'expression': {'key': 'typeProperties.expression', 'type': 'Expression'}, - 'if_true_activities': {'key': 'typeProperties.ifTrueActivities', 'type': '[Activity]'}, - 'if_false_activities': {'key': 'typeProperties.ifFalseActivities', 'type': '[Activity]'}, - } - - def __init__(self, *, name: str, expression, additional_properties=None, description: str=None, depends_on=None, user_properties=None, if_true_activities=None, if_false_activities=None, **kwargs) -> None: - super(IfConditionActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, **kwargs) - self.expression = expression - self.if_true_activities = if_true_activities - self.if_false_activities = if_false_activities - self.type = 'IfCondition' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/impala_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/impala_linked_service.py deleted file mode 100644 index fdc471ea225f..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/impala_linked_service.py +++ /dev/null @@ -1,117 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class ImpalaLinkedService(LinkedService): - """Impala server linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param host: Required. The IP address or host name of the Impala server. - (i.e. 192.168.222.160) - :type host: object - :param port: The TCP port that the Impala server uses to listen for client - connections. The default value is 21050. - :type port: object - :param authentication_type: Required. The authentication type to use. - Possible values include: 'Anonymous', 'SASLUsername', - 'UsernameAndPassword' - :type authentication_type: str or - ~azure.mgmt.datafactory.models.ImpalaAuthenticationType - :param username: The user name used to access the Impala server. The - default value is anonymous when using SASLUsername. - :type username: object - :param password: The password corresponding to the user name when using - UsernameAndPassword. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param enable_ssl: Specifies whether the connections to the server are - encrypted using SSL. The default value is false. - :type enable_ssl: object - :param trusted_cert_path: The full path of the .pem file containing - trusted CA certificates for verifying the server when connecting over SSL. - This property can only be set when using SSL on self-hosted IR. The - default value is the cacerts.pem file installed with the IR. - :type trusted_cert_path: object - :param use_system_trust_store: Specifies whether to use a CA certificate - from the system trust store or from a specified PEM file. The default - value is false. - :type use_system_trust_store: object - :param allow_host_name_cn_mismatch: Specifies whether to require a - CA-issued SSL certificate name to match the host name of the server when - connecting over SSL. The default value is false. - :type allow_host_name_cn_mismatch: object - :param allow_self_signed_server_cert: Specifies whether to allow - self-signed certificates from the server. The default value is false. - :type allow_self_signed_server_cert: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'host': {'required': True}, - 'authentication_type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'host': {'key': 'typeProperties.host', 'type': 'object'}, - 'port': {'key': 'typeProperties.port', 'type': 'object'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, - 'username': {'key': 'typeProperties.username', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'enable_ssl': {'key': 'typeProperties.enableSsl', 'type': 'object'}, - 'trusted_cert_path': {'key': 'typeProperties.trustedCertPath', 'type': 'object'}, - 'use_system_trust_store': {'key': 'typeProperties.useSystemTrustStore', 'type': 'object'}, - 'allow_host_name_cn_mismatch': {'key': 'typeProperties.allowHostNameCNMismatch', 'type': 'object'}, - 'allow_self_signed_server_cert': {'key': 'typeProperties.allowSelfSignedServerCert', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ImpalaLinkedService, self).__init__(**kwargs) - self.host = kwargs.get('host', None) - self.port = kwargs.get('port', None) - self.authentication_type = kwargs.get('authentication_type', None) - self.username = kwargs.get('username', None) - self.password = kwargs.get('password', None) - self.enable_ssl = kwargs.get('enable_ssl', None) - self.trusted_cert_path = kwargs.get('trusted_cert_path', None) - self.use_system_trust_store = kwargs.get('use_system_trust_store', None) - self.allow_host_name_cn_mismatch = kwargs.get('allow_host_name_cn_mismatch', None) - self.allow_self_signed_server_cert = kwargs.get('allow_self_signed_server_cert', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'Impala' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/impala_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/impala_linked_service_py3.py deleted file mode 100644 index 9d79f13b9708..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/impala_linked_service_py3.py +++ /dev/null @@ -1,117 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class ImpalaLinkedService(LinkedService): - """Impala server linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param host: Required. The IP address or host name of the Impala server. - (i.e. 192.168.222.160) - :type host: object - :param port: The TCP port that the Impala server uses to listen for client - connections. The default value is 21050. - :type port: object - :param authentication_type: Required. The authentication type to use. - Possible values include: 'Anonymous', 'SASLUsername', - 'UsernameAndPassword' - :type authentication_type: str or - ~azure.mgmt.datafactory.models.ImpalaAuthenticationType - :param username: The user name used to access the Impala server. The - default value is anonymous when using SASLUsername. - :type username: object - :param password: The password corresponding to the user name when using - UsernameAndPassword. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param enable_ssl: Specifies whether the connections to the server are - encrypted using SSL. The default value is false. - :type enable_ssl: object - :param trusted_cert_path: The full path of the .pem file containing - trusted CA certificates for verifying the server when connecting over SSL. - This property can only be set when using SSL on self-hosted IR. The - default value is the cacerts.pem file installed with the IR. - :type trusted_cert_path: object - :param use_system_trust_store: Specifies whether to use a CA certificate - from the system trust store or from a specified PEM file. The default - value is false. - :type use_system_trust_store: object - :param allow_host_name_cn_mismatch: Specifies whether to require a - CA-issued SSL certificate name to match the host name of the server when - connecting over SSL. The default value is false. - :type allow_host_name_cn_mismatch: object - :param allow_self_signed_server_cert: Specifies whether to allow - self-signed certificates from the server. The default value is false. - :type allow_self_signed_server_cert: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'host': {'required': True}, - 'authentication_type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'host': {'key': 'typeProperties.host', 'type': 'object'}, - 'port': {'key': 'typeProperties.port', 'type': 'object'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, - 'username': {'key': 'typeProperties.username', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'enable_ssl': {'key': 'typeProperties.enableSsl', 'type': 'object'}, - 'trusted_cert_path': {'key': 'typeProperties.trustedCertPath', 'type': 'object'}, - 'use_system_trust_store': {'key': 'typeProperties.useSystemTrustStore', 'type': 'object'}, - 'allow_host_name_cn_mismatch': {'key': 'typeProperties.allowHostNameCNMismatch', 'type': 'object'}, - 'allow_self_signed_server_cert': {'key': 'typeProperties.allowSelfSignedServerCert', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, host, authentication_type, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, port=None, username=None, password=None, enable_ssl=None, trusted_cert_path=None, use_system_trust_store=None, allow_host_name_cn_mismatch=None, allow_self_signed_server_cert=None, encrypted_credential=None, **kwargs) -> None: - super(ImpalaLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.host = host - self.port = port - self.authentication_type = authentication_type - self.username = username - self.password = password - self.enable_ssl = enable_ssl - self.trusted_cert_path = trusted_cert_path - self.use_system_trust_store = use_system_trust_store - self.allow_host_name_cn_mismatch = allow_host_name_cn_mismatch - self.allow_self_signed_server_cert = allow_self_signed_server_cert - self.encrypted_credential = encrypted_credential - self.type = 'Impala' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/impala_object_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/impala_object_dataset.py deleted file mode 100644 index d9bf591d8021..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/impala_object_dataset.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class ImpalaObjectDataset(Dataset): - """Impala server dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ImpalaObjectDataset, self).__init__(**kwargs) - self.table_name = kwargs.get('table_name', None) - self.type = 'ImpalaObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/impala_object_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/impala_object_dataset_py3.py deleted file mode 100644 index d103603b2586..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/impala_object_dataset_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class ImpalaObjectDataset(Dataset): - """Impala server dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: - super(ImpalaObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.table_name = table_name - self.type = 'ImpalaObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/impala_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/impala_source.py deleted file mode 100644 index dec8e843d0c6..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/impala_source.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class ImpalaSource(CopySource): - """A copy activity Impala server source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ImpalaSource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.type = 'ImpalaSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/impala_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/impala_source_py3.py deleted file mode 100644 index 5bdb3391c2fc..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/impala_source_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class ImpalaSource(CopySource): - """A copy activity Impala server source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query=None, **kwargs) -> None: - super(ImpalaSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.type = 'ImpalaSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime.py deleted file mode 100644 index 5dd45d16f76e..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationRuntime(Model): - """Azure Data Factory nested object which serves as a compute resource for - activities. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: SelfHostedIntegrationRuntime, ManagedIntegrationRuntime - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Integration runtime description. - :type description: str - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'SelfHosted': 'SelfHostedIntegrationRuntime', 'Managed': 'ManagedIntegrationRuntime'} - } - - def __init__(self, **kwargs): - super(IntegrationRuntime, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.description = kwargs.get('description', None) - self.type = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_auth_keys.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_auth_keys.py deleted file mode 100644 index 12ed6925585e..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_auth_keys.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationRuntimeAuthKeys(Model): - """The integration runtime authentication keys. - - :param auth_key1: The primary integration runtime authentication key. - :type auth_key1: str - :param auth_key2: The secondary integration runtime authentication key. - :type auth_key2: str - """ - - _attribute_map = { - 'auth_key1': {'key': 'authKey1', 'type': 'str'}, - 'auth_key2': {'key': 'authKey2', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IntegrationRuntimeAuthKeys, self).__init__(**kwargs) - self.auth_key1 = kwargs.get('auth_key1', None) - self.auth_key2 = kwargs.get('auth_key2', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_auth_keys_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_auth_keys_py3.py deleted file mode 100644 index b807d4cd5b55..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_auth_keys_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationRuntimeAuthKeys(Model): - """The integration runtime authentication keys. - - :param auth_key1: The primary integration runtime authentication key. - :type auth_key1: str - :param auth_key2: The secondary integration runtime authentication key. - :type auth_key2: str - """ - - _attribute_map = { - 'auth_key1': {'key': 'authKey1', 'type': 'str'}, - 'auth_key2': {'key': 'authKey2', 'type': 'str'}, - } - - def __init__(self, *, auth_key1: str=None, auth_key2: str=None, **kwargs) -> None: - super(IntegrationRuntimeAuthKeys, self).__init__(**kwargs) - self.auth_key1 = auth_key1 - self.auth_key2 = auth_key2 diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_compute_properties.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_compute_properties.py deleted file mode 100644 index e387ef4077f2..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_compute_properties.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationRuntimeComputeProperties(Model): - """The compute resource properties for managed integration runtime. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param location: The location for managed integration runtime. The - supported regions could be found on - https://docs.microsoft.com/en-us/azure/data-factory/data-factory-data-movement-activities - :type location: str - :param node_size: The node size requirement to managed integration - runtime. - :type node_size: str - :param number_of_nodes: The required number of nodes for managed - integration runtime. - :type number_of_nodes: int - :param max_parallel_executions_per_node: Maximum parallel executions count - per node for managed integration runtime. - :type max_parallel_executions_per_node: int - :param v_net_properties: VNet properties for managed integration runtime. - :type v_net_properties: - ~azure.mgmt.datafactory.models.IntegrationRuntimeVNetProperties - """ - - _validation = { - 'number_of_nodes': {'minimum': 1}, - 'max_parallel_executions_per_node': {'minimum': 1}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'node_size': {'key': 'nodeSize', 'type': 'str'}, - 'number_of_nodes': {'key': 'numberOfNodes', 'type': 'int'}, - 'max_parallel_executions_per_node': {'key': 'maxParallelExecutionsPerNode', 'type': 'int'}, - 'v_net_properties': {'key': 'vNetProperties', 'type': 'IntegrationRuntimeVNetProperties'}, - } - - def __init__(self, **kwargs): - super(IntegrationRuntimeComputeProperties, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.location = kwargs.get('location', None) - self.node_size = kwargs.get('node_size', None) - self.number_of_nodes = kwargs.get('number_of_nodes', None) - self.max_parallel_executions_per_node = kwargs.get('max_parallel_executions_per_node', None) - self.v_net_properties = kwargs.get('v_net_properties', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_compute_properties_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_compute_properties_py3.py deleted file mode 100644 index f47f339dd067..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_compute_properties_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationRuntimeComputeProperties(Model): - """The compute resource properties for managed integration runtime. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param location: The location for managed integration runtime. The - supported regions could be found on - https://docs.microsoft.com/en-us/azure/data-factory/data-factory-data-movement-activities - :type location: str - :param node_size: The node size requirement to managed integration - runtime. - :type node_size: str - :param number_of_nodes: The required number of nodes for managed - integration runtime. - :type number_of_nodes: int - :param max_parallel_executions_per_node: Maximum parallel executions count - per node for managed integration runtime. - :type max_parallel_executions_per_node: int - :param v_net_properties: VNet properties for managed integration runtime. - :type v_net_properties: - ~azure.mgmt.datafactory.models.IntegrationRuntimeVNetProperties - """ - - _validation = { - 'number_of_nodes': {'minimum': 1}, - 'max_parallel_executions_per_node': {'minimum': 1}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'node_size': {'key': 'nodeSize', 'type': 'str'}, - 'number_of_nodes': {'key': 'numberOfNodes', 'type': 'int'}, - 'max_parallel_executions_per_node': {'key': 'maxParallelExecutionsPerNode', 'type': 'int'}, - 'v_net_properties': {'key': 'vNetProperties', 'type': 'IntegrationRuntimeVNetProperties'}, - } - - def __init__(self, *, additional_properties=None, location: str=None, node_size: str=None, number_of_nodes: int=None, max_parallel_executions_per_node: int=None, v_net_properties=None, **kwargs) -> None: - super(IntegrationRuntimeComputeProperties, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.location = location - self.node_size = node_size - self.number_of_nodes = number_of_nodes - self.max_parallel_executions_per_node = max_parallel_executions_per_node - self.v_net_properties = v_net_properties diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_connection_info.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_connection_info.py deleted file mode 100644 index c185f916e8e5..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_connection_info.py +++ /dev/null @@ -1,70 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationRuntimeConnectionInfo(Model): - """Connection information for encrypting the on-premises data source - credentials. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar service_token: The token generated in service. Callers use this - token to authenticate to integration runtime. - :vartype service_token: str - :ivar identity_cert_thumbprint: The integration runtime SSL certificate - thumbprint. Click-Once application uses it to do server validation. - :vartype identity_cert_thumbprint: str - :ivar host_service_uri: The on-premises integration runtime host URL. - :vartype host_service_uri: str - :ivar version: The integration runtime version. - :vartype version: str - :ivar public_key: The public key for encrypting a credential when - transferring the credential to the integration runtime. - :vartype public_key: str - :ivar is_identity_cert_exprired: Whether the identity certificate is - expired. - :vartype is_identity_cert_exprired: bool - """ - - _validation = { - 'service_token': {'readonly': True}, - 'identity_cert_thumbprint': {'readonly': True}, - 'host_service_uri': {'readonly': True}, - 'version': {'readonly': True}, - 'public_key': {'readonly': True}, - 'is_identity_cert_exprired': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'service_token': {'key': 'serviceToken', 'type': 'str'}, - 'identity_cert_thumbprint': {'key': 'identityCertThumbprint', 'type': 'str'}, - 'host_service_uri': {'key': 'hostServiceUri', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - 'public_key': {'key': 'publicKey', 'type': 'str'}, - 'is_identity_cert_exprired': {'key': 'isIdentityCertExprired', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(IntegrationRuntimeConnectionInfo, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.service_token = None - self.identity_cert_thumbprint = None - self.host_service_uri = None - self.version = None - self.public_key = None - self.is_identity_cert_exprired = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_connection_info_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_connection_info_py3.py deleted file mode 100644 index 8cc5aceb16d7..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_connection_info_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationRuntimeConnectionInfo(Model): - """Connection information for encrypting the on-premises data source - credentials. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar service_token: The token generated in service. Callers use this - token to authenticate to integration runtime. - :vartype service_token: str - :ivar identity_cert_thumbprint: The integration runtime SSL certificate - thumbprint. Click-Once application uses it to do server validation. - :vartype identity_cert_thumbprint: str - :ivar host_service_uri: The on-premises integration runtime host URL. - :vartype host_service_uri: str - :ivar version: The integration runtime version. - :vartype version: str - :ivar public_key: The public key for encrypting a credential when - transferring the credential to the integration runtime. - :vartype public_key: str - :ivar is_identity_cert_exprired: Whether the identity certificate is - expired. - :vartype is_identity_cert_exprired: bool - """ - - _validation = { - 'service_token': {'readonly': True}, - 'identity_cert_thumbprint': {'readonly': True}, - 'host_service_uri': {'readonly': True}, - 'version': {'readonly': True}, - 'public_key': {'readonly': True}, - 'is_identity_cert_exprired': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'service_token': {'key': 'serviceToken', 'type': 'str'}, - 'identity_cert_thumbprint': {'key': 'identityCertThumbprint', 'type': 'str'}, - 'host_service_uri': {'key': 'hostServiceUri', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - 'public_key': {'key': 'publicKey', 'type': 'str'}, - 'is_identity_cert_exprired': {'key': 'isIdentityCertExprired', 'type': 'bool'}, - } - - def __init__(self, *, additional_properties=None, **kwargs) -> None: - super(IntegrationRuntimeConnectionInfo, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.service_token = None - self.identity_cert_thumbprint = None - self.host_service_uri = None - self.version = None - self.public_key = None - self.is_identity_cert_exprired = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_custom_setup_script_properties.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_custom_setup_script_properties.py deleted file mode 100644 index 44cd5fe5979b..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_custom_setup_script_properties.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationRuntimeCustomSetupScriptProperties(Model): - """Custom setup script properties for a managed dedicated integration runtime. - - :param blob_container_uri: The URI of the Azure blob container that - contains the custom setup script. - :type blob_container_uri: str - :param sas_token: The SAS token of the Azure blob container. - :type sas_token: ~azure.mgmt.datafactory.models.SecureString - """ - - _attribute_map = { - 'blob_container_uri': {'key': 'blobContainerUri', 'type': 'str'}, - 'sas_token': {'key': 'sasToken', 'type': 'SecureString'}, - } - - def __init__(self, **kwargs): - super(IntegrationRuntimeCustomSetupScriptProperties, self).__init__(**kwargs) - self.blob_container_uri = kwargs.get('blob_container_uri', None) - self.sas_token = kwargs.get('sas_token', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_custom_setup_script_properties_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_custom_setup_script_properties_py3.py deleted file mode 100644 index 7f3c08c0b339..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_custom_setup_script_properties_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationRuntimeCustomSetupScriptProperties(Model): - """Custom setup script properties for a managed dedicated integration runtime. - - :param blob_container_uri: The URI of the Azure blob container that - contains the custom setup script. - :type blob_container_uri: str - :param sas_token: The SAS token of the Azure blob container. - :type sas_token: ~azure.mgmt.datafactory.models.SecureString - """ - - _attribute_map = { - 'blob_container_uri': {'key': 'blobContainerUri', 'type': 'str'}, - 'sas_token': {'key': 'sasToken', 'type': 'SecureString'}, - } - - def __init__(self, *, blob_container_uri: str=None, sas_token=None, **kwargs) -> None: - super(IntegrationRuntimeCustomSetupScriptProperties, self).__init__(**kwargs) - self.blob_container_uri = blob_container_uri - self.sas_token = sas_token diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_monitoring_data.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_monitoring_data.py deleted file mode 100644 index f7b695729403..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_monitoring_data.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationRuntimeMonitoringData(Model): - """Get monitoring data response. - - :param name: Integration runtime name. - :type name: str - :param nodes: Integration runtime node monitoring data. - :type nodes: - list[~azure.mgmt.datafactory.models.IntegrationRuntimeNodeMonitoringData] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'nodes': {'key': 'nodes', 'type': '[IntegrationRuntimeNodeMonitoringData]'}, - } - - def __init__(self, **kwargs): - super(IntegrationRuntimeMonitoringData, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.nodes = kwargs.get('nodes', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_monitoring_data_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_monitoring_data_py3.py deleted file mode 100644 index 16f3b656c9cc..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_monitoring_data_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationRuntimeMonitoringData(Model): - """Get monitoring data response. - - :param name: Integration runtime name. - :type name: str - :param nodes: Integration runtime node monitoring data. - :type nodes: - list[~azure.mgmt.datafactory.models.IntegrationRuntimeNodeMonitoringData] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'nodes': {'key': 'nodes', 'type': '[IntegrationRuntimeNodeMonitoringData]'}, - } - - def __init__(self, *, name: str=None, nodes=None, **kwargs) -> None: - super(IntegrationRuntimeMonitoringData, self).__init__(**kwargs) - self.name = name - self.nodes = nodes diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_node_ip_address.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_node_ip_address.py deleted file mode 100644 index 2edabd3e2472..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_node_ip_address.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationRuntimeNodeIpAddress(Model): - """The IP address of self-hosted integration runtime node. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar ip_address: The IP address of self-hosted integration runtime node. - :vartype ip_address: str - """ - - _validation = { - 'ip_address': {'readonly': True}, - } - - _attribute_map = { - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IntegrationRuntimeNodeIpAddress, self).__init__(**kwargs) - self.ip_address = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_node_ip_address_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_node_ip_address_py3.py deleted file mode 100644 index 476be9815984..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_node_ip_address_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationRuntimeNodeIpAddress(Model): - """The IP address of self-hosted integration runtime node. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar ip_address: The IP address of self-hosted integration runtime node. - :vartype ip_address: str - """ - - _validation = { - 'ip_address': {'readonly': True}, - } - - _attribute_map = { - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(IntegrationRuntimeNodeIpAddress, self).__init__(**kwargs) - self.ip_address = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_node_monitoring_data.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_node_monitoring_data.py deleted file mode 100644 index 9d27bedf70aa..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_node_monitoring_data.py +++ /dev/null @@ -1,79 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationRuntimeNodeMonitoringData(Model): - """Monitoring data for integration runtime node. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar node_name: Name of the integration runtime node. - :vartype node_name: str - :ivar available_memory_in_mb: Available memory (MB) on the integration - runtime node. - :vartype available_memory_in_mb: int - :ivar cpu_utilization: CPU percentage on the integration runtime node. - :vartype cpu_utilization: int - :ivar concurrent_jobs_limit: Maximum concurrent jobs on the integration - runtime node. - :vartype concurrent_jobs_limit: int - :ivar concurrent_jobs_running: The number of jobs currently running on the - integration runtime node. - :vartype concurrent_jobs_running: int - :ivar max_concurrent_jobs: The maximum concurrent jobs in this integration - runtime. - :vartype max_concurrent_jobs: int - :ivar sent_bytes: Sent bytes on the integration runtime node. - :vartype sent_bytes: float - :ivar received_bytes: Received bytes on the integration runtime node. - :vartype received_bytes: float - """ - - _validation = { - 'node_name': {'readonly': True}, - 'available_memory_in_mb': {'readonly': True}, - 'cpu_utilization': {'readonly': True}, - 'concurrent_jobs_limit': {'readonly': True}, - 'concurrent_jobs_running': {'readonly': True}, - 'max_concurrent_jobs': {'readonly': True}, - 'sent_bytes': {'readonly': True}, - 'received_bytes': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'node_name': {'key': 'nodeName', 'type': 'str'}, - 'available_memory_in_mb': {'key': 'availableMemoryInMB', 'type': 'int'}, - 'cpu_utilization': {'key': 'cpuUtilization', 'type': 'int'}, - 'concurrent_jobs_limit': {'key': 'concurrentJobsLimit', 'type': 'int'}, - 'concurrent_jobs_running': {'key': 'concurrentJobsRunning', 'type': 'int'}, - 'max_concurrent_jobs': {'key': 'maxConcurrentJobs', 'type': 'int'}, - 'sent_bytes': {'key': 'sentBytes', 'type': 'float'}, - 'received_bytes': {'key': 'receivedBytes', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(IntegrationRuntimeNodeMonitoringData, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.node_name = None - self.available_memory_in_mb = None - self.cpu_utilization = None - self.concurrent_jobs_limit = None - self.concurrent_jobs_running = None - self.max_concurrent_jobs = None - self.sent_bytes = None - self.received_bytes = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_node_monitoring_data_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_node_monitoring_data_py3.py deleted file mode 100644 index 35c7e664b2ff..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_node_monitoring_data_py3.py +++ /dev/null @@ -1,79 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationRuntimeNodeMonitoringData(Model): - """Monitoring data for integration runtime node. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar node_name: Name of the integration runtime node. - :vartype node_name: str - :ivar available_memory_in_mb: Available memory (MB) on the integration - runtime node. - :vartype available_memory_in_mb: int - :ivar cpu_utilization: CPU percentage on the integration runtime node. - :vartype cpu_utilization: int - :ivar concurrent_jobs_limit: Maximum concurrent jobs on the integration - runtime node. - :vartype concurrent_jobs_limit: int - :ivar concurrent_jobs_running: The number of jobs currently running on the - integration runtime node. - :vartype concurrent_jobs_running: int - :ivar max_concurrent_jobs: The maximum concurrent jobs in this integration - runtime. - :vartype max_concurrent_jobs: int - :ivar sent_bytes: Sent bytes on the integration runtime node. - :vartype sent_bytes: float - :ivar received_bytes: Received bytes on the integration runtime node. - :vartype received_bytes: float - """ - - _validation = { - 'node_name': {'readonly': True}, - 'available_memory_in_mb': {'readonly': True}, - 'cpu_utilization': {'readonly': True}, - 'concurrent_jobs_limit': {'readonly': True}, - 'concurrent_jobs_running': {'readonly': True}, - 'max_concurrent_jobs': {'readonly': True}, - 'sent_bytes': {'readonly': True}, - 'received_bytes': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'node_name': {'key': 'nodeName', 'type': 'str'}, - 'available_memory_in_mb': {'key': 'availableMemoryInMB', 'type': 'int'}, - 'cpu_utilization': {'key': 'cpuUtilization', 'type': 'int'}, - 'concurrent_jobs_limit': {'key': 'concurrentJobsLimit', 'type': 'int'}, - 'concurrent_jobs_running': {'key': 'concurrentJobsRunning', 'type': 'int'}, - 'max_concurrent_jobs': {'key': 'maxConcurrentJobs', 'type': 'int'}, - 'sent_bytes': {'key': 'sentBytes', 'type': 'float'}, - 'received_bytes': {'key': 'receivedBytes', 'type': 'float'}, - } - - def __init__(self, *, additional_properties=None, **kwargs) -> None: - super(IntegrationRuntimeNodeMonitoringData, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.node_name = None - self.available_memory_in_mb = None - self.cpu_utilization = None - self.concurrent_jobs_limit = None - self.concurrent_jobs_running = None - self.max_concurrent_jobs = None - self.sent_bytes = None - self.received_bytes = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_py3.py deleted file mode 100644 index b4056a07591b..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationRuntime(Model): - """Azure Data Factory nested object which serves as a compute resource for - activities. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: SelfHostedIntegrationRuntime, ManagedIntegrationRuntime - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Integration runtime description. - :type description: str - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'SelfHosted': 'SelfHostedIntegrationRuntime', 'Managed': 'ManagedIntegrationRuntime'} - } - - def __init__(self, *, additional_properties=None, description: str=None, **kwargs) -> None: - super(IntegrationRuntime, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.description = description - self.type = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_reference.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_reference.py deleted file mode 100644 index 7461d29de284..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_reference.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationRuntimeReference(Model): - """Integration runtime reference type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. Type of integration runtime. Default value: - "IntegrationRuntimeReference" . - :vartype type: str - :param reference_name: Required. Reference integration runtime name. - :type reference_name: str - :param parameters: Arguments for integration runtime. - :type parameters: dict[str, object] - """ - - _validation = { - 'type': {'required': True, 'constant': True}, - 'reference_name': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'reference_name': {'key': 'referenceName', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{object}'}, - } - - type = "IntegrationRuntimeReference" - - def __init__(self, **kwargs): - super(IntegrationRuntimeReference, self).__init__(**kwargs) - self.reference_name = kwargs.get('reference_name', None) - self.parameters = kwargs.get('parameters', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_reference_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_reference_py3.py deleted file mode 100644 index 56fd3608ba61..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_reference_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationRuntimeReference(Model): - """Integration runtime reference type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. Type of integration runtime. Default value: - "IntegrationRuntimeReference" . - :vartype type: str - :param reference_name: Required. Reference integration runtime name. - :type reference_name: str - :param parameters: Arguments for integration runtime. - :type parameters: dict[str, object] - """ - - _validation = { - 'type': {'required': True, 'constant': True}, - 'reference_name': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'reference_name': {'key': 'referenceName', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{object}'}, - } - - type = "IntegrationRuntimeReference" - - def __init__(self, *, reference_name: str, parameters=None, **kwargs) -> None: - super(IntegrationRuntimeReference, self).__init__(**kwargs) - self.reference_name = reference_name - self.parameters = parameters diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_regenerate_key_parameters.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_regenerate_key_parameters.py deleted file mode 100644 index 3cd91195af1b..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_regenerate_key_parameters.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationRuntimeRegenerateKeyParameters(Model): - """Parameters to regenerate the authentication key. - - :param key_name: The name of the authentication key to regenerate. - Possible values include: 'authKey1', 'authKey2' - :type key_name: str or - ~azure.mgmt.datafactory.models.IntegrationRuntimeAuthKeyName - """ - - _attribute_map = { - 'key_name': {'key': 'keyName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IntegrationRuntimeRegenerateKeyParameters, self).__init__(**kwargs) - self.key_name = kwargs.get('key_name', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_regenerate_key_parameters_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_regenerate_key_parameters_py3.py deleted file mode 100644 index f3846cf8ec55..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_regenerate_key_parameters_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationRuntimeRegenerateKeyParameters(Model): - """Parameters to regenerate the authentication key. - - :param key_name: The name of the authentication key to regenerate. - Possible values include: 'authKey1', 'authKey2' - :type key_name: str or - ~azure.mgmt.datafactory.models.IntegrationRuntimeAuthKeyName - """ - - _attribute_map = { - 'key_name': {'key': 'keyName', 'type': 'str'}, - } - - def __init__(self, *, key_name=None, **kwargs) -> None: - super(IntegrationRuntimeRegenerateKeyParameters, self).__init__(**kwargs) - self.key_name = key_name diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_resource.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_resource.py deleted file mode 100644 index b18f376d3698..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_resource.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class IntegrationRuntimeResource(SubResource): - """Integration runtime resource type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :ivar etag: Etag identifies change in the resource. - :vartype etag: str - :param properties: Required. Integration runtime properties. - :type properties: ~azure.mgmt.datafactory.models.IntegrationRuntime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'properties': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'IntegrationRuntime'}, - } - - def __init__(self, **kwargs): - super(IntegrationRuntimeResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_resource_paged.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_resource_paged.py deleted file mode 100644 index cef89866884e..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_resource_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class IntegrationRuntimeResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`IntegrationRuntimeResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[IntegrationRuntimeResource]'} - } - - def __init__(self, *args, **kwargs): - - super(IntegrationRuntimeResourcePaged, self).__init__(*args, **kwargs) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_resource_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_resource_py3.py deleted file mode 100644 index 9239f54166f9..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_resource_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class IntegrationRuntimeResource(SubResource): - """Integration runtime resource type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :ivar etag: Etag identifies change in the resource. - :vartype etag: str - :param properties: Required. Integration runtime properties. - :type properties: ~azure.mgmt.datafactory.models.IntegrationRuntime - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'properties': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'IntegrationRuntime'}, - } - - def __init__(self, *, properties, **kwargs) -> None: - super(IntegrationRuntimeResource, self).__init__(**kwargs) - self.properties = properties diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_ssis_catalog_info.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_ssis_catalog_info.py deleted file mode 100644 index 3399f8f38300..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_ssis_catalog_info.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationRuntimeSsisCatalogInfo(Model): - """Catalog information for managed dedicated integration runtime. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param catalog_server_endpoint: The catalog database server URL. - :type catalog_server_endpoint: str - :param catalog_admin_user_name: The administrator user name of catalog - database. - :type catalog_admin_user_name: str - :param catalog_admin_password: The password of the administrator user - account of the catalog database. - :type catalog_admin_password: ~azure.mgmt.datafactory.models.SecureString - :param catalog_pricing_tier: The pricing tier for the catalog database. - The valid values could be found in - https://azure.microsoft.com/en-us/pricing/details/sql-database/. Possible - values include: 'Basic', 'Standard', 'Premium', 'PremiumRS' - :type catalog_pricing_tier: str or - ~azure.mgmt.datafactory.models.IntegrationRuntimeSsisCatalogPricingTier - """ - - _validation = { - 'catalog_admin_user_name': {'max_length': 128, 'min_length': 1}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'catalog_server_endpoint': {'key': 'catalogServerEndpoint', 'type': 'str'}, - 'catalog_admin_user_name': {'key': 'catalogAdminUserName', 'type': 'str'}, - 'catalog_admin_password': {'key': 'catalogAdminPassword', 'type': 'SecureString'}, - 'catalog_pricing_tier': {'key': 'catalogPricingTier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IntegrationRuntimeSsisCatalogInfo, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.catalog_server_endpoint = kwargs.get('catalog_server_endpoint', None) - self.catalog_admin_user_name = kwargs.get('catalog_admin_user_name', None) - self.catalog_admin_password = kwargs.get('catalog_admin_password', None) - self.catalog_pricing_tier = kwargs.get('catalog_pricing_tier', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_ssis_catalog_info_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_ssis_catalog_info_py3.py deleted file mode 100644 index 27996bb4aeb5..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_ssis_catalog_info_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationRuntimeSsisCatalogInfo(Model): - """Catalog information for managed dedicated integration runtime. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param catalog_server_endpoint: The catalog database server URL. - :type catalog_server_endpoint: str - :param catalog_admin_user_name: The administrator user name of catalog - database. - :type catalog_admin_user_name: str - :param catalog_admin_password: The password of the administrator user - account of the catalog database. - :type catalog_admin_password: ~azure.mgmt.datafactory.models.SecureString - :param catalog_pricing_tier: The pricing tier for the catalog database. - The valid values could be found in - https://azure.microsoft.com/en-us/pricing/details/sql-database/. Possible - values include: 'Basic', 'Standard', 'Premium', 'PremiumRS' - :type catalog_pricing_tier: str or - ~azure.mgmt.datafactory.models.IntegrationRuntimeSsisCatalogPricingTier - """ - - _validation = { - 'catalog_admin_user_name': {'max_length': 128, 'min_length': 1}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'catalog_server_endpoint': {'key': 'catalogServerEndpoint', 'type': 'str'}, - 'catalog_admin_user_name': {'key': 'catalogAdminUserName', 'type': 'str'}, - 'catalog_admin_password': {'key': 'catalogAdminPassword', 'type': 'SecureString'}, - 'catalog_pricing_tier': {'key': 'catalogPricingTier', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, catalog_server_endpoint: str=None, catalog_admin_user_name: str=None, catalog_admin_password=None, catalog_pricing_tier=None, **kwargs) -> None: - super(IntegrationRuntimeSsisCatalogInfo, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.catalog_server_endpoint = catalog_server_endpoint - self.catalog_admin_user_name = catalog_admin_user_name - self.catalog_admin_password = catalog_admin_password - self.catalog_pricing_tier = catalog_pricing_tier diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_ssis_properties.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_ssis_properties.py deleted file mode 100644 index e1a091166529..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_ssis_properties.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationRuntimeSsisProperties(Model): - """SSIS properties for managed integration runtime. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param catalog_info: Catalog information for managed dedicated integration - runtime. - :type catalog_info: - ~azure.mgmt.datafactory.models.IntegrationRuntimeSsisCatalogInfo - :param license_type: License type for bringing your own license scenario. - Possible values include: 'BasePrice', 'LicenseIncluded' - :type license_type: str or - ~azure.mgmt.datafactory.models.IntegrationRuntimeLicenseType - :param custom_setup_script_properties: Custom setup script properties for - a managed dedicated integration runtime. - :type custom_setup_script_properties: - ~azure.mgmt.datafactory.models.IntegrationRuntimeCustomSetupScriptProperties - :param edition: The edition for the SSIS Integration Runtime. Possible - values include: 'Standard', 'Enterprise' - :type edition: str or - ~azure.mgmt.datafactory.models.IntegrationRuntimeEdition - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'catalog_info': {'key': 'catalogInfo', 'type': 'IntegrationRuntimeSsisCatalogInfo'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - 'custom_setup_script_properties': {'key': 'customSetupScriptProperties', 'type': 'IntegrationRuntimeCustomSetupScriptProperties'}, - 'edition': {'key': 'edition', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IntegrationRuntimeSsisProperties, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.catalog_info = kwargs.get('catalog_info', None) - self.license_type = kwargs.get('license_type', None) - self.custom_setup_script_properties = kwargs.get('custom_setup_script_properties', None) - self.edition = kwargs.get('edition', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_ssis_properties_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_ssis_properties_py3.py deleted file mode 100644 index eb70dd23ddb7..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_ssis_properties_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationRuntimeSsisProperties(Model): - """SSIS properties for managed integration runtime. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param catalog_info: Catalog information for managed dedicated integration - runtime. - :type catalog_info: - ~azure.mgmt.datafactory.models.IntegrationRuntimeSsisCatalogInfo - :param license_type: License type for bringing your own license scenario. - Possible values include: 'BasePrice', 'LicenseIncluded' - :type license_type: str or - ~azure.mgmt.datafactory.models.IntegrationRuntimeLicenseType - :param custom_setup_script_properties: Custom setup script properties for - a managed dedicated integration runtime. - :type custom_setup_script_properties: - ~azure.mgmt.datafactory.models.IntegrationRuntimeCustomSetupScriptProperties - :param edition: The edition for the SSIS Integration Runtime. Possible - values include: 'Standard', 'Enterprise' - :type edition: str or - ~azure.mgmt.datafactory.models.IntegrationRuntimeEdition - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'catalog_info': {'key': 'catalogInfo', 'type': 'IntegrationRuntimeSsisCatalogInfo'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - 'custom_setup_script_properties': {'key': 'customSetupScriptProperties', 'type': 'IntegrationRuntimeCustomSetupScriptProperties'}, - 'edition': {'key': 'edition', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, catalog_info=None, license_type=None, custom_setup_script_properties=None, edition=None, **kwargs) -> None: - super(IntegrationRuntimeSsisProperties, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.catalog_info = catalog_info - self.license_type = license_type - self.custom_setup_script_properties = custom_setup_script_properties - self.edition = edition diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_status.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_status.py deleted file mode 100644 index 64da6347f9ed..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_status.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationRuntimeStatus(Model): - """Integration runtime status. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: SelfHostedIntegrationRuntimeStatus, - ManagedIntegrationRuntimeStatus - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar data_factory_name: The data factory name which the integration - runtime belong to. - :vartype data_factory_name: str - :ivar state: The state of integration runtime. Possible values include: - 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', - 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied' - :vartype state: str or - ~azure.mgmt.datafactory.models.IntegrationRuntimeState - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'data_factory_name': {'readonly': True}, - 'state': {'readonly': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'data_factory_name': {'key': 'dataFactoryName', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'SelfHosted': 'SelfHostedIntegrationRuntimeStatus', 'Managed': 'ManagedIntegrationRuntimeStatus'} - } - - def __init__(self, **kwargs): - super(IntegrationRuntimeStatus, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.data_factory_name = None - self.state = None - self.type = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_status_list_response.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_status_list_response.py deleted file mode 100644 index 9382b4b08fde..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_status_list_response.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationRuntimeStatusListResponse(Model): - """A list of integration runtime status. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. List of integration runtime status. - :type value: - list[~azure.mgmt.datafactory.models.IntegrationRuntimeStatusResponse] - :param next_link: The link to the next page of results, if any remaining - results exist. - :type next_link: str - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[IntegrationRuntimeStatusResponse]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IntegrationRuntimeStatusListResponse, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_status_list_response_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_status_list_response_py3.py deleted file mode 100644 index bed71f74ffc6..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_status_list_response_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationRuntimeStatusListResponse(Model): - """A list of integration runtime status. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. List of integration runtime status. - :type value: - list[~azure.mgmt.datafactory.models.IntegrationRuntimeStatusResponse] - :param next_link: The link to the next page of results, if any remaining - results exist. - :type next_link: str - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[IntegrationRuntimeStatusResponse]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, *, value, next_link: str=None, **kwargs) -> None: - super(IntegrationRuntimeStatusListResponse, self).__init__(**kwargs) - self.value = value - self.next_link = next_link diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_status_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_status_py3.py deleted file mode 100644 index 8541e04dc679..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_status_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationRuntimeStatus(Model): - """Integration runtime status. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: SelfHostedIntegrationRuntimeStatus, - ManagedIntegrationRuntimeStatus - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar data_factory_name: The data factory name which the integration - runtime belong to. - :vartype data_factory_name: str - :ivar state: The state of integration runtime. Possible values include: - 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', - 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied' - :vartype state: str or - ~azure.mgmt.datafactory.models.IntegrationRuntimeState - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'data_factory_name': {'readonly': True}, - 'state': {'readonly': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'data_factory_name': {'key': 'dataFactoryName', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'SelfHosted': 'SelfHostedIntegrationRuntimeStatus', 'Managed': 'ManagedIntegrationRuntimeStatus'} - } - - def __init__(self, *, additional_properties=None, **kwargs) -> None: - super(IntegrationRuntimeStatus, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.data_factory_name = None - self.state = None - self.type = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_status_response.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_status_response.py deleted file mode 100644 index 901b4d8b7442..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_status_response.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationRuntimeStatusResponse(Model): - """Integration runtime status response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar name: The integration runtime name. - :vartype name: str - :param properties: Required. Integration runtime properties. - :type properties: ~azure.mgmt.datafactory.models.IntegrationRuntimeStatus - """ - - _validation = { - 'name': {'readonly': True}, - 'properties': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'IntegrationRuntimeStatus'}, - } - - def __init__(self, **kwargs): - super(IntegrationRuntimeStatusResponse, self).__init__(**kwargs) - self.name = None - self.properties = kwargs.get('properties', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_status_response_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_status_response_py3.py deleted file mode 100644 index 64d84a1e4f19..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_status_response_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationRuntimeStatusResponse(Model): - """Integration runtime status response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar name: The integration runtime name. - :vartype name: str - :param properties: Required. Integration runtime properties. - :type properties: ~azure.mgmt.datafactory.models.IntegrationRuntimeStatus - """ - - _validation = { - 'name': {'readonly': True}, - 'properties': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'IntegrationRuntimeStatus'}, - } - - def __init__(self, *, properties, **kwargs) -> None: - super(IntegrationRuntimeStatusResponse, self).__init__(**kwargs) - self.name = None - self.properties = properties diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_vnet_properties.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_vnet_properties.py deleted file mode 100644 index 752b5b99eb60..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_vnet_properties.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationRuntimeVNetProperties(Model): - """VNet properties for managed integration runtime. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param v_net_id: The ID of the VNet that this integration runtime will - join. - :type v_net_id: str - :param subnet: The name of the subnet this integration runtime will join. - :type subnet: str - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'v_net_id': {'key': 'vNetId', 'type': 'str'}, - 'subnet': {'key': 'subnet', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IntegrationRuntimeVNetProperties, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.v_net_id = kwargs.get('v_net_id', None) - self.subnet = kwargs.get('subnet', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_vnet_properties_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_vnet_properties_py3.py deleted file mode 100644 index 32e8beb31ea1..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/integration_runtime_vnet_properties_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationRuntimeVNetProperties(Model): - """VNet properties for managed integration runtime. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param v_net_id: The ID of the VNet that this integration runtime will - join. - :type v_net_id: str - :param subnet: The name of the subnet this integration runtime will join. - :type subnet: str - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'v_net_id': {'key': 'vNetId', 'type': 'str'}, - 'subnet': {'key': 'subnet', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, v_net_id: str=None, subnet: str=None, **kwargs) -> None: - super(IntegrationRuntimeVNetProperties, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.v_net_id = v_net_id - self.subnet = subnet diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/jira_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/jira_linked_service.py deleted file mode 100644 index d8b9a62fc878..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/jira_linked_service.py +++ /dev/null @@ -1,98 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class JiraLinkedService(LinkedService): - """Jira Service linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param host: Required. The IP address or host name of the Jira service. - (e.g. jira.example.com) - :type host: object - :param port: The TCP port that the Jira server uses to listen for client - connections. The default value is 443 if connecting through HTTPS, or 8080 - if connecting through HTTP. - :type port: object - :param username: Required. The user name that you use to access Jira - Service. - :type username: object - :param password: The password corresponding to the user name that you - provided in the username field. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param use_encrypted_endpoints: Specifies whether the data source - endpoints are encrypted using HTTPS. The default value is true. - :type use_encrypted_endpoints: object - :param use_host_verification: Specifies whether to require the host name - in the server's certificate to match the host name of the server when - connecting over SSL. The default value is true. - :type use_host_verification: object - :param use_peer_verification: Specifies whether to verify the identity of - the server when connecting over SSL. The default value is true. - :type use_peer_verification: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'host': {'required': True}, - 'username': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'host': {'key': 'typeProperties.host', 'type': 'object'}, - 'port': {'key': 'typeProperties.port', 'type': 'object'}, - 'username': {'key': 'typeProperties.username', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, - 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, - 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(JiraLinkedService, self).__init__(**kwargs) - self.host = kwargs.get('host', None) - self.port = kwargs.get('port', None) - self.username = kwargs.get('username', None) - self.password = kwargs.get('password', None) - self.use_encrypted_endpoints = kwargs.get('use_encrypted_endpoints', None) - self.use_host_verification = kwargs.get('use_host_verification', None) - self.use_peer_verification = kwargs.get('use_peer_verification', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'Jira' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/jira_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/jira_linked_service_py3.py deleted file mode 100644 index 69606ee7cfcf..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/jira_linked_service_py3.py +++ /dev/null @@ -1,98 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class JiraLinkedService(LinkedService): - """Jira Service linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param host: Required. The IP address or host name of the Jira service. - (e.g. jira.example.com) - :type host: object - :param port: The TCP port that the Jira server uses to listen for client - connections. The default value is 443 if connecting through HTTPS, or 8080 - if connecting through HTTP. - :type port: object - :param username: Required. The user name that you use to access Jira - Service. - :type username: object - :param password: The password corresponding to the user name that you - provided in the username field. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param use_encrypted_endpoints: Specifies whether the data source - endpoints are encrypted using HTTPS. The default value is true. - :type use_encrypted_endpoints: object - :param use_host_verification: Specifies whether to require the host name - in the server's certificate to match the host name of the server when - connecting over SSL. The default value is true. - :type use_host_verification: object - :param use_peer_verification: Specifies whether to verify the identity of - the server when connecting over SSL. The default value is true. - :type use_peer_verification: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'host': {'required': True}, - 'username': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'host': {'key': 'typeProperties.host', 'type': 'object'}, - 'port': {'key': 'typeProperties.port', 'type': 'object'}, - 'username': {'key': 'typeProperties.username', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, - 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, - 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, host, username, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, port=None, password=None, use_encrypted_endpoints=None, use_host_verification=None, use_peer_verification=None, encrypted_credential=None, **kwargs) -> None: - super(JiraLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.host = host - self.port = port - self.username = username - self.password = password - self.use_encrypted_endpoints = use_encrypted_endpoints - self.use_host_verification = use_host_verification - self.use_peer_verification = use_peer_verification - self.encrypted_credential = encrypted_credential - self.type = 'Jira' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/jira_object_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/jira_object_dataset.py deleted file mode 100644 index 1c2b12c18e15..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/jira_object_dataset.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class JiraObjectDataset(Dataset): - """Jira Service dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(JiraObjectDataset, self).__init__(**kwargs) - self.table_name = kwargs.get('table_name', None) - self.type = 'JiraObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/jira_object_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/jira_object_dataset_py3.py deleted file mode 100644 index 3c061b238cde..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/jira_object_dataset_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class JiraObjectDataset(Dataset): - """Jira Service dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: - super(JiraObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.table_name = table_name - self.type = 'JiraObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/jira_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/jira_source.py deleted file mode 100644 index 7bb6a8649b8f..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/jira_source.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class JiraSource(CopySource): - """A copy activity Jira Service source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(JiraSource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.type = 'JiraSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/jira_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/jira_source_py3.py deleted file mode 100644 index 1a19ed99c55a..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/jira_source_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class JiraSource(CopySource): - """A copy activity Jira Service source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query=None, **kwargs) -> None: - super(JiraSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.type = 'JiraSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/json_format.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/json_format.py deleted file mode 100644 index 736f9500018f..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/json_format.py +++ /dev/null @@ -1,84 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_storage_format import DatasetStorageFormat - - -class JsonFormat(DatasetStorageFormat): - """The data stored in JSON format. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param serializer: Serializer. Type: string (or Expression with resultType - string). - :type serializer: object - :param deserializer: Deserializer. Type: string (or Expression with - resultType string). - :type deserializer: object - :param type: Required. Constant filled by server. - :type type: str - :param file_pattern: File pattern of JSON. To be more specific, the way of - separating a collection of JSON objects. The default value is - 'setOfObjects'. It is case-sensitive. Possible values include: - 'setOfObjects', 'arrayOfObjects' - :type file_pattern: str or - ~azure.mgmt.datafactory.models.JsonFormatFilePattern - :param nesting_separator: The character used to separate nesting levels. - Default value is '.' (dot). Type: string (or Expression with resultType - string). - :type nesting_separator: object - :param encoding_name: The code page name of the preferred encoding. If not - provided, the default value is 'utf-8', unless the byte order mark (BOM) - denotes another Unicode encoding. The full list of supported values can be - found in the 'Name' column of the table of encodings in the following - reference: https://go.microsoft.com/fwlink/?linkid=861078. Type: string - (or Expression with resultType string). - :type encoding_name: object - :param json_node_reference: The JSONPath of the JSON array element to be - flattened. Example: "$.ArrayPath". Type: string (or Expression with - resultType string). - :type json_node_reference: object - :param json_path_definition: The JSONPath definition for each column - mapping with a customized column name to extract data from JSON file. For - fields under root object, start with "$"; for fields inside the array - chosen by jsonNodeReference property, start from the array element. - Example: {"Column1": "$.Column1Path", "Column2": "Column2PathInArray"}. - Type: object (or Expression with resultType object). - :type json_path_definition: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'serializer': {'key': 'serializer', 'type': 'object'}, - 'deserializer': {'key': 'deserializer', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'file_pattern': {'key': 'filePattern', 'type': 'str'}, - 'nesting_separator': {'key': 'nestingSeparator', 'type': 'object'}, - 'encoding_name': {'key': 'encodingName', 'type': 'object'}, - 'json_node_reference': {'key': 'jsonNodeReference', 'type': 'object'}, - 'json_path_definition': {'key': 'jsonPathDefinition', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(JsonFormat, self).__init__(**kwargs) - self.file_pattern = kwargs.get('file_pattern', None) - self.nesting_separator = kwargs.get('nesting_separator', None) - self.encoding_name = kwargs.get('encoding_name', None) - self.json_node_reference = kwargs.get('json_node_reference', None) - self.json_path_definition = kwargs.get('json_path_definition', None) - self.type = 'JsonFormat' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/json_format_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/json_format_py3.py deleted file mode 100644 index a9a7f20ea103..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/json_format_py3.py +++ /dev/null @@ -1,84 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_storage_format_py3 import DatasetStorageFormat - - -class JsonFormat(DatasetStorageFormat): - """The data stored in JSON format. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param serializer: Serializer. Type: string (or Expression with resultType - string). - :type serializer: object - :param deserializer: Deserializer. Type: string (or Expression with - resultType string). - :type deserializer: object - :param type: Required. Constant filled by server. - :type type: str - :param file_pattern: File pattern of JSON. To be more specific, the way of - separating a collection of JSON objects. The default value is - 'setOfObjects'. It is case-sensitive. Possible values include: - 'setOfObjects', 'arrayOfObjects' - :type file_pattern: str or - ~azure.mgmt.datafactory.models.JsonFormatFilePattern - :param nesting_separator: The character used to separate nesting levels. - Default value is '.' (dot). Type: string (or Expression with resultType - string). - :type nesting_separator: object - :param encoding_name: The code page name of the preferred encoding. If not - provided, the default value is 'utf-8', unless the byte order mark (BOM) - denotes another Unicode encoding. The full list of supported values can be - found in the 'Name' column of the table of encodings in the following - reference: https://go.microsoft.com/fwlink/?linkid=861078. Type: string - (or Expression with resultType string). - :type encoding_name: object - :param json_node_reference: The JSONPath of the JSON array element to be - flattened. Example: "$.ArrayPath". Type: string (or Expression with - resultType string). - :type json_node_reference: object - :param json_path_definition: The JSONPath definition for each column - mapping with a customized column name to extract data from JSON file. For - fields under root object, start with "$"; for fields inside the array - chosen by jsonNodeReference property, start from the array element. - Example: {"Column1": "$.Column1Path", "Column2": "Column2PathInArray"}. - Type: object (or Expression with resultType object). - :type json_path_definition: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'serializer': {'key': 'serializer', 'type': 'object'}, - 'deserializer': {'key': 'deserializer', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'file_pattern': {'key': 'filePattern', 'type': 'str'}, - 'nesting_separator': {'key': 'nestingSeparator', 'type': 'object'}, - 'encoding_name': {'key': 'encodingName', 'type': 'object'}, - 'json_node_reference': {'key': 'jsonNodeReference', 'type': 'object'}, - 'json_path_definition': {'key': 'jsonPathDefinition', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, serializer=None, deserializer=None, file_pattern=None, nesting_separator=None, encoding_name=None, json_node_reference=None, json_path_definition=None, **kwargs) -> None: - super(JsonFormat, self).__init__(additional_properties=additional_properties, serializer=serializer, deserializer=deserializer, **kwargs) - self.file_pattern = file_pattern - self.nesting_separator = nesting_separator - self.encoding_name = encoding_name - self.json_node_reference = json_node_reference - self.json_path_definition = json_path_definition - self.type = 'JsonFormat' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime.py deleted file mode 100644 index f4a4e7eb8bf0..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinkedIntegrationRuntime(Model): - """The linked integration runtime information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the linked integration runtime. - :vartype name: str - :ivar subscription_id: The subscription ID for which the linked - integration runtime belong to. - :vartype subscription_id: str - :ivar data_factory_name: The name of the data factory for which the linked - integration runtime belong to. - :vartype data_factory_name: str - :ivar data_factory_location: The location of the data factory for which - the linked integration runtime belong to. - :vartype data_factory_location: str - :ivar create_time: The creating time of the linked integration runtime. - :vartype create_time: datetime - """ - - _validation = { - 'name': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'data_factory_name': {'readonly': True}, - 'data_factory_location': {'readonly': True}, - 'create_time': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'data_factory_name': {'key': 'dataFactoryName', 'type': 'str'}, - 'data_factory_location': {'key': 'dataFactoryLocation', 'type': 'str'}, - 'create_time': {'key': 'createTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(LinkedIntegrationRuntime, self).__init__(**kwargs) - self.name = None - self.subscription_id = None - self.data_factory_name = None - self.data_factory_location = None - self.create_time = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_key_authorization.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_key_authorization.py deleted file mode 100644 index b7be47e8f096..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_key_authorization.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_integration_runtime_type import LinkedIntegrationRuntimeType - - -class LinkedIntegrationRuntimeKeyAuthorization(LinkedIntegrationRuntimeType): - """The key authorization type integration runtime. - - All required parameters must be populated in order to send to Azure. - - :param authorization_type: Required. Constant filled by server. - :type authorization_type: str - :param key: Required. The key used for authorization. - :type key: ~azure.mgmt.datafactory.models.SecureString - """ - - _validation = { - 'authorization_type': {'required': True}, - 'key': {'required': True}, - } - - _attribute_map = { - 'authorization_type': {'key': 'authorizationType', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'SecureString'}, - } - - def __init__(self, **kwargs): - super(LinkedIntegrationRuntimeKeyAuthorization, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.authorization_type = 'Key' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_key_authorization_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_key_authorization_py3.py deleted file mode 100644 index 4a2ebd8d1003..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_key_authorization_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_integration_runtime_type_py3 import LinkedIntegrationRuntimeType - - -class LinkedIntegrationRuntimeKeyAuthorization(LinkedIntegrationRuntimeType): - """The key authorization type integration runtime. - - All required parameters must be populated in order to send to Azure. - - :param authorization_type: Required. Constant filled by server. - :type authorization_type: str - :param key: Required. The key used for authorization. - :type key: ~azure.mgmt.datafactory.models.SecureString - """ - - _validation = { - 'authorization_type': {'required': True}, - 'key': {'required': True}, - } - - _attribute_map = { - 'authorization_type': {'key': 'authorizationType', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'SecureString'}, - } - - def __init__(self, *, key, **kwargs) -> None: - super(LinkedIntegrationRuntimeKeyAuthorization, self).__init__(**kwargs) - self.key = key - self.authorization_type = 'Key' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_py3.py deleted file mode 100644 index 6c831ab5f511..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinkedIntegrationRuntime(Model): - """The linked integration runtime information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the linked integration runtime. - :vartype name: str - :ivar subscription_id: The subscription ID for which the linked - integration runtime belong to. - :vartype subscription_id: str - :ivar data_factory_name: The name of the data factory for which the linked - integration runtime belong to. - :vartype data_factory_name: str - :ivar data_factory_location: The location of the data factory for which - the linked integration runtime belong to. - :vartype data_factory_location: str - :ivar create_time: The creating time of the linked integration runtime. - :vartype create_time: datetime - """ - - _validation = { - 'name': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'data_factory_name': {'readonly': True}, - 'data_factory_location': {'readonly': True}, - 'create_time': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'data_factory_name': {'key': 'dataFactoryName', 'type': 'str'}, - 'data_factory_location': {'key': 'dataFactoryLocation', 'type': 'str'}, - 'create_time': {'key': 'createTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(LinkedIntegrationRuntime, self).__init__(**kwargs) - self.name = None - self.subscription_id = None - self.data_factory_name = None - self.data_factory_location = None - self.create_time = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_rbac_authorization.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_rbac_authorization.py deleted file mode 100644 index 3fbc8dd9cac2..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_rbac_authorization.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_integration_runtime_type import LinkedIntegrationRuntimeType - - -class LinkedIntegrationRuntimeRbacAuthorization(LinkedIntegrationRuntimeType): - """The role based access control (RBAC) authorization type integration - runtime. - - All required parameters must be populated in order to send to Azure. - - :param authorization_type: Required. Constant filled by server. - :type authorization_type: str - :param resource_id: Required. The resource identifier of the integration - runtime to be shared. - :type resource_id: str - """ - - _validation = { - 'authorization_type': {'required': True}, - 'resource_id': {'required': True}, - } - - _attribute_map = { - 'authorization_type': {'key': 'authorizationType', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LinkedIntegrationRuntimeRbacAuthorization, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.authorization_type = 'RBAC' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_rbac_authorization_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_rbac_authorization_py3.py deleted file mode 100644 index 055b64809e18..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_rbac_authorization_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_integration_runtime_type_py3 import LinkedIntegrationRuntimeType - - -class LinkedIntegrationRuntimeRbacAuthorization(LinkedIntegrationRuntimeType): - """The role based access control (RBAC) authorization type integration - runtime. - - All required parameters must be populated in order to send to Azure. - - :param authorization_type: Required. Constant filled by server. - :type authorization_type: str - :param resource_id: Required. The resource identifier of the integration - runtime to be shared. - :type resource_id: str - """ - - _validation = { - 'authorization_type': {'required': True}, - 'resource_id': {'required': True}, - } - - _attribute_map = { - 'authorization_type': {'key': 'authorizationType', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str, **kwargs) -> None: - super(LinkedIntegrationRuntimeRbacAuthorization, self).__init__(**kwargs) - self.resource_id = resource_id - self.authorization_type = 'RBAC' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_request.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_request.py deleted file mode 100644 index 807757332b3e..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_request.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinkedIntegrationRuntimeRequest(Model): - """Data factory name for linked integration runtime request. - - All required parameters must be populated in order to send to Azure. - - :param linked_factory_name: Required. The data factory name for linked - integration runtime. - :type linked_factory_name: str - """ - - _validation = { - 'linked_factory_name': {'required': True}, - } - - _attribute_map = { - 'linked_factory_name': {'key': 'factoryName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LinkedIntegrationRuntimeRequest, self).__init__(**kwargs) - self.linked_factory_name = kwargs.get('linked_factory_name', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_request_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_request_py3.py deleted file mode 100644 index 45362ab63ba3..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_request_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinkedIntegrationRuntimeRequest(Model): - """Data factory name for linked integration runtime request. - - All required parameters must be populated in order to send to Azure. - - :param linked_factory_name: Required. The data factory name for linked - integration runtime. - :type linked_factory_name: str - """ - - _validation = { - 'linked_factory_name': {'required': True}, - } - - _attribute_map = { - 'linked_factory_name': {'key': 'factoryName', 'type': 'str'}, - } - - def __init__(self, *, linked_factory_name: str, **kwargs) -> None: - super(LinkedIntegrationRuntimeRequest, self).__init__(**kwargs) - self.linked_factory_name = linked_factory_name diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_type.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_type.py deleted file mode 100644 index 446395bb9cbf..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_type.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinkedIntegrationRuntimeType(Model): - """The base definition of a linked integration runtime. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: LinkedIntegrationRuntimeRbacAuthorization, - LinkedIntegrationRuntimeKeyAuthorization - - All required parameters must be populated in order to send to Azure. - - :param authorization_type: Required. Constant filled by server. - :type authorization_type: str - """ - - _validation = { - 'authorization_type': {'required': True}, - } - - _attribute_map = { - 'authorization_type': {'key': 'authorizationType', 'type': 'str'}, - } - - _subtype_map = { - 'authorization_type': {'RBAC': 'LinkedIntegrationRuntimeRbacAuthorization', 'Key': 'LinkedIntegrationRuntimeKeyAuthorization'} - } - - def __init__(self, **kwargs): - super(LinkedIntegrationRuntimeType, self).__init__(**kwargs) - self.authorization_type = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_type_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_type_py3.py deleted file mode 100644 index 79468dc450d2..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_type_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinkedIntegrationRuntimeType(Model): - """The base definition of a linked integration runtime. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: LinkedIntegrationRuntimeRbacAuthorization, - LinkedIntegrationRuntimeKeyAuthorization - - All required parameters must be populated in order to send to Azure. - - :param authorization_type: Required. Constant filled by server. - :type authorization_type: str - """ - - _validation = { - 'authorization_type': {'required': True}, - } - - _attribute_map = { - 'authorization_type': {'key': 'authorizationType', 'type': 'str'}, - } - - _subtype_map = { - 'authorization_type': {'RBAC': 'LinkedIntegrationRuntimeRbacAuthorization', 'Key': 'LinkedIntegrationRuntimeKeyAuthorization'} - } - - def __init__(self, **kwargs) -> None: - super(LinkedIntegrationRuntimeType, self).__init__(**kwargs) - self.authorization_type = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_service.py deleted file mode 100644 index 62f172fded76..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_service.py +++ /dev/null @@ -1,94 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinkedService(Model): - """The Azure Data Factory nested object which contains the information and - credential which can be used to connect with related store or compute - resource. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureFunctionLinkedService, ResponsysLinkedService, - AzureDatabricksLinkedService, AzureDataLakeAnalyticsLinkedService, - HDInsightOnDemandLinkedService, SalesforceMarketingCloudLinkedService, - NetezzaLinkedService, VerticaLinkedService, ZohoLinkedService, - XeroLinkedService, SquareLinkedService, SparkLinkedService, - ShopifyLinkedService, ServiceNowLinkedService, QuickBooksLinkedService, - PrestoLinkedService, PhoenixLinkedService, PaypalLinkedService, - MarketoLinkedService, MariaDBLinkedService, MagentoLinkedService, - JiraLinkedService, ImpalaLinkedService, HubspotLinkedService, - HiveLinkedService, HBaseLinkedService, GreenplumLinkedService, - GoogleBigQueryLinkedService, EloquaLinkedService, DrillLinkedService, - CouchbaseLinkedService, ConcurLinkedService, AzurePostgreSqlLinkedService, - AmazonMWSLinkedService, SapHanaLinkedService, SapBWLinkedService, - SftpServerLinkedService, FtpServerLinkedService, HttpLinkedService, - AzureSearchLinkedService, CustomDataSourceLinkedService, - AmazonRedshiftLinkedService, AmazonS3LinkedService, SapEccLinkedService, - SapCloudForCustomerLinkedService, SalesforceLinkedService, - AzureDataLakeStoreLinkedService, MongoDbLinkedService, - CassandraLinkedService, WebLinkedService, ODataLinkedService, - HdfsLinkedService, OdbcLinkedService, AzureMLLinkedService, - TeradataLinkedService, Db2LinkedService, SybaseLinkedService, - PostgreSqlLinkedService, MySqlLinkedService, AzureMySqlLinkedService, - OracleLinkedService, FileServerLinkedService, HDInsightLinkedService, - DynamicsLinkedService, CosmosDbLinkedService, AzureKeyVaultLinkedService, - AzureBatchLinkedService, AzureSqlDatabaseLinkedService, - SqlServerLinkedService, AzureSqlDWLinkedService, - AzureTableStorageLinkedService, AzureBlobStorageLinkedService, - AzureStorageLinkedService - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'AzureFunction': 'AzureFunctionLinkedService', 'Responsys': 'ResponsysLinkedService', 'AzureDatabricks': 'AzureDatabricksLinkedService', 'AzureDataLakeAnalytics': 'AzureDataLakeAnalyticsLinkedService', 'HDInsightOnDemand': 'HDInsightOnDemandLinkedService', 'SalesforceMarketingCloud': 'SalesforceMarketingCloudLinkedService', 'Netezza': 'NetezzaLinkedService', 'Vertica': 'VerticaLinkedService', 'Zoho': 'ZohoLinkedService', 'Xero': 'XeroLinkedService', 'Square': 'SquareLinkedService', 'Spark': 'SparkLinkedService', 'Shopify': 'ShopifyLinkedService', 'ServiceNow': 'ServiceNowLinkedService', 'QuickBooks': 'QuickBooksLinkedService', 'Presto': 'PrestoLinkedService', 'Phoenix': 'PhoenixLinkedService', 'Paypal': 'PaypalLinkedService', 'Marketo': 'MarketoLinkedService', 'MariaDB': 'MariaDBLinkedService', 'Magento': 'MagentoLinkedService', 'Jira': 'JiraLinkedService', 'Impala': 'ImpalaLinkedService', 'Hubspot': 'HubspotLinkedService', 'Hive': 'HiveLinkedService', 'HBase': 'HBaseLinkedService', 'Greenplum': 'GreenplumLinkedService', 'GoogleBigQuery': 'GoogleBigQueryLinkedService', 'Eloqua': 'EloquaLinkedService', 'Drill': 'DrillLinkedService', 'Couchbase': 'CouchbaseLinkedService', 'Concur': 'ConcurLinkedService', 'AzurePostgreSql': 'AzurePostgreSqlLinkedService', 'AmazonMWS': 'AmazonMWSLinkedService', 'SapHana': 'SapHanaLinkedService', 'SapBW': 'SapBWLinkedService', 'Sftp': 'SftpServerLinkedService', 'FtpServer': 'FtpServerLinkedService', 'HttpServer': 'HttpLinkedService', 'AzureSearch': 'AzureSearchLinkedService', 'CustomDataSource': 'CustomDataSourceLinkedService', 'AmazonRedshift': 'AmazonRedshiftLinkedService', 'AmazonS3': 'AmazonS3LinkedService', 'SapEcc': 'SapEccLinkedService', 'SapCloudForCustomer': 'SapCloudForCustomerLinkedService', 'Salesforce': 'SalesforceLinkedService', 'AzureDataLakeStore': 'AzureDataLakeStoreLinkedService', 'MongoDb': 'MongoDbLinkedService', 'Cassandra': 'CassandraLinkedService', 'Web': 'WebLinkedService', 'OData': 'ODataLinkedService', 'Hdfs': 'HdfsLinkedService', 'Odbc': 'OdbcLinkedService', 'AzureML': 'AzureMLLinkedService', 'Teradata': 'TeradataLinkedService', 'Db2': 'Db2LinkedService', 'Sybase': 'SybaseLinkedService', 'PostgreSql': 'PostgreSqlLinkedService', 'MySql': 'MySqlLinkedService', 'AzureMySql': 'AzureMySqlLinkedService', 'Oracle': 'OracleLinkedService', 'FileServer': 'FileServerLinkedService', 'HDInsight': 'HDInsightLinkedService', 'Dynamics': 'DynamicsLinkedService', 'CosmosDb': 'CosmosDbLinkedService', 'AzureKeyVault': 'AzureKeyVaultLinkedService', 'AzureBatch': 'AzureBatchLinkedService', 'AzureSqlDatabase': 'AzureSqlDatabaseLinkedService', 'SqlServer': 'SqlServerLinkedService', 'AzureSqlDW': 'AzureSqlDWLinkedService', 'AzureTableStorage': 'AzureTableStorageLinkedService', 'AzureBlobStorage': 'AzureBlobStorageLinkedService', 'AzureStorage': 'AzureStorageLinkedService'} - } - - def __init__(self, **kwargs): - super(LinkedService, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.connect_via = kwargs.get('connect_via', None) - self.description = kwargs.get('description', None) - self.parameters = kwargs.get('parameters', None) - self.annotations = kwargs.get('annotations', None) - self.type = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_service_py3.py deleted file mode 100644 index ff4bb8c7605d..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_service_py3.py +++ /dev/null @@ -1,94 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinkedService(Model): - """The Azure Data Factory nested object which contains the information and - credential which can be used to connect with related store or compute - resource. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureFunctionLinkedService, ResponsysLinkedService, - AzureDatabricksLinkedService, AzureDataLakeAnalyticsLinkedService, - HDInsightOnDemandLinkedService, SalesforceMarketingCloudLinkedService, - NetezzaLinkedService, VerticaLinkedService, ZohoLinkedService, - XeroLinkedService, SquareLinkedService, SparkLinkedService, - ShopifyLinkedService, ServiceNowLinkedService, QuickBooksLinkedService, - PrestoLinkedService, PhoenixLinkedService, PaypalLinkedService, - MarketoLinkedService, MariaDBLinkedService, MagentoLinkedService, - JiraLinkedService, ImpalaLinkedService, HubspotLinkedService, - HiveLinkedService, HBaseLinkedService, GreenplumLinkedService, - GoogleBigQueryLinkedService, EloquaLinkedService, DrillLinkedService, - CouchbaseLinkedService, ConcurLinkedService, AzurePostgreSqlLinkedService, - AmazonMWSLinkedService, SapHanaLinkedService, SapBWLinkedService, - SftpServerLinkedService, FtpServerLinkedService, HttpLinkedService, - AzureSearchLinkedService, CustomDataSourceLinkedService, - AmazonRedshiftLinkedService, AmazonS3LinkedService, SapEccLinkedService, - SapCloudForCustomerLinkedService, SalesforceLinkedService, - AzureDataLakeStoreLinkedService, MongoDbLinkedService, - CassandraLinkedService, WebLinkedService, ODataLinkedService, - HdfsLinkedService, OdbcLinkedService, AzureMLLinkedService, - TeradataLinkedService, Db2LinkedService, SybaseLinkedService, - PostgreSqlLinkedService, MySqlLinkedService, AzureMySqlLinkedService, - OracleLinkedService, FileServerLinkedService, HDInsightLinkedService, - DynamicsLinkedService, CosmosDbLinkedService, AzureKeyVaultLinkedService, - AzureBatchLinkedService, AzureSqlDatabaseLinkedService, - SqlServerLinkedService, AzureSqlDWLinkedService, - AzureTableStorageLinkedService, AzureBlobStorageLinkedService, - AzureStorageLinkedService - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'AzureFunction': 'AzureFunctionLinkedService', 'Responsys': 'ResponsysLinkedService', 'AzureDatabricks': 'AzureDatabricksLinkedService', 'AzureDataLakeAnalytics': 'AzureDataLakeAnalyticsLinkedService', 'HDInsightOnDemand': 'HDInsightOnDemandLinkedService', 'SalesforceMarketingCloud': 'SalesforceMarketingCloudLinkedService', 'Netezza': 'NetezzaLinkedService', 'Vertica': 'VerticaLinkedService', 'Zoho': 'ZohoLinkedService', 'Xero': 'XeroLinkedService', 'Square': 'SquareLinkedService', 'Spark': 'SparkLinkedService', 'Shopify': 'ShopifyLinkedService', 'ServiceNow': 'ServiceNowLinkedService', 'QuickBooks': 'QuickBooksLinkedService', 'Presto': 'PrestoLinkedService', 'Phoenix': 'PhoenixLinkedService', 'Paypal': 'PaypalLinkedService', 'Marketo': 'MarketoLinkedService', 'MariaDB': 'MariaDBLinkedService', 'Magento': 'MagentoLinkedService', 'Jira': 'JiraLinkedService', 'Impala': 'ImpalaLinkedService', 'Hubspot': 'HubspotLinkedService', 'Hive': 'HiveLinkedService', 'HBase': 'HBaseLinkedService', 'Greenplum': 'GreenplumLinkedService', 'GoogleBigQuery': 'GoogleBigQueryLinkedService', 'Eloqua': 'EloquaLinkedService', 'Drill': 'DrillLinkedService', 'Couchbase': 'CouchbaseLinkedService', 'Concur': 'ConcurLinkedService', 'AzurePostgreSql': 'AzurePostgreSqlLinkedService', 'AmazonMWS': 'AmazonMWSLinkedService', 'SapHana': 'SapHanaLinkedService', 'SapBW': 'SapBWLinkedService', 'Sftp': 'SftpServerLinkedService', 'FtpServer': 'FtpServerLinkedService', 'HttpServer': 'HttpLinkedService', 'AzureSearch': 'AzureSearchLinkedService', 'CustomDataSource': 'CustomDataSourceLinkedService', 'AmazonRedshift': 'AmazonRedshiftLinkedService', 'AmazonS3': 'AmazonS3LinkedService', 'SapEcc': 'SapEccLinkedService', 'SapCloudForCustomer': 'SapCloudForCustomerLinkedService', 'Salesforce': 'SalesforceLinkedService', 'AzureDataLakeStore': 'AzureDataLakeStoreLinkedService', 'MongoDb': 'MongoDbLinkedService', 'Cassandra': 'CassandraLinkedService', 'Web': 'WebLinkedService', 'OData': 'ODataLinkedService', 'Hdfs': 'HdfsLinkedService', 'Odbc': 'OdbcLinkedService', 'AzureML': 'AzureMLLinkedService', 'Teradata': 'TeradataLinkedService', 'Db2': 'Db2LinkedService', 'Sybase': 'SybaseLinkedService', 'PostgreSql': 'PostgreSqlLinkedService', 'MySql': 'MySqlLinkedService', 'AzureMySql': 'AzureMySqlLinkedService', 'Oracle': 'OracleLinkedService', 'FileServer': 'FileServerLinkedService', 'HDInsight': 'HDInsightLinkedService', 'Dynamics': 'DynamicsLinkedService', 'CosmosDb': 'CosmosDbLinkedService', 'AzureKeyVault': 'AzureKeyVaultLinkedService', 'AzureBatch': 'AzureBatchLinkedService', 'AzureSqlDatabase': 'AzureSqlDatabaseLinkedService', 'SqlServer': 'SqlServerLinkedService', 'AzureSqlDW': 'AzureSqlDWLinkedService', 'AzureTableStorage': 'AzureTableStorageLinkedService', 'AzureBlobStorage': 'AzureBlobStorageLinkedService', 'AzureStorage': 'AzureStorageLinkedService'} - } - - def __init__(self, *, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, **kwargs) -> None: - super(LinkedService, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.connect_via = connect_via - self.description = description - self.parameters = parameters - self.annotations = annotations - self.type = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_service_reference.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_service_reference.py deleted file mode 100644 index 28ffeda7d01a..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_service_reference.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinkedServiceReference(Model): - """Linked service reference type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. Linked service reference type. Default value: - "LinkedServiceReference" . - :vartype type: str - :param reference_name: Required. Reference LinkedService name. - :type reference_name: str - :param parameters: Arguments for LinkedService. - :type parameters: dict[str, object] - """ - - _validation = { - 'type': {'required': True, 'constant': True}, - 'reference_name': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'reference_name': {'key': 'referenceName', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{object}'}, - } - - type = "LinkedServiceReference" - - def __init__(self, **kwargs): - super(LinkedServiceReference, self).__init__(**kwargs) - self.reference_name = kwargs.get('reference_name', None) - self.parameters = kwargs.get('parameters', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_service_reference_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_service_reference_py3.py deleted file mode 100644 index b6238130bdb6..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_service_reference_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LinkedServiceReference(Model): - """Linked service reference type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. Linked service reference type. Default value: - "LinkedServiceReference" . - :vartype type: str - :param reference_name: Required. Reference LinkedService name. - :type reference_name: str - :param parameters: Arguments for LinkedService. - :type parameters: dict[str, object] - """ - - _validation = { - 'type': {'required': True, 'constant': True}, - 'reference_name': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'reference_name': {'key': 'referenceName', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{object}'}, - } - - type = "LinkedServiceReference" - - def __init__(self, *, reference_name: str, parameters=None, **kwargs) -> None: - super(LinkedServiceReference, self).__init__(**kwargs) - self.reference_name = reference_name - self.parameters = parameters diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_service_resource.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_service_resource.py deleted file mode 100644 index 75828718f589..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_service_resource.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class LinkedServiceResource(SubResource): - """Linked service resource type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :ivar etag: Etag identifies change in the resource. - :vartype etag: str - :param properties: Required. Properties of linked service. - :type properties: ~azure.mgmt.datafactory.models.LinkedService - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'properties': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'LinkedService'}, - } - - def __init__(self, **kwargs): - super(LinkedServiceResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_service_resource_paged.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_service_resource_paged.py deleted file mode 100644 index af0a57170e56..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_service_resource_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class LinkedServiceResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`LinkedServiceResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[LinkedServiceResource]'} - } - - def __init__(self, *args, **kwargs): - - super(LinkedServiceResourcePaged, self).__init__(*args, **kwargs) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_service_resource_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_service_resource_py3.py deleted file mode 100644 index 1fa964b51f57..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_service_resource_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class LinkedServiceResource(SubResource): - """Linked service resource type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :ivar etag: Etag identifies change in the resource. - :vartype etag: str - :param properties: Required. Properties of linked service. - :type properties: ~azure.mgmt.datafactory.models.LinkedService - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'properties': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'LinkedService'}, - } - - def __init__(self, *, properties, **kwargs) -> None: - super(LinkedServiceResource, self).__init__(**kwargs) - self.properties = properties diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/log_storage_settings.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/log_storage_settings.py deleted file mode 100644 index 81b4e7ca619e..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/log_storage_settings.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogStorageSettings(Model): - """Log storage settings. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param linked_service_name: Required. Log storage linked service - reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param path: The path to storage for storing detailed logs of activity - execution. Type: string (or Expression with resultType string). - :type path: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'path': {'key': 'path', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(LogStorageSettings, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.linked_service_name = kwargs.get('linked_service_name', None) - self.path = kwargs.get('path', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/log_storage_settings_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/log_storage_settings_py3.py deleted file mode 100644 index 4850b7adacdf..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/log_storage_settings_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LogStorageSettings(Model): - """Log storage settings. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param linked_service_name: Required. Log storage linked service - reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param path: The path to storage for storing detailed logs of activity - execution. Type: string (or Expression with resultType string). - :type path: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'path': {'key': 'path', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, path=None, **kwargs) -> None: - super(LogStorageSettings, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.linked_service_name = linked_service_name - self.path = path diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/lookup_activity.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/lookup_activity.py deleted file mode 100644 index 62584b2f704a..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/lookup_activity.py +++ /dev/null @@ -1,74 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity import ExecutionActivity - - -class LookupActivity(ExecutionActivity): - """Lookup activity. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param source: Required. Dataset-specific source properties, same as copy - activity source. - :type source: ~azure.mgmt.datafactory.models.CopySource - :param dataset: Required. Lookup activity dataset reference. - :type dataset: ~azure.mgmt.datafactory.models.DatasetReference - :param first_row_only: Whether to return first row or all rows. Default - value is true. Type: boolean (or Expression with resultType boolean). - :type first_row_only: object - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'source': {'required': True}, - 'dataset': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'source': {'key': 'typeProperties.source', 'type': 'CopySource'}, - 'dataset': {'key': 'typeProperties.dataset', 'type': 'DatasetReference'}, - 'first_row_only': {'key': 'typeProperties.firstRowOnly', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(LookupActivity, self).__init__(**kwargs) - self.source = kwargs.get('source', None) - self.dataset = kwargs.get('dataset', None) - self.first_row_only = kwargs.get('first_row_only', None) - self.type = 'Lookup' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/lookup_activity_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/lookup_activity_py3.py deleted file mode 100644 index 41061675ebbe..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/lookup_activity_py3.py +++ /dev/null @@ -1,74 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity_py3 import ExecutionActivity - - -class LookupActivity(ExecutionActivity): - """Lookup activity. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param source: Required. Dataset-specific source properties, same as copy - activity source. - :type source: ~azure.mgmt.datafactory.models.CopySource - :param dataset: Required. Lookup activity dataset reference. - :type dataset: ~azure.mgmt.datafactory.models.DatasetReference - :param first_row_only: Whether to return first row or all rows. Default - value is true. Type: boolean (or Expression with resultType boolean). - :type first_row_only: object - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'source': {'required': True}, - 'dataset': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'source': {'key': 'typeProperties.source', 'type': 'CopySource'}, - 'dataset': {'key': 'typeProperties.dataset', 'type': 'DatasetReference'}, - 'first_row_only': {'key': 'typeProperties.firstRowOnly', 'type': 'object'}, - } - - def __init__(self, *, name: str, source, dataset, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, first_row_only=None, **kwargs) -> None: - super(LookupActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) - self.source = source - self.dataset = dataset - self.first_row_only = first_row_only - self.type = 'Lookup' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/magento_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/magento_linked_service.py deleted file mode 100644 index 5fb8974f28db..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/magento_linked_service.py +++ /dev/null @@ -1,85 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class MagentoLinkedService(LinkedService): - """Magento server linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param host: Required. The URL of the Magento instance. (i.e. - 192.168.222.110/magento3) - :type host: object - :param access_token: The access token from Magento. - :type access_token: ~azure.mgmt.datafactory.models.SecretBase - :param use_encrypted_endpoints: Specifies whether the data source - endpoints are encrypted using HTTPS. The default value is true. - :type use_encrypted_endpoints: object - :param use_host_verification: Specifies whether to require the host name - in the server's certificate to match the host name of the server when - connecting over SSL. The default value is true. - :type use_host_verification: object - :param use_peer_verification: Specifies whether to verify the identity of - the server when connecting over SSL. The default value is true. - :type use_peer_verification: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'host': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'host': {'key': 'typeProperties.host', 'type': 'object'}, - 'access_token': {'key': 'typeProperties.accessToken', 'type': 'SecretBase'}, - 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, - 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, - 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(MagentoLinkedService, self).__init__(**kwargs) - self.host = kwargs.get('host', None) - self.access_token = kwargs.get('access_token', None) - self.use_encrypted_endpoints = kwargs.get('use_encrypted_endpoints', None) - self.use_host_verification = kwargs.get('use_host_verification', None) - self.use_peer_verification = kwargs.get('use_peer_verification', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'Magento' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/magento_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/magento_linked_service_py3.py deleted file mode 100644 index 420656103983..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/magento_linked_service_py3.py +++ /dev/null @@ -1,85 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class MagentoLinkedService(LinkedService): - """Magento server linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param host: Required. The URL of the Magento instance. (i.e. - 192.168.222.110/magento3) - :type host: object - :param access_token: The access token from Magento. - :type access_token: ~azure.mgmt.datafactory.models.SecretBase - :param use_encrypted_endpoints: Specifies whether the data source - endpoints are encrypted using HTTPS. The default value is true. - :type use_encrypted_endpoints: object - :param use_host_verification: Specifies whether to require the host name - in the server's certificate to match the host name of the server when - connecting over SSL. The default value is true. - :type use_host_verification: object - :param use_peer_verification: Specifies whether to verify the identity of - the server when connecting over SSL. The default value is true. - :type use_peer_verification: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'host': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'host': {'key': 'typeProperties.host', 'type': 'object'}, - 'access_token': {'key': 'typeProperties.accessToken', 'type': 'SecretBase'}, - 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, - 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, - 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, host, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, access_token=None, use_encrypted_endpoints=None, use_host_verification=None, use_peer_verification=None, encrypted_credential=None, **kwargs) -> None: - super(MagentoLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.host = host - self.access_token = access_token - self.use_encrypted_endpoints = use_encrypted_endpoints - self.use_host_verification = use_host_verification - self.use_peer_verification = use_peer_verification - self.encrypted_credential = encrypted_credential - self.type = 'Magento' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/magento_object_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/magento_object_dataset.py deleted file mode 100644 index ad540093ca55..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/magento_object_dataset.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class MagentoObjectDataset(Dataset): - """Magento server dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(MagentoObjectDataset, self).__init__(**kwargs) - self.table_name = kwargs.get('table_name', None) - self.type = 'MagentoObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/magento_object_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/magento_object_dataset_py3.py deleted file mode 100644 index 481732bb688a..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/magento_object_dataset_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class MagentoObjectDataset(Dataset): - """Magento server dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: - super(MagentoObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.table_name = table_name - self.type = 'MagentoObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/magento_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/magento_source.py deleted file mode 100644 index 679ba2a0669e..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/magento_source.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class MagentoSource(CopySource): - """A copy activity Magento server source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(MagentoSource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.type = 'MagentoSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/magento_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/magento_source_py3.py deleted file mode 100644 index a01cf80a969a..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/magento_source_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class MagentoSource(CopySource): - """A copy activity Magento server source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query=None, **kwargs) -> None: - super(MagentoSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.type = 'MagentoSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime.py deleted file mode 100644 index 9cbc9e94e7c3..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime.py +++ /dev/null @@ -1,65 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .integration_runtime import IntegrationRuntime - - -class ManagedIntegrationRuntime(IntegrationRuntime): - """Managed integration runtime, including managed elastic and managed - dedicated integration runtimes. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Integration runtime description. - :type description: str - :param type: Required. Constant filled by server. - :type type: str - :ivar state: Integration runtime state, only valid for managed dedicated - integration runtime. Possible values include: 'Initial', 'Stopped', - 'Started', 'Starting', 'Stopping', 'NeedRegistration', 'Online', - 'Limited', 'Offline', 'AccessDenied' - :vartype state: str or - ~azure.mgmt.datafactory.models.IntegrationRuntimeState - :param compute_properties: The compute resource for managed integration - runtime. - :type compute_properties: - ~azure.mgmt.datafactory.models.IntegrationRuntimeComputeProperties - :param ssis_properties: SSIS properties for managed integration runtime. - :type ssis_properties: - ~azure.mgmt.datafactory.models.IntegrationRuntimeSsisProperties - """ - - _validation = { - 'type': {'required': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'compute_properties': {'key': 'typeProperties.computeProperties', 'type': 'IntegrationRuntimeComputeProperties'}, - 'ssis_properties': {'key': 'typeProperties.ssisProperties', 'type': 'IntegrationRuntimeSsisProperties'}, - } - - def __init__(self, **kwargs): - super(ManagedIntegrationRuntime, self).__init__(**kwargs) - self.state = None - self.compute_properties = kwargs.get('compute_properties', None) - self.ssis_properties = kwargs.get('ssis_properties', None) - self.type = 'Managed' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime_error.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime_error.py deleted file mode 100644 index c70323697fdf..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime_error.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedIntegrationRuntimeError(Model): - """Error definition for managed integration runtime. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar time: The time when the error occurred. - :vartype time: datetime - :ivar code: Error code. - :vartype code: str - :ivar parameters: Managed integration runtime error parameters. - :vartype parameters: list[str] - :ivar message: Error message. - :vartype message: str - """ - - _validation = { - 'time': {'readonly': True}, - 'code': {'readonly': True}, - 'parameters': {'readonly': True}, - 'message': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'time': {'key': 'time', 'type': 'iso-8601'}, - 'code': {'key': 'code', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[str]'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedIntegrationRuntimeError, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.time = None - self.code = None - self.parameters = None - self.message = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime_error_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime_error_py3.py deleted file mode 100644 index 1668c5196537..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime_error_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedIntegrationRuntimeError(Model): - """Error definition for managed integration runtime. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar time: The time when the error occurred. - :vartype time: datetime - :ivar code: Error code. - :vartype code: str - :ivar parameters: Managed integration runtime error parameters. - :vartype parameters: list[str] - :ivar message: Error message. - :vartype message: str - """ - - _validation = { - 'time': {'readonly': True}, - 'code': {'readonly': True}, - 'parameters': {'readonly': True}, - 'message': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'time': {'key': 'time', 'type': 'iso-8601'}, - 'code': {'key': 'code', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[str]'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, **kwargs) -> None: - super(ManagedIntegrationRuntimeError, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.time = None - self.code = None - self.parameters = None - self.message = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime_node.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime_node.py deleted file mode 100644 index e9c0169cf6c5..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime_node.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedIntegrationRuntimeNode(Model): - """Properties of integration runtime node. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar node_id: The managed integration runtime node id. - :vartype node_id: str - :ivar status: The managed integration runtime node status. Possible values - include: 'Starting', 'Available', 'Recycling', 'Unavailable' - :vartype status: str or - ~azure.mgmt.datafactory.models.ManagedIntegrationRuntimeNodeStatus - :param errors: The errors that occurred on this integration runtime node. - :type errors: - list[~azure.mgmt.datafactory.models.ManagedIntegrationRuntimeError] - """ - - _validation = { - 'node_id': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'node_id': {'key': 'nodeId', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'errors': {'key': 'errors', 'type': '[ManagedIntegrationRuntimeError]'}, - } - - def __init__(self, **kwargs): - super(ManagedIntegrationRuntimeNode, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.node_id = None - self.status = None - self.errors = kwargs.get('errors', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime_node_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime_node_py3.py deleted file mode 100644 index 0e8104d0de05..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime_node_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedIntegrationRuntimeNode(Model): - """Properties of integration runtime node. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar node_id: The managed integration runtime node id. - :vartype node_id: str - :ivar status: The managed integration runtime node status. Possible values - include: 'Starting', 'Available', 'Recycling', 'Unavailable' - :vartype status: str or - ~azure.mgmt.datafactory.models.ManagedIntegrationRuntimeNodeStatus - :param errors: The errors that occurred on this integration runtime node. - :type errors: - list[~azure.mgmt.datafactory.models.ManagedIntegrationRuntimeError] - """ - - _validation = { - 'node_id': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'node_id': {'key': 'nodeId', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'errors': {'key': 'errors', 'type': '[ManagedIntegrationRuntimeError]'}, - } - - def __init__(self, *, additional_properties=None, errors=None, **kwargs) -> None: - super(ManagedIntegrationRuntimeNode, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.node_id = None - self.status = None - self.errors = errors diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime_operation_result.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime_operation_result.py deleted file mode 100644 index 2329f7a2ba36..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime_operation_result.py +++ /dev/null @@ -1,65 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedIntegrationRuntimeOperationResult(Model): - """Properties of managed integration runtime operation result. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar type: The operation type. Could be start or stop. - :vartype type: str - :ivar start_time: The start time of the operation. - :vartype start_time: datetime - :ivar result: The operation result. - :vartype result: str - :ivar error_code: The error code. - :vartype error_code: str - :ivar parameters: Managed integration runtime error parameters. - :vartype parameters: list[str] - :ivar activity_id: The activity id for the operation request. - :vartype activity_id: str - """ - - _validation = { - 'type': {'readonly': True}, - 'start_time': {'readonly': True}, - 'result': {'readonly': True}, - 'error_code': {'readonly': True}, - 'parameters': {'readonly': True}, - 'activity_id': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'type': {'key': 'type', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'result': {'key': 'result', 'type': 'str'}, - 'error_code': {'key': 'errorCode', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[str]'}, - 'activity_id': {'key': 'activityId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedIntegrationRuntimeOperationResult, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.type = None - self.start_time = None - self.result = None - self.error_code = None - self.parameters = None - self.activity_id = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime_operation_result_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime_operation_result_py3.py deleted file mode 100644 index 58a80c0e600e..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime_operation_result_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedIntegrationRuntimeOperationResult(Model): - """Properties of managed integration runtime operation result. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar type: The operation type. Could be start or stop. - :vartype type: str - :ivar start_time: The start time of the operation. - :vartype start_time: datetime - :ivar result: The operation result. - :vartype result: str - :ivar error_code: The error code. - :vartype error_code: str - :ivar parameters: Managed integration runtime error parameters. - :vartype parameters: list[str] - :ivar activity_id: The activity id for the operation request. - :vartype activity_id: str - """ - - _validation = { - 'type': {'readonly': True}, - 'start_time': {'readonly': True}, - 'result': {'readonly': True}, - 'error_code': {'readonly': True}, - 'parameters': {'readonly': True}, - 'activity_id': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'type': {'key': 'type', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'result': {'key': 'result', 'type': 'str'}, - 'error_code': {'key': 'errorCode', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[str]'}, - 'activity_id': {'key': 'activityId', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, **kwargs) -> None: - super(ManagedIntegrationRuntimeOperationResult, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.type = None - self.start_time = None - self.result = None - self.error_code = None - self.parameters = None - self.activity_id = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime_py3.py deleted file mode 100644 index 0e71d8b09f4e..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .integration_runtime_py3 import IntegrationRuntime - - -class ManagedIntegrationRuntime(IntegrationRuntime): - """Managed integration runtime, including managed elastic and managed - dedicated integration runtimes. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Integration runtime description. - :type description: str - :param type: Required. Constant filled by server. - :type type: str - :ivar state: Integration runtime state, only valid for managed dedicated - integration runtime. Possible values include: 'Initial', 'Stopped', - 'Started', 'Starting', 'Stopping', 'NeedRegistration', 'Online', - 'Limited', 'Offline', 'AccessDenied' - :vartype state: str or - ~azure.mgmt.datafactory.models.IntegrationRuntimeState - :param compute_properties: The compute resource for managed integration - runtime. - :type compute_properties: - ~azure.mgmt.datafactory.models.IntegrationRuntimeComputeProperties - :param ssis_properties: SSIS properties for managed integration runtime. - :type ssis_properties: - ~azure.mgmt.datafactory.models.IntegrationRuntimeSsisProperties - """ - - _validation = { - 'type': {'required': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'compute_properties': {'key': 'typeProperties.computeProperties', 'type': 'IntegrationRuntimeComputeProperties'}, - 'ssis_properties': {'key': 'typeProperties.ssisProperties', 'type': 'IntegrationRuntimeSsisProperties'}, - } - - def __init__(self, *, additional_properties=None, description: str=None, compute_properties=None, ssis_properties=None, **kwargs) -> None: - super(ManagedIntegrationRuntime, self).__init__(additional_properties=additional_properties, description=description, **kwargs) - self.state = None - self.compute_properties = compute_properties - self.ssis_properties = ssis_properties - self.type = 'Managed' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime_status.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime_status.py deleted file mode 100644 index 17d21775f09f..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime_status.py +++ /dev/null @@ -1,78 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .integration_runtime_status import IntegrationRuntimeStatus - - -class ManagedIntegrationRuntimeStatus(IntegrationRuntimeStatus): - """Managed integration runtime status. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar data_factory_name: The data factory name which the integration - runtime belong to. - :vartype data_factory_name: str - :ivar state: The state of integration runtime. Possible values include: - 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', - 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied' - :vartype state: str or - ~azure.mgmt.datafactory.models.IntegrationRuntimeState - :param type: Required. Constant filled by server. - :type type: str - :ivar create_time: The time at which the integration runtime was created, - in ISO8601 format. - :vartype create_time: datetime - :ivar nodes: The list of nodes for managed integration runtime. - :vartype nodes: - list[~azure.mgmt.datafactory.models.ManagedIntegrationRuntimeNode] - :ivar other_errors: The errors that occurred on this integration runtime. - :vartype other_errors: - list[~azure.mgmt.datafactory.models.ManagedIntegrationRuntimeError] - :ivar last_operation: The last operation result that occurred on this - integration runtime. - :vartype last_operation: - ~azure.mgmt.datafactory.models.ManagedIntegrationRuntimeOperationResult - """ - - _validation = { - 'data_factory_name': {'readonly': True}, - 'state': {'readonly': True}, - 'type': {'required': True}, - 'create_time': {'readonly': True}, - 'nodes': {'readonly': True}, - 'other_errors': {'readonly': True}, - 'last_operation': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'data_factory_name': {'key': 'dataFactoryName', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'create_time': {'key': 'typeProperties.createTime', 'type': 'iso-8601'}, - 'nodes': {'key': 'typeProperties.nodes', 'type': '[ManagedIntegrationRuntimeNode]'}, - 'other_errors': {'key': 'typeProperties.otherErrors', 'type': '[ManagedIntegrationRuntimeError]'}, - 'last_operation': {'key': 'typeProperties.lastOperation', 'type': 'ManagedIntegrationRuntimeOperationResult'}, - } - - def __init__(self, **kwargs): - super(ManagedIntegrationRuntimeStatus, self).__init__(**kwargs) - self.create_time = None - self.nodes = None - self.other_errors = None - self.last_operation = None - self.type = 'Managed' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime_status_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime_status_py3.py deleted file mode 100644 index 03d9451045bd..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/managed_integration_runtime_status_py3.py +++ /dev/null @@ -1,78 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .integration_runtime_status_py3 import IntegrationRuntimeStatus - - -class ManagedIntegrationRuntimeStatus(IntegrationRuntimeStatus): - """Managed integration runtime status. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar data_factory_name: The data factory name which the integration - runtime belong to. - :vartype data_factory_name: str - :ivar state: The state of integration runtime. Possible values include: - 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', - 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied' - :vartype state: str or - ~azure.mgmt.datafactory.models.IntegrationRuntimeState - :param type: Required. Constant filled by server. - :type type: str - :ivar create_time: The time at which the integration runtime was created, - in ISO8601 format. - :vartype create_time: datetime - :ivar nodes: The list of nodes for managed integration runtime. - :vartype nodes: - list[~azure.mgmt.datafactory.models.ManagedIntegrationRuntimeNode] - :ivar other_errors: The errors that occurred on this integration runtime. - :vartype other_errors: - list[~azure.mgmt.datafactory.models.ManagedIntegrationRuntimeError] - :ivar last_operation: The last operation result that occurred on this - integration runtime. - :vartype last_operation: - ~azure.mgmt.datafactory.models.ManagedIntegrationRuntimeOperationResult - """ - - _validation = { - 'data_factory_name': {'readonly': True}, - 'state': {'readonly': True}, - 'type': {'required': True}, - 'create_time': {'readonly': True}, - 'nodes': {'readonly': True}, - 'other_errors': {'readonly': True}, - 'last_operation': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'data_factory_name': {'key': 'dataFactoryName', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'create_time': {'key': 'typeProperties.createTime', 'type': 'iso-8601'}, - 'nodes': {'key': 'typeProperties.nodes', 'type': '[ManagedIntegrationRuntimeNode]'}, - 'other_errors': {'key': 'typeProperties.otherErrors', 'type': '[ManagedIntegrationRuntimeError]'}, - 'last_operation': {'key': 'typeProperties.lastOperation', 'type': 'ManagedIntegrationRuntimeOperationResult'}, - } - - def __init__(self, *, additional_properties=None, **kwargs) -> None: - super(ManagedIntegrationRuntimeStatus, self).__init__(additional_properties=additional_properties, **kwargs) - self.create_time = None - self.nodes = None - self.other_errors = None - self.last_operation = None - self.type = 'Managed' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/maria_db_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/maria_db_linked_service.py deleted file mode 100644 index 0a98a04138dc..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/maria_db_linked_service.py +++ /dev/null @@ -1,69 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class MariaDBLinkedService(LinkedService): - """MariaDB server linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param connection_string: An ODBC connection string. Type: string, - SecureString or AzureKeyVaultSecretReference. - :type connection_string: object - :param pwd: The Azure key vault secret reference of password in connection - string. - :type pwd: ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, - 'pwd': {'key': 'typeProperties.pwd', 'type': 'AzureKeyVaultSecretReference'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(MariaDBLinkedService, self).__init__(**kwargs) - self.connection_string = kwargs.get('connection_string', None) - self.pwd = kwargs.get('pwd', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'MariaDB' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/maria_db_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/maria_db_linked_service_py3.py deleted file mode 100644 index ef1114660ad7..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/maria_db_linked_service_py3.py +++ /dev/null @@ -1,69 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class MariaDBLinkedService(LinkedService): - """MariaDB server linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param connection_string: An ODBC connection string. Type: string, - SecureString or AzureKeyVaultSecretReference. - :type connection_string: object - :param pwd: The Azure key vault secret reference of password in connection - string. - :type pwd: ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, - 'pwd': {'key': 'typeProperties.pwd', 'type': 'AzureKeyVaultSecretReference'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, connection_string=None, pwd=None, encrypted_credential=None, **kwargs) -> None: - super(MariaDBLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.connection_string = connection_string - self.pwd = pwd - self.encrypted_credential = encrypted_credential - self.type = 'MariaDB' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/maria_db_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/maria_db_source.py deleted file mode 100644 index 96b7116cd3ac..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/maria_db_source.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class MariaDBSource(CopySource): - """A copy activity MariaDB server source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(MariaDBSource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.type = 'MariaDBSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/maria_db_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/maria_db_source_py3.py deleted file mode 100644 index 1dbb6f327d04..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/maria_db_source_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class MariaDBSource(CopySource): - """A copy activity MariaDB server source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query=None, **kwargs) -> None: - super(MariaDBSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.type = 'MariaDBSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/maria_db_table_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/maria_db_table_dataset.py deleted file mode 100644 index 66dc9c8ea9b7..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/maria_db_table_dataset.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class MariaDBTableDataset(Dataset): - """MariaDB server dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(MariaDBTableDataset, self).__init__(**kwargs) - self.table_name = kwargs.get('table_name', None) - self.type = 'MariaDBTable' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/maria_db_table_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/maria_db_table_dataset_py3.py deleted file mode 100644 index ac3c8cf2ea72..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/maria_db_table_dataset_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class MariaDBTableDataset(Dataset): - """MariaDB server dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: - super(MariaDBTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.table_name = table_name - self.type = 'MariaDBTable' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/marketo_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/marketo_linked_service.py deleted file mode 100644 index 432676824a75..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/marketo_linked_service.py +++ /dev/null @@ -1,90 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class MarketoLinkedService(LinkedService): - """Marketo server linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param endpoint: Required. The endpoint of the Marketo server. (i.e. - 123-ABC-321.mktorest.com) - :type endpoint: object - :param client_id: Required. The client Id of your Marketo service. - :type client_id: object - :param client_secret: The client secret of your Marketo service. - :type client_secret: ~azure.mgmt.datafactory.models.SecretBase - :param use_encrypted_endpoints: Specifies whether the data source - endpoints are encrypted using HTTPS. The default value is true. - :type use_encrypted_endpoints: object - :param use_host_verification: Specifies whether to require the host name - in the server's certificate to match the host name of the server when - connecting over SSL. The default value is true. - :type use_host_verification: object - :param use_peer_verification: Specifies whether to verify the identity of - the server when connecting over SSL. The default value is true. - :type use_peer_verification: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'endpoint': {'required': True}, - 'client_id': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'endpoint': {'key': 'typeProperties.endpoint', 'type': 'object'}, - 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, - 'client_secret': {'key': 'typeProperties.clientSecret', 'type': 'SecretBase'}, - 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, - 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, - 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(MarketoLinkedService, self).__init__(**kwargs) - self.endpoint = kwargs.get('endpoint', None) - self.client_id = kwargs.get('client_id', None) - self.client_secret = kwargs.get('client_secret', None) - self.use_encrypted_endpoints = kwargs.get('use_encrypted_endpoints', None) - self.use_host_verification = kwargs.get('use_host_verification', None) - self.use_peer_verification = kwargs.get('use_peer_verification', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'Marketo' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/marketo_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/marketo_linked_service_py3.py deleted file mode 100644 index b4e360931809..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/marketo_linked_service_py3.py +++ /dev/null @@ -1,90 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class MarketoLinkedService(LinkedService): - """Marketo server linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param endpoint: Required. The endpoint of the Marketo server. (i.e. - 123-ABC-321.mktorest.com) - :type endpoint: object - :param client_id: Required. The client Id of your Marketo service. - :type client_id: object - :param client_secret: The client secret of your Marketo service. - :type client_secret: ~azure.mgmt.datafactory.models.SecretBase - :param use_encrypted_endpoints: Specifies whether the data source - endpoints are encrypted using HTTPS. The default value is true. - :type use_encrypted_endpoints: object - :param use_host_verification: Specifies whether to require the host name - in the server's certificate to match the host name of the server when - connecting over SSL. The default value is true. - :type use_host_verification: object - :param use_peer_verification: Specifies whether to verify the identity of - the server when connecting over SSL. The default value is true. - :type use_peer_verification: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'endpoint': {'required': True}, - 'client_id': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'endpoint': {'key': 'typeProperties.endpoint', 'type': 'object'}, - 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, - 'client_secret': {'key': 'typeProperties.clientSecret', 'type': 'SecretBase'}, - 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, - 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, - 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, endpoint, client_id, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, client_secret=None, use_encrypted_endpoints=None, use_host_verification=None, use_peer_verification=None, encrypted_credential=None, **kwargs) -> None: - super(MarketoLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.endpoint = endpoint - self.client_id = client_id - self.client_secret = client_secret - self.use_encrypted_endpoints = use_encrypted_endpoints - self.use_host_verification = use_host_verification - self.use_peer_verification = use_peer_verification - self.encrypted_credential = encrypted_credential - self.type = 'Marketo' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/marketo_object_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/marketo_object_dataset.py deleted file mode 100644 index 63daa10047b9..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/marketo_object_dataset.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class MarketoObjectDataset(Dataset): - """Marketo server dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(MarketoObjectDataset, self).__init__(**kwargs) - self.table_name = kwargs.get('table_name', None) - self.type = 'MarketoObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/marketo_object_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/marketo_object_dataset_py3.py deleted file mode 100644 index 7179d5af53dd..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/marketo_object_dataset_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class MarketoObjectDataset(Dataset): - """Marketo server dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: - super(MarketoObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.table_name = table_name - self.type = 'MarketoObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/marketo_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/marketo_source.py deleted file mode 100644 index 4867951baae7..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/marketo_source.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class MarketoSource(CopySource): - """A copy activity Marketo server source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(MarketoSource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.type = 'MarketoSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/marketo_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/marketo_source_py3.py deleted file mode 100644 index 52c16eae0437..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/marketo_source_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class MarketoSource(CopySource): - """A copy activity Marketo server source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query=None, **kwargs) -> None: - super(MarketoSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.type = 'MarketoSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/mongo_db_collection_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/mongo_db_collection_dataset.py deleted file mode 100644 index 796c5e14eaca..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/mongo_db_collection_dataset.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class MongoDbCollectionDataset(Dataset): - """The MongoDB database dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param collection_name: Required. The table name of the MongoDB database. - Type: string (or Expression with resultType string). - :type collection_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - 'collection_name': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'collection_name': {'key': 'typeProperties.collectionName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(MongoDbCollectionDataset, self).__init__(**kwargs) - self.collection_name = kwargs.get('collection_name', None) - self.type = 'MongoDbCollection' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/mongo_db_collection_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/mongo_db_collection_dataset_py3.py deleted file mode 100644 index 68fe2affb0e4..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/mongo_db_collection_dataset_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class MongoDbCollectionDataset(Dataset): - """The MongoDB database dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param collection_name: Required. The table name of the MongoDB database. - Type: string (or Expression with resultType string). - :type collection_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - 'collection_name': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'collection_name': {'key': 'typeProperties.collectionName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, collection_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, **kwargs) -> None: - super(MongoDbCollectionDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.collection_name = collection_name - self.type = 'MongoDbCollection' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/mongo_db_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/mongo_db_linked_service.py deleted file mode 100644 index 49d53510f7fd..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/mongo_db_linked_service.py +++ /dev/null @@ -1,109 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class MongoDbLinkedService(LinkedService): - """Linked service for MongoDb data source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param server: Required. The IP address or server name of the MongoDB - server. Type: string (or Expression with resultType string). - :type server: object - :param authentication_type: The authentication type to be used to connect - to the MongoDB database. Possible values include: 'Basic', 'Anonymous' - :type authentication_type: str or - ~azure.mgmt.datafactory.models.MongoDbAuthenticationType - :param database_name: Required. The name of the MongoDB database that you - want to access. Type: string (or Expression with resultType string). - :type database_name: object - :param username: Username for authentication. Type: string (or Expression - with resultType string). - :type username: object - :param password: Password for authentication. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param auth_source: Database to verify the username and password. Type: - string (or Expression with resultType string). - :type auth_source: object - :param port: The TCP port number that the MongoDB server uses to listen - for client connections. The default value is 27017. Type: integer (or - Expression with resultType integer), minimum: 0. - :type port: object - :param enable_ssl: Specifies whether the connections to the server are - encrypted using SSL. The default value is false. Type: boolean (or - Expression with resultType boolean). - :type enable_ssl: object - :param allow_self_signed_server_cert: Specifies whether to allow - self-signed certificates from the server. The default value is false. - Type: boolean (or Expression with resultType boolean). - :type allow_self_signed_server_cert: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'server': {'required': True}, - 'database_name': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'server': {'key': 'typeProperties.server', 'type': 'object'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, - 'database_name': {'key': 'typeProperties.databaseName', 'type': 'object'}, - 'username': {'key': 'typeProperties.username', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'auth_source': {'key': 'typeProperties.authSource', 'type': 'object'}, - 'port': {'key': 'typeProperties.port', 'type': 'object'}, - 'enable_ssl': {'key': 'typeProperties.enableSsl', 'type': 'object'}, - 'allow_self_signed_server_cert': {'key': 'typeProperties.allowSelfSignedServerCert', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(MongoDbLinkedService, self).__init__(**kwargs) - self.server = kwargs.get('server', None) - self.authentication_type = kwargs.get('authentication_type', None) - self.database_name = kwargs.get('database_name', None) - self.username = kwargs.get('username', None) - self.password = kwargs.get('password', None) - self.auth_source = kwargs.get('auth_source', None) - self.port = kwargs.get('port', None) - self.enable_ssl = kwargs.get('enable_ssl', None) - self.allow_self_signed_server_cert = kwargs.get('allow_self_signed_server_cert', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'MongoDb' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/mongo_db_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/mongo_db_linked_service_py3.py deleted file mode 100644 index c1d96a5465b9..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/mongo_db_linked_service_py3.py +++ /dev/null @@ -1,109 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class MongoDbLinkedService(LinkedService): - """Linked service for MongoDb data source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param server: Required. The IP address or server name of the MongoDB - server. Type: string (or Expression with resultType string). - :type server: object - :param authentication_type: The authentication type to be used to connect - to the MongoDB database. Possible values include: 'Basic', 'Anonymous' - :type authentication_type: str or - ~azure.mgmt.datafactory.models.MongoDbAuthenticationType - :param database_name: Required. The name of the MongoDB database that you - want to access. Type: string (or Expression with resultType string). - :type database_name: object - :param username: Username for authentication. Type: string (or Expression - with resultType string). - :type username: object - :param password: Password for authentication. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param auth_source: Database to verify the username and password. Type: - string (or Expression with resultType string). - :type auth_source: object - :param port: The TCP port number that the MongoDB server uses to listen - for client connections. The default value is 27017. Type: integer (or - Expression with resultType integer), minimum: 0. - :type port: object - :param enable_ssl: Specifies whether the connections to the server are - encrypted using SSL. The default value is false. Type: boolean (or - Expression with resultType boolean). - :type enable_ssl: object - :param allow_self_signed_server_cert: Specifies whether to allow - self-signed certificates from the server. The default value is false. - Type: boolean (or Expression with resultType boolean). - :type allow_self_signed_server_cert: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'server': {'required': True}, - 'database_name': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'server': {'key': 'typeProperties.server', 'type': 'object'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, - 'database_name': {'key': 'typeProperties.databaseName', 'type': 'object'}, - 'username': {'key': 'typeProperties.username', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'auth_source': {'key': 'typeProperties.authSource', 'type': 'object'}, - 'port': {'key': 'typeProperties.port', 'type': 'object'}, - 'enable_ssl': {'key': 'typeProperties.enableSsl', 'type': 'object'}, - 'allow_self_signed_server_cert': {'key': 'typeProperties.allowSelfSignedServerCert', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, server, database_name, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, authentication_type=None, username=None, password=None, auth_source=None, port=None, enable_ssl=None, allow_self_signed_server_cert=None, encrypted_credential=None, **kwargs) -> None: - super(MongoDbLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.server = server - self.authentication_type = authentication_type - self.database_name = database_name - self.username = username - self.password = password - self.auth_source = auth_source - self.port = port - self.enable_ssl = enable_ssl - self.allow_self_signed_server_cert = allow_self_signed_server_cert - self.encrypted_credential = encrypted_credential - self.type = 'MongoDb' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/mongo_db_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/mongo_db_source.py deleted file mode 100644 index b9f0be6b97d3..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/mongo_db_source.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class MongoDbSource(CopySource): - """A copy activity source for a MongoDB database. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: Database query. Should be a SQL-92 query expression. Type: - string (or Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(MongoDbSource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.type = 'MongoDbSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/mongo_db_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/mongo_db_source_py3.py deleted file mode 100644 index b4f01d8d7ffb..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/mongo_db_source_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class MongoDbSource(CopySource): - """A copy activity source for a MongoDB database. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: Database query. Should be a SQL-92 query expression. Type: - string (or Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query=None, **kwargs) -> None: - super(MongoDbSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.type = 'MongoDbSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/multiple_pipeline_trigger.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/multiple_pipeline_trigger.py deleted file mode 100644 index dd279ab6baa3..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/multiple_pipeline_trigger.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .trigger import Trigger - - -class MultiplePipelineTrigger(Trigger): - """Base class for all triggers that support one to many model for trigger to - pipeline. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: BlobEventsTrigger, BlobTrigger, ScheduleTrigger - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Trigger description. - :type description: str - :ivar runtime_state: Indicates if trigger is running or not. Updated when - Start/Stop APIs are called on the Trigger. Possible values include: - 'Started', 'Stopped', 'Disabled' - :vartype runtime_state: str or - ~azure.mgmt.datafactory.models.TriggerRuntimeState - :param type: Required. Constant filled by server. - :type type: str - :param pipelines: Pipelines that need to be started. - :type pipelines: - list[~azure.mgmt.datafactory.models.TriggerPipelineReference] - """ - - _validation = { - 'runtime_state': {'readonly': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'runtime_state': {'key': 'runtimeState', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'pipelines': {'key': 'pipelines', 'type': '[TriggerPipelineReference]'}, - } - - _subtype_map = { - 'type': {'BlobEventsTrigger': 'BlobEventsTrigger', 'BlobTrigger': 'BlobTrigger', 'ScheduleTrigger': 'ScheduleTrigger'} - } - - def __init__(self, **kwargs): - super(MultiplePipelineTrigger, self).__init__(**kwargs) - self.pipelines = kwargs.get('pipelines', None) - self.type = 'MultiplePipelineTrigger' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/multiple_pipeline_trigger_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/multiple_pipeline_trigger_py3.py deleted file mode 100644 index 3400431e49e2..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/multiple_pipeline_trigger_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .trigger_py3 import Trigger - - -class MultiplePipelineTrigger(Trigger): - """Base class for all triggers that support one to many model for trigger to - pipeline. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: BlobEventsTrigger, BlobTrigger, ScheduleTrigger - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Trigger description. - :type description: str - :ivar runtime_state: Indicates if trigger is running or not. Updated when - Start/Stop APIs are called on the Trigger. Possible values include: - 'Started', 'Stopped', 'Disabled' - :vartype runtime_state: str or - ~azure.mgmt.datafactory.models.TriggerRuntimeState - :param type: Required. Constant filled by server. - :type type: str - :param pipelines: Pipelines that need to be started. - :type pipelines: - list[~azure.mgmt.datafactory.models.TriggerPipelineReference] - """ - - _validation = { - 'runtime_state': {'readonly': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'runtime_state': {'key': 'runtimeState', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'pipelines': {'key': 'pipelines', 'type': '[TriggerPipelineReference]'}, - } - - _subtype_map = { - 'type': {'BlobEventsTrigger': 'BlobEventsTrigger', 'BlobTrigger': 'BlobTrigger', 'ScheduleTrigger': 'ScheduleTrigger'} - } - - def __init__(self, *, additional_properties=None, description: str=None, pipelines=None, **kwargs) -> None: - super(MultiplePipelineTrigger, self).__init__(additional_properties=additional_properties, description=description, **kwargs) - self.pipelines = pipelines - self.type = 'MultiplePipelineTrigger' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/my_sql_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/my_sql_linked_service.py deleted file mode 100644 index 542fb13b7a37..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/my_sql_linked_service.py +++ /dev/null @@ -1,70 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class MySqlLinkedService(LinkedService): - """Linked service for MySQL data source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param connection_string: Required. The connection string. - :type connection_string: ~azure.mgmt.datafactory.models.SecretBase - :param password: The Azure key vault secret reference of password in - connection string. - :type password: - ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'connection_string': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'SecretBase'}, - 'password': {'key': 'typeProperties.password', 'type': 'AzureKeyVaultSecretReference'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(MySqlLinkedService, self).__init__(**kwargs) - self.connection_string = kwargs.get('connection_string', None) - self.password = kwargs.get('password', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'MySql' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/my_sql_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/my_sql_linked_service_py3.py deleted file mode 100644 index cd87d5e7e3b5..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/my_sql_linked_service_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class MySqlLinkedService(LinkedService): - """Linked service for MySQL data source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param connection_string: Required. The connection string. - :type connection_string: ~azure.mgmt.datafactory.models.SecretBase - :param password: The Azure key vault secret reference of password in - connection string. - :type password: - ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'connection_string': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'SecretBase'}, - 'password': {'key': 'typeProperties.password', 'type': 'AzureKeyVaultSecretReference'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, connection_string, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, password=None, encrypted_credential=None, **kwargs) -> None: - super(MySqlLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.connection_string = connection_string - self.password = password - self.encrypted_credential = encrypted_credential - self.type = 'MySql' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/netezza_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/netezza_linked_service.py deleted file mode 100644 index 319a68efddc5..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/netezza_linked_service.py +++ /dev/null @@ -1,69 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class NetezzaLinkedService(LinkedService): - """Netezza linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param connection_string: An ODBC connection string. Type: string, - SecureString or AzureKeyVaultSecretReference. - :type connection_string: object - :param pwd: The Azure key vault secret reference of password in connection - string. - :type pwd: ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, - 'pwd': {'key': 'typeProperties.pwd', 'type': 'AzureKeyVaultSecretReference'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(NetezzaLinkedService, self).__init__(**kwargs) - self.connection_string = kwargs.get('connection_string', None) - self.pwd = kwargs.get('pwd', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'Netezza' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/netezza_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/netezza_linked_service_py3.py deleted file mode 100644 index 6c3b607d60dc..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/netezza_linked_service_py3.py +++ /dev/null @@ -1,69 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class NetezzaLinkedService(LinkedService): - """Netezza linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param connection_string: An ODBC connection string. Type: string, - SecureString or AzureKeyVaultSecretReference. - :type connection_string: object - :param pwd: The Azure key vault secret reference of password in connection - string. - :type pwd: ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, - 'pwd': {'key': 'typeProperties.pwd', 'type': 'AzureKeyVaultSecretReference'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, connection_string=None, pwd=None, encrypted_credential=None, **kwargs) -> None: - super(NetezzaLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.connection_string = connection_string - self.pwd = pwd - self.encrypted_credential = encrypted_credential - self.type = 'Netezza' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/netezza_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/netezza_source.py deleted file mode 100644 index 0c08b1440614..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/netezza_source.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class NetezzaSource(CopySource): - """A copy activity Netezza source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(NetezzaSource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.type = 'NetezzaSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/netezza_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/netezza_source_py3.py deleted file mode 100644 index 2b4c38f708ee..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/netezza_source_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class NetezzaSource(CopySource): - """A copy activity Netezza source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query=None, **kwargs) -> None: - super(NetezzaSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.type = 'NetezzaSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/netezza_table_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/netezza_table_dataset.py deleted file mode 100644 index cf3b9205846c..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/netezza_table_dataset.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class NetezzaTableDataset(Dataset): - """Netezza dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(NetezzaTableDataset, self).__init__(**kwargs) - self.table_name = kwargs.get('table_name', None) - self.type = 'NetezzaTable' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/netezza_table_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/netezza_table_dataset_py3.py deleted file mode 100644 index 39de0032e8c9..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/netezza_table_dataset_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class NetezzaTableDataset(Dataset): - """Netezza dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: - super(NetezzaTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.table_name = table_name - self.type = 'NetezzaTable' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/odata_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/odata_linked_service.py deleted file mode 100644 index 9a7edca9ddb1..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/odata_linked_service.py +++ /dev/null @@ -1,80 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class ODataLinkedService(LinkedService): - """Open Data Protocol (OData) linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param url: Required. The URL of the OData service endpoint. Type: string - (or Expression with resultType string). - :type url: object - :param authentication_type: Type of authentication used to connect to the - OData service. Possible values include: 'Basic', 'Anonymous' - :type authentication_type: str or - ~azure.mgmt.datafactory.models.ODataAuthenticationType - :param user_name: User name of the OData service. Type: string (or - Expression with resultType string). - :type user_name: object - :param password: Password of the OData service. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'url': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'url': {'key': 'typeProperties.url', 'type': 'object'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, - 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ODataLinkedService, self).__init__(**kwargs) - self.url = kwargs.get('url', None) - self.authentication_type = kwargs.get('authentication_type', None) - self.user_name = kwargs.get('user_name', None) - self.password = kwargs.get('password', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'OData' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/odata_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/odata_linked_service_py3.py deleted file mode 100644 index 688bb4e4ffda..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/odata_linked_service_py3.py +++ /dev/null @@ -1,80 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class ODataLinkedService(LinkedService): - """Open Data Protocol (OData) linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param url: Required. The URL of the OData service endpoint. Type: string - (or Expression with resultType string). - :type url: object - :param authentication_type: Type of authentication used to connect to the - OData service. Possible values include: 'Basic', 'Anonymous' - :type authentication_type: str or - ~azure.mgmt.datafactory.models.ODataAuthenticationType - :param user_name: User name of the OData service. Type: string (or - Expression with resultType string). - :type user_name: object - :param password: Password of the OData service. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'url': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'url': {'key': 'typeProperties.url', 'type': 'object'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, - 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, url, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, authentication_type=None, user_name=None, password=None, encrypted_credential=None, **kwargs) -> None: - super(ODataLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.url = url - self.authentication_type = authentication_type - self.user_name = user_name - self.password = password - self.encrypted_credential = encrypted_credential - self.type = 'OData' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/odata_resource_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/odata_resource_dataset.py deleted file mode 100644 index 658cf40c8d2b..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/odata_resource_dataset.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class ODataResourceDataset(Dataset): - """The Open Data Protocol (OData) resource dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param path: The OData resource path. Type: string (or Expression with - resultType string). - :type path: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'path': {'key': 'typeProperties.path', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ODataResourceDataset, self).__init__(**kwargs) - self.path = kwargs.get('path', None) - self.type = 'ODataResource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/odata_resource_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/odata_resource_dataset_py3.py deleted file mode 100644 index 5951a2cf6d80..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/odata_resource_dataset_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class ODataResourceDataset(Dataset): - """The Open Data Protocol (OData) resource dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param path: The OData resource path. Type: string (or Expression with - resultType string). - :type path: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'path': {'key': 'typeProperties.path', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, path=None, **kwargs) -> None: - super(ODataResourceDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.path = path - self.type = 'ODataResource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/odbc_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/odbc_linked_service.py deleted file mode 100644 index 43559b76e0e0..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/odbc_linked_service.py +++ /dev/null @@ -1,86 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class OdbcLinkedService(LinkedService): - """Open Database Connectivity (ODBC) linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param connection_string: Required. The non-access credential portion of - the connection string as well as an optional encrypted credential. Type: - string, SecureString or AzureKeyVaultSecretReference. - :type connection_string: object - :param authentication_type: Type of authentication used to connect to the - ODBC data store. Possible values are: Anonymous and Basic. Type: string - (or Expression with resultType string). - :type authentication_type: object - :param credential: The access credential portion of the connection string - specified in driver-specific property-value format. - :type credential: ~azure.mgmt.datafactory.models.SecretBase - :param user_name: User name for Basic authentication. Type: string (or - Expression with resultType string). - :type user_name: object - :param password: Password for Basic authentication. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'connection_string': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'object'}, - 'credential': {'key': 'typeProperties.credential', 'type': 'SecretBase'}, - 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(OdbcLinkedService, self).__init__(**kwargs) - self.connection_string = kwargs.get('connection_string', None) - self.authentication_type = kwargs.get('authentication_type', None) - self.credential = kwargs.get('credential', None) - self.user_name = kwargs.get('user_name', None) - self.password = kwargs.get('password', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'Odbc' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/odbc_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/odbc_linked_service_py3.py deleted file mode 100644 index e0147881f3d0..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/odbc_linked_service_py3.py +++ /dev/null @@ -1,86 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class OdbcLinkedService(LinkedService): - """Open Database Connectivity (ODBC) linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param connection_string: Required. The non-access credential portion of - the connection string as well as an optional encrypted credential. Type: - string, SecureString or AzureKeyVaultSecretReference. - :type connection_string: object - :param authentication_type: Type of authentication used to connect to the - ODBC data store. Possible values are: Anonymous and Basic. Type: string - (or Expression with resultType string). - :type authentication_type: object - :param credential: The access credential portion of the connection string - specified in driver-specific property-value format. - :type credential: ~azure.mgmt.datafactory.models.SecretBase - :param user_name: User name for Basic authentication. Type: string (or - Expression with resultType string). - :type user_name: object - :param password: Password for Basic authentication. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'connection_string': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'object'}, - 'credential': {'key': 'typeProperties.credential', 'type': 'SecretBase'}, - 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, connection_string, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, authentication_type=None, credential=None, user_name=None, password=None, encrypted_credential=None, **kwargs) -> None: - super(OdbcLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.connection_string = connection_string - self.authentication_type = authentication_type - self.credential = credential - self.user_name = user_name - self.password = password - self.encrypted_credential = encrypted_credential - self.type = 'Odbc' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/odbc_sink.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/odbc_sink.py deleted file mode 100644 index 4598952cb21b..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/odbc_sink.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_sink import CopySink - - -class OdbcSink(CopySink): - """A copy activity ODBC sink. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param write_batch_size: Write batch size. Type: integer (or Expression - with resultType integer), minimum: 0. - :type write_batch_size: object - :param write_batch_timeout: Write batch timeout. Type: string (or - Expression with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type write_batch_timeout: object - :param sink_retry_count: Sink retry count. Type: integer (or Expression - with resultType integer). - :type sink_retry_count: object - :param sink_retry_wait: Sink retry wait. Type: string (or Expression with - resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type sink_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param pre_copy_script: A query to execute before starting the copy. Type: - string (or Expression with resultType string). - :type pre_copy_script: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, - 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, - 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, - 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'pre_copy_script': {'key': 'preCopyScript', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(OdbcSink, self).__init__(**kwargs) - self.pre_copy_script = kwargs.get('pre_copy_script', None) - self.type = 'OdbcSink' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/odbc_sink_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/odbc_sink_py3.py deleted file mode 100644 index 430329bdf2b9..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/odbc_sink_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_sink_py3 import CopySink - - -class OdbcSink(CopySink): - """A copy activity ODBC sink. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param write_batch_size: Write batch size. Type: integer (or Expression - with resultType integer), minimum: 0. - :type write_batch_size: object - :param write_batch_timeout: Write batch timeout. Type: string (or - Expression with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type write_batch_timeout: object - :param sink_retry_count: Sink retry count. Type: integer (or Expression - with resultType integer). - :type sink_retry_count: object - :param sink_retry_wait: Sink retry wait. Type: string (or Expression with - resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type sink_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param pre_copy_script: A query to execute before starting the copy. Type: - string (or Expression with resultType string). - :type pre_copy_script: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, - 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, - 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, - 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'pre_copy_script': {'key': 'preCopyScript', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, pre_copy_script=None, **kwargs) -> None: - super(OdbcSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, **kwargs) - self.pre_copy_script = pre_copy_script - self.type = 'OdbcSink' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation.py deleted file mode 100644 index db8cde8db784..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """Azure Data Factory API operation definition. - - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param origin: The intended executor of the operation. - :type origin: str - :param display: Metadata associated with the operation. - :type display: ~azure.mgmt.datafactory.models.OperationDisplay - :param service_specification: Details about a service operation. - :type service_specification: - ~azure.mgmt.datafactory.models.OperationServiceSpecification - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'OperationServiceSpecification'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.origin = kwargs.get('origin', None) - self.display = kwargs.get('display', None) - self.service_specification = kwargs.get('service_specification', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_display.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_display.py deleted file mode 100644 index 1d96541c0581..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_display.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """Metadata associated with the operation. - - :param description: The description of the operation. - :type description: str - :param provider: The name of the provider. - :type provider: str - :param resource: The name of the resource type on which the operation is - performed. - :type resource: str - :param operation: The type of operation: get, read, delete, etc. - :type operation: str - """ - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.provider = kwargs.get('provider', None) - self.resource = kwargs.get('resource', None) - self.operation = kwargs.get('operation', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_display_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_display_py3.py deleted file mode 100644 index dfbb782627f4..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_display_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """Metadata associated with the operation. - - :param description: The description of the operation. - :type description: str - :param provider: The name of the provider. - :type provider: str - :param resource: The name of the resource type on which the operation is - performed. - :type resource: str - :param operation: The type of operation: get, read, delete, etc. - :type operation: str - """ - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - } - - def __init__(self, *, description: str=None, provider: str=None, resource: str=None, operation: str=None, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.description = description - self.provider = provider - self.resource = resource - self.operation = operation diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_log_specification.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_log_specification.py deleted file mode 100644 index 93bfaf4ed0de..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_log_specification.py +++ /dev/null @@ -1,37 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationLogSpecification(Model): - """Details about an operation related to logs. - - :param name: The name of the log category. - :type name: str - :param display_name: Localized display name. - :type display_name: str - :param blob_duration: Blobs created in the customer storage account, per - hour. - :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(OperationLogSpecification, 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) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_log_specification_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_log_specification_py3.py deleted file mode 100644 index 2cdd941fab7b..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_log_specification_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationLogSpecification(Model): - """Details about an operation related to logs. - - :param name: The name of the log category. - :type name: str - :param display_name: Localized display name. - :type display_name: str - :param blob_duration: Blobs created in the customer storage account, per - hour. - :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(OperationLogSpecification, self).__init__(**kwargs) - self.name = name - self.display_name = display_name - self.blob_duration = blob_duration diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_metric_availability.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_metric_availability.py deleted file mode 100644 index 974e0cbf4b0b..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_metric_availability.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationMetricAvailability(Model): - """Defines how often data for a metric becomes available. - - :param time_grain: The granularity for the metric. - :type time_grain: str - :param blob_duration: Blob created in the customer storage account, per - hour. - :type blob_duration: str - """ - - _attribute_map = { - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationMetricAvailability, self).__init__(**kwargs) - self.time_grain = kwargs.get('time_grain', None) - self.blob_duration = kwargs.get('blob_duration', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_metric_availability_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_metric_availability_py3.py deleted file mode 100644 index 312b83a23701..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_metric_availability_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationMetricAvailability(Model): - """Defines how often data for a metric becomes available. - - :param time_grain: The granularity for the metric. - :type time_grain: str - :param blob_duration: Blob created in the customer storage account, per - hour. - :type blob_duration: str - """ - - _attribute_map = { - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, - } - - def __init__(self, *, time_grain: str=None, blob_duration: str=None, **kwargs) -> None: - super(OperationMetricAvailability, self).__init__(**kwargs) - self.time_grain = time_grain - self.blob_duration = blob_duration diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_metric_dimension.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_metric_dimension.py deleted file mode 100644 index 24232e7b5470..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_metric_dimension.py +++ /dev/null @@ -1,37 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationMetricDimension(Model): - """Defines the metric dimension. - - :param name: The name of the dimension for the metric. - :type name: str - :param display_name: The display name of the metric dimension. - :type display_name: str - :param to_be_exported_for_shoebox: Whether the dimension should be - exported to Azure Monitor. - :type to_be_exported_for_shoebox: bool - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(OperationMetricDimension, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display_name = kwargs.get('display_name', None) - self.to_be_exported_for_shoebox = kwargs.get('to_be_exported_for_shoebox', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_metric_dimension_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_metric_dimension_py3.py deleted file mode 100644 index 1d8610b7fab8..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_metric_dimension_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationMetricDimension(Model): - """Defines the metric dimension. - - :param name: The name of the dimension for the metric. - :type name: str - :param display_name: The display name of the metric dimension. - :type display_name: str - :param to_be_exported_for_shoebox: Whether the dimension should be - exported to Azure Monitor. - :type to_be_exported_for_shoebox: bool - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, - } - - def __init__(self, *, name: str=None, display_name: str=None, to_be_exported_for_shoebox: bool=None, **kwargs) -> None: - super(OperationMetricDimension, self).__init__(**kwargs) - self.name = name - self.display_name = display_name - self.to_be_exported_for_shoebox = to_be_exported_for_shoebox diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_metric_specification.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_metric_specification.py deleted file mode 100644 index 77f533fdcebf..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_metric_specification.py +++ /dev/null @@ -1,68 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationMetricSpecification(Model): - """Details about an operation related to metrics. - - :param name: The name of the metric. - :type name: str - :param display_name: Localized display name of the metric. - :type display_name: str - :param display_description: The description of the metric. - :type display_description: str - :param unit: The unit that the metric is measured in. - :type unit: str - :param aggregation_type: The type of metric aggregation. - :type aggregation_type: str - :param enable_regional_mdm_account: Whether or not the service is using - regional MDM accounts. - :type enable_regional_mdm_account: str - :param source_mdm_account: The name of the MDM account. - :type source_mdm_account: str - :param source_mdm_namespace: The name of the MDM namespace. - :type source_mdm_namespace: str - :param availabilities: Defines how often data for metrics becomes - available. - :type availabilities: - list[~azure.mgmt.datafactory.models.OperationMetricAvailability] - :param dimensions: Defines the metric dimension. - :type dimensions: - list[~azure.mgmt.datafactory.models.OperationMetricDimension] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'display_description': {'key': 'displayDescription', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, - 'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'str'}, - 'source_mdm_account': {'key': 'sourceMdmAccount', 'type': 'str'}, - 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, - 'availabilities': {'key': 'availabilities', 'type': '[OperationMetricAvailability]'}, - 'dimensions': {'key': 'dimensions', 'type': '[OperationMetricDimension]'}, - } - - def __init__(self, **kwargs): - super(OperationMetricSpecification, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display_name = kwargs.get('display_name', None) - self.display_description = kwargs.get('display_description', None) - self.unit = kwargs.get('unit', None) - self.aggregation_type = kwargs.get('aggregation_type', None) - self.enable_regional_mdm_account = kwargs.get('enable_regional_mdm_account', None) - self.source_mdm_account = kwargs.get('source_mdm_account', None) - self.source_mdm_namespace = kwargs.get('source_mdm_namespace', None) - self.availabilities = kwargs.get('availabilities', None) - self.dimensions = kwargs.get('dimensions', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_metric_specification_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_metric_specification_py3.py deleted file mode 100644 index c1cc4ad39e72..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_metric_specification_py3.py +++ /dev/null @@ -1,68 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationMetricSpecification(Model): - """Details about an operation related to metrics. - - :param name: The name of the metric. - :type name: str - :param display_name: Localized display name of the metric. - :type display_name: str - :param display_description: The description of the metric. - :type display_description: str - :param unit: The unit that the metric is measured in. - :type unit: str - :param aggregation_type: The type of metric aggregation. - :type aggregation_type: str - :param enable_regional_mdm_account: Whether or not the service is using - regional MDM accounts. - :type enable_regional_mdm_account: str - :param source_mdm_account: The name of the MDM account. - :type source_mdm_account: str - :param source_mdm_namespace: The name of the MDM namespace. - :type source_mdm_namespace: str - :param availabilities: Defines how often data for metrics becomes - available. - :type availabilities: - list[~azure.mgmt.datafactory.models.OperationMetricAvailability] - :param dimensions: Defines the metric dimension. - :type dimensions: - list[~azure.mgmt.datafactory.models.OperationMetricDimension] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'display_description': {'key': 'displayDescription', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, - 'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'str'}, - 'source_mdm_account': {'key': 'sourceMdmAccount', 'type': 'str'}, - 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, - 'availabilities': {'key': 'availabilities', 'type': '[OperationMetricAvailability]'}, - 'dimensions': {'key': 'dimensions', 'type': '[OperationMetricDimension]'}, - } - - def __init__(self, *, name: str=None, display_name: str=None, display_description: str=None, unit: str=None, aggregation_type: str=None, enable_regional_mdm_account: str=None, source_mdm_account: str=None, source_mdm_namespace: str=None, availabilities=None, dimensions=None, **kwargs) -> None: - super(OperationMetricSpecification, self).__init__(**kwargs) - self.name = name - self.display_name = display_name - self.display_description = display_description - self.unit = unit - self.aggregation_type = aggregation_type - self.enable_regional_mdm_account = enable_regional_mdm_account - self.source_mdm_account = source_mdm_account - self.source_mdm_namespace = source_mdm_namespace - self.availabilities = availabilities - self.dimensions = dimensions diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_paged.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_paged.py deleted file mode 100644 index d6eea01bbdb9..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_py3.py deleted file mode 100644 index 23305038a090..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """Azure Data Factory API operation definition. - - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param origin: The intended executor of the operation. - :type origin: str - :param display: Metadata associated with the operation. - :type display: ~azure.mgmt.datafactory.models.OperationDisplay - :param service_specification: Details about a service operation. - :type service_specification: - ~azure.mgmt.datafactory.models.OperationServiceSpecification - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'OperationServiceSpecification'}, - } - - def __init__(self, *, name: str=None, origin: str=None, display=None, service_specification=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = name - self.origin = origin - self.display = display - self.service_specification = service_specification diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_service_specification.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_service_specification.py deleted file mode 100644 index 82622a44af5a..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_service_specification.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationServiceSpecification(Model): - """Details about a service operation. - - :param log_specifications: Details about operations related to logs. - :type log_specifications: - list[~azure.mgmt.datafactory.models.OperationLogSpecification] - :param metric_specifications: Details about operations related to metrics. - :type metric_specifications: - list[~azure.mgmt.datafactory.models.OperationMetricSpecification] - """ - - _attribute_map = { - 'log_specifications': {'key': 'logSpecifications', 'type': '[OperationLogSpecification]'}, - 'metric_specifications': {'key': 'metricSpecifications', 'type': '[OperationMetricSpecification]'}, - } - - def __init__(self, **kwargs): - super(OperationServiceSpecification, self).__init__(**kwargs) - self.log_specifications = kwargs.get('log_specifications', None) - self.metric_specifications = kwargs.get('metric_specifications', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_service_specification_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_service_specification_py3.py deleted file mode 100644 index 4215dac6eb7f..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/operation_service_specification_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationServiceSpecification(Model): - """Details about a service operation. - - :param log_specifications: Details about operations related to logs. - :type log_specifications: - list[~azure.mgmt.datafactory.models.OperationLogSpecification] - :param metric_specifications: Details about operations related to metrics. - :type metric_specifications: - list[~azure.mgmt.datafactory.models.OperationMetricSpecification] - """ - - _attribute_map = { - 'log_specifications': {'key': 'logSpecifications', 'type': '[OperationLogSpecification]'}, - 'metric_specifications': {'key': 'metricSpecifications', 'type': '[OperationMetricSpecification]'}, - } - - def __init__(self, *, log_specifications=None, metric_specifications=None, **kwargs) -> None: - super(OperationServiceSpecification, self).__init__(**kwargs) - self.log_specifications = log_specifications - self.metric_specifications = metric_specifications diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/oracle_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/oracle_linked_service.py deleted file mode 100644 index 5485151adb1f..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/oracle_linked_service.py +++ /dev/null @@ -1,71 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class OracleLinkedService(LinkedService): - """Oracle database. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param connection_string: Required. The connection string. Type: string, - SecureString or AzureKeyVaultSecretReference. - :type connection_string: object - :param password: The Azure key vault secret reference of password in - connection string. - :type password: - ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'connection_string': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'AzureKeyVaultSecretReference'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(OracleLinkedService, self).__init__(**kwargs) - self.connection_string = kwargs.get('connection_string', None) - self.password = kwargs.get('password', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'Oracle' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/oracle_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/oracle_linked_service_py3.py deleted file mode 100644 index 80b0ed1176ff..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/oracle_linked_service_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class OracleLinkedService(LinkedService): - """Oracle database. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param connection_string: Required. The connection string. Type: string, - SecureString or AzureKeyVaultSecretReference. - :type connection_string: object - :param password: The Azure key vault secret reference of password in - connection string. - :type password: - ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'connection_string': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'AzureKeyVaultSecretReference'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, connection_string, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, password=None, encrypted_credential=None, **kwargs) -> None: - super(OracleLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.connection_string = connection_string - self.password = password - self.encrypted_credential = encrypted_credential - self.type = 'Oracle' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/oracle_sink.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/oracle_sink.py deleted file mode 100644 index fa0e11f57553..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/oracle_sink.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_sink import CopySink - - -class OracleSink(CopySink): - """A copy activity Oracle sink. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param write_batch_size: Write batch size. Type: integer (or Expression - with resultType integer), minimum: 0. - :type write_batch_size: object - :param write_batch_timeout: Write batch timeout. Type: string (or - Expression with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type write_batch_timeout: object - :param sink_retry_count: Sink retry count. Type: integer (or Expression - with resultType integer). - :type sink_retry_count: object - :param sink_retry_wait: Sink retry wait. Type: string (or Expression with - resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type sink_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param pre_copy_script: SQL pre-copy script. Type: string (or Expression - with resultType string). - :type pre_copy_script: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, - 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, - 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, - 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'pre_copy_script': {'key': 'preCopyScript', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(OracleSink, self).__init__(**kwargs) - self.pre_copy_script = kwargs.get('pre_copy_script', None) - self.type = 'OracleSink' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/oracle_sink_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/oracle_sink_py3.py deleted file mode 100644 index a6b666d31ed7..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/oracle_sink_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_sink_py3 import CopySink - - -class OracleSink(CopySink): - """A copy activity Oracle sink. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param write_batch_size: Write batch size. Type: integer (or Expression - with resultType integer), minimum: 0. - :type write_batch_size: object - :param write_batch_timeout: Write batch timeout. Type: string (or - Expression with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type write_batch_timeout: object - :param sink_retry_count: Sink retry count. Type: integer (or Expression - with resultType integer). - :type sink_retry_count: object - :param sink_retry_wait: Sink retry wait. Type: string (or Expression with - resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type sink_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param pre_copy_script: SQL pre-copy script. Type: string (or Expression - with resultType string). - :type pre_copy_script: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, - 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, - 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, - 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'pre_copy_script': {'key': 'preCopyScript', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, pre_copy_script=None, **kwargs) -> None: - super(OracleSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, **kwargs) - self.pre_copy_script = pre_copy_script - self.type = 'OracleSink' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/oracle_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/oracle_source.py deleted file mode 100644 index 3f74cf83ee7a..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/oracle_source.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class OracleSource(CopySource): - """A copy activity Oracle source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param oracle_reader_query: Oracle reader query. Type: string (or - Expression with resultType string). - :type oracle_reader_query: object - :param query_timeout: Query timeout. Type: string (or Expression with - resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type query_timeout: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'oracle_reader_query': {'key': 'oracleReaderQuery', 'type': 'object'}, - 'query_timeout': {'key': 'queryTimeout', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(OracleSource, self).__init__(**kwargs) - self.oracle_reader_query = kwargs.get('oracle_reader_query', None) - self.query_timeout = kwargs.get('query_timeout', None) - self.type = 'OracleSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/oracle_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/oracle_source_py3.py deleted file mode 100644 index 89252615e6e5..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/oracle_source_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class OracleSource(CopySource): - """A copy activity Oracle source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param oracle_reader_query: Oracle reader query. Type: string (or - Expression with resultType string). - :type oracle_reader_query: object - :param query_timeout: Query timeout. Type: string (or Expression with - resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type query_timeout: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'oracle_reader_query': {'key': 'oracleReaderQuery', 'type': 'object'}, - 'query_timeout': {'key': 'queryTimeout', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, oracle_reader_query=None, query_timeout=None, **kwargs) -> None: - super(OracleSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.oracle_reader_query = oracle_reader_query - self.query_timeout = query_timeout - self.type = 'OracleSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/oracle_table_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/oracle_table_dataset.py deleted file mode 100644 index 4af8faaca8db..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/oracle_table_dataset.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class OracleTableDataset(Dataset): - """The on-premises Oracle database dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: Required. The table name of the on-premises Oracle - database. Type: string (or Expression with resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - 'table_name': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(OracleTableDataset, self).__init__(**kwargs) - self.table_name = kwargs.get('table_name', None) - self.type = 'OracleTable' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/oracle_table_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/oracle_table_dataset_py3.py deleted file mode 100644 index aaa1291c8f76..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/oracle_table_dataset_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class OracleTableDataset(Dataset): - """The on-premises Oracle database dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: Required. The table name of the on-premises Oracle - database. Type: string (or Expression with resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - 'table_name': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, table_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, **kwargs) -> None: - super(OracleTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.table_name = table_name - self.type = 'OracleTable' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/orc_format.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/orc_format.py deleted file mode 100644 index 8f0a0322062c..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/orc_format.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_storage_format import DatasetStorageFormat - - -class OrcFormat(DatasetStorageFormat): - """The data stored in Optimized Row Columnar (ORC) format. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param serializer: Serializer. Type: string (or Expression with resultType - string). - :type serializer: object - :param deserializer: Deserializer. Type: string (or Expression with - resultType string). - :type deserializer: object - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'serializer': {'key': 'serializer', 'type': 'object'}, - 'deserializer': {'key': 'deserializer', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OrcFormat, self).__init__(**kwargs) - self.type = 'OrcFormat' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/orc_format_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/orc_format_py3.py deleted file mode 100644 index 40a0e389ccc3..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/orc_format_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_storage_format_py3 import DatasetStorageFormat - - -class OrcFormat(DatasetStorageFormat): - """The data stored in Optimized Row Columnar (ORC) format. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param serializer: Serializer. Type: string (or Expression with resultType - string). - :type serializer: object - :param deserializer: Deserializer. Type: string (or Expression with - resultType string). - :type deserializer: object - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'serializer': {'key': 'serializer', 'type': 'object'}, - 'deserializer': {'key': 'deserializer', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, serializer=None, deserializer=None, **kwargs) -> None: - super(OrcFormat, self).__init__(additional_properties=additional_properties, serializer=serializer, deserializer=deserializer, **kwargs) - self.type = 'OrcFormat' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/parameter_specification.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/parameter_specification.py deleted file mode 100644 index aef855d955f0..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/parameter_specification.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ParameterSpecification(Model): - """Definition of a single parameter for an entity. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Parameter type. Possible values include: 'Object', - 'String', 'Int', 'Float', 'Bool', 'Array', 'SecureString' - :type type: str or ~azure.mgmt.datafactory.models.ParameterType - :param default_value: Default value of parameter. - :type default_value: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'default_value': {'key': 'defaultValue', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ParameterSpecification, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.default_value = kwargs.get('default_value', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/parameter_specification_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/parameter_specification_py3.py deleted file mode 100644 index d5b6f981d365..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/parameter_specification_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ParameterSpecification(Model): - """Definition of a single parameter for an entity. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Parameter type. Possible values include: 'Object', - 'String', 'Int', 'Float', 'Bool', 'Array', 'SecureString' - :type type: str or ~azure.mgmt.datafactory.models.ParameterType - :param default_value: Default value of parameter. - :type default_value: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'default_value': {'key': 'defaultValue', 'type': 'object'}, - } - - def __init__(self, *, type, default_value=None, **kwargs) -> None: - super(ParameterSpecification, self).__init__(**kwargs) - self.type = type - self.default_value = default_value diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/parquet_format.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/parquet_format.py deleted file mode 100644 index d742ff24b522..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/parquet_format.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_storage_format import DatasetStorageFormat - - -class ParquetFormat(DatasetStorageFormat): - """The data stored in Parquet format. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param serializer: Serializer. Type: string (or Expression with resultType - string). - :type serializer: object - :param deserializer: Deserializer. Type: string (or Expression with - resultType string). - :type deserializer: object - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'serializer': {'key': 'serializer', 'type': 'object'}, - 'deserializer': {'key': 'deserializer', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ParquetFormat, self).__init__(**kwargs) - self.type = 'ParquetFormat' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/parquet_format_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/parquet_format_py3.py deleted file mode 100644 index 36a6f5c88c4d..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/parquet_format_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_storage_format_py3 import DatasetStorageFormat - - -class ParquetFormat(DatasetStorageFormat): - """The data stored in Parquet format. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param serializer: Serializer. Type: string (or Expression with resultType - string). - :type serializer: object - :param deserializer: Deserializer. Type: string (or Expression with - resultType string). - :type deserializer: object - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'serializer': {'key': 'serializer', 'type': 'object'}, - 'deserializer': {'key': 'deserializer', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, serializer=None, deserializer=None, **kwargs) -> None: - super(ParquetFormat, self).__init__(additional_properties=additional_properties, serializer=serializer, deserializer=deserializer, **kwargs) - self.type = 'ParquetFormat' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/paypal_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/paypal_linked_service.py deleted file mode 100644 index 190fc45985d3..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/paypal_linked_service.py +++ /dev/null @@ -1,92 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class PaypalLinkedService(LinkedService): - """Paypal Service linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param host: Required. The URL of the PayPal instance. (i.e. - api.sandbox.paypal.com) - :type host: object - :param client_id: Required. The client ID associated with your PayPal - application. - :type client_id: object - :param client_secret: The client secret associated with your PayPal - application. - :type client_secret: ~azure.mgmt.datafactory.models.SecretBase - :param use_encrypted_endpoints: Specifies whether the data source - endpoints are encrypted using HTTPS. The default value is true. - :type use_encrypted_endpoints: object - :param use_host_verification: Specifies whether to require the host name - in the server's certificate to match the host name of the server when - connecting over SSL. The default value is true. - :type use_host_verification: object - :param use_peer_verification: Specifies whether to verify the identity of - the server when connecting over SSL. The default value is true. - :type use_peer_verification: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'host': {'required': True}, - 'client_id': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'host': {'key': 'typeProperties.host', 'type': 'object'}, - 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, - 'client_secret': {'key': 'typeProperties.clientSecret', 'type': 'SecretBase'}, - 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, - 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, - 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(PaypalLinkedService, self).__init__(**kwargs) - self.host = kwargs.get('host', None) - self.client_id = kwargs.get('client_id', None) - self.client_secret = kwargs.get('client_secret', None) - self.use_encrypted_endpoints = kwargs.get('use_encrypted_endpoints', None) - self.use_host_verification = kwargs.get('use_host_verification', None) - self.use_peer_verification = kwargs.get('use_peer_verification', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'Paypal' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/paypal_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/paypal_linked_service_py3.py deleted file mode 100644 index 832b0dff257b..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/paypal_linked_service_py3.py +++ /dev/null @@ -1,92 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class PaypalLinkedService(LinkedService): - """Paypal Service linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param host: Required. The URL of the PayPal instance. (i.e. - api.sandbox.paypal.com) - :type host: object - :param client_id: Required. The client ID associated with your PayPal - application. - :type client_id: object - :param client_secret: The client secret associated with your PayPal - application. - :type client_secret: ~azure.mgmt.datafactory.models.SecretBase - :param use_encrypted_endpoints: Specifies whether the data source - endpoints are encrypted using HTTPS. The default value is true. - :type use_encrypted_endpoints: object - :param use_host_verification: Specifies whether to require the host name - in the server's certificate to match the host name of the server when - connecting over SSL. The default value is true. - :type use_host_verification: object - :param use_peer_verification: Specifies whether to verify the identity of - the server when connecting over SSL. The default value is true. - :type use_peer_verification: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'host': {'required': True}, - 'client_id': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'host': {'key': 'typeProperties.host', 'type': 'object'}, - 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, - 'client_secret': {'key': 'typeProperties.clientSecret', 'type': 'SecretBase'}, - 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, - 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, - 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, host, client_id, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, client_secret=None, use_encrypted_endpoints=None, use_host_verification=None, use_peer_verification=None, encrypted_credential=None, **kwargs) -> None: - super(PaypalLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.host = host - self.client_id = client_id - self.client_secret = client_secret - self.use_encrypted_endpoints = use_encrypted_endpoints - self.use_host_verification = use_host_verification - self.use_peer_verification = use_peer_verification - self.encrypted_credential = encrypted_credential - self.type = 'Paypal' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/paypal_object_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/paypal_object_dataset.py deleted file mode 100644 index d0fdc678841b..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/paypal_object_dataset.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class PaypalObjectDataset(Dataset): - """Paypal Service dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(PaypalObjectDataset, self).__init__(**kwargs) - self.table_name = kwargs.get('table_name', None) - self.type = 'PaypalObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/paypal_object_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/paypal_object_dataset_py3.py deleted file mode 100644 index 55df7c97166d..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/paypal_object_dataset_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class PaypalObjectDataset(Dataset): - """Paypal Service dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: - super(PaypalObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.table_name = table_name - self.type = 'PaypalObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/paypal_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/paypal_source.py deleted file mode 100644 index 5bb73029d10c..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/paypal_source.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class PaypalSource(CopySource): - """A copy activity Paypal Service source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(PaypalSource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.type = 'PaypalSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/paypal_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/paypal_source_py3.py deleted file mode 100644 index 6a9dcce16a2d..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/paypal_source_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class PaypalSource(CopySource): - """A copy activity Paypal Service source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query=None, **kwargs) -> None: - super(PaypalSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.type = 'PaypalSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/phoenix_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/phoenix_linked_service.py deleted file mode 100644 index b9d16bc32c56..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/phoenix_linked_service.py +++ /dev/null @@ -1,121 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class PhoenixLinkedService(LinkedService): - """Phoenix server linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param host: Required. The IP address or host name of the Phoenix server. - (i.e. 192.168.222.160) - :type host: object - :param port: The TCP port that the Phoenix server uses to listen for - client connections. The default value is 8765. - :type port: object - :param http_path: The partial URL corresponding to the Phoenix server. - (i.e. /gateway/sandbox/phoenix/version). The default value is hbasephoenix - if using WindowsAzureHDInsightService. - :type http_path: object - :param authentication_type: Required. The authentication mechanism used to - connect to the Phoenix server. Possible values include: 'Anonymous', - 'UsernameAndPassword', 'WindowsAzureHDInsightService' - :type authentication_type: str or - ~azure.mgmt.datafactory.models.PhoenixAuthenticationType - :param username: The user name used to connect to the Phoenix server. - :type username: object - :param password: The password corresponding to the user name. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param enable_ssl: Specifies whether the connections to the server are - encrypted using SSL. The default value is false. - :type enable_ssl: object - :param trusted_cert_path: The full path of the .pem file containing - trusted CA certificates for verifying the server when connecting over SSL. - This property can only be set when using SSL on self-hosted IR. The - default value is the cacerts.pem file installed with the IR. - :type trusted_cert_path: object - :param use_system_trust_store: Specifies whether to use a CA certificate - from the system trust store or from a specified PEM file. The default - value is false. - :type use_system_trust_store: object - :param allow_host_name_cn_mismatch: Specifies whether to require a - CA-issued SSL certificate name to match the host name of the server when - connecting over SSL. The default value is false. - :type allow_host_name_cn_mismatch: object - :param allow_self_signed_server_cert: Specifies whether to allow - self-signed certificates from the server. The default value is false. - :type allow_self_signed_server_cert: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'host': {'required': True}, - 'authentication_type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'host': {'key': 'typeProperties.host', 'type': 'object'}, - 'port': {'key': 'typeProperties.port', 'type': 'object'}, - 'http_path': {'key': 'typeProperties.httpPath', 'type': 'object'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, - 'username': {'key': 'typeProperties.username', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'enable_ssl': {'key': 'typeProperties.enableSsl', 'type': 'object'}, - 'trusted_cert_path': {'key': 'typeProperties.trustedCertPath', 'type': 'object'}, - 'use_system_trust_store': {'key': 'typeProperties.useSystemTrustStore', 'type': 'object'}, - 'allow_host_name_cn_mismatch': {'key': 'typeProperties.allowHostNameCNMismatch', 'type': 'object'}, - 'allow_self_signed_server_cert': {'key': 'typeProperties.allowSelfSignedServerCert', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(PhoenixLinkedService, self).__init__(**kwargs) - self.host = kwargs.get('host', None) - self.port = kwargs.get('port', None) - self.http_path = kwargs.get('http_path', None) - self.authentication_type = kwargs.get('authentication_type', None) - self.username = kwargs.get('username', None) - self.password = kwargs.get('password', None) - self.enable_ssl = kwargs.get('enable_ssl', None) - self.trusted_cert_path = kwargs.get('trusted_cert_path', None) - self.use_system_trust_store = kwargs.get('use_system_trust_store', None) - self.allow_host_name_cn_mismatch = kwargs.get('allow_host_name_cn_mismatch', None) - self.allow_self_signed_server_cert = kwargs.get('allow_self_signed_server_cert', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'Phoenix' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/phoenix_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/phoenix_linked_service_py3.py deleted file mode 100644 index aeb89e4fdd4a..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/phoenix_linked_service_py3.py +++ /dev/null @@ -1,121 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class PhoenixLinkedService(LinkedService): - """Phoenix server linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param host: Required. The IP address or host name of the Phoenix server. - (i.e. 192.168.222.160) - :type host: object - :param port: The TCP port that the Phoenix server uses to listen for - client connections. The default value is 8765. - :type port: object - :param http_path: The partial URL corresponding to the Phoenix server. - (i.e. /gateway/sandbox/phoenix/version). The default value is hbasephoenix - if using WindowsAzureHDInsightService. - :type http_path: object - :param authentication_type: Required. The authentication mechanism used to - connect to the Phoenix server. Possible values include: 'Anonymous', - 'UsernameAndPassword', 'WindowsAzureHDInsightService' - :type authentication_type: str or - ~azure.mgmt.datafactory.models.PhoenixAuthenticationType - :param username: The user name used to connect to the Phoenix server. - :type username: object - :param password: The password corresponding to the user name. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param enable_ssl: Specifies whether the connections to the server are - encrypted using SSL. The default value is false. - :type enable_ssl: object - :param trusted_cert_path: The full path of the .pem file containing - trusted CA certificates for verifying the server when connecting over SSL. - This property can only be set when using SSL on self-hosted IR. The - default value is the cacerts.pem file installed with the IR. - :type trusted_cert_path: object - :param use_system_trust_store: Specifies whether to use a CA certificate - from the system trust store or from a specified PEM file. The default - value is false. - :type use_system_trust_store: object - :param allow_host_name_cn_mismatch: Specifies whether to require a - CA-issued SSL certificate name to match the host name of the server when - connecting over SSL. The default value is false. - :type allow_host_name_cn_mismatch: object - :param allow_self_signed_server_cert: Specifies whether to allow - self-signed certificates from the server. The default value is false. - :type allow_self_signed_server_cert: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'host': {'required': True}, - 'authentication_type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'host': {'key': 'typeProperties.host', 'type': 'object'}, - 'port': {'key': 'typeProperties.port', 'type': 'object'}, - 'http_path': {'key': 'typeProperties.httpPath', 'type': 'object'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, - 'username': {'key': 'typeProperties.username', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'enable_ssl': {'key': 'typeProperties.enableSsl', 'type': 'object'}, - 'trusted_cert_path': {'key': 'typeProperties.trustedCertPath', 'type': 'object'}, - 'use_system_trust_store': {'key': 'typeProperties.useSystemTrustStore', 'type': 'object'}, - 'allow_host_name_cn_mismatch': {'key': 'typeProperties.allowHostNameCNMismatch', 'type': 'object'}, - 'allow_self_signed_server_cert': {'key': 'typeProperties.allowSelfSignedServerCert', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, host, authentication_type, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, port=None, http_path=None, username=None, password=None, enable_ssl=None, trusted_cert_path=None, use_system_trust_store=None, allow_host_name_cn_mismatch=None, allow_self_signed_server_cert=None, encrypted_credential=None, **kwargs) -> None: - super(PhoenixLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.host = host - self.port = port - self.http_path = http_path - self.authentication_type = authentication_type - self.username = username - self.password = password - self.enable_ssl = enable_ssl - self.trusted_cert_path = trusted_cert_path - self.use_system_trust_store = use_system_trust_store - self.allow_host_name_cn_mismatch = allow_host_name_cn_mismatch - self.allow_self_signed_server_cert = allow_self_signed_server_cert - self.encrypted_credential = encrypted_credential - self.type = 'Phoenix' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/phoenix_object_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/phoenix_object_dataset.py deleted file mode 100644 index 2d9cd5dcd581..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/phoenix_object_dataset.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class PhoenixObjectDataset(Dataset): - """Phoenix server dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(PhoenixObjectDataset, self).__init__(**kwargs) - self.table_name = kwargs.get('table_name', None) - self.type = 'PhoenixObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/phoenix_object_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/phoenix_object_dataset_py3.py deleted file mode 100644 index 32c6e5f9836f..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/phoenix_object_dataset_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class PhoenixObjectDataset(Dataset): - """Phoenix server dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: - super(PhoenixObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.table_name = table_name - self.type = 'PhoenixObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/phoenix_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/phoenix_source.py deleted file mode 100644 index daad6ec41c31..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/phoenix_source.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class PhoenixSource(CopySource): - """A copy activity Phoenix server source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(PhoenixSource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.type = 'PhoenixSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/phoenix_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/phoenix_source_py3.py deleted file mode 100644 index 619e7220dd09..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/phoenix_source_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class PhoenixSource(CopySource): - """A copy activity Phoenix server source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query=None, **kwargs) -> None: - super(PhoenixSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.type = 'PhoenixSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_folder.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_folder.py deleted file mode 100644 index bebc05cb1824..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_folder.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PipelineFolder(Model): - """The folder that this Pipeline is in. If not specified, Pipeline will appear - at the root level. - - :param name: The name of the folder that this Pipeline is in. - :type name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PipelineFolder, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_folder_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_folder_py3.py deleted file mode 100644 index 02c9b8dbbff1..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_folder_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PipelineFolder(Model): - """The folder that this Pipeline is in. If not specified, Pipeline will appear - at the root level. - - :param name: The name of the folder that this Pipeline is in. - :type name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, **kwargs) -> None: - super(PipelineFolder, self).__init__(**kwargs) - self.name = name diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_reference.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_reference.py deleted file mode 100644 index aa8b23e62932..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_reference.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PipelineReference(Model): - """Pipeline reference type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. Pipeline reference type. Default value: - "PipelineReference" . - :vartype type: str - :param reference_name: Required. Reference pipeline name. - :type reference_name: str - :param name: Reference name. - :type name: str - """ - - _validation = { - 'type': {'required': True, 'constant': True}, - 'reference_name': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'reference_name': {'key': 'referenceName', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - type = "PipelineReference" - - def __init__(self, **kwargs): - super(PipelineReference, self).__init__(**kwargs) - self.reference_name = kwargs.get('reference_name', None) - self.name = kwargs.get('name', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_reference_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_reference_py3.py deleted file mode 100644 index ce63f06092d1..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_reference_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PipelineReference(Model): - """Pipeline reference type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. Pipeline reference type. Default value: - "PipelineReference" . - :vartype type: str - :param reference_name: Required. Reference pipeline name. - :type reference_name: str - :param name: Reference name. - :type name: str - """ - - _validation = { - 'type': {'required': True, 'constant': True}, - 'reference_name': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'reference_name': {'key': 'referenceName', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - type = "PipelineReference" - - def __init__(self, *, reference_name: str, name: str=None, **kwargs) -> None: - super(PipelineReference, self).__init__(**kwargs) - self.reference_name = reference_name - self.name = name diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_resource.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_resource.py deleted file mode 100644 index a39deaccc87b..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_resource.py +++ /dev/null @@ -1,84 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class PipelineResource(SubResource): - """Pipeline resource type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :ivar etag: Etag identifies change in the resource. - :vartype etag: str - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: The description of the pipeline. - :type description: str - :param activities: List of activities in pipeline. - :type activities: list[~azure.mgmt.datafactory.models.Activity] - :param parameters: List of parameters for pipeline. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param variables: List of variables for pipeline. - :type variables: dict[str, - ~azure.mgmt.datafactory.models.VariableSpecification] - :param concurrency: The max number of concurrent runs for the pipeline. - :type concurrency: int - :param annotations: List of tags that can be used for describing the - Pipeline. - :type annotations: list[object] - :param folder: The folder that this Pipeline is in. If not specified, - Pipeline will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.PipelineFolder - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'concurrency': {'minimum': 1}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'activities': {'key': 'properties.activities', 'type': '[Activity]'}, - 'parameters': {'key': 'properties.parameters', 'type': '{ParameterSpecification}'}, - 'variables': {'key': 'properties.variables', 'type': '{VariableSpecification}'}, - 'concurrency': {'key': 'properties.concurrency', 'type': 'int'}, - 'annotations': {'key': 'properties.annotations', 'type': '[object]'}, - 'folder': {'key': 'properties.folder', 'type': 'PipelineFolder'}, - } - - def __init__(self, **kwargs): - super(PipelineResource, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.description = kwargs.get('description', None) - self.activities = kwargs.get('activities', None) - self.parameters = kwargs.get('parameters', None) - self.variables = kwargs.get('variables', None) - self.concurrency = kwargs.get('concurrency', None) - self.annotations = kwargs.get('annotations', None) - self.folder = kwargs.get('folder', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_resource_paged.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_resource_paged.py deleted file mode 100644 index a7c7ed553c07..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_resource_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class PipelineResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`PipelineResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PipelineResource]'} - } - - def __init__(self, *args, **kwargs): - - super(PipelineResourcePaged, self).__init__(*args, **kwargs) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_resource_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_resource_py3.py deleted file mode 100644 index 8299cdb73887..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_resource_py3.py +++ /dev/null @@ -1,84 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class PipelineResource(SubResource): - """Pipeline resource type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :ivar etag: Etag identifies change in the resource. - :vartype etag: str - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: The description of the pipeline. - :type description: str - :param activities: List of activities in pipeline. - :type activities: list[~azure.mgmt.datafactory.models.Activity] - :param parameters: List of parameters for pipeline. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param variables: List of variables for pipeline. - :type variables: dict[str, - ~azure.mgmt.datafactory.models.VariableSpecification] - :param concurrency: The max number of concurrent runs for the pipeline. - :type concurrency: int - :param annotations: List of tags that can be used for describing the - Pipeline. - :type annotations: list[object] - :param folder: The folder that this Pipeline is in. If not specified, - Pipeline will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.PipelineFolder - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'concurrency': {'minimum': 1}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'activities': {'key': 'properties.activities', 'type': '[Activity]'}, - 'parameters': {'key': 'properties.parameters', 'type': '{ParameterSpecification}'}, - 'variables': {'key': 'properties.variables', 'type': '{VariableSpecification}'}, - 'concurrency': {'key': 'properties.concurrency', 'type': 'int'}, - 'annotations': {'key': 'properties.annotations', 'type': '[object]'}, - 'folder': {'key': 'properties.folder', 'type': 'PipelineFolder'}, - } - - def __init__(self, *, additional_properties=None, description: str=None, activities=None, parameters=None, variables=None, concurrency: int=None, annotations=None, folder=None, **kwargs) -> None: - super(PipelineResource, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.description = description - self.activities = activities - self.parameters = parameters - self.variables = variables - self.concurrency = concurrency - self.annotations = annotations - self.folder = folder diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_run.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_run.py deleted file mode 100644 index 3ae4beb48ff1..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_run.py +++ /dev/null @@ -1,87 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PipelineRun(Model): - """Information about a pipeline run. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar run_id: Identifier of a run. - :vartype run_id: str - :ivar pipeline_name: The pipeline name. - :vartype pipeline_name: str - :ivar parameters: The full or partial list of parameter name, value pair - used in the pipeline run. - :vartype parameters: dict[str, str] - :ivar invoked_by: Entity that started the pipeline run. - :vartype invoked_by: ~azure.mgmt.datafactory.models.PipelineRunInvokedBy - :ivar last_updated: The last updated timestamp for the pipeline run event - in ISO8601 format. - :vartype last_updated: datetime - :ivar run_start: The start time of a pipeline run in ISO8601 format. - :vartype run_start: datetime - :ivar run_end: The end time of a pipeline run in ISO8601 format. - :vartype run_end: datetime - :ivar duration_in_ms: The duration of a pipeline run. - :vartype duration_in_ms: int - :ivar status: The status of a pipeline run. - :vartype status: str - :ivar message: The message from a pipeline run. - :vartype message: str - """ - - _validation = { - 'run_id': {'readonly': True}, - 'pipeline_name': {'readonly': True}, - 'parameters': {'readonly': True}, - 'invoked_by': {'readonly': True}, - 'last_updated': {'readonly': True}, - 'run_start': {'readonly': True}, - 'run_end': {'readonly': True}, - 'duration_in_ms': {'readonly': True}, - 'status': {'readonly': True}, - 'message': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'run_id': {'key': 'runId', 'type': 'str'}, - 'pipeline_name': {'key': 'pipelineName', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{str}'}, - 'invoked_by': {'key': 'invokedBy', 'type': 'PipelineRunInvokedBy'}, - 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, - 'run_start': {'key': 'runStart', 'type': 'iso-8601'}, - 'run_end': {'key': 'runEnd', 'type': 'iso-8601'}, - 'duration_in_ms': {'key': 'durationInMs', 'type': 'int'}, - 'status': {'key': 'status', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PipelineRun, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.run_id = None - self.pipeline_name = None - self.parameters = None - self.invoked_by = None - self.last_updated = None - self.run_start = None - self.run_end = None - self.duration_in_ms = None - self.status = None - self.message = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_run_invoked_by.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_run_invoked_by.py deleted file mode 100644 index acefb80fd078..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_run_invoked_by.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PipelineRunInvokedBy(Model): - """Provides entity name and id that started the pipeline run. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Name of the entity that started the pipeline run. - :vartype name: str - :ivar id: The ID of the entity that started the run. - :vartype id: str - :ivar invoked_by_type: The type of the entity that started the run. - :vartype invoked_by_type: str - """ - - _validation = { - 'name': {'readonly': True}, - 'id': {'readonly': True}, - 'invoked_by_type': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'invoked_by_type': {'key': 'invokedByType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PipelineRunInvokedBy, self).__init__(**kwargs) - self.name = None - self.id = None - self.invoked_by_type = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_run_invoked_by_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_run_invoked_by_py3.py deleted file mode 100644 index c954a18b8a67..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_run_invoked_by_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PipelineRunInvokedBy(Model): - """Provides entity name and id that started the pipeline run. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Name of the entity that started the pipeline run. - :vartype name: str - :ivar id: The ID of the entity that started the run. - :vartype id: str - :ivar invoked_by_type: The type of the entity that started the run. - :vartype invoked_by_type: str - """ - - _validation = { - 'name': {'readonly': True}, - 'id': {'readonly': True}, - 'invoked_by_type': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'invoked_by_type': {'key': 'invokedByType', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(PipelineRunInvokedBy, self).__init__(**kwargs) - self.name = None - self.id = None - self.invoked_by_type = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_run_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_run_py3.py deleted file mode 100644 index aed5dd0466d2..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_run_py3.py +++ /dev/null @@ -1,87 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PipelineRun(Model): - """Information about a pipeline run. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar run_id: Identifier of a run. - :vartype run_id: str - :ivar pipeline_name: The pipeline name. - :vartype pipeline_name: str - :ivar parameters: The full or partial list of parameter name, value pair - used in the pipeline run. - :vartype parameters: dict[str, str] - :ivar invoked_by: Entity that started the pipeline run. - :vartype invoked_by: ~azure.mgmt.datafactory.models.PipelineRunInvokedBy - :ivar last_updated: The last updated timestamp for the pipeline run event - in ISO8601 format. - :vartype last_updated: datetime - :ivar run_start: The start time of a pipeline run in ISO8601 format. - :vartype run_start: datetime - :ivar run_end: The end time of a pipeline run in ISO8601 format. - :vartype run_end: datetime - :ivar duration_in_ms: The duration of a pipeline run. - :vartype duration_in_ms: int - :ivar status: The status of a pipeline run. - :vartype status: str - :ivar message: The message from a pipeline run. - :vartype message: str - """ - - _validation = { - 'run_id': {'readonly': True}, - 'pipeline_name': {'readonly': True}, - 'parameters': {'readonly': True}, - 'invoked_by': {'readonly': True}, - 'last_updated': {'readonly': True}, - 'run_start': {'readonly': True}, - 'run_end': {'readonly': True}, - 'duration_in_ms': {'readonly': True}, - 'status': {'readonly': True}, - 'message': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'run_id': {'key': 'runId', 'type': 'str'}, - 'pipeline_name': {'key': 'pipelineName', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{str}'}, - 'invoked_by': {'key': 'invokedBy', 'type': 'PipelineRunInvokedBy'}, - 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, - 'run_start': {'key': 'runStart', 'type': 'iso-8601'}, - 'run_end': {'key': 'runEnd', 'type': 'iso-8601'}, - 'duration_in_ms': {'key': 'durationInMs', 'type': 'int'}, - 'status': {'key': 'status', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, **kwargs) -> None: - super(PipelineRun, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.run_id = None - self.pipeline_name = None - self.parameters = None - self.invoked_by = None - self.last_updated = None - self.run_start = None - self.run_end = None - self.duration_in_ms = None - self.status = None - self.message = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_runs_query_response.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_runs_query_response.py deleted file mode 100644 index c4591c5467ba..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_runs_query_response.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PipelineRunsQueryResponse(Model): - """A list pipeline runs. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. List of pipeline runs. - :type value: list[~azure.mgmt.datafactory.models.PipelineRun] - :param continuation_token: The continuation token for getting the next - page of results, if any remaining results exist, null otherwise. - :type continuation_token: str - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PipelineRun]'}, - 'continuation_token': {'key': 'continuationToken', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PipelineRunsQueryResponse, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.continuation_token = kwargs.get('continuation_token', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_runs_query_response_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_runs_query_response_py3.py deleted file mode 100644 index fbc689ec1632..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_runs_query_response_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PipelineRunsQueryResponse(Model): - """A list pipeline runs. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. List of pipeline runs. - :type value: list[~azure.mgmt.datafactory.models.PipelineRun] - :param continuation_token: The continuation token for getting the next - page of results, if any remaining results exist, null otherwise. - :type continuation_token: str - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PipelineRun]'}, - 'continuation_token': {'key': 'continuationToken', 'type': 'str'}, - } - - def __init__(self, *, value, continuation_token: str=None, **kwargs) -> None: - super(PipelineRunsQueryResponse, self).__init__(**kwargs) - self.value = value - self.continuation_token = continuation_token diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/polybase_settings.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/polybase_settings.py deleted file mode 100644 index 5a261d8fea84..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/polybase_settings.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolybaseSettings(Model): - """PolyBase settings. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param reject_type: Reject type. Possible values include: 'value', - 'percentage' - :type reject_type: str or - ~azure.mgmt.datafactory.models.PolybaseSettingsRejectType - :param reject_value: Specifies the value or the percentage of rows that - can be rejected before the query fails. Type: number (or Expression with - resultType number), minimum: 0. - :type reject_value: object - :param reject_sample_value: Determines the number of rows to attempt to - retrieve before the PolyBase recalculates the percentage of rejected rows. - Type: integer (or Expression with resultType integer), minimum: 0. - :type reject_sample_value: object - :param use_type_default: Specifies how to handle missing values in - delimited text files when PolyBase retrieves data from the text file. - Type: boolean (or Expression with resultType boolean). - :type use_type_default: object - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'reject_type': {'key': 'rejectType', 'type': 'str'}, - 'reject_value': {'key': 'rejectValue', 'type': 'object'}, - 'reject_sample_value': {'key': 'rejectSampleValue', 'type': 'object'}, - 'use_type_default': {'key': 'useTypeDefault', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(PolybaseSettings, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.reject_type = kwargs.get('reject_type', None) - self.reject_value = kwargs.get('reject_value', None) - self.reject_sample_value = kwargs.get('reject_sample_value', None) - self.use_type_default = kwargs.get('use_type_default', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/polybase_settings_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/polybase_settings_py3.py deleted file mode 100644 index baae78b14c5f..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/polybase_settings_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PolybaseSettings(Model): - """PolyBase settings. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param reject_type: Reject type. Possible values include: 'value', - 'percentage' - :type reject_type: str or - ~azure.mgmt.datafactory.models.PolybaseSettingsRejectType - :param reject_value: Specifies the value or the percentage of rows that - can be rejected before the query fails. Type: number (or Expression with - resultType number), minimum: 0. - :type reject_value: object - :param reject_sample_value: Determines the number of rows to attempt to - retrieve before the PolyBase recalculates the percentage of rejected rows. - Type: integer (or Expression with resultType integer), minimum: 0. - :type reject_sample_value: object - :param use_type_default: Specifies how to handle missing values in - delimited text files when PolyBase retrieves data from the text file. - Type: boolean (or Expression with resultType boolean). - :type use_type_default: object - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'reject_type': {'key': 'rejectType', 'type': 'str'}, - 'reject_value': {'key': 'rejectValue', 'type': 'object'}, - 'reject_sample_value': {'key': 'rejectSampleValue', 'type': 'object'}, - 'use_type_default': {'key': 'useTypeDefault', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, reject_type=None, reject_value=None, reject_sample_value=None, use_type_default=None, **kwargs) -> None: - super(PolybaseSettings, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.reject_type = reject_type - self.reject_value = reject_value - self.reject_sample_value = reject_sample_value - self.use_type_default = use_type_default diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/postgre_sql_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/postgre_sql_linked_service.py deleted file mode 100644 index af16c6c89cd2..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/postgre_sql_linked_service.py +++ /dev/null @@ -1,70 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class PostgreSqlLinkedService(LinkedService): - """Linked service for PostgreSQL data source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param connection_string: Required. The connection string. - :type connection_string: ~azure.mgmt.datafactory.models.SecretBase - :param password: The Azure key vault secret reference of password in - connection string. - :type password: - ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'connection_string': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'SecretBase'}, - 'password': {'key': 'typeProperties.password', 'type': 'AzureKeyVaultSecretReference'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(PostgreSqlLinkedService, self).__init__(**kwargs) - self.connection_string = kwargs.get('connection_string', None) - self.password = kwargs.get('password', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'PostgreSql' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/postgre_sql_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/postgre_sql_linked_service_py3.py deleted file mode 100644 index 5e7e674a2447..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/postgre_sql_linked_service_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class PostgreSqlLinkedService(LinkedService): - """Linked service for PostgreSQL data source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param connection_string: Required. The connection string. - :type connection_string: ~azure.mgmt.datafactory.models.SecretBase - :param password: The Azure key vault secret reference of password in - connection string. - :type password: - ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'connection_string': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'SecretBase'}, - 'password': {'key': 'typeProperties.password', 'type': 'AzureKeyVaultSecretReference'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, connection_string, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, password=None, encrypted_credential=None, **kwargs) -> None: - super(PostgreSqlLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.connection_string = connection_string - self.password = password - self.encrypted_credential = encrypted_credential - self.type = 'PostgreSql' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/presto_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/presto_linked_service.py deleted file mode 100644 index abf4adde8515..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/presto_linked_service.py +++ /dev/null @@ -1,132 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class PrestoLinkedService(LinkedService): - """Presto server linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param host: Required. The IP address or host name of the Presto server. - (i.e. 192.168.222.160) - :type host: object - :param server_version: Required. The version of the Presto server. (i.e. - 0.148-t) - :type server_version: object - :param catalog: Required. The catalog context for all request against the - server. - :type catalog: object - :param port: The TCP port that the Presto server uses to listen for client - connections. The default value is 8080. - :type port: object - :param authentication_type: Required. The authentication mechanism used to - connect to the Presto server. Possible values include: 'Anonymous', 'LDAP' - :type authentication_type: str or - ~azure.mgmt.datafactory.models.PrestoAuthenticationType - :param username: The user name used to connect to the Presto server. - :type username: object - :param password: The password corresponding to the user name. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param enable_ssl: Specifies whether the connections to the server are - encrypted using SSL. The default value is false. - :type enable_ssl: object - :param trusted_cert_path: The full path of the .pem file containing - trusted CA certificates for verifying the server when connecting over SSL. - This property can only be set when using SSL on self-hosted IR. The - default value is the cacerts.pem file installed with the IR. - :type trusted_cert_path: object - :param use_system_trust_store: Specifies whether to use a CA certificate - from the system trust store or from a specified PEM file. The default - value is false. - :type use_system_trust_store: object - :param allow_host_name_cn_mismatch: Specifies whether to require a - CA-issued SSL certificate name to match the host name of the server when - connecting over SSL. The default value is false. - :type allow_host_name_cn_mismatch: object - :param allow_self_signed_server_cert: Specifies whether to allow - self-signed certificates from the server. The default value is false. - :type allow_self_signed_server_cert: object - :param time_zone_id: The local time zone used by the connection. Valid - values for this option are specified in the IANA Time Zone Database. The - default value is the system time zone. - :type time_zone_id: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'host': {'required': True}, - 'server_version': {'required': True}, - 'catalog': {'required': True}, - 'authentication_type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'host': {'key': 'typeProperties.host', 'type': 'object'}, - 'server_version': {'key': 'typeProperties.serverVersion', 'type': 'object'}, - 'catalog': {'key': 'typeProperties.catalog', 'type': 'object'}, - 'port': {'key': 'typeProperties.port', 'type': 'object'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, - 'username': {'key': 'typeProperties.username', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'enable_ssl': {'key': 'typeProperties.enableSsl', 'type': 'object'}, - 'trusted_cert_path': {'key': 'typeProperties.trustedCertPath', 'type': 'object'}, - 'use_system_trust_store': {'key': 'typeProperties.useSystemTrustStore', 'type': 'object'}, - 'allow_host_name_cn_mismatch': {'key': 'typeProperties.allowHostNameCNMismatch', 'type': 'object'}, - 'allow_self_signed_server_cert': {'key': 'typeProperties.allowSelfSignedServerCert', 'type': 'object'}, - 'time_zone_id': {'key': 'typeProperties.timeZoneID', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(PrestoLinkedService, self).__init__(**kwargs) - self.host = kwargs.get('host', None) - self.server_version = kwargs.get('server_version', None) - self.catalog = kwargs.get('catalog', None) - self.port = kwargs.get('port', None) - self.authentication_type = kwargs.get('authentication_type', None) - self.username = kwargs.get('username', None) - self.password = kwargs.get('password', None) - self.enable_ssl = kwargs.get('enable_ssl', None) - self.trusted_cert_path = kwargs.get('trusted_cert_path', None) - self.use_system_trust_store = kwargs.get('use_system_trust_store', None) - self.allow_host_name_cn_mismatch = kwargs.get('allow_host_name_cn_mismatch', None) - self.allow_self_signed_server_cert = kwargs.get('allow_self_signed_server_cert', None) - self.time_zone_id = kwargs.get('time_zone_id', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'Presto' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/presto_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/presto_linked_service_py3.py deleted file mode 100644 index fe178f62df4f..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/presto_linked_service_py3.py +++ /dev/null @@ -1,132 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class PrestoLinkedService(LinkedService): - """Presto server linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param host: Required. The IP address or host name of the Presto server. - (i.e. 192.168.222.160) - :type host: object - :param server_version: Required. The version of the Presto server. (i.e. - 0.148-t) - :type server_version: object - :param catalog: Required. The catalog context for all request against the - server. - :type catalog: object - :param port: The TCP port that the Presto server uses to listen for client - connections. The default value is 8080. - :type port: object - :param authentication_type: Required. The authentication mechanism used to - connect to the Presto server. Possible values include: 'Anonymous', 'LDAP' - :type authentication_type: str or - ~azure.mgmt.datafactory.models.PrestoAuthenticationType - :param username: The user name used to connect to the Presto server. - :type username: object - :param password: The password corresponding to the user name. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param enable_ssl: Specifies whether the connections to the server are - encrypted using SSL. The default value is false. - :type enable_ssl: object - :param trusted_cert_path: The full path of the .pem file containing - trusted CA certificates for verifying the server when connecting over SSL. - This property can only be set when using SSL on self-hosted IR. The - default value is the cacerts.pem file installed with the IR. - :type trusted_cert_path: object - :param use_system_trust_store: Specifies whether to use a CA certificate - from the system trust store or from a specified PEM file. The default - value is false. - :type use_system_trust_store: object - :param allow_host_name_cn_mismatch: Specifies whether to require a - CA-issued SSL certificate name to match the host name of the server when - connecting over SSL. The default value is false. - :type allow_host_name_cn_mismatch: object - :param allow_self_signed_server_cert: Specifies whether to allow - self-signed certificates from the server. The default value is false. - :type allow_self_signed_server_cert: object - :param time_zone_id: The local time zone used by the connection. Valid - values for this option are specified in the IANA Time Zone Database. The - default value is the system time zone. - :type time_zone_id: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'host': {'required': True}, - 'server_version': {'required': True}, - 'catalog': {'required': True}, - 'authentication_type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'host': {'key': 'typeProperties.host', 'type': 'object'}, - 'server_version': {'key': 'typeProperties.serverVersion', 'type': 'object'}, - 'catalog': {'key': 'typeProperties.catalog', 'type': 'object'}, - 'port': {'key': 'typeProperties.port', 'type': 'object'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, - 'username': {'key': 'typeProperties.username', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'enable_ssl': {'key': 'typeProperties.enableSsl', 'type': 'object'}, - 'trusted_cert_path': {'key': 'typeProperties.trustedCertPath', 'type': 'object'}, - 'use_system_trust_store': {'key': 'typeProperties.useSystemTrustStore', 'type': 'object'}, - 'allow_host_name_cn_mismatch': {'key': 'typeProperties.allowHostNameCNMismatch', 'type': 'object'}, - 'allow_self_signed_server_cert': {'key': 'typeProperties.allowSelfSignedServerCert', 'type': 'object'}, - 'time_zone_id': {'key': 'typeProperties.timeZoneID', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, host, server_version, catalog, authentication_type, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, port=None, username=None, password=None, enable_ssl=None, trusted_cert_path=None, use_system_trust_store=None, allow_host_name_cn_mismatch=None, allow_self_signed_server_cert=None, time_zone_id=None, encrypted_credential=None, **kwargs) -> None: - super(PrestoLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.host = host - self.server_version = server_version - self.catalog = catalog - self.port = port - self.authentication_type = authentication_type - self.username = username - self.password = password - self.enable_ssl = enable_ssl - self.trusted_cert_path = trusted_cert_path - self.use_system_trust_store = use_system_trust_store - self.allow_host_name_cn_mismatch = allow_host_name_cn_mismatch - self.allow_self_signed_server_cert = allow_self_signed_server_cert - self.time_zone_id = time_zone_id - self.encrypted_credential = encrypted_credential - self.type = 'Presto' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/presto_object_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/presto_object_dataset.py deleted file mode 100644 index 35ceaa1389a7..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/presto_object_dataset.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class PrestoObjectDataset(Dataset): - """Presto server dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(PrestoObjectDataset, self).__init__(**kwargs) - self.table_name = kwargs.get('table_name', None) - self.type = 'PrestoObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/presto_object_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/presto_object_dataset_py3.py deleted file mode 100644 index 193004e2c381..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/presto_object_dataset_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class PrestoObjectDataset(Dataset): - """Presto server dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: - super(PrestoObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.table_name = table_name - self.type = 'PrestoObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/presto_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/presto_source.py deleted file mode 100644 index 333a4e6dca9e..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/presto_source.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class PrestoSource(CopySource): - """A copy activity Presto server source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(PrestoSource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.type = 'PrestoSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/presto_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/presto_source_py3.py deleted file mode 100644 index ad16115ef8f3..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/presto_source_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class PrestoSource(CopySource): - """A copy activity Presto server source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query=None, **kwargs) -> None: - super(PrestoSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.type = 'PrestoSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/quick_books_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/quick_books_linked_service.py deleted file mode 100644 index c2ca123e5409..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/quick_books_linked_service.py +++ /dev/null @@ -1,100 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class QuickBooksLinkedService(LinkedService): - """QuickBooks server linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param endpoint: Required. The endpoint of the QuickBooks server. (i.e. - quickbooks.api.intuit.com) - :type endpoint: object - :param company_id: Required. The company ID of the QuickBooks company to - authorize. - :type company_id: object - :param consumer_key: Required. The consumer key for OAuth 1.0 - authentication. - :type consumer_key: object - :param consumer_secret: Required. The consumer secret for OAuth 1.0 - authentication. - :type consumer_secret: ~azure.mgmt.datafactory.models.SecretBase - :param access_token: Required. The access token for OAuth 1.0 - authentication. - :type access_token: ~azure.mgmt.datafactory.models.SecretBase - :param access_token_secret: Required. The access token secret for OAuth - 1.0 authentication. - :type access_token_secret: ~azure.mgmt.datafactory.models.SecretBase - :param use_encrypted_endpoints: Specifies whether the data source - endpoints are encrypted using HTTPS. The default value is true. - :type use_encrypted_endpoints: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'endpoint': {'required': True}, - 'company_id': {'required': True}, - 'consumer_key': {'required': True}, - 'consumer_secret': {'required': True}, - 'access_token': {'required': True}, - 'access_token_secret': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'endpoint': {'key': 'typeProperties.endpoint', 'type': 'object'}, - 'company_id': {'key': 'typeProperties.companyId', 'type': 'object'}, - 'consumer_key': {'key': 'typeProperties.consumerKey', 'type': 'object'}, - 'consumer_secret': {'key': 'typeProperties.consumerSecret', 'type': 'SecretBase'}, - 'access_token': {'key': 'typeProperties.accessToken', 'type': 'SecretBase'}, - 'access_token_secret': {'key': 'typeProperties.accessTokenSecret', 'type': 'SecretBase'}, - 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(QuickBooksLinkedService, self).__init__(**kwargs) - self.endpoint = kwargs.get('endpoint', None) - self.company_id = kwargs.get('company_id', None) - self.consumer_key = kwargs.get('consumer_key', None) - self.consumer_secret = kwargs.get('consumer_secret', None) - self.access_token = kwargs.get('access_token', None) - self.access_token_secret = kwargs.get('access_token_secret', None) - self.use_encrypted_endpoints = kwargs.get('use_encrypted_endpoints', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'QuickBooks' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/quick_books_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/quick_books_linked_service_py3.py deleted file mode 100644 index 7ba9f145c26e..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/quick_books_linked_service_py3.py +++ /dev/null @@ -1,100 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class QuickBooksLinkedService(LinkedService): - """QuickBooks server linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param endpoint: Required. The endpoint of the QuickBooks server. (i.e. - quickbooks.api.intuit.com) - :type endpoint: object - :param company_id: Required. The company ID of the QuickBooks company to - authorize. - :type company_id: object - :param consumer_key: Required. The consumer key for OAuth 1.0 - authentication. - :type consumer_key: object - :param consumer_secret: Required. The consumer secret for OAuth 1.0 - authentication. - :type consumer_secret: ~azure.mgmt.datafactory.models.SecretBase - :param access_token: Required. The access token for OAuth 1.0 - authentication. - :type access_token: ~azure.mgmt.datafactory.models.SecretBase - :param access_token_secret: Required. The access token secret for OAuth - 1.0 authentication. - :type access_token_secret: ~azure.mgmt.datafactory.models.SecretBase - :param use_encrypted_endpoints: Specifies whether the data source - endpoints are encrypted using HTTPS. The default value is true. - :type use_encrypted_endpoints: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'endpoint': {'required': True}, - 'company_id': {'required': True}, - 'consumer_key': {'required': True}, - 'consumer_secret': {'required': True}, - 'access_token': {'required': True}, - 'access_token_secret': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'endpoint': {'key': 'typeProperties.endpoint', 'type': 'object'}, - 'company_id': {'key': 'typeProperties.companyId', 'type': 'object'}, - 'consumer_key': {'key': 'typeProperties.consumerKey', 'type': 'object'}, - 'consumer_secret': {'key': 'typeProperties.consumerSecret', 'type': 'SecretBase'}, - 'access_token': {'key': 'typeProperties.accessToken', 'type': 'SecretBase'}, - 'access_token_secret': {'key': 'typeProperties.accessTokenSecret', 'type': 'SecretBase'}, - 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, endpoint, company_id, consumer_key, consumer_secret, access_token, access_token_secret, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, use_encrypted_endpoints=None, encrypted_credential=None, **kwargs) -> None: - super(QuickBooksLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.endpoint = endpoint - self.company_id = company_id - self.consumer_key = consumer_key - self.consumer_secret = consumer_secret - self.access_token = access_token - self.access_token_secret = access_token_secret - self.use_encrypted_endpoints = use_encrypted_endpoints - self.encrypted_credential = encrypted_credential - self.type = 'QuickBooks' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/quick_books_object_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/quick_books_object_dataset.py deleted file mode 100644 index 73446d0ed938..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/quick_books_object_dataset.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class QuickBooksObjectDataset(Dataset): - """QuickBooks server dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(QuickBooksObjectDataset, self).__init__(**kwargs) - self.table_name = kwargs.get('table_name', None) - self.type = 'QuickBooksObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/quick_books_object_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/quick_books_object_dataset_py3.py deleted file mode 100644 index 65f67d2b20af..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/quick_books_object_dataset_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class QuickBooksObjectDataset(Dataset): - """QuickBooks server dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: - super(QuickBooksObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.table_name = table_name - self.type = 'QuickBooksObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/quick_books_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/quick_books_source.py deleted file mode 100644 index b8567cd772ed..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/quick_books_source.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class QuickBooksSource(CopySource): - """A copy activity QuickBooks server source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(QuickBooksSource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.type = 'QuickBooksSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/quick_books_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/quick_books_source_py3.py deleted file mode 100644 index b6bb7a260d1d..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/quick_books_source_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class QuickBooksSource(CopySource): - """A copy activity QuickBooks server source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query=None, **kwargs) -> None: - super(QuickBooksSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.type = 'QuickBooksSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/recurrence_schedule.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/recurrence_schedule.py deleted file mode 100644 index f23d452392b0..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/recurrence_schedule.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RecurrenceSchedule(Model): - """The recurrence schedule. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param minutes: The minutes. - :type minutes: list[int] - :param hours: The hours. - :type hours: list[int] - :param week_days: The days of the week. - :type week_days: list[str or ~azure.mgmt.datafactory.models.DaysOfWeek] - :param month_days: The month days. - :type month_days: list[int] - :param monthly_occurrences: The monthly occurrences. - :type monthly_occurrences: - list[~azure.mgmt.datafactory.models.RecurrenceScheduleOccurrence] - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'minutes': {'key': 'minutes', 'type': '[int]'}, - 'hours': {'key': 'hours', 'type': '[int]'}, - 'week_days': {'key': 'weekDays', 'type': '[DaysOfWeek]'}, - 'month_days': {'key': 'monthDays', 'type': '[int]'}, - 'monthly_occurrences': {'key': 'monthlyOccurrences', 'type': '[RecurrenceScheduleOccurrence]'}, - } - - def __init__(self, **kwargs): - super(RecurrenceSchedule, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.minutes = kwargs.get('minutes', None) - self.hours = kwargs.get('hours', None) - self.week_days = kwargs.get('week_days', None) - self.month_days = kwargs.get('month_days', None) - self.monthly_occurrences = kwargs.get('monthly_occurrences', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/recurrence_schedule_occurrence.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/recurrence_schedule_occurrence.py deleted file mode 100644 index bbbe1fa28f17..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/recurrence_schedule_occurrence.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RecurrenceScheduleOccurrence(Model): - """The recurrence schedule occurrence. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param day: The day of the week. Possible values include: 'Sunday', - 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' - :type day: str or ~azure.mgmt.datafactory.models.DayOfWeek - :param occurrence: The occurrence. - :type occurrence: int - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'day': {'key': 'day', 'type': 'DayOfWeek'}, - 'occurrence': {'key': 'occurrence', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(RecurrenceScheduleOccurrence, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.day = kwargs.get('day', None) - self.occurrence = kwargs.get('occurrence', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/recurrence_schedule_occurrence_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/recurrence_schedule_occurrence_py3.py deleted file mode 100644 index 10aea1f00163..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/recurrence_schedule_occurrence_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RecurrenceScheduleOccurrence(Model): - """The recurrence schedule occurrence. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param day: The day of the week. Possible values include: 'Sunday', - 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' - :type day: str or ~azure.mgmt.datafactory.models.DayOfWeek - :param occurrence: The occurrence. - :type occurrence: int - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'day': {'key': 'day', 'type': 'DayOfWeek'}, - 'occurrence': {'key': 'occurrence', 'type': 'int'}, - } - - def __init__(self, *, additional_properties=None, day=None, occurrence: int=None, **kwargs) -> None: - super(RecurrenceScheduleOccurrence, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.day = day - self.occurrence = occurrence diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/recurrence_schedule_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/recurrence_schedule_py3.py deleted file mode 100644 index fbe44fa3f021..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/recurrence_schedule_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RecurrenceSchedule(Model): - """The recurrence schedule. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param minutes: The minutes. - :type minutes: list[int] - :param hours: The hours. - :type hours: list[int] - :param week_days: The days of the week. - :type week_days: list[str or ~azure.mgmt.datafactory.models.DaysOfWeek] - :param month_days: The month days. - :type month_days: list[int] - :param monthly_occurrences: The monthly occurrences. - :type monthly_occurrences: - list[~azure.mgmt.datafactory.models.RecurrenceScheduleOccurrence] - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'minutes': {'key': 'minutes', 'type': '[int]'}, - 'hours': {'key': 'hours', 'type': '[int]'}, - 'week_days': {'key': 'weekDays', 'type': '[DaysOfWeek]'}, - 'month_days': {'key': 'monthDays', 'type': '[int]'}, - 'monthly_occurrences': {'key': 'monthlyOccurrences', 'type': '[RecurrenceScheduleOccurrence]'}, - } - - def __init__(self, *, additional_properties=None, minutes=None, hours=None, week_days=None, month_days=None, monthly_occurrences=None, **kwargs) -> None: - super(RecurrenceSchedule, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.minutes = minutes - self.hours = hours - self.week_days = week_days - self.month_days = month_days - self.monthly_occurrences = monthly_occurrences diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/redirect_incompatible_row_settings.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/redirect_incompatible_row_settings.py deleted file mode 100644 index a2e3bddb9425..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/redirect_incompatible_row_settings.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RedirectIncompatibleRowSettings(Model): - """Redirect incompatible row settings. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param linked_service_name: Required. Name of the Azure Storage, Storage - SAS, or Azure Data Lake Store linked service used for redirecting - incompatible row. Must be specified if redirectIncompatibleRowSettings is - specified. Type: string (or Expression with resultType string). - :type linked_service_name: object - :param path: The path for storing the redirect incompatible row data. - Type: string (or Expression with resultType string). - :type path: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'object'}, - 'path': {'key': 'path', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(RedirectIncompatibleRowSettings, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.linked_service_name = kwargs.get('linked_service_name', None) - self.path = kwargs.get('path', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/redirect_incompatible_row_settings_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/redirect_incompatible_row_settings_py3.py deleted file mode 100644 index b47878ef4354..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/redirect_incompatible_row_settings_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RedirectIncompatibleRowSettings(Model): - """Redirect incompatible row settings. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param linked_service_name: Required. Name of the Azure Storage, Storage - SAS, or Azure Data Lake Store linked service used for redirecting - incompatible row. Must be specified if redirectIncompatibleRowSettings is - specified. Type: string (or Expression with resultType string). - :type linked_service_name: object - :param path: The path for storing the redirect incompatible row data. - Type: string (or Expression with resultType string). - :type path: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'object'}, - 'path': {'key': 'path', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, path=None, **kwargs) -> None: - super(RedirectIncompatibleRowSettings, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.linked_service_name = linked_service_name - self.path = path diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/redshift_unload_settings.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/redshift_unload_settings.py deleted file mode 100644 index 7114b85e10db..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/redshift_unload_settings.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RedshiftUnloadSettings(Model): - """The Amazon S3 settings needed for the interim Amazon S3 when copying from - Amazon Redshift with unload. With this, data from Amazon Redshift source - will be unloaded into S3 first and then copied into the targeted sink from - the interim S3. - - All required parameters must be populated in order to send to Azure. - - :param s3_linked_service_name: Required. The name of the Amazon S3 linked - service which will be used for the unload operation when copying from the - Amazon Redshift source. - :type s3_linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param bucket_name: Required. The bucket of the interim Amazon S3 which - will be used to store the unloaded data from Amazon Redshift source. The - bucket must be in the same region as the Amazon Redshift source. Type: - string (or Expression with resultType string). - :type bucket_name: object - """ - - _validation = { - 's3_linked_service_name': {'required': True}, - 'bucket_name': {'required': True}, - } - - _attribute_map = { - 's3_linked_service_name': {'key': 's3LinkedServiceName', 'type': 'LinkedServiceReference'}, - 'bucket_name': {'key': 'bucketName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(RedshiftUnloadSettings, self).__init__(**kwargs) - self.s3_linked_service_name = kwargs.get('s3_linked_service_name', None) - self.bucket_name = kwargs.get('bucket_name', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/redshift_unload_settings_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/redshift_unload_settings_py3.py deleted file mode 100644 index a40d014a32f9..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/redshift_unload_settings_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RedshiftUnloadSettings(Model): - """The Amazon S3 settings needed for the interim Amazon S3 when copying from - Amazon Redshift with unload. With this, data from Amazon Redshift source - will be unloaded into S3 first and then copied into the targeted sink from - the interim S3. - - All required parameters must be populated in order to send to Azure. - - :param s3_linked_service_name: Required. The name of the Amazon S3 linked - service which will be used for the unload operation when copying from the - Amazon Redshift source. - :type s3_linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param bucket_name: Required. The bucket of the interim Amazon S3 which - will be used to store the unloaded data from Amazon Redshift source. The - bucket must be in the same region as the Amazon Redshift source. Type: - string (or Expression with resultType string). - :type bucket_name: object - """ - - _validation = { - 's3_linked_service_name': {'required': True}, - 'bucket_name': {'required': True}, - } - - _attribute_map = { - 's3_linked_service_name': {'key': 's3LinkedServiceName', 'type': 'LinkedServiceReference'}, - 'bucket_name': {'key': 'bucketName', 'type': 'object'}, - } - - def __init__(self, *, s3_linked_service_name, bucket_name, **kwargs) -> None: - super(RedshiftUnloadSettings, self).__init__(**kwargs) - self.s3_linked_service_name = s3_linked_service_name - self.bucket_name = bucket_name diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/relational_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/relational_source.py deleted file mode 100644 index 1dc8ff198eb8..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/relational_source.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class RelationalSource(CopySource): - """A copy activity source for various relational databases. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: Database query. Type: string (or Expression with resultType - string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(RelationalSource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.type = 'RelationalSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/relational_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/relational_source_py3.py deleted file mode 100644 index 9e7a75043b8c..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/relational_source_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class RelationalSource(CopySource): - """A copy activity source for various relational databases. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: Database query. Type: string (or Expression with resultType - string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query=None, **kwargs) -> None: - super(RelationalSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.type = 'RelationalSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/relational_table_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/relational_table_dataset.py deleted file mode 100644 index e5dd2e0786c8..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/relational_table_dataset.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class RelationalTableDataset(Dataset): - """The relational table dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The relational table name. Type: string (or Expression - with resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(RelationalTableDataset, self).__init__(**kwargs) - self.table_name = kwargs.get('table_name', None) - self.type = 'RelationalTable' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/relational_table_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/relational_table_dataset_py3.py deleted file mode 100644 index 3c85d95f8033..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/relational_table_dataset_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class RelationalTableDataset(Dataset): - """The relational table dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The relational table name. Type: string (or Expression - with resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: - super(RelationalTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.table_name = table_name - self.type = 'RelationalTable' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/rerun_trigger_resource.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/rerun_trigger_resource.py deleted file mode 100644 index 8de6a70ecc99..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/rerun_trigger_resource.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class RerunTriggerResource(SubResource): - """RerunTrigger resource type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :ivar etag: Etag identifies change in the resource. - :vartype etag: str - :param properties: Required. Properties of the rerun trigger. - :type properties: - ~azure.mgmt.datafactory.models.RerunTumblingWindowTrigger - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'properties': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'RerunTumblingWindowTrigger'}, - } - - def __init__(self, **kwargs): - super(RerunTriggerResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/rerun_trigger_resource_paged.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/rerun_trigger_resource_paged.py deleted file mode 100644 index 23d971c1082e..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/rerun_trigger_resource_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RerunTriggerResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`RerunTriggerResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RerunTriggerResource]'} - } - - def __init__(self, *args, **kwargs): - - super(RerunTriggerResourcePaged, self).__init__(*args, **kwargs) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/rerun_trigger_resource_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/rerun_trigger_resource_py3.py deleted file mode 100644 index 19814ad0d76f..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/rerun_trigger_resource_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class RerunTriggerResource(SubResource): - """RerunTrigger resource type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :ivar etag: Etag identifies change in the resource. - :vartype etag: str - :param properties: Required. Properties of the rerun trigger. - :type properties: - ~azure.mgmt.datafactory.models.RerunTumblingWindowTrigger - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'properties': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'RerunTumblingWindowTrigger'}, - } - - def __init__(self, *, properties, **kwargs) -> None: - super(RerunTriggerResource, self).__init__(**kwargs) - self.properties = properties diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/rerun_tumbling_window_trigger.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/rerun_tumbling_window_trigger.py deleted file mode 100644 index e66cf2feebbc..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/rerun_tumbling_window_trigger.py +++ /dev/null @@ -1,74 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .trigger import Trigger - - -class RerunTumblingWindowTrigger(Trigger): - """Trigger that schedules pipeline reruns for all fixed time interval windows - from a requested start time to requested end time. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Trigger description. - :type description: str - :ivar runtime_state: Indicates if trigger is running or not. Updated when - Start/Stop APIs are called on the Trigger. Possible values include: - 'Started', 'Stopped', 'Disabled' - :vartype runtime_state: str or - ~azure.mgmt.datafactory.models.TriggerRuntimeState - :param type: Required. Constant filled by server. - :type type: str - :param parent_trigger: The parent trigger reference. - :type parent_trigger: object - :param requested_start_time: Required. The start time for the time period - for which restatement is initiated. Only UTC time is currently supported. - :type requested_start_time: datetime - :param requested_end_time: Required. The end time for the time period for - which restatement is initiated. Only UTC time is currently supported. - :type requested_end_time: datetime - :param max_concurrency: Required. The max number of parallel time windows - (ready for execution) for which a rerun is triggered. - :type max_concurrency: int - """ - - _validation = { - 'runtime_state': {'readonly': True}, - 'type': {'required': True}, - 'requested_start_time': {'required': True}, - 'requested_end_time': {'required': True}, - 'max_concurrency': {'required': True, 'maximum': 50, 'minimum': 1}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'runtime_state': {'key': 'runtimeState', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'parent_trigger': {'key': 'typeProperties.parentTrigger', 'type': 'object'}, - 'requested_start_time': {'key': 'typeProperties.requestedStartTime', 'type': 'iso-8601'}, - 'requested_end_time': {'key': 'typeProperties.requestedEndTime', 'type': 'iso-8601'}, - 'max_concurrency': {'key': 'typeProperties.maxConcurrency', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(RerunTumblingWindowTrigger, self).__init__(**kwargs) - self.parent_trigger = kwargs.get('parent_trigger', None) - self.requested_start_time = kwargs.get('requested_start_time', None) - self.requested_end_time = kwargs.get('requested_end_time', None) - self.max_concurrency = kwargs.get('max_concurrency', None) - self.type = 'RerunTumblingWindowTrigger' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/rerun_tumbling_window_trigger_action_parameters.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/rerun_tumbling_window_trigger_action_parameters.py deleted file mode 100644 index 4b87f070b6be..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/rerun_tumbling_window_trigger_action_parameters.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RerunTumblingWindowTriggerActionParameters(Model): - """Rerun tumbling window trigger Parameters. - - All required parameters must be populated in order to send to Azure. - - :param start_time: Required. The start time for the time period for which - restatement is initiated. Only UTC time is currently supported. - :type start_time: datetime - :param end_time: Required. The end time for the time period for which - restatement is initiated. Only UTC time is currently supported. - :type end_time: datetime - :param max_concurrency: Required. The max number of parallel time windows - (ready for execution) for which a rerun is triggered. - :type max_concurrency: int - """ - - _validation = { - 'start_time': {'required': True}, - 'end_time': {'required': True}, - 'max_concurrency': {'required': True, 'maximum': 50, 'minimum': 1}, - } - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'max_concurrency': {'key': 'maxConcurrency', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(RerunTumblingWindowTriggerActionParameters, self).__init__(**kwargs) - self.start_time = kwargs.get('start_time', None) - self.end_time = kwargs.get('end_time', None) - self.max_concurrency = kwargs.get('max_concurrency', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/rerun_tumbling_window_trigger_action_parameters_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/rerun_tumbling_window_trigger_action_parameters_py3.py deleted file mode 100644 index 6fadecca588b..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/rerun_tumbling_window_trigger_action_parameters_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RerunTumblingWindowTriggerActionParameters(Model): - """Rerun tumbling window trigger Parameters. - - All required parameters must be populated in order to send to Azure. - - :param start_time: Required. The start time for the time period for which - restatement is initiated. Only UTC time is currently supported. - :type start_time: datetime - :param end_time: Required. The end time for the time period for which - restatement is initiated. Only UTC time is currently supported. - :type end_time: datetime - :param max_concurrency: Required. The max number of parallel time windows - (ready for execution) for which a rerun is triggered. - :type max_concurrency: int - """ - - _validation = { - 'start_time': {'required': True}, - 'end_time': {'required': True}, - 'max_concurrency': {'required': True, 'maximum': 50, 'minimum': 1}, - } - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'max_concurrency': {'key': 'maxConcurrency', 'type': 'int'}, - } - - def __init__(self, *, start_time, end_time, max_concurrency: int, **kwargs) -> None: - super(RerunTumblingWindowTriggerActionParameters, self).__init__(**kwargs) - self.start_time = start_time - self.end_time = end_time - self.max_concurrency = max_concurrency diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/rerun_tumbling_window_trigger_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/rerun_tumbling_window_trigger_py3.py deleted file mode 100644 index eafc3b5743a0..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/rerun_tumbling_window_trigger_py3.py +++ /dev/null @@ -1,74 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .trigger_py3 import Trigger - - -class RerunTumblingWindowTrigger(Trigger): - """Trigger that schedules pipeline reruns for all fixed time interval windows - from a requested start time to requested end time. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Trigger description. - :type description: str - :ivar runtime_state: Indicates if trigger is running or not. Updated when - Start/Stop APIs are called on the Trigger. Possible values include: - 'Started', 'Stopped', 'Disabled' - :vartype runtime_state: str or - ~azure.mgmt.datafactory.models.TriggerRuntimeState - :param type: Required. Constant filled by server. - :type type: str - :param parent_trigger: The parent trigger reference. - :type parent_trigger: object - :param requested_start_time: Required. The start time for the time period - for which restatement is initiated. Only UTC time is currently supported. - :type requested_start_time: datetime - :param requested_end_time: Required. The end time for the time period for - which restatement is initiated. Only UTC time is currently supported. - :type requested_end_time: datetime - :param max_concurrency: Required. The max number of parallel time windows - (ready for execution) for which a rerun is triggered. - :type max_concurrency: int - """ - - _validation = { - 'runtime_state': {'readonly': True}, - 'type': {'required': True}, - 'requested_start_time': {'required': True}, - 'requested_end_time': {'required': True}, - 'max_concurrency': {'required': True, 'maximum': 50, 'minimum': 1}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'runtime_state': {'key': 'runtimeState', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'parent_trigger': {'key': 'typeProperties.parentTrigger', 'type': 'object'}, - 'requested_start_time': {'key': 'typeProperties.requestedStartTime', 'type': 'iso-8601'}, - 'requested_end_time': {'key': 'typeProperties.requestedEndTime', 'type': 'iso-8601'}, - 'max_concurrency': {'key': 'typeProperties.maxConcurrency', 'type': 'int'}, - } - - def __init__(self, *, requested_start_time, requested_end_time, max_concurrency: int, additional_properties=None, description: str=None, parent_trigger=None, **kwargs) -> None: - super(RerunTumblingWindowTrigger, self).__init__(additional_properties=additional_properties, description=description, **kwargs) - self.parent_trigger = parent_trigger - self.requested_start_time = requested_start_time - self.requested_end_time = requested_end_time - self.max_concurrency = max_concurrency - self.type = 'RerunTumblingWindowTrigger' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/resource.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/resource.py deleted file mode 100644 index f6b2d7d3b512..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/resource.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """Azure Data Factory top-level resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :ivar e_tag: Etag identifies change in the resource. - :vartype e_tag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'e_tag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - self.e_tag = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/resource_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/resource_py3.py deleted file mode 100644 index cfc0e4b09aa5..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/resource_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """Azure Data Factory top-level resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :ivar e_tag: Etag identifies change in the resource. - :vartype e_tag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'e_tag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags - self.e_tag = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/responsys_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/responsys_linked_service.py deleted file mode 100644 index 9c1b8e4c3cbd..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/responsys_linked_service.py +++ /dev/null @@ -1,94 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class ResponsysLinkedService(LinkedService): - """Responsys linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param endpoint: Required. The endpoint of the Responsys server. - :type endpoint: object - :param client_id: Required. The client ID associated with the Responsys - application. Type: string (or Expression with resultType string). - :type client_id: object - :param client_secret: The client secret associated with the Responsys - application. Type: string (or Expression with resultType string). - :type client_secret: ~azure.mgmt.datafactory.models.SecretBase - :param use_encrypted_endpoints: Specifies whether the data source - endpoints are encrypted using HTTPS. The default value is true. Type: - boolean (or Expression with resultType boolean). - :type use_encrypted_endpoints: object - :param use_host_verification: Specifies whether to require the host name - in the server's certificate to match the host name of the server when - connecting over SSL. The default value is true. Type: boolean (or - Expression with resultType boolean). - :type use_host_verification: object - :param use_peer_verification: Specifies whether to verify the identity of - the server when connecting over SSL. The default value is true. Type: - boolean (or Expression with resultType boolean). - :type use_peer_verification: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'endpoint': {'required': True}, - 'client_id': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'endpoint': {'key': 'typeProperties.endpoint', 'type': 'object'}, - 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, - 'client_secret': {'key': 'typeProperties.clientSecret', 'type': 'SecretBase'}, - 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, - 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, - 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ResponsysLinkedService, self).__init__(**kwargs) - self.endpoint = kwargs.get('endpoint', None) - self.client_id = kwargs.get('client_id', None) - self.client_secret = kwargs.get('client_secret', None) - self.use_encrypted_endpoints = kwargs.get('use_encrypted_endpoints', None) - self.use_host_verification = kwargs.get('use_host_verification', None) - self.use_peer_verification = kwargs.get('use_peer_verification', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'Responsys' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/responsys_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/responsys_linked_service_py3.py deleted file mode 100644 index 4c1997e6ab26..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/responsys_linked_service_py3.py +++ /dev/null @@ -1,94 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class ResponsysLinkedService(LinkedService): - """Responsys linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param endpoint: Required. The endpoint of the Responsys server. - :type endpoint: object - :param client_id: Required. The client ID associated with the Responsys - application. Type: string (or Expression with resultType string). - :type client_id: object - :param client_secret: The client secret associated with the Responsys - application. Type: string (or Expression with resultType string). - :type client_secret: ~azure.mgmt.datafactory.models.SecretBase - :param use_encrypted_endpoints: Specifies whether the data source - endpoints are encrypted using HTTPS. The default value is true. Type: - boolean (or Expression with resultType boolean). - :type use_encrypted_endpoints: object - :param use_host_verification: Specifies whether to require the host name - in the server's certificate to match the host name of the server when - connecting over SSL. The default value is true. Type: boolean (or - Expression with resultType boolean). - :type use_host_verification: object - :param use_peer_verification: Specifies whether to verify the identity of - the server when connecting over SSL. The default value is true. Type: - boolean (or Expression with resultType boolean). - :type use_peer_verification: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'endpoint': {'required': True}, - 'client_id': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'endpoint': {'key': 'typeProperties.endpoint', 'type': 'object'}, - 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, - 'client_secret': {'key': 'typeProperties.clientSecret', 'type': 'SecretBase'}, - 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, - 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, - 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, endpoint, client_id, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, client_secret=None, use_encrypted_endpoints=None, use_host_verification=None, use_peer_verification=None, encrypted_credential=None, **kwargs) -> None: - super(ResponsysLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.endpoint = endpoint - self.client_id = client_id - self.client_secret = client_secret - self.use_encrypted_endpoints = use_encrypted_endpoints - self.use_host_verification = use_host_verification - self.use_peer_verification = use_peer_verification - self.encrypted_credential = encrypted_credential - self.type = 'Responsys' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/responsys_object_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/responsys_object_dataset.py deleted file mode 100644 index f459e69113a1..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/responsys_object_dataset.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class ResponsysObjectDataset(Dataset): - """Responsys dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ResponsysObjectDataset, self).__init__(**kwargs) - self.table_name = kwargs.get('table_name', None) - self.type = 'ResponsysObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/responsys_object_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/responsys_object_dataset_py3.py deleted file mode 100644 index c5f375910aaf..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/responsys_object_dataset_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class ResponsysObjectDataset(Dataset): - """Responsys dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: - super(ResponsysObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.table_name = table_name - self.type = 'ResponsysObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/responsys_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/responsys_source.py deleted file mode 100644 index 1e1a9397a6ba..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/responsys_source.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class ResponsysSource(CopySource): - """A copy activity Responsys source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ResponsysSource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.type = 'ResponsysSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/responsys_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/responsys_source_py3.py deleted file mode 100644 index 3bfb9c19a2a7..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/responsys_source_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class ResponsysSource(CopySource): - """A copy activity Responsys source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query=None, **kwargs) -> None: - super(ResponsysSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.type = 'ResponsysSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/retry_policy.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/retry_policy.py deleted file mode 100644 index e6f5b1876259..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/retry_policy.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RetryPolicy(Model): - """Execution policy for an activity. - - :param count: Maximum ordinary retry attempts. Default is 0. Type: integer - (or Expression with resultType integer), minimum: 0. - :type count: object - :param interval_in_seconds: Interval between retries in seconds. Default - is 30. - :type interval_in_seconds: int - """ - - _validation = { - 'interval_in_seconds': {'maximum': 86400, 'minimum': 30}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'object'}, - 'interval_in_seconds': {'key': 'intervalInSeconds', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(RetryPolicy, self).__init__(**kwargs) - self.count = kwargs.get('count', None) - self.interval_in_seconds = kwargs.get('interval_in_seconds', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/retry_policy_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/retry_policy_py3.py deleted file mode 100644 index b51b87a49938..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/retry_policy_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RetryPolicy(Model): - """Execution policy for an activity. - - :param count: Maximum ordinary retry attempts. Default is 0. Type: integer - (or Expression with resultType integer), minimum: 0. - :type count: object - :param interval_in_seconds: Interval between retries in seconds. Default - is 30. - :type interval_in_seconds: int - """ - - _validation = { - 'interval_in_seconds': {'maximum': 86400, 'minimum': 30}, - } - - _attribute_map = { - 'count': {'key': 'count', 'type': 'object'}, - 'interval_in_seconds': {'key': 'intervalInSeconds', 'type': 'int'}, - } - - def __init__(self, *, count=None, interval_in_seconds: int=None, **kwargs) -> None: - super(RetryPolicy, self).__init__(**kwargs) - self.count = count - self.interval_in_seconds = interval_in_seconds diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/run_filter_parameters.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/run_filter_parameters.py deleted file mode 100644 index 9271f7adf029..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/run_filter_parameters.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunFilterParameters(Model): - """Query parameters for listing runs. - - All required parameters must be populated in order to send to Azure. - - :param continuation_token: The continuation token for getting the next - page of results. Null for first page. - :type continuation_token: str - :param last_updated_after: Required. The time at or after which the run - event was updated in 'ISO 8601' format. - :type last_updated_after: datetime - :param last_updated_before: Required. The time at or before which the run - event was updated in 'ISO 8601' format. - :type last_updated_before: datetime - :param filters: List of filters. - :type filters: list[~azure.mgmt.datafactory.models.RunQueryFilter] - :param order_by: List of OrderBy option. - :type order_by: list[~azure.mgmt.datafactory.models.RunQueryOrderBy] - """ - - _validation = { - 'last_updated_after': {'required': True}, - 'last_updated_before': {'required': True}, - } - - _attribute_map = { - 'continuation_token': {'key': 'continuationToken', 'type': 'str'}, - 'last_updated_after': {'key': 'lastUpdatedAfter', 'type': 'iso-8601'}, - 'last_updated_before': {'key': 'lastUpdatedBefore', 'type': 'iso-8601'}, - 'filters': {'key': 'filters', 'type': '[RunQueryFilter]'}, - 'order_by': {'key': 'orderBy', 'type': '[RunQueryOrderBy]'}, - } - - def __init__(self, **kwargs): - super(RunFilterParameters, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.last_updated_after = kwargs.get('last_updated_after', None) - self.last_updated_before = kwargs.get('last_updated_before', None) - self.filters = kwargs.get('filters', None) - self.order_by = kwargs.get('order_by', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/run_filter_parameters_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/run_filter_parameters_py3.py deleted file mode 100644 index c96e64eb63b3..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/run_filter_parameters_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunFilterParameters(Model): - """Query parameters for listing runs. - - All required parameters must be populated in order to send to Azure. - - :param continuation_token: The continuation token for getting the next - page of results. Null for first page. - :type continuation_token: str - :param last_updated_after: Required. The time at or after which the run - event was updated in 'ISO 8601' format. - :type last_updated_after: datetime - :param last_updated_before: Required. The time at or before which the run - event was updated in 'ISO 8601' format. - :type last_updated_before: datetime - :param filters: List of filters. - :type filters: list[~azure.mgmt.datafactory.models.RunQueryFilter] - :param order_by: List of OrderBy option. - :type order_by: list[~azure.mgmt.datafactory.models.RunQueryOrderBy] - """ - - _validation = { - 'last_updated_after': {'required': True}, - 'last_updated_before': {'required': True}, - } - - _attribute_map = { - 'continuation_token': {'key': 'continuationToken', 'type': 'str'}, - 'last_updated_after': {'key': 'lastUpdatedAfter', 'type': 'iso-8601'}, - 'last_updated_before': {'key': 'lastUpdatedBefore', 'type': 'iso-8601'}, - 'filters': {'key': 'filters', 'type': '[RunQueryFilter]'}, - 'order_by': {'key': 'orderBy', 'type': '[RunQueryOrderBy]'}, - } - - def __init__(self, *, last_updated_after, last_updated_before, continuation_token: str=None, filters=None, order_by=None, **kwargs) -> None: - super(RunFilterParameters, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.last_updated_after = last_updated_after - self.last_updated_before = last_updated_before - self.filters = filters - self.order_by = order_by diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/run_query_filter.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/run_query_filter.py deleted file mode 100644 index 63a4cddc063d..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/run_query_filter.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunQueryFilter(Model): - """Query filter option for listing runs. - - All required parameters must be populated in order to send to Azure. - - :param operand: Required. Parameter name to be used for filter. The - allowed operands to query pipeline runs are PipelineName, RunStart, RunEnd - and Status; to query activity runs are ActivityName, ActivityRunStart, - ActivityRunEnd, ActivityType and Status, and to query trigger runs are - TriggerName, TriggerRunTimestamp and Status. Possible values include: - 'PipelineName', 'Status', 'RunStart', 'RunEnd', 'ActivityName', - 'ActivityRunStart', 'ActivityRunEnd', 'ActivityType', 'TriggerName', - 'TriggerRunTimestamp' - :type operand: str or ~azure.mgmt.datafactory.models.RunQueryFilterOperand - :param operator: Required. Operator to be used for filter. Possible values - include: 'Equals', 'NotEquals', 'In', 'NotIn' - :type operator: str or - ~azure.mgmt.datafactory.models.RunQueryFilterOperator - :param values: Required. List of filter values. - :type values: list[str] - """ - - _validation = { - 'operand': {'required': True}, - 'operator': {'required': True}, - 'values': {'required': True}, - } - - _attribute_map = { - 'operand': {'key': 'operand', 'type': 'str'}, - 'operator': {'key': 'operator', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(RunQueryFilter, self).__init__(**kwargs) - self.operand = kwargs.get('operand', None) - self.operator = kwargs.get('operator', None) - self.values = kwargs.get('values', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/run_query_filter_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/run_query_filter_py3.py deleted file mode 100644 index fc95591801bd..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/run_query_filter_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunQueryFilter(Model): - """Query filter option for listing runs. - - All required parameters must be populated in order to send to Azure. - - :param operand: Required. Parameter name to be used for filter. The - allowed operands to query pipeline runs are PipelineName, RunStart, RunEnd - and Status; to query activity runs are ActivityName, ActivityRunStart, - ActivityRunEnd, ActivityType and Status, and to query trigger runs are - TriggerName, TriggerRunTimestamp and Status. Possible values include: - 'PipelineName', 'Status', 'RunStart', 'RunEnd', 'ActivityName', - 'ActivityRunStart', 'ActivityRunEnd', 'ActivityType', 'TriggerName', - 'TriggerRunTimestamp' - :type operand: str or ~azure.mgmt.datafactory.models.RunQueryFilterOperand - :param operator: Required. Operator to be used for filter. Possible values - include: 'Equals', 'NotEquals', 'In', 'NotIn' - :type operator: str or - ~azure.mgmt.datafactory.models.RunQueryFilterOperator - :param values: Required. List of filter values. - :type values: list[str] - """ - - _validation = { - 'operand': {'required': True}, - 'operator': {'required': True}, - 'values': {'required': True}, - } - - _attribute_map = { - 'operand': {'key': 'operand', 'type': 'str'}, - 'operator': {'key': 'operator', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[str]'}, - } - - def __init__(self, *, operand, operator, values, **kwargs) -> None: - super(RunQueryFilter, self).__init__(**kwargs) - self.operand = operand - self.operator = operator - self.values = values diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/run_query_order_by.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/run_query_order_by.py deleted file mode 100644 index 21afabcf215f..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/run_query_order_by.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunQueryOrderBy(Model): - """An object to provide order by options for listing runs. - - All required parameters must be populated in order to send to Azure. - - :param order_by: Required. Parameter name to be used for order by. The - allowed parameters to order by for pipeline runs are PipelineName, - RunStart, RunEnd and Status; for activity runs are ActivityName, - ActivityRunStart, ActivityRunEnd and Status; for trigger runs are - TriggerName, TriggerRunTimestamp and Status. Possible values include: - 'RunStart', 'RunEnd', 'PipelineName', 'Status', 'ActivityName', - 'ActivityRunStart', 'ActivityRunEnd', 'TriggerName', 'TriggerRunTimestamp' - :type order_by: str or ~azure.mgmt.datafactory.models.RunQueryOrderByField - :param order: Required. Sorting order of the parameter. Possible values - include: 'ASC', 'DESC' - :type order: str or ~azure.mgmt.datafactory.models.RunQueryOrder - """ - - _validation = { - 'order_by': {'required': True}, - 'order': {'required': True}, - } - - _attribute_map = { - 'order_by': {'key': 'orderBy', 'type': 'str'}, - 'order': {'key': 'order', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RunQueryOrderBy, self).__init__(**kwargs) - self.order_by = kwargs.get('order_by', None) - self.order = kwargs.get('order', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/run_query_order_by_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/run_query_order_by_py3.py deleted file mode 100644 index a3ddc8854d47..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/run_query_order_by_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunQueryOrderBy(Model): - """An object to provide order by options for listing runs. - - All required parameters must be populated in order to send to Azure. - - :param order_by: Required. Parameter name to be used for order by. The - allowed parameters to order by for pipeline runs are PipelineName, - RunStart, RunEnd and Status; for activity runs are ActivityName, - ActivityRunStart, ActivityRunEnd and Status; for trigger runs are - TriggerName, TriggerRunTimestamp and Status. Possible values include: - 'RunStart', 'RunEnd', 'PipelineName', 'Status', 'ActivityName', - 'ActivityRunStart', 'ActivityRunEnd', 'TriggerName', 'TriggerRunTimestamp' - :type order_by: str or ~azure.mgmt.datafactory.models.RunQueryOrderByField - :param order: Required. Sorting order of the parameter. Possible values - include: 'ASC', 'DESC' - :type order: str or ~azure.mgmt.datafactory.models.RunQueryOrder - """ - - _validation = { - 'order_by': {'required': True}, - 'order': {'required': True}, - } - - _attribute_map = { - 'order_by': {'key': 'orderBy', 'type': 'str'}, - 'order': {'key': 'order', 'type': 'str'}, - } - - def __init__(self, *, order_by, order, **kwargs) -> None: - super(RunQueryOrderBy, self).__init__(**kwargs) - self.order_by = order_by - self.order = order diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_linked_service.py deleted file mode 100644 index 5804e779d1ef..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_linked_service.py +++ /dev/null @@ -1,82 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class SalesforceLinkedService(LinkedService): - """Linked service for Salesforce. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param environment_url: The URL of Salesforce instance. Default is - 'https://login.salesforce.com'. To copy data from sandbox, specify - 'https://test.salesforce.com'. To copy data from custom domain, specify, - for example, 'https://[domain].my.salesforce.com'. Type: string (or - Expression with resultType string). - :type environment_url: object - :param username: The username for Basic authentication of the Salesforce - instance. Type: string (or Expression with resultType string). - :type username: object - :param password: The password for Basic authentication of the Salesforce - instance. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param security_token: The security token is required to remotely access - Salesforce instance. - :type security_token: ~azure.mgmt.datafactory.models.SecretBase - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'environment_url': {'key': 'typeProperties.environmentUrl', 'type': 'object'}, - 'username': {'key': 'typeProperties.username', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'security_token': {'key': 'typeProperties.securityToken', 'type': 'SecretBase'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(SalesforceLinkedService, self).__init__(**kwargs) - self.environment_url = kwargs.get('environment_url', None) - self.username = kwargs.get('username', None) - self.password = kwargs.get('password', None) - self.security_token = kwargs.get('security_token', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'Salesforce' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_linked_service_py3.py deleted file mode 100644 index 9fa5287aa3b4..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_linked_service_py3.py +++ /dev/null @@ -1,82 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class SalesforceLinkedService(LinkedService): - """Linked service for Salesforce. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param environment_url: The URL of Salesforce instance. Default is - 'https://login.salesforce.com'. To copy data from sandbox, specify - 'https://test.salesforce.com'. To copy data from custom domain, specify, - for example, 'https://[domain].my.salesforce.com'. Type: string (or - Expression with resultType string). - :type environment_url: object - :param username: The username for Basic authentication of the Salesforce - instance. Type: string (or Expression with resultType string). - :type username: object - :param password: The password for Basic authentication of the Salesforce - instance. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param security_token: The security token is required to remotely access - Salesforce instance. - :type security_token: ~azure.mgmt.datafactory.models.SecretBase - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'environment_url': {'key': 'typeProperties.environmentUrl', 'type': 'object'}, - 'username': {'key': 'typeProperties.username', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'security_token': {'key': 'typeProperties.securityToken', 'type': 'SecretBase'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, environment_url=None, username=None, password=None, security_token=None, encrypted_credential=None, **kwargs) -> None: - super(SalesforceLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.environment_url = environment_url - self.username = username - self.password = password - self.security_token = security_token - self.encrypted_credential = encrypted_credential - self.type = 'Salesforce' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_marketing_cloud_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_marketing_cloud_linked_service.py deleted file mode 100644 index f3d2861576e4..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_marketing_cloud_linked_service.py +++ /dev/null @@ -1,91 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class SalesforceMarketingCloudLinkedService(LinkedService): - """Salesforce Marketing Cloud linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param client_id: Required. The client ID associated with the Salesforce - Marketing Cloud application. Type: string (or Expression with resultType - string). - :type client_id: object - :param client_secret: The client secret associated with the Salesforce - Marketing Cloud application. Type: string (or Expression with resultType - string). - :type client_secret: ~azure.mgmt.datafactory.models.SecretBase - :param use_encrypted_endpoints: Specifies whether the data source - endpoints are encrypted using HTTPS. The default value is true. Type: - boolean (or Expression with resultType boolean). - :type use_encrypted_endpoints: object - :param use_host_verification: Specifies whether to require the host name - in the server's certificate to match the host name of the server when - connecting over SSL. The default value is true. Type: boolean (or - Expression with resultType boolean). - :type use_host_verification: object - :param use_peer_verification: Specifies whether to verify the identity of - the server when connecting over SSL. The default value is true. Type: - boolean (or Expression with resultType boolean). - :type use_peer_verification: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'client_id': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, - 'client_secret': {'key': 'typeProperties.clientSecret', 'type': 'SecretBase'}, - 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, - 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, - 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(SalesforceMarketingCloudLinkedService, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.client_secret = kwargs.get('client_secret', None) - self.use_encrypted_endpoints = kwargs.get('use_encrypted_endpoints', None) - self.use_host_verification = kwargs.get('use_host_verification', None) - self.use_peer_verification = kwargs.get('use_peer_verification', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'SalesforceMarketingCloud' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_marketing_cloud_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_marketing_cloud_linked_service_py3.py deleted file mode 100644 index 863b679398e1..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_marketing_cloud_linked_service_py3.py +++ /dev/null @@ -1,91 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class SalesforceMarketingCloudLinkedService(LinkedService): - """Salesforce Marketing Cloud linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param client_id: Required. The client ID associated with the Salesforce - Marketing Cloud application. Type: string (or Expression with resultType - string). - :type client_id: object - :param client_secret: The client secret associated with the Salesforce - Marketing Cloud application. Type: string (or Expression with resultType - string). - :type client_secret: ~azure.mgmt.datafactory.models.SecretBase - :param use_encrypted_endpoints: Specifies whether the data source - endpoints are encrypted using HTTPS. The default value is true. Type: - boolean (or Expression with resultType boolean). - :type use_encrypted_endpoints: object - :param use_host_verification: Specifies whether to require the host name - in the server's certificate to match the host name of the server when - connecting over SSL. The default value is true. Type: boolean (or - Expression with resultType boolean). - :type use_host_verification: object - :param use_peer_verification: Specifies whether to verify the identity of - the server when connecting over SSL. The default value is true. Type: - boolean (or Expression with resultType boolean). - :type use_peer_verification: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'client_id': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, - 'client_secret': {'key': 'typeProperties.clientSecret', 'type': 'SecretBase'}, - 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, - 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, - 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, client_id, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, client_secret=None, use_encrypted_endpoints=None, use_host_verification=None, use_peer_verification=None, encrypted_credential=None, **kwargs) -> None: - super(SalesforceMarketingCloudLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.client_id = client_id - self.client_secret = client_secret - self.use_encrypted_endpoints = use_encrypted_endpoints - self.use_host_verification = use_host_verification - self.use_peer_verification = use_peer_verification - self.encrypted_credential = encrypted_credential - self.type = 'SalesforceMarketingCloud' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_marketing_cloud_object_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_marketing_cloud_object_dataset.py deleted file mode 100644 index 20f581ce1c50..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_marketing_cloud_object_dataset.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class SalesforceMarketingCloudObjectDataset(Dataset): - """Salesforce Marketing Cloud dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(SalesforceMarketingCloudObjectDataset, self).__init__(**kwargs) - self.table_name = kwargs.get('table_name', None) - self.type = 'SalesforceMarketingCloudObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_marketing_cloud_object_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_marketing_cloud_object_dataset_py3.py deleted file mode 100644 index 526ac806649f..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_marketing_cloud_object_dataset_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class SalesforceMarketingCloudObjectDataset(Dataset): - """Salesforce Marketing Cloud dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: - super(SalesforceMarketingCloudObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.table_name = table_name - self.type = 'SalesforceMarketingCloudObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_marketing_cloud_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_marketing_cloud_source.py deleted file mode 100644 index bf08fdaa88bf..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_marketing_cloud_source.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class SalesforceMarketingCloudSource(CopySource): - """A copy activity Salesforce Marketing Cloud source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(SalesforceMarketingCloudSource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.type = 'SalesforceMarketingCloudSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_marketing_cloud_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_marketing_cloud_source_py3.py deleted file mode 100644 index 0a3d26cfb43b..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_marketing_cloud_source_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class SalesforceMarketingCloudSource(CopySource): - """A copy activity Salesforce Marketing Cloud source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query=None, **kwargs) -> None: - super(SalesforceMarketingCloudSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.type = 'SalesforceMarketingCloudSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_object_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_object_dataset.py deleted file mode 100644 index 10cfce97fe0f..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_object_dataset.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class SalesforceObjectDataset(Dataset): - """The Salesforce object dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param object_api_name: The Salesforce object API name. Type: string (or - Expression with resultType string). - :type object_api_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'object_api_name': {'key': 'typeProperties.objectApiName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(SalesforceObjectDataset, self).__init__(**kwargs) - self.object_api_name = kwargs.get('object_api_name', None) - self.type = 'SalesforceObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_object_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_object_dataset_py3.py deleted file mode 100644 index 3c3f75d6059e..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_object_dataset_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class SalesforceObjectDataset(Dataset): - """The Salesforce object dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param object_api_name: The Salesforce object API name. Type: string (or - Expression with resultType string). - :type object_api_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'object_api_name': {'key': 'typeProperties.objectApiName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, object_api_name=None, **kwargs) -> None: - super(SalesforceObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.object_api_name = object_api_name - self.type = 'SalesforceObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_sink.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_sink.py deleted file mode 100644 index 525aaccd49be..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_sink.py +++ /dev/null @@ -1,79 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_sink import CopySink - - -class SalesforceSink(CopySink): - """A copy activity Salesforce sink. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param write_batch_size: Write batch size. Type: integer (or Expression - with resultType integer), minimum: 0. - :type write_batch_size: object - :param write_batch_timeout: Write batch timeout. Type: string (or - Expression with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type write_batch_timeout: object - :param sink_retry_count: Sink retry count. Type: integer (or Expression - with resultType integer). - :type sink_retry_count: object - :param sink_retry_wait: Sink retry wait. Type: string (or Expression with - resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type sink_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param write_behavior: The write behavior for the operation. Default is - Insert. Possible values include: 'Insert', 'Upsert' - :type write_behavior: str or - ~azure.mgmt.datafactory.models.SalesforceSinkWriteBehavior - :param external_id_field_name: The name of the external ID field for - upsert operation. Default value is 'Id' column. Type: string (or - Expression with resultType string). - :type external_id_field_name: object - :param ignore_null_values: The flag indicating whether or not to ignore - null values from input dataset (except key fields) during write operation. - Default value is false. If set it to true, it means ADF will leave the - data in the destination object unchanged when doing upsert/update - operation and insert defined default value when doing insert operation, - versus ADF will update the data in the destination object to NULL when - doing upsert/update operation and insert NULL value when doing insert - operation. Type: boolean (or Expression with resultType boolean). - :type ignore_null_values: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, - 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, - 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, - 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'write_behavior': {'key': 'writeBehavior', 'type': 'str'}, - 'external_id_field_name': {'key': 'externalIdFieldName', 'type': 'object'}, - 'ignore_null_values': {'key': 'ignoreNullValues', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(SalesforceSink, self).__init__(**kwargs) - self.write_behavior = kwargs.get('write_behavior', None) - self.external_id_field_name = kwargs.get('external_id_field_name', None) - self.ignore_null_values = kwargs.get('ignore_null_values', None) - self.type = 'SalesforceSink' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_sink_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_sink_py3.py deleted file mode 100644 index 6db44ebb4228..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_sink_py3.py +++ /dev/null @@ -1,79 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_sink_py3 import CopySink - - -class SalesforceSink(CopySink): - """A copy activity Salesforce sink. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param write_batch_size: Write batch size. Type: integer (or Expression - with resultType integer), minimum: 0. - :type write_batch_size: object - :param write_batch_timeout: Write batch timeout. Type: string (or - Expression with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type write_batch_timeout: object - :param sink_retry_count: Sink retry count. Type: integer (or Expression - with resultType integer). - :type sink_retry_count: object - :param sink_retry_wait: Sink retry wait. Type: string (or Expression with - resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type sink_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param write_behavior: The write behavior for the operation. Default is - Insert. Possible values include: 'Insert', 'Upsert' - :type write_behavior: str or - ~azure.mgmt.datafactory.models.SalesforceSinkWriteBehavior - :param external_id_field_name: The name of the external ID field for - upsert operation. Default value is 'Id' column. Type: string (or - Expression with resultType string). - :type external_id_field_name: object - :param ignore_null_values: The flag indicating whether or not to ignore - null values from input dataset (except key fields) during write operation. - Default value is false. If set it to true, it means ADF will leave the - data in the destination object unchanged when doing upsert/update - operation and insert defined default value when doing insert operation, - versus ADF will update the data in the destination object to NULL when - doing upsert/update operation and insert NULL value when doing insert - operation. Type: boolean (or Expression with resultType boolean). - :type ignore_null_values: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, - 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, - 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, - 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'write_behavior': {'key': 'writeBehavior', 'type': 'str'}, - 'external_id_field_name': {'key': 'externalIdFieldName', 'type': 'object'}, - 'ignore_null_values': {'key': 'ignoreNullValues', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, write_behavior=None, external_id_field_name=None, ignore_null_values=None, **kwargs) -> None: - super(SalesforceSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, **kwargs) - self.write_behavior = write_behavior - self.external_id_field_name = external_id_field_name - self.ignore_null_values = ignore_null_values - self.type = 'SalesforceSink' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_source.py deleted file mode 100644 index 8442a716c842..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_source.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class SalesforceSource(CopySource): - """A copy activity Salesforce source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: Database query. Type: string (or Expression with resultType - string). - :type query: object - :param read_behavior: The read behavior for the operation. Default is - Query. Possible values include: 'Query', 'QueryAll' - :type read_behavior: str or - ~azure.mgmt.datafactory.models.SalesforceSourceReadBehavior - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - 'read_behavior': {'key': 'readBehavior', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SalesforceSource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.read_behavior = kwargs.get('read_behavior', None) - self.type = 'SalesforceSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_source_py3.py deleted file mode 100644 index 9ebc65ddeec8..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/salesforce_source_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class SalesforceSource(CopySource): - """A copy activity Salesforce source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: Database query. Type: string (or Expression with resultType - string). - :type query: object - :param read_behavior: The read behavior for the operation. Default is - Query. Possible values include: 'Query', 'QueryAll' - :type read_behavior: str or - ~azure.mgmt.datafactory.models.SalesforceSourceReadBehavior - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - 'read_behavior': {'key': 'readBehavior', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query=None, read_behavior=None, **kwargs) -> None: - super(SalesforceSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.read_behavior = read_behavior - self.type = 'SalesforceSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_bw_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_bw_linked_service.py deleted file mode 100644 index 2fbb906559bc..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_bw_linked_service.py +++ /dev/null @@ -1,88 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class SapBWLinkedService(LinkedService): - """SAP Business Warehouse Linked Service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param server: Required. Host name of the SAP BW instance. Type: string - (or Expression with resultType string). - :type server: object - :param system_number: Required. System number of the BW system. (Usually a - two-digit decimal number represented as a string.) Type: string (or - Expression with resultType string). - :type system_number: object - :param client_id: Required. Client ID of the client on the BW system. - (Usually a three-digit decimal number represented as a string) Type: - string (or Expression with resultType string). - :type client_id: object - :param user_name: Username to access the SAP BW server. Type: string (or - Expression with resultType string). - :type user_name: object - :param password: Password to access the SAP BW server. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'server': {'required': True}, - 'system_number': {'required': True}, - 'client_id': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'server': {'key': 'typeProperties.server', 'type': 'object'}, - 'system_number': {'key': 'typeProperties.systemNumber', 'type': 'object'}, - 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, - 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(SapBWLinkedService, self).__init__(**kwargs) - self.server = kwargs.get('server', None) - self.system_number = kwargs.get('system_number', None) - self.client_id = kwargs.get('client_id', None) - self.user_name = kwargs.get('user_name', None) - self.password = kwargs.get('password', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'SapBW' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_bw_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_bw_linked_service_py3.py deleted file mode 100644 index a1f6133e558d..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_bw_linked_service_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class SapBWLinkedService(LinkedService): - """SAP Business Warehouse Linked Service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param server: Required. Host name of the SAP BW instance. Type: string - (or Expression with resultType string). - :type server: object - :param system_number: Required. System number of the BW system. (Usually a - two-digit decimal number represented as a string.) Type: string (or - Expression with resultType string). - :type system_number: object - :param client_id: Required. Client ID of the client on the BW system. - (Usually a three-digit decimal number represented as a string) Type: - string (or Expression with resultType string). - :type client_id: object - :param user_name: Username to access the SAP BW server. Type: string (or - Expression with resultType string). - :type user_name: object - :param password: Password to access the SAP BW server. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'server': {'required': True}, - 'system_number': {'required': True}, - 'client_id': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'server': {'key': 'typeProperties.server', 'type': 'object'}, - 'system_number': {'key': 'typeProperties.systemNumber', 'type': 'object'}, - 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, - 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, server, system_number, client_id, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, user_name=None, password=None, encrypted_credential=None, **kwargs) -> None: - super(SapBWLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.server = server - self.system_number = system_number - self.client_id = client_id - self.user_name = user_name - self.password = password - self.encrypted_credential = encrypted_credential - self.type = 'SapBW' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_cloud_for_customer_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_cloud_for_customer_linked_service.py deleted file mode 100644 index 5c9a6c2deb00..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_cloud_for_customer_linked_service.py +++ /dev/null @@ -1,76 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class SapCloudForCustomerLinkedService(LinkedService): - """Linked service for SAP Cloud for Customer. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param url: Required. The URL of SAP Cloud for Customer OData API. For - example, '[https://[tenantname].crm.ondemand.com/sap/c4c/odata/v1]'. Type: - string (or Expression with resultType string). - :type url: object - :param username: The username for Basic authentication. Type: string (or - Expression with resultType string). - :type username: object - :param password: The password for Basic authentication. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Either encryptedCredential or username/password must - be provided. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'url': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'url': {'key': 'typeProperties.url', 'type': 'object'}, - 'username': {'key': 'typeProperties.username', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(SapCloudForCustomerLinkedService, self).__init__(**kwargs) - self.url = kwargs.get('url', None) - self.username = kwargs.get('username', None) - self.password = kwargs.get('password', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'SapCloudForCustomer' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_cloud_for_customer_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_cloud_for_customer_linked_service_py3.py deleted file mode 100644 index 85c1100d01eb..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_cloud_for_customer_linked_service_py3.py +++ /dev/null @@ -1,76 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class SapCloudForCustomerLinkedService(LinkedService): - """Linked service for SAP Cloud for Customer. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param url: Required. The URL of SAP Cloud for Customer OData API. For - example, '[https://[tenantname].crm.ondemand.com/sap/c4c/odata/v1]'. Type: - string (or Expression with resultType string). - :type url: object - :param username: The username for Basic authentication. Type: string (or - Expression with resultType string). - :type username: object - :param password: The password for Basic authentication. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Either encryptedCredential or username/password must - be provided. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'url': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'url': {'key': 'typeProperties.url', 'type': 'object'}, - 'username': {'key': 'typeProperties.username', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, url, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, username=None, password=None, encrypted_credential=None, **kwargs) -> None: - super(SapCloudForCustomerLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.url = url - self.username = username - self.password = password - self.encrypted_credential = encrypted_credential - self.type = 'SapCloudForCustomer' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_cloud_for_customer_resource_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_cloud_for_customer_resource_dataset.py deleted file mode 100644 index 436b251207a4..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_cloud_for_customer_resource_dataset.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class SapCloudForCustomerResourceDataset(Dataset): - """The path of the SAP Cloud for Customer OData entity. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param path: Required. The path of the SAP Cloud for Customer OData - entity. Type: string (or Expression with resultType string). - :type path: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - 'path': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'path': {'key': 'typeProperties.path', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(SapCloudForCustomerResourceDataset, self).__init__(**kwargs) - self.path = kwargs.get('path', None) - self.type = 'SapCloudForCustomerResource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_cloud_for_customer_resource_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_cloud_for_customer_resource_dataset_py3.py deleted file mode 100644 index 455bad7c9095..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_cloud_for_customer_resource_dataset_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class SapCloudForCustomerResourceDataset(Dataset): - """The path of the SAP Cloud for Customer OData entity. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param path: Required. The path of the SAP Cloud for Customer OData - entity. Type: string (or Expression with resultType string). - :type path: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - 'path': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'path': {'key': 'typeProperties.path', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, path, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, **kwargs) -> None: - super(SapCloudForCustomerResourceDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.path = path - self.type = 'SapCloudForCustomerResource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_cloud_for_customer_sink.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_cloud_for_customer_sink.py deleted file mode 100644 index 05d98ec70eaa..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_cloud_for_customer_sink.py +++ /dev/null @@ -1,62 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_sink import CopySink - - -class SapCloudForCustomerSink(CopySink): - """A copy activity SAP Cloud for Customer sink. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param write_batch_size: Write batch size. Type: integer (or Expression - with resultType integer), minimum: 0. - :type write_batch_size: object - :param write_batch_timeout: Write batch timeout. Type: string (or - Expression with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type write_batch_timeout: object - :param sink_retry_count: Sink retry count. Type: integer (or Expression - with resultType integer). - :type sink_retry_count: object - :param sink_retry_wait: Sink retry wait. Type: string (or Expression with - resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type sink_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param write_behavior: The write behavior for the operation. Default is - 'Insert'. Possible values include: 'Insert', 'Update' - :type write_behavior: str or - ~azure.mgmt.datafactory.models.SapCloudForCustomerSinkWriteBehavior - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, - 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, - 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, - 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'write_behavior': {'key': 'writeBehavior', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SapCloudForCustomerSink, self).__init__(**kwargs) - self.write_behavior = kwargs.get('write_behavior', None) - self.type = 'SapCloudForCustomerSink' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_cloud_for_customer_sink_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_cloud_for_customer_sink_py3.py deleted file mode 100644 index f3cd45263f3e..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_cloud_for_customer_sink_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_sink_py3 import CopySink - - -class SapCloudForCustomerSink(CopySink): - """A copy activity SAP Cloud for Customer sink. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param write_batch_size: Write batch size. Type: integer (or Expression - with resultType integer), minimum: 0. - :type write_batch_size: object - :param write_batch_timeout: Write batch timeout. Type: string (or - Expression with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type write_batch_timeout: object - :param sink_retry_count: Sink retry count. Type: integer (or Expression - with resultType integer). - :type sink_retry_count: object - :param sink_retry_wait: Sink retry wait. Type: string (or Expression with - resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type sink_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param write_behavior: The write behavior for the operation. Default is - 'Insert'. Possible values include: 'Insert', 'Update' - :type write_behavior: str or - ~azure.mgmt.datafactory.models.SapCloudForCustomerSinkWriteBehavior - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, - 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, - 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, - 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'write_behavior': {'key': 'writeBehavior', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, write_behavior=None, **kwargs) -> None: - super(SapCloudForCustomerSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, **kwargs) - self.write_behavior = write_behavior - self.type = 'SapCloudForCustomerSink' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_cloud_for_customer_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_cloud_for_customer_source.py deleted file mode 100644 index c8dedf91e188..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_cloud_for_customer_source.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class SapCloudForCustomerSource(CopySource): - """A copy activity source for SAP Cloud for Customer source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: SAP Cloud for Customer OData query. For example, "$top=1". - Type: string (or Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(SapCloudForCustomerSource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.type = 'SapCloudForCustomerSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_cloud_for_customer_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_cloud_for_customer_source_py3.py deleted file mode 100644 index ab5bddf21be3..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_cloud_for_customer_source_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class SapCloudForCustomerSource(CopySource): - """A copy activity source for SAP Cloud for Customer source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: SAP Cloud for Customer OData query. For example, "$top=1". - Type: string (or Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query=None, **kwargs) -> None: - super(SapCloudForCustomerSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.type = 'SapCloudForCustomerSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_ecc_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_ecc_linked_service.py deleted file mode 100644 index 4303b2f9cbca..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_ecc_linked_service.py +++ /dev/null @@ -1,76 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class SapEccLinkedService(LinkedService): - """Linked service for SAP ERP Central Component(SAP ECC). - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param url: Required. The URL of SAP ECC OData API. For example, - '[https://hostname:port/sap/opu/odata/sap/servicename/]'. Type: string (or - Expression with resultType string). - :type url: str - :param username: The username for Basic authentication. Type: string (or - Expression with resultType string). - :type username: str - :param password: The password for Basic authentication. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Either encryptedCredential or username/password must - be provided. Type: string (or Expression with resultType string). - :type encrypted_credential: str - """ - - _validation = { - 'type': {'required': True}, - 'url': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'url': {'key': 'typeProperties.url', 'type': 'str'}, - 'username': {'key': 'typeProperties.username', 'type': 'str'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SapEccLinkedService, self).__init__(**kwargs) - self.url = kwargs.get('url', None) - self.username = kwargs.get('username', None) - self.password = kwargs.get('password', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'SapEcc' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_ecc_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_ecc_linked_service_py3.py deleted file mode 100644 index 24490fb39a9a..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_ecc_linked_service_py3.py +++ /dev/null @@ -1,76 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class SapEccLinkedService(LinkedService): - """Linked service for SAP ERP Central Component(SAP ECC). - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param url: Required. The URL of SAP ECC OData API. For example, - '[https://hostname:port/sap/opu/odata/sap/servicename/]'. Type: string (or - Expression with resultType string). - :type url: str - :param username: The username for Basic authentication. Type: string (or - Expression with resultType string). - :type username: str - :param password: The password for Basic authentication. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Either encryptedCredential or username/password must - be provided. Type: string (or Expression with resultType string). - :type encrypted_credential: str - """ - - _validation = { - 'type': {'required': True}, - 'url': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'url': {'key': 'typeProperties.url', 'type': 'str'}, - 'username': {'key': 'typeProperties.username', 'type': 'str'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'str'}, - } - - def __init__(self, *, url: str, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, username: str=None, password=None, encrypted_credential: str=None, **kwargs) -> None: - super(SapEccLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.url = url - self.username = username - self.password = password - self.encrypted_credential = encrypted_credential - self.type = 'SapEcc' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_ecc_resource_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_ecc_resource_dataset.py deleted file mode 100644 index e4f10113aecd..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_ecc_resource_dataset.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class SapEccResourceDataset(Dataset): - """The path of the SAP ECC OData entity. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param path: Required. The path of the SAP ECC OData entity. Type: string - (or Expression with resultType string). - :type path: str - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - 'path': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'path': {'key': 'typeProperties.path', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SapEccResourceDataset, self).__init__(**kwargs) - self.path = kwargs.get('path', None) - self.type = 'SapEccResource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_ecc_resource_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_ecc_resource_dataset_py3.py deleted file mode 100644 index 08bf742dc415..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_ecc_resource_dataset_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class SapEccResourceDataset(Dataset): - """The path of the SAP ECC OData entity. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param path: Required. The path of the SAP ECC OData entity. Type: string - (or Expression with resultType string). - :type path: str - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - 'path': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'path': {'key': 'typeProperties.path', 'type': 'str'}, - } - - def __init__(self, *, linked_service_name, path: str, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, **kwargs) -> None: - super(SapEccResourceDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.path = path - self.type = 'SapEccResource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_ecc_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_ecc_source.py deleted file mode 100644 index 84aa047e6d8a..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_ecc_source.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class SapEccSource(CopySource): - """A copy activity source for SAP ECC source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: SAP ECC OData query. For example, "$top=1". Type: string (or - Expression with resultType string). - :type query: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SapEccSource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.type = 'SapEccSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_ecc_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_ecc_source_py3.py deleted file mode 100644 index f8993720428c..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_ecc_source_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class SapEccSource(CopySource): - """A copy activity source for SAP ECC source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: SAP ECC OData query. For example, "$top=1". Type: string (or - Expression with resultType string). - :type query: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query: str=None, **kwargs) -> None: - super(SapEccSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.type = 'SapEccSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_hana_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_hana_linked_service.py deleted file mode 100644 index 0c2dbec28558..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_hana_linked_service.py +++ /dev/null @@ -1,80 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class SapHanaLinkedService(LinkedService): - """SAP HANA Linked Service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param server: Required. Host name of the SAP HANA server. Type: string - (or Expression with resultType string). - :type server: object - :param authentication_type: The authentication type to be used to connect - to the SAP HANA server. Possible values include: 'Basic', 'Windows' - :type authentication_type: str or - ~azure.mgmt.datafactory.models.SapHanaAuthenticationType - :param user_name: Username to access the SAP HANA server. Type: string (or - Expression with resultType string). - :type user_name: object - :param password: Password to access the SAP HANA server. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'server': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'server': {'key': 'typeProperties.server', 'type': 'object'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, - 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(SapHanaLinkedService, self).__init__(**kwargs) - self.server = kwargs.get('server', None) - self.authentication_type = kwargs.get('authentication_type', None) - self.user_name = kwargs.get('user_name', None) - self.password = kwargs.get('password', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'SapHana' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_hana_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_hana_linked_service_py3.py deleted file mode 100644 index c906d74d0c2b..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sap_hana_linked_service_py3.py +++ /dev/null @@ -1,80 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class SapHanaLinkedService(LinkedService): - """SAP HANA Linked Service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param server: Required. Host name of the SAP HANA server. Type: string - (or Expression with resultType string). - :type server: object - :param authentication_type: The authentication type to be used to connect - to the SAP HANA server. Possible values include: 'Basic', 'Windows' - :type authentication_type: str or - ~azure.mgmt.datafactory.models.SapHanaAuthenticationType - :param user_name: Username to access the SAP HANA server. Type: string (or - Expression with resultType string). - :type user_name: object - :param password: Password to access the SAP HANA server. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'server': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'server': {'key': 'typeProperties.server', 'type': 'object'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, - 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, server, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, authentication_type=None, user_name=None, password=None, encrypted_credential=None, **kwargs) -> None: - super(SapHanaLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.server = server - self.authentication_type = authentication_type - self.user_name = user_name - self.password = password - self.encrypted_credential = encrypted_credential - self.type = 'SapHana' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/schedule_trigger.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/schedule_trigger.py deleted file mode 100644 index eaebfb4c2553..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/schedule_trigger.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .multiple_pipeline_trigger import MultiplePipelineTrigger - - -class ScheduleTrigger(MultiplePipelineTrigger): - """Trigger that creates pipeline runs periodically, on schedule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Trigger description. - :type description: str - :ivar runtime_state: Indicates if trigger is running or not. Updated when - Start/Stop APIs are called on the Trigger. Possible values include: - 'Started', 'Stopped', 'Disabled' - :vartype runtime_state: str or - ~azure.mgmt.datafactory.models.TriggerRuntimeState - :param type: Required. Constant filled by server. - :type type: str - :param pipelines: Pipelines that need to be started. - :type pipelines: - list[~azure.mgmt.datafactory.models.TriggerPipelineReference] - :param recurrence: Required. Recurrence schedule configuration. - :type recurrence: ~azure.mgmt.datafactory.models.ScheduleTriggerRecurrence - """ - - _validation = { - 'runtime_state': {'readonly': True}, - 'type': {'required': True}, - 'recurrence': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'runtime_state': {'key': 'runtimeState', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'pipelines': {'key': 'pipelines', 'type': '[TriggerPipelineReference]'}, - 'recurrence': {'key': 'typeProperties.recurrence', 'type': 'ScheduleTriggerRecurrence'}, - } - - def __init__(self, **kwargs): - super(ScheduleTrigger, self).__init__(**kwargs) - self.recurrence = kwargs.get('recurrence', None) - self.type = 'ScheduleTrigger' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/schedule_trigger_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/schedule_trigger_py3.py deleted file mode 100644 index 1fc148a81b29..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/schedule_trigger_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .multiple_pipeline_trigger_py3 import MultiplePipelineTrigger - - -class ScheduleTrigger(MultiplePipelineTrigger): - """Trigger that creates pipeline runs periodically, on schedule. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Trigger description. - :type description: str - :ivar runtime_state: Indicates if trigger is running or not. Updated when - Start/Stop APIs are called on the Trigger. Possible values include: - 'Started', 'Stopped', 'Disabled' - :vartype runtime_state: str or - ~azure.mgmt.datafactory.models.TriggerRuntimeState - :param type: Required. Constant filled by server. - :type type: str - :param pipelines: Pipelines that need to be started. - :type pipelines: - list[~azure.mgmt.datafactory.models.TriggerPipelineReference] - :param recurrence: Required. Recurrence schedule configuration. - :type recurrence: ~azure.mgmt.datafactory.models.ScheduleTriggerRecurrence - """ - - _validation = { - 'runtime_state': {'readonly': True}, - 'type': {'required': True}, - 'recurrence': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'runtime_state': {'key': 'runtimeState', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'pipelines': {'key': 'pipelines', 'type': '[TriggerPipelineReference]'}, - 'recurrence': {'key': 'typeProperties.recurrence', 'type': 'ScheduleTriggerRecurrence'}, - } - - def __init__(self, *, recurrence, additional_properties=None, description: str=None, pipelines=None, **kwargs) -> None: - super(ScheduleTrigger, self).__init__(additional_properties=additional_properties, description=description, pipelines=pipelines, **kwargs) - self.recurrence = recurrence - self.type = 'ScheduleTrigger' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/schedule_trigger_recurrence.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/schedule_trigger_recurrence.py deleted file mode 100644 index 85408c45547b..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/schedule_trigger_recurrence.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ScheduleTriggerRecurrence(Model): - """The workflow trigger recurrence. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param frequency: The frequency. Possible values include: 'NotSpecified', - 'Minute', 'Hour', 'Day', 'Week', 'Month', 'Year' - :type frequency: str or ~azure.mgmt.datafactory.models.RecurrenceFrequency - :param interval: The interval. - :type interval: int - :param start_time: The start time. - :type start_time: datetime - :param end_time: The end time. - :type end_time: datetime - :param time_zone: The time zone. - :type time_zone: str - :param schedule: The recurrence schedule. - :type schedule: ~azure.mgmt.datafactory.models.RecurrenceSchedule - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'frequency': {'key': 'frequency', 'type': 'str'}, - 'interval': {'key': 'interval', 'type': 'int'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'time_zone': {'key': 'timeZone', 'type': 'str'}, - 'schedule': {'key': 'schedule', 'type': 'RecurrenceSchedule'}, - } - - def __init__(self, **kwargs): - super(ScheduleTriggerRecurrence, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.frequency = kwargs.get('frequency', None) - self.interval = kwargs.get('interval', None) - self.start_time = kwargs.get('start_time', None) - self.end_time = kwargs.get('end_time', None) - self.time_zone = kwargs.get('time_zone', None) - self.schedule = kwargs.get('schedule', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/schedule_trigger_recurrence_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/schedule_trigger_recurrence_py3.py deleted file mode 100644 index a9b6eded7b96..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/schedule_trigger_recurrence_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ScheduleTriggerRecurrence(Model): - """The workflow trigger recurrence. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param frequency: The frequency. Possible values include: 'NotSpecified', - 'Minute', 'Hour', 'Day', 'Week', 'Month', 'Year' - :type frequency: str or ~azure.mgmt.datafactory.models.RecurrenceFrequency - :param interval: The interval. - :type interval: int - :param start_time: The start time. - :type start_time: datetime - :param end_time: The end time. - :type end_time: datetime - :param time_zone: The time zone. - :type time_zone: str - :param schedule: The recurrence schedule. - :type schedule: ~azure.mgmt.datafactory.models.RecurrenceSchedule - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'frequency': {'key': 'frequency', 'type': 'str'}, - 'interval': {'key': 'interval', 'type': 'int'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'time_zone': {'key': 'timeZone', 'type': 'str'}, - 'schedule': {'key': 'schedule', 'type': 'RecurrenceSchedule'}, - } - - def __init__(self, *, additional_properties=None, frequency=None, interval: int=None, start_time=None, end_time=None, time_zone: str=None, schedule=None, **kwargs) -> None: - super(ScheduleTriggerRecurrence, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.frequency = frequency - self.interval = interval - self.start_time = start_time - self.end_time = end_time - self.time_zone = time_zone - self.schedule = schedule diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/script_action.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/script_action.py deleted file mode 100644 index 50bc0131a5cf..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/script_action.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ScriptAction(Model): - """Custom script action to run on HDI ondemand cluster once it's up. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The user provided name of the script action. - :type name: str - :param uri: Required. The URI for the script action. - :type uri: str - :param roles: Required. The node types on which the script action should - be executed. - :type roles: object - :param parameters: The parameters for the script action. - :type parameters: str - """ - - _validation = { - 'name': {'required': True}, - 'uri': {'required': True}, - 'roles': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'uri': {'key': 'uri', 'type': 'str'}, - 'roles': {'key': 'roles', 'type': 'object'}, - 'parameters': {'key': 'parameters', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ScriptAction, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.uri = kwargs.get('uri', None) - self.roles = kwargs.get('roles', None) - self.parameters = kwargs.get('parameters', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/script_action_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/script_action_py3.py deleted file mode 100644 index c0e278073219..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/script_action_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ScriptAction(Model): - """Custom script action to run on HDI ondemand cluster once it's up. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The user provided name of the script action. - :type name: str - :param uri: Required. The URI for the script action. - :type uri: str - :param roles: Required. The node types on which the script action should - be executed. - :type roles: object - :param parameters: The parameters for the script action. - :type parameters: str - """ - - _validation = { - 'name': {'required': True}, - 'uri': {'required': True}, - 'roles': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'uri': {'key': 'uri', 'type': 'str'}, - 'roles': {'key': 'roles', 'type': 'object'}, - 'parameters': {'key': 'parameters', 'type': 'str'}, - } - - def __init__(self, *, name: str, uri: str, roles, parameters: str=None, **kwargs) -> None: - super(ScriptAction, self).__init__(**kwargs) - self.name = name - self.uri = uri - self.roles = roles - self.parameters = parameters diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/secret_base.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/secret_base.py deleted file mode 100644 index 3d9475dd4382..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/secret_base.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SecretBase(Model): - """The base definition of a secret type. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: SecureString, AzureKeyVaultSecretReference - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'SecureString': 'SecureString', 'AzureKeyVaultSecret': 'AzureKeyVaultSecretReference'} - } - - def __init__(self, **kwargs): - super(SecretBase, self).__init__(**kwargs) - self.type = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/secret_base_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/secret_base_py3.py deleted file mode 100644 index 29403e61b245..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/secret_base_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SecretBase(Model): - """The base definition of a secret type. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: SecureString, AzureKeyVaultSecretReference - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'SecureString': 'SecureString', 'AzureKeyVaultSecret': 'AzureKeyVaultSecretReference'} - } - - def __init__(self, **kwargs) -> None: - super(SecretBase, self).__init__(**kwargs) - self.type = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/secure_string.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/secure_string.py deleted file mode 100644 index bec430fdf8a4..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/secure_string.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .secret_base import SecretBase - - -class SecureString(SecretBase): - """Azure Data Factory secure string definition. The string value will be - masked with asterisks '*' during Get or List API calls. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param value: Required. Value of secure string. - :type value: str - """ - - _validation = { - 'type': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SecureString, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.type = 'SecureString' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/secure_string_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/secure_string_py3.py deleted file mode 100644 index d7ebd5e13e78..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/secure_string_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .secret_base_py3 import SecretBase - - -class SecureString(SecretBase): - """Azure Data Factory secure string definition. The string value will be - masked with asterisks '*' during Get or List API calls. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param value: Required. Value of secure string. - :type value: str - """ - - _validation = { - 'type': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, value: str, **kwargs) -> None: - super(SecureString, self).__init__(**kwargs) - self.value = value - self.type = 'SecureString' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/self_dependency_tumbling_window_trigger_reference.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/self_dependency_tumbling_window_trigger_reference.py deleted file mode 100644 index fc56f8e8a799..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/self_dependency_tumbling_window_trigger_reference.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dependency_reference import DependencyReference - - -class SelfDependencyTumblingWindowTriggerReference(DependencyReference): - """Self referenced tumbling window trigger dependency. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param offset: Required. Timespan applied to the start time of a tumbling - window when evaluating dependency. - :type offset: str - :param size: The size of the window when evaluating the dependency. If - undefined the frequency of the tumbling window will be used. - :type size: str - """ - - _validation = { - 'type': {'required': True}, - 'offset': {'required': True, 'max_length': 15, 'min_length': 8, 'pattern': r'((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9]))'}, - 'size': {'max_length': 15, 'min_length': 8, 'pattern': r'((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9]))'}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'offset': {'key': 'offset', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SelfDependencyTumblingWindowTriggerReference, self).__init__(**kwargs) - self.offset = kwargs.get('offset', None) - self.size = kwargs.get('size', None) - self.type = 'SelfDependencyTumblingWindowTriggerReference' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/self_dependency_tumbling_window_trigger_reference_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/self_dependency_tumbling_window_trigger_reference_py3.py deleted file mode 100644 index 1dd1e575c2e8..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/self_dependency_tumbling_window_trigger_reference_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dependency_reference_py3 import DependencyReference - - -class SelfDependencyTumblingWindowTriggerReference(DependencyReference): - """Self referenced tumbling window trigger dependency. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param offset: Required. Timespan applied to the start time of a tumbling - window when evaluating dependency. - :type offset: str - :param size: The size of the window when evaluating the dependency. If - undefined the frequency of the tumbling window will be used. - :type size: str - """ - - _validation = { - 'type': {'required': True}, - 'offset': {'required': True, 'max_length': 15, 'min_length': 8, 'pattern': r'((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9]))'}, - 'size': {'max_length': 15, 'min_length': 8, 'pattern': r'((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9]))'}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'offset': {'key': 'offset', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'str'}, - } - - def __init__(self, *, offset: str, size: str=None, **kwargs) -> None: - super(SelfDependencyTumblingWindowTriggerReference, self).__init__(**kwargs) - self.offset = offset - self.size = size - self.type = 'SelfDependencyTumblingWindowTriggerReference' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/self_hosted_integration_runtime.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/self_hosted_integration_runtime.py deleted file mode 100644 index 20744f02306d..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/self_hosted_integration_runtime.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .integration_runtime import IntegrationRuntime - - -class SelfHostedIntegrationRuntime(IntegrationRuntime): - """Self-hosted integration runtime. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Integration runtime description. - :type description: str - :param type: Required. Constant filled by server. - :type type: str - :param linked_info: - :type linked_info: - ~azure.mgmt.datafactory.models.LinkedIntegrationRuntimeType - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_info': {'key': 'typeProperties.linkedInfo', 'type': 'LinkedIntegrationRuntimeType'}, - } - - def __init__(self, **kwargs): - super(SelfHostedIntegrationRuntime, self).__init__(**kwargs) - self.linked_info = kwargs.get('linked_info', None) - self.type = 'SelfHosted' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/self_hosted_integration_runtime_node.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/self_hosted_integration_runtime_node.py deleted file mode 100644 index 1491a80dc19a..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/self_hosted_integration_runtime_node.py +++ /dev/null @@ -1,139 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SelfHostedIntegrationRuntimeNode(Model): - """Properties of Self-hosted integration runtime node. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar node_name: Name of the integration runtime node. - :vartype node_name: str - :ivar machine_name: Machine name of the integration runtime node. - :vartype machine_name: str - :ivar host_service_uri: URI for the host machine of the integration - runtime. - :vartype host_service_uri: str - :ivar status: Status of the integration runtime node. Possible values - include: 'NeedRegistration', 'Online', 'Limited', 'Offline', 'Upgrading', - 'Initializing', 'InitializeFailed' - :vartype status: str or - ~azure.mgmt.datafactory.models.SelfHostedIntegrationRuntimeNodeStatus - :ivar capabilities: The integration runtime capabilities dictionary - :vartype capabilities: dict[str, str] - :ivar version_status: Status of the integration runtime node version. - :vartype version_status: str - :ivar version: Version of the integration runtime node. - :vartype version: str - :ivar register_time: The time at which the integration runtime node was - registered in ISO8601 format. - :vartype register_time: datetime - :ivar last_connect_time: The most recent time at which the integration - runtime was connected in ISO8601 format. - :vartype last_connect_time: datetime - :ivar expiry_time: The time at which the integration runtime will expire - in ISO8601 format. - :vartype expiry_time: datetime - :ivar last_start_time: The time the node last started up. - :vartype last_start_time: datetime - :ivar last_stop_time: The integration runtime node last stop time. - :vartype last_stop_time: datetime - :ivar last_update_result: The result of the last integration runtime node - update. Possible values include: 'None', 'Succeed', 'Fail' - :vartype last_update_result: str or - ~azure.mgmt.datafactory.models.IntegrationRuntimeUpdateResult - :ivar last_start_update_time: The last time for the integration runtime - node update start. - :vartype last_start_update_time: datetime - :ivar last_end_update_time: The last time for the integration runtime node - update end. - :vartype last_end_update_time: datetime - :ivar is_active_dispatcher: Indicates whether this node is the active - dispatcher for integration runtime requests. - :vartype is_active_dispatcher: bool - :ivar concurrent_jobs_limit: Maximum concurrent jobs on the integration - runtime node. - :vartype concurrent_jobs_limit: int - :ivar max_concurrent_jobs: The maximum concurrent jobs in this integration - runtime. - :vartype max_concurrent_jobs: int - """ - - _validation = { - 'node_name': {'readonly': True}, - 'machine_name': {'readonly': True}, - 'host_service_uri': {'readonly': True}, - 'status': {'readonly': True}, - 'capabilities': {'readonly': True}, - 'version_status': {'readonly': True}, - 'version': {'readonly': True}, - 'register_time': {'readonly': True}, - 'last_connect_time': {'readonly': True}, - 'expiry_time': {'readonly': True}, - 'last_start_time': {'readonly': True}, - 'last_stop_time': {'readonly': True}, - 'last_update_result': {'readonly': True}, - 'last_start_update_time': {'readonly': True}, - 'last_end_update_time': {'readonly': True}, - 'is_active_dispatcher': {'readonly': True}, - 'concurrent_jobs_limit': {'readonly': True}, - 'max_concurrent_jobs': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'node_name': {'key': 'nodeName', 'type': 'str'}, - 'machine_name': {'key': 'machineName', 'type': 'str'}, - 'host_service_uri': {'key': 'hostServiceUri', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'capabilities': {'key': 'capabilities', 'type': '{str}'}, - 'version_status': {'key': 'versionStatus', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - 'register_time': {'key': 'registerTime', 'type': 'iso-8601'}, - 'last_connect_time': {'key': 'lastConnectTime', 'type': 'iso-8601'}, - 'expiry_time': {'key': 'expiryTime', 'type': 'iso-8601'}, - 'last_start_time': {'key': 'lastStartTime', 'type': 'iso-8601'}, - 'last_stop_time': {'key': 'lastStopTime', 'type': 'iso-8601'}, - 'last_update_result': {'key': 'lastUpdateResult', 'type': 'str'}, - 'last_start_update_time': {'key': 'lastStartUpdateTime', 'type': 'iso-8601'}, - 'last_end_update_time': {'key': 'lastEndUpdateTime', 'type': 'iso-8601'}, - 'is_active_dispatcher': {'key': 'isActiveDispatcher', 'type': 'bool'}, - 'concurrent_jobs_limit': {'key': 'concurrentJobsLimit', 'type': 'int'}, - 'max_concurrent_jobs': {'key': 'maxConcurrentJobs', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(SelfHostedIntegrationRuntimeNode, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.node_name = None - self.machine_name = None - self.host_service_uri = None - self.status = None - self.capabilities = None - self.version_status = None - self.version = None - self.register_time = None - self.last_connect_time = None - self.expiry_time = None - self.last_start_time = None - self.last_stop_time = None - self.last_update_result = None - self.last_start_update_time = None - self.last_end_update_time = None - self.is_active_dispatcher = None - self.concurrent_jobs_limit = None - self.max_concurrent_jobs = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/self_hosted_integration_runtime_node_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/self_hosted_integration_runtime_node_py3.py deleted file mode 100644 index 59b703737a5d..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/self_hosted_integration_runtime_node_py3.py +++ /dev/null @@ -1,139 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SelfHostedIntegrationRuntimeNode(Model): - """Properties of Self-hosted integration runtime node. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar node_name: Name of the integration runtime node. - :vartype node_name: str - :ivar machine_name: Machine name of the integration runtime node. - :vartype machine_name: str - :ivar host_service_uri: URI for the host machine of the integration - runtime. - :vartype host_service_uri: str - :ivar status: Status of the integration runtime node. Possible values - include: 'NeedRegistration', 'Online', 'Limited', 'Offline', 'Upgrading', - 'Initializing', 'InitializeFailed' - :vartype status: str or - ~azure.mgmt.datafactory.models.SelfHostedIntegrationRuntimeNodeStatus - :ivar capabilities: The integration runtime capabilities dictionary - :vartype capabilities: dict[str, str] - :ivar version_status: Status of the integration runtime node version. - :vartype version_status: str - :ivar version: Version of the integration runtime node. - :vartype version: str - :ivar register_time: The time at which the integration runtime node was - registered in ISO8601 format. - :vartype register_time: datetime - :ivar last_connect_time: The most recent time at which the integration - runtime was connected in ISO8601 format. - :vartype last_connect_time: datetime - :ivar expiry_time: The time at which the integration runtime will expire - in ISO8601 format. - :vartype expiry_time: datetime - :ivar last_start_time: The time the node last started up. - :vartype last_start_time: datetime - :ivar last_stop_time: The integration runtime node last stop time. - :vartype last_stop_time: datetime - :ivar last_update_result: The result of the last integration runtime node - update. Possible values include: 'None', 'Succeed', 'Fail' - :vartype last_update_result: str or - ~azure.mgmt.datafactory.models.IntegrationRuntimeUpdateResult - :ivar last_start_update_time: The last time for the integration runtime - node update start. - :vartype last_start_update_time: datetime - :ivar last_end_update_time: The last time for the integration runtime node - update end. - :vartype last_end_update_time: datetime - :ivar is_active_dispatcher: Indicates whether this node is the active - dispatcher for integration runtime requests. - :vartype is_active_dispatcher: bool - :ivar concurrent_jobs_limit: Maximum concurrent jobs on the integration - runtime node. - :vartype concurrent_jobs_limit: int - :ivar max_concurrent_jobs: The maximum concurrent jobs in this integration - runtime. - :vartype max_concurrent_jobs: int - """ - - _validation = { - 'node_name': {'readonly': True}, - 'machine_name': {'readonly': True}, - 'host_service_uri': {'readonly': True}, - 'status': {'readonly': True}, - 'capabilities': {'readonly': True}, - 'version_status': {'readonly': True}, - 'version': {'readonly': True}, - 'register_time': {'readonly': True}, - 'last_connect_time': {'readonly': True}, - 'expiry_time': {'readonly': True}, - 'last_start_time': {'readonly': True}, - 'last_stop_time': {'readonly': True}, - 'last_update_result': {'readonly': True}, - 'last_start_update_time': {'readonly': True}, - 'last_end_update_time': {'readonly': True}, - 'is_active_dispatcher': {'readonly': True}, - 'concurrent_jobs_limit': {'readonly': True}, - 'max_concurrent_jobs': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'node_name': {'key': 'nodeName', 'type': 'str'}, - 'machine_name': {'key': 'machineName', 'type': 'str'}, - 'host_service_uri': {'key': 'hostServiceUri', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'capabilities': {'key': 'capabilities', 'type': '{str}'}, - 'version_status': {'key': 'versionStatus', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - 'register_time': {'key': 'registerTime', 'type': 'iso-8601'}, - 'last_connect_time': {'key': 'lastConnectTime', 'type': 'iso-8601'}, - 'expiry_time': {'key': 'expiryTime', 'type': 'iso-8601'}, - 'last_start_time': {'key': 'lastStartTime', 'type': 'iso-8601'}, - 'last_stop_time': {'key': 'lastStopTime', 'type': 'iso-8601'}, - 'last_update_result': {'key': 'lastUpdateResult', 'type': 'str'}, - 'last_start_update_time': {'key': 'lastStartUpdateTime', 'type': 'iso-8601'}, - 'last_end_update_time': {'key': 'lastEndUpdateTime', 'type': 'iso-8601'}, - 'is_active_dispatcher': {'key': 'isActiveDispatcher', 'type': 'bool'}, - 'concurrent_jobs_limit': {'key': 'concurrentJobsLimit', 'type': 'int'}, - 'max_concurrent_jobs': {'key': 'maxConcurrentJobs', 'type': 'int'}, - } - - def __init__(self, *, additional_properties=None, **kwargs) -> None: - super(SelfHostedIntegrationRuntimeNode, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.node_name = None - self.machine_name = None - self.host_service_uri = None - self.status = None - self.capabilities = None - self.version_status = None - self.version = None - self.register_time = None - self.last_connect_time = None - self.expiry_time = None - self.last_start_time = None - self.last_stop_time = None - self.last_update_result = None - self.last_start_update_time = None - self.last_end_update_time = None - self.is_active_dispatcher = None - self.concurrent_jobs_limit = None - self.max_concurrent_jobs = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/self_hosted_integration_runtime_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/self_hosted_integration_runtime_py3.py deleted file mode 100644 index a25d04373849..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/self_hosted_integration_runtime_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .integration_runtime_py3 import IntegrationRuntime - - -class SelfHostedIntegrationRuntime(IntegrationRuntime): - """Self-hosted integration runtime. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Integration runtime description. - :type description: str - :param type: Required. Constant filled by server. - :type type: str - :param linked_info: - :type linked_info: - ~azure.mgmt.datafactory.models.LinkedIntegrationRuntimeType - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_info': {'key': 'typeProperties.linkedInfo', 'type': 'LinkedIntegrationRuntimeType'}, - } - - def __init__(self, *, additional_properties=None, description: str=None, linked_info=None, **kwargs) -> None: - super(SelfHostedIntegrationRuntime, self).__init__(additional_properties=additional_properties, description=description, **kwargs) - self.linked_info = linked_info - self.type = 'SelfHosted' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/self_hosted_integration_runtime_status.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/self_hosted_integration_runtime_status.py deleted file mode 100644 index 5dd9995987d9..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/self_hosted_integration_runtime_status.py +++ /dev/null @@ -1,146 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .integration_runtime_status import IntegrationRuntimeStatus - - -class SelfHostedIntegrationRuntimeStatus(IntegrationRuntimeStatus): - """Self-hosted integration runtime status. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar data_factory_name: The data factory name which the integration - runtime belong to. - :vartype data_factory_name: str - :ivar state: The state of integration runtime. Possible values include: - 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', - 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied' - :vartype state: str or - ~azure.mgmt.datafactory.models.IntegrationRuntimeState - :param type: Required. Constant filled by server. - :type type: str - :ivar create_time: The time at which the integration runtime was created, - in ISO8601 format. - :vartype create_time: datetime - :ivar task_queue_id: The task queue id of the integration runtime. - :vartype task_queue_id: str - :ivar internal_channel_encryption: It is used to set the encryption mode - for node-node communication channel (when more than 2 self-hosted - integration runtime nodes exist). Possible values include: 'NotSet', - 'SslEncrypted', 'NotEncrypted' - :vartype internal_channel_encryption: str or - ~azure.mgmt.datafactory.models.IntegrationRuntimeInternalChannelEncryptionMode - :ivar version: Version of the integration runtime. - :vartype version: str - :param nodes: The list of nodes for this integration runtime. - :type nodes: - list[~azure.mgmt.datafactory.models.SelfHostedIntegrationRuntimeNode] - :ivar scheduled_update_date: The date at which the integration runtime - will be scheduled to update, in ISO8601 format. - :vartype scheduled_update_date: datetime - :ivar update_delay_offset: The time in the date scheduled by service to - update the integration runtime, e.g., PT03H is 3 hours - :vartype update_delay_offset: str - :ivar local_time_zone_offset: The local time zone offset in hours. - :vartype local_time_zone_offset: str - :ivar capabilities: Object with additional information about integration - runtime capabilities. - :vartype capabilities: dict[str, str] - :ivar service_urls: The URLs for the services used in integration runtime - backend service. - :vartype service_urls: list[str] - :ivar auto_update: Whether Self-hosted integration runtime auto update has - been turned on. Possible values include: 'On', 'Off' - :vartype auto_update: str or - ~azure.mgmt.datafactory.models.IntegrationRuntimeAutoUpdate - :ivar version_status: Status of the integration runtime version. - :vartype version_status: str - :param links: The list of linked integration runtimes that are created to - share with this integration runtime. - :type links: list[~azure.mgmt.datafactory.models.LinkedIntegrationRuntime] - :ivar pushed_version: The version that the integration runtime is going to - update to. - :vartype pushed_version: str - :ivar latest_version: The latest version on download center. - :vartype latest_version: str - :ivar auto_update_eta: The estimated time when the self-hosted integration - runtime will be updated. - :vartype auto_update_eta: datetime - """ - - _validation = { - 'data_factory_name': {'readonly': True}, - 'state': {'readonly': True}, - 'type': {'required': True}, - 'create_time': {'readonly': True}, - 'task_queue_id': {'readonly': True}, - 'internal_channel_encryption': {'readonly': True}, - 'version': {'readonly': True}, - 'scheduled_update_date': {'readonly': True}, - 'update_delay_offset': {'readonly': True}, - 'local_time_zone_offset': {'readonly': True}, - 'capabilities': {'readonly': True}, - 'service_urls': {'readonly': True}, - 'auto_update': {'readonly': True}, - 'version_status': {'readonly': True}, - 'pushed_version': {'readonly': True}, - 'latest_version': {'readonly': True}, - 'auto_update_eta': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'data_factory_name': {'key': 'dataFactoryName', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'create_time': {'key': 'typeProperties.createTime', 'type': 'iso-8601'}, - 'task_queue_id': {'key': 'typeProperties.taskQueueId', 'type': 'str'}, - 'internal_channel_encryption': {'key': 'typeProperties.internalChannelEncryption', 'type': 'str'}, - 'version': {'key': 'typeProperties.version', 'type': 'str'}, - 'nodes': {'key': 'typeProperties.nodes', 'type': '[SelfHostedIntegrationRuntimeNode]'}, - 'scheduled_update_date': {'key': 'typeProperties.scheduledUpdateDate', 'type': 'iso-8601'}, - 'update_delay_offset': {'key': 'typeProperties.updateDelayOffset', 'type': 'str'}, - 'local_time_zone_offset': {'key': 'typeProperties.localTimeZoneOffset', 'type': 'str'}, - 'capabilities': {'key': 'typeProperties.capabilities', 'type': '{str}'}, - 'service_urls': {'key': 'typeProperties.serviceUrls', 'type': '[str]'}, - 'auto_update': {'key': 'typeProperties.autoUpdate', 'type': 'str'}, - 'version_status': {'key': 'typeProperties.versionStatus', 'type': 'str'}, - 'links': {'key': 'typeProperties.links', 'type': '[LinkedIntegrationRuntime]'}, - 'pushed_version': {'key': 'typeProperties.pushedVersion', 'type': 'str'}, - 'latest_version': {'key': 'typeProperties.latestVersion', 'type': 'str'}, - 'auto_update_eta': {'key': 'typeProperties.autoUpdateETA', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(SelfHostedIntegrationRuntimeStatus, self).__init__(**kwargs) - self.create_time = None - self.task_queue_id = None - self.internal_channel_encryption = None - self.version = None - self.nodes = kwargs.get('nodes', None) - self.scheduled_update_date = None - self.update_delay_offset = None - self.local_time_zone_offset = None - self.capabilities = None - self.service_urls = None - self.auto_update = None - self.version_status = None - self.links = kwargs.get('links', None) - self.pushed_version = None - self.latest_version = None - self.auto_update_eta = None - self.type = 'SelfHosted' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/self_hosted_integration_runtime_status_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/self_hosted_integration_runtime_status_py3.py deleted file mode 100644 index acad7661fc15..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/self_hosted_integration_runtime_status_py3.py +++ /dev/null @@ -1,146 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .integration_runtime_status_py3 import IntegrationRuntimeStatus - - -class SelfHostedIntegrationRuntimeStatus(IntegrationRuntimeStatus): - """Self-hosted integration runtime status. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar data_factory_name: The data factory name which the integration - runtime belong to. - :vartype data_factory_name: str - :ivar state: The state of integration runtime. Possible values include: - 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', - 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied' - :vartype state: str or - ~azure.mgmt.datafactory.models.IntegrationRuntimeState - :param type: Required. Constant filled by server. - :type type: str - :ivar create_time: The time at which the integration runtime was created, - in ISO8601 format. - :vartype create_time: datetime - :ivar task_queue_id: The task queue id of the integration runtime. - :vartype task_queue_id: str - :ivar internal_channel_encryption: It is used to set the encryption mode - for node-node communication channel (when more than 2 self-hosted - integration runtime nodes exist). Possible values include: 'NotSet', - 'SslEncrypted', 'NotEncrypted' - :vartype internal_channel_encryption: str or - ~azure.mgmt.datafactory.models.IntegrationRuntimeInternalChannelEncryptionMode - :ivar version: Version of the integration runtime. - :vartype version: str - :param nodes: The list of nodes for this integration runtime. - :type nodes: - list[~azure.mgmt.datafactory.models.SelfHostedIntegrationRuntimeNode] - :ivar scheduled_update_date: The date at which the integration runtime - will be scheduled to update, in ISO8601 format. - :vartype scheduled_update_date: datetime - :ivar update_delay_offset: The time in the date scheduled by service to - update the integration runtime, e.g., PT03H is 3 hours - :vartype update_delay_offset: str - :ivar local_time_zone_offset: The local time zone offset in hours. - :vartype local_time_zone_offset: str - :ivar capabilities: Object with additional information about integration - runtime capabilities. - :vartype capabilities: dict[str, str] - :ivar service_urls: The URLs for the services used in integration runtime - backend service. - :vartype service_urls: list[str] - :ivar auto_update: Whether Self-hosted integration runtime auto update has - been turned on. Possible values include: 'On', 'Off' - :vartype auto_update: str or - ~azure.mgmt.datafactory.models.IntegrationRuntimeAutoUpdate - :ivar version_status: Status of the integration runtime version. - :vartype version_status: str - :param links: The list of linked integration runtimes that are created to - share with this integration runtime. - :type links: list[~azure.mgmt.datafactory.models.LinkedIntegrationRuntime] - :ivar pushed_version: The version that the integration runtime is going to - update to. - :vartype pushed_version: str - :ivar latest_version: The latest version on download center. - :vartype latest_version: str - :ivar auto_update_eta: The estimated time when the self-hosted integration - runtime will be updated. - :vartype auto_update_eta: datetime - """ - - _validation = { - 'data_factory_name': {'readonly': True}, - 'state': {'readonly': True}, - 'type': {'required': True}, - 'create_time': {'readonly': True}, - 'task_queue_id': {'readonly': True}, - 'internal_channel_encryption': {'readonly': True}, - 'version': {'readonly': True}, - 'scheduled_update_date': {'readonly': True}, - 'update_delay_offset': {'readonly': True}, - 'local_time_zone_offset': {'readonly': True}, - 'capabilities': {'readonly': True}, - 'service_urls': {'readonly': True}, - 'auto_update': {'readonly': True}, - 'version_status': {'readonly': True}, - 'pushed_version': {'readonly': True}, - 'latest_version': {'readonly': True}, - 'auto_update_eta': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'data_factory_name': {'key': 'dataFactoryName', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'create_time': {'key': 'typeProperties.createTime', 'type': 'iso-8601'}, - 'task_queue_id': {'key': 'typeProperties.taskQueueId', 'type': 'str'}, - 'internal_channel_encryption': {'key': 'typeProperties.internalChannelEncryption', 'type': 'str'}, - 'version': {'key': 'typeProperties.version', 'type': 'str'}, - 'nodes': {'key': 'typeProperties.nodes', 'type': '[SelfHostedIntegrationRuntimeNode]'}, - 'scheduled_update_date': {'key': 'typeProperties.scheduledUpdateDate', 'type': 'iso-8601'}, - 'update_delay_offset': {'key': 'typeProperties.updateDelayOffset', 'type': 'str'}, - 'local_time_zone_offset': {'key': 'typeProperties.localTimeZoneOffset', 'type': 'str'}, - 'capabilities': {'key': 'typeProperties.capabilities', 'type': '{str}'}, - 'service_urls': {'key': 'typeProperties.serviceUrls', 'type': '[str]'}, - 'auto_update': {'key': 'typeProperties.autoUpdate', 'type': 'str'}, - 'version_status': {'key': 'typeProperties.versionStatus', 'type': 'str'}, - 'links': {'key': 'typeProperties.links', 'type': '[LinkedIntegrationRuntime]'}, - 'pushed_version': {'key': 'typeProperties.pushedVersion', 'type': 'str'}, - 'latest_version': {'key': 'typeProperties.latestVersion', 'type': 'str'}, - 'auto_update_eta': {'key': 'typeProperties.autoUpdateETA', 'type': 'iso-8601'}, - } - - def __init__(self, *, additional_properties=None, nodes=None, links=None, **kwargs) -> None: - super(SelfHostedIntegrationRuntimeStatus, self).__init__(additional_properties=additional_properties, **kwargs) - self.create_time = None - self.task_queue_id = None - self.internal_channel_encryption = None - self.version = None - self.nodes = nodes - self.scheduled_update_date = None - self.update_delay_offset = None - self.local_time_zone_offset = None - self.capabilities = None - self.service_urls = None - self.auto_update = None - self.version_status = None - self.links = links - self.pushed_version = None - self.latest_version = None - self.auto_update_eta = None - self.type = 'SelfHosted' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/service_now_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/service_now_linked_service.py deleted file mode 100644 index c433366826b8..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/service_now_linked_service.py +++ /dev/null @@ -1,106 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class ServiceNowLinkedService(LinkedService): - """ServiceNow server linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param endpoint: Required. The endpoint of the ServiceNow server. (i.e. - .service-now.com) - :type endpoint: object - :param authentication_type: Required. The authentication type to use. - Possible values include: 'Basic', 'OAuth2' - :type authentication_type: str or - ~azure.mgmt.datafactory.models.ServiceNowAuthenticationType - :param username: The user name used to connect to the ServiceNow server - for Basic and OAuth2 authentication. - :type username: object - :param password: The password corresponding to the user name for Basic and - OAuth2 authentication. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param client_id: The client id for OAuth2 authentication. - :type client_id: object - :param client_secret: The client secret for OAuth2 authentication. - :type client_secret: ~azure.mgmt.datafactory.models.SecretBase - :param use_encrypted_endpoints: Specifies whether the data source - endpoints are encrypted using HTTPS. The default value is true. - :type use_encrypted_endpoints: object - :param use_host_verification: Specifies whether to require the host name - in the server's certificate to match the host name of the server when - connecting over SSL. The default value is true. - :type use_host_verification: object - :param use_peer_verification: Specifies whether to verify the identity of - the server when connecting over SSL. The default value is true. - :type use_peer_verification: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'endpoint': {'required': True}, - 'authentication_type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'endpoint': {'key': 'typeProperties.endpoint', 'type': 'object'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, - 'username': {'key': 'typeProperties.username', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, - 'client_secret': {'key': 'typeProperties.clientSecret', 'type': 'SecretBase'}, - 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, - 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, - 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ServiceNowLinkedService, self).__init__(**kwargs) - self.endpoint = kwargs.get('endpoint', None) - self.authentication_type = kwargs.get('authentication_type', None) - self.username = kwargs.get('username', None) - self.password = kwargs.get('password', None) - self.client_id = kwargs.get('client_id', None) - self.client_secret = kwargs.get('client_secret', None) - self.use_encrypted_endpoints = kwargs.get('use_encrypted_endpoints', None) - self.use_host_verification = kwargs.get('use_host_verification', None) - self.use_peer_verification = kwargs.get('use_peer_verification', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'ServiceNow' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/service_now_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/service_now_linked_service_py3.py deleted file mode 100644 index cdd9e8ebb718..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/service_now_linked_service_py3.py +++ /dev/null @@ -1,106 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class ServiceNowLinkedService(LinkedService): - """ServiceNow server linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param endpoint: Required. The endpoint of the ServiceNow server. (i.e. - .service-now.com) - :type endpoint: object - :param authentication_type: Required. The authentication type to use. - Possible values include: 'Basic', 'OAuth2' - :type authentication_type: str or - ~azure.mgmt.datafactory.models.ServiceNowAuthenticationType - :param username: The user name used to connect to the ServiceNow server - for Basic and OAuth2 authentication. - :type username: object - :param password: The password corresponding to the user name for Basic and - OAuth2 authentication. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param client_id: The client id for OAuth2 authentication. - :type client_id: object - :param client_secret: The client secret for OAuth2 authentication. - :type client_secret: ~azure.mgmt.datafactory.models.SecretBase - :param use_encrypted_endpoints: Specifies whether the data source - endpoints are encrypted using HTTPS. The default value is true. - :type use_encrypted_endpoints: object - :param use_host_verification: Specifies whether to require the host name - in the server's certificate to match the host name of the server when - connecting over SSL. The default value is true. - :type use_host_verification: object - :param use_peer_verification: Specifies whether to verify the identity of - the server when connecting over SSL. The default value is true. - :type use_peer_verification: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'endpoint': {'required': True}, - 'authentication_type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'endpoint': {'key': 'typeProperties.endpoint', 'type': 'object'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, - 'username': {'key': 'typeProperties.username', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, - 'client_secret': {'key': 'typeProperties.clientSecret', 'type': 'SecretBase'}, - 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, - 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, - 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, endpoint, authentication_type, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, username=None, password=None, client_id=None, client_secret=None, use_encrypted_endpoints=None, use_host_verification=None, use_peer_verification=None, encrypted_credential=None, **kwargs) -> None: - super(ServiceNowLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.endpoint = endpoint - self.authentication_type = authentication_type - self.username = username - self.password = password - self.client_id = client_id - self.client_secret = client_secret - self.use_encrypted_endpoints = use_encrypted_endpoints - self.use_host_verification = use_host_verification - self.use_peer_verification = use_peer_verification - self.encrypted_credential = encrypted_credential - self.type = 'ServiceNow' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/service_now_object_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/service_now_object_dataset.py deleted file mode 100644 index a9821ba0fd10..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/service_now_object_dataset.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class ServiceNowObjectDataset(Dataset): - """ServiceNow server dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ServiceNowObjectDataset, self).__init__(**kwargs) - self.table_name = kwargs.get('table_name', None) - self.type = 'ServiceNowObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/service_now_object_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/service_now_object_dataset_py3.py deleted file mode 100644 index fcd2fd537a31..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/service_now_object_dataset_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class ServiceNowObjectDataset(Dataset): - """ServiceNow server dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: - super(ServiceNowObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.table_name = table_name - self.type = 'ServiceNowObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/service_now_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/service_now_source.py deleted file mode 100644 index 00068f5e5d32..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/service_now_source.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class ServiceNowSource(CopySource): - """A copy activity ServiceNow server source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ServiceNowSource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.type = 'ServiceNowSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/service_now_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/service_now_source_py3.py deleted file mode 100644 index ffe72cb426e7..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/service_now_source_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class ServiceNowSource(CopySource): - """A copy activity ServiceNow server source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query=None, **kwargs) -> None: - super(ServiceNowSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.type = 'ServiceNowSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/set_variable_activity.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/set_variable_activity.py deleted file mode 100644 index e8dd1690862d..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/set_variable_activity.py +++ /dev/null @@ -1,59 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .control_activity import ControlActivity - - -class SetVariableActivity(ControlActivity): - """Set value for a Variable. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param variable_name: Name of the variable whose value needs to be set. - :type variable_name: str - :param value: Value to be set. Could be a static value or Expression - :type value: object - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'variable_name': {'key': 'typeProperties.variableName', 'type': 'str'}, - 'value': {'key': 'typeProperties.value', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(SetVariableActivity, self).__init__(**kwargs) - self.variable_name = kwargs.get('variable_name', None) - self.value = kwargs.get('value', None) - self.type = 'SetVariable' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/set_variable_activity_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/set_variable_activity_py3.py deleted file mode 100644 index e045abee3dfb..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/set_variable_activity_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .control_activity_py3 import ControlActivity - - -class SetVariableActivity(ControlActivity): - """Set value for a Variable. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param variable_name: Name of the variable whose value needs to be set. - :type variable_name: str - :param value: Value to be set. Could be a static value or Expression - :type value: object - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'variable_name': {'key': 'typeProperties.variableName', 'type': 'str'}, - 'value': {'key': 'typeProperties.value', 'type': 'object'}, - } - - def __init__(self, *, name: str, additional_properties=None, description: str=None, depends_on=None, user_properties=None, variable_name: str=None, value=None, **kwargs) -> None: - super(SetVariableActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, **kwargs) - self.variable_name = variable_name - self.value = value - self.type = 'SetVariable' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sftp_server_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sftp_server_linked_service.py deleted file mode 100644 index 31a9d5524f36..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sftp_server_linked_service.py +++ /dev/null @@ -1,119 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class SftpServerLinkedService(LinkedService): - """A linked service for an SSH File Transfer Protocol (SFTP) server. . - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param host: Required. The SFTP server host name. Type: string (or - Expression with resultType string). - :type host: object - :param port: The TCP port number that the SFTP server uses to listen for - client connections. Default value is 22. Type: integer (or Expression with - resultType integer), minimum: 0. - :type port: object - :param authentication_type: The authentication type to be used to connect - to the FTP server. Possible values include: 'Basic', 'SshPublicKey' - :type authentication_type: str or - ~azure.mgmt.datafactory.models.SftpAuthenticationType - :param user_name: The username used to log on to the SFTP server. Type: - string (or Expression with resultType string). - :type user_name: object - :param password: Password to logon the SFTP server for Basic - authentication. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - :param private_key_path: The SSH private key file path for SshPublicKey - authentication. Only valid for on-premises copy. For on-premises copy with - SshPublicKey authentication, either PrivateKeyPath or PrivateKeyContent - should be specified. SSH private key should be OpenSSH format. Type: - string (or Expression with resultType string). - :type private_key_path: object - :param private_key_content: Base64 encoded SSH private key content for - SshPublicKey authentication. For on-premises copy with SshPublicKey - authentication, either PrivateKeyPath or PrivateKeyContent should be - specified. SSH private key should be OpenSSH format. - :type private_key_content: ~azure.mgmt.datafactory.models.SecretBase - :param pass_phrase: The password to decrypt the SSH private key if the SSH - private key is encrypted. - :type pass_phrase: ~azure.mgmt.datafactory.models.SecretBase - :param skip_host_key_validation: If true, skip the SSH host key - validation. Default value is false. Type: boolean (or Expression with - resultType boolean). - :type skip_host_key_validation: object - :param host_key_fingerprint: The host key finger-print of the SFTP server. - When SkipHostKeyValidation is false, HostKeyFingerprint should be - specified. Type: string (or Expression with resultType string). - :type host_key_fingerprint: object - """ - - _validation = { - 'type': {'required': True}, - 'host': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'host': {'key': 'typeProperties.host', 'type': 'object'}, - 'port': {'key': 'typeProperties.port', 'type': 'object'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, - 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - 'private_key_path': {'key': 'typeProperties.privateKeyPath', 'type': 'object'}, - 'private_key_content': {'key': 'typeProperties.privateKeyContent', 'type': 'SecretBase'}, - 'pass_phrase': {'key': 'typeProperties.passPhrase', 'type': 'SecretBase'}, - 'skip_host_key_validation': {'key': 'typeProperties.skipHostKeyValidation', 'type': 'object'}, - 'host_key_fingerprint': {'key': 'typeProperties.hostKeyFingerprint', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(SftpServerLinkedService, self).__init__(**kwargs) - self.host = kwargs.get('host', None) - self.port = kwargs.get('port', None) - self.authentication_type = kwargs.get('authentication_type', None) - self.user_name = kwargs.get('user_name', None) - self.password = kwargs.get('password', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.private_key_path = kwargs.get('private_key_path', None) - self.private_key_content = kwargs.get('private_key_content', None) - self.pass_phrase = kwargs.get('pass_phrase', None) - self.skip_host_key_validation = kwargs.get('skip_host_key_validation', None) - self.host_key_fingerprint = kwargs.get('host_key_fingerprint', None) - self.type = 'Sftp' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sftp_server_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sftp_server_linked_service_py3.py deleted file mode 100644 index 581e8f2a0f8e..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sftp_server_linked_service_py3.py +++ /dev/null @@ -1,119 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class SftpServerLinkedService(LinkedService): - """A linked service for an SSH File Transfer Protocol (SFTP) server. . - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param host: Required. The SFTP server host name. Type: string (or - Expression with resultType string). - :type host: object - :param port: The TCP port number that the SFTP server uses to listen for - client connections. Default value is 22. Type: integer (or Expression with - resultType integer), minimum: 0. - :type port: object - :param authentication_type: The authentication type to be used to connect - to the FTP server. Possible values include: 'Basic', 'SshPublicKey' - :type authentication_type: str or - ~azure.mgmt.datafactory.models.SftpAuthenticationType - :param user_name: The username used to log on to the SFTP server. Type: - string (or Expression with resultType string). - :type user_name: object - :param password: Password to logon the SFTP server for Basic - authentication. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - :param private_key_path: The SSH private key file path for SshPublicKey - authentication. Only valid for on-premises copy. For on-premises copy with - SshPublicKey authentication, either PrivateKeyPath or PrivateKeyContent - should be specified. SSH private key should be OpenSSH format. Type: - string (or Expression with resultType string). - :type private_key_path: object - :param private_key_content: Base64 encoded SSH private key content for - SshPublicKey authentication. For on-premises copy with SshPublicKey - authentication, either PrivateKeyPath or PrivateKeyContent should be - specified. SSH private key should be OpenSSH format. - :type private_key_content: ~azure.mgmt.datafactory.models.SecretBase - :param pass_phrase: The password to decrypt the SSH private key if the SSH - private key is encrypted. - :type pass_phrase: ~azure.mgmt.datafactory.models.SecretBase - :param skip_host_key_validation: If true, skip the SSH host key - validation. Default value is false. Type: boolean (or Expression with - resultType boolean). - :type skip_host_key_validation: object - :param host_key_fingerprint: The host key finger-print of the SFTP server. - When SkipHostKeyValidation is false, HostKeyFingerprint should be - specified. Type: string (or Expression with resultType string). - :type host_key_fingerprint: object - """ - - _validation = { - 'type': {'required': True}, - 'host': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'host': {'key': 'typeProperties.host', 'type': 'object'}, - 'port': {'key': 'typeProperties.port', 'type': 'object'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, - 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - 'private_key_path': {'key': 'typeProperties.privateKeyPath', 'type': 'object'}, - 'private_key_content': {'key': 'typeProperties.privateKeyContent', 'type': 'SecretBase'}, - 'pass_phrase': {'key': 'typeProperties.passPhrase', 'type': 'SecretBase'}, - 'skip_host_key_validation': {'key': 'typeProperties.skipHostKeyValidation', 'type': 'object'}, - 'host_key_fingerprint': {'key': 'typeProperties.hostKeyFingerprint', 'type': 'object'}, - } - - def __init__(self, *, host, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, port=None, authentication_type=None, user_name=None, password=None, encrypted_credential=None, private_key_path=None, private_key_content=None, pass_phrase=None, skip_host_key_validation=None, host_key_fingerprint=None, **kwargs) -> None: - super(SftpServerLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.host = host - self.port = port - self.authentication_type = authentication_type - self.user_name = user_name - self.password = password - self.encrypted_credential = encrypted_credential - self.private_key_path = private_key_path - self.private_key_content = private_key_content - self.pass_phrase = pass_phrase - self.skip_host_key_validation = skip_host_key_validation - self.host_key_fingerprint = host_key_fingerprint - self.type = 'Sftp' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/shopify_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/shopify_linked_service.py deleted file mode 100644 index b57922620ef8..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/shopify_linked_service.py +++ /dev/null @@ -1,86 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class ShopifyLinkedService(LinkedService): - """Shopify Service linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param host: Required. The endpoint of the Shopify server. (i.e. - mystore.myshopify.com) - :type host: object - :param access_token: The API access token that can be used to access - Shopify’s data. The token won't expire if it is offline mode. - :type access_token: ~azure.mgmt.datafactory.models.SecretBase - :param use_encrypted_endpoints: Specifies whether the data source - endpoints are encrypted using HTTPS. The default value is true. - :type use_encrypted_endpoints: object - :param use_host_verification: Specifies whether to require the host name - in the server's certificate to match the host name of the server when - connecting over SSL. The default value is true. - :type use_host_verification: object - :param use_peer_verification: Specifies whether to verify the identity of - the server when connecting over SSL. The default value is true. - :type use_peer_verification: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'host': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'host': {'key': 'typeProperties.host', 'type': 'object'}, - 'access_token': {'key': 'typeProperties.accessToken', 'type': 'SecretBase'}, - 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, - 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, - 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ShopifyLinkedService, self).__init__(**kwargs) - self.host = kwargs.get('host', None) - self.access_token = kwargs.get('access_token', None) - self.use_encrypted_endpoints = kwargs.get('use_encrypted_endpoints', None) - self.use_host_verification = kwargs.get('use_host_verification', None) - self.use_peer_verification = kwargs.get('use_peer_verification', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'Shopify' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/shopify_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/shopify_linked_service_py3.py deleted file mode 100644 index 714de7f0ddf6..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/shopify_linked_service_py3.py +++ /dev/null @@ -1,86 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class ShopifyLinkedService(LinkedService): - """Shopify Service linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param host: Required. The endpoint of the Shopify server. (i.e. - mystore.myshopify.com) - :type host: object - :param access_token: The API access token that can be used to access - Shopify’s data. The token won't expire if it is offline mode. - :type access_token: ~azure.mgmt.datafactory.models.SecretBase - :param use_encrypted_endpoints: Specifies whether the data source - endpoints are encrypted using HTTPS. The default value is true. - :type use_encrypted_endpoints: object - :param use_host_verification: Specifies whether to require the host name - in the server's certificate to match the host name of the server when - connecting over SSL. The default value is true. - :type use_host_verification: object - :param use_peer_verification: Specifies whether to verify the identity of - the server when connecting over SSL. The default value is true. - :type use_peer_verification: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'host': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'host': {'key': 'typeProperties.host', 'type': 'object'}, - 'access_token': {'key': 'typeProperties.accessToken', 'type': 'SecretBase'}, - 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, - 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, - 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, host, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, access_token=None, use_encrypted_endpoints=None, use_host_verification=None, use_peer_verification=None, encrypted_credential=None, **kwargs) -> None: - super(ShopifyLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.host = host - self.access_token = access_token - self.use_encrypted_endpoints = use_encrypted_endpoints - self.use_host_verification = use_host_verification - self.use_peer_verification = use_peer_verification - self.encrypted_credential = encrypted_credential - self.type = 'Shopify' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/shopify_object_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/shopify_object_dataset.py deleted file mode 100644 index ab3e475b9c97..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/shopify_object_dataset.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class ShopifyObjectDataset(Dataset): - """Shopify Service dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ShopifyObjectDataset, self).__init__(**kwargs) - self.table_name = kwargs.get('table_name', None) - self.type = 'ShopifyObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/shopify_object_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/shopify_object_dataset_py3.py deleted file mode 100644 index 98b9c43c21e8..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/shopify_object_dataset_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class ShopifyObjectDataset(Dataset): - """Shopify Service dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: - super(ShopifyObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.table_name = table_name - self.type = 'ShopifyObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/shopify_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/shopify_source.py deleted file mode 100644 index 3006ede4633d..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/shopify_source.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class ShopifySource(CopySource): - """A copy activity Shopify Service source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ShopifySource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.type = 'ShopifySource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/shopify_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/shopify_source_py3.py deleted file mode 100644 index ec17bdce3e35..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/shopify_source_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class ShopifySource(CopySource): - """A copy activity Shopify Service source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query=None, **kwargs) -> None: - super(ShopifySource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.type = 'ShopifySource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/spark_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/spark_linked_service.py deleted file mode 100644 index 006311c492bb..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/spark_linked_service.py +++ /dev/null @@ -1,131 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class SparkLinkedService(LinkedService): - """Spark Server linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param host: Required. IP address or host name of the Spark server - :type host: object - :param port: Required. The TCP port that the Spark server uses to listen - for client connections. - :type port: object - :param server_type: The type of Spark server. Possible values include: - 'SharkServer', 'SharkServer2', 'SparkThriftServer' - :type server_type: str or ~azure.mgmt.datafactory.models.SparkServerType - :param thrift_transport_protocol: The transport protocol to use in the - Thrift layer. Possible values include: 'Binary', 'SASL', 'HTTP ' - :type thrift_transport_protocol: str or - ~azure.mgmt.datafactory.models.SparkThriftTransportProtocol - :param authentication_type: Required. The authentication method used to - access the Spark server. Possible values include: 'Anonymous', 'Username', - 'UsernameAndPassword', 'WindowsAzureHDInsightService' - :type authentication_type: str or - ~azure.mgmt.datafactory.models.SparkAuthenticationType - :param username: The user name that you use to access Spark Server. - :type username: object - :param password: The password corresponding to the user name that you - provided in the Username field - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param http_path: The partial URL corresponding to the Spark server. - :type http_path: object - :param enable_ssl: Specifies whether the connections to the server are - encrypted using SSL. The default value is false. - :type enable_ssl: object - :param trusted_cert_path: The full path of the .pem file containing - trusted CA certificates for verifying the server when connecting over SSL. - This property can only be set when using SSL on self-hosted IR. The - default value is the cacerts.pem file installed with the IR. - :type trusted_cert_path: object - :param use_system_trust_store: Specifies whether to use a CA certificate - from the system trust store or from a specified PEM file. The default - value is false. - :type use_system_trust_store: object - :param allow_host_name_cn_mismatch: Specifies whether to require a - CA-issued SSL certificate name to match the host name of the server when - connecting over SSL. The default value is false. - :type allow_host_name_cn_mismatch: object - :param allow_self_signed_server_cert: Specifies whether to allow - self-signed certificates from the server. The default value is false. - :type allow_self_signed_server_cert: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'host': {'required': True}, - 'port': {'required': True}, - 'authentication_type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'host': {'key': 'typeProperties.host', 'type': 'object'}, - 'port': {'key': 'typeProperties.port', 'type': 'object'}, - 'server_type': {'key': 'typeProperties.serverType', 'type': 'str'}, - 'thrift_transport_protocol': {'key': 'typeProperties.thriftTransportProtocol', 'type': 'str'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, - 'username': {'key': 'typeProperties.username', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'http_path': {'key': 'typeProperties.httpPath', 'type': 'object'}, - 'enable_ssl': {'key': 'typeProperties.enableSsl', 'type': 'object'}, - 'trusted_cert_path': {'key': 'typeProperties.trustedCertPath', 'type': 'object'}, - 'use_system_trust_store': {'key': 'typeProperties.useSystemTrustStore', 'type': 'object'}, - 'allow_host_name_cn_mismatch': {'key': 'typeProperties.allowHostNameCNMismatch', 'type': 'object'}, - 'allow_self_signed_server_cert': {'key': 'typeProperties.allowSelfSignedServerCert', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(SparkLinkedService, self).__init__(**kwargs) - self.host = kwargs.get('host', None) - self.port = kwargs.get('port', None) - self.server_type = kwargs.get('server_type', None) - self.thrift_transport_protocol = kwargs.get('thrift_transport_protocol', None) - self.authentication_type = kwargs.get('authentication_type', None) - self.username = kwargs.get('username', None) - self.password = kwargs.get('password', None) - self.http_path = kwargs.get('http_path', None) - self.enable_ssl = kwargs.get('enable_ssl', None) - self.trusted_cert_path = kwargs.get('trusted_cert_path', None) - self.use_system_trust_store = kwargs.get('use_system_trust_store', None) - self.allow_host_name_cn_mismatch = kwargs.get('allow_host_name_cn_mismatch', None) - self.allow_self_signed_server_cert = kwargs.get('allow_self_signed_server_cert', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'Spark' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/spark_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/spark_linked_service_py3.py deleted file mode 100644 index c5e20deef8e8..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/spark_linked_service_py3.py +++ /dev/null @@ -1,131 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class SparkLinkedService(LinkedService): - """Spark Server linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param host: Required. IP address or host name of the Spark server - :type host: object - :param port: Required. The TCP port that the Spark server uses to listen - for client connections. - :type port: object - :param server_type: The type of Spark server. Possible values include: - 'SharkServer', 'SharkServer2', 'SparkThriftServer' - :type server_type: str or ~azure.mgmt.datafactory.models.SparkServerType - :param thrift_transport_protocol: The transport protocol to use in the - Thrift layer. Possible values include: 'Binary', 'SASL', 'HTTP ' - :type thrift_transport_protocol: str or - ~azure.mgmt.datafactory.models.SparkThriftTransportProtocol - :param authentication_type: Required. The authentication method used to - access the Spark server. Possible values include: 'Anonymous', 'Username', - 'UsernameAndPassword', 'WindowsAzureHDInsightService' - :type authentication_type: str or - ~azure.mgmt.datafactory.models.SparkAuthenticationType - :param username: The user name that you use to access Spark Server. - :type username: object - :param password: The password corresponding to the user name that you - provided in the Username field - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param http_path: The partial URL corresponding to the Spark server. - :type http_path: object - :param enable_ssl: Specifies whether the connections to the server are - encrypted using SSL. The default value is false. - :type enable_ssl: object - :param trusted_cert_path: The full path of the .pem file containing - trusted CA certificates for verifying the server when connecting over SSL. - This property can only be set when using SSL on self-hosted IR. The - default value is the cacerts.pem file installed with the IR. - :type trusted_cert_path: object - :param use_system_trust_store: Specifies whether to use a CA certificate - from the system trust store or from a specified PEM file. The default - value is false. - :type use_system_trust_store: object - :param allow_host_name_cn_mismatch: Specifies whether to require a - CA-issued SSL certificate name to match the host name of the server when - connecting over SSL. The default value is false. - :type allow_host_name_cn_mismatch: object - :param allow_self_signed_server_cert: Specifies whether to allow - self-signed certificates from the server. The default value is false. - :type allow_self_signed_server_cert: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'host': {'required': True}, - 'port': {'required': True}, - 'authentication_type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'host': {'key': 'typeProperties.host', 'type': 'object'}, - 'port': {'key': 'typeProperties.port', 'type': 'object'}, - 'server_type': {'key': 'typeProperties.serverType', 'type': 'str'}, - 'thrift_transport_protocol': {'key': 'typeProperties.thriftTransportProtocol', 'type': 'str'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, - 'username': {'key': 'typeProperties.username', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'http_path': {'key': 'typeProperties.httpPath', 'type': 'object'}, - 'enable_ssl': {'key': 'typeProperties.enableSsl', 'type': 'object'}, - 'trusted_cert_path': {'key': 'typeProperties.trustedCertPath', 'type': 'object'}, - 'use_system_trust_store': {'key': 'typeProperties.useSystemTrustStore', 'type': 'object'}, - 'allow_host_name_cn_mismatch': {'key': 'typeProperties.allowHostNameCNMismatch', 'type': 'object'}, - 'allow_self_signed_server_cert': {'key': 'typeProperties.allowSelfSignedServerCert', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, host, port, authentication_type, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, server_type=None, thrift_transport_protocol=None, username=None, password=None, http_path=None, enable_ssl=None, trusted_cert_path=None, use_system_trust_store=None, allow_host_name_cn_mismatch=None, allow_self_signed_server_cert=None, encrypted_credential=None, **kwargs) -> None: - super(SparkLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.host = host - self.port = port - self.server_type = server_type - self.thrift_transport_protocol = thrift_transport_protocol - self.authentication_type = authentication_type - self.username = username - self.password = password - self.http_path = http_path - self.enable_ssl = enable_ssl - self.trusted_cert_path = trusted_cert_path - self.use_system_trust_store = use_system_trust_store - self.allow_host_name_cn_mismatch = allow_host_name_cn_mismatch - self.allow_self_signed_server_cert = allow_self_signed_server_cert - self.encrypted_credential = encrypted_credential - self.type = 'Spark' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/spark_object_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/spark_object_dataset.py deleted file mode 100644 index 8d1493ea9c7f..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/spark_object_dataset.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class SparkObjectDataset(Dataset): - """Spark Server dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(SparkObjectDataset, self).__init__(**kwargs) - self.table_name = kwargs.get('table_name', None) - self.type = 'SparkObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/spark_object_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/spark_object_dataset_py3.py deleted file mode 100644 index 3ab167dd3540..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/spark_object_dataset_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class SparkObjectDataset(Dataset): - """Spark Server dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: - super(SparkObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.table_name = table_name - self.type = 'SparkObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/spark_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/spark_source.py deleted file mode 100644 index 643a71610930..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/spark_source.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class SparkSource(CopySource): - """A copy activity Spark Server source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(SparkSource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.type = 'SparkSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/spark_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/spark_source_py3.py deleted file mode 100644 index ede7f9ed5e2b..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/spark_source_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class SparkSource(CopySource): - """A copy activity Spark Server source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query=None, **kwargs) -> None: - super(SparkSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.type = 'SparkSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_dw_sink.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_dw_sink.py deleted file mode 100644 index ac12b6e55e59..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_dw_sink.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_sink import CopySink - - -class SqlDWSink(CopySink): - """A copy activity SQL Data Warehouse sink. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param write_batch_size: Write batch size. Type: integer (or Expression - with resultType integer), minimum: 0. - :type write_batch_size: object - :param write_batch_timeout: Write batch timeout. Type: string (or - Expression with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type write_batch_timeout: object - :param sink_retry_count: Sink retry count. Type: integer (or Expression - with resultType integer). - :type sink_retry_count: object - :param sink_retry_wait: Sink retry wait. Type: string (or Expression with - resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type sink_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param pre_copy_script: SQL pre-copy script. Type: string (or Expression - with resultType string). - :type pre_copy_script: object - :param allow_poly_base: Indicates to use PolyBase to copy data into SQL - Data Warehouse when applicable. Type: boolean (or Expression with - resultType boolean). - :type allow_poly_base: object - :param poly_base_settings: Specifies PolyBase-related settings when - allowPolyBase is true. - :type poly_base_settings: ~azure.mgmt.datafactory.models.PolybaseSettings - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, - 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, - 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, - 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'pre_copy_script': {'key': 'preCopyScript', 'type': 'object'}, - 'allow_poly_base': {'key': 'allowPolyBase', 'type': 'object'}, - 'poly_base_settings': {'key': 'polyBaseSettings', 'type': 'PolybaseSettings'}, - } - - def __init__(self, **kwargs): - super(SqlDWSink, self).__init__(**kwargs) - self.pre_copy_script = kwargs.get('pre_copy_script', None) - self.allow_poly_base = kwargs.get('allow_poly_base', None) - self.poly_base_settings = kwargs.get('poly_base_settings', None) - self.type = 'SqlDWSink' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_dw_sink_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_dw_sink_py3.py deleted file mode 100644 index 2b2d44cf16c6..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_dw_sink_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_sink_py3 import CopySink - - -class SqlDWSink(CopySink): - """A copy activity SQL Data Warehouse sink. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param write_batch_size: Write batch size. Type: integer (or Expression - with resultType integer), minimum: 0. - :type write_batch_size: object - :param write_batch_timeout: Write batch timeout. Type: string (or - Expression with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type write_batch_timeout: object - :param sink_retry_count: Sink retry count. Type: integer (or Expression - with resultType integer). - :type sink_retry_count: object - :param sink_retry_wait: Sink retry wait. Type: string (or Expression with - resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type sink_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param pre_copy_script: SQL pre-copy script. Type: string (or Expression - with resultType string). - :type pre_copy_script: object - :param allow_poly_base: Indicates to use PolyBase to copy data into SQL - Data Warehouse when applicable. Type: boolean (or Expression with - resultType boolean). - :type allow_poly_base: object - :param poly_base_settings: Specifies PolyBase-related settings when - allowPolyBase is true. - :type poly_base_settings: ~azure.mgmt.datafactory.models.PolybaseSettings - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, - 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, - 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, - 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'pre_copy_script': {'key': 'preCopyScript', 'type': 'object'}, - 'allow_poly_base': {'key': 'allowPolyBase', 'type': 'object'}, - 'poly_base_settings': {'key': 'polyBaseSettings', 'type': 'PolybaseSettings'}, - } - - def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, pre_copy_script=None, allow_poly_base=None, poly_base_settings=None, **kwargs) -> None: - super(SqlDWSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, **kwargs) - self.pre_copy_script = pre_copy_script - self.allow_poly_base = allow_poly_base - self.poly_base_settings = poly_base_settings - self.type = 'SqlDWSink' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_dw_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_dw_source.py deleted file mode 100644 index aa3f88a75938..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_dw_source.py +++ /dev/null @@ -1,65 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class SqlDWSource(CopySource): - """A copy activity SQL Data Warehouse source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param sql_reader_query: SQL Data Warehouse reader query. Type: string (or - Expression with resultType string). - :type sql_reader_query: object - :param sql_reader_stored_procedure_name: Name of the stored procedure for - a SQL Data Warehouse source. This cannot be used at the same time as - SqlReaderQuery. Type: string (or Expression with resultType string). - :type sql_reader_stored_procedure_name: object - :param stored_procedure_parameters: Value and type setting for stored - procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". - Type: object (or Expression with resultType object), itemType: - StoredProcedureParameter. - :type stored_procedure_parameters: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'sql_reader_query': {'key': 'sqlReaderQuery', 'type': 'object'}, - 'sql_reader_stored_procedure_name': {'key': 'sqlReaderStoredProcedureName', 'type': 'object'}, - 'stored_procedure_parameters': {'key': 'storedProcedureParameters', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(SqlDWSource, self).__init__(**kwargs) - self.sql_reader_query = kwargs.get('sql_reader_query', None) - self.sql_reader_stored_procedure_name = kwargs.get('sql_reader_stored_procedure_name', None) - self.stored_procedure_parameters = kwargs.get('stored_procedure_parameters', None) - self.type = 'SqlDWSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_dw_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_dw_source_py3.py deleted file mode 100644 index b74c004141d1..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_dw_source_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class SqlDWSource(CopySource): - """A copy activity SQL Data Warehouse source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param sql_reader_query: SQL Data Warehouse reader query. Type: string (or - Expression with resultType string). - :type sql_reader_query: object - :param sql_reader_stored_procedure_name: Name of the stored procedure for - a SQL Data Warehouse source. This cannot be used at the same time as - SqlReaderQuery. Type: string (or Expression with resultType string). - :type sql_reader_stored_procedure_name: object - :param stored_procedure_parameters: Value and type setting for stored - procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". - Type: object (or Expression with resultType object), itemType: - StoredProcedureParameter. - :type stored_procedure_parameters: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'sql_reader_query': {'key': 'sqlReaderQuery', 'type': 'object'}, - 'sql_reader_stored_procedure_name': {'key': 'sqlReaderStoredProcedureName', 'type': 'object'}, - 'stored_procedure_parameters': {'key': 'storedProcedureParameters', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, sql_reader_query=None, sql_reader_stored_procedure_name=None, stored_procedure_parameters=None, **kwargs) -> None: - super(SqlDWSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.sql_reader_query = sql_reader_query - self.sql_reader_stored_procedure_name = sql_reader_stored_procedure_name - self.stored_procedure_parameters = stored_procedure_parameters - self.type = 'SqlDWSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_server_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_server_linked_service.py deleted file mode 100644 index 36230c046278..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_server_linked_service.py +++ /dev/null @@ -1,74 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class SqlServerLinkedService(LinkedService): - """SQL Server linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param connection_string: Required. The connection string. Type: string, - SecureString or AzureKeyVaultSecretReference. - :type connection_string: object - :param user_name: The on-premises Windows authentication user name. Type: - string (or Expression with resultType string). - :type user_name: object - :param password: The on-premises Windows authentication password. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'connection_string': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, - 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(SqlServerLinkedService, self).__init__(**kwargs) - self.connection_string = kwargs.get('connection_string', None) - self.user_name = kwargs.get('user_name', None) - self.password = kwargs.get('password', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'SqlServer' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_server_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_server_linked_service_py3.py deleted file mode 100644 index fb446a12f601..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_server_linked_service_py3.py +++ /dev/null @@ -1,74 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class SqlServerLinkedService(LinkedService): - """SQL Server linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param connection_string: Required. The connection string. Type: string, - SecureString or AzureKeyVaultSecretReference. - :type connection_string: object - :param user_name: The on-premises Windows authentication user name. Type: - string (or Expression with resultType string). - :type user_name: object - :param password: The on-premises Windows authentication password. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'connection_string': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, - 'user_name': {'key': 'typeProperties.userName', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, connection_string, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, user_name=None, password=None, encrypted_credential=None, **kwargs) -> None: - super(SqlServerLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.connection_string = connection_string - self.user_name = user_name - self.password = password - self.encrypted_credential = encrypted_credential - self.type = 'SqlServer' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_server_stored_procedure_activity.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_server_stored_procedure_activity.py deleted file mode 100644 index 6f31002f32d1..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_server_stored_procedure_activity.py +++ /dev/null @@ -1,70 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity import ExecutionActivity - - -class SqlServerStoredProcedureActivity(ExecutionActivity): - """SQL stored procedure activity type. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param stored_procedure_name: Required. Stored procedure name. Type: - string (or Expression with resultType string). - :type stored_procedure_name: object - :param stored_procedure_parameters: Value and type setting for stored - procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". - :type stored_procedure_parameters: dict[str, - ~azure.mgmt.datafactory.models.StoredProcedureParameter] - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'stored_procedure_name': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'stored_procedure_name': {'key': 'typeProperties.storedProcedureName', 'type': 'object'}, - 'stored_procedure_parameters': {'key': 'typeProperties.storedProcedureParameters', 'type': '{StoredProcedureParameter}'}, - } - - def __init__(self, **kwargs): - super(SqlServerStoredProcedureActivity, self).__init__(**kwargs) - self.stored_procedure_name = kwargs.get('stored_procedure_name', None) - self.stored_procedure_parameters = kwargs.get('stored_procedure_parameters', None) - self.type = 'SqlServerStoredProcedure' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_server_stored_procedure_activity_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_server_stored_procedure_activity_py3.py deleted file mode 100644 index 477f0c6c775c..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_server_stored_procedure_activity_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity_py3 import ExecutionActivity - - -class SqlServerStoredProcedureActivity(ExecutionActivity): - """SQL stored procedure activity type. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param stored_procedure_name: Required. Stored procedure name. Type: - string (or Expression with resultType string). - :type stored_procedure_name: object - :param stored_procedure_parameters: Value and type setting for stored - procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". - :type stored_procedure_parameters: dict[str, - ~azure.mgmt.datafactory.models.StoredProcedureParameter] - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'stored_procedure_name': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'stored_procedure_name': {'key': 'typeProperties.storedProcedureName', 'type': 'object'}, - 'stored_procedure_parameters': {'key': 'typeProperties.storedProcedureParameters', 'type': '{StoredProcedureParameter}'}, - } - - def __init__(self, *, name: str, stored_procedure_name, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, stored_procedure_parameters=None, **kwargs) -> None: - super(SqlServerStoredProcedureActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) - self.stored_procedure_name = stored_procedure_name - self.stored_procedure_parameters = stored_procedure_parameters - self.type = 'SqlServerStoredProcedure' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_server_table_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_server_table_dataset.py deleted file mode 100644 index c0bc0b66a5e2..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_server_table_dataset.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class SqlServerTableDataset(Dataset): - """The on-premises SQL Server dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: Required. The table name of the SQL Server dataset. - Type: string (or Expression with resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - 'table_name': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(SqlServerTableDataset, self).__init__(**kwargs) - self.table_name = kwargs.get('table_name', None) - self.type = 'SqlServerTable' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_server_table_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_server_table_dataset_py3.py deleted file mode 100644 index 0fb8d10ea111..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_server_table_dataset_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class SqlServerTableDataset(Dataset): - """The on-premises SQL Server dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: Required. The table name of the SQL Server dataset. - Type: string (or Expression with resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - 'table_name': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, table_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, **kwargs) -> None: - super(SqlServerTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.table_name = table_name - self.type = 'SqlServerTable' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_sink.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_sink.py deleted file mode 100644 index 77692817100d..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_sink.py +++ /dev/null @@ -1,76 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_sink import CopySink - - -class SqlSink(CopySink): - """A copy activity SQL sink. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param write_batch_size: Write batch size. Type: integer (or Expression - with resultType integer), minimum: 0. - :type write_batch_size: object - :param write_batch_timeout: Write batch timeout. Type: string (or - Expression with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type write_batch_timeout: object - :param sink_retry_count: Sink retry count. Type: integer (or Expression - with resultType integer). - :type sink_retry_count: object - :param sink_retry_wait: Sink retry wait. Type: string (or Expression with - resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type sink_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param sql_writer_stored_procedure_name: SQL writer stored procedure name. - Type: string (or Expression with resultType string). - :type sql_writer_stored_procedure_name: object - :param sql_writer_table_type: SQL writer table type. Type: string (or - Expression with resultType string). - :type sql_writer_table_type: object - :param pre_copy_script: SQL pre-copy script. Type: string (or Expression - with resultType string). - :type pre_copy_script: object - :param stored_procedure_parameters: SQL stored procedure parameters. - :type stored_procedure_parameters: dict[str, - ~azure.mgmt.datafactory.models.StoredProcedureParameter] - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, - 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, - 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, - 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'sql_writer_stored_procedure_name': {'key': 'sqlWriterStoredProcedureName', 'type': 'object'}, - 'sql_writer_table_type': {'key': 'sqlWriterTableType', 'type': 'object'}, - 'pre_copy_script': {'key': 'preCopyScript', 'type': 'object'}, - 'stored_procedure_parameters': {'key': 'storedProcedureParameters', 'type': '{StoredProcedureParameter}'}, - } - - def __init__(self, **kwargs): - super(SqlSink, self).__init__(**kwargs) - self.sql_writer_stored_procedure_name = kwargs.get('sql_writer_stored_procedure_name', None) - self.sql_writer_table_type = kwargs.get('sql_writer_table_type', None) - self.pre_copy_script = kwargs.get('pre_copy_script', None) - self.stored_procedure_parameters = kwargs.get('stored_procedure_parameters', None) - self.type = 'SqlSink' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_sink_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_sink_py3.py deleted file mode 100644 index 5aa68f696f16..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_sink_py3.py +++ /dev/null @@ -1,76 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_sink_py3 import CopySink - - -class SqlSink(CopySink): - """A copy activity SQL sink. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param write_batch_size: Write batch size. Type: integer (or Expression - with resultType integer), minimum: 0. - :type write_batch_size: object - :param write_batch_timeout: Write batch timeout. Type: string (or - Expression with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type write_batch_timeout: object - :param sink_retry_count: Sink retry count. Type: integer (or Expression - with resultType integer). - :type sink_retry_count: object - :param sink_retry_wait: Sink retry wait. Type: string (or Expression with - resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type sink_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param sql_writer_stored_procedure_name: SQL writer stored procedure name. - Type: string (or Expression with resultType string). - :type sql_writer_stored_procedure_name: object - :param sql_writer_table_type: SQL writer table type. Type: string (or - Expression with resultType string). - :type sql_writer_table_type: object - :param pre_copy_script: SQL pre-copy script. Type: string (or Expression - with resultType string). - :type pre_copy_script: object - :param stored_procedure_parameters: SQL stored procedure parameters. - :type stored_procedure_parameters: dict[str, - ~azure.mgmt.datafactory.models.StoredProcedureParameter] - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'}, - 'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'}, - 'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'}, - 'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'sql_writer_stored_procedure_name': {'key': 'sqlWriterStoredProcedureName', 'type': 'object'}, - 'sql_writer_table_type': {'key': 'sqlWriterTableType', 'type': 'object'}, - 'pre_copy_script': {'key': 'preCopyScript', 'type': 'object'}, - 'stored_procedure_parameters': {'key': 'storedProcedureParameters', 'type': '{StoredProcedureParameter}'}, - } - - def __init__(self, *, additional_properties=None, write_batch_size=None, write_batch_timeout=None, sink_retry_count=None, sink_retry_wait=None, sql_writer_stored_procedure_name=None, sql_writer_table_type=None, pre_copy_script=None, stored_procedure_parameters=None, **kwargs) -> None: - super(SqlSink, self).__init__(additional_properties=additional_properties, write_batch_size=write_batch_size, write_batch_timeout=write_batch_timeout, sink_retry_count=sink_retry_count, sink_retry_wait=sink_retry_wait, **kwargs) - self.sql_writer_stored_procedure_name = sql_writer_stored_procedure_name - self.sql_writer_table_type = sql_writer_table_type - self.pre_copy_script = pre_copy_script - self.stored_procedure_parameters = stored_procedure_parameters - self.type = 'SqlSink' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_source.py deleted file mode 100644 index 3f374b19f072..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_source.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class SqlSource(CopySource): - """A copy activity SQL source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param sql_reader_query: SQL reader query. Type: string (or Expression - with resultType string). - :type sql_reader_query: object - :param sql_reader_stored_procedure_name: Name of the stored procedure for - a SQL Database source. This cannot be used at the same time as - SqlReaderQuery. Type: string (or Expression with resultType string). - :type sql_reader_stored_procedure_name: object - :param stored_procedure_parameters: Value and type setting for stored - procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". - :type stored_procedure_parameters: dict[str, - ~azure.mgmt.datafactory.models.StoredProcedureParameter] - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'sql_reader_query': {'key': 'sqlReaderQuery', 'type': 'object'}, - 'sql_reader_stored_procedure_name': {'key': 'sqlReaderStoredProcedureName', 'type': 'object'}, - 'stored_procedure_parameters': {'key': 'storedProcedureParameters', 'type': '{StoredProcedureParameter}'}, - } - - def __init__(self, **kwargs): - super(SqlSource, self).__init__(**kwargs) - self.sql_reader_query = kwargs.get('sql_reader_query', None) - self.sql_reader_stored_procedure_name = kwargs.get('sql_reader_stored_procedure_name', None) - self.stored_procedure_parameters = kwargs.get('stored_procedure_parameters', None) - self.type = 'SqlSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_source_py3.py deleted file mode 100644 index ff39b6768a9f..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sql_source_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class SqlSource(CopySource): - """A copy activity SQL source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param sql_reader_query: SQL reader query. Type: string (or Expression - with resultType string). - :type sql_reader_query: object - :param sql_reader_stored_procedure_name: Name of the stored procedure for - a SQL Database source. This cannot be used at the same time as - SqlReaderQuery. Type: string (or Expression with resultType string). - :type sql_reader_stored_procedure_name: object - :param stored_procedure_parameters: Value and type setting for stored - procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". - :type stored_procedure_parameters: dict[str, - ~azure.mgmt.datafactory.models.StoredProcedureParameter] - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'sql_reader_query': {'key': 'sqlReaderQuery', 'type': 'object'}, - 'sql_reader_stored_procedure_name': {'key': 'sqlReaderStoredProcedureName', 'type': 'object'}, - 'stored_procedure_parameters': {'key': 'storedProcedureParameters', 'type': '{StoredProcedureParameter}'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, sql_reader_query=None, sql_reader_stored_procedure_name=None, stored_procedure_parameters=None, **kwargs) -> None: - super(SqlSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.sql_reader_query = sql_reader_query - self.sql_reader_stored_procedure_name = sql_reader_stored_procedure_name - self.stored_procedure_parameters = stored_procedure_parameters - self.type = 'SqlSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/square_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/square_linked_service.py deleted file mode 100644 index 4e9df2b68e62..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/square_linked_service.py +++ /dev/null @@ -1,98 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class SquareLinkedService(LinkedService): - """Square Service linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param host: Required. The URL of the Square instance. (i.e. - mystore.mysquare.com) - :type host: object - :param client_id: Required. The client ID associated with your Square - application. - :type client_id: object - :param client_secret: The client secret associated with your Square - application. - :type client_secret: ~azure.mgmt.datafactory.models.SecretBase - :param redirect_uri: Required. The redirect URL assigned in the Square - application dashboard. (i.e. http://localhost:2500) - :type redirect_uri: object - :param use_encrypted_endpoints: Specifies whether the data source - endpoints are encrypted using HTTPS. The default value is true. - :type use_encrypted_endpoints: object - :param use_host_verification: Specifies whether to require the host name - in the server's certificate to match the host name of the server when - connecting over SSL. The default value is true. - :type use_host_verification: object - :param use_peer_verification: Specifies whether to verify the identity of - the server when connecting over SSL. The default value is true. - :type use_peer_verification: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'host': {'required': True}, - 'client_id': {'required': True}, - 'redirect_uri': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'host': {'key': 'typeProperties.host', 'type': 'object'}, - 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, - 'client_secret': {'key': 'typeProperties.clientSecret', 'type': 'SecretBase'}, - 'redirect_uri': {'key': 'typeProperties.redirectUri', 'type': 'object'}, - 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, - 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, - 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(SquareLinkedService, self).__init__(**kwargs) - self.host = kwargs.get('host', None) - self.client_id = kwargs.get('client_id', None) - self.client_secret = kwargs.get('client_secret', None) - self.redirect_uri = kwargs.get('redirect_uri', None) - self.use_encrypted_endpoints = kwargs.get('use_encrypted_endpoints', None) - self.use_host_verification = kwargs.get('use_host_verification', None) - self.use_peer_verification = kwargs.get('use_peer_verification', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'Square' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/square_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/square_linked_service_py3.py deleted file mode 100644 index 0b9218efba97..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/square_linked_service_py3.py +++ /dev/null @@ -1,98 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class SquareLinkedService(LinkedService): - """Square Service linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param host: Required. The URL of the Square instance. (i.e. - mystore.mysquare.com) - :type host: object - :param client_id: Required. The client ID associated with your Square - application. - :type client_id: object - :param client_secret: The client secret associated with your Square - application. - :type client_secret: ~azure.mgmt.datafactory.models.SecretBase - :param redirect_uri: Required. The redirect URL assigned in the Square - application dashboard. (i.e. http://localhost:2500) - :type redirect_uri: object - :param use_encrypted_endpoints: Specifies whether the data source - endpoints are encrypted using HTTPS. The default value is true. - :type use_encrypted_endpoints: object - :param use_host_verification: Specifies whether to require the host name - in the server's certificate to match the host name of the server when - connecting over SSL. The default value is true. - :type use_host_verification: object - :param use_peer_verification: Specifies whether to verify the identity of - the server when connecting over SSL. The default value is true. - :type use_peer_verification: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'host': {'required': True}, - 'client_id': {'required': True}, - 'redirect_uri': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'host': {'key': 'typeProperties.host', 'type': 'object'}, - 'client_id': {'key': 'typeProperties.clientId', 'type': 'object'}, - 'client_secret': {'key': 'typeProperties.clientSecret', 'type': 'SecretBase'}, - 'redirect_uri': {'key': 'typeProperties.redirectUri', 'type': 'object'}, - 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, - 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, - 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, host, client_id, redirect_uri, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, client_secret=None, use_encrypted_endpoints=None, use_host_verification=None, use_peer_verification=None, encrypted_credential=None, **kwargs) -> None: - super(SquareLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.host = host - self.client_id = client_id - self.client_secret = client_secret - self.redirect_uri = redirect_uri - self.use_encrypted_endpoints = use_encrypted_endpoints - self.use_host_verification = use_host_verification - self.use_peer_verification = use_peer_verification - self.encrypted_credential = encrypted_credential - self.type = 'Square' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/square_object_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/square_object_dataset.py deleted file mode 100644 index 3903382d2e3a..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/square_object_dataset.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class SquareObjectDataset(Dataset): - """Square Service dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(SquareObjectDataset, self).__init__(**kwargs) - self.table_name = kwargs.get('table_name', None) - self.type = 'SquareObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/square_object_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/square_object_dataset_py3.py deleted file mode 100644 index 6d624dc6feef..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/square_object_dataset_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class SquareObjectDataset(Dataset): - """Square Service dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: - super(SquareObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.table_name = table_name - self.type = 'SquareObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/square_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/square_source.py deleted file mode 100644 index 919abc0b19fa..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/square_source.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class SquareSource(CopySource): - """A copy activity Square Service source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(SquareSource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.type = 'SquareSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/square_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/square_source_py3.py deleted file mode 100644 index f7ba625398af..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/square_source_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class SquareSource(CopySource): - """A copy activity Square Service source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query=None, **kwargs) -> None: - super(SquareSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.type = 'SquareSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_execution_credential.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_execution_credential.py deleted file mode 100644 index c090694416a9..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_execution_credential.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SSISExecutionCredential(Model): - """SSIS package execution credential. - - All required parameters must be populated in order to send to Azure. - - :param domain: Required. Domain for windows authentication. - :type domain: object - :param user_name: Required. UseName for windows authentication. - :type user_name: object - :param password: Required. Password for windows authentication. - :type password: ~azure.mgmt.datafactory.models.SecureString - """ - - _validation = { - 'domain': {'required': True}, - 'user_name': {'required': True}, - 'password': {'required': True}, - } - - _attribute_map = { - 'domain': {'key': 'domain', 'type': 'object'}, - 'user_name': {'key': 'userName', 'type': 'object'}, - 'password': {'key': 'password', 'type': 'SecureString'}, - } - - def __init__(self, **kwargs): - super(SSISExecutionCredential, self).__init__(**kwargs) - self.domain = kwargs.get('domain', None) - self.user_name = kwargs.get('user_name', None) - self.password = kwargs.get('password', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_execution_credential_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_execution_credential_py3.py deleted file mode 100644 index 051eaffa2bf2..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_execution_credential_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SSISExecutionCredential(Model): - """SSIS package execution credential. - - All required parameters must be populated in order to send to Azure. - - :param domain: Required. Domain for windows authentication. - :type domain: object - :param user_name: Required. UseName for windows authentication. - :type user_name: object - :param password: Required. Password for windows authentication. - :type password: ~azure.mgmt.datafactory.models.SecureString - """ - - _validation = { - 'domain': {'required': True}, - 'user_name': {'required': True}, - 'password': {'required': True}, - } - - _attribute_map = { - 'domain': {'key': 'domain', 'type': 'object'}, - 'user_name': {'key': 'userName', 'type': 'object'}, - 'password': {'key': 'password', 'type': 'SecureString'}, - } - - def __init__(self, *, domain, user_name, password, **kwargs) -> None: - super(SSISExecutionCredential, self).__init__(**kwargs) - self.domain = domain - self.user_name = user_name - self.password = password diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_execution_parameter.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_execution_parameter.py deleted file mode 100644 index 36f295c5a4aa..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_execution_parameter.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SSISExecutionParameter(Model): - """SSIS execution parameter. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. SSIS package execution parameter value. Type: - string (or Expression with resultType string). - :type value: object - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(SSISExecutionParameter, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_execution_parameter_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_execution_parameter_py3.py deleted file mode 100644 index cd10dd457a42..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_execution_parameter_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SSISExecutionParameter(Model): - """SSIS execution parameter. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. SSIS package execution parameter value. Type: - string (or Expression with resultType string). - :type value: object - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'object'}, - } - - def __init__(self, *, value, **kwargs) -> None: - super(SSISExecutionParameter, self).__init__(**kwargs) - self.value = value diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_object_metadata.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_object_metadata.py deleted file mode 100644 index ed7940124645..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_object_metadata.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SsisObjectMetadata(Model): - """SSIS object metadata. - - All required parameters must be populated in order to send to Azure. - - :param id: Metadata id. - :type id: long - :param name: Metadata name. - :type name: str - :param description: Metadata description. - :type description: str - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'long'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SsisObjectMetadata, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) - self.description = kwargs.get('description', None) - self.type = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_object_metadata_list_response.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_object_metadata_list_response.py deleted file mode 100644 index a029c9f7ebc4..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_object_metadata_list_response.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SsisObjectMetadataListResponse(Model): - """A list of SSIS object metadata. - - :param value: List of SSIS object metadata. - :type value: list[~azure.mgmt.datafactory.models.SsisObjectMetadata] - :param next_link: The link to the next page of results, if any remaining - results exist. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[SsisObjectMetadata]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SsisObjectMetadataListResponse, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_object_metadata_list_response_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_object_metadata_list_response_py3.py deleted file mode 100644 index 79931e1ceaf7..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_object_metadata_list_response_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SsisObjectMetadataListResponse(Model): - """A list of SSIS object metadata. - - :param value: List of SSIS object metadata. - :type value: list[~azure.mgmt.datafactory.models.SsisObjectMetadata] - :param next_link: The link to the next page of results, if any remaining - results exist. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[SsisObjectMetadata]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, *, value=None, next_link: str=None, **kwargs) -> None: - super(SsisObjectMetadataListResponse, self).__init__(**kwargs) - self.value = value - self.next_link = next_link diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_object_metadata_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_object_metadata_py3.py deleted file mode 100644 index b7373e36523c..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_object_metadata_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SsisObjectMetadata(Model): - """SSIS object metadata. - - All required parameters must be populated in order to send to Azure. - - :param id: Metadata id. - :type id: long - :param name: Metadata name. - :type name: str - :param description: Metadata description. - :type description: str - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'long'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, id: int=None, name: str=None, description: str=None, **kwargs) -> None: - super(SsisObjectMetadata, self).__init__(**kwargs) - self.id = id - self.name = name - self.description = description - self.type = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_object_metadata_status_response.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_object_metadata_status_response.py deleted file mode 100644 index 9b782613ee08..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_object_metadata_status_response.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SsisObjectMetadataStatusResponse(Model): - """The status of the operation. - - :param status: The status of the operation. - :type status: str - :param name: The operation name. - :type name: str - :param properties: The operation properties. - :type properties: str - :param error: The operation error message. - :type error: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SsisObjectMetadataStatusResponse, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.name = kwargs.get('name', None) - self.properties = kwargs.get('properties', None) - self.error = kwargs.get('error', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_object_metadata_status_response_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_object_metadata_status_response_py3.py deleted file mode 100644 index a4b82b8f6bcd..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_object_metadata_status_response_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SsisObjectMetadataStatusResponse(Model): - """The status of the operation. - - :param status: The status of the operation. - :type status: str - :param name: The operation name. - :type name: str - :param properties: The operation properties. - :type properties: str - :param error: The operation error message. - :type error: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'str'}, - } - - def __init__(self, *, status: str=None, name: str=None, properties: str=None, error: str=None, **kwargs) -> None: - super(SsisObjectMetadataStatusResponse, self).__init__(**kwargs) - self.status = status - self.name = name - self.properties = properties - self.error = error diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_package_location.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_package_location.py deleted file mode 100644 index 81a17eb8fe53..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_package_location.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SSISPackageLocation(Model): - """SSIS package location. - - All required parameters must be populated in order to send to Azure. - - :param package_path: Required. The SSIS package path. Type: string (or - Expression with resultType string). - :type package_path: object - """ - - _validation = { - 'package_path': {'required': True}, - } - - _attribute_map = { - 'package_path': {'key': 'packagePath', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(SSISPackageLocation, self).__init__(**kwargs) - self.package_path = kwargs.get('package_path', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_package_location_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_package_location_py3.py deleted file mode 100644 index af139da47d88..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_package_location_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SSISPackageLocation(Model): - """SSIS package location. - - All required parameters must be populated in order to send to Azure. - - :param package_path: Required. The SSIS package path. Type: string (or - Expression with resultType string). - :type package_path: object - """ - - _validation = { - 'package_path': {'required': True}, - } - - _attribute_map = { - 'package_path': {'key': 'packagePath', 'type': 'object'}, - } - - def __init__(self, *, package_path, **kwargs) -> None: - super(SSISPackageLocation, self).__init__(**kwargs) - self.package_path = package_path diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_property_override.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_property_override.py deleted file mode 100644 index 30b78594e6ab..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_property_override.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SSISPropertyOverride(Model): - """SSIS property override. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. SSIS package property override value. Type: string - (or Expression with resultType string). - :type value: object - :param is_sensitive: Whether SSIS package property override value is - sensitive data. Value will be encrypted in SSISDB if it is true - :type is_sensitive: bool - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'object'}, - 'is_sensitive': {'key': 'isSensitive', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(SSISPropertyOverride, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.is_sensitive = kwargs.get('is_sensitive', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_property_override_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_property_override_py3.py deleted file mode 100644 index b425a19adc7e..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/ssis_property_override_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SSISPropertyOverride(Model): - """SSIS property override. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. SSIS package property override value. Type: string - (or Expression with resultType string). - :type value: object - :param is_sensitive: Whether SSIS package property override value is - sensitive data. Value will be encrypted in SSISDB if it is true - :type is_sensitive: bool - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'object'}, - 'is_sensitive': {'key': 'isSensitive', 'type': 'bool'}, - } - - def __init__(self, *, value, is_sensitive: bool=None, **kwargs) -> None: - super(SSISPropertyOverride, self).__init__(**kwargs) - self.value = value - self.is_sensitive = is_sensitive diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/staging_settings.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/staging_settings.py deleted file mode 100644 index 05ca8dff2c52..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/staging_settings.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class StagingSettings(Model): - """Staging settings. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param linked_service_name: Required. Staging linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param path: The path to storage for storing the interim data. Type: - string (or Expression with resultType string). - :type path: object - :param enable_compression: Specifies whether to use compression when - copying data via an interim staging. Default value is false. Type: boolean - (or Expression with resultType boolean). - :type enable_compression: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'path': {'key': 'path', 'type': 'object'}, - 'enable_compression': {'key': 'enableCompression', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(StagingSettings, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.linked_service_name = kwargs.get('linked_service_name', None) - self.path = kwargs.get('path', None) - self.enable_compression = kwargs.get('enable_compression', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/staging_settings_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/staging_settings_py3.py deleted file mode 100644 index 13b4353963a3..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/staging_settings_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class StagingSettings(Model): - """Staging settings. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param linked_service_name: Required. Staging linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param path: The path to storage for storing the interim data. Type: - string (or Expression with resultType string). - :type path: object - :param enable_compression: Specifies whether to use compression when - copying data via an interim staging. Default value is false. Type: boolean - (or Expression with resultType boolean). - :type enable_compression: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'path': {'key': 'path', 'type': 'object'}, - 'enable_compression': {'key': 'enableCompression', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, path=None, enable_compression=None, **kwargs) -> None: - super(StagingSettings, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.linked_service_name = linked_service_name - self.path = path - self.enable_compression = enable_compression diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/stored_procedure_parameter.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/stored_procedure_parameter.py deleted file mode 100644 index 748cf7cba53c..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/stored_procedure_parameter.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class StoredProcedureParameter(Model): - """SQL stored procedure parameter. - - :param value: Stored procedure parameter value. Type: string (or - Expression with resultType string). - :type value: object - :param type: Stored procedure parameter type. Possible values include: - 'String', 'Int', 'Decimal', 'Guid', 'Boolean', 'Date' - :type type: str or - ~azure.mgmt.datafactory.models.StoredProcedureParameterType - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(StoredProcedureParameter, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.type = kwargs.get('type', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/stored_procedure_parameter_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/stored_procedure_parameter_py3.py deleted file mode 100644 index bd967ce52876..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/stored_procedure_parameter_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class StoredProcedureParameter(Model): - """SQL stored procedure parameter. - - :param value: Stored procedure parameter value. Type: string (or - Expression with resultType string). - :type value: object - :param type: Stored procedure parameter type. Possible values include: - 'String', 'Int', 'Decimal', 'Guid', 'Boolean', 'Date' - :type type: str or - ~azure.mgmt.datafactory.models.StoredProcedureParameterType - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, value=None, type=None, **kwargs) -> None: - super(StoredProcedureParameter, self).__init__(**kwargs) - self.value = value - self.type = type diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sub_resource.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sub_resource.py deleted file mode 100644 index c80b531db7d1..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sub_resource.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResource(Model): - """Azure Data Factory nested resource, which belongs to a factory. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :ivar etag: Etag identifies change in the resource. - :vartype etag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.etag = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sub_resource_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sub_resource_py3.py deleted file mode 100644 index 3b2d9ec62366..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sub_resource_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResource(Model): - """Azure Data Factory nested resource, which belongs to a factory. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :ivar etag: Etag identifies change in the resource. - :vartype etag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.etag = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sybase_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sybase_linked_service.py deleted file mode 100644 index 634b4268bdb5..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sybase_linked_service.py +++ /dev/null @@ -1,91 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class SybaseLinkedService(LinkedService): - """Linked service for Sybase data source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param server: Required. Server name for connection. Type: string (or - Expression with resultType string). - :type server: object - :param database: Required. Database name for connection. Type: string (or - Expression with resultType string). - :type database: object - :param schema: Schema name for connection. Type: string (or Expression - with resultType string). - :type schema: object - :param authentication_type: AuthenticationType to be used for connection. - Possible values include: 'Basic', 'Windows' - :type authentication_type: str or - ~azure.mgmt.datafactory.models.SybaseAuthenticationType - :param username: Username for authentication. Type: string (or Expression - with resultType string). - :type username: object - :param password: Password for authentication. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'server': {'required': True}, - 'database': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'server': {'key': 'typeProperties.server', 'type': 'object'}, - 'database': {'key': 'typeProperties.database', 'type': 'object'}, - 'schema': {'key': 'typeProperties.schema', 'type': 'object'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, - 'username': {'key': 'typeProperties.username', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(SybaseLinkedService, self).__init__(**kwargs) - self.server = kwargs.get('server', None) - self.database = kwargs.get('database', None) - self.schema = kwargs.get('schema', None) - self.authentication_type = kwargs.get('authentication_type', None) - self.username = kwargs.get('username', None) - self.password = kwargs.get('password', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'Sybase' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sybase_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sybase_linked_service_py3.py deleted file mode 100644 index 59b20a5f73cd..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/sybase_linked_service_py3.py +++ /dev/null @@ -1,91 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class SybaseLinkedService(LinkedService): - """Linked service for Sybase data source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param server: Required. Server name for connection. Type: string (or - Expression with resultType string). - :type server: object - :param database: Required. Database name for connection. Type: string (or - Expression with resultType string). - :type database: object - :param schema: Schema name for connection. Type: string (or Expression - with resultType string). - :type schema: object - :param authentication_type: AuthenticationType to be used for connection. - Possible values include: 'Basic', 'Windows' - :type authentication_type: str or - ~azure.mgmt.datafactory.models.SybaseAuthenticationType - :param username: Username for authentication. Type: string (or Expression - with resultType string). - :type username: object - :param password: Password for authentication. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'server': {'required': True}, - 'database': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'server': {'key': 'typeProperties.server', 'type': 'object'}, - 'database': {'key': 'typeProperties.database', 'type': 'object'}, - 'schema': {'key': 'typeProperties.schema', 'type': 'object'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, - 'username': {'key': 'typeProperties.username', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, server, database, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, schema=None, authentication_type=None, username=None, password=None, encrypted_credential=None, **kwargs) -> None: - super(SybaseLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.server = server - self.database = database - self.schema = schema - self.authentication_type = authentication_type - self.username = username - self.password = password - self.encrypted_credential = encrypted_credential - self.type = 'Sybase' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/tabular_translator.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/tabular_translator.py deleted file mode 100644 index fdd098ae9659..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/tabular_translator.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_translator import CopyTranslator - - -class TabularTranslator(CopyTranslator): - """A copy activity tabular translator. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param type: Required. Constant filled by server. - :type type: str - :param column_mappings: Column mappings. Example: "UserId: MyUserId, - Group: MyGroup, Name: MyName" Type: string (or Expression with resultType - string). - :type column_mappings: object - :param schema_mapping: The schema mapping to map between tabular data and - hierarchical data. Example: {"Column1": "$.Column1", "Column2": - "$.Column2.Property1", "Column3": "$.Column2.Property2"}. Type: object (or - Expression with resultType object). - :type schema_mapping: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'type': {'key': 'type', 'type': 'str'}, - 'column_mappings': {'key': 'columnMappings', 'type': 'object'}, - 'schema_mapping': {'key': 'schemaMapping', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(TabularTranslator, self).__init__(**kwargs) - self.column_mappings = kwargs.get('column_mappings', None) - self.schema_mapping = kwargs.get('schema_mapping', None) - self.type = 'TabularTranslator' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/tabular_translator_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/tabular_translator_py3.py deleted file mode 100644 index 0bd2ce51a0f0..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/tabular_translator_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_translator_py3 import CopyTranslator - - -class TabularTranslator(CopyTranslator): - """A copy activity tabular translator. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param type: Required. Constant filled by server. - :type type: str - :param column_mappings: Column mappings. Example: "UserId: MyUserId, - Group: MyGroup, Name: MyName" Type: string (or Expression with resultType - string). - :type column_mappings: object - :param schema_mapping: The schema mapping to map between tabular data and - hierarchical data. Example: {"Column1": "$.Column1", "Column2": - "$.Column2.Property1", "Column3": "$.Column2.Property2"}. Type: object (or - Expression with resultType object). - :type schema_mapping: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'type': {'key': 'type', 'type': 'str'}, - 'column_mappings': {'key': 'columnMappings', 'type': 'object'}, - 'schema_mapping': {'key': 'schemaMapping', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, column_mappings=None, schema_mapping=None, **kwargs) -> None: - super(TabularTranslator, self).__init__(additional_properties=additional_properties, **kwargs) - self.column_mappings = column_mappings - self.schema_mapping = schema_mapping - self.type = 'TabularTranslator' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/teradata_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/teradata_linked_service.py deleted file mode 100644 index b3847d7dd9f4..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/teradata_linked_service.py +++ /dev/null @@ -1,80 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class TeradataLinkedService(LinkedService): - """Linked service for Teradata data source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param server: Required. Server name for connection. Type: string (or - Expression with resultType string). - :type server: object - :param authentication_type: AuthenticationType to be used for connection. - Possible values include: 'Basic', 'Windows' - :type authentication_type: str or - ~azure.mgmt.datafactory.models.TeradataAuthenticationType - :param username: Username for authentication. Type: string (or Expression - with resultType string). - :type username: object - :param password: Password for authentication. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'server': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'server': {'key': 'typeProperties.server', 'type': 'object'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, - 'username': {'key': 'typeProperties.username', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(TeradataLinkedService, self).__init__(**kwargs) - self.server = kwargs.get('server', None) - self.authentication_type = kwargs.get('authentication_type', None) - self.username = kwargs.get('username', None) - self.password = kwargs.get('password', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'Teradata' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/teradata_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/teradata_linked_service_py3.py deleted file mode 100644 index 236741422023..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/teradata_linked_service_py3.py +++ /dev/null @@ -1,80 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class TeradataLinkedService(LinkedService): - """Linked service for Teradata data source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param server: Required. Server name for connection. Type: string (or - Expression with resultType string). - :type server: object - :param authentication_type: AuthenticationType to be used for connection. - Possible values include: 'Basic', 'Windows' - :type authentication_type: str or - ~azure.mgmt.datafactory.models.TeradataAuthenticationType - :param username: Username for authentication. Type: string (or Expression - with resultType string). - :type username: object - :param password: Password for authentication. - :type password: ~azure.mgmt.datafactory.models.SecretBase - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'server': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'server': {'key': 'typeProperties.server', 'type': 'object'}, - 'authentication_type': {'key': 'typeProperties.authenticationType', 'type': 'str'}, - 'username': {'key': 'typeProperties.username', 'type': 'object'}, - 'password': {'key': 'typeProperties.password', 'type': 'SecretBase'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, server, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, authentication_type=None, username=None, password=None, encrypted_credential=None, **kwargs) -> None: - super(TeradataLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.server = server - self.authentication_type = authentication_type - self.username = username - self.password = password - self.encrypted_credential = encrypted_credential - self.type = 'Teradata' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/text_format.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/text_format.py deleted file mode 100644 index 48f32bf10133..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/text_format.py +++ /dev/null @@ -1,99 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_storage_format import DatasetStorageFormat - - -class TextFormat(DatasetStorageFormat): - """The data stored in text format. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param serializer: Serializer. Type: string (or Expression with resultType - string). - :type serializer: object - :param deserializer: Deserializer. Type: string (or Expression with - resultType string). - :type deserializer: object - :param type: Required. Constant filled by server. - :type type: str - :param column_delimiter: The column delimiter. Type: string (or Expression - with resultType string). - :type column_delimiter: object - :param row_delimiter: The row delimiter. Type: string (or Expression with - resultType string). - :type row_delimiter: object - :param escape_char: The escape character. Type: string (or Expression with - resultType string). - :type escape_char: object - :param quote_char: The quote character. Type: string (or Expression with - resultType string). - :type quote_char: object - :param null_value: The null value string. Type: string (or Expression with - resultType string). - :type null_value: object - :param encoding_name: The code page name of the preferred encoding. If - miss, the default value is ΓÇ£utf-8ΓÇ¥, unless BOM denotes another Unicode - encoding. Refer to the ΓÇ£NameΓÇ¥ column of the table in the following - link to set supported values: - https://msdn.microsoft.com/library/system.text.encoding.aspx. Type: string - (or Expression with resultType string). - :type encoding_name: object - :param treat_empty_as_null: Treat empty column values in the text file as - null. The default value is true. Type: boolean (or Expression with - resultType boolean). - :type treat_empty_as_null: object - :param skip_line_count: The number of lines/rows to be skipped when - parsing text files. The default value is 0. Type: integer (or Expression - with resultType integer). - :type skip_line_count: object - :param first_row_as_header: When used as input, treat the first row of - data as headers. When used as output,write the headers into the output as - the first row of data. The default value is false. Type: boolean (or - Expression with resultType boolean). - :type first_row_as_header: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'serializer': {'key': 'serializer', 'type': 'object'}, - 'deserializer': {'key': 'deserializer', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'column_delimiter': {'key': 'columnDelimiter', 'type': 'object'}, - 'row_delimiter': {'key': 'rowDelimiter', 'type': 'object'}, - 'escape_char': {'key': 'escapeChar', 'type': 'object'}, - 'quote_char': {'key': 'quoteChar', 'type': 'object'}, - 'null_value': {'key': 'nullValue', 'type': 'object'}, - 'encoding_name': {'key': 'encodingName', 'type': 'object'}, - 'treat_empty_as_null': {'key': 'treatEmptyAsNull', 'type': 'object'}, - 'skip_line_count': {'key': 'skipLineCount', 'type': 'object'}, - 'first_row_as_header': {'key': 'firstRowAsHeader', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(TextFormat, self).__init__(**kwargs) - self.column_delimiter = kwargs.get('column_delimiter', None) - self.row_delimiter = kwargs.get('row_delimiter', None) - self.escape_char = kwargs.get('escape_char', None) - self.quote_char = kwargs.get('quote_char', None) - self.null_value = kwargs.get('null_value', None) - self.encoding_name = kwargs.get('encoding_name', None) - self.treat_empty_as_null = kwargs.get('treat_empty_as_null', None) - self.skip_line_count = kwargs.get('skip_line_count', None) - self.first_row_as_header = kwargs.get('first_row_as_header', None) - self.type = 'TextFormat' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/text_format_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/text_format_py3.py deleted file mode 100644 index 0d876f62b112..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/text_format_py3.py +++ /dev/null @@ -1,99 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_storage_format_py3 import DatasetStorageFormat - - -class TextFormat(DatasetStorageFormat): - """The data stored in text format. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param serializer: Serializer. Type: string (or Expression with resultType - string). - :type serializer: object - :param deserializer: Deserializer. Type: string (or Expression with - resultType string). - :type deserializer: object - :param type: Required. Constant filled by server. - :type type: str - :param column_delimiter: The column delimiter. Type: string (or Expression - with resultType string). - :type column_delimiter: object - :param row_delimiter: The row delimiter. Type: string (or Expression with - resultType string). - :type row_delimiter: object - :param escape_char: The escape character. Type: string (or Expression with - resultType string). - :type escape_char: object - :param quote_char: The quote character. Type: string (or Expression with - resultType string). - :type quote_char: object - :param null_value: The null value string. Type: string (or Expression with - resultType string). - :type null_value: object - :param encoding_name: The code page name of the preferred encoding. If - miss, the default value is ΓÇ£utf-8ΓÇ¥, unless BOM denotes another Unicode - encoding. Refer to the ΓÇ£NameΓÇ¥ column of the table in the following - link to set supported values: - https://msdn.microsoft.com/library/system.text.encoding.aspx. Type: string - (or Expression with resultType string). - :type encoding_name: object - :param treat_empty_as_null: Treat empty column values in the text file as - null. The default value is true. Type: boolean (or Expression with - resultType boolean). - :type treat_empty_as_null: object - :param skip_line_count: The number of lines/rows to be skipped when - parsing text files. The default value is 0. Type: integer (or Expression - with resultType integer). - :type skip_line_count: object - :param first_row_as_header: When used as input, treat the first row of - data as headers. When used as output,write the headers into the output as - the first row of data. The default value is false. Type: boolean (or - Expression with resultType boolean). - :type first_row_as_header: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'serializer': {'key': 'serializer', 'type': 'object'}, - 'deserializer': {'key': 'deserializer', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'column_delimiter': {'key': 'columnDelimiter', 'type': 'object'}, - 'row_delimiter': {'key': 'rowDelimiter', 'type': 'object'}, - 'escape_char': {'key': 'escapeChar', 'type': 'object'}, - 'quote_char': {'key': 'quoteChar', 'type': 'object'}, - 'null_value': {'key': 'nullValue', 'type': 'object'}, - 'encoding_name': {'key': 'encodingName', 'type': 'object'}, - 'treat_empty_as_null': {'key': 'treatEmptyAsNull', 'type': 'object'}, - 'skip_line_count': {'key': 'skipLineCount', 'type': 'object'}, - 'first_row_as_header': {'key': 'firstRowAsHeader', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, serializer=None, deserializer=None, column_delimiter=None, row_delimiter=None, escape_char=None, quote_char=None, null_value=None, encoding_name=None, treat_empty_as_null=None, skip_line_count=None, first_row_as_header=None, **kwargs) -> None: - super(TextFormat, self).__init__(additional_properties=additional_properties, serializer=serializer, deserializer=deserializer, **kwargs) - self.column_delimiter = column_delimiter - self.row_delimiter = row_delimiter - self.escape_char = escape_char - self.quote_char = quote_char - self.null_value = null_value - self.encoding_name = encoding_name - self.treat_empty_as_null = treat_empty_as_null - self.skip_line_count = skip_line_count - self.first_row_as_header = first_row_as_header - self.type = 'TextFormat' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger.py deleted file mode 100644 index 398402178ae4..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger.py +++ /dev/null @@ -1,63 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Trigger(Model): - """Azure data factory nested object which contains information about creating - pipeline run. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: RerunTumblingWindowTrigger, TumblingWindowTrigger, - MultiplePipelineTrigger - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Trigger description. - :type description: str - :ivar runtime_state: Indicates if trigger is running or not. Updated when - Start/Stop APIs are called on the Trigger. Possible values include: - 'Started', 'Stopped', 'Disabled' - :vartype runtime_state: str or - ~azure.mgmt.datafactory.models.TriggerRuntimeState - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'runtime_state': {'readonly': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'runtime_state': {'key': 'runtimeState', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'RerunTumblingWindowTrigger': 'RerunTumblingWindowTrigger', 'TumblingWindowTrigger': 'TumblingWindowTrigger', 'MultiplePipelineTrigger': 'MultiplePipelineTrigger'} - } - - def __init__(self, **kwargs): - super(Trigger, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.description = kwargs.get('description', None) - self.runtime_state = None - self.type = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_dependency_reference.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_dependency_reference.py deleted file mode 100644 index 089aa9a3e5fc..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_dependency_reference.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dependency_reference import DependencyReference - - -class TriggerDependencyReference(DependencyReference): - """Trigger referenced dependency. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: TumblingWindowTriggerDependencyReference - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param reference_trigger: Required. Referenced trigger. - :type reference_trigger: ~azure.mgmt.datafactory.models.TriggerReference - """ - - _validation = { - 'type': {'required': True}, - 'reference_trigger': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'reference_trigger': {'key': 'referenceTrigger', 'type': 'TriggerReference'}, - } - - _subtype_map = { - 'type': {'TumblingWindowTriggerDependencyReference': 'TumblingWindowTriggerDependencyReference'} - } - - def __init__(self, **kwargs): - super(TriggerDependencyReference, self).__init__(**kwargs) - self.reference_trigger = kwargs.get('reference_trigger', None) - self.type = 'TriggerDependencyReference' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_dependency_reference_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_dependency_reference_py3.py deleted file mode 100644 index 716a0d926f8b..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_dependency_reference_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dependency_reference_py3 import DependencyReference - - -class TriggerDependencyReference(DependencyReference): - """Trigger referenced dependency. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: TumblingWindowTriggerDependencyReference - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param reference_trigger: Required. Referenced trigger. - :type reference_trigger: ~azure.mgmt.datafactory.models.TriggerReference - """ - - _validation = { - 'type': {'required': True}, - 'reference_trigger': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'reference_trigger': {'key': 'referenceTrigger', 'type': 'TriggerReference'}, - } - - _subtype_map = { - 'type': {'TumblingWindowTriggerDependencyReference': 'TumblingWindowTriggerDependencyReference'} - } - - def __init__(self, *, reference_trigger, **kwargs) -> None: - super(TriggerDependencyReference, self).__init__(**kwargs) - self.reference_trigger = reference_trigger - self.type = 'TriggerDependencyReference' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_pipeline_reference.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_pipeline_reference.py deleted file mode 100644 index 70c9f2904347..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_pipeline_reference.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TriggerPipelineReference(Model): - """Pipeline that needs to be triggered with the given parameters. - - :param pipeline_reference: Pipeline reference. - :type pipeline_reference: ~azure.mgmt.datafactory.models.PipelineReference - :param parameters: Pipeline parameters. - :type parameters: dict[str, object] - """ - - _attribute_map = { - 'pipeline_reference': {'key': 'pipelineReference', 'type': 'PipelineReference'}, - 'parameters': {'key': 'parameters', 'type': '{object}'}, - } - - def __init__(self, **kwargs): - super(TriggerPipelineReference, self).__init__(**kwargs) - self.pipeline_reference = kwargs.get('pipeline_reference', None) - self.parameters = kwargs.get('parameters', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_pipeline_reference_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_pipeline_reference_py3.py deleted file mode 100644 index e32af8006326..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_pipeline_reference_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TriggerPipelineReference(Model): - """Pipeline that needs to be triggered with the given parameters. - - :param pipeline_reference: Pipeline reference. - :type pipeline_reference: ~azure.mgmt.datafactory.models.PipelineReference - :param parameters: Pipeline parameters. - :type parameters: dict[str, object] - """ - - _attribute_map = { - 'pipeline_reference': {'key': 'pipelineReference', 'type': 'PipelineReference'}, - 'parameters': {'key': 'parameters', 'type': '{object}'}, - } - - def __init__(self, *, pipeline_reference=None, parameters=None, **kwargs) -> None: - super(TriggerPipelineReference, self).__init__(**kwargs) - self.pipeline_reference = pipeline_reference - self.parameters = parameters diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_py3.py deleted file mode 100644 index 09fb39534be1..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Trigger(Model): - """Azure data factory nested object which contains information about creating - pipeline run. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: RerunTumblingWindowTrigger, TumblingWindowTrigger, - MultiplePipelineTrigger - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Trigger description. - :type description: str - :ivar runtime_state: Indicates if trigger is running or not. Updated when - Start/Stop APIs are called on the Trigger. Possible values include: - 'Started', 'Stopped', 'Disabled' - :vartype runtime_state: str or - ~azure.mgmt.datafactory.models.TriggerRuntimeState - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'runtime_state': {'readonly': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'runtime_state': {'key': 'runtimeState', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'RerunTumblingWindowTrigger': 'RerunTumblingWindowTrigger', 'TumblingWindowTrigger': 'TumblingWindowTrigger', 'MultiplePipelineTrigger': 'MultiplePipelineTrigger'} - } - - def __init__(self, *, additional_properties=None, description: str=None, **kwargs) -> None: - super(Trigger, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.description = description - self.runtime_state = None - self.type = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_reference.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_reference.py deleted file mode 100644 index a4f952dac85f..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_reference.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TriggerReference(Model): - """Trigger reference type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. Trigger reference type. Default value: - "TriggerReference" . - :vartype type: str - :param reference_name: Required. Reference trigger name. - :type reference_name: str - """ - - _validation = { - 'type': {'required': True, 'constant': True}, - 'reference_name': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'reference_name': {'key': 'referenceName', 'type': 'str'}, - } - - type = "TriggerReference" - - def __init__(self, **kwargs): - super(TriggerReference, self).__init__(**kwargs) - self.reference_name = kwargs.get('reference_name', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_reference_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_reference_py3.py deleted file mode 100644 index 805e407e80a7..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_reference_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TriggerReference(Model): - """Trigger reference type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. Trigger reference type. Default value: - "TriggerReference" . - :vartype type: str - :param reference_name: Required. Reference trigger name. - :type reference_name: str - """ - - _validation = { - 'type': {'required': True, 'constant': True}, - 'reference_name': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'reference_name': {'key': 'referenceName', 'type': 'str'}, - } - - type = "TriggerReference" - - def __init__(self, *, reference_name: str, **kwargs) -> None: - super(TriggerReference, self).__init__(**kwargs) - self.reference_name = reference_name diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_resource.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_resource.py deleted file mode 100644 index 539ac4775350..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_resource.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class TriggerResource(SubResource): - """Trigger resource type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :ivar etag: Etag identifies change in the resource. - :vartype etag: str - :param properties: Required. Properties of the trigger. - :type properties: ~azure.mgmt.datafactory.models.Trigger - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'properties': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'Trigger'}, - } - - def __init__(self, **kwargs): - super(TriggerResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_resource_paged.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_resource_paged.py deleted file mode 100644 index 1a7a003f4a6e..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_resource_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class TriggerResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`TriggerResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[TriggerResource]'} - } - - def __init__(self, *args, **kwargs): - - super(TriggerResourcePaged, self).__init__(*args, **kwargs) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_resource_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_resource_py3.py deleted file mode 100644 index ae6a04ac3128..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_resource_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class TriggerResource(SubResource): - """Trigger resource type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :ivar etag: Etag identifies change in the resource. - :vartype etag: str - :param properties: Required. Properties of the trigger. - :type properties: ~azure.mgmt.datafactory.models.Trigger - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'properties': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'Trigger'}, - } - - def __init__(self, *, properties, **kwargs) -> None: - super(TriggerResource, self).__init__(**kwargs) - self.properties = properties diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_run.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_run.py deleted file mode 100644 index 9fad7bbfd9fa..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_run.py +++ /dev/null @@ -1,78 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TriggerRun(Model): - """Trigger runs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar trigger_run_id: Trigger run id. - :vartype trigger_run_id: str - :ivar trigger_name: Trigger name. - :vartype trigger_name: str - :ivar trigger_type: Trigger type. - :vartype trigger_type: str - :ivar trigger_run_timestamp: Trigger run start time. - :vartype trigger_run_timestamp: datetime - :ivar status: Trigger run status. Possible values include: 'Succeeded', - 'Failed', 'Inprogress' - :vartype status: str or ~azure.mgmt.datafactory.models.TriggerRunStatus - :ivar message: Trigger error message. - :vartype message: str - :ivar properties: List of property name and value related to trigger run. - Name, value pair depends on type of trigger. - :vartype properties: dict[str, str] - :ivar triggered_pipelines: List of pipeline name and run Id triggered by - the trigger run. - :vartype triggered_pipelines: dict[str, str] - """ - - _validation = { - 'trigger_run_id': {'readonly': True}, - 'trigger_name': {'readonly': True}, - 'trigger_type': {'readonly': True}, - 'trigger_run_timestamp': {'readonly': True}, - 'status': {'readonly': True}, - 'message': {'readonly': True}, - 'properties': {'readonly': True}, - 'triggered_pipelines': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'trigger_run_id': {'key': 'triggerRunId', 'type': 'str'}, - 'trigger_name': {'key': 'triggerName', 'type': 'str'}, - 'trigger_type': {'key': 'triggerType', 'type': 'str'}, - 'trigger_run_timestamp': {'key': 'triggerRunTimestamp', 'type': 'iso-8601'}, - 'status': {'key': 'status', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'triggered_pipelines': {'key': 'triggeredPipelines', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TriggerRun, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.trigger_run_id = None - self.trigger_name = None - self.trigger_type = None - self.trigger_run_timestamp = None - self.status = None - self.message = None - self.properties = None - self.triggered_pipelines = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_run_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_run_py3.py deleted file mode 100644 index 5a9fe50f6894..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_run_py3.py +++ /dev/null @@ -1,78 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TriggerRun(Model): - """Trigger runs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar trigger_run_id: Trigger run id. - :vartype trigger_run_id: str - :ivar trigger_name: Trigger name. - :vartype trigger_name: str - :ivar trigger_type: Trigger type. - :vartype trigger_type: str - :ivar trigger_run_timestamp: Trigger run start time. - :vartype trigger_run_timestamp: datetime - :ivar status: Trigger run status. Possible values include: 'Succeeded', - 'Failed', 'Inprogress' - :vartype status: str or ~azure.mgmt.datafactory.models.TriggerRunStatus - :ivar message: Trigger error message. - :vartype message: str - :ivar properties: List of property name and value related to trigger run. - Name, value pair depends on type of trigger. - :vartype properties: dict[str, str] - :ivar triggered_pipelines: List of pipeline name and run Id triggered by - the trigger run. - :vartype triggered_pipelines: dict[str, str] - """ - - _validation = { - 'trigger_run_id': {'readonly': True}, - 'trigger_name': {'readonly': True}, - 'trigger_type': {'readonly': True}, - 'trigger_run_timestamp': {'readonly': True}, - 'status': {'readonly': True}, - 'message': {'readonly': True}, - 'properties': {'readonly': True}, - 'triggered_pipelines': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'trigger_run_id': {'key': 'triggerRunId', 'type': 'str'}, - 'trigger_name': {'key': 'triggerName', 'type': 'str'}, - 'trigger_type': {'key': 'triggerType', 'type': 'str'}, - 'trigger_run_timestamp': {'key': 'triggerRunTimestamp', 'type': 'iso-8601'}, - 'status': {'key': 'status', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'triggered_pipelines': {'key': 'triggeredPipelines', 'type': '{str}'}, - } - - def __init__(self, *, additional_properties=None, **kwargs) -> None: - super(TriggerRun, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.trigger_run_id = None - self.trigger_name = None - self.trigger_type = None - self.trigger_run_timestamp = None - self.status = None - self.message = None - self.properties = None - self.triggered_pipelines = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_runs_query_response.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_runs_query_response.py deleted file mode 100644 index 7684fe7eb7dc..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_runs_query_response.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TriggerRunsQueryResponse(Model): - """A list of trigger runs. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. List of trigger runs. - :type value: list[~azure.mgmt.datafactory.models.TriggerRun] - :param continuation_token: The continuation token for getting the next - page of results, if any remaining results exist, null otherwise. - :type continuation_token: str - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[TriggerRun]'}, - 'continuation_token': {'key': 'continuationToken', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TriggerRunsQueryResponse, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.continuation_token = kwargs.get('continuation_token', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_runs_query_response_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_runs_query_response_py3.py deleted file mode 100644 index 391a2441b3d1..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_runs_query_response_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TriggerRunsQueryResponse(Model): - """A list of trigger runs. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. List of trigger runs. - :type value: list[~azure.mgmt.datafactory.models.TriggerRun] - :param continuation_token: The continuation token for getting the next - page of results, if any remaining results exist, null otherwise. - :type continuation_token: str - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[TriggerRun]'}, - 'continuation_token': {'key': 'continuationToken', 'type': 'str'}, - } - - def __init__(self, *, value, continuation_token: str=None, **kwargs) -> None: - super(TriggerRunsQueryResponse, self).__init__(**kwargs) - self.value = value - self.continuation_token = continuation_token diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/tumbling_window_trigger.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/tumbling_window_trigger.py deleted file mode 100644 index ce46a4aac7e2..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/tumbling_window_trigger.py +++ /dev/null @@ -1,108 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .trigger import Trigger - - -class TumblingWindowTrigger(Trigger): - """Trigger that schedules pipeline runs for all fixed time interval windows - from a start time without gaps and also supports backfill scenarios (when - start time is in the past). - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Trigger description. - :type description: str - :ivar runtime_state: Indicates if trigger is running or not. Updated when - Start/Stop APIs are called on the Trigger. Possible values include: - 'Started', 'Stopped', 'Disabled' - :vartype runtime_state: str or - ~azure.mgmt.datafactory.models.TriggerRuntimeState - :param type: Required. Constant filled by server. - :type type: str - :param pipeline: Required. Pipeline for which runs are created when an - event is fired for trigger window that is ready. - :type pipeline: ~azure.mgmt.datafactory.models.TriggerPipelineReference - :param frequency: Required. The frequency of the time windows. Possible - values include: 'Minute', 'Hour' - :type frequency: str or - ~azure.mgmt.datafactory.models.TumblingWindowFrequency - :param interval: Required. The interval of the time windows. The minimum - interval allowed is 15 Minutes. - :type interval: int - :param start_time: Required. The start time for the time period for the - trigger during which events are fired for windows that are ready. Only UTC - time is currently supported. - :type start_time: datetime - :param end_time: The end time for the time period for the trigger during - which events are fired for windows that are ready. Only UTC time is - currently supported. - :type end_time: datetime - :param delay: Specifies how long the trigger waits past due time before - triggering new run. It doesn't alter window start and end time. The - default is 0. Type: string (or Expression with resultType string), - pattern: ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type delay: object - :param max_concurrency: Required. The max number of parallel time windows - (ready for execution) for which a new run is triggered. - :type max_concurrency: int - :param retry_policy: Retry policy that will be applied for failed pipeline - runs. - :type retry_policy: ~azure.mgmt.datafactory.models.RetryPolicy - :param depends_on: Triggers that this trigger depends on. Only tumbling - window triggers are supported. - :type depends_on: list[~azure.mgmt.datafactory.models.DependencyReference] - """ - - _validation = { - 'runtime_state': {'readonly': True}, - 'type': {'required': True}, - 'pipeline': {'required': True}, - 'frequency': {'required': True}, - 'interval': {'required': True}, - 'start_time': {'required': True}, - 'max_concurrency': {'required': True, 'maximum': 50, 'minimum': 1}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'runtime_state': {'key': 'runtimeState', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'pipeline': {'key': 'pipeline', 'type': 'TriggerPipelineReference'}, - 'frequency': {'key': 'typeProperties.frequency', 'type': 'str'}, - 'interval': {'key': 'typeProperties.interval', 'type': 'int'}, - 'start_time': {'key': 'typeProperties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'typeProperties.endTime', 'type': 'iso-8601'}, - 'delay': {'key': 'typeProperties.delay', 'type': 'object'}, - 'max_concurrency': {'key': 'typeProperties.maxConcurrency', 'type': 'int'}, - 'retry_policy': {'key': 'typeProperties.retryPolicy', 'type': 'RetryPolicy'}, - 'depends_on': {'key': 'typeProperties.dependsOn', 'type': '[DependencyReference]'}, - } - - def __init__(self, **kwargs): - super(TumblingWindowTrigger, self).__init__(**kwargs) - self.pipeline = kwargs.get('pipeline', None) - self.frequency = kwargs.get('frequency', None) - self.interval = kwargs.get('interval', None) - self.start_time = kwargs.get('start_time', None) - self.end_time = kwargs.get('end_time', None) - self.delay = kwargs.get('delay', None) - self.max_concurrency = kwargs.get('max_concurrency', None) - self.retry_policy = kwargs.get('retry_policy', None) - self.depends_on = kwargs.get('depends_on', None) - self.type = 'TumblingWindowTrigger' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/tumbling_window_trigger_dependency_reference.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/tumbling_window_trigger_dependency_reference.py deleted file mode 100644 index 89dcefbc8c09..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/tumbling_window_trigger_dependency_reference.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .trigger_dependency_reference import TriggerDependencyReference - - -class TumblingWindowTriggerDependencyReference(TriggerDependencyReference): - """Referenced tumbling window trigger dependency. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param reference_trigger: Required. Referenced trigger. - :type reference_trigger: ~azure.mgmt.datafactory.models.TriggerReference - :param offset: Timespan applied to the start time of a tumbling window - when evaluating dependency. - :type offset: str - :param size: The size of the window when evaluating the dependency. If - undefined the frequency of the tumbling window will be used. - :type size: str - """ - - _validation = { - 'type': {'required': True}, - 'reference_trigger': {'required': True}, - 'offset': {'max_length': 15, 'min_length': 8, 'pattern': r'((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9]))'}, - 'size': {'max_length': 15, 'min_length': 8, 'pattern': r'((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9]))'}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'reference_trigger': {'key': 'referenceTrigger', 'type': 'TriggerReference'}, - 'offset': {'key': 'offset', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TumblingWindowTriggerDependencyReference, self).__init__(**kwargs) - self.offset = kwargs.get('offset', None) - self.size = kwargs.get('size', None) - self.type = 'TumblingWindowTriggerDependencyReference' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/tumbling_window_trigger_dependency_reference_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/tumbling_window_trigger_dependency_reference_py3.py deleted file mode 100644 index 648f25e59937..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/tumbling_window_trigger_dependency_reference_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .trigger_dependency_reference_py3 import TriggerDependencyReference - - -class TumblingWindowTriggerDependencyReference(TriggerDependencyReference): - """Referenced tumbling window trigger dependency. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param reference_trigger: Required. Referenced trigger. - :type reference_trigger: ~azure.mgmt.datafactory.models.TriggerReference - :param offset: Timespan applied to the start time of a tumbling window - when evaluating dependency. - :type offset: str - :param size: The size of the window when evaluating the dependency. If - undefined the frequency of the tumbling window will be used. - :type size: str - """ - - _validation = { - 'type': {'required': True}, - 'reference_trigger': {'required': True}, - 'offset': {'max_length': 15, 'min_length': 8, 'pattern': r'((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9]))'}, - 'size': {'max_length': 15, 'min_length': 8, 'pattern': r'((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9]))'}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'reference_trigger': {'key': 'referenceTrigger', 'type': 'TriggerReference'}, - 'offset': {'key': 'offset', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'str'}, - } - - def __init__(self, *, reference_trigger, offset: str=None, size: str=None, **kwargs) -> None: - super(TumblingWindowTriggerDependencyReference, self).__init__(reference_trigger=reference_trigger, **kwargs) - self.offset = offset - self.size = size - self.type = 'TumblingWindowTriggerDependencyReference' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/tumbling_window_trigger_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/tumbling_window_trigger_py3.py deleted file mode 100644 index bc3114f08edd..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/tumbling_window_trigger_py3.py +++ /dev/null @@ -1,108 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .trigger_py3 import Trigger - - -class TumblingWindowTrigger(Trigger): - """Trigger that schedules pipeline runs for all fixed time interval windows - from a start time without gaps and also supports backfill scenarios (when - start time is in the past). - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Trigger description. - :type description: str - :ivar runtime_state: Indicates if trigger is running or not. Updated when - Start/Stop APIs are called on the Trigger. Possible values include: - 'Started', 'Stopped', 'Disabled' - :vartype runtime_state: str or - ~azure.mgmt.datafactory.models.TriggerRuntimeState - :param type: Required. Constant filled by server. - :type type: str - :param pipeline: Required. Pipeline for which runs are created when an - event is fired for trigger window that is ready. - :type pipeline: ~azure.mgmt.datafactory.models.TriggerPipelineReference - :param frequency: Required. The frequency of the time windows. Possible - values include: 'Minute', 'Hour' - :type frequency: str or - ~azure.mgmt.datafactory.models.TumblingWindowFrequency - :param interval: Required. The interval of the time windows. The minimum - interval allowed is 15 Minutes. - :type interval: int - :param start_time: Required. The start time for the time period for the - trigger during which events are fired for windows that are ready. Only UTC - time is currently supported. - :type start_time: datetime - :param end_time: The end time for the time period for the trigger during - which events are fired for windows that are ready. Only UTC time is - currently supported. - :type end_time: datetime - :param delay: Specifies how long the trigger waits past due time before - triggering new run. It doesn't alter window start and end time. The - default is 0. Type: string (or Expression with resultType string), - pattern: ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type delay: object - :param max_concurrency: Required. The max number of parallel time windows - (ready for execution) for which a new run is triggered. - :type max_concurrency: int - :param retry_policy: Retry policy that will be applied for failed pipeline - runs. - :type retry_policy: ~azure.mgmt.datafactory.models.RetryPolicy - :param depends_on: Triggers that this trigger depends on. Only tumbling - window triggers are supported. - :type depends_on: list[~azure.mgmt.datafactory.models.DependencyReference] - """ - - _validation = { - 'runtime_state': {'readonly': True}, - 'type': {'required': True}, - 'pipeline': {'required': True}, - 'frequency': {'required': True}, - 'interval': {'required': True}, - 'start_time': {'required': True}, - 'max_concurrency': {'required': True, 'maximum': 50, 'minimum': 1}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'runtime_state': {'key': 'runtimeState', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'pipeline': {'key': 'pipeline', 'type': 'TriggerPipelineReference'}, - 'frequency': {'key': 'typeProperties.frequency', 'type': 'str'}, - 'interval': {'key': 'typeProperties.interval', 'type': 'int'}, - 'start_time': {'key': 'typeProperties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'typeProperties.endTime', 'type': 'iso-8601'}, - 'delay': {'key': 'typeProperties.delay', 'type': 'object'}, - 'max_concurrency': {'key': 'typeProperties.maxConcurrency', 'type': 'int'}, - 'retry_policy': {'key': 'typeProperties.retryPolicy', 'type': 'RetryPolicy'}, - 'depends_on': {'key': 'typeProperties.dependsOn', 'type': '[DependencyReference]'}, - } - - def __init__(self, *, pipeline, frequency, interval: int, start_time, max_concurrency: int, additional_properties=None, description: str=None, end_time=None, delay=None, retry_policy=None, depends_on=None, **kwargs) -> None: - super(TumblingWindowTrigger, self).__init__(additional_properties=additional_properties, description=description, **kwargs) - self.pipeline = pipeline - self.frequency = frequency - self.interval = interval - self.start_time = start_time - self.end_time = end_time - self.delay = delay - self.max_concurrency = max_concurrency - self.retry_policy = retry_policy - self.depends_on = depends_on - self.type = 'TumblingWindowTrigger' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/until_activity.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/until_activity.py deleted file mode 100644 index eede36501d6c..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/until_activity.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .control_activity import ControlActivity - - -class UntilActivity(ControlActivity): - """This activity executes inner activities until the specified boolean - expression results to true or timeout is reached, whichever is earlier. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param expression: Required. An expression that would evaluate to Boolean. - The loop will continue until this expression evaluates to true - :type expression: ~azure.mgmt.datafactory.models.Expression - :param timeout: Specifies the timeout for the activity to run. If there is - no value specified, it takes the value of TimeSpan.FromDays(7) which is 1 - week as default. Type: string (or Expression with resultType string), - pattern: ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). Type: - string (or Expression with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type timeout: object - :param activities: Required. List of activities to execute. - :type activities: list[~azure.mgmt.datafactory.models.Activity] - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'expression': {'required': True}, - 'activities': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'expression': {'key': 'typeProperties.expression', 'type': 'Expression'}, - 'timeout': {'key': 'typeProperties.timeout', 'type': 'object'}, - 'activities': {'key': 'typeProperties.activities', 'type': '[Activity]'}, - } - - def __init__(self, **kwargs): - super(UntilActivity, self).__init__(**kwargs) - self.expression = kwargs.get('expression', None) - self.timeout = kwargs.get('timeout', None) - self.activities = kwargs.get('activities', None) - self.type = 'Until' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/until_activity_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/until_activity_py3.py deleted file mode 100644 index 40c03ce18591..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/until_activity_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .control_activity_py3 import ControlActivity - - -class UntilActivity(ControlActivity): - """This activity executes inner activities until the specified boolean - expression results to true or timeout is reached, whichever is earlier. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param expression: Required. An expression that would evaluate to Boolean. - The loop will continue until this expression evaluates to true - :type expression: ~azure.mgmt.datafactory.models.Expression - :param timeout: Specifies the timeout for the activity to run. If there is - no value specified, it takes the value of TimeSpan.FromDays(7) which is 1 - week as default. Type: string (or Expression with resultType string), - pattern: ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). Type: - string (or Expression with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type timeout: object - :param activities: Required. List of activities to execute. - :type activities: list[~azure.mgmt.datafactory.models.Activity] - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'expression': {'required': True}, - 'activities': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'expression': {'key': 'typeProperties.expression', 'type': 'Expression'}, - 'timeout': {'key': 'typeProperties.timeout', 'type': 'object'}, - 'activities': {'key': 'typeProperties.activities', 'type': '[Activity]'}, - } - - def __init__(self, *, name: str, expression, activities, additional_properties=None, description: str=None, depends_on=None, user_properties=None, timeout=None, **kwargs) -> None: - super(UntilActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, **kwargs) - self.expression = expression - self.timeout = timeout - self.activities = activities - self.type = 'Until' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/update_integration_runtime_node_request.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/update_integration_runtime_node_request.py deleted file mode 100644 index c6460310225a..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/update_integration_runtime_node_request.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateIntegrationRuntimeNodeRequest(Model): - """Update integration runtime node request. - - :param concurrent_jobs_limit: The number of concurrent jobs permitted to - run on the integration runtime node. Values between 1 and - maxConcurrentJobs(inclusive) are allowed. - :type concurrent_jobs_limit: int - """ - - _validation = { - 'concurrent_jobs_limit': {'minimum': 1}, - } - - _attribute_map = { - 'concurrent_jobs_limit': {'key': 'concurrentJobsLimit', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(UpdateIntegrationRuntimeNodeRequest, self).__init__(**kwargs) - self.concurrent_jobs_limit = kwargs.get('concurrent_jobs_limit', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/update_integration_runtime_node_request_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/update_integration_runtime_node_request_py3.py deleted file mode 100644 index de1605885139..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/update_integration_runtime_node_request_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateIntegrationRuntimeNodeRequest(Model): - """Update integration runtime node request. - - :param concurrent_jobs_limit: The number of concurrent jobs permitted to - run on the integration runtime node. Values between 1 and - maxConcurrentJobs(inclusive) are allowed. - :type concurrent_jobs_limit: int - """ - - _validation = { - 'concurrent_jobs_limit': {'minimum': 1}, - } - - _attribute_map = { - 'concurrent_jobs_limit': {'key': 'concurrentJobsLimit', 'type': 'int'}, - } - - def __init__(self, *, concurrent_jobs_limit: int=None, **kwargs) -> None: - super(UpdateIntegrationRuntimeNodeRequest, self).__init__(**kwargs) - self.concurrent_jobs_limit = concurrent_jobs_limit diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/update_integration_runtime_request.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/update_integration_runtime_request.py deleted file mode 100644 index bd5e332b50f5..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/update_integration_runtime_request.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateIntegrationRuntimeRequest(Model): - """Update integration runtime request. - - :param auto_update: Enables or disables the auto-update feature of the - self-hosted integration runtime. See - https://go.microsoft.com/fwlink/?linkid=854189. Possible values include: - 'On', 'Off' - :type auto_update: str or - ~azure.mgmt.datafactory.models.IntegrationRuntimeAutoUpdate - :param update_delay_offset: The time offset (in hours) in the day, e.g., - PT03H is 3 hours. The integration runtime auto update will happen on that - time. - :type update_delay_offset: str - """ - - _attribute_map = { - 'auto_update': {'key': 'autoUpdate', 'type': 'str'}, - 'update_delay_offset': {'key': 'updateDelayOffset', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UpdateIntegrationRuntimeRequest, self).__init__(**kwargs) - self.auto_update = kwargs.get('auto_update', None) - self.update_delay_offset = kwargs.get('update_delay_offset', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/update_integration_runtime_request_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/update_integration_runtime_request_py3.py deleted file mode 100644 index 731cb942b472..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/update_integration_runtime_request_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateIntegrationRuntimeRequest(Model): - """Update integration runtime request. - - :param auto_update: Enables or disables the auto-update feature of the - self-hosted integration runtime. See - https://go.microsoft.com/fwlink/?linkid=854189. Possible values include: - 'On', 'Off' - :type auto_update: str or - ~azure.mgmt.datafactory.models.IntegrationRuntimeAutoUpdate - :param update_delay_offset: The time offset (in hours) in the day, e.g., - PT03H is 3 hours. The integration runtime auto update will happen on that - time. - :type update_delay_offset: str - """ - - _attribute_map = { - 'auto_update': {'key': 'autoUpdate', 'type': 'str'}, - 'update_delay_offset': {'key': 'updateDelayOffset', 'type': 'str'}, - } - - def __init__(self, *, auto_update=None, update_delay_offset: str=None, **kwargs) -> None: - super(UpdateIntegrationRuntimeRequest, self).__init__(**kwargs) - self.auto_update = auto_update - self.update_delay_offset = update_delay_offset diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/user_access_policy.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/user_access_policy.py deleted file mode 100644 index b51e313b6f0c..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/user_access_policy.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserAccessPolicy(Model): - """Get Data Plane read only token request definition. - - :param permissions: The string with permissions for Data Plane access. - Currently only 'r' is supported which grants read only access. - :type permissions: str - :param access_resource_path: The resource path to get access relative to - factory. Currently only empty string is supported which corresponds to the - factory resource. - :type access_resource_path: str - :param profile_name: The name of the profile. Currently only the default - is supported. The default value is DefaultProfile. - :type profile_name: str - :param start_time: Start time for the token. If not specified the current - time will be used. - :type start_time: str - :param expire_time: Expiration time for the token. Maximum duration for - the token is eight hours and by default the token will expire in eight - hours. - :type expire_time: str - """ - - _attribute_map = { - 'permissions': {'key': 'permissions', 'type': 'str'}, - 'access_resource_path': {'key': 'accessResourcePath', 'type': 'str'}, - 'profile_name': {'key': 'profileName', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'str'}, - 'expire_time': {'key': 'expireTime', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserAccessPolicy, self).__init__(**kwargs) - self.permissions = kwargs.get('permissions', None) - self.access_resource_path = kwargs.get('access_resource_path', None) - self.profile_name = kwargs.get('profile_name', None) - self.start_time = kwargs.get('start_time', None) - self.expire_time = kwargs.get('expire_time', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/user_access_policy_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/user_access_policy_py3.py deleted file mode 100644 index 26e2a7639a09..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/user_access_policy_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserAccessPolicy(Model): - """Get Data Plane read only token request definition. - - :param permissions: The string with permissions for Data Plane access. - Currently only 'r' is supported which grants read only access. - :type permissions: str - :param access_resource_path: The resource path to get access relative to - factory. Currently only empty string is supported which corresponds to the - factory resource. - :type access_resource_path: str - :param profile_name: The name of the profile. Currently only the default - is supported. The default value is DefaultProfile. - :type profile_name: str - :param start_time: Start time for the token. If not specified the current - time will be used. - :type start_time: str - :param expire_time: Expiration time for the token. Maximum duration for - the token is eight hours and by default the token will expire in eight - hours. - :type expire_time: str - """ - - _attribute_map = { - 'permissions': {'key': 'permissions', 'type': 'str'}, - 'access_resource_path': {'key': 'accessResourcePath', 'type': 'str'}, - 'profile_name': {'key': 'profileName', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'str'}, - 'expire_time': {'key': 'expireTime', 'type': 'str'}, - } - - def __init__(self, *, permissions: str=None, access_resource_path: str=None, profile_name: str=None, start_time: str=None, expire_time: str=None, **kwargs) -> None: - super(UserAccessPolicy, self).__init__(**kwargs) - self.permissions = permissions - self.access_resource_path = access_resource_path - self.profile_name = profile_name - self.start_time = start_time - self.expire_time = expire_time diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/user_property.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/user_property.py deleted file mode 100644 index 30692d2960ec..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/user_property.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserProperty(Model): - """User property. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. User property name. - :type name: str - :param value: Required. User property value. Type: string (or Expression - with resultType string). - :type value: object - """ - - _validation = { - 'name': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(UserProperty, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/user_property_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/user_property_py3.py deleted file mode 100644 index 7b4f3beb0195..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/user_property_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserProperty(Model): - """User property. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. User property name. - :type name: str - :param value: Required. User property value. Type: string (or Expression - with resultType string). - :type value: object - """ - - _validation = { - 'name': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'object'}, - } - - def __init__(self, *, name: str, value, **kwargs) -> None: - super(UserProperty, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/variable_specification.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/variable_specification.py deleted file mode 100644 index 6d7fd808fa44..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/variable_specification.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VariableSpecification(Model): - """Definition of a single variable for a Pipeline. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Variable type. Possible values include: 'String', - 'Bool', 'Array' - :type type: str or ~azure.mgmt.datafactory.models.VariableType - :param default_value: Default value of variable. - :type default_value: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'default_value': {'key': 'defaultValue', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(VariableSpecification, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.default_value = kwargs.get('default_value', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/variable_specification_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/variable_specification_py3.py deleted file mode 100644 index d60b3b4b1591..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/variable_specification_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VariableSpecification(Model): - """Definition of a single variable for a Pipeline. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Variable type. Possible values include: 'String', - 'Bool', 'Array' - :type type: str or ~azure.mgmt.datafactory.models.VariableType - :param default_value: Default value of variable. - :type default_value: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'default_value': {'key': 'defaultValue', 'type': 'object'}, - } - - def __init__(self, *, type, default_value=None, **kwargs) -> None: - super(VariableSpecification, self).__init__(**kwargs) - self.type = type - self.default_value = default_value diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/vertica_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/vertica_linked_service.py deleted file mode 100644 index fafba164a752..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/vertica_linked_service.py +++ /dev/null @@ -1,69 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class VerticaLinkedService(LinkedService): - """Vertica linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param connection_string: An ODBC connection string. Type: string, - SecureString or AzureKeyVaultSecretReference. - :type connection_string: object - :param pwd: The Azure key vault secret reference of password in connection - string. - :type pwd: ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, - 'pwd': {'key': 'typeProperties.pwd', 'type': 'AzureKeyVaultSecretReference'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(VerticaLinkedService, self).__init__(**kwargs) - self.connection_string = kwargs.get('connection_string', None) - self.pwd = kwargs.get('pwd', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'Vertica' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/vertica_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/vertica_linked_service_py3.py deleted file mode 100644 index 77caf915eaab..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/vertica_linked_service_py3.py +++ /dev/null @@ -1,69 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class VerticaLinkedService(LinkedService): - """Vertica linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param connection_string: An ODBC connection string. Type: string, - SecureString or AzureKeyVaultSecretReference. - :type connection_string: object - :param pwd: The Azure key vault secret reference of password in connection - string. - :type pwd: ~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'}, - 'pwd': {'key': 'typeProperties.pwd', 'type': 'AzureKeyVaultSecretReference'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, connection_string=None, pwd=None, encrypted_credential=None, **kwargs) -> None: - super(VerticaLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.connection_string = connection_string - self.pwd = pwd - self.encrypted_credential = encrypted_credential - self.type = 'Vertica' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/vertica_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/vertica_source.py deleted file mode 100644 index 1670c0e9fc49..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/vertica_source.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class VerticaSource(CopySource): - """A copy activity Vertica source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(VerticaSource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.type = 'VerticaSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/vertica_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/vertica_source_py3.py deleted file mode 100644 index 6be2edd35218..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/vertica_source_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class VerticaSource(CopySource): - """A copy activity Vertica source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query=None, **kwargs) -> None: - super(VerticaSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.type = 'VerticaSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/vertica_table_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/vertica_table_dataset.py deleted file mode 100644 index e84465f8ba07..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/vertica_table_dataset.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class VerticaTableDataset(Dataset): - """Vertica dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(VerticaTableDataset, self).__init__(**kwargs) - self.table_name = kwargs.get('table_name', None) - self.type = 'VerticaTable' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/vertica_table_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/vertica_table_dataset_py3.py deleted file mode 100644 index 87d69bb9a443..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/vertica_table_dataset_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class VerticaTableDataset(Dataset): - """Vertica dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: - super(VerticaTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.table_name = table_name - self.type = 'VerticaTable' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/wait_activity.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/wait_activity.py deleted file mode 100644 index 91f3decc7473..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/wait_activity.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .control_activity import ControlActivity - - -class WaitActivity(ControlActivity): - """This activity suspends pipeline execution for the specified interval. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param wait_time_in_seconds: Required. Duration in seconds. - :type wait_time_in_seconds: int - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'wait_time_in_seconds': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'wait_time_in_seconds': {'key': 'typeProperties.waitTimeInSeconds', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(WaitActivity, self).__init__(**kwargs) - self.wait_time_in_seconds = kwargs.get('wait_time_in_seconds', None) - self.type = 'Wait' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/wait_activity_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/wait_activity_py3.py deleted file mode 100644 index ff85c9d16733..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/wait_activity_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .control_activity_py3 import ControlActivity - - -class WaitActivity(ControlActivity): - """This activity suspends pipeline execution for the specified interval. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param wait_time_in_seconds: Required. Duration in seconds. - :type wait_time_in_seconds: int - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'wait_time_in_seconds': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'wait_time_in_seconds': {'key': 'typeProperties.waitTimeInSeconds', 'type': 'int'}, - } - - def __init__(self, *, name: str, wait_time_in_seconds: int, additional_properties=None, description: str=None, depends_on=None, user_properties=None, **kwargs) -> None: - super(WaitActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, **kwargs) - self.wait_time_in_seconds = wait_time_in_seconds - self.type = 'Wait' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_activity.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_activity.py deleted file mode 100644 index 70264719d52e..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_activity.py +++ /dev/null @@ -1,98 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity import ExecutionActivity - - -class WebActivity(ExecutionActivity): - """Web activity. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param method: Required. Rest API method for target endpoint. Possible - values include: 'GET', 'POST', 'PUT', 'DELETE' - :type method: str or ~azure.mgmt.datafactory.models.WebActivityMethod - :param url: Required. Web activity target endpoint and path. Type: string - (or Expression with resultType string). - :type url: object - :param headers: Represents the headers that will be sent to the request. - For example, to set the language and type on a request: "headers" : { - "Accept-Language": "en-us", "Content-Type": "application/json" }. Type: - string (or Expression with resultType string). - :type headers: object - :param body: Represents the payload that will be sent to the endpoint. - Required for POST/PUT method, not allowed for GET method Type: string (or - Expression with resultType string). - :type body: object - :param authentication: Authentication method used for calling the - endpoint. - :type authentication: - ~azure.mgmt.datafactory.models.WebActivityAuthentication - :param datasets: List of datasets passed to web endpoint. - :type datasets: list[~azure.mgmt.datafactory.models.DatasetReference] - :param linked_services: List of linked services passed to web endpoint. - :type linked_services: - list[~azure.mgmt.datafactory.models.LinkedServiceReference] - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'method': {'required': True}, - 'url': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'method': {'key': 'typeProperties.method', 'type': 'str'}, - 'url': {'key': 'typeProperties.url', 'type': 'object'}, - 'headers': {'key': 'typeProperties.headers', 'type': 'object'}, - 'body': {'key': 'typeProperties.body', 'type': 'object'}, - 'authentication': {'key': 'typeProperties.authentication', 'type': 'WebActivityAuthentication'}, - 'datasets': {'key': 'typeProperties.datasets', 'type': '[DatasetReference]'}, - 'linked_services': {'key': 'typeProperties.linkedServices', 'type': '[LinkedServiceReference]'}, - } - - def __init__(self, **kwargs): - super(WebActivity, self).__init__(**kwargs) - self.method = kwargs.get('method', None) - self.url = kwargs.get('url', None) - self.headers = kwargs.get('headers', None) - self.body = kwargs.get('body', None) - self.authentication = kwargs.get('authentication', None) - self.datasets = kwargs.get('datasets', None) - self.linked_services = kwargs.get('linked_services', None) - self.type = 'WebActivity' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_activity_authentication.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_activity_authentication.py deleted file mode 100644 index 6ebb193ae5e9..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_activity_authentication.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WebActivityAuthentication(Model): - """Web activity authentication properties. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Web activity authentication - (Basic/ClientCertificate/MSI) - :type type: str - :param pfx: Base64-encoded contents of a PFX file. - :type pfx: ~azure.mgmt.datafactory.models.SecureString - :param username: Web activity authentication user name for basic - authentication. - :type username: str - :param password: Password for the PFX file or basic authentication. - :type password: ~azure.mgmt.datafactory.models.SecureString - :param resource: Resource for which Azure Auth token will be requested - when using MSI Authentication. - :type resource: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'pfx': {'key': 'pfx', 'type': 'SecureString'}, - 'username': {'key': 'username', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'SecureString'}, - 'resource': {'key': 'resource', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WebActivityAuthentication, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.pfx = kwargs.get('pfx', None) - self.username = kwargs.get('username', None) - self.password = kwargs.get('password', None) - self.resource = kwargs.get('resource', None) diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_activity_authentication_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_activity_authentication_py3.py deleted file mode 100644 index 4c2b68ba7161..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_activity_authentication_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WebActivityAuthentication(Model): - """Web activity authentication properties. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Web activity authentication - (Basic/ClientCertificate/MSI) - :type type: str - :param pfx: Base64-encoded contents of a PFX file. - :type pfx: ~azure.mgmt.datafactory.models.SecureString - :param username: Web activity authentication user name for basic - authentication. - :type username: str - :param password: Password for the PFX file or basic authentication. - :type password: ~azure.mgmt.datafactory.models.SecureString - :param resource: Resource for which Azure Auth token will be requested - when using MSI Authentication. - :type resource: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'pfx': {'key': 'pfx', 'type': 'SecureString'}, - 'username': {'key': 'username', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'SecureString'}, - 'resource': {'key': 'resource', 'type': 'str'}, - } - - def __init__(self, *, type: str, pfx=None, username: str=None, password=None, resource: str=None, **kwargs) -> None: - super(WebActivityAuthentication, self).__init__(**kwargs) - self.type = type - self.pfx = pfx - self.username = username - self.password = password - self.resource = resource diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_activity_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_activity_py3.py deleted file mode 100644 index 9a64114a00c6..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_activity_py3.py +++ /dev/null @@ -1,98 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_activity_py3 import ExecutionActivity - - -class WebActivity(ExecutionActivity): - """Web activity. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param name: Required. Activity name. - :type name: str - :param description: Activity description. - :type description: str - :param depends_on: Activity depends on condition. - :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] - :param user_properties: Activity user properties. - :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] - :param type: Required. Constant filled by server. - :type type: str - :param linked_service_name: Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param policy: Activity policy. - :type policy: ~azure.mgmt.datafactory.models.ActivityPolicy - :param method: Required. Rest API method for target endpoint. Possible - values include: 'GET', 'POST', 'PUT', 'DELETE' - :type method: str or ~azure.mgmt.datafactory.models.WebActivityMethod - :param url: Required. Web activity target endpoint and path. Type: string - (or Expression with resultType string). - :type url: object - :param headers: Represents the headers that will be sent to the request. - For example, to set the language and type on a request: "headers" : { - "Accept-Language": "en-us", "Content-Type": "application/json" }. Type: - string (or Expression with resultType string). - :type headers: object - :param body: Represents the payload that will be sent to the endpoint. - Required for POST/PUT method, not allowed for GET method Type: string (or - Expression with resultType string). - :type body: object - :param authentication: Authentication method used for calling the - endpoint. - :type authentication: - ~azure.mgmt.datafactory.models.WebActivityAuthentication - :param datasets: List of datasets passed to web endpoint. - :type datasets: list[~azure.mgmt.datafactory.models.DatasetReference] - :param linked_services: List of linked services passed to web endpoint. - :type linked_services: - list[~azure.mgmt.datafactory.models.LinkedServiceReference] - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - 'method': {'required': True}, - 'url': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, - 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'policy': {'key': 'policy', 'type': 'ActivityPolicy'}, - 'method': {'key': 'typeProperties.method', 'type': 'str'}, - 'url': {'key': 'typeProperties.url', 'type': 'object'}, - 'headers': {'key': 'typeProperties.headers', 'type': 'object'}, - 'body': {'key': 'typeProperties.body', 'type': 'object'}, - 'authentication': {'key': 'typeProperties.authentication', 'type': 'WebActivityAuthentication'}, - 'datasets': {'key': 'typeProperties.datasets', 'type': '[DatasetReference]'}, - 'linked_services': {'key': 'typeProperties.linkedServices', 'type': '[LinkedServiceReference]'}, - } - - def __init__(self, *, name: str, method, url, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, headers=None, body=None, authentication=None, datasets=None, linked_services=None, **kwargs) -> None: - super(WebActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs) - self.method = method - self.url = url - self.headers = headers - self.body = body - self.authentication = authentication - self.datasets = datasets - self.linked_services = linked_services - self.type = 'WebActivity' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_anonymous_authentication.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_anonymous_authentication.py deleted file mode 100644 index d3bd2f2594ab..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_anonymous_authentication.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .web_linked_service_type_properties import WebLinkedServiceTypeProperties - - -class WebAnonymousAuthentication(WebLinkedServiceTypeProperties): - """A WebLinkedService that uses anonymous authentication to communicate with - an HTTP endpoint. - - All required parameters must be populated in order to send to Azure. - - :param url: Required. The URL of the web service endpoint, e.g. - http://www.microsoft.com . Type: string (or Expression with resultType - string). - :type url: object - :param authentication_type: Required. Constant filled by server. - :type authentication_type: str - """ - - _validation = { - 'url': {'required': True}, - 'authentication_type': {'required': True}, - } - - _attribute_map = { - 'url': {'key': 'url', 'type': 'object'}, - 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WebAnonymousAuthentication, self).__init__(**kwargs) - self.authentication_type = 'Anonymous' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_anonymous_authentication_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_anonymous_authentication_py3.py deleted file mode 100644 index ee7a4e780a1f..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_anonymous_authentication_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .web_linked_service_type_properties_py3 import WebLinkedServiceTypeProperties - - -class WebAnonymousAuthentication(WebLinkedServiceTypeProperties): - """A WebLinkedService that uses anonymous authentication to communicate with - an HTTP endpoint. - - All required parameters must be populated in order to send to Azure. - - :param url: Required. The URL of the web service endpoint, e.g. - http://www.microsoft.com . Type: string (or Expression with resultType - string). - :type url: object - :param authentication_type: Required. Constant filled by server. - :type authentication_type: str - """ - - _validation = { - 'url': {'required': True}, - 'authentication_type': {'required': True}, - } - - _attribute_map = { - 'url': {'key': 'url', 'type': 'object'}, - 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, - } - - def __init__(self, *, url, **kwargs) -> None: - super(WebAnonymousAuthentication, self).__init__(url=url, **kwargs) - self.authentication_type = 'Anonymous' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_basic_authentication.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_basic_authentication.py deleted file mode 100644 index 90050f7dae28..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_basic_authentication.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .web_linked_service_type_properties import WebLinkedServiceTypeProperties - - -class WebBasicAuthentication(WebLinkedServiceTypeProperties): - """A WebLinkedService that uses basic authentication to communicate with an - HTTP endpoint. - - All required parameters must be populated in order to send to Azure. - - :param url: Required. The URL of the web service endpoint, e.g. - http://www.microsoft.com . Type: string (or Expression with resultType - string). - :type url: object - :param authentication_type: Required. Constant filled by server. - :type authentication_type: str - :param username: Required. User name for Basic authentication. Type: - string (or Expression with resultType string). - :type username: object - :param password: Required. The password for Basic authentication. - :type password: ~azure.mgmt.datafactory.models.SecretBase - """ - - _validation = { - 'url': {'required': True}, - 'authentication_type': {'required': True}, - 'username': {'required': True}, - 'password': {'required': True}, - } - - _attribute_map = { - 'url': {'key': 'url', 'type': 'object'}, - 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, - 'username': {'key': 'username', 'type': 'object'}, - 'password': {'key': 'password', 'type': 'SecretBase'}, - } - - def __init__(self, **kwargs): - super(WebBasicAuthentication, self).__init__(**kwargs) - self.username = kwargs.get('username', None) - self.password = kwargs.get('password', None) - self.authentication_type = 'Basic' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_basic_authentication_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_basic_authentication_py3.py deleted file mode 100644 index 71577ec86565..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_basic_authentication_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .web_linked_service_type_properties_py3 import WebLinkedServiceTypeProperties - - -class WebBasicAuthentication(WebLinkedServiceTypeProperties): - """A WebLinkedService that uses basic authentication to communicate with an - HTTP endpoint. - - All required parameters must be populated in order to send to Azure. - - :param url: Required. The URL of the web service endpoint, e.g. - http://www.microsoft.com . Type: string (or Expression with resultType - string). - :type url: object - :param authentication_type: Required. Constant filled by server. - :type authentication_type: str - :param username: Required. User name for Basic authentication. Type: - string (or Expression with resultType string). - :type username: object - :param password: Required. The password for Basic authentication. - :type password: ~azure.mgmt.datafactory.models.SecretBase - """ - - _validation = { - 'url': {'required': True}, - 'authentication_type': {'required': True}, - 'username': {'required': True}, - 'password': {'required': True}, - } - - _attribute_map = { - 'url': {'key': 'url', 'type': 'object'}, - 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, - 'username': {'key': 'username', 'type': 'object'}, - 'password': {'key': 'password', 'type': 'SecretBase'}, - } - - def __init__(self, *, url, username, password, **kwargs) -> None: - super(WebBasicAuthentication, self).__init__(url=url, **kwargs) - self.username = username - self.password = password - self.authentication_type = 'Basic' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_client_certificate_authentication.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_client_certificate_authentication.py deleted file mode 100644 index 671808ca85d1..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_client_certificate_authentication.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .web_linked_service_type_properties import WebLinkedServiceTypeProperties - - -class WebClientCertificateAuthentication(WebLinkedServiceTypeProperties): - """A WebLinkedService that uses client certificate based authentication to - communicate with an HTTP endpoint. This scheme follows mutual - authentication; the server must also provide valid credentials to the - client. - - All required parameters must be populated in order to send to Azure. - - :param url: Required. The URL of the web service endpoint, e.g. - http://www.microsoft.com . Type: string (or Expression with resultType - string). - :type url: object - :param authentication_type: Required. Constant filled by server. - :type authentication_type: str - :param pfx: Required. Base64-encoded contents of a PFX file. - :type pfx: ~azure.mgmt.datafactory.models.SecretBase - :param password: Required. Password for the PFX file. - :type password: ~azure.mgmt.datafactory.models.SecretBase - """ - - _validation = { - 'url': {'required': True}, - 'authentication_type': {'required': True}, - 'pfx': {'required': True}, - 'password': {'required': True}, - } - - _attribute_map = { - 'url': {'key': 'url', 'type': 'object'}, - 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, - 'pfx': {'key': 'pfx', 'type': 'SecretBase'}, - 'password': {'key': 'password', 'type': 'SecretBase'}, - } - - def __init__(self, **kwargs): - super(WebClientCertificateAuthentication, self).__init__(**kwargs) - self.pfx = kwargs.get('pfx', None) - self.password = kwargs.get('password', None) - self.authentication_type = 'ClientCertificate' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_client_certificate_authentication_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_client_certificate_authentication_py3.py deleted file mode 100644 index 7ac859b677a8..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_client_certificate_authentication_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .web_linked_service_type_properties_py3 import WebLinkedServiceTypeProperties - - -class WebClientCertificateAuthentication(WebLinkedServiceTypeProperties): - """A WebLinkedService that uses client certificate based authentication to - communicate with an HTTP endpoint. This scheme follows mutual - authentication; the server must also provide valid credentials to the - client. - - All required parameters must be populated in order to send to Azure. - - :param url: Required. The URL of the web service endpoint, e.g. - http://www.microsoft.com . Type: string (or Expression with resultType - string). - :type url: object - :param authentication_type: Required. Constant filled by server. - :type authentication_type: str - :param pfx: Required. Base64-encoded contents of a PFX file. - :type pfx: ~azure.mgmt.datafactory.models.SecretBase - :param password: Required. Password for the PFX file. - :type password: ~azure.mgmt.datafactory.models.SecretBase - """ - - _validation = { - 'url': {'required': True}, - 'authentication_type': {'required': True}, - 'pfx': {'required': True}, - 'password': {'required': True}, - } - - _attribute_map = { - 'url': {'key': 'url', 'type': 'object'}, - 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, - 'pfx': {'key': 'pfx', 'type': 'SecretBase'}, - 'password': {'key': 'password', 'type': 'SecretBase'}, - } - - def __init__(self, *, url, pfx, password, **kwargs) -> None: - super(WebClientCertificateAuthentication, self).__init__(url=url, **kwargs) - self.pfx = pfx - self.password = password - self.authentication_type = 'ClientCertificate' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_linked_service.py deleted file mode 100644 index cee3bd37409c..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_linked_service.py +++ /dev/null @@ -1,59 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class WebLinkedService(LinkedService): - """Web linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param type_properties: Required. Web linked service properties. - :type type_properties: - ~azure.mgmt.datafactory.models.WebLinkedServiceTypeProperties - """ - - _validation = { - 'type': {'required': True}, - 'type_properties': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'type_properties': {'key': 'typeProperties', 'type': 'WebLinkedServiceTypeProperties'}, - } - - def __init__(self, **kwargs): - super(WebLinkedService, self).__init__(**kwargs) - self.type_properties = kwargs.get('type_properties', None) - self.type = 'Web' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_linked_service_py3.py deleted file mode 100644 index 3afa3a1bcb05..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_linked_service_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class WebLinkedService(LinkedService): - """Web linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param type_properties: Required. Web linked service properties. - :type type_properties: - ~azure.mgmt.datafactory.models.WebLinkedServiceTypeProperties - """ - - _validation = { - 'type': {'required': True}, - 'type_properties': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'type_properties': {'key': 'typeProperties', 'type': 'WebLinkedServiceTypeProperties'}, - } - - def __init__(self, *, type_properties, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, **kwargs) -> None: - super(WebLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.type_properties = type_properties - self.type = 'Web' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_linked_service_type_properties.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_linked_service_type_properties.py deleted file mode 100644 index 22290e80b19f..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_linked_service_type_properties.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WebLinkedServiceTypeProperties(Model): - """Base definition of WebLinkedServiceTypeProperties, this typeProperties is - polymorphic based on authenticationType, so not flattened in SDK models. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: WebClientCertificateAuthentication, - WebBasicAuthentication, WebAnonymousAuthentication - - All required parameters must be populated in order to send to Azure. - - :param url: Required. The URL of the web service endpoint, e.g. - http://www.microsoft.com . Type: string (or Expression with resultType - string). - :type url: object - :param authentication_type: Required. Constant filled by server. - :type authentication_type: str - """ - - _validation = { - 'url': {'required': True}, - 'authentication_type': {'required': True}, - } - - _attribute_map = { - 'url': {'key': 'url', 'type': 'object'}, - 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, - } - - _subtype_map = { - 'authentication_type': {'ClientCertificate': 'WebClientCertificateAuthentication', 'Basic': 'WebBasicAuthentication', 'Anonymous': 'WebAnonymousAuthentication'} - } - - def __init__(self, **kwargs): - super(WebLinkedServiceTypeProperties, self).__init__(**kwargs) - self.url = kwargs.get('url', None) - self.authentication_type = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_linked_service_type_properties_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_linked_service_type_properties_py3.py deleted file mode 100644 index 1c162c2f1004..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_linked_service_type_properties_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WebLinkedServiceTypeProperties(Model): - """Base definition of WebLinkedServiceTypeProperties, this typeProperties is - polymorphic based on authenticationType, so not flattened in SDK models. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: WebClientCertificateAuthentication, - WebBasicAuthentication, WebAnonymousAuthentication - - All required parameters must be populated in order to send to Azure. - - :param url: Required. The URL of the web service endpoint, e.g. - http://www.microsoft.com . Type: string (or Expression with resultType - string). - :type url: object - :param authentication_type: Required. Constant filled by server. - :type authentication_type: str - """ - - _validation = { - 'url': {'required': True}, - 'authentication_type': {'required': True}, - } - - _attribute_map = { - 'url': {'key': 'url', 'type': 'object'}, - 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, - } - - _subtype_map = { - 'authentication_type': {'ClientCertificate': 'WebClientCertificateAuthentication', 'Basic': 'WebBasicAuthentication', 'Anonymous': 'WebAnonymousAuthentication'} - } - - def __init__(self, *, url, **kwargs) -> None: - super(WebLinkedServiceTypeProperties, self).__init__(**kwargs) - self.url = url - self.authentication_type = None diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_source.py deleted file mode 100644 index 13bcbfbb62d7..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_source.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class WebSource(CopySource): - """A copy activity source for web page table. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WebSource, self).__init__(**kwargs) - self.type = 'WebSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_source_py3.py deleted file mode 100644 index 7c5ce29d3d26..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_source_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class WebSource(CopySource): - """A copy activity source for web page table. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, **kwargs) -> None: - super(WebSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.type = 'WebSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_table_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_table_dataset.py deleted file mode 100644 index 3980fe3d885a..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_table_dataset.py +++ /dev/null @@ -1,78 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class WebTableDataset(Dataset): - """The dataset points to a HTML table in the web page. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param index: Required. The zero-based index of the table in the web page. - Type: integer (or Expression with resultType integer), minimum: 0. - :type index: object - :param path: The relative URL to the web page from the linked service URL. - Type: string (or Expression with resultType string). - :type path: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - 'index': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'index': {'key': 'typeProperties.index', 'type': 'object'}, - 'path': {'key': 'typeProperties.path', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(WebTableDataset, self).__init__(**kwargs) - self.index = kwargs.get('index', None) - self.path = kwargs.get('path', None) - self.type = 'WebTable' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_table_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_table_dataset_py3.py deleted file mode 100644 index edb2344c35d2..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_table_dataset_py3.py +++ /dev/null @@ -1,78 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class WebTableDataset(Dataset): - """The dataset points to a HTML table in the web page. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param index: Required. The zero-based index of the table in the web page. - Type: integer (or Expression with resultType integer), minimum: 0. - :type index: object - :param path: The relative URL to the web page from the linked service URL. - Type: string (or Expression with resultType string). - :type path: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - 'index': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'index': {'key': 'typeProperties.index', 'type': 'object'}, - 'path': {'key': 'typeProperties.path', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, index, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, path=None, **kwargs) -> None: - super(WebTableDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.index = index - self.path = path - self.type = 'WebTable' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/xero_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/xero_linked_service.py deleted file mode 100644 index e9daa4ff7d2a..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/xero_linked_service.py +++ /dev/null @@ -1,93 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class XeroLinkedService(LinkedService): - """Xero Service linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param host: Required. The endpoint of the Xero server. (i.e. - api.xero.com) - :type host: object - :param consumer_key: The consumer key associated with the Xero - application. - :type consumer_key: ~azure.mgmt.datafactory.models.SecretBase - :param private_key: The private key from the .pem file that was generated - for your Xero private application. You must include all the text from the - .pem file, including the Unix line endings( - ). - :type private_key: ~azure.mgmt.datafactory.models.SecretBase - :param use_encrypted_endpoints: Specifies whether the data source - endpoints are encrypted using HTTPS. The default value is true. - :type use_encrypted_endpoints: object - :param use_host_verification: Specifies whether to require the host name - in the server's certificate to match the host name of the server when - connecting over SSL. The default value is true. - :type use_host_verification: object - :param use_peer_verification: Specifies whether to verify the identity of - the server when connecting over SSL. The default value is true. - :type use_peer_verification: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'host': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'host': {'key': 'typeProperties.host', 'type': 'object'}, - 'consumer_key': {'key': 'typeProperties.consumerKey', 'type': 'SecretBase'}, - 'private_key': {'key': 'typeProperties.privateKey', 'type': 'SecretBase'}, - 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, - 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, - 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(XeroLinkedService, self).__init__(**kwargs) - self.host = kwargs.get('host', None) - self.consumer_key = kwargs.get('consumer_key', None) - self.private_key = kwargs.get('private_key', None) - self.use_encrypted_endpoints = kwargs.get('use_encrypted_endpoints', None) - self.use_host_verification = kwargs.get('use_host_verification', None) - self.use_peer_verification = kwargs.get('use_peer_verification', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'Xero' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/xero_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/xero_linked_service_py3.py deleted file mode 100644 index eb665519f4ea..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/xero_linked_service_py3.py +++ /dev/null @@ -1,93 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class XeroLinkedService(LinkedService): - """Xero Service linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param host: Required. The endpoint of the Xero server. (i.e. - api.xero.com) - :type host: object - :param consumer_key: The consumer key associated with the Xero - application. - :type consumer_key: ~azure.mgmt.datafactory.models.SecretBase - :param private_key: The private key from the .pem file that was generated - for your Xero private application. You must include all the text from the - .pem file, including the Unix line endings( - ). - :type private_key: ~azure.mgmt.datafactory.models.SecretBase - :param use_encrypted_endpoints: Specifies whether the data source - endpoints are encrypted using HTTPS. The default value is true. - :type use_encrypted_endpoints: object - :param use_host_verification: Specifies whether to require the host name - in the server's certificate to match the host name of the server when - connecting over SSL. The default value is true. - :type use_host_verification: object - :param use_peer_verification: Specifies whether to verify the identity of - the server when connecting over SSL. The default value is true. - :type use_peer_verification: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'host': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'host': {'key': 'typeProperties.host', 'type': 'object'}, - 'consumer_key': {'key': 'typeProperties.consumerKey', 'type': 'SecretBase'}, - 'private_key': {'key': 'typeProperties.privateKey', 'type': 'SecretBase'}, - 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, - 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, - 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, host, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, consumer_key=None, private_key=None, use_encrypted_endpoints=None, use_host_verification=None, use_peer_verification=None, encrypted_credential=None, **kwargs) -> None: - super(XeroLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.host = host - self.consumer_key = consumer_key - self.private_key = private_key - self.use_encrypted_endpoints = use_encrypted_endpoints - self.use_host_verification = use_host_verification - self.use_peer_verification = use_peer_verification - self.encrypted_credential = encrypted_credential - self.type = 'Xero' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/xero_object_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/xero_object_dataset.py deleted file mode 100644 index 53c5edd44cec..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/xero_object_dataset.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class XeroObjectDataset(Dataset): - """Xero Service dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(XeroObjectDataset, self).__init__(**kwargs) - self.table_name = kwargs.get('table_name', None) - self.type = 'XeroObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/xero_object_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/xero_object_dataset_py3.py deleted file mode 100644 index 673d41e1771e..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/xero_object_dataset_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class XeroObjectDataset(Dataset): - """Xero Service dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: - super(XeroObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.table_name = table_name - self.type = 'XeroObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/xero_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/xero_source.py deleted file mode 100644 index 4695780bf41b..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/xero_source.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class XeroSource(CopySource): - """A copy activity Xero Service source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(XeroSource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.type = 'XeroSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/xero_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/xero_source_py3.py deleted file mode 100644 index 8de950856bae..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/xero_source_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class XeroSource(CopySource): - """A copy activity Xero Service source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query=None, **kwargs) -> None: - super(XeroSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.type = 'XeroSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/zoho_linked_service.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/zoho_linked_service.py deleted file mode 100644 index 997efb5fc242..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/zoho_linked_service.py +++ /dev/null @@ -1,85 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service import LinkedService - - -class ZohoLinkedService(LinkedService): - """Zoho server linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param endpoint: Required. The endpoint of the Zoho server. (i.e. - crm.zoho.com/crm/private) - :type endpoint: object - :param access_token: The access token for Zoho authentication. - :type access_token: ~azure.mgmt.datafactory.models.SecretBase - :param use_encrypted_endpoints: Specifies whether the data source - endpoints are encrypted using HTTPS. The default value is true. - :type use_encrypted_endpoints: object - :param use_host_verification: Specifies whether to require the host name - in the server's certificate to match the host name of the server when - connecting over SSL. The default value is true. - :type use_host_verification: object - :param use_peer_verification: Specifies whether to verify the identity of - the server when connecting over SSL. The default value is true. - :type use_peer_verification: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'endpoint': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'endpoint': {'key': 'typeProperties.endpoint', 'type': 'object'}, - 'access_token': {'key': 'typeProperties.accessToken', 'type': 'SecretBase'}, - 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, - 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, - 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ZohoLinkedService, self).__init__(**kwargs) - self.endpoint = kwargs.get('endpoint', None) - self.access_token = kwargs.get('access_token', None) - self.use_encrypted_endpoints = kwargs.get('use_encrypted_endpoints', None) - self.use_host_verification = kwargs.get('use_host_verification', None) - self.use_peer_verification = kwargs.get('use_peer_verification', None) - self.encrypted_credential = kwargs.get('encrypted_credential', None) - self.type = 'Zoho' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/zoho_linked_service_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/zoho_linked_service_py3.py deleted file mode 100644 index c05d018146d6..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/zoho_linked_service_py3.py +++ /dev/null @@ -1,85 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .linked_service_py3 import LinkedService - - -class ZohoLinkedService(LinkedService): - """Zoho server linked service. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param connect_via: The integration runtime reference. - :type connect_via: - ~azure.mgmt.datafactory.models.IntegrationRuntimeReference - :param description: Linked service description. - :type description: str - :param parameters: Parameters for linked service. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param type: Required. Constant filled by server. - :type type: str - :param endpoint: Required. The endpoint of the Zoho server. (i.e. - crm.zoho.com/crm/private) - :type endpoint: object - :param access_token: The access token for Zoho authentication. - :type access_token: ~azure.mgmt.datafactory.models.SecretBase - :param use_encrypted_endpoints: Specifies whether the data source - endpoints are encrypted using HTTPS. The default value is true. - :type use_encrypted_endpoints: object - :param use_host_verification: Specifies whether to require the host name - in the server's certificate to match the host name of the server when - connecting over SSL. The default value is true. - :type use_host_verification: object - :param use_peer_verification: Specifies whether to verify the identity of - the server when connecting over SSL. The default value is true. - :type use_peer_verification: object - :param encrypted_credential: The encrypted credential used for - authentication. Credentials are encrypted using the integration runtime - credential manager. Type: string (or Expression with resultType string). - :type encrypted_credential: object - """ - - _validation = { - 'type': {'required': True}, - 'endpoint': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'connect_via': {'key': 'connectVia', 'type': 'IntegrationRuntimeReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'type': {'key': 'type', 'type': 'str'}, - 'endpoint': {'key': 'typeProperties.endpoint', 'type': 'object'}, - 'access_token': {'key': 'typeProperties.accessToken', 'type': 'SecretBase'}, - 'use_encrypted_endpoints': {'key': 'typeProperties.useEncryptedEndpoints', 'type': 'object'}, - 'use_host_verification': {'key': 'typeProperties.useHostVerification', 'type': 'object'}, - 'use_peer_verification': {'key': 'typeProperties.usePeerVerification', 'type': 'object'}, - 'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'}, - } - - def __init__(self, *, endpoint, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, access_token=None, use_encrypted_endpoints=None, use_host_verification=None, use_peer_verification=None, encrypted_credential=None, **kwargs) -> None: - super(ZohoLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs) - self.endpoint = endpoint - self.access_token = access_token - self.use_encrypted_endpoints = use_encrypted_endpoints - self.use_host_verification = use_host_verification - self.use_peer_verification = use_peer_verification - self.encrypted_credential = encrypted_credential - self.type = 'Zoho' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/zoho_object_dataset.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/zoho_object_dataset.py deleted file mode 100644 index 062d508860a6..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/zoho_object_dataset.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset import Dataset - - -class ZohoObjectDataset(Dataset): - """Zoho server dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ZohoObjectDataset, self).__init__(**kwargs) - self.table_name = kwargs.get('table_name', None) - self.type = 'ZohoObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/zoho_object_dataset_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/zoho_object_dataset_py3.py deleted file mode 100644 index ef5a67d4fe35..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/zoho_object_dataset_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .dataset_py3 import Dataset - - -class ZohoObjectDataset(Dataset): - """Zoho server dataset. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Dataset description. - :type description: str - :param structure: Columns that define the structure of the dataset. Type: - array (or Expression with resultType array), itemType: DatasetDataElement. - :type structure: object - :param schema: Columns that define the physical type schema of the - dataset. Type: array (or Expression with resultType array), itemType: - DatasetSchemaDataElement. - :type schema: object - :param linked_service_name: Required. Linked service reference. - :type linked_service_name: - ~azure.mgmt.datafactory.models.LinkedServiceReference - :param parameters: Parameters for dataset. - :type parameters: dict[str, - ~azure.mgmt.datafactory.models.ParameterSpecification] - :param annotations: List of tags that can be used for describing the - Dataset. - :type annotations: list[object] - :param folder: The folder that this Dataset is in. If not specified, - Dataset will appear at the root level. - :type folder: ~azure.mgmt.datafactory.models.DatasetFolder - :param type: Required. Constant filled by server. - :type type: str - :param table_name: The table name. Type: string (or Expression with - resultType string). - :type table_name: object - """ - - _validation = { - 'linked_service_name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'structure': {'key': 'structure', 'type': 'object'}, - 'schema': {'key': 'schema', 'type': 'object'}, - 'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'}, - 'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'}, - 'annotations': {'key': 'annotations', 'type': '[object]'}, - 'folder': {'key': 'folder', 'type': 'DatasetFolder'}, - 'type': {'key': 'type', 'type': 'str'}, - 'table_name': {'key': 'typeProperties.tableName', 'type': 'object'}, - } - - def __init__(self, *, linked_service_name, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, table_name=None, **kwargs) -> None: - super(ZohoObjectDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs) - self.table_name = table_name - self.type = 'ZohoObject' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/zoho_source.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/zoho_source.py deleted file mode 100644 index 248d50d55297..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/zoho_source.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source import CopySource - - -class ZohoSource(CopySource): - """A copy activity Zoho server source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ZohoSource, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.type = 'ZohoSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/zoho_source_py3.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/zoho_source_py3.py deleted file mode 100644 index 5f0547d9465a..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/zoho_source_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .copy_source_py3 import CopySource - - -class ZohoSource(CopySource): - """A copy activity Zoho server source. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param source_retry_count: Source retry count. Type: integer (or - Expression with resultType integer). - :type source_retry_count: object - :param source_retry_wait: Source retry wait. Type: string (or Expression - with resultType string), pattern: - ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). - :type source_retry_wait: object - :param type: Required. Constant filled by server. - :type type: str - :param query: A query to retrieve data from source. Type: string (or - Expression with resultType string). - :type query: object - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, - 'source_retry_wait': {'key': 'sourceRetryWait', 'type': 'object'}, - 'type': {'key': 'type', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, source_retry_count=None, source_retry_wait=None, query=None, **kwargs) -> None: - super(ZohoSource, self).__init__(additional_properties=additional_properties, source_retry_count=source_retry_count, source_retry_wait=source_retry_wait, **kwargs) - self.query = query - self.type = 'ZohoSource' diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/__init__.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/__init__.py index ffc98f67bed2..6c3f3839fde7 100644 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/__init__.py +++ b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/__init__.py @@ -9,20 +9,20 @@ # regenerated. # -------------------------------------------------------------------------- -from .operations import Operations -from .factories_operations import FactoriesOperations -from .exposure_control_operations import ExposureControlOperations -from .integration_runtimes_operations import IntegrationRuntimesOperations -from .integration_runtime_object_metadata_operations import IntegrationRuntimeObjectMetadataOperations -from .integration_runtime_nodes_operations import IntegrationRuntimeNodesOperations -from .linked_services_operations import LinkedServicesOperations -from .datasets_operations import DatasetsOperations -from .pipelines_operations import PipelinesOperations -from .pipeline_runs_operations import PipelineRunsOperations -from .activity_runs_operations import ActivityRunsOperations -from .triggers_operations import TriggersOperations -from .rerun_triggers_operations import RerunTriggersOperations -from .trigger_runs_operations import TriggerRunsOperations +from ._operations import Operations +from ._factories_operations import FactoriesOperations +from ._exposure_control_operations import ExposureControlOperations +from ._integration_runtimes_operations import IntegrationRuntimesOperations +from ._integration_runtime_object_metadata_operations import IntegrationRuntimeObjectMetadataOperations +from ._integration_runtime_nodes_operations import IntegrationRuntimeNodesOperations +from ._linked_services_operations import LinkedServicesOperations +from ._datasets_operations import DatasetsOperations +from ._pipelines_operations import PipelinesOperations +from ._pipeline_runs_operations import PipelineRunsOperations +from ._activity_runs_operations import ActivityRunsOperations +from ._triggers_operations import TriggersOperations +from ._rerun_triggers_operations import RerunTriggersOperations +from ._trigger_runs_operations import TriggerRunsOperations __all__ = [ 'Operations', diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_activity_runs_operations.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_activity_runs_operations.py new file mode 100644 index 000000000000..4d9d0775cb0f --- /dev/null +++ b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_activity_runs_operations.py @@ -0,0 +1,111 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ActivityRunsOperations(object): + """ActivityRunsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + def query_by_pipeline_run( + self, resource_group_name, factory_name, run_id, filter_parameters, custom_headers=None, raw=False, **operation_config): + """Query activity runs based on input filter conditions. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param run_id: The pipeline run identifier. + :type run_id: str + :param filter_parameters: Parameters to filter the activity runs. + :type filter_parameters: + ~azure.mgmt.datafactory.models.RunFilterParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ActivityRunsQueryResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datafactory.models.ActivityRunsQueryResponse or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.query_by_pipeline_run.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'runId': self._serialize.url("run_id", run_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(filter_parameters, 'RunFilterParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ActivityRunsQueryResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + query_by_pipeline_run.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelineruns/{runId}/queryActivityruns'} diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_datasets_operations.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_datasets_operations.py new file mode 100644 index 000000000000..89feb52cc2cd --- /dev/null +++ b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_datasets_operations.py @@ -0,0 +1,316 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class DatasetsOperations(object): + """DatasetsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + def list_by_factory( + self, resource_group_name, factory_name, custom_headers=None, raw=False, **operation_config): + """Lists datasets. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DatasetResource + :rtype: + ~azure.mgmt.datafactory.models.DatasetResourcePaged[~azure.mgmt.datafactory.models.DatasetResource] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_factory.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DatasetResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_factory.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/datasets'} + + def create_or_update( + self, resource_group_name, factory_name, dataset_name, properties, if_match=None, custom_headers=None, raw=False, **operation_config): + """Creates or updates a dataset. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param dataset_name: The dataset name. + :type dataset_name: str + :param properties: Dataset properties. + :type properties: ~azure.mgmt.datafactory.models.Dataset + :param if_match: ETag of the dataset entity. Should only be specified + for update, for which it should match existing entity or can be * for + unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DatasetResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datafactory.models.DatasetResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + dataset = models.DatasetResource(properties=properties) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'datasetName': self._serialize.url("dataset_name", dataset_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(dataset, 'DatasetResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DatasetResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/datasets/{datasetName}'} + + def get( + self, resource_group_name, factory_name, dataset_name, if_none_match=None, custom_headers=None, raw=False, **operation_config): + """Gets a dataset. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param dataset_name: The dataset name. + :type dataset_name: str + :param if_none_match: ETag of the dataset entity. Should only be + specified for get. If the ETag matches the existing entity tag, or if + * was provided, then no content will be returned. + :type if_none_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DatasetResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datafactory.models.DatasetResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'datasetName': self._serialize.url("dataset_name", dataset_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_none_match is not None: + header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 304]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DatasetResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/datasets/{datasetName}'} + + def delete( + self, resource_group_name, factory_name, dataset_name, custom_headers=None, raw=False, **operation_config): + """Deletes a dataset. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param dataset_name: The dataset name. + :type dataset_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'datasetName': self._serialize.url("dataset_name", dataset_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/datasets/{datasetName}'} diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_exposure_control_operations.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_exposure_control_operations.py new file mode 100644 index 000000000000..443a826821a5 --- /dev/null +++ b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_exposure_control_operations.py @@ -0,0 +1,179 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ExposureControlOperations(object): + """ExposureControlOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + def get_feature_value( + self, location_id, feature_name=None, feature_type=None, custom_headers=None, raw=False, **operation_config): + """Get exposure control feature for specific location. + + :param location_id: The location identifier. + :type location_id: str + :param feature_name: The feature name. + :type feature_name: str + :param feature_type: The feature type. + :type feature_type: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ExposureControlResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datafactory.models.ExposureControlResponse or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + exposure_control_request = models.ExposureControlRequest(feature_name=feature_name, feature_type=feature_type) + + # Construct URL + url = self.get_feature_value.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'locationId': self._serialize.url("location_id", location_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(exposure_control_request, 'ExposureControlRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ExposureControlResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_feature_value.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataFactory/locations/{locationId}/getFeatureValue'} + + def get_feature_value_by_factory( + self, resource_group_name, factory_name, feature_name=None, feature_type=None, custom_headers=None, raw=False, **operation_config): + """Get exposure control feature for specific factory. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param feature_name: The feature name. + :type feature_name: str + :param feature_type: The feature type. + :type feature_type: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ExposureControlResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datafactory.models.ExposureControlResponse or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + exposure_control_request = models.ExposureControlRequest(feature_name=feature_name, feature_type=feature_type) + + # Construct URL + url = self.get_feature_value_by_factory.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(exposure_control_request, 'ExposureControlRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ExposureControlResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_feature_value_by_factory.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/getFeatureValue'} diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_factories_operations.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_factories_operations.py new file mode 100644 index 000000000000..828834a91c49 --- /dev/null +++ b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_factories_operations.py @@ -0,0 +1,644 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class FactoriesOperations(object): + """FactoriesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists factories under the specified subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Factory + :rtype: + ~azure.mgmt.datafactory.models.FactoryPaged[~azure.mgmt.datafactory.models.Factory] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.FactoryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataFactory/factories'} + + def configure_factory_repo( + self, location_id, factory_resource_id=None, repo_configuration=None, custom_headers=None, raw=False, **operation_config): + """Updates a factory's repo information. + + :param location_id: The location identifier. + :type location_id: str + :param factory_resource_id: The factory resource id. + :type factory_resource_id: str + :param repo_configuration: Git repo information of the factory. + :type repo_configuration: + ~azure.mgmt.datafactory.models.FactoryRepoConfiguration + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Factory or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datafactory.models.Factory or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + factory_repo_update = models.FactoryRepoUpdate(factory_resource_id=factory_resource_id, repo_configuration=repo_configuration) + + # Construct URL + url = self.configure_factory_repo.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'locationId': self._serialize.url("location_id", location_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(factory_repo_update, 'FactoryRepoUpdate') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Factory', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + configure_factory_repo.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataFactory/locations/{locationId}/configureFactoryRepo'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists factories. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Factory + :rtype: + ~azure.mgmt.datafactory.models.FactoryPaged[~azure.mgmt.datafactory.models.Factory] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.FactoryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories'} + + def create_or_update( + self, resource_group_name, factory_name, factory, if_match=None, custom_headers=None, raw=False, **operation_config): + """Creates or updates a factory. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param factory: Factory resource definition. + :type factory: ~azure.mgmt.datafactory.models.Factory + :param if_match: ETag of the factory entity. Should only be specified + for update, for which it should match existing entity or can be * for + unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Factory or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datafactory.models.Factory or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(factory, 'Factory') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Factory', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}'} + + def update( + self, resource_group_name, factory_name, tags=None, identity=None, custom_headers=None, raw=False, **operation_config): + """Updates a factory. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param identity: Managed service identity of the factory. + :type identity: ~azure.mgmt.datafactory.models.FactoryIdentity + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Factory or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datafactory.models.Factory or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + factory_update_parameters = models.FactoryUpdateParameters(tags=tags, identity=identity) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(factory_update_parameters, 'FactoryUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Factory', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}'} + + def get( + self, resource_group_name, factory_name, if_none_match=None, custom_headers=None, raw=False, **operation_config): + """Gets a factory. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param if_none_match: ETag of the factory entity. Should only be + specified for get. If the ETag matches the existing entity tag, or if + * was provided, then no content will be returned. + :type if_none_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Factory or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datafactory.models.Factory or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_none_match is not None: + header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 304]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Factory', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}'} + + def delete( + self, resource_group_name, factory_name, custom_headers=None, raw=False, **operation_config): + """Deletes a factory. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}'} + + def get_git_hub_access_token( + self, resource_group_name, factory_name, git_hub_access_token_request, custom_headers=None, raw=False, **operation_config): + """Get GitHub Access Token. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param git_hub_access_token_request: Get GitHub access token request + definition. + :type git_hub_access_token_request: + ~azure.mgmt.datafactory.models.GitHubAccessTokenRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: GitHubAccessTokenResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datafactory.models.GitHubAccessTokenResponse or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_git_hub_access_token.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(git_hub_access_token_request, 'GitHubAccessTokenRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('GitHubAccessTokenResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_git_hub_access_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/getGitHubAccessToken'} + + def get_data_plane_access( + self, resource_group_name, factory_name, policy, custom_headers=None, raw=False, **operation_config): + """Get Data Plane access. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param policy: Data Plane user access policy definition. + :type policy: ~azure.mgmt.datafactory.models.UserAccessPolicy + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AccessPolicyResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datafactory.models.AccessPolicyResponse or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_data_plane_access.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(policy, 'UserAccessPolicy') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AccessPolicyResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_data_plane_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/getDataPlaneAccess'} diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_integration_runtime_nodes_operations.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_integration_runtime_nodes_operations.py new file mode 100644 index 000000000000..870f990c1f10 --- /dev/null +++ b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_integration_runtime_nodes_operations.py @@ -0,0 +1,315 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IntegrationRuntimeNodesOperations(object): + """IntegrationRuntimeNodesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + def get( + self, resource_group_name, factory_name, integration_runtime_name, node_name, custom_headers=None, raw=False, **operation_config): + """Gets a self-hosted integration runtime node. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param integration_runtime_name: The integration runtime name. + :type integration_runtime_name: str + :param node_name: The integration runtime node name. + :type node_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SelfHostedIntegrationRuntimeNode or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.datafactory.models.SelfHostedIntegrationRuntimeNode or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'nodeName': self._serialize.url("node_name", node_name, 'str', max_length=150, min_length=1, pattern=r'^[a-z0-9A-Z][a-z0-9A-Z_-]{0,149}$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SelfHostedIntegrationRuntimeNode', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/nodes/{nodeName}'} + + def delete( + self, resource_group_name, factory_name, integration_runtime_name, node_name, custom_headers=None, raw=False, **operation_config): + """Deletes a self-hosted integration runtime node. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param integration_runtime_name: The integration runtime name. + :type integration_runtime_name: str + :param node_name: The integration runtime node name. + :type node_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'nodeName': self._serialize.url("node_name", node_name, 'str', max_length=150, min_length=1, pattern=r'^[a-z0-9A-Z][a-z0-9A-Z_-]{0,149}$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/nodes/{nodeName}'} + + def update( + self, resource_group_name, factory_name, integration_runtime_name, node_name, concurrent_jobs_limit=None, custom_headers=None, raw=False, **operation_config): + """Updates a self-hosted integration runtime node. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param integration_runtime_name: The integration runtime name. + :type integration_runtime_name: str + :param node_name: The integration runtime node name. + :type node_name: str + :param concurrent_jobs_limit: The number of concurrent jobs permitted + to run on the integration runtime node. Values between 1 and + maxConcurrentJobs(inclusive) are allowed. + :type concurrent_jobs_limit: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SelfHostedIntegrationRuntimeNode or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.datafactory.models.SelfHostedIntegrationRuntimeNode or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + update_integration_runtime_node_request = models.UpdateIntegrationRuntimeNodeRequest(concurrent_jobs_limit=concurrent_jobs_limit) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'nodeName': self._serialize.url("node_name", node_name, 'str', max_length=150, min_length=1, pattern=r'^[a-z0-9A-Z][a-z0-9A-Z_-]{0,149}$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(update_integration_runtime_node_request, 'UpdateIntegrationRuntimeNodeRequest') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SelfHostedIntegrationRuntimeNode', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/nodes/{nodeName}'} + + def get_ip_address( + self, resource_group_name, factory_name, integration_runtime_name, node_name, custom_headers=None, raw=False, **operation_config): + """Get the IP address of self-hosted integration runtime node. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param integration_runtime_name: The integration runtime name. + :type integration_runtime_name: str + :param node_name: The integration runtime node name. + :type node_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IntegrationRuntimeNodeIpAddress or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.datafactory.models.IntegrationRuntimeNodeIpAddress + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_ip_address.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'nodeName': self._serialize.url("node_name", node_name, 'str', max_length=150, min_length=1, pattern=r'^[a-z0-9A-Z][a-z0-9A-Z_-]{0,149}$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IntegrationRuntimeNodeIpAddress', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_ip_address.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/nodes/{nodeName}/ipAddress'} diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_integration_runtime_object_metadata_operations.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_integration_runtime_object_metadata_operations.py new file mode 100644 index 000000000000..aa8b795123ef --- /dev/null +++ b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_integration_runtime_object_metadata_operations.py @@ -0,0 +1,219 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class IntegrationRuntimeObjectMetadataOperations(object): + """IntegrationRuntimeObjectMetadataOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + + def _refresh_initial( + self, resource_group_name, factory_name, integration_runtime_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.refresh.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SsisObjectMetadataStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def refresh( + self, resource_group_name, factory_name, integration_runtime_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Refresh a SSIS integration runtime object metadata. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param integration_runtime_name: The integration runtime name. + :type integration_runtime_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + SsisObjectMetadataStatusResponse or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.datafactory.models.SsisObjectMetadataStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.datafactory.models.SsisObjectMetadataStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._refresh_initial( + resource_group_name=resource_group_name, + factory_name=factory_name, + integration_runtime_name=integration_runtime_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SsisObjectMetadataStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + refresh.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/refreshObjectMetadata'} + + def get( + self, resource_group_name, factory_name, integration_runtime_name, metadata_path=None, custom_headers=None, raw=False, **operation_config): + """Get a SSIS integration runtime object metadata by specified path. The + return is pageable metadata list. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param integration_runtime_name: The integration runtime name. + :type integration_runtime_name: str + :param metadata_path: Metadata path. + :type metadata_path: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SsisObjectMetadataListResponse or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.datafactory.models.SsisObjectMetadataListResponse + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + get_metadata_request = None + if metadata_path is not None: + get_metadata_request = models.GetSsisObjectMetadataRequest(metadata_path=metadata_path) + + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if get_metadata_request is not None: + body_content = self._serialize.body(get_metadata_request, 'GetSsisObjectMetadataRequest') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SsisObjectMetadataListResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/getObjectMetadata'} diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_integration_runtimes_operations.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_integration_runtimes_operations.py new file mode 100644 index 000000000000..f31eeeb0952f --- /dev/null +++ b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_integration_runtimes_operations.py @@ -0,0 +1,1176 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class IntegrationRuntimesOperations(object): + """IntegrationRuntimesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + def list_by_factory( + self, resource_group_name, factory_name, custom_headers=None, raw=False, **operation_config): + """Lists integration runtimes. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of IntegrationRuntimeResource + :rtype: + ~azure.mgmt.datafactory.models.IntegrationRuntimeResourcePaged[~azure.mgmt.datafactory.models.IntegrationRuntimeResource] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_factory.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IntegrationRuntimeResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_factory.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes'} + + def create_or_update( + self, resource_group_name, factory_name, integration_runtime_name, properties, if_match=None, custom_headers=None, raw=False, **operation_config): + """Creates or updates an integration runtime. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param integration_runtime_name: The integration runtime name. + :type integration_runtime_name: str + :param properties: Integration runtime properties. + :type properties: ~azure.mgmt.datafactory.models.IntegrationRuntime + :param if_match: ETag of the integration runtime entity. Should only + be specified for update, for which it should match existing entity or + can be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IntegrationRuntimeResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datafactory.models.IntegrationRuntimeResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + integration_runtime = models.IntegrationRuntimeResource(properties=properties) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(integration_runtime, 'IntegrationRuntimeResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IntegrationRuntimeResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}'} + + def get( + self, resource_group_name, factory_name, integration_runtime_name, if_none_match=None, custom_headers=None, raw=False, **operation_config): + """Gets an integration runtime. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param integration_runtime_name: The integration runtime name. + :type integration_runtime_name: str + :param if_none_match: ETag of the integration runtime entity. Should + only be specified for get. If the ETag matches the existing entity + tag, or if * was provided, then no content will be returned. + :type if_none_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IntegrationRuntimeResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datafactory.models.IntegrationRuntimeResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_none_match is not None: + header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 304]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IntegrationRuntimeResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}'} + + def update( + self, resource_group_name, factory_name, integration_runtime_name, auto_update=None, update_delay_offset=None, custom_headers=None, raw=False, **operation_config): + """Updates an integration runtime. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param integration_runtime_name: The integration runtime name. + :type integration_runtime_name: str + :param auto_update: Enables or disables the auto-update feature of the + self-hosted integration runtime. See + https://go.microsoft.com/fwlink/?linkid=854189. Possible values + include: 'On', 'Off' + :type auto_update: str or + ~azure.mgmt.datafactory.models.IntegrationRuntimeAutoUpdate + :param update_delay_offset: The time offset (in hours) in the day, + e.g., PT03H is 3 hours. The integration runtime auto update will + happen on that time. + :type update_delay_offset: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IntegrationRuntimeResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datafactory.models.IntegrationRuntimeResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + update_integration_runtime_request = models.UpdateIntegrationRuntimeRequest(auto_update=auto_update, update_delay_offset=update_delay_offset) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(update_integration_runtime_request, 'UpdateIntegrationRuntimeRequest') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IntegrationRuntimeResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}'} + + def delete( + self, resource_group_name, factory_name, integration_runtime_name, custom_headers=None, raw=False, **operation_config): + """Deletes an integration runtime. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param integration_runtime_name: The integration runtime name. + :type integration_runtime_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}'} + + def get_status( + self, resource_group_name, factory_name, integration_runtime_name, custom_headers=None, raw=False, **operation_config): + """Gets detailed status information for an integration runtime. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param integration_runtime_name: The integration runtime name. + :type integration_runtime_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IntegrationRuntimeStatusResponse or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.datafactory.models.IntegrationRuntimeStatusResponse or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_status.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IntegrationRuntimeStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/getStatus'} + + def get_connection_info( + self, resource_group_name, factory_name, integration_runtime_name, custom_headers=None, raw=False, **operation_config): + """Gets the on-premises integration runtime connection information for + encrypting the on-premises data source credentials. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param integration_runtime_name: The integration runtime name. + :type integration_runtime_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IntegrationRuntimeConnectionInfo or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.datafactory.models.IntegrationRuntimeConnectionInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_connection_info.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IntegrationRuntimeConnectionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_connection_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/getConnectionInfo'} + + def regenerate_auth_key( + self, resource_group_name, factory_name, integration_runtime_name, key_name=None, custom_headers=None, raw=False, **operation_config): + """Regenerates the authentication key for an integration runtime. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param integration_runtime_name: The integration runtime name. + :type integration_runtime_name: str + :param key_name: The name of the authentication key to regenerate. + Possible values include: 'authKey1', 'authKey2' + :type key_name: str or + ~azure.mgmt.datafactory.models.IntegrationRuntimeAuthKeyName + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IntegrationRuntimeAuthKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datafactory.models.IntegrationRuntimeAuthKeys or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + regenerate_key_parameters = models.IntegrationRuntimeRegenerateKeyParameters(key_name=key_name) + + # Construct URL + url = self.regenerate_auth_key.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(regenerate_key_parameters, 'IntegrationRuntimeRegenerateKeyParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IntegrationRuntimeAuthKeys', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + regenerate_auth_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/regenerateAuthKey'} + + def list_auth_keys( + self, resource_group_name, factory_name, integration_runtime_name, custom_headers=None, raw=False, **operation_config): + """Retrieves the authentication keys for an integration runtime. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param integration_runtime_name: The integration runtime name. + :type integration_runtime_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IntegrationRuntimeAuthKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datafactory.models.IntegrationRuntimeAuthKeys or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_auth_keys.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IntegrationRuntimeAuthKeys', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_auth_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/listAuthKeys'} + + + def _start_initial( + self, resource_group_name, factory_name, integration_runtime_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('IntegrationRuntimeStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start( + self, resource_group_name, factory_name, integration_runtime_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Starts a ManagedReserved type integration runtime. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param integration_runtime_name: The integration runtime name. + :type integration_runtime_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + IntegrationRuntimeStatusResponse or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.datafactory.models.IntegrationRuntimeStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.datafactory.models.IntegrationRuntimeStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + factory_name=factory_name, + integration_runtime_name=integration_runtime_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('IntegrationRuntimeStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/start'} + + + def _stop_initial( + self, resource_group_name, factory_name, integration_runtime_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.stop.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def stop( + self, resource_group_name, factory_name, integration_runtime_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Stops a ManagedReserved type integration runtime. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param integration_runtime_name: The integration runtime name. + :type integration_runtime_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._stop_initial( + resource_group_name=resource_group_name, + factory_name=factory_name, + integration_runtime_name=integration_runtime_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/stop'} + + def sync_credentials( + self, resource_group_name, factory_name, integration_runtime_name, custom_headers=None, raw=False, **operation_config): + """Force the integration runtime to synchronize credentials across + integration runtime nodes, and this will override the credentials + across all worker nodes with those available on the dispatcher node. If + you already have the latest credential backup file, you should manually + import it (preferred) on any self-hosted integration runtime node than + using this API directly. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param integration_runtime_name: The integration runtime name. + :type integration_runtime_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.sync_credentials.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + sync_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/syncCredentials'} + + def get_monitoring_data( + self, resource_group_name, factory_name, integration_runtime_name, custom_headers=None, raw=False, **operation_config): + """Get the integration runtime monitoring data, which includes the monitor + data for all the nodes under this integration runtime. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param integration_runtime_name: The integration runtime name. + :type integration_runtime_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IntegrationRuntimeMonitoringData or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.datafactory.models.IntegrationRuntimeMonitoringData or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_monitoring_data.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IntegrationRuntimeMonitoringData', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_monitoring_data.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/monitoringData'} + + def upgrade( + self, resource_group_name, factory_name, integration_runtime_name, custom_headers=None, raw=False, **operation_config): + """Upgrade self-hosted integration runtime to latest version if + availability. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param integration_runtime_name: The integration runtime name. + :type integration_runtime_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.upgrade.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + upgrade.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/upgrade'} + + def remove_links( + self, resource_group_name, factory_name, integration_runtime_name, linked_factory_name, custom_headers=None, raw=False, **operation_config): + """Remove all linked integration runtimes under specific data factory in a + self-hosted integration runtime. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param integration_runtime_name: The integration runtime name. + :type integration_runtime_name: str + :param linked_factory_name: The data factory name for linked + integration runtime. + :type linked_factory_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + linked_integration_runtime_request = models.LinkedIntegrationRuntimeRequest(linked_factory_name=linked_factory_name) + + # Construct URL + url = self.remove_links.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(linked_integration_runtime_request, 'LinkedIntegrationRuntimeRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + remove_links.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/removeLinks'} + + def create_linked_integration_runtime( + self, resource_group_name, factory_name, integration_runtime_name, create_linked_integration_runtime_request, custom_headers=None, raw=False, **operation_config): + """Create a linked integration runtime entry in a shared integration + runtime. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param integration_runtime_name: The integration runtime name. + :type integration_runtime_name: str + :param create_linked_integration_runtime_request: The linked + integration runtime properties. + :type create_linked_integration_runtime_request: + ~azure.mgmt.datafactory.models.CreateLinkedIntegrationRuntimeRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IntegrationRuntimeStatusResponse or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.datafactory.models.IntegrationRuntimeStatusResponse or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_linked_integration_runtime.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(create_linked_integration_runtime_request, 'CreateLinkedIntegrationRuntimeRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IntegrationRuntimeStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_linked_integration_runtime.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/linkedIntegrationRuntime'} diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_linked_services_operations.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_linked_services_operations.py new file mode 100644 index 000000000000..5e7d32bd357a --- /dev/null +++ b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_linked_services_operations.py @@ -0,0 +1,316 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class LinkedServicesOperations(object): + """LinkedServicesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + def list_by_factory( + self, resource_group_name, factory_name, custom_headers=None, raw=False, **operation_config): + """Lists linked services. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of LinkedServiceResource + :rtype: + ~azure.mgmt.datafactory.models.LinkedServiceResourcePaged[~azure.mgmt.datafactory.models.LinkedServiceResource] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_factory.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.LinkedServiceResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_factory.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/linkedservices'} + + def create_or_update( + self, resource_group_name, factory_name, linked_service_name, properties, if_match=None, custom_headers=None, raw=False, **operation_config): + """Creates or updates a linked service. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param linked_service_name: The linked service name. + :type linked_service_name: str + :param properties: Properties of linked service. + :type properties: ~azure.mgmt.datafactory.models.LinkedService + :param if_match: ETag of the linkedService entity. Should only be + specified for update, for which it should match existing entity or can + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: LinkedServiceResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datafactory.models.LinkedServiceResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + linked_service = models.LinkedServiceResource(properties=properties) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'linkedServiceName': self._serialize.url("linked_service_name", linked_service_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(linked_service, 'LinkedServiceResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('LinkedServiceResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/linkedservices/{linkedServiceName}'} + + def get( + self, resource_group_name, factory_name, linked_service_name, if_none_match=None, custom_headers=None, raw=False, **operation_config): + """Gets a linked service. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param linked_service_name: The linked service name. + :type linked_service_name: str + :param if_none_match: ETag of the linked service entity. Should only + be specified for get. If the ETag matches the existing entity tag, or + if * was provided, then no content will be returned. + :type if_none_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: LinkedServiceResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datafactory.models.LinkedServiceResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'linkedServiceName': self._serialize.url("linked_service_name", linked_service_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_none_match is not None: + header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 304]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('LinkedServiceResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/linkedservices/{linkedServiceName}'} + + def delete( + self, resource_group_name, factory_name, linked_service_name, custom_headers=None, raw=False, **operation_config): + """Deletes a linked service. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param linked_service_name: The linked service name. + :type linked_service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'linkedServiceName': self._serialize.url("linked_service_name", linked_service_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/linkedservices/{linkedServiceName}'} diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_operations.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_operations.py new file mode 100644 index 000000000000..2363a74cd143 --- /dev/null +++ b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_operations.py @@ -0,0 +1,102 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class Operations(object): + """Operations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists the available Azure Data Factory API operations. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Operation + :rtype: + ~azure.mgmt.datafactory.models.OperationPaged[~azure.mgmt.datafactory.models.Operation] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.DataFactory/operations'} diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_pipeline_runs_operations.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_pipeline_runs_operations.py new file mode 100644 index 000000000000..4fe443938ef5 --- /dev/null +++ b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_pipeline_runs_operations.py @@ -0,0 +1,233 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class PipelineRunsOperations(object): + """PipelineRunsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + def query_by_factory( + self, resource_group_name, factory_name, filter_parameters, custom_headers=None, raw=False, **operation_config): + """Query pipeline runs in the factory based on input filter conditions. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param filter_parameters: Parameters to filter the pipeline run. + :type filter_parameters: + ~azure.mgmt.datafactory.models.RunFilterParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PipelineRunsQueryResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datafactory.models.PipelineRunsQueryResponse or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.query_by_factory.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(filter_parameters, 'RunFilterParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PipelineRunsQueryResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + query_by_factory.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/queryPipelineRuns'} + + def get( + self, resource_group_name, factory_name, run_id, custom_headers=None, raw=False, **operation_config): + """Get a pipeline run by its run ID. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param run_id: The pipeline run identifier. + :type run_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PipelineRun or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datafactory.models.PipelineRun or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'runId': self._serialize.url("run_id", run_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PipelineRun', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelineruns/{runId}'} + + def cancel( + self, resource_group_name, factory_name, run_id, is_recursive=None, custom_headers=None, raw=False, **operation_config): + """Cancel a pipeline run by its run ID. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param run_id: The pipeline run identifier. + :type run_id: str + :param is_recursive: If true, cancel all the Child pipelines that are + triggered by the current pipeline. + :type is_recursive: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.cancel.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'runId': self._serialize.url("run_id", run_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if is_recursive is not None: + query_parameters['isRecursive'] = self._serialize.query("is_recursive", is_recursive, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelineruns/{runId}/cancel'} diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_pipelines_operations.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_pipelines_operations.py new file mode 100644 index 000000000000..00201749beee --- /dev/null +++ b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_pipelines_operations.py @@ -0,0 +1,405 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class PipelinesOperations(object): + """PipelinesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + def list_by_factory( + self, resource_group_name, factory_name, custom_headers=None, raw=False, **operation_config): + """Lists pipelines. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PipelineResource + :rtype: + ~azure.mgmt.datafactory.models.PipelineResourcePaged[~azure.mgmt.datafactory.models.PipelineResource] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_factory.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PipelineResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_factory.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelines'} + + def create_or_update( + self, resource_group_name, factory_name, pipeline_name, pipeline, if_match=None, custom_headers=None, raw=False, **operation_config): + """Creates or updates a pipeline. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param pipeline_name: The pipeline name. + :type pipeline_name: str + :param pipeline: Pipeline resource definition. + :type pipeline: ~azure.mgmt.datafactory.models.PipelineResource + :param if_match: ETag of the pipeline entity. Should only be + specified for update, for which it should match existing entity or can + be * for unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PipelineResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datafactory.models.PipelineResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'pipelineName': self._serialize.url("pipeline_name", pipeline_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(pipeline, 'PipelineResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PipelineResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelines/{pipelineName}'} + + def get( + self, resource_group_name, factory_name, pipeline_name, if_none_match=None, custom_headers=None, raw=False, **operation_config): + """Gets a pipeline. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param pipeline_name: The pipeline name. + :type pipeline_name: str + :param if_none_match: ETag of the pipeline entity. Should only be + specified for get. If the ETag matches the existing entity tag, or if + * was provided, then no content will be returned. + :type if_none_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PipelineResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datafactory.models.PipelineResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'pipelineName': self._serialize.url("pipeline_name", pipeline_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_none_match is not None: + header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 304]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PipelineResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelines/{pipelineName}'} + + def delete( + self, resource_group_name, factory_name, pipeline_name, custom_headers=None, raw=False, **operation_config): + """Deletes a pipeline. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param pipeline_name: The pipeline name. + :type pipeline_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'pipelineName': self._serialize.url("pipeline_name", pipeline_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelines/{pipelineName}'} + + def create_run( + self, resource_group_name, factory_name, pipeline_name, reference_pipeline_run_id=None, is_recovery=None, start_activity_name=None, parameters=None, custom_headers=None, raw=False, **operation_config): + """Creates a run of a pipeline. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param pipeline_name: The pipeline name. + :type pipeline_name: str + :param reference_pipeline_run_id: The pipeline run identifier. If run + ID is specified the parameters of the specified run will be used to + create a new run. + :type reference_pipeline_run_id: str + :param is_recovery: Recovery mode flag. If recovery mode is set to + true, the specified referenced pipeline run and the new run will be + grouped under the same groupId. + :type is_recovery: bool + :param start_activity_name: In recovery mode, the rerun will start + from this activity. If not specified, all activities will run. + :type start_activity_name: str + :param parameters: Parameters of the pipeline run. These parameters + will be used only if the runId is not specified. + :type parameters: dict[str, object] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CreateRunResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datafactory.models.CreateRunResponse or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_run.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'pipelineName': self._serialize.url("pipeline_name", pipeline_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if reference_pipeline_run_id is not None: + query_parameters['referencePipelineRunId'] = self._serialize.query("reference_pipeline_run_id", reference_pipeline_run_id, 'str') + if is_recovery is not None: + query_parameters['isRecovery'] = self._serialize.query("is_recovery", is_recovery, 'bool') + if start_activity_name is not None: + query_parameters['startActivityName'] = self._serialize.query("start_activity_name", start_activity_name, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if parameters is not None: + body_content = self._serialize.body(parameters, '{object}') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CreateRunResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_run.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelines/{pipelineName}/createRun'} diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_rerun_triggers_operations.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_rerun_triggers_operations.py new file mode 100644 index 000000000000..6d5f8e9831de --- /dev/null +++ b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_rerun_triggers_operations.py @@ -0,0 +1,453 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class RerunTriggersOperations(object): + """RerunTriggersOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + def create( + self, resource_group_name, factory_name, trigger_name, rerun_trigger_name, rerun_tumbling_window_trigger_action_parameters, custom_headers=None, raw=False, **operation_config): + """Creates a rerun trigger. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param trigger_name: The trigger name. + :type trigger_name: str + :param rerun_trigger_name: The rerun trigger name. + :type rerun_trigger_name: str + :param rerun_tumbling_window_trigger_action_parameters: Rerun tumbling + window trigger action parameters. + :type rerun_tumbling_window_trigger_action_parameters: + ~azure.mgmt.datafactory.models.RerunTumblingWindowTriggerActionParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TriggerResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datafactory.models.TriggerResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$'), + 'rerunTriggerName': self._serialize.url("rerun_trigger_name", rerun_trigger_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(rerun_tumbling_window_trigger_action_parameters, 'RerunTumblingWindowTriggerActionParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TriggerResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/rerunTriggers/{rerunTriggerName}'} + + + def _start_initial( + self, resource_group_name, factory_name, trigger_name, rerun_trigger_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$'), + 'rerunTriggerName': self._serialize.url("rerun_trigger_name", rerun_trigger_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def start( + self, resource_group_name, factory_name, trigger_name, rerun_trigger_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Starts a trigger. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param trigger_name: The trigger name. + :type trigger_name: str + :param rerun_trigger_name: The rerun trigger name. + :type rerun_trigger_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + factory_name=factory_name, + trigger_name=trigger_name, + rerun_trigger_name=rerun_trigger_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/rerunTriggers/{rerunTriggerName}/start'} + + + def _stop_initial( + self, resource_group_name, factory_name, trigger_name, rerun_trigger_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.stop.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$'), + 'rerunTriggerName': self._serialize.url("rerun_trigger_name", rerun_trigger_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def stop( + self, resource_group_name, factory_name, trigger_name, rerun_trigger_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Stops a trigger. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param trigger_name: The trigger name. + :type trigger_name: str + :param rerun_trigger_name: The rerun trigger name. + :type rerun_trigger_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._stop_initial( + resource_group_name=resource_group_name, + factory_name=factory_name, + trigger_name=trigger_name, + rerun_trigger_name=rerun_trigger_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/rerunTriggers/{rerunTriggerName}/stop'} + + + def _cancel_initial( + self, resource_group_name, factory_name, trigger_name, rerun_trigger_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.cancel.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$'), + 'rerunTriggerName': self._serialize.url("rerun_trigger_name", rerun_trigger_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def cancel( + self, resource_group_name, factory_name, trigger_name, rerun_trigger_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Cancels a trigger. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param trigger_name: The trigger name. + :type trigger_name: str + :param rerun_trigger_name: The rerun trigger name. + :type rerun_trigger_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._cancel_initial( + resource_group_name=resource_group_name, + factory_name=factory_name, + trigger_name=trigger_name, + rerun_trigger_name=rerun_trigger_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/rerunTriggers/{rerunTriggerName}/cancel'} + + def list_by_trigger( + self, resource_group_name, factory_name, trigger_name, custom_headers=None, raw=False, **operation_config): + """Lists rerun triggers by an original trigger name. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param trigger_name: The trigger name. + :type trigger_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of RerunTriggerResource + :rtype: + ~azure.mgmt.datafactory.models.RerunTriggerResourcePaged[~azure.mgmt.datafactory.models.RerunTriggerResource] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_trigger.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RerunTriggerResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_trigger.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/rerunTriggers'} diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_trigger_runs_operations.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_trigger_runs_operations.py new file mode 100644 index 000000000000..b01dd927607a --- /dev/null +++ b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_trigger_runs_operations.py @@ -0,0 +1,108 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class TriggerRunsOperations(object): + """TriggerRunsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + def query_by_factory( + self, resource_group_name, factory_name, filter_parameters, custom_headers=None, raw=False, **operation_config): + """Query trigger runs. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param filter_parameters: Parameters to filter the pipeline run. + :type filter_parameters: + ~azure.mgmt.datafactory.models.RunFilterParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TriggerRunsQueryResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datafactory.models.TriggerRunsQueryResponse or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.query_by_factory.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(filter_parameters, 'RunFilterParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TriggerRunsQueryResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + query_by_factory.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/queryTriggerRuns'} diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_triggers_operations.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_triggers_operations.py new file mode 100644 index 000000000000..caeda2fcdc91 --- /dev/null +++ b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/_triggers_operations.py @@ -0,0 +1,484 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class TriggersOperations(object): + """TriggersOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + def list_by_factory( + self, resource_group_name, factory_name, custom_headers=None, raw=False, **operation_config): + """Lists triggers. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TriggerResource + :rtype: + ~azure.mgmt.datafactory.models.TriggerResourcePaged[~azure.mgmt.datafactory.models.TriggerResource] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_factory.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TriggerResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_factory.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers'} + + def create_or_update( + self, resource_group_name, factory_name, trigger_name, properties, if_match=None, custom_headers=None, raw=False, **operation_config): + """Creates or updates a trigger. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param trigger_name: The trigger name. + :type trigger_name: str + :param properties: Properties of the trigger. + :type properties: ~azure.mgmt.datafactory.models.Trigger + :param if_match: ETag of the trigger entity. Should only be specified + for update, for which it should match existing entity or can be * for + unconditional update. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TriggerResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datafactory.models.TriggerResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + trigger = models.TriggerResource(properties=properties) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(trigger, 'TriggerResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TriggerResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}'} + + def get( + self, resource_group_name, factory_name, trigger_name, if_none_match=None, custom_headers=None, raw=False, **operation_config): + """Gets a trigger. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param trigger_name: The trigger name. + :type trigger_name: str + :param if_none_match: ETag of the trigger entity. Should only be + specified for get. If the ETag matches the existing entity tag, or if + * was provided, then no content will be returned. + :type if_none_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TriggerResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datafactory.models.TriggerResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_none_match is not None: + header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 304]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TriggerResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}'} + + def delete( + self, resource_group_name, factory_name, trigger_name, custom_headers=None, raw=False, **operation_config): + """Deletes a trigger. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param trigger_name: The trigger name. + :type trigger_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}'} + + + def _start_initial( + self, resource_group_name, factory_name, trigger_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def start( + self, resource_group_name, factory_name, trigger_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Starts a trigger. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param trigger_name: The trigger name. + :type trigger_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + factory_name=factory_name, + trigger_name=trigger_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/start'} + + + def _stop_initial( + self, resource_group_name, factory_name, trigger_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.stop.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), + 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def stop( + self, resource_group_name, factory_name, trigger_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Stops a trigger. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param factory_name: The factory name. + :type factory_name: str + :param trigger_name: The trigger name. + :type trigger_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._stop_initial( + resource_group_name=resource_group_name, + factory_name=factory_name, + trigger_name=trigger_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/stop'} diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/activity_runs_operations.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/activity_runs_operations.py deleted file mode 100644 index f338a1a9c835..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/activity_runs_operations.py +++ /dev/null @@ -1,110 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ActivityRunsOperations(object): - """ActivityRunsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def query_by_pipeline_run( - self, resource_group_name, factory_name, run_id, filter_parameters, custom_headers=None, raw=False, **operation_config): - """Query activity runs based on input filter conditions. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param run_id: The pipeline run identifier. - :type run_id: str - :param filter_parameters: Parameters to filter the activity runs. - :type filter_parameters: - ~azure.mgmt.datafactory.models.RunFilterParameters - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ActivityRunsQueryResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.datafactory.models.ActivityRunsQueryResponse or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.query_by_pipeline_run.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'runId': self._serialize.url("run_id", run_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(filter_parameters, 'RunFilterParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ActivityRunsQueryResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - query_by_pipeline_run.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelineruns/{runId}/queryActivityruns'} diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/datasets_operations.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/datasets_operations.py deleted file mode 100644 index 278815d03479..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/datasets_operations.py +++ /dev/null @@ -1,314 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class DatasetsOperations(object): - """DatasetsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def list_by_factory( - self, resource_group_name, factory_name, custom_headers=None, raw=False, **operation_config): - """Lists datasets. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DatasetResource - :rtype: - ~azure.mgmt.datafactory.models.DatasetResourcePaged[~azure.mgmt.datafactory.models.DatasetResource] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_factory.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DatasetResourcePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DatasetResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_factory.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/datasets'} - - def create_or_update( - self, resource_group_name, factory_name, dataset_name, properties, if_match=None, custom_headers=None, raw=False, **operation_config): - """Creates or updates a dataset. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param dataset_name: The dataset name. - :type dataset_name: str - :param properties: Dataset properties. - :type properties: ~azure.mgmt.datafactory.models.Dataset - :param if_match: ETag of the dataset entity. Should only be specified - for update, for which it should match existing entity or can be * for - unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DatasetResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.datafactory.models.DatasetResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - dataset = models.DatasetResource(properties=properties) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'datasetName': self._serialize.url("dataset_name", dataset_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(dataset, 'DatasetResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('DatasetResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/datasets/{datasetName}'} - - def get( - self, resource_group_name, factory_name, dataset_name, if_none_match=None, custom_headers=None, raw=False, **operation_config): - """Gets a dataset. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param dataset_name: The dataset name. - :type dataset_name: str - :param if_none_match: ETag of the dataset entity. Should only be - specified for get. If the ETag matches the existing entity tag, or if - * was provided, then no content will be returned. - :type if_none_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DatasetResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.datafactory.models.DatasetResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'datasetName': self._serialize.url("dataset_name", dataset_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_none_match is not None: - header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 304]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('DatasetResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/datasets/{datasetName}'} - - def delete( - self, resource_group_name, factory_name, dataset_name, custom_headers=None, raw=False, **operation_config): - """Deletes a dataset. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param dataset_name: The dataset name. - :type dataset_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'datasetName': self._serialize.url("dataset_name", dataset_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/datasets/{datasetName}'} diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/exposure_control_operations.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/exposure_control_operations.py deleted file mode 100644 index 080e8c87ba18..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/exposure_control_operations.py +++ /dev/null @@ -1,107 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ExposureControlOperations(object): - """ExposureControlOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def get_feature_value( - self, location_id, feature_name=None, feature_type=None, custom_headers=None, raw=False, **operation_config): - """Get exposure control feature for specific location. - - :param location_id: The location identifier. - :type location_id: str - :param feature_name: The feature name. - :type feature_name: str - :param feature_type: The feature type. - :type feature_type: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ExposureControlResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.datafactory.models.ExposureControlResponse or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - exposure_control_request = models.ExposureControlRequest(feature_name=feature_name, feature_type=feature_type) - - # Construct URL - url = self.get_feature_value.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'locationId': self._serialize.url("location_id", location_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(exposure_control_request, 'ExposureControlRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ExposureControlResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_feature_value.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataFactory/locations/{locationId}/getFeatureValue'} diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/factories_operations.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/factories_operations.py deleted file mode 100644 index b06c12f3e8c5..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/factories_operations.py +++ /dev/null @@ -1,644 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class FactoriesOperations(object): - """FactoriesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists factories under the specified subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Factory - :rtype: - ~azure.mgmt.datafactory.models.FactoryPaged[~azure.mgmt.datafactory.models.Factory] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.FactoryPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.FactoryPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataFactory/factories'} - - def configure_factory_repo( - self, location_id, factory_resource_id=None, repo_configuration=None, custom_headers=None, raw=False, **operation_config): - """Updates a factory's repo information. - - :param location_id: The location identifier. - :type location_id: str - :param factory_resource_id: The factory resource id. - :type factory_resource_id: str - :param repo_configuration: Git repo information of the factory. - :type repo_configuration: - ~azure.mgmt.datafactory.models.FactoryRepoConfiguration - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Factory or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.datafactory.models.Factory or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - factory_repo_update = models.FactoryRepoUpdate(factory_resource_id=factory_resource_id, repo_configuration=repo_configuration) - - # Construct URL - url = self.configure_factory_repo.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'locationId': self._serialize.url("location_id", location_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(factory_repo_update, 'FactoryRepoUpdate') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Factory', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - configure_factory_repo.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataFactory/locations/{locationId}/configureFactoryRepo'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Lists factories. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Factory - :rtype: - ~azure.mgmt.datafactory.models.FactoryPaged[~azure.mgmt.datafactory.models.Factory] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.FactoryPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.FactoryPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories'} - - def create_or_update( - self, resource_group_name, factory_name, factory, if_match=None, custom_headers=None, raw=False, **operation_config): - """Creates or updates a factory. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param factory: Factory resource definition. - :type factory: ~azure.mgmt.datafactory.models.Factory - :param if_match: ETag of the factory entity. Should only be specified - for update, for which it should match existing entity or can be * for - unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Factory or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.datafactory.models.Factory or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(factory, 'Factory') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Factory', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}'} - - def update( - self, resource_group_name, factory_name, tags=None, identity=None, custom_headers=None, raw=False, **operation_config): - """Updates a factory. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param identity: Managed service identity of the factory. - :type identity: ~azure.mgmt.datafactory.models.FactoryIdentity - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Factory or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.datafactory.models.Factory or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - factory_update_parameters = models.FactoryUpdateParameters(tags=tags, identity=identity) - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(factory_update_parameters, 'FactoryUpdateParameters') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Factory', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}'} - - def get( - self, resource_group_name, factory_name, if_none_match=None, custom_headers=None, raw=False, **operation_config): - """Gets a factory. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param if_none_match: ETag of the factory entity. Should only be - specified for get. If the ETag matches the existing entity tag, or if - * was provided, then no content will be returned. - :type if_none_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Factory or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.datafactory.models.Factory or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_none_match is not None: - header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 304]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Factory', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}'} - - def delete( - self, resource_group_name, factory_name, custom_headers=None, raw=False, **operation_config): - """Deletes a factory. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}'} - - def get_git_hub_access_token( - self, resource_group_name, factory_name, git_hub_access_token_request, custom_headers=None, raw=False, **operation_config): - """Get GitHub Access Token. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param git_hub_access_token_request: Get GitHub access token request - definition. - :type git_hub_access_token_request: - ~azure.mgmt.datafactory.models.GitHubAccessTokenRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: GitHubAccessTokenResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.datafactory.models.GitHubAccessTokenResponse or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_git_hub_access_token.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(git_hub_access_token_request, 'GitHubAccessTokenRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('GitHubAccessTokenResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_git_hub_access_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/getGitHubAccessToken'} - - def get_data_plane_access( - self, resource_group_name, factory_name, policy, custom_headers=None, raw=False, **operation_config): - """Get Data Plane access. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param policy: Data Plane user access policy definition. - :type policy: ~azure.mgmt.datafactory.models.UserAccessPolicy - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AccessPolicyResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.datafactory.models.AccessPolicyResponse or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_data_plane_access.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(policy, 'UserAccessPolicy') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AccessPolicyResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_data_plane_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/getDataPlaneAccess'} diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/integration_runtime_nodes_operations.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/integration_runtime_nodes_operations.py deleted file mode 100644 index 81467b9e3385..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/integration_runtime_nodes_operations.py +++ /dev/null @@ -1,316 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class IntegrationRuntimeNodesOperations(object): - """IntegrationRuntimeNodesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def get( - self, resource_group_name, factory_name, integration_runtime_name, node_name, custom_headers=None, raw=False, **operation_config): - """Gets a self-hosted integration runtime node. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param integration_runtime_name: The integration runtime name. - :type integration_runtime_name: str - :param node_name: The integration runtime node name. - :type node_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SelfHostedIntegrationRuntimeNode or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.datafactory.models.SelfHostedIntegrationRuntimeNode or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'nodeName': self._serialize.url("node_name", node_name, 'str', max_length=150, min_length=1, pattern=r'^[a-z0-9A-Z][a-z0-9A-Z_-]{0,149}$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SelfHostedIntegrationRuntimeNode', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/nodes/{nodeName}'} - - def delete( - self, resource_group_name, factory_name, integration_runtime_name, node_name, custom_headers=None, raw=False, **operation_config): - """Deletes a self-hosted integration runtime node. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param integration_runtime_name: The integration runtime name. - :type integration_runtime_name: str - :param node_name: The integration runtime node name. - :type node_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'nodeName': self._serialize.url("node_name", node_name, 'str', max_length=150, min_length=1, pattern=r'^[a-z0-9A-Z][a-z0-9A-Z_-]{0,149}$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/nodes/{nodeName}'} - - def update( - self, resource_group_name, factory_name, integration_runtime_name, node_name, concurrent_jobs_limit=None, custom_headers=None, raw=False, **operation_config): - """Updates a self-hosted integration runtime node. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param integration_runtime_name: The integration runtime name. - :type integration_runtime_name: str - :param node_name: The integration runtime node name. - :type node_name: str - :param concurrent_jobs_limit: The number of concurrent jobs permitted - to run on the integration runtime node. Values between 1 and - maxConcurrentJobs(inclusive) are allowed. - :type concurrent_jobs_limit: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SelfHostedIntegrationRuntimeNode or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.datafactory.models.SelfHostedIntegrationRuntimeNode or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - update_integration_runtime_node_request = models.UpdateIntegrationRuntimeNodeRequest(concurrent_jobs_limit=concurrent_jobs_limit) - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'nodeName': self._serialize.url("node_name", node_name, 'str', max_length=150, min_length=1, pattern=r'^[a-z0-9A-Z][a-z0-9A-Z_-]{0,149}$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(update_integration_runtime_node_request, 'UpdateIntegrationRuntimeNodeRequest') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SelfHostedIntegrationRuntimeNode', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/nodes/{nodeName}'} - - def get_ip_address( - self, resource_group_name, factory_name, integration_runtime_name, node_name, custom_headers=None, raw=False, **operation_config): - """Get the IP address of self-hosted integration runtime node. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param integration_runtime_name: The integration runtime name. - :type integration_runtime_name: str - :param node_name: The integration runtime node name. - :type node_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IntegrationRuntimeNodeIpAddress or ClientRawResponse if - raw=true - :rtype: ~azure.mgmt.datafactory.models.IntegrationRuntimeNodeIpAddress - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_ip_address.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'nodeName': self._serialize.url("node_name", node_name, 'str', max_length=150, min_length=1, pattern=r'^[a-z0-9A-Z][a-z0-9A-Z_-]{0,149}$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('IntegrationRuntimeNodeIpAddress', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_ip_address.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/nodes/{nodeName}/ipAddress'} diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/integration_runtime_object_metadata_operations.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/integration_runtime_object_metadata_operations.py deleted file mode 100644 index 230f12d023c3..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/integration_runtime_object_metadata_operations.py +++ /dev/null @@ -1,218 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class IntegrationRuntimeObjectMetadataOperations(object): - """IntegrationRuntimeObjectMetadataOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - - def _refresh_initial( - self, resource_group_name, factory_name, integration_runtime_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.refresh.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SsisObjectMetadataStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def refresh( - self, resource_group_name, factory_name, integration_runtime_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Refresh a SSIS integration runtime object metadata. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param integration_runtime_name: The integration runtime name. - :type integration_runtime_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - SsisObjectMetadataStatusResponse or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.datafactory.models.SsisObjectMetadataStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.datafactory.models.SsisObjectMetadataStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._refresh_initial( - resource_group_name=resource_group_name, - factory_name=factory_name, - integration_runtime_name=integration_runtime_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SsisObjectMetadataStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - refresh.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/refreshObjectMetadata'} - - def get( - self, resource_group_name, factory_name, integration_runtime_name, metadata_path=None, custom_headers=None, raw=False, **operation_config): - """Get a SSIS integration runtime object metadata by specified path. The - return is pageable metadata list. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param integration_runtime_name: The integration runtime name. - :type integration_runtime_name: str - :param metadata_path: Metadata path. - :type metadata_path: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SsisObjectMetadataListResponse or ClientRawResponse if - raw=true - :rtype: ~azure.mgmt.datafactory.models.SsisObjectMetadataListResponse - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - get_metadata_request = None - if metadata_path is not None: - get_metadata_request = models.GetSsisObjectMetadataRequest(metadata_path=metadata_path) - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if get_metadata_request is not None: - body_content = self._serialize.body(get_metadata_request, 'GetSsisObjectMetadataRequest') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SsisObjectMetadataListResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/getObjectMetadata'} diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/integration_runtimes_operations.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/integration_runtimes_operations.py deleted file mode 100644 index 0a64be3b1441..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/integration_runtimes_operations.py +++ /dev/null @@ -1,1181 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class IntegrationRuntimesOperations(object): - """IntegrationRuntimesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def list_by_factory( - self, resource_group_name, factory_name, custom_headers=None, raw=False, **operation_config): - """Lists integration runtimes. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of IntegrationRuntimeResource - :rtype: - ~azure.mgmt.datafactory.models.IntegrationRuntimeResourcePaged[~azure.mgmt.datafactory.models.IntegrationRuntimeResource] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_factory.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.IntegrationRuntimeResourcePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.IntegrationRuntimeResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_factory.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes'} - - def create_or_update( - self, resource_group_name, factory_name, integration_runtime_name, properties, if_match=None, custom_headers=None, raw=False, **operation_config): - """Creates or updates an integration runtime. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param integration_runtime_name: The integration runtime name. - :type integration_runtime_name: str - :param properties: Integration runtime properties. - :type properties: ~azure.mgmt.datafactory.models.IntegrationRuntime - :param if_match: ETag of the integration runtime entity. Should only - be specified for update, for which it should match existing entity or - can be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IntegrationRuntimeResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.datafactory.models.IntegrationRuntimeResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - integration_runtime = models.IntegrationRuntimeResource(properties=properties) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(integration_runtime, 'IntegrationRuntimeResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('IntegrationRuntimeResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}'} - - def get( - self, resource_group_name, factory_name, integration_runtime_name, if_none_match=None, custom_headers=None, raw=False, **operation_config): - """Gets an integration runtime. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param integration_runtime_name: The integration runtime name. - :type integration_runtime_name: str - :param if_none_match: ETag of the integration runtime entity. Should - only be specified for get. If the ETag matches the existing entity - tag, or if * was provided, then no content will be returned. - :type if_none_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IntegrationRuntimeResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.datafactory.models.IntegrationRuntimeResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_none_match is not None: - header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 304]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('IntegrationRuntimeResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}'} - - def update( - self, resource_group_name, factory_name, integration_runtime_name, auto_update=None, update_delay_offset=None, custom_headers=None, raw=False, **operation_config): - """Updates an integration runtime. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param integration_runtime_name: The integration runtime name. - :type integration_runtime_name: str - :param auto_update: Enables or disables the auto-update feature of the - self-hosted integration runtime. See - https://go.microsoft.com/fwlink/?linkid=854189. Possible values - include: 'On', 'Off' - :type auto_update: str or - ~azure.mgmt.datafactory.models.IntegrationRuntimeAutoUpdate - :param update_delay_offset: The time offset (in hours) in the day, - e.g., PT03H is 3 hours. The integration runtime auto update will - happen on that time. - :type update_delay_offset: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IntegrationRuntimeResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.datafactory.models.IntegrationRuntimeResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - update_integration_runtime_request = models.UpdateIntegrationRuntimeRequest(auto_update=auto_update, update_delay_offset=update_delay_offset) - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(update_integration_runtime_request, 'UpdateIntegrationRuntimeRequest') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('IntegrationRuntimeResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}'} - - def delete( - self, resource_group_name, factory_name, integration_runtime_name, custom_headers=None, raw=False, **operation_config): - """Deletes an integration runtime. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param integration_runtime_name: The integration runtime name. - :type integration_runtime_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}'} - - def get_status( - self, resource_group_name, factory_name, integration_runtime_name, custom_headers=None, raw=False, **operation_config): - """Gets detailed status information for an integration runtime. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param integration_runtime_name: The integration runtime name. - :type integration_runtime_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IntegrationRuntimeStatusResponse or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.datafactory.models.IntegrationRuntimeStatusResponse or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_status.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('IntegrationRuntimeStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/getStatus'} - - def get_connection_info( - self, resource_group_name, factory_name, integration_runtime_name, custom_headers=None, raw=False, **operation_config): - """Gets the on-premises integration runtime connection information for - encrypting the on-premises data source credentials. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param integration_runtime_name: The integration runtime name. - :type integration_runtime_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IntegrationRuntimeConnectionInfo or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.datafactory.models.IntegrationRuntimeConnectionInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_connection_info.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('IntegrationRuntimeConnectionInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_connection_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/getConnectionInfo'} - - def regenerate_auth_key( - self, resource_group_name, factory_name, integration_runtime_name, key_name=None, custom_headers=None, raw=False, **operation_config): - """Regenerates the authentication key for an integration runtime. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param integration_runtime_name: The integration runtime name. - :type integration_runtime_name: str - :param key_name: The name of the authentication key to regenerate. - Possible values include: 'authKey1', 'authKey2' - :type key_name: str or - ~azure.mgmt.datafactory.models.IntegrationRuntimeAuthKeyName - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IntegrationRuntimeAuthKeys or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.datafactory.models.IntegrationRuntimeAuthKeys or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - regenerate_key_parameters = models.IntegrationRuntimeRegenerateKeyParameters(key_name=key_name) - - # Construct URL - url = self.regenerate_auth_key.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(regenerate_key_parameters, 'IntegrationRuntimeRegenerateKeyParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('IntegrationRuntimeAuthKeys', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - regenerate_auth_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/regenerateAuthKey'} - - def list_auth_keys( - self, resource_group_name, factory_name, integration_runtime_name, custom_headers=None, raw=False, **operation_config): - """Retrieves the authentication keys for an integration runtime. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param integration_runtime_name: The integration runtime name. - :type integration_runtime_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IntegrationRuntimeAuthKeys or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.datafactory.models.IntegrationRuntimeAuthKeys or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_auth_keys.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('IntegrationRuntimeAuthKeys', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_auth_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/listAuthKeys'} - - - def _start_initial( - self, resource_group_name, factory_name, integration_runtime_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('IntegrationRuntimeStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def start( - self, resource_group_name, factory_name, integration_runtime_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Starts a ManagedReserved type integration runtime. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param integration_runtime_name: The integration runtime name. - :type integration_runtime_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - IntegrationRuntimeStatusResponse or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.datafactory.models.IntegrationRuntimeStatusResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.datafactory.models.IntegrationRuntimeStatusResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - factory_name=factory_name, - integration_runtime_name=integration_runtime_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('IntegrationRuntimeStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/start'} - - - def _stop_initial( - self, resource_group_name, factory_name, integration_runtime_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.stop.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def stop( - self, resource_group_name, factory_name, integration_runtime_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Stops a ManagedReserved type integration runtime. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param integration_runtime_name: The integration runtime name. - :type integration_runtime_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._stop_initial( - resource_group_name=resource_group_name, - factory_name=factory_name, - integration_runtime_name=integration_runtime_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/stop'} - - def sync_credentials( - self, resource_group_name, factory_name, integration_runtime_name, custom_headers=None, raw=False, **operation_config): - """Force the integration runtime to synchronize credentials across - integration runtime nodes, and this will override the credentials - across all worker nodes with those available on the dispatcher node. If - you already have the latest credential backup file, you should manually - import it (preferred) on any self-hosted integration runtime node than - using this API directly. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param integration_runtime_name: The integration runtime name. - :type integration_runtime_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.sync_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - sync_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/syncCredentials'} - - def get_monitoring_data( - self, resource_group_name, factory_name, integration_runtime_name, custom_headers=None, raw=False, **operation_config): - """Get the integration runtime monitoring data, which includes the monitor - data for all the nodes under this integration runtime. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param integration_runtime_name: The integration runtime name. - :type integration_runtime_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IntegrationRuntimeMonitoringData or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.datafactory.models.IntegrationRuntimeMonitoringData or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_monitoring_data.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('IntegrationRuntimeMonitoringData', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_monitoring_data.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/monitoringData'} - - def upgrade( - self, resource_group_name, factory_name, integration_runtime_name, custom_headers=None, raw=False, **operation_config): - """Upgrade self-hosted integration runtime to latest version if - availability. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param integration_runtime_name: The integration runtime name. - :type integration_runtime_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.upgrade.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - upgrade.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/upgrade'} - - def remove_links( - self, resource_group_name, factory_name, integration_runtime_name, linked_factory_name, custom_headers=None, raw=False, **operation_config): - """Remove all linked integration runtimes under specific data factory in a - self-hosted integration runtime. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param integration_runtime_name: The integration runtime name. - :type integration_runtime_name: str - :param linked_factory_name: The data factory name for linked - integration runtime. - :type linked_factory_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - linked_integration_runtime_request = models.LinkedIntegrationRuntimeRequest(linked_factory_name=linked_factory_name) - - # Construct URL - url = self.remove_links.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(linked_integration_runtime_request, 'LinkedIntegrationRuntimeRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - remove_links.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/removeLinks'} - - def create_linked_integration_runtime( - self, resource_group_name, factory_name, integration_runtime_name, create_linked_integration_runtime_request, custom_headers=None, raw=False, **operation_config): - """Create a linked integration runtime entry in a shared integration - runtime. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param integration_runtime_name: The integration runtime name. - :type integration_runtime_name: str - :param create_linked_integration_runtime_request: The linked - integration runtime properties. - :type create_linked_integration_runtime_request: - ~azure.mgmt.datafactory.models.CreateLinkedIntegrationRuntimeRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IntegrationRuntimeStatusResponse or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.datafactory.models.IntegrationRuntimeStatusResponse or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_linked_integration_runtime.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(create_linked_integration_runtime_request, 'CreateLinkedIntegrationRuntimeRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('IntegrationRuntimeStatusResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_linked_integration_runtime.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/linkedIntegrationRuntime'} diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/linked_services_operations.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/linked_services_operations.py deleted file mode 100644 index e6878336df91..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/linked_services_operations.py +++ /dev/null @@ -1,314 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class LinkedServicesOperations(object): - """LinkedServicesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def list_by_factory( - self, resource_group_name, factory_name, custom_headers=None, raw=False, **operation_config): - """Lists linked services. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of LinkedServiceResource - :rtype: - ~azure.mgmt.datafactory.models.LinkedServiceResourcePaged[~azure.mgmt.datafactory.models.LinkedServiceResource] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_factory.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.LinkedServiceResourcePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.LinkedServiceResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_factory.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/linkedservices'} - - def create_or_update( - self, resource_group_name, factory_name, linked_service_name, properties, if_match=None, custom_headers=None, raw=False, **operation_config): - """Creates or updates a linked service. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param linked_service_name: The linked service name. - :type linked_service_name: str - :param properties: Properties of linked service. - :type properties: ~azure.mgmt.datafactory.models.LinkedService - :param if_match: ETag of the linkedService entity. Should only be - specified for update, for which it should match existing entity or can - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: LinkedServiceResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.datafactory.models.LinkedServiceResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - linked_service = models.LinkedServiceResource(properties=properties) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'linkedServiceName': self._serialize.url("linked_service_name", linked_service_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(linked_service, 'LinkedServiceResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('LinkedServiceResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/linkedservices/{linkedServiceName}'} - - def get( - self, resource_group_name, factory_name, linked_service_name, if_none_match=None, custom_headers=None, raw=False, **operation_config): - """Gets a linked service. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param linked_service_name: The linked service name. - :type linked_service_name: str - :param if_none_match: ETag of the linked service entity. Should only - be specified for get. If the ETag matches the existing entity tag, or - if * was provided, then no content will be returned. - :type if_none_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: LinkedServiceResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.datafactory.models.LinkedServiceResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'linkedServiceName': self._serialize.url("linked_service_name", linked_service_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_none_match is not None: - header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 304]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('LinkedServiceResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/linkedservices/{linkedServiceName}'} - - def delete( - self, resource_group_name, factory_name, linked_service_name, custom_headers=None, raw=False, **operation_config): - """Deletes a linked service. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param linked_service_name: The linked service name. - :type linked_service_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'linkedServiceName': self._serialize.url("linked_service_name", linked_service_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/linkedservices/{linkedServiceName}'} diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/operations.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/operations.py deleted file mode 100644 index 2273e12d5ada..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/operations.py +++ /dev/null @@ -1,98 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists the available Azure Data Factory API operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Operation - :rtype: - ~azure.mgmt.datafactory.models.OperationPaged[~azure.mgmt.datafactory.models.Operation] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/providers/Microsoft.DataFactory/operations'} diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/pipeline_runs_operations.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/pipeline_runs_operations.py deleted file mode 100644 index de8744612d20..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/pipeline_runs_operations.py +++ /dev/null @@ -1,233 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class PipelineRunsOperations(object): - """PipelineRunsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def query_by_factory( - self, resource_group_name, factory_name, filter_parameters, custom_headers=None, raw=False, **operation_config): - """Query pipeline runs in the factory based on input filter conditions. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param filter_parameters: Parameters to filter the pipeline run. - :type filter_parameters: - ~azure.mgmt.datafactory.models.RunFilterParameters - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PipelineRunsQueryResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.datafactory.models.PipelineRunsQueryResponse or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.query_by_factory.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(filter_parameters, 'RunFilterParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('PipelineRunsQueryResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - query_by_factory.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/queryPipelineRuns'} - - def get( - self, resource_group_name, factory_name, run_id, custom_headers=None, raw=False, **operation_config): - """Get a pipeline run by its run ID. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param run_id: The pipeline run identifier. - :type run_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PipelineRun or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.datafactory.models.PipelineRun or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'runId': self._serialize.url("run_id", run_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('PipelineRun', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelineruns/{runId}'} - - def cancel( - self, resource_group_name, factory_name, run_id, is_recursive=None, custom_headers=None, raw=False, **operation_config): - """Cancel a pipeline run by its run ID. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param run_id: The pipeline run identifier. - :type run_id: str - :param is_recursive: If true, cancel all the Child pipelines that are - triggered by the current pipeline. - :type is_recursive: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.cancel.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'runId': self._serialize.url("run_id", run_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if is_recursive is not None: - query_parameters['isRecursive'] = self._serialize.query("is_recursive", is_recursive, 'bool') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelineruns/{runId}/cancel'} diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/pipelines_operations.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/pipelines_operations.py deleted file mode 100644 index 8a01ce6a8408..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/pipelines_operations.py +++ /dev/null @@ -1,393 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class PipelinesOperations(object): - """PipelinesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def list_by_factory( - self, resource_group_name, factory_name, custom_headers=None, raw=False, **operation_config): - """Lists pipelines. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PipelineResource - :rtype: - ~azure.mgmt.datafactory.models.PipelineResourcePaged[~azure.mgmt.datafactory.models.PipelineResource] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_factory.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.PipelineResourcePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.PipelineResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_factory.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelines'} - - def create_or_update( - self, resource_group_name, factory_name, pipeline_name, pipeline, if_match=None, custom_headers=None, raw=False, **operation_config): - """Creates or updates a pipeline. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param pipeline_name: The pipeline name. - :type pipeline_name: str - :param pipeline: Pipeline resource definition. - :type pipeline: ~azure.mgmt.datafactory.models.PipelineResource - :param if_match: ETag of the pipeline entity. Should only be - specified for update, for which it should match existing entity or can - be * for unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PipelineResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.datafactory.models.PipelineResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'pipelineName': self._serialize.url("pipeline_name", pipeline_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(pipeline, 'PipelineResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('PipelineResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelines/{pipelineName}'} - - def get( - self, resource_group_name, factory_name, pipeline_name, if_none_match=None, custom_headers=None, raw=False, **operation_config): - """Gets a pipeline. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param pipeline_name: The pipeline name. - :type pipeline_name: str - :param if_none_match: ETag of the pipeline entity. Should only be - specified for get. If the ETag matches the existing entity tag, or if - * was provided, then no content will be returned. - :type if_none_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PipelineResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.datafactory.models.PipelineResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'pipelineName': self._serialize.url("pipeline_name", pipeline_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_none_match is not None: - header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 304]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('PipelineResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelines/{pipelineName}'} - - def delete( - self, resource_group_name, factory_name, pipeline_name, custom_headers=None, raw=False, **operation_config): - """Deletes a pipeline. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param pipeline_name: The pipeline name. - :type pipeline_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'pipelineName': self._serialize.url("pipeline_name", pipeline_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelines/{pipelineName}'} - - def create_run( - self, resource_group_name, factory_name, pipeline_name, reference_pipeline_run_id=None, parameters=None, custom_headers=None, raw=False, **operation_config): - """Creates a run of a pipeline. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param pipeline_name: The pipeline name. - :type pipeline_name: str - :param reference_pipeline_run_id: The pipeline run identifier. If run - ID is specified the parameters of the specified run will be used to - create a new run. - :type reference_pipeline_run_id: str - :param parameters: Parameters of the pipeline run. These parameters - will be used only if the runId is not specified. - :type parameters: dict[str, object] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CreateRunResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.datafactory.models.CreateRunResponse or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_run.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'pipelineName': self._serialize.url("pipeline_name", pipeline_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if reference_pipeline_run_id is not None: - query_parameters['referencePipelineRunId'] = self._serialize.query("reference_pipeline_run_id", reference_pipeline_run_id, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if parameters is not None: - body_content = self._serialize.body(parameters, '{object}') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('CreateRunResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_run.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelines/{pipelineName}/createRun'} diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/rerun_triggers_operations.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/rerun_triggers_operations.py deleted file mode 100644 index 58e0066a60dd..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/rerun_triggers_operations.py +++ /dev/null @@ -1,450 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class RerunTriggersOperations(object): - """RerunTriggersOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def create( - self, resource_group_name, factory_name, trigger_name, rerun_trigger_name, rerun_tumbling_window_trigger_action_parameters, custom_headers=None, raw=False, **operation_config): - """Creates a rerun trigger. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param trigger_name: The trigger name. - :type trigger_name: str - :param rerun_trigger_name: The rerun trigger name. - :type rerun_trigger_name: str - :param rerun_tumbling_window_trigger_action_parameters: Rerun tumbling - window trigger action parameters. - :type rerun_tumbling_window_trigger_action_parameters: - ~azure.mgmt.datafactory.models.RerunTumblingWindowTriggerActionParameters - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TriggerResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.datafactory.models.TriggerResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$'), - 'rerunTriggerName': self._serialize.url("rerun_trigger_name", rerun_trigger_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(rerun_tumbling_window_trigger_action_parameters, 'RerunTumblingWindowTriggerActionParameters') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('TriggerResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/rerunTriggers/{rerunTriggerName}'} - - - def _start_initial( - self, resource_group_name, factory_name, trigger_name, rerun_trigger_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$'), - 'rerunTriggerName': self._serialize.url("rerun_trigger_name", rerun_trigger_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def start( - self, resource_group_name, factory_name, trigger_name, rerun_trigger_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Starts a trigger. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param trigger_name: The trigger name. - :type trigger_name: str - :param rerun_trigger_name: The rerun trigger name. - :type rerun_trigger_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - factory_name=factory_name, - trigger_name=trigger_name, - rerun_trigger_name=rerun_trigger_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/rerunTriggers/{rerunTriggerName}/start'} - - - def _stop_initial( - self, resource_group_name, factory_name, trigger_name, rerun_trigger_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.stop.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$'), - 'rerunTriggerName': self._serialize.url("rerun_trigger_name", rerun_trigger_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def stop( - self, resource_group_name, factory_name, trigger_name, rerun_trigger_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Stops a trigger. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param trigger_name: The trigger name. - :type trigger_name: str - :param rerun_trigger_name: The rerun trigger name. - :type rerun_trigger_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._stop_initial( - resource_group_name=resource_group_name, - factory_name=factory_name, - trigger_name=trigger_name, - rerun_trigger_name=rerun_trigger_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/rerunTriggers/{rerunTriggerName}/stop'} - - - def _cancel_initial( - self, resource_group_name, factory_name, trigger_name, rerun_trigger_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.cancel.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$'), - 'rerunTriggerName': self._serialize.url("rerun_trigger_name", rerun_trigger_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def cancel( - self, resource_group_name, factory_name, trigger_name, rerun_trigger_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Cancels a trigger. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param trigger_name: The trigger name. - :type trigger_name: str - :param rerun_trigger_name: The rerun trigger name. - :type rerun_trigger_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._cancel_initial( - resource_group_name=resource_group_name, - factory_name=factory_name, - trigger_name=trigger_name, - rerun_trigger_name=rerun_trigger_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/rerunTriggers/{rerunTriggerName}/cancel'} - - def list_by_trigger( - self, resource_group_name, factory_name, trigger_name, custom_headers=None, raw=False, **operation_config): - """Lists rerun triggers by an original trigger name. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param trigger_name: The trigger name. - :type trigger_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of RerunTriggerResource - :rtype: - ~azure.mgmt.datafactory.models.RerunTriggerResourcePaged[~azure.mgmt.datafactory.models.RerunTriggerResource] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_trigger.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.RerunTriggerResourcePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.RerunTriggerResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_trigger.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/rerunTriggers'} diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/trigger_runs_operations.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/trigger_runs_operations.py deleted file mode 100644 index 51e9b0ac37a3..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/trigger_runs_operations.py +++ /dev/null @@ -1,107 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class TriggerRunsOperations(object): - """TriggerRunsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def query_by_factory( - self, resource_group_name, factory_name, filter_parameters, custom_headers=None, raw=False, **operation_config): - """Query trigger runs. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param filter_parameters: Parameters to filter the pipeline run. - :type filter_parameters: - ~azure.mgmt.datafactory.models.RunFilterParameters - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TriggerRunsQueryResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.datafactory.models.TriggerRunsQueryResponse or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.query_by_factory.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(filter_parameters, 'RunFilterParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('TriggerRunsQueryResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - query_by_factory.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/queryTriggerRuns'} diff --git a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/triggers_operations.py b/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/triggers_operations.py deleted file mode 100644 index f80cfcb2870b..000000000000 --- a/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/operations/triggers_operations.py +++ /dev/null @@ -1,482 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class TriggersOperations(object): - """TriggersOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def list_by_factory( - self, resource_group_name, factory_name, custom_headers=None, raw=False, **operation_config): - """Lists triggers. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TriggerResource - :rtype: - ~azure.mgmt.datafactory.models.TriggerResourcePaged[~azure.mgmt.datafactory.models.TriggerResource] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_factory.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.TriggerResourcePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.TriggerResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_factory.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers'} - - def create_or_update( - self, resource_group_name, factory_name, trigger_name, properties, if_match=None, custom_headers=None, raw=False, **operation_config): - """Creates or updates a trigger. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param trigger_name: The trigger name. - :type trigger_name: str - :param properties: Properties of the trigger. - :type properties: ~azure.mgmt.datafactory.models.Trigger - :param if_match: ETag of the trigger entity. Should only be specified - for update, for which it should match existing entity or can be * for - unconditional update. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TriggerResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.datafactory.models.TriggerResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - trigger = models.TriggerResource(properties=properties) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(trigger, 'TriggerResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('TriggerResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}'} - - def get( - self, resource_group_name, factory_name, trigger_name, if_none_match=None, custom_headers=None, raw=False, **operation_config): - """Gets a trigger. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param trigger_name: The trigger name. - :type trigger_name: str - :param if_none_match: ETag of the trigger entity. Should only be - specified for get. If the ETag matches the existing entity tag, or if - * was provided, then no content will be returned. - :type if_none_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TriggerResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.datafactory.models.TriggerResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_none_match is not None: - header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 304]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('TriggerResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}'} - - def delete( - self, resource_group_name, factory_name, trigger_name, custom_headers=None, raw=False, **operation_config): - """Deletes a trigger. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param trigger_name: The trigger name. - :type trigger_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}'} - - - def _start_initial( - self, resource_group_name, factory_name, trigger_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.start.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def start( - self, resource_group_name, factory_name, trigger_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Starts a trigger. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param trigger_name: The trigger name. - :type trigger_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._start_initial( - resource_group_name=resource_group_name, - factory_name=factory_name, - trigger_name=trigger_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/start'} - - - def _stop_initial( - self, resource_group_name, factory_name, trigger_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.stop.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str', max_length=260, min_length=1, pattern=r'^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def stop( - self, resource_group_name, factory_name, trigger_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Stops a trigger. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param factory_name: The factory name. - :type factory_name: str - :param trigger_name: The trigger name. - :type trigger_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._stop_initial( - resource_group_name=resource_group_name, - factory_name=factory_name, - trigger_name=trigger_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/stop'} diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models.py index d9c93b5d62d8..2643e4c67737 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models.py @@ -489,6 +489,12 @@ class SapMonitor(Resource): :type hana_db_username: str :param hana_db_password: Database password of the HANA instance. :type hana_db_password: str + :param hana_db_password_key_vault_url: KeyVault URL link to the password + for the HANA database. + :type hana_db_password_key_vault_url: str + :param hana_db_credentials_msi_id: MSI ID passed by customer which has + access to customer's KeyVault and to be assigned to the Collector VM. + :type hana_db_credentials_msi_id: str :ivar provisioning_state: State of provisioning of the HanaInstance. Possible values include: 'Accepted', 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', 'Migrating' @@ -516,6 +522,8 @@ class SapMonitor(Resource): 'hana_db_sql_port': {'key': 'properties.hanaDbSqlPort', 'type': 'int'}, 'hana_db_username': {'key': 'properties.hanaDbUsername', 'type': 'str'}, 'hana_db_password': {'key': 'properties.hanaDbPassword', 'type': 'str'}, + 'hana_db_password_key_vault_url': {'key': 'properties.hanaDbPasswordKeyVaultUrl', 'type': 'str'}, + 'hana_db_credentials_msi_id': {'key': 'properties.hanaDbCredentialsMsiId', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } @@ -527,6 +535,8 @@ def __init__(self, **kwargs): self.hana_db_sql_port = kwargs.get('hana_db_sql_port', None) self.hana_db_username = kwargs.get('hana_db_username', None) self.hana_db_password = kwargs.get('hana_db_password', None) + self.hana_db_password_key_vault_url = kwargs.get('hana_db_password_key_vault_url', None) + self.hana_db_credentials_msi_id = kwargs.get('hana_db_credentials_msi_id', None) self.provisioning_state = None diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models_py3.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models_py3.py index dece72c8661c..9f6950525157 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models_py3.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models_py3.py @@ -489,6 +489,12 @@ class SapMonitor(Resource): :type hana_db_username: str :param hana_db_password: Database password of the HANA instance. :type hana_db_password: str + :param hana_db_password_key_vault_url: KeyVault URL link to the password + for the HANA database. + :type hana_db_password_key_vault_url: str + :param hana_db_credentials_msi_id: MSI ID passed by customer which has + access to customer's KeyVault and to be assigned to the Collector VM. + :type hana_db_credentials_msi_id: str :ivar provisioning_state: State of provisioning of the HanaInstance. Possible values include: 'Accepted', 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', 'Migrating' @@ -516,10 +522,12 @@ class SapMonitor(Resource): 'hana_db_sql_port': {'key': 'properties.hanaDbSqlPort', 'type': 'int'}, 'hana_db_username': {'key': 'properties.hanaDbUsername', 'type': 'str'}, 'hana_db_password': {'key': 'properties.hanaDbPassword', 'type': 'str'}, + 'hana_db_password_key_vault_url': {'key': 'properties.hanaDbPasswordKeyVaultUrl', 'type': 'str'}, + 'hana_db_credentials_msi_id': {'key': 'properties.hanaDbCredentialsMsiId', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } - def __init__(self, *, location: str=None, hana_subnet: str=None, hana_hostname: str=None, hana_db_name: str=None, hana_db_sql_port: int=None, hana_db_username: str=None, hana_db_password: str=None, **kwargs) -> None: + def __init__(self, *, location: str=None, hana_subnet: str=None, hana_hostname: str=None, hana_db_name: str=None, hana_db_sql_port: int=None, hana_db_username: str=None, hana_db_password: str=None, hana_db_password_key_vault_url: str=None, hana_db_credentials_msi_id: str=None, **kwargs) -> None: super(SapMonitor, self).__init__(location=location, **kwargs) self.hana_subnet = hana_subnet self.hana_hostname = hana_hostname @@ -527,6 +535,8 @@ def __init__(self, *, location: str=None, hana_subnet: str=None, hana_hostname: self.hana_db_sql_port = hana_db_sql_port self.hana_db_username = hana_db_username self.hana_db_password = hana_db_password + self.hana_db_password_key_vault_url = hana_db_password_key_vault_url + self.hana_db_credentials_msi_id = hana_db_credentials_msi_id self.provisioning_state = None diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/_hana_instances_operations.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/_hana_instances_operations.py index b4932fa45b64..2165693784cd 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/_hana_instances_operations.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/_hana_instances_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from msrest.polling import LROPoller, NoPolling from msrestazure.polling.arm_polling import ARMPolling @@ -737,91 +736,3 @@ def get_long_running_output(response): else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) shutdown.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/hanaInstances/{hanaInstanceName}/shutdown'} - - - def _enable_monitoring_initial( - self, resource_group_name, hana_instance_name, monitoring_parameter, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.enable_monitoring.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'hanaInstanceName': self._serialize.url("hana_instance_name", hana_instance_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(monitoring_parameter, 'MonitoringDetails') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def enable_monitoring( - self, resource_group_name, hana_instance_name, monitoring_parameter, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to add a monitor to an SAP HANA instance. - - :param resource_group_name: Name of the resource group. - :type resource_group_name: str - :param hana_instance_name: Name of the SAP HANA on Azure instance. - :type hana_instance_name: str - :param monitoring_parameter: Request body that only contains - monitoring attributes - :type monitoring_parameter: - ~azure.mgmt.hanaonazure.models.MonitoringDetails - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._enable_monitoring_initial( - resource_group_name=resource_group_name, - hana_instance_name=hana_instance_name, - monitoring_parameter=monitoring_parameter, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - enable_monitoring.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/hanaInstances/{hanaInstanceName}/monitoring'} diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/__init__.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/__init__.py index abd6f1bbe0d7..bc05048c8542 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/__init__.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/__init__.py @@ -14,6 +14,15 @@ from ._models_py3 import ApplicationGetEndpoint from ._models_py3 import ApplicationGetHttpsEndpoint from ._models_py3 import ApplicationProperties + from ._models_py3 import Autoscale + from ._models_py3 import AutoscaleCapacity + from ._models_py3 import AutoscaleRecurrence + from ._models_py3 import AutoscaleSchedule + from ._models_py3 import AutoscaleTimeAndCapacity + from ._models_py3 import BillingMeters + from ._models_py3 import BillingResources + from ._models_py3 import BillingResponseListResult + from ._models_py3 import CapabilitiesResult from ._models_py3 import Cluster from ._models_py3 import ClusterConfigurations from ._models_py3 import ClusterCreateParametersExtended @@ -32,6 +41,7 @@ from ._models_py3 import ComputeProfile from ._models_py3 import ConnectivityEndpoint from ._models_py3 import DataDisksGroups + from ._models_py3 import DiskBillingMeters from ._models_py3 import DiskEncryptionProperties from ._models_py3 import ErrorResponse, ErrorResponseException from ._models_py3 import Errors @@ -46,7 +56,10 @@ from ._models_py3 import OperationResource from ._models_py3 import OsProfile from ._models_py3 import ProxyResource + from ._models_py3 import QuotaCapability from ._models_py3 import QuotaInfo + from ._models_py3 import RegionalQuotaCapability + from ._models_py3 import RegionsCapability from ._models_py3 import Resource from ._models_py3 import Role from ._models_py3 import RuntimeScriptAction @@ -63,12 +76,26 @@ from ._models_py3 import UpdateGatewaySettingsParameters from ._models_py3 import Usage from ._models_py3 import UsagesListResult + from ._models_py3 import VersionsCapability + from ._models_py3 import VersionSpec from ._models_py3 import VirtualNetworkProfile + from ._models_py3 import VmSizeCompatibilityFilter + from ._models_py3 import VmSizeCompatibilityFilterV2 + from ._models_py3 import VmSizesCapability except (SyntaxError, ImportError): from ._models import Application from ._models import ApplicationGetEndpoint from ._models import ApplicationGetHttpsEndpoint from ._models import ApplicationProperties + from ._models import Autoscale + from ._models import AutoscaleCapacity + from ._models import AutoscaleRecurrence + from ._models import AutoscaleSchedule + from ._models import AutoscaleTimeAndCapacity + from ._models import BillingMeters + from ._models import BillingResources + from ._models import BillingResponseListResult + from ._models import CapabilitiesResult from ._models import Cluster from ._models import ClusterConfigurations from ._models import ClusterCreateParametersExtended @@ -87,6 +114,7 @@ from ._models import ComputeProfile from ._models import ConnectivityEndpoint from ._models import DataDisksGroups + from ._models import DiskBillingMeters from ._models import DiskEncryptionProperties from ._models import ErrorResponse, ErrorResponseException from ._models import Errors @@ -101,7 +129,10 @@ from ._models import OperationResource from ._models import OsProfile from ._models import ProxyResource + from ._models import QuotaCapability from ._models import QuotaInfo + from ._models import RegionalQuotaCapability + from ._models import RegionsCapability from ._models import Resource from ._models import Role from ._models import RuntimeScriptAction @@ -118,19 +149,26 @@ from ._models import UpdateGatewaySettingsParameters from ._models import Usage from ._models import UsagesListResult + from ._models import VersionsCapability + from ._models import VersionSpec from ._models import VirtualNetworkProfile + from ._models import VmSizeCompatibilityFilter + from ._models import VmSizeCompatibilityFilterV2 + from ._models import VmSizesCapability from ._paged_models import ApplicationPaged from ._paged_models import ClusterPaged from ._paged_models import OperationPaged from ._paged_models import RuntimeScriptActionDetailPaged from ._hd_insight_management_client_enums import ( DirectoryType, + DaysOfWeek, OSType, Tier, JsonWebKeyEncryptionAlgorithm, ResourceIdentityType, HDInsightClusterProvisioningState, AsyncOperationState, + FilterMode, ) __all__ = [ @@ -138,6 +176,15 @@ 'ApplicationGetEndpoint', 'ApplicationGetHttpsEndpoint', 'ApplicationProperties', + 'Autoscale', + 'AutoscaleCapacity', + 'AutoscaleRecurrence', + 'AutoscaleSchedule', + 'AutoscaleTimeAndCapacity', + 'BillingMeters', + 'BillingResources', + 'BillingResponseListResult', + 'CapabilitiesResult', 'Cluster', 'ClusterConfigurations', 'ClusterCreateParametersExtended', @@ -156,6 +203,7 @@ 'ComputeProfile', 'ConnectivityEndpoint', 'DataDisksGroups', + 'DiskBillingMeters', 'DiskEncryptionProperties', 'ErrorResponse', 'ErrorResponseException', 'Errors', @@ -170,7 +218,10 @@ 'OperationResource', 'OsProfile', 'ProxyResource', + 'QuotaCapability', 'QuotaInfo', + 'RegionalQuotaCapability', + 'RegionsCapability', 'Resource', 'Role', 'RuntimeScriptAction', @@ -187,16 +238,23 @@ 'UpdateGatewaySettingsParameters', 'Usage', 'UsagesListResult', + 'VersionsCapability', + 'VersionSpec', 'VirtualNetworkProfile', + 'VmSizeCompatibilityFilter', + 'VmSizeCompatibilityFilterV2', + 'VmSizesCapability', 'ClusterPaged', 'ApplicationPaged', 'RuntimeScriptActionDetailPaged', 'OperationPaged', 'DirectoryType', + 'DaysOfWeek', 'OSType', 'Tier', 'JsonWebKeyEncryptionAlgorithm', 'ResourceIdentityType', 'HDInsightClusterProvisioningState', 'AsyncOperationState', + 'FilterMode', ] diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_hd_insight_management_client_enums.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_hd_insight_management_client_enums.py index 34fee1d526d2..94a5c11f6993 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_hd_insight_management_client_enums.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_hd_insight_management_client_enums.py @@ -17,6 +17,17 @@ class DirectoryType(str, Enum): active_directory = "ActiveDirectory" +class DaysOfWeek(str, Enum): + + monday = "Monday" + tuesday = "Tuesday" + wednesday = "Wednesday" + thursday = "Thursday" + friday = "Friday" + saturday = "Saturday" + sunday = "Sunday" + + class OSType(str, Enum): windows = "Windows" @@ -58,3 +69,9 @@ class AsyncOperationState(str, Enum): in_progress = "InProgress" succeeded = "Succeeded" failed = "Failed" + + +class FilterMode(str, Enum): + + exclude = "Exclude" + include = "Include" diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models.py index 4ce307e3c6ea..5d0a85487098 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models.py @@ -154,7 +154,7 @@ class ApplicationGetHttpsEndpoint(Model): :type destination_port: int :param public_port: The public port to connect to. :type public_port: int - :param sub_domain_suffix: The subDomainSuffix of the application. + :param sub_domain_suffix: The subdomain suffix of the application. :type sub_domain_suffix: str :param disable_gateway_auth: The value indicates whether to disable GatewayAuth. @@ -250,6 +250,229 @@ def __init__(self, **kwargs): self.marketplace_identifier = None +class Autoscale(Model): + """The autoscale request parameters. + + :param capacity: Parameters for load-based autoscale + :type capacity: ~azure.mgmt.hdinsight.models.AutoscaleCapacity + :param recurrence: Parameters for schedule-based autoscale + :type recurrence: ~azure.mgmt.hdinsight.models.AutoscaleRecurrence + """ + + _attribute_map = { + 'capacity': {'key': 'capacity', 'type': 'AutoscaleCapacity'}, + 'recurrence': {'key': 'recurrence', 'type': 'AutoscaleRecurrence'}, + } + + def __init__(self, **kwargs): + super(Autoscale, self).__init__(**kwargs) + self.capacity = kwargs.get('capacity', None) + self.recurrence = kwargs.get('recurrence', None) + + +class AutoscaleCapacity(Model): + """The load-based autoscale request parameters. + + :param min_instance_count: The minimum instance count of the cluster + :type min_instance_count: int + :param max_instance_count: The maximum instance count of the cluster + :type max_instance_count: int + """ + + _attribute_map = { + 'min_instance_count': {'key': 'minInstanceCount', 'type': 'int'}, + 'max_instance_count': {'key': 'maxInstanceCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(AutoscaleCapacity, self).__init__(**kwargs) + self.min_instance_count = kwargs.get('min_instance_count', None) + self.max_instance_count = kwargs.get('max_instance_count', None) + + +class AutoscaleRecurrence(Model): + """Schedule-based autoscale request parameters. + + :param time_zone: The time zone for the autoscale schedule times + :type time_zone: str + :param schedule: Array of schedule-based autoscale rules + :type schedule: list[~azure.mgmt.hdinsight.models.AutoscaleSchedule] + """ + + _attribute_map = { + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'schedule': {'key': 'schedule', 'type': '[AutoscaleSchedule]'}, + } + + def __init__(self, **kwargs): + super(AutoscaleRecurrence, self).__init__(**kwargs) + self.time_zone = kwargs.get('time_zone', None) + self.schedule = kwargs.get('schedule', None) + + +class AutoscaleSchedule(Model): + """Parameters for a schedule-based autoscale rule, consisting of an array of + days + a time and capacity. + + :param days: Days of the week for a schedule-based autoscale rule + :type days: list[str or ~azure.mgmt.hdinsight.models.DaysOfWeek] + :param time_and_capacity: Time and capacity for a schedule-based autoscale + rule + :type time_and_capacity: + ~azure.mgmt.hdinsight.models.AutoscaleTimeAndCapacity + """ + + _attribute_map = { + 'days': {'key': 'days', 'type': '[DaysOfWeek]'}, + 'time_and_capacity': {'key': 'timeAndCapacity', 'type': 'AutoscaleTimeAndCapacity'}, + } + + def __init__(self, **kwargs): + super(AutoscaleSchedule, self).__init__(**kwargs) + self.days = kwargs.get('days', None) + self.time_and_capacity = kwargs.get('time_and_capacity', None) + + +class AutoscaleTimeAndCapacity(Model): + """Time and capacity request parameters. + + :param time: 24-hour time in the form xx:xx + :type time: str + :param min_instance_count: The minimum instance count of the cluster + :type min_instance_count: int + :param max_instance_count: The maximum instance count of the cluster + :type max_instance_count: int + """ + + _attribute_map = { + 'time': {'key': 'time', 'type': 'str'}, + 'min_instance_count': {'key': 'minInstanceCount', 'type': 'int'}, + 'max_instance_count': {'key': 'maxInstanceCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(AutoscaleTimeAndCapacity, self).__init__(**kwargs) + self.time = kwargs.get('time', None) + self.min_instance_count = kwargs.get('min_instance_count', None) + self.max_instance_count = kwargs.get('max_instance_count', None) + + +class BillingMeters(Model): + """The billing meters. + + :param meter_parameter: The virtual machine sizes. + :type meter_parameter: str + :param meter: The HDInsight meter guid. + :type meter: str + :param unit: The unit of meter, VMHours or CoreHours. + :type unit: str + """ + + _attribute_map = { + 'meter_parameter': {'key': 'meterParameter', 'type': 'str'}, + 'meter': {'key': 'meter', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BillingMeters, self).__init__(**kwargs) + self.meter_parameter = kwargs.get('meter_parameter', None) + self.meter = kwargs.get('meter', None) + self.unit = kwargs.get('unit', None) + + +class BillingResources(Model): + """The billing resources. + + :param region: The region or location. + :type region: str + :param billing_meters: The billing meter information. + :type billing_meters: list[~azure.mgmt.hdinsight.models.BillingMeters] + :param disk_billing_meters: The managed disk billing information. + :type disk_billing_meters: + list[~azure.mgmt.hdinsight.models.DiskBillingMeters] + """ + + _attribute_map = { + 'region': {'key': 'region', 'type': 'str'}, + 'billing_meters': {'key': 'billingMeters', 'type': '[BillingMeters]'}, + 'disk_billing_meters': {'key': 'diskBillingMeters', 'type': '[DiskBillingMeters]'}, + } + + def __init__(self, **kwargs): + super(BillingResources, self).__init__(**kwargs) + self.region = kwargs.get('region', None) + self.billing_meters = kwargs.get('billing_meters', None) + self.disk_billing_meters = kwargs.get('disk_billing_meters', None) + + +class BillingResponseListResult(Model): + """The response for the operation to get regional billingSpecs for a + subscription. + + :param vm_sizes: The virtual machine sizes to include or exclude. + :type vm_sizes: list[str] + :param vm_size_filters: The virtual machine filtering mode. Effectively + this can enabling or disabling the virtual machine sizes in a particular + set. + :type vm_size_filters: + list[~azure.mgmt.hdinsight.models.VmSizeCompatibilityFilterV2] + :param billing_resources: The billing and managed disk billing resources + for a region. + :type billing_resources: + list[~azure.mgmt.hdinsight.models.BillingResources] + """ + + _attribute_map = { + 'vm_sizes': {'key': 'vmSizes', 'type': '[str]'}, + 'vm_size_filters': {'key': 'vmSizeFilters', 'type': '[VmSizeCompatibilityFilterV2]'}, + 'billing_resources': {'key': 'billingResources', 'type': '[BillingResources]'}, + } + + def __init__(self, **kwargs): + super(BillingResponseListResult, self).__init__(**kwargs) + self.vm_sizes = kwargs.get('vm_sizes', None) + self.vm_size_filters = kwargs.get('vm_size_filters', None) + self.billing_resources = kwargs.get('billing_resources', None) + + +class CapabilitiesResult(Model): + """The Get Capabilities operation response. + + :param versions: The version capability. + :type versions: dict[str, ~azure.mgmt.hdinsight.models.VersionsCapability] + :param regions: The virtual machine size compatibility features. + :type regions: dict[str, ~azure.mgmt.hdinsight.models.RegionsCapability] + :param vm_sizes: The virtual machine sizes. + :type vm_sizes: dict[str, ~azure.mgmt.hdinsight.models.VmSizesCapability] + :param vm_size_filters: The virtual machine size compatibility filters. + :type vm_size_filters: + list[~azure.mgmt.hdinsight.models.VmSizeCompatibilityFilter] + :param features: The capability features. + :type features: list[str] + :param quota: The quota capability. + :type quota: ~azure.mgmt.hdinsight.models.QuotaCapability + """ + + _attribute_map = { + 'versions': {'key': 'versions', 'type': '{VersionsCapability}'}, + 'regions': {'key': 'regions', 'type': '{RegionsCapability}'}, + 'vm_sizes': {'key': 'vmSizes', 'type': '{VmSizesCapability}'}, + 'vm_size_filters': {'key': 'vmSize_filters', 'type': '[VmSizeCompatibilityFilter]'}, + 'features': {'key': 'features', 'type': '[str]'}, + 'quota': {'key': 'quota', 'type': 'QuotaCapability'}, + } + + def __init__(self, **kwargs): + super(CapabilitiesResult, self).__init__(**kwargs) + self.versions = kwargs.get('versions', None) + self.regions = kwargs.get('regions', None) + self.vm_sizes = kwargs.get('vm_sizes', None) + self.vm_size_filters = kwargs.get('vm_size_filters', None) + self.features = kwargs.get('features', None) + self.quota = kwargs.get('quota', None) + + class CloudError(Model): """CloudError. """ @@ -848,6 +1071,31 @@ def __init__(self, **kwargs): self.disk_size_gb = None +class DiskBillingMeters(Model): + """The disk billing meters. + + :param disk_rp_meter: The managed disk meter guid. + :type disk_rp_meter: str + :param sku: The managed disk billing sku, P30 or S30. + :type sku: str + :param tier: The managed disk billing tier, Standard or Premium. Possible + values include: 'Standard', 'Premium' + :type tier: str or ~azure.mgmt.hdinsight.models.Tier + """ + + _attribute_map = { + 'disk_rp_meter': {'key': 'diskRpMeter', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'Tier'}, + } + + def __init__(self, **kwargs): + super(DiskBillingMeters, self).__init__(**kwargs) + self.disk_rp_meter = kwargs.get('disk_rp_meter', None) + self.sku = kwargs.get('sku', None) + self.tier = kwargs.get('tier', None) + + class DiskEncryptionProperties(Model): """The disk encryption properties. @@ -1163,6 +1411,32 @@ def __init__(self, **kwargs): self.linux_operating_system_profile = kwargs.get('linux_operating_system_profile', None) +class QuotaCapability(Model): + """The regional quota capability. + + :param cores_used: The number of cores used in the subscription. + :type cores_used: long + :param max_cores_allowed: The number of cores that the subscription + allowed. + :type max_cores_allowed: long + :param regional_quotas: The list of region quota capabilities. + :type regional_quotas: + list[~azure.mgmt.hdinsight.models.RegionalQuotaCapability] + """ + + _attribute_map = { + 'cores_used': {'key': 'cores_used', 'type': 'long'}, + 'max_cores_allowed': {'key': 'max_cores_allowed', 'type': 'long'}, + 'regional_quotas': {'key': 'regionalQuotas', 'type': '[RegionalQuotaCapability]'}, + } + + def __init__(self, **kwargs): + super(QuotaCapability, self).__init__(**kwargs) + self.cores_used = kwargs.get('cores_used', None) + self.max_cores_allowed = kwargs.get('max_cores_allowed', None) + self.regional_quotas = kwargs.get('regional_quotas', None) + + class QuotaInfo(Model): """The quota properties for the cluster. @@ -1179,6 +1453,46 @@ def __init__(self, **kwargs): self.cores_used = kwargs.get('cores_used', None) +class RegionalQuotaCapability(Model): + """The regional quota capacity. + + :param region_name: The region name. + :type region_name: str + :param cores_used: The number of cores used in the region. + :type cores_used: long + :param cores_available: The number of cores available in the region. + :type cores_available: long + """ + + _attribute_map = { + 'region_name': {'key': 'region_name', 'type': 'str'}, + 'cores_used': {'key': 'cores_used', 'type': 'long'}, + 'cores_available': {'key': 'cores_available', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(RegionalQuotaCapability, self).__init__(**kwargs) + self.region_name = kwargs.get('region_name', None) + self.cores_used = kwargs.get('cores_used', None) + self.cores_available = kwargs.get('cores_available', None) + + +class RegionsCapability(Model): + """The regions capability. + + :param available: The list of region capabilities. + :type available: list[str] + """ + + _attribute_map = { + 'available': {'key': 'available', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(RegionsCapability, self).__init__(**kwargs) + self.available = kwargs.get('available', None) + + class Role(Model): """Describes a role on the cluster. @@ -1188,6 +1502,8 @@ class Role(Model): :type min_instance_count: int :param target_instance_count: The instance count of the cluster. :type target_instance_count: int + :param autoscale_configuration: The autoscale configurations. + :type autoscale_configuration: ~azure.mgmt.hdinsight.models.Autoscale :param hardware_profile: The hardware profile. :type hardware_profile: ~azure.mgmt.hdinsight.models.HardwareProfile :param os_profile: The operating system profile. @@ -1206,6 +1522,7 @@ class Role(Model): 'name': {'key': 'name', 'type': 'str'}, 'min_instance_count': {'key': 'minInstanceCount', 'type': 'int'}, 'target_instance_count': {'key': 'targetInstanceCount', 'type': 'int'}, + 'autoscale_configuration': {'key': 'autoscale', 'type': 'Autoscale'}, 'hardware_profile': {'key': 'hardwareProfile', 'type': 'HardwareProfile'}, 'os_profile': {'key': 'osProfile', 'type': 'OsProfile'}, 'virtual_network_profile': {'key': 'virtualNetworkProfile', 'type': 'VirtualNetworkProfile'}, @@ -1218,6 +1535,7 @@ def __init__(self, **kwargs): self.name = kwargs.get('name', None) self.min_instance_count = kwargs.get('min_instance_count', None) self.target_instance_count = kwargs.get('target_instance_count', None) + self.autoscale_configuration = kwargs.get('autoscale_configuration', None) self.hardware_profile = kwargs.get('hardware_profile', None) self.os_profile = kwargs.get('os_profile', None) self.virtual_network_profile = kwargs.get('virtual_network_profile', None) @@ -1656,6 +1974,50 @@ def __init__(self, **kwargs): self.value = kwargs.get('value', None) +class VersionsCapability(Model): + """The version capability. + + :param available: The list of version capabilities. + :type available: list[~azure.mgmt.hdinsight.models.VersionSpec] + """ + + _attribute_map = { + 'available': {'key': 'available', 'type': '[VersionSpec]'}, + } + + def __init__(self, **kwargs): + super(VersionsCapability, self).__init__(**kwargs) + self.available = kwargs.get('available', None) + + +class VersionSpec(Model): + """The version properties. + + :param friendly_name: The friendly name + :type friendly_name: str + :param display_name: The display name + :type display_name: str + :param is_default: Whether or not the version is the default version. + :type is_default: str + :param component_versions: The component version property. + :type component_versions: dict[str, str] + """ + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'is_default': {'key': 'isDefault', 'type': 'str'}, + 'component_versions': {'key': 'componentVersions', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(VersionSpec, self).__init__(**kwargs) + self.friendly_name = kwargs.get('friendly_name', None) + self.display_name = kwargs.get('display_name', None) + self.is_default = kwargs.get('is_default', None) + self.component_versions = kwargs.get('component_versions', None) + + class VirtualNetworkProfile(Model): """The virtual network properties. @@ -1674,3 +2036,104 @@ def __init__(self, **kwargs): super(VirtualNetworkProfile, self).__init__(**kwargs) self.id = kwargs.get('id', None) self.subnet = kwargs.get('subnet', None) + + +class VmSizeCompatibilityFilter(Model): + """The virtual machine type compatibility filter. + + :param filter_mode: The mode for the filter. + :type filter_mode: str + :param regions: The list of regions. + :type regions: list[str] + :param cluster_flavors: The list of cluster types available. + :type cluster_flavors: list[str] + :param node_types: The list of node types. + :type node_types: list[str] + :param cluster_versions: The list of cluster versions. + :type cluster_versions: list[str] + :param vmsizes: The list of virtual machine sizes. + :type vmsizes: list[str] + """ + + _attribute_map = { + 'filter_mode': {'key': 'FilterMode', 'type': 'str'}, + 'regions': {'key': 'Regions', 'type': '[str]'}, + 'cluster_flavors': {'key': 'ClusterFlavors', 'type': '[str]'}, + 'node_types': {'key': 'NodeTypes', 'type': '[str]'}, + 'cluster_versions': {'key': 'ClusterVersions', 'type': '[str]'}, + 'vmsizes': {'key': 'vmsizes', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VmSizeCompatibilityFilter, self).__init__(**kwargs) + self.filter_mode = kwargs.get('filter_mode', None) + self.regions = kwargs.get('regions', None) + self.cluster_flavors = kwargs.get('cluster_flavors', None) + self.node_types = kwargs.get('node_types', None) + self.cluster_versions = kwargs.get('cluster_versions', None) + self.vmsizes = kwargs.get('vmsizes', None) + + +class VmSizeCompatibilityFilterV2(Model): + """This class represent a single filter object that defines a multidimensional + set. The dimensions of this set are Regions, ClusterFlavors, NodeTypes and + ClusterVersions. The constraint should be defined based on the following: + FilterMode (Exclude vs Include), VMSizes (the vm sizes in affect of + exclusion/inclusion) and the ordering of the Filters. Later filters + override previous settings if conflicted. + + :param filter_mode: The filtering mode. Effectively this can enabling or + disabling the VM sizes in a particular set. Possible values include: + 'Exclude', 'Include' + :type filter_mode: str or ~azure.mgmt.hdinsight.models.FilterMode + :param regions: The list of regions under the effect of the filter. + :type regions: list[str] + :param cluster_flavors: The list of cluster flavors under the effect of + the filter. + :type cluster_flavors: list[str] + :param node_types: The list of node types affected by the filter. + :type node_types: list[str] + :param cluster_versions: The list of cluster versions affected in + Major.Minor format. + :type cluster_versions: list[str] + :param os_type: The OSType affected, Windows or Linux. + :type os_type: list[str or ~azure.mgmt.hdinsight.models.OSType] + :param vm_sizes: The list of virtual machine sizes to include or exclude. + :type vm_sizes: list[str] + """ + + _attribute_map = { + 'filter_mode': {'key': 'filterMode', 'type': 'str'}, + 'regions': {'key': 'regions', 'type': '[str]'}, + 'cluster_flavors': {'key': 'clusterFlavors', 'type': '[str]'}, + 'node_types': {'key': 'nodeTypes', 'type': '[str]'}, + 'cluster_versions': {'key': 'clusterVersions', 'type': '[str]'}, + 'os_type': {'key': 'osType', 'type': '[OSType]'}, + 'vm_sizes': {'key': 'vmSizes', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VmSizeCompatibilityFilterV2, self).__init__(**kwargs) + self.filter_mode = kwargs.get('filter_mode', None) + self.regions = kwargs.get('regions', None) + self.cluster_flavors = kwargs.get('cluster_flavors', None) + self.node_types = kwargs.get('node_types', None) + self.cluster_versions = kwargs.get('cluster_versions', None) + self.os_type = kwargs.get('os_type', None) + self.vm_sizes = kwargs.get('vm_sizes', None) + + +class VmSizesCapability(Model): + """The virtual machine sizes capability. + + :param available: The list of virtual machine size capabilities. + :type available: list[str] + """ + + _attribute_map = { + 'available': {'key': 'available', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VmSizesCapability, self).__init__(**kwargs) + self.available = kwargs.get('available', None) diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models_py3.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models_py3.py index bf2f96b1f39b..a43af82d227c 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models_py3.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models_py3.py @@ -154,7 +154,7 @@ class ApplicationGetHttpsEndpoint(Model): :type destination_port: int :param public_port: The public port to connect to. :type public_port: int - :param sub_domain_suffix: The subDomainSuffix of the application. + :param sub_domain_suffix: The subdomain suffix of the application. :type sub_domain_suffix: str :param disable_gateway_auth: The value indicates whether to disable GatewayAuth. @@ -250,6 +250,229 @@ def __init__(self, *, compute_profile=None, install_script_actions=None, uninsta self.marketplace_identifier = None +class Autoscale(Model): + """The autoscale request parameters. + + :param capacity: Parameters for load-based autoscale + :type capacity: ~azure.mgmt.hdinsight.models.AutoscaleCapacity + :param recurrence: Parameters for schedule-based autoscale + :type recurrence: ~azure.mgmt.hdinsight.models.AutoscaleRecurrence + """ + + _attribute_map = { + 'capacity': {'key': 'capacity', 'type': 'AutoscaleCapacity'}, + 'recurrence': {'key': 'recurrence', 'type': 'AutoscaleRecurrence'}, + } + + def __init__(self, *, capacity=None, recurrence=None, **kwargs) -> None: + super(Autoscale, self).__init__(**kwargs) + self.capacity = capacity + self.recurrence = recurrence + + +class AutoscaleCapacity(Model): + """The load-based autoscale request parameters. + + :param min_instance_count: The minimum instance count of the cluster + :type min_instance_count: int + :param max_instance_count: The maximum instance count of the cluster + :type max_instance_count: int + """ + + _attribute_map = { + 'min_instance_count': {'key': 'minInstanceCount', 'type': 'int'}, + 'max_instance_count': {'key': 'maxInstanceCount', 'type': 'int'}, + } + + def __init__(self, *, min_instance_count: int=None, max_instance_count: int=None, **kwargs) -> None: + super(AutoscaleCapacity, self).__init__(**kwargs) + self.min_instance_count = min_instance_count + self.max_instance_count = max_instance_count + + +class AutoscaleRecurrence(Model): + """Schedule-based autoscale request parameters. + + :param time_zone: The time zone for the autoscale schedule times + :type time_zone: str + :param schedule: Array of schedule-based autoscale rules + :type schedule: list[~azure.mgmt.hdinsight.models.AutoscaleSchedule] + """ + + _attribute_map = { + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'schedule': {'key': 'schedule', 'type': '[AutoscaleSchedule]'}, + } + + def __init__(self, *, time_zone: str=None, schedule=None, **kwargs) -> None: + super(AutoscaleRecurrence, self).__init__(**kwargs) + self.time_zone = time_zone + self.schedule = schedule + + +class AutoscaleSchedule(Model): + """Parameters for a schedule-based autoscale rule, consisting of an array of + days + a time and capacity. + + :param days: Days of the week for a schedule-based autoscale rule + :type days: list[str or ~azure.mgmt.hdinsight.models.DaysOfWeek] + :param time_and_capacity: Time and capacity for a schedule-based autoscale + rule + :type time_and_capacity: + ~azure.mgmt.hdinsight.models.AutoscaleTimeAndCapacity + """ + + _attribute_map = { + 'days': {'key': 'days', 'type': '[DaysOfWeek]'}, + 'time_and_capacity': {'key': 'timeAndCapacity', 'type': 'AutoscaleTimeAndCapacity'}, + } + + def __init__(self, *, days=None, time_and_capacity=None, **kwargs) -> None: + super(AutoscaleSchedule, self).__init__(**kwargs) + self.days = days + self.time_and_capacity = time_and_capacity + + +class AutoscaleTimeAndCapacity(Model): + """Time and capacity request parameters. + + :param time: 24-hour time in the form xx:xx + :type time: str + :param min_instance_count: The minimum instance count of the cluster + :type min_instance_count: int + :param max_instance_count: The maximum instance count of the cluster + :type max_instance_count: int + """ + + _attribute_map = { + 'time': {'key': 'time', 'type': 'str'}, + 'min_instance_count': {'key': 'minInstanceCount', 'type': 'int'}, + 'max_instance_count': {'key': 'maxInstanceCount', 'type': 'int'}, + } + + def __init__(self, *, time: str=None, min_instance_count: int=None, max_instance_count: int=None, **kwargs) -> None: + super(AutoscaleTimeAndCapacity, self).__init__(**kwargs) + self.time = time + self.min_instance_count = min_instance_count + self.max_instance_count = max_instance_count + + +class BillingMeters(Model): + """The billing meters. + + :param meter_parameter: The virtual machine sizes. + :type meter_parameter: str + :param meter: The HDInsight meter guid. + :type meter: str + :param unit: The unit of meter, VMHours or CoreHours. + :type unit: str + """ + + _attribute_map = { + 'meter_parameter': {'key': 'meterParameter', 'type': 'str'}, + 'meter': {'key': 'meter', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, *, meter_parameter: str=None, meter: str=None, unit: str=None, **kwargs) -> None: + super(BillingMeters, self).__init__(**kwargs) + self.meter_parameter = meter_parameter + self.meter = meter + self.unit = unit + + +class BillingResources(Model): + """The billing resources. + + :param region: The region or location. + :type region: str + :param billing_meters: The billing meter information. + :type billing_meters: list[~azure.mgmt.hdinsight.models.BillingMeters] + :param disk_billing_meters: The managed disk billing information. + :type disk_billing_meters: + list[~azure.mgmt.hdinsight.models.DiskBillingMeters] + """ + + _attribute_map = { + 'region': {'key': 'region', 'type': 'str'}, + 'billing_meters': {'key': 'billingMeters', 'type': '[BillingMeters]'}, + 'disk_billing_meters': {'key': 'diskBillingMeters', 'type': '[DiskBillingMeters]'}, + } + + def __init__(self, *, region: str=None, billing_meters=None, disk_billing_meters=None, **kwargs) -> None: + super(BillingResources, self).__init__(**kwargs) + self.region = region + self.billing_meters = billing_meters + self.disk_billing_meters = disk_billing_meters + + +class BillingResponseListResult(Model): + """The response for the operation to get regional billingSpecs for a + subscription. + + :param vm_sizes: The virtual machine sizes to include or exclude. + :type vm_sizes: list[str] + :param vm_size_filters: The virtual machine filtering mode. Effectively + this can enabling or disabling the virtual machine sizes in a particular + set. + :type vm_size_filters: + list[~azure.mgmt.hdinsight.models.VmSizeCompatibilityFilterV2] + :param billing_resources: The billing and managed disk billing resources + for a region. + :type billing_resources: + list[~azure.mgmt.hdinsight.models.BillingResources] + """ + + _attribute_map = { + 'vm_sizes': {'key': 'vmSizes', 'type': '[str]'}, + 'vm_size_filters': {'key': 'vmSizeFilters', 'type': '[VmSizeCompatibilityFilterV2]'}, + 'billing_resources': {'key': 'billingResources', 'type': '[BillingResources]'}, + } + + def __init__(self, *, vm_sizes=None, vm_size_filters=None, billing_resources=None, **kwargs) -> None: + super(BillingResponseListResult, self).__init__(**kwargs) + self.vm_sizes = vm_sizes + self.vm_size_filters = vm_size_filters + self.billing_resources = billing_resources + + +class CapabilitiesResult(Model): + """The Get Capabilities operation response. + + :param versions: The version capability. + :type versions: dict[str, ~azure.mgmt.hdinsight.models.VersionsCapability] + :param regions: The virtual machine size compatibility features. + :type regions: dict[str, ~azure.mgmt.hdinsight.models.RegionsCapability] + :param vm_sizes: The virtual machine sizes. + :type vm_sizes: dict[str, ~azure.mgmt.hdinsight.models.VmSizesCapability] + :param vm_size_filters: The virtual machine size compatibility filters. + :type vm_size_filters: + list[~azure.mgmt.hdinsight.models.VmSizeCompatibilityFilter] + :param features: The capability features. + :type features: list[str] + :param quota: The quota capability. + :type quota: ~azure.mgmt.hdinsight.models.QuotaCapability + """ + + _attribute_map = { + 'versions': {'key': 'versions', 'type': '{VersionsCapability}'}, + 'regions': {'key': 'regions', 'type': '{RegionsCapability}'}, + 'vm_sizes': {'key': 'vmSizes', 'type': '{VmSizesCapability}'}, + 'vm_size_filters': {'key': 'vmSize_filters', 'type': '[VmSizeCompatibilityFilter]'}, + 'features': {'key': 'features', 'type': '[str]'}, + 'quota': {'key': 'quota', 'type': 'QuotaCapability'}, + } + + def __init__(self, *, versions=None, regions=None, vm_sizes=None, vm_size_filters=None, features=None, quota=None, **kwargs) -> None: + super(CapabilitiesResult, self).__init__(**kwargs) + self.versions = versions + self.regions = regions + self.vm_sizes = vm_sizes + self.vm_size_filters = vm_size_filters + self.features = features + self.quota = quota + + class CloudError(Model): """CloudError. """ @@ -848,6 +1071,31 @@ def __init__(self, *, disks_per_node: int=None, **kwargs) -> None: self.disk_size_gb = None +class DiskBillingMeters(Model): + """The disk billing meters. + + :param disk_rp_meter: The managed disk meter guid. + :type disk_rp_meter: str + :param sku: The managed disk billing sku, P30 or S30. + :type sku: str + :param tier: The managed disk billing tier, Standard or Premium. Possible + values include: 'Standard', 'Premium' + :type tier: str or ~azure.mgmt.hdinsight.models.Tier + """ + + _attribute_map = { + 'disk_rp_meter': {'key': 'diskRpMeter', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'Tier'}, + } + + def __init__(self, *, disk_rp_meter: str=None, sku: str=None, tier=None, **kwargs) -> None: + super(DiskBillingMeters, self).__init__(**kwargs) + self.disk_rp_meter = disk_rp_meter + self.sku = sku + self.tier = tier + + class DiskEncryptionProperties(Model): """The disk encryption properties. @@ -1163,6 +1411,32 @@ def __init__(self, *, linux_operating_system_profile=None, **kwargs) -> None: self.linux_operating_system_profile = linux_operating_system_profile +class QuotaCapability(Model): + """The regional quota capability. + + :param cores_used: The number of cores used in the subscription. + :type cores_used: long + :param max_cores_allowed: The number of cores that the subscription + allowed. + :type max_cores_allowed: long + :param regional_quotas: The list of region quota capabilities. + :type regional_quotas: + list[~azure.mgmt.hdinsight.models.RegionalQuotaCapability] + """ + + _attribute_map = { + 'cores_used': {'key': 'cores_used', 'type': 'long'}, + 'max_cores_allowed': {'key': 'max_cores_allowed', 'type': 'long'}, + 'regional_quotas': {'key': 'regionalQuotas', 'type': '[RegionalQuotaCapability]'}, + } + + def __init__(self, *, cores_used: int=None, max_cores_allowed: int=None, regional_quotas=None, **kwargs) -> None: + super(QuotaCapability, self).__init__(**kwargs) + self.cores_used = cores_used + self.max_cores_allowed = max_cores_allowed + self.regional_quotas = regional_quotas + + class QuotaInfo(Model): """The quota properties for the cluster. @@ -1179,6 +1453,46 @@ def __init__(self, *, cores_used: int=None, **kwargs) -> None: self.cores_used = cores_used +class RegionalQuotaCapability(Model): + """The regional quota capacity. + + :param region_name: The region name. + :type region_name: str + :param cores_used: The number of cores used in the region. + :type cores_used: long + :param cores_available: The number of cores available in the region. + :type cores_available: long + """ + + _attribute_map = { + 'region_name': {'key': 'region_name', 'type': 'str'}, + 'cores_used': {'key': 'cores_used', 'type': 'long'}, + 'cores_available': {'key': 'cores_available', 'type': 'long'}, + } + + def __init__(self, *, region_name: str=None, cores_used: int=None, cores_available: int=None, **kwargs) -> None: + super(RegionalQuotaCapability, self).__init__(**kwargs) + self.region_name = region_name + self.cores_used = cores_used + self.cores_available = cores_available + + +class RegionsCapability(Model): + """The regions capability. + + :param available: The list of region capabilities. + :type available: list[str] + """ + + _attribute_map = { + 'available': {'key': 'available', 'type': '[str]'}, + } + + def __init__(self, *, available=None, **kwargs) -> None: + super(RegionsCapability, self).__init__(**kwargs) + self.available = available + + class Role(Model): """Describes a role on the cluster. @@ -1188,6 +1502,8 @@ class Role(Model): :type min_instance_count: int :param target_instance_count: The instance count of the cluster. :type target_instance_count: int + :param autoscale_configuration: The autoscale configurations. + :type autoscale_configuration: ~azure.mgmt.hdinsight.models.Autoscale :param hardware_profile: The hardware profile. :type hardware_profile: ~azure.mgmt.hdinsight.models.HardwareProfile :param os_profile: The operating system profile. @@ -1206,6 +1522,7 @@ class Role(Model): 'name': {'key': 'name', 'type': 'str'}, 'min_instance_count': {'key': 'minInstanceCount', 'type': 'int'}, 'target_instance_count': {'key': 'targetInstanceCount', 'type': 'int'}, + 'autoscale_configuration': {'key': 'autoscale', 'type': 'Autoscale'}, 'hardware_profile': {'key': 'hardwareProfile', 'type': 'HardwareProfile'}, 'os_profile': {'key': 'osProfile', 'type': 'OsProfile'}, 'virtual_network_profile': {'key': 'virtualNetworkProfile', 'type': 'VirtualNetworkProfile'}, @@ -1213,11 +1530,12 @@ class Role(Model): 'script_actions': {'key': 'scriptActions', 'type': '[ScriptAction]'}, } - def __init__(self, *, name: str=None, min_instance_count: int=None, target_instance_count: int=None, hardware_profile=None, os_profile=None, virtual_network_profile=None, data_disks_groups=None, script_actions=None, **kwargs) -> None: + def __init__(self, *, name: str=None, min_instance_count: int=None, target_instance_count: int=None, autoscale_configuration=None, hardware_profile=None, os_profile=None, virtual_network_profile=None, data_disks_groups=None, script_actions=None, **kwargs) -> None: super(Role, self).__init__(**kwargs) self.name = name self.min_instance_count = min_instance_count self.target_instance_count = target_instance_count + self.autoscale_configuration = autoscale_configuration self.hardware_profile = hardware_profile self.os_profile = os_profile self.virtual_network_profile = virtual_network_profile @@ -1656,6 +1974,50 @@ def __init__(self, *, value=None, **kwargs) -> None: self.value = value +class VersionsCapability(Model): + """The version capability. + + :param available: The list of version capabilities. + :type available: list[~azure.mgmt.hdinsight.models.VersionSpec] + """ + + _attribute_map = { + 'available': {'key': 'available', 'type': '[VersionSpec]'}, + } + + def __init__(self, *, available=None, **kwargs) -> None: + super(VersionsCapability, self).__init__(**kwargs) + self.available = available + + +class VersionSpec(Model): + """The version properties. + + :param friendly_name: The friendly name + :type friendly_name: str + :param display_name: The display name + :type display_name: str + :param is_default: Whether or not the version is the default version. + :type is_default: str + :param component_versions: The component version property. + :type component_versions: dict[str, str] + """ + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'is_default': {'key': 'isDefault', 'type': 'str'}, + 'component_versions': {'key': 'componentVersions', 'type': '{str}'}, + } + + def __init__(self, *, friendly_name: str=None, display_name: str=None, is_default: str=None, component_versions=None, **kwargs) -> None: + super(VersionSpec, self).__init__(**kwargs) + self.friendly_name = friendly_name + self.display_name = display_name + self.is_default = is_default + self.component_versions = component_versions + + class VirtualNetworkProfile(Model): """The virtual network properties. @@ -1674,3 +2036,104 @@ def __init__(self, *, id: str=None, subnet: str=None, **kwargs) -> None: super(VirtualNetworkProfile, self).__init__(**kwargs) self.id = id self.subnet = subnet + + +class VmSizeCompatibilityFilter(Model): + """The virtual machine type compatibility filter. + + :param filter_mode: The mode for the filter. + :type filter_mode: str + :param regions: The list of regions. + :type regions: list[str] + :param cluster_flavors: The list of cluster types available. + :type cluster_flavors: list[str] + :param node_types: The list of node types. + :type node_types: list[str] + :param cluster_versions: The list of cluster versions. + :type cluster_versions: list[str] + :param vmsizes: The list of virtual machine sizes. + :type vmsizes: list[str] + """ + + _attribute_map = { + 'filter_mode': {'key': 'FilterMode', 'type': 'str'}, + 'regions': {'key': 'Regions', 'type': '[str]'}, + 'cluster_flavors': {'key': 'ClusterFlavors', 'type': '[str]'}, + 'node_types': {'key': 'NodeTypes', 'type': '[str]'}, + 'cluster_versions': {'key': 'ClusterVersions', 'type': '[str]'}, + 'vmsizes': {'key': 'vmsizes', 'type': '[str]'}, + } + + def __init__(self, *, filter_mode: str=None, regions=None, cluster_flavors=None, node_types=None, cluster_versions=None, vmsizes=None, **kwargs) -> None: + super(VmSizeCompatibilityFilter, self).__init__(**kwargs) + self.filter_mode = filter_mode + self.regions = regions + self.cluster_flavors = cluster_flavors + self.node_types = node_types + self.cluster_versions = cluster_versions + self.vmsizes = vmsizes + + +class VmSizeCompatibilityFilterV2(Model): + """This class represent a single filter object that defines a multidimensional + set. The dimensions of this set are Regions, ClusterFlavors, NodeTypes and + ClusterVersions. The constraint should be defined based on the following: + FilterMode (Exclude vs Include), VMSizes (the vm sizes in affect of + exclusion/inclusion) and the ordering of the Filters. Later filters + override previous settings if conflicted. + + :param filter_mode: The filtering mode. Effectively this can enabling or + disabling the VM sizes in a particular set. Possible values include: + 'Exclude', 'Include' + :type filter_mode: str or ~azure.mgmt.hdinsight.models.FilterMode + :param regions: The list of regions under the effect of the filter. + :type regions: list[str] + :param cluster_flavors: The list of cluster flavors under the effect of + the filter. + :type cluster_flavors: list[str] + :param node_types: The list of node types affected by the filter. + :type node_types: list[str] + :param cluster_versions: The list of cluster versions affected in + Major.Minor format. + :type cluster_versions: list[str] + :param os_type: The OSType affected, Windows or Linux. + :type os_type: list[str or ~azure.mgmt.hdinsight.models.OSType] + :param vm_sizes: The list of virtual machine sizes to include or exclude. + :type vm_sizes: list[str] + """ + + _attribute_map = { + 'filter_mode': {'key': 'filterMode', 'type': 'str'}, + 'regions': {'key': 'regions', 'type': '[str]'}, + 'cluster_flavors': {'key': 'clusterFlavors', 'type': '[str]'}, + 'node_types': {'key': 'nodeTypes', 'type': '[str]'}, + 'cluster_versions': {'key': 'clusterVersions', 'type': '[str]'}, + 'os_type': {'key': 'osType', 'type': '[OSType]'}, + 'vm_sizes': {'key': 'vmSizes', 'type': '[str]'}, + } + + def __init__(self, *, filter_mode=None, regions=None, cluster_flavors=None, node_types=None, cluster_versions=None, os_type=None, vm_sizes=None, **kwargs) -> None: + super(VmSizeCompatibilityFilterV2, self).__init__(**kwargs) + self.filter_mode = filter_mode + self.regions = regions + self.cluster_flavors = cluster_flavors + self.node_types = node_types + self.cluster_versions = cluster_versions + self.os_type = os_type + self.vm_sizes = vm_sizes + + +class VmSizesCapability(Model): + """The virtual machine sizes capability. + + :param available: The list of virtual machine size capabilities. + :type available: list[str] + """ + + _attribute_map = { + 'available': {'key': 'available', 'type': '[str]'}, + } + + def __init__(self, *, available=None, **kwargs) -> None: + super(VmSizesCapability, self).__init__(**kwargs) + self.available = available diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_locations_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_locations_operations.py index 172ea365b2ee..3c9b45ec033d 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_locations_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_locations_operations.py @@ -38,11 +38,70 @@ def __init__(self, client, config, serializer, deserializer): self.config = config + def get_capabilities( + self, location, custom_headers=None, raw=False, **operation_config): + """Gets the capabilities for the specified location. + + :param location: The Azure location (region) for which to make the + request. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CapabilitiesResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.hdinsight.models.CapabilitiesResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_capabilities.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CapabilitiesResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_capabilities.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/capabilities'} + def list_usages( self, location, custom_headers=None, raw=False, **operation_config): """Lists the usages for the specified location. - :param location: The location to get capabilities for. + :param location: The Azure location (region) for which to make the + request. :type location: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -94,3 +153,61 @@ def list_usages( return deserialized list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/usages'} + + def list_billing_specs( + self, location, custom_headers=None, raw=False, **operation_config): + """Lists the billingSpecs for the specified subscription and location. + + :param location: The Azure location (region) for which to make the + request. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BillingResponseListResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.hdinsight.models.BillingResponseListResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_billing_specs.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BillingResponseListResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_billing_specs.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/billingSpecs'} diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/__init__.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/__init__.py index 91289650718f..867dea34192d 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/__init__.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .iot_hub_client import IotHubClient -from .version import VERSION +from ._configuration import IotHubClientConfiguration +from ._iot_hub_client import IotHubClient +__all__ = ['IotHubClient', 'IotHubClientConfiguration'] -__all__ = ['IotHubClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_configuration.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_configuration.py new file mode 100644 index 000000000000..b2e8885bcfe2 --- /dev/null +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_configuration.py @@ -0,0 +1,48 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class IotHubClientConfiguration(AzureConfiguration): + """Configuration for IotHubClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The subscription identifier. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(IotHubClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-iothub/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_iot_hub_client.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_iot_hub_client.py new file mode 100644 index 000000000000..fbe07e66cddc --- /dev/null +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_iot_hub_client.py @@ -0,0 +1,69 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import IotHubClientConfiguration +from .operations import Operations +from .operations import IotHubResourceOperations +from .operations import ResourceProviderCommonOperations +from .operations import CertificatesOperations +from .operations import IotHubOperations +from . import models + + +class IotHubClient(SDKClient): + """Use this API to manage the IoT hubs in your Azure subscription. + + :ivar config: Configuration for client. + :vartype config: IotHubClientConfiguration + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.iothub.operations.Operations + :ivar iot_hub_resource: IotHubResource operations + :vartype iot_hub_resource: azure.mgmt.iothub.operations.IotHubResourceOperations + :ivar resource_provider_common: ResourceProviderCommon operations + :vartype resource_provider_common: azure.mgmt.iothub.operations.ResourceProviderCommonOperations + :ivar certificates: Certificates operations + :vartype certificates: azure.mgmt.iothub.operations.CertificatesOperations + :ivar iot_hub: IotHub operations + :vartype iot_hub: azure.mgmt.iothub.operations.IotHubOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The subscription identifier. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = IotHubClientConfiguration(credentials, subscription_id, base_url) + super(IotHubClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2019-03-22-preview' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.iot_hub_resource = IotHubResourceOperations( + self._client, self.config, self._serialize, self._deserialize) + self.resource_provider_common = ResourceProviderCommonOperations( + self._client, self.config, self._serialize, self._deserialize) + self.certificates = CertificatesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.iot_hub = IotHubOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/iot_hub_client.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/iot_hub_client.py deleted file mode 100644 index 1c78a95c60c8..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/iot_hub_client.py +++ /dev/null @@ -1,101 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.operations import Operations -from .operations.iot_hub_resource_operations import IotHubResourceOperations -from .operations.resource_provider_common_operations import ResourceProviderCommonOperations -from .operations.certificates_operations import CertificatesOperations -from .operations.iot_hub_operations import IotHubOperations -from . import models - - -class IotHubClientConfiguration(AzureConfiguration): - """Configuration for IotHubClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The subscription identifier. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(IotHubClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-iothub/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class IotHubClient(SDKClient): - """Use this API to manage the IoT hubs in your Azure subscription. - - :ivar config: Configuration for client. - :vartype config: IotHubClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.iothub.operations.Operations - :ivar iot_hub_resource: IotHubResource operations - :vartype iot_hub_resource: azure.mgmt.iothub.operations.IotHubResourceOperations - :ivar resource_provider_common: ResourceProviderCommon operations - :vartype resource_provider_common: azure.mgmt.iothub.operations.ResourceProviderCommonOperations - :ivar certificates: Certificates operations - :vartype certificates: azure.mgmt.iothub.operations.CertificatesOperations - :ivar iot_hub: IotHub operations - :vartype iot_hub: azure.mgmt.iothub.operations.IotHubOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The subscription identifier. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = IotHubClientConfiguration(credentials, subscription_id, base_url) - super(IotHubClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2019-03-22-preview' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.iot_hub_resource = IotHubResourceOperations( - self._client, self.config, self._serialize, self._deserialize) - self.resource_provider_common = ResourceProviderCommonOperations( - self._client, self.config, self._serialize, self._deserialize) - self.certificates = CertificatesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.iot_hub = IotHubOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/__init__.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/__init__.py index c5b6000fbe1c..855c564865d3 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/__init__.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/__init__.py @@ -10,138 +10,141 @@ # -------------------------------------------------------------------------- try: - from .certificate_verification_description_py3 import CertificateVerificationDescription - from .certificate_properties_py3 import CertificateProperties - from .certificate_description_py3 import CertificateDescription - from .certificate_list_description_py3 import CertificateListDescription - from .certificate_body_description_py3 import CertificateBodyDescription - from .certificate_properties_with_nonce_py3 import CertificatePropertiesWithNonce - from .certificate_with_nonce_description_py3 import CertificateWithNonceDescription - from .shared_access_signature_authorization_rule_py3 import SharedAccessSignatureAuthorizationRule - from .ip_filter_rule_py3 import IpFilterRule - from .event_hub_properties_py3 import EventHubProperties - from .routing_service_bus_queue_endpoint_properties_py3 import RoutingServiceBusQueueEndpointProperties - from .routing_service_bus_topic_endpoint_properties_py3 import RoutingServiceBusTopicEndpointProperties - from .routing_event_hub_properties_py3 import RoutingEventHubProperties - from .routing_storage_container_properties_py3 import RoutingStorageContainerProperties - from .routing_endpoints_py3 import RoutingEndpoints - from .route_properties_py3 import RouteProperties - from .fallback_route_properties_py3 import FallbackRouteProperties - from .enrichment_properties_py3 import EnrichmentProperties - from .routing_properties_py3 import RoutingProperties - from .storage_endpoint_properties_py3 import StorageEndpointProperties - from .messaging_endpoint_properties_py3 import MessagingEndpointProperties - from .feedback_properties_py3 import FeedbackProperties - from .cloud_to_device_properties_py3 import CloudToDeviceProperties - from .iot_hub_properties_device_streams_py3 import IotHubPropertiesDeviceStreams - from .iot_hub_properties_py3 import IotHubProperties - from .iot_hub_sku_info_py3 import IotHubSkuInfo - from .iot_hub_description_py3 import IotHubDescription - from .resource_py3 import Resource - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .error_details_py3 import ErrorDetails, ErrorDetailsException - from .iot_hub_quota_metric_info_py3 import IotHubQuotaMetricInfo - from .endpoint_health_data_py3 import EndpointHealthData - from .registry_statistics_py3 import RegistryStatistics - from .job_response_py3 import JobResponse - from .iot_hub_capacity_py3 import IotHubCapacity - from .iot_hub_sku_description_py3 import IotHubSkuDescription - from .tags_resource_py3 import TagsResource - from .event_hub_consumer_group_info_py3 import EventHubConsumerGroupInfo - from .operation_inputs_py3 import OperationInputs - from .iot_hub_name_availability_info_py3 import IotHubNameAvailabilityInfo - from .name_py3 import Name - from .user_subscription_quota_py3 import UserSubscriptionQuota - from .user_subscription_quota_list_result_py3 import UserSubscriptionQuotaListResult - from .routing_message_py3 import RoutingMessage - from .routing_twin_properties_py3 import RoutingTwinProperties - from .routing_twin_py3 import RoutingTwin - from .test_all_routes_input_py3 import TestAllRoutesInput - from .matched_route_py3 import MatchedRoute - from .test_all_routes_result_py3 import TestAllRoutesResult - from .test_route_input_py3 import TestRouteInput - from .route_error_position_py3 import RouteErrorPosition - from .route_error_range_py3 import RouteErrorRange - from .route_compilation_error_py3 import RouteCompilationError - from .test_route_result_details_py3 import TestRouteResultDetails - from .test_route_result_py3 import TestRouteResult - from .export_devices_request_py3 import ExportDevicesRequest - from .import_devices_request_py3 import ImportDevicesRequest - from .failover_input_py3 import FailoverInput + from ._models_py3 import CertificateBodyDescription + from ._models_py3 import CertificateDescription + from ._models_py3 import CertificateListDescription + from ._models_py3 import CertificateProperties + from ._models_py3 import CertificatePropertiesWithNonce + from ._models_py3 import CertificateVerificationDescription + from ._models_py3 import CertificateWithNonceDescription + from ._models_py3 import CloudToDeviceProperties + from ._models_py3 import EndpointHealthData + from ._models_py3 import EnrichmentProperties + from ._models_py3 import ErrorDetails, ErrorDetailsException + from ._models_py3 import EventHubConsumerGroupInfo + from ._models_py3 import EventHubProperties + from ._models_py3 import ExportDevicesRequest + from ._models_py3 import FailoverInput + from ._models_py3 import FallbackRouteProperties + from ._models_py3 import FeedbackProperties + from ._models_py3 import ImportDevicesRequest + from ._models_py3 import IotHubCapacity + from ._models_py3 import IotHubDescription + from ._models_py3 import IotHubLocationDescription + from ._models_py3 import IotHubNameAvailabilityInfo + from ._models_py3 import IotHubProperties + from ._models_py3 import IotHubPropertiesDeviceStreams + from ._models_py3 import IotHubQuotaMetricInfo + from ._models_py3 import IotHubSkuDescription + from ._models_py3 import IotHubSkuInfo + from ._models_py3 import IpFilterRule + from ._models_py3 import JobResponse + from ._models_py3 import MatchedRoute + from ._models_py3 import MessagingEndpointProperties + from ._models_py3 import Name + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import OperationInputs + from ._models_py3 import RegistryStatistics + from ._models_py3 import Resource + from ._models_py3 import RouteCompilationError + from ._models_py3 import RouteErrorPosition + from ._models_py3 import RouteErrorRange + from ._models_py3 import RouteProperties + from ._models_py3 import RoutingEndpoints + from ._models_py3 import RoutingEventHubProperties + from ._models_py3 import RoutingMessage + from ._models_py3 import RoutingProperties + from ._models_py3 import RoutingServiceBusQueueEndpointProperties + from ._models_py3 import RoutingServiceBusTopicEndpointProperties + from ._models_py3 import RoutingStorageContainerProperties + from ._models_py3 import RoutingTwin + from ._models_py3 import RoutingTwinProperties + from ._models_py3 import SharedAccessSignatureAuthorizationRule + from ._models_py3 import StorageEndpointProperties + from ._models_py3 import TagsResource + from ._models_py3 import TestAllRoutesInput + from ._models_py3 import TestAllRoutesResult + from ._models_py3 import TestRouteInput + from ._models_py3 import TestRouteResult + from ._models_py3 import TestRouteResultDetails + from ._models_py3 import UserSubscriptionQuota + from ._models_py3 import UserSubscriptionQuotaListResult except (SyntaxError, ImportError): - from .certificate_verification_description import CertificateVerificationDescription - from .certificate_properties import CertificateProperties - from .certificate_description import CertificateDescription - from .certificate_list_description import CertificateListDescription - from .certificate_body_description import CertificateBodyDescription - from .certificate_properties_with_nonce import CertificatePropertiesWithNonce - from .certificate_with_nonce_description import CertificateWithNonceDescription - from .shared_access_signature_authorization_rule import SharedAccessSignatureAuthorizationRule - from .ip_filter_rule import IpFilterRule - from .event_hub_properties import EventHubProperties - from .routing_service_bus_queue_endpoint_properties import RoutingServiceBusQueueEndpointProperties - from .routing_service_bus_topic_endpoint_properties import RoutingServiceBusTopicEndpointProperties - from .routing_event_hub_properties import RoutingEventHubProperties - from .routing_storage_container_properties import RoutingStorageContainerProperties - from .routing_endpoints import RoutingEndpoints - from .route_properties import RouteProperties - from .fallback_route_properties import FallbackRouteProperties - from .enrichment_properties import EnrichmentProperties - from .routing_properties import RoutingProperties - from .storage_endpoint_properties import StorageEndpointProperties - from .messaging_endpoint_properties import MessagingEndpointProperties - from .feedback_properties import FeedbackProperties - from .cloud_to_device_properties import CloudToDeviceProperties - from .iot_hub_properties_device_streams import IotHubPropertiesDeviceStreams - from .iot_hub_properties import IotHubProperties - from .iot_hub_sku_info import IotHubSkuInfo - from .iot_hub_description import IotHubDescription - from .resource import Resource - from .operation_display import OperationDisplay - from .operation import Operation - from .error_details import ErrorDetails, ErrorDetailsException - from .iot_hub_quota_metric_info import IotHubQuotaMetricInfo - from .endpoint_health_data import EndpointHealthData - from .registry_statistics import RegistryStatistics - from .job_response import JobResponse - from .iot_hub_capacity import IotHubCapacity - from .iot_hub_sku_description import IotHubSkuDescription - from .tags_resource import TagsResource - from .event_hub_consumer_group_info import EventHubConsumerGroupInfo - from .operation_inputs import OperationInputs - from .iot_hub_name_availability_info import IotHubNameAvailabilityInfo - from .name import Name - from .user_subscription_quota import UserSubscriptionQuota - from .user_subscription_quota_list_result import UserSubscriptionQuotaListResult - from .routing_message import RoutingMessage - from .routing_twin_properties import RoutingTwinProperties - from .routing_twin import RoutingTwin - from .test_all_routes_input import TestAllRoutesInput - from .matched_route import MatchedRoute - from .test_all_routes_result import TestAllRoutesResult - from .test_route_input import TestRouteInput - from .route_error_position import RouteErrorPosition - from .route_error_range import RouteErrorRange - from .route_compilation_error import RouteCompilationError - from .test_route_result_details import TestRouteResultDetails - from .test_route_result import TestRouteResult - from .export_devices_request import ExportDevicesRequest - from .import_devices_request import ImportDevicesRequest - from .failover_input import FailoverInput -from .operation_paged import OperationPaged -from .iot_hub_description_paged import IotHubDescriptionPaged -from .iot_hub_sku_description_paged import IotHubSkuDescriptionPaged -from .event_hub_consumer_group_info_paged import EventHubConsumerGroupInfoPaged -from .job_response_paged import JobResponsePaged -from .iot_hub_quota_metric_info_paged import IotHubQuotaMetricInfoPaged -from .endpoint_health_data_paged import EndpointHealthDataPaged -from .shared_access_signature_authorization_rule_paged import SharedAccessSignatureAuthorizationRulePaged -from .iot_hub_client_enums import ( + from ._models import CertificateBodyDescription + from ._models import CertificateDescription + from ._models import CertificateListDescription + from ._models import CertificateProperties + from ._models import CertificatePropertiesWithNonce + from ._models import CertificateVerificationDescription + from ._models import CertificateWithNonceDescription + from ._models import CloudToDeviceProperties + from ._models import EndpointHealthData + from ._models import EnrichmentProperties + from ._models import ErrorDetails, ErrorDetailsException + from ._models import EventHubConsumerGroupInfo + from ._models import EventHubProperties + from ._models import ExportDevicesRequest + from ._models import FailoverInput + from ._models import FallbackRouteProperties + from ._models import FeedbackProperties + from ._models import ImportDevicesRequest + from ._models import IotHubCapacity + from ._models import IotHubDescription + from ._models import IotHubLocationDescription + from ._models import IotHubNameAvailabilityInfo + from ._models import IotHubProperties + from ._models import IotHubPropertiesDeviceStreams + from ._models import IotHubQuotaMetricInfo + from ._models import IotHubSkuDescription + from ._models import IotHubSkuInfo + from ._models import IpFilterRule + from ._models import JobResponse + from ._models import MatchedRoute + from ._models import MessagingEndpointProperties + from ._models import Name + from ._models import Operation + from ._models import OperationDisplay + from ._models import OperationInputs + from ._models import RegistryStatistics + from ._models import Resource + from ._models import RouteCompilationError + from ._models import RouteErrorPosition + from ._models import RouteErrorRange + from ._models import RouteProperties + from ._models import RoutingEndpoints + from ._models import RoutingEventHubProperties + from ._models import RoutingMessage + from ._models import RoutingProperties + from ._models import RoutingServiceBusQueueEndpointProperties + from ._models import RoutingServiceBusTopicEndpointProperties + from ._models import RoutingStorageContainerProperties + from ._models import RoutingTwin + from ._models import RoutingTwinProperties + from ._models import SharedAccessSignatureAuthorizationRule + from ._models import StorageEndpointProperties + from ._models import TagsResource + from ._models import TestAllRoutesInput + from ._models import TestAllRoutesResult + from ._models import TestRouteInput + from ._models import TestRouteResult + from ._models import TestRouteResultDetails + from ._models import UserSubscriptionQuota + from ._models import UserSubscriptionQuotaListResult +from ._paged_models import EndpointHealthDataPaged +from ._paged_models import EventHubConsumerGroupInfoPaged +from ._paged_models import IotHubDescriptionPaged +from ._paged_models import IotHubQuotaMetricInfoPaged +from ._paged_models import IotHubSkuDescriptionPaged +from ._paged_models import JobResponsePaged +from ._paged_models import OperationPaged +from ._paged_models import SharedAccessSignatureAuthorizationRulePaged +from ._iot_hub_client_enums import ( AccessRights, IpFilterActionType, RoutingSource, Capabilities, + IotHubReplicaRoleType, IotHubSku, IotHubSkuTier, EndpointHealthStatus, @@ -154,65 +157,66 @@ ) __all__ = [ - 'CertificateVerificationDescription', - 'CertificateProperties', + 'CertificateBodyDescription', 'CertificateDescription', 'CertificateListDescription', - 'CertificateBodyDescription', + 'CertificateProperties', 'CertificatePropertiesWithNonce', + 'CertificateVerificationDescription', 'CertificateWithNonceDescription', - 'SharedAccessSignatureAuthorizationRule', - 'IpFilterRule', + 'CloudToDeviceProperties', + 'EndpointHealthData', + 'EnrichmentProperties', + 'ErrorDetails', 'ErrorDetailsException', + 'EventHubConsumerGroupInfo', 'EventHubProperties', - 'RoutingServiceBusQueueEndpointProperties', - 'RoutingServiceBusTopicEndpointProperties', - 'RoutingEventHubProperties', - 'RoutingStorageContainerProperties', - 'RoutingEndpoints', - 'RouteProperties', + 'ExportDevicesRequest', + 'FailoverInput', 'FallbackRouteProperties', - 'EnrichmentProperties', - 'RoutingProperties', - 'StorageEndpointProperties', - 'MessagingEndpointProperties', 'FeedbackProperties', - 'CloudToDeviceProperties', - 'IotHubPropertiesDeviceStreams', - 'IotHubProperties', - 'IotHubSkuInfo', + 'ImportDevicesRequest', + 'IotHubCapacity', 'IotHubDescription', - 'Resource', - 'OperationDisplay', - 'Operation', - 'ErrorDetails', 'ErrorDetailsException', + 'IotHubLocationDescription', + 'IotHubNameAvailabilityInfo', + 'IotHubProperties', + 'IotHubPropertiesDeviceStreams', 'IotHubQuotaMetricInfo', - 'EndpointHealthData', - 'RegistryStatistics', - 'JobResponse', - 'IotHubCapacity', 'IotHubSkuDescription', - 'TagsResource', - 'EventHubConsumerGroupInfo', - 'OperationInputs', - 'IotHubNameAvailabilityInfo', + 'IotHubSkuInfo', + 'IpFilterRule', + 'JobResponse', + 'MatchedRoute', + 'MessagingEndpointProperties', 'Name', - 'UserSubscriptionQuota', - 'UserSubscriptionQuotaListResult', + 'Operation', + 'OperationDisplay', + 'OperationInputs', + 'RegistryStatistics', + 'Resource', + 'RouteCompilationError', + 'RouteErrorPosition', + 'RouteErrorRange', + 'RouteProperties', + 'RoutingEndpoints', + 'RoutingEventHubProperties', 'RoutingMessage', - 'RoutingTwinProperties', + 'RoutingProperties', + 'RoutingServiceBusQueueEndpointProperties', + 'RoutingServiceBusTopicEndpointProperties', + 'RoutingStorageContainerProperties', 'RoutingTwin', + 'RoutingTwinProperties', + 'SharedAccessSignatureAuthorizationRule', + 'StorageEndpointProperties', + 'TagsResource', 'TestAllRoutesInput', - 'MatchedRoute', 'TestAllRoutesResult', 'TestRouteInput', - 'RouteErrorPosition', - 'RouteErrorRange', - 'RouteCompilationError', - 'TestRouteResultDetails', 'TestRouteResult', - 'ExportDevicesRequest', - 'ImportDevicesRequest', - 'FailoverInput', + 'TestRouteResultDetails', + 'UserSubscriptionQuota', + 'UserSubscriptionQuotaListResult', 'OperationPaged', 'IotHubDescriptionPaged', 'IotHubSkuDescriptionPaged', @@ -225,6 +229,7 @@ 'IpFilterActionType', 'RoutingSource', 'Capabilities', + 'IotHubReplicaRoleType', 'IotHubSku', 'IotHubSkuTier', 'EndpointHealthStatus', diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_iot_hub_client_enums.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_iot_hub_client_enums.py new file mode 100644 index 000000000000..e2619c34c7ed --- /dev/null +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_iot_hub_client_enums.py @@ -0,0 +1,134 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class AccessRights(str, Enum): + + registry_read = "RegistryRead" + registry_write = "RegistryWrite" + service_connect = "ServiceConnect" + device_connect = "DeviceConnect" + registry_read_registry_write = "RegistryRead, RegistryWrite" + registry_read_service_connect = "RegistryRead, ServiceConnect" + registry_read_device_connect = "RegistryRead, DeviceConnect" + registry_write_service_connect = "RegistryWrite, ServiceConnect" + registry_write_device_connect = "RegistryWrite, DeviceConnect" + service_connect_device_connect = "ServiceConnect, DeviceConnect" + registry_read_registry_write_service_connect = "RegistryRead, RegistryWrite, ServiceConnect" + registry_read_registry_write_device_connect = "RegistryRead, RegistryWrite, DeviceConnect" + registry_read_service_connect_device_connect = "RegistryRead, ServiceConnect, DeviceConnect" + registry_write_service_connect_device_connect = "RegistryWrite, ServiceConnect, DeviceConnect" + registry_read_registry_write_service_connect_device_connect = "RegistryRead, RegistryWrite, ServiceConnect, DeviceConnect" + + +class IpFilterActionType(str, Enum): + + accept = "Accept" + reject = "Reject" + + +class RoutingSource(str, Enum): + + invalid = "Invalid" + device_messages = "DeviceMessages" + twin_change_events = "TwinChangeEvents" + device_lifecycle_events = "DeviceLifecycleEvents" + device_job_lifecycle_events = "DeviceJobLifecycleEvents" + + +class Capabilities(str, Enum): + + none = "None" + device_management = "DeviceManagement" + + +class IotHubReplicaRoleType(str, Enum): + + primary = "primary" + secondary = "secondary" + + +class IotHubSku(str, Enum): + + f1 = "F1" + s1 = "S1" + s2 = "S2" + s3 = "S3" + b1 = "B1" + b2 = "B2" + b3 = "B3" + + +class IotHubSkuTier(str, Enum): + + free = "Free" + standard = "Standard" + basic = "Basic" + + +class EndpointHealthStatus(str, Enum): + + unknown = "unknown" + healthy = "healthy" + unhealthy = "unhealthy" + dead = "dead" + + +class JobType(str, Enum): + + unknown = "unknown" + export = "export" + import_enum = "import" + backup = "backup" + read_device_properties = "readDeviceProperties" + write_device_properties = "writeDeviceProperties" + update_device_configuration = "updateDeviceConfiguration" + reboot_device = "rebootDevice" + factory_reset_device = "factoryResetDevice" + firmware_update = "firmwareUpdate" + + +class JobStatus(str, Enum): + + unknown = "unknown" + enqueued = "enqueued" + running = "running" + completed = "completed" + failed = "failed" + cancelled = "cancelled" + + +class IotHubScaleType(str, Enum): + + automatic = "Automatic" + manual = "Manual" + none = "None" + + +class IotHubNameUnavailabilityReason(str, Enum): + + invalid = "Invalid" + already_exists = "AlreadyExists" + + +class TestResultStatus(str, Enum): + + undefined = "undefined" + false = "false" + true = "true" + + +class RouteErrorSeverity(str, Enum): + + error = "error" + warning = "warning" diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models.py new file mode 100644 index 000000000000..19da905a3803 --- /dev/null +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models.py @@ -0,0 +1,2107 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class CertificateBodyDescription(Model): + """The JSON-serialized X509 Certificate. + + :param certificate: base-64 representation of the X509 leaf certificate + .cer file or just .pem file content. + :type certificate: str + """ + + _attribute_map = { + 'certificate': {'key': 'certificate', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateBodyDescription, self).__init__(**kwargs) + self.certificate = kwargs.get('certificate', None) + + +class CertificateDescription(Model): + """The X509 Certificate. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: + :type properties: ~azure.mgmt.iothub.models.CertificateProperties + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The name of the certificate. + :vartype name: str + :ivar etag: The entity tag. + :vartype etag: str + :ivar type: The resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'CertificateProperties'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateDescription, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.id = None + self.name = None + self.etag = None + self.type = None + + +class CertificateListDescription(Model): + """The JSON-serialized array of Certificate objects. + + :param value: The array of Certificate objects. + :type value: list[~azure.mgmt.iothub.models.CertificateDescription] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateDescription]'}, + } + + def __init__(self, **kwargs): + super(CertificateListDescription, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class CertificateProperties(Model): + """The description of an X509 CA Certificate. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar subject: The certificate's subject name. + :vartype subject: str + :ivar expiry: The certificate's expiration date and time. + :vartype expiry: datetime + :ivar thumbprint: The certificate's thumbprint. + :vartype thumbprint: str + :ivar is_verified: Determines whether certificate has been verified. + :vartype is_verified: bool + :ivar created: The certificate's create date and time. + :vartype created: datetime + :ivar updated: The certificate's last update date and time. + :vartype updated: datetime + :param certificate: The certificate content + :type certificate: str + """ + + _validation = { + 'subject': {'readonly': True}, + 'expiry': {'readonly': True}, + 'thumbprint': {'readonly': True}, + 'is_verified': {'readonly': True}, + 'created': {'readonly': True}, + 'updated': {'readonly': True}, + } + + _attribute_map = { + 'subject': {'key': 'subject', 'type': 'str'}, + 'expiry': {'key': 'expiry', 'type': 'rfc-1123'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'is_verified': {'key': 'isVerified', 'type': 'bool'}, + 'created': {'key': 'created', 'type': 'rfc-1123'}, + 'updated': {'key': 'updated', 'type': 'rfc-1123'}, + 'certificate': {'key': 'certificate', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateProperties, self).__init__(**kwargs) + self.subject = None + self.expiry = None + self.thumbprint = None + self.is_verified = None + self.created = None + self.updated = None + self.certificate = kwargs.get('certificate', None) + + +class CertificatePropertiesWithNonce(Model): + """The description of an X509 CA Certificate including the challenge nonce + issued for the Proof-Of-Possession flow. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar subject: The certificate's subject name. + :vartype subject: str + :ivar expiry: The certificate's expiration date and time. + :vartype expiry: datetime + :ivar thumbprint: The certificate's thumbprint. + :vartype thumbprint: str + :ivar is_verified: Determines whether certificate has been verified. + :vartype is_verified: bool + :ivar created: The certificate's create date and time. + :vartype created: datetime + :ivar updated: The certificate's last update date and time. + :vartype updated: datetime + :ivar verification_code: The certificate's verification code that will be + used for proof of possession. + :vartype verification_code: str + :ivar certificate: The certificate content + :vartype certificate: str + """ + + _validation = { + 'subject': {'readonly': True}, + 'expiry': {'readonly': True}, + 'thumbprint': {'readonly': True}, + 'is_verified': {'readonly': True}, + 'created': {'readonly': True}, + 'updated': {'readonly': True}, + 'verification_code': {'readonly': True}, + 'certificate': {'readonly': True}, + } + + _attribute_map = { + 'subject': {'key': 'subject', 'type': 'str'}, + 'expiry': {'key': 'expiry', 'type': 'rfc-1123'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'is_verified': {'key': 'isVerified', 'type': 'bool'}, + 'created': {'key': 'created', 'type': 'rfc-1123'}, + 'updated': {'key': 'updated', 'type': 'rfc-1123'}, + 'verification_code': {'key': 'verificationCode', 'type': 'str'}, + 'certificate': {'key': 'certificate', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificatePropertiesWithNonce, self).__init__(**kwargs) + self.subject = None + self.expiry = None + self.thumbprint = None + self.is_verified = None + self.created = None + self.updated = None + self.verification_code = None + self.certificate = None + + +class CertificateVerificationDescription(Model): + """The JSON-serialized leaf certificate. + + :param certificate: base-64 representation of X509 certificate .cer file + or just .pem file content. + :type certificate: str + """ + + _attribute_map = { + 'certificate': {'key': 'certificate', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateVerificationDescription, self).__init__(**kwargs) + self.certificate = kwargs.get('certificate', None) + + +class CertificateWithNonceDescription(Model): + """The X509 Certificate. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: + :type properties: ~azure.mgmt.iothub.models.CertificatePropertiesWithNonce + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The name of the certificate. + :vartype name: str + :ivar etag: The entity tag. + :vartype etag: str + :ivar type: The resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'CertificatePropertiesWithNonce'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateWithNonceDescription, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.id = None + self.name = None + self.etag = None + self.type = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class CloudToDeviceProperties(Model): + """The IoT hub cloud-to-device messaging properties. + + :param max_delivery_count: The max delivery count for cloud-to-device + messages in the device queue. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. + :type max_delivery_count: int + :param default_ttl_as_iso8601: The default time to live for + cloud-to-device messages in the device queue. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. + :type default_ttl_as_iso8601: timedelta + :param feedback: + :type feedback: ~azure.mgmt.iothub.models.FeedbackProperties + """ + + _validation = { + 'max_delivery_count': {'maximum': 100, 'minimum': 1}, + } + + _attribute_map = { + 'max_delivery_count': {'key': 'maxDeliveryCount', 'type': 'int'}, + 'default_ttl_as_iso8601': {'key': 'defaultTtlAsIso8601', 'type': 'duration'}, + 'feedback': {'key': 'feedback', 'type': 'FeedbackProperties'}, + } + + def __init__(self, **kwargs): + super(CloudToDeviceProperties, self).__init__(**kwargs) + self.max_delivery_count = kwargs.get('max_delivery_count', None) + self.default_ttl_as_iso8601 = kwargs.get('default_ttl_as_iso8601', None) + self.feedback = kwargs.get('feedback', None) + + +class EndpointHealthData(Model): + """The health data for an endpoint. + + :param endpoint_id: Id of the endpoint + :type endpoint_id: str + :param health_status: Health statuses have following meanings. The + 'healthy' status shows that the endpoint is accepting messages as + expected. The 'unhealthy' status shows that the endpoint is not accepting + messages as expected and IoT Hub is retrying to send data to this + endpoint. The status of an unhealthy endpoint will be updated to healthy + when IoT Hub has established an eventually consistent state of health. The + 'dead' status shows that the endpoint is not accepting messages, after IoT + Hub retried sending messages for the retrial period. See IoT Hub metrics + to identify errors and monitor issues with endpoints. The 'unknown' status + shows that the IoT Hub has not established a connection with the endpoint. + No messages have been delivered to or rejected from this endpoint. + Possible values include: 'unknown', 'healthy', 'unhealthy', 'dead' + :type health_status: str or ~azure.mgmt.iothub.models.EndpointHealthStatus + """ + + _attribute_map = { + 'endpoint_id': {'key': 'endpointId', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EndpointHealthData, self).__init__(**kwargs) + self.endpoint_id = kwargs.get('endpoint_id', None) + self.health_status = kwargs.get('health_status', None) + + +class EnrichmentProperties(Model): + """The properties of an enrichment that your IoT hub applies to messages + delivered to endpoints. + + All required parameters must be populated in order to send to Azure. + + :param key: Required. The key or name for the enrichment property. + :type key: str + :param value: Required. The value for the enrichment property. + :type value: str + :param endpoint_names: Required. The list of endpoints for which the + enrichment is applied to the message. + :type endpoint_names: list[str] + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + 'endpoint_names': {'required': True, 'min_items': 1}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'endpoint_names': {'key': 'endpointNames', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(EnrichmentProperties, self).__init__(**kwargs) + self.key = kwargs.get('key', None) + self.value = kwargs.get('value', None) + self.endpoint_names = kwargs.get('endpoint_names', None) + + +class ErrorDetails(Model): + """Error details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar http_status_code: The HTTP status code. + :vartype http_status_code: str + :ivar message: The error message. + :vartype message: str + :ivar details: The error details. + :vartype details: str + """ + + _validation = { + 'code': {'readonly': True}, + 'http_status_code': {'readonly': True}, + 'message': {'readonly': True}, + 'details': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'http_status_code': {'key': 'httpStatusCode', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorDetails, self).__init__(**kwargs) + self.code = None + self.http_status_code = None + self.message = None + self.details = None + + +class ErrorDetailsException(HttpOperationError): + """Server responsed with exception of type: 'ErrorDetails'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorDetailsException, self).__init__(deserialize, response, 'ErrorDetails', *args) + + +class EventHubConsumerGroupInfo(Model): + """The properties of the EventHubConsumerGroupInfo object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: The tags. + :type properties: dict[str, str] + :ivar id: The Event Hub-compatible consumer group identifier. + :vartype id: str + :ivar name: The Event Hub-compatible consumer group name. + :vartype name: str + :ivar type: the resource type. + :vartype type: str + :ivar etag: The etag. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EventHubConsumerGroupInfo, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.id = None + self.name = None + self.type = None + self.etag = None + + +class EventHubProperties(Model): + """The properties of the provisioned Event Hub-compatible endpoint used by the + IoT hub. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param retention_time_in_days: The retention time for device-to-cloud + messages in days. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages + :type retention_time_in_days: long + :param partition_count: The number of partitions for receiving + device-to-cloud messages in the Event Hub-compatible endpoint. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages. + :type partition_count: int + :ivar partition_ids: The partition ids in the Event Hub-compatible + endpoint. + :vartype partition_ids: list[str] + :ivar path: The Event Hub-compatible name. + :vartype path: str + :ivar endpoint: The Event Hub-compatible endpoint. + :vartype endpoint: str + """ + + _validation = { + 'partition_ids': {'readonly': True}, + 'path': {'readonly': True}, + 'endpoint': {'readonly': True}, + } + + _attribute_map = { + 'retention_time_in_days': {'key': 'retentionTimeInDays', 'type': 'long'}, + 'partition_count': {'key': 'partitionCount', 'type': 'int'}, + 'partition_ids': {'key': 'partitionIds', 'type': '[str]'}, + 'path': {'key': 'path', 'type': 'str'}, + 'endpoint': {'key': 'endpoint', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EventHubProperties, self).__init__(**kwargs) + self.retention_time_in_days = kwargs.get('retention_time_in_days', None) + self.partition_count = kwargs.get('partition_count', None) + self.partition_ids = None + self.path = None + self.endpoint = None + + +class ExportDevicesRequest(Model): + """Use to provide parameters when requesting an export of all devices in the + IoT hub. + + All required parameters must be populated in order to send to Azure. + + :param export_blob_container_uri: Required. The export blob container URI. + :type export_blob_container_uri: str + :param exclude_keys: Required. The value indicating whether keys should be + excluded during export. + :type exclude_keys: bool + """ + + _validation = { + 'export_blob_container_uri': {'required': True}, + 'exclude_keys': {'required': True}, + } + + _attribute_map = { + 'export_blob_container_uri': {'key': 'exportBlobContainerUri', 'type': 'str'}, + 'exclude_keys': {'key': 'excludeKeys', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ExportDevicesRequest, self).__init__(**kwargs) + self.export_blob_container_uri = kwargs.get('export_blob_container_uri', None) + self.exclude_keys = kwargs.get('exclude_keys', None) + + +class FailoverInput(Model): + """Use to provide failover region when requesting manual Failover for a hub. + + All required parameters must be populated in order to send to Azure. + + :param failover_region: Required. Region the hub will be failed over to + :type failover_region: str + """ + + _validation = { + 'failover_region': {'required': True}, + } + + _attribute_map = { + 'failover_region': {'key': 'failoverRegion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FailoverInput, self).__init__(**kwargs) + self.failover_region = kwargs.get('failover_region', None) + + +class FallbackRouteProperties(Model): + """The properties of the fallback route. IoT Hub uses these properties when it + routes messages to the fallback endpoint. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: The name of the route. The name can only include alphanumeric + characters, periods, underscores, hyphens, has a maximum length of 64 + characters, and must be unique. + :type name: str + :ivar source: Required. The source to which the routing rule is to be + applied to. For example, DeviceMessages. Default value: "DeviceMessages" . + :vartype source: str + :param condition: The condition which is evaluated in order to apply the + fallback route. If the condition is not provided it will evaluate to true + by default. For grammar, See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language + :type condition: str + :param endpoint_names: Required. The list of endpoints to which the + messages that satisfy the condition are routed to. Currently only 1 + endpoint is allowed. + :type endpoint_names: list[str] + :param is_enabled: Required. Used to specify whether the fallback route is + enabled. + :type is_enabled: bool + """ + + _validation = { + 'source': {'required': True, 'constant': True}, + 'endpoint_names': {'required': True, 'max_items': 1, 'min_items': 1}, + 'is_enabled': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'condition': {'key': 'condition', 'type': 'str'}, + 'endpoint_names': {'key': 'endpointNames', 'type': '[str]'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + } + + source = "DeviceMessages" + + def __init__(self, **kwargs): + super(FallbackRouteProperties, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.condition = kwargs.get('condition', None) + self.endpoint_names = kwargs.get('endpoint_names', None) + self.is_enabled = kwargs.get('is_enabled', None) + + +class FeedbackProperties(Model): + """The properties of the feedback queue for cloud-to-device messages. + + :param lock_duration_as_iso8601: The lock duration for the feedback queue. + See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. + :type lock_duration_as_iso8601: timedelta + :param ttl_as_iso8601: The period of time for which a message is available + to consume before it is expired by the IoT hub. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. + :type ttl_as_iso8601: timedelta + :param max_delivery_count: The number of times the IoT hub attempts to + deliver a message on the feedback queue. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. + :type max_delivery_count: int + """ + + _validation = { + 'max_delivery_count': {'maximum': 100, 'minimum': 1}, + } + + _attribute_map = { + 'lock_duration_as_iso8601': {'key': 'lockDurationAsIso8601', 'type': 'duration'}, + 'ttl_as_iso8601': {'key': 'ttlAsIso8601', 'type': 'duration'}, + 'max_delivery_count': {'key': 'maxDeliveryCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(FeedbackProperties, self).__init__(**kwargs) + self.lock_duration_as_iso8601 = kwargs.get('lock_duration_as_iso8601', None) + self.ttl_as_iso8601 = kwargs.get('ttl_as_iso8601', None) + self.max_delivery_count = kwargs.get('max_delivery_count', None) + + +class ImportDevicesRequest(Model): + """Use to provide parameters when requesting an import of all devices in the + hub. + + All required parameters must be populated in order to send to Azure. + + :param input_blob_container_uri: Required. The input blob container URI. + :type input_blob_container_uri: str + :param output_blob_container_uri: Required. The output blob container URI. + :type output_blob_container_uri: str + """ + + _validation = { + 'input_blob_container_uri': {'required': True}, + 'output_blob_container_uri': {'required': True}, + } + + _attribute_map = { + 'input_blob_container_uri': {'key': 'inputBlobContainerUri', 'type': 'str'}, + 'output_blob_container_uri': {'key': 'outputBlobContainerUri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImportDevicesRequest, self).__init__(**kwargs) + self.input_blob_container_uri = kwargs.get('input_blob_container_uri', None) + self.output_blob_container_uri = kwargs.get('output_blob_container_uri', None) + + +class IotHubCapacity(Model): + """IoT Hub capacity information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar minimum: The minimum number of units. + :vartype minimum: long + :ivar maximum: The maximum number of units. + :vartype maximum: long + :ivar default: The default number of units. + :vartype default: long + :ivar scale_type: The type of the scaling enabled. Possible values + include: 'Automatic', 'Manual', 'None' + :vartype scale_type: str or ~azure.mgmt.iothub.models.IotHubScaleType + """ + + _validation = { + 'minimum': {'readonly': True, 'maximum': 1, 'minimum': 1}, + 'maximum': {'readonly': True}, + 'default': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'long'}, + 'maximum': {'key': 'maximum', 'type': 'long'}, + 'default': {'key': 'default', 'type': 'long'}, + 'scale_type': {'key': 'scaleType', 'type': 'IotHubScaleType'}, + } + + def __init__(self, **kwargs): + super(IotHubCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default = None + self.scale_type = None + + +class Resource(Model): + """The common properties of an Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :param location: Required. The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True, 'pattern': r'^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$'}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class IotHubDescription(Resource): + """The description of the IoT hub. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :param location: Required. The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param etag: The Etag field is *not* required. If it is provided in the + response body, it must also be provided as a header per the normal ETag + convention. + :type etag: str + :param properties: IotHub properties + :type properties: ~azure.mgmt.iothub.models.IotHubProperties + :param sku: Required. IotHub SKU info + :type sku: ~azure.mgmt.iothub.models.IotHubSkuInfo + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True, 'pattern': r'^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$'}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'sku': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'IotHubProperties'}, + 'sku': {'key': 'sku', 'type': 'IotHubSkuInfo'}, + } + + def __init__(self, **kwargs): + super(IotHubDescription, self).__init__(**kwargs) + self.etag = kwargs.get('etag', None) + self.properties = kwargs.get('properties', None) + self.sku = kwargs.get('sku', None) + + +class IotHubLocationDescription(Model): + """Public representation of one of the locations where a resource is + provisioned. + + :param location: Azure Geo Regions + :type location: str + :param role: Specific Role assigned to this location. Possible values + include: 'primary', 'secondary' + :type role: str or ~azure.mgmt.iothub.models.IotHubReplicaRoleType + """ + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'role': {'key': 'role', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IotHubLocationDescription, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.role = kwargs.get('role', None) + + +class IotHubNameAvailabilityInfo(Model): + """The properties indicating whether a given IoT hub name is available. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name_available: The value which indicates whether the provided name + is available. + :vartype name_available: bool + :ivar reason: The reason for unavailability. Possible values include: + 'Invalid', 'AlreadyExists' + :vartype reason: str or + ~azure.mgmt.iothub.models.IotHubNameUnavailabilityReason + :param message: The detailed reason message. + :type message: str + """ + + _validation = { + 'name_available': {'readonly': True}, + 'reason': {'readonly': True}, + } + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'IotHubNameUnavailabilityReason'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IotHubNameAvailabilityInfo, self).__init__(**kwargs) + self.name_available = None + self.reason = None + self.message = kwargs.get('message', None) + + +class IotHubProperties(Model): + """The properties of an IoT hub. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param authorization_policies: The shared access policies you can use to + secure a connection to the IoT hub. + :type authorization_policies: + list[~azure.mgmt.iothub.models.SharedAccessSignatureAuthorizationRule] + :param ip_filter_rules: The IP filter rules. + :type ip_filter_rules: list[~azure.mgmt.iothub.models.IpFilterRule] + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + :ivar state: The hub state. + :vartype state: str + :ivar host_name: The name of the host. + :vartype host_name: str + :param event_hub_endpoints: The Event Hub-compatible endpoint properties. + The only possible keys to this dictionary is events. This key has to be + present in the dictionary while making create or update calls for the IoT + hub. + :type event_hub_endpoints: dict[str, + ~azure.mgmt.iothub.models.EventHubProperties] + :param routing: + :type routing: ~azure.mgmt.iothub.models.RoutingProperties + :param storage_endpoints: The list of Azure Storage endpoints where you + can upload files. Currently you can configure only one Azure Storage + account and that MUST have its key as $default. Specifying more than one + storage account causes an error to be thrown. Not specifying a value for + this property when the enableFileUploadNotifications property is set to + True, causes an error to be thrown. + :type storage_endpoints: dict[str, + ~azure.mgmt.iothub.models.StorageEndpointProperties] + :param messaging_endpoints: The messaging endpoint properties for the file + upload notification queue. + :type messaging_endpoints: dict[str, + ~azure.mgmt.iothub.models.MessagingEndpointProperties] + :param enable_file_upload_notifications: If True, file upload + notifications are enabled. + :type enable_file_upload_notifications: bool + :param cloud_to_device: + :type cloud_to_device: ~azure.mgmt.iothub.models.CloudToDeviceProperties + :param comments: IoT hub comments. + :type comments: str + :param device_streams: The device streams properties of iothub. + :type device_streams: + ~azure.mgmt.iothub.models.IotHubPropertiesDeviceStreams + :param features: The capabilities and features enabled for the IoT hub. + Possible values include: 'None', 'DeviceManagement' + :type features: str or ~azure.mgmt.iothub.models.Capabilities + :ivar locations: Primary and secondary location for iot hub + :vartype locations: + list[~azure.mgmt.iothub.models.IotHubLocationDescription] + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'state': {'readonly': True}, + 'host_name': {'readonly': True}, + 'locations': {'readonly': True}, + } + + _attribute_map = { + 'authorization_policies': {'key': 'authorizationPolicies', 'type': '[SharedAccessSignatureAuthorizationRule]'}, + 'ip_filter_rules': {'key': 'ipFilterRules', 'type': '[IpFilterRule]'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'host_name': {'key': 'hostName', 'type': 'str'}, + 'event_hub_endpoints': {'key': 'eventHubEndpoints', 'type': '{EventHubProperties}'}, + 'routing': {'key': 'routing', 'type': 'RoutingProperties'}, + 'storage_endpoints': {'key': 'storageEndpoints', 'type': '{StorageEndpointProperties}'}, + 'messaging_endpoints': {'key': 'messagingEndpoints', 'type': '{MessagingEndpointProperties}'}, + 'enable_file_upload_notifications': {'key': 'enableFileUploadNotifications', 'type': 'bool'}, + 'cloud_to_device': {'key': 'cloudToDevice', 'type': 'CloudToDeviceProperties'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'device_streams': {'key': 'deviceStreams', 'type': 'IotHubPropertiesDeviceStreams'}, + 'features': {'key': 'features', 'type': 'str'}, + 'locations': {'key': 'locations', 'type': '[IotHubLocationDescription]'}, + } + + def __init__(self, **kwargs): + super(IotHubProperties, self).__init__(**kwargs) + self.authorization_policies = kwargs.get('authorization_policies', None) + self.ip_filter_rules = kwargs.get('ip_filter_rules', None) + self.provisioning_state = None + self.state = None + self.host_name = None + self.event_hub_endpoints = kwargs.get('event_hub_endpoints', None) + self.routing = kwargs.get('routing', None) + self.storage_endpoints = kwargs.get('storage_endpoints', None) + self.messaging_endpoints = kwargs.get('messaging_endpoints', None) + self.enable_file_upload_notifications = kwargs.get('enable_file_upload_notifications', None) + self.cloud_to_device = kwargs.get('cloud_to_device', None) + self.comments = kwargs.get('comments', None) + self.device_streams = kwargs.get('device_streams', None) + self.features = kwargs.get('features', None) + self.locations = None + + +class IotHubPropertiesDeviceStreams(Model): + """The device streams properties of iothub. + + :param streaming_endpoints: List of Device Streams Endpoints. + :type streaming_endpoints: list[str] + """ + + _attribute_map = { + 'streaming_endpoints': {'key': 'streamingEndpoints', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(IotHubPropertiesDeviceStreams, self).__init__(**kwargs) + self.streaming_endpoints = kwargs.get('streaming_endpoints', None) + + +class IotHubQuotaMetricInfo(Model): + """Quota metrics properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the quota metric. + :vartype name: str + :ivar current_value: The current value for the quota metric. + :vartype current_value: long + :ivar max_value: The maximum value of the quota metric. + :vartype max_value: long + """ + + _validation = { + 'name': {'readonly': True}, + 'current_value': {'readonly': True}, + 'max_value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'long'}, + 'max_value': {'key': 'maxValue', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(IotHubQuotaMetricInfo, self).__init__(**kwargs) + self.name = None + self.current_value = None + self.max_value = None + + +class IotHubSkuDescription(Model): + """SKU properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar resource_type: The type of the resource. + :vartype resource_type: str + :param sku: Required. The type of the resource. + :type sku: ~azure.mgmt.iothub.models.IotHubSkuInfo + :param capacity: Required. IotHub capacity + :type capacity: ~azure.mgmt.iothub.models.IotHubCapacity + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'sku': {'required': True}, + 'capacity': {'required': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'IotHubSkuInfo'}, + 'capacity': {'key': 'capacity', 'type': 'IotHubCapacity'}, + } + + def __init__(self, **kwargs): + super(IotHubSkuDescription, self).__init__(**kwargs) + self.resource_type = None + self.sku = kwargs.get('sku', None) + self.capacity = kwargs.get('capacity', None) + + +class IotHubSkuInfo(Model): + """Information about the SKU of the IoT hub. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU. Possible values include: 'F1', + 'S1', 'S2', 'S3', 'B1', 'B2', 'B3' + :type name: str or ~azure.mgmt.iothub.models.IotHubSku + :ivar tier: The billing tier for the IoT hub. Possible values include: + 'Free', 'Standard', 'Basic' + :vartype tier: str or ~azure.mgmt.iothub.models.IotHubSkuTier + :param capacity: The number of provisioned IoT Hub units. See: + https://docs.microsoft.com/azure/azure-subscription-service-limits#iot-hub-limits. + :type capacity: long + """ + + _validation = { + 'name': {'required': True}, + 'tier': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'IotHubSkuTier'}, + 'capacity': {'key': 'capacity', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(IotHubSkuInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = None + self.capacity = kwargs.get('capacity', None) + + +class IpFilterRule(Model): + """The IP filter rules for the IoT hub. + + All required parameters must be populated in order to send to Azure. + + :param filter_name: Required. The name of the IP filter rule. + :type filter_name: str + :param action: Required. The desired action for requests captured by this + rule. Possible values include: 'Accept', 'Reject' + :type action: str or ~azure.mgmt.iothub.models.IpFilterActionType + :param ip_mask: Required. A string that contains the IP address range in + CIDR notation for the rule. + :type ip_mask: str + """ + + _validation = { + 'filter_name': {'required': True}, + 'action': {'required': True}, + 'ip_mask': {'required': True}, + } + + _attribute_map = { + 'filter_name': {'key': 'filterName', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'IpFilterActionType'}, + 'ip_mask': {'key': 'ipMask', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IpFilterRule, self).__init__(**kwargs) + self.filter_name = kwargs.get('filter_name', None) + self.action = kwargs.get('action', None) + self.ip_mask = kwargs.get('ip_mask', None) + + +class JobResponse(Model): + """The properties of the Job Response object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar job_id: The job identifier. + :vartype job_id: str + :ivar start_time_utc: The start time of the job. + :vartype start_time_utc: datetime + :ivar end_time_utc: The time the job stopped processing. + :vartype end_time_utc: datetime + :ivar type: The type of the job. Possible values include: 'unknown', + 'export', 'import', 'backup', 'readDeviceProperties', + 'writeDeviceProperties', 'updateDeviceConfiguration', 'rebootDevice', + 'factoryResetDevice', 'firmwareUpdate' + :vartype type: str or ~azure.mgmt.iothub.models.JobType + :ivar status: The status of the job. Possible values include: 'unknown', + 'enqueued', 'running', 'completed', 'failed', 'cancelled' + :vartype status: str or ~azure.mgmt.iothub.models.JobStatus + :ivar failure_reason: If status == failed, this string containing the + reason for the failure. + :vartype failure_reason: str + :ivar status_message: The status message for the job. + :vartype status_message: str + :ivar parent_job_id: The job identifier of the parent job, if any. + :vartype parent_job_id: str + """ + + _validation = { + 'job_id': {'readonly': True}, + 'start_time_utc': {'readonly': True}, + 'end_time_utc': {'readonly': True}, + 'type': {'readonly': True}, + 'status': {'readonly': True}, + 'failure_reason': {'readonly': True}, + 'status_message': {'readonly': True}, + 'parent_job_id': {'readonly': True}, + } + + _attribute_map = { + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'start_time_utc': {'key': 'startTimeUtc', 'type': 'rfc-1123'}, + 'end_time_utc': {'key': 'endTimeUtc', 'type': 'rfc-1123'}, + 'type': {'key': 'type', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'JobStatus'}, + 'failure_reason': {'key': 'failureReason', 'type': 'str'}, + 'status_message': {'key': 'statusMessage', 'type': 'str'}, + 'parent_job_id': {'key': 'parentJobId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobResponse, self).__init__(**kwargs) + self.job_id = None + self.start_time_utc = None + self.end_time_utc = None + self.type = None + self.status = None + self.failure_reason = None + self.status_message = None + self.parent_job_id = None + + +class MatchedRoute(Model): + """Routes that matched. + + :param properties: Properties of routes that matched + :type properties: ~azure.mgmt.iothub.models.RouteProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'RouteProperties'}, + } + + def __init__(self, **kwargs): + super(MatchedRoute, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class MessagingEndpointProperties(Model): + """The properties of the messaging endpoints used by this IoT hub. + + :param lock_duration_as_iso8601: The lock duration. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. + :type lock_duration_as_iso8601: timedelta + :param ttl_as_iso8601: The period of time for which a message is available + to consume before it is expired by the IoT hub. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. + :type ttl_as_iso8601: timedelta + :param max_delivery_count: The number of times the IoT hub attempts to + deliver a message. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. + :type max_delivery_count: int + """ + + _validation = { + 'max_delivery_count': {'maximum': 100, 'minimum': 1}, + } + + _attribute_map = { + 'lock_duration_as_iso8601': {'key': 'lockDurationAsIso8601', 'type': 'duration'}, + 'ttl_as_iso8601': {'key': 'ttlAsIso8601', 'type': 'duration'}, + 'max_delivery_count': {'key': 'maxDeliveryCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(MessagingEndpointProperties, self).__init__(**kwargs) + self.lock_duration_as_iso8601 = kwargs.get('lock_duration_as_iso8601', None) + self.ttl_as_iso8601 = kwargs.get('ttl_as_iso8601', None) + self.max_delivery_count = kwargs.get('max_delivery_count', None) + + +class Name(Model): + """Name of Iot Hub type. + + :param value: IotHub type + :type value: str + :param localized_value: Localized value of name + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Name, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.localized_value = kwargs.get('localized_value', None) + + +class Operation(Model): + """IoT Hub REST API operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation name: {provider}/{resource}/{read | write | action | + delete} + :vartype name: str + :param display: The object that represents the operation. + :type display: ~azure.mgmt.iothub.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = kwargs.get('display', None) + + +class OperationDisplay(Model): + """The object that represents the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: Service provider: Microsoft Devices + :vartype provider: str + :ivar resource: Resource Type: IotHubs + :vartype resource: str + :ivar operation: Name of the operation + :vartype operation: str + :ivar description: Description of the operation + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class OperationInputs(Model): + """Input values. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the IoT hub to check. + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationInputs, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class RegistryStatistics(Model): + """Identity registry statistics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar total_device_count: The total count of devices in the identity + registry. + :vartype total_device_count: long + :ivar enabled_device_count: The count of enabled devices in the identity + registry. + :vartype enabled_device_count: long + :ivar disabled_device_count: The count of disabled devices in the identity + registry. + :vartype disabled_device_count: long + """ + + _validation = { + 'total_device_count': {'readonly': True}, + 'enabled_device_count': {'readonly': True}, + 'disabled_device_count': {'readonly': True}, + } + + _attribute_map = { + 'total_device_count': {'key': 'totalDeviceCount', 'type': 'long'}, + 'enabled_device_count': {'key': 'enabledDeviceCount', 'type': 'long'}, + 'disabled_device_count': {'key': 'disabledDeviceCount', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(RegistryStatistics, self).__init__(**kwargs) + self.total_device_count = None + self.enabled_device_count = None + self.disabled_device_count = None + + +class RouteCompilationError(Model): + """Compilation error when evaluating route. + + :param message: Route error message + :type message: str + :param severity: Severity of the route error. Possible values include: + 'error', 'warning' + :type severity: str or ~azure.mgmt.iothub.models.RouteErrorSeverity + :param location: Location where the route error happened + :type location: ~azure.mgmt.iothub.models.RouteErrorRange + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'severity': {'key': 'severity', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'RouteErrorRange'}, + } + + def __init__(self, **kwargs): + super(RouteCompilationError, self).__init__(**kwargs) + self.message = kwargs.get('message', None) + self.severity = kwargs.get('severity', None) + self.location = kwargs.get('location', None) + + +class RouteErrorPosition(Model): + """Position where the route error happened. + + :param line: Line where the route error happened + :type line: int + :param column: Column where the route error happened + :type column: int + """ + + _attribute_map = { + 'line': {'key': 'line', 'type': 'int'}, + 'column': {'key': 'column', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RouteErrorPosition, self).__init__(**kwargs) + self.line = kwargs.get('line', None) + self.column = kwargs.get('column', None) + + +class RouteErrorRange(Model): + """Range of route errors. + + :param start: Start where the route error happened + :type start: ~azure.mgmt.iothub.models.RouteErrorPosition + :param end: End where the route error happened + :type end: ~azure.mgmt.iothub.models.RouteErrorPosition + """ + + _attribute_map = { + 'start': {'key': 'start', 'type': 'RouteErrorPosition'}, + 'end': {'key': 'end', 'type': 'RouteErrorPosition'}, + } + + def __init__(self, **kwargs): + super(RouteErrorRange, self).__init__(**kwargs) + self.start = kwargs.get('start', None) + self.end = kwargs.get('end', None) + + +class RouteProperties(Model): + """The properties of a routing rule that your IoT hub uses to route messages + to endpoints. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the route. The name can only include + alphanumeric characters, periods, underscores, hyphens, has a maximum + length of 64 characters, and must be unique. + :type name: str + :param source: Required. The source that the routing rule is to be applied + to, such as DeviceMessages. Possible values include: 'Invalid', + 'DeviceMessages', 'TwinChangeEvents', 'DeviceLifecycleEvents', + 'DeviceJobLifecycleEvents' + :type source: str or ~azure.mgmt.iothub.models.RoutingSource + :param condition: The condition that is evaluated to apply the routing + rule. If no condition is provided, it evaluates to true by default. For + grammar, see: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language + :type condition: str + :param endpoint_names: Required. The list of endpoints to which messages + that satisfy the condition are routed. Currently only one endpoint is + allowed. + :type endpoint_names: list[str] + :param is_enabled: Required. Used to specify whether a route is enabled. + :type is_enabled: bool + """ + + _validation = { + 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, + 'source': {'required': True}, + 'endpoint_names': {'required': True, 'max_items': 1, 'min_items': 1}, + 'is_enabled': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'condition': {'key': 'condition', 'type': 'str'}, + 'endpoint_names': {'key': 'endpointNames', 'type': '[str]'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(RouteProperties, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.source = kwargs.get('source', None) + self.condition = kwargs.get('condition', None) + self.endpoint_names = kwargs.get('endpoint_names', None) + self.is_enabled = kwargs.get('is_enabled', None) + + +class RoutingEndpoints(Model): + """The properties related to the custom endpoints to which your IoT hub routes + messages based on the routing rules. A maximum of 10 custom endpoints are + allowed across all endpoint types for paid hubs and only 1 custom endpoint + is allowed across all endpoint types for free hubs. + + :param service_bus_queues: The list of Service Bus queue endpoints that + IoT hub routes the messages to, based on the routing rules. + :type service_bus_queues: + list[~azure.mgmt.iothub.models.RoutingServiceBusQueueEndpointProperties] + :param service_bus_topics: The list of Service Bus topic endpoints that + the IoT hub routes the messages to, based on the routing rules. + :type service_bus_topics: + list[~azure.mgmt.iothub.models.RoutingServiceBusTopicEndpointProperties] + :param event_hubs: The list of Event Hubs endpoints that IoT hub routes + messages to, based on the routing rules. This list does not include the + built-in Event Hubs endpoint. + :type event_hubs: + list[~azure.mgmt.iothub.models.RoutingEventHubProperties] + :param storage_containers: The list of storage container endpoints that + IoT hub routes messages to, based on the routing rules. + :type storage_containers: + list[~azure.mgmt.iothub.models.RoutingStorageContainerProperties] + """ + + _attribute_map = { + 'service_bus_queues': {'key': 'serviceBusQueues', 'type': '[RoutingServiceBusQueueEndpointProperties]'}, + 'service_bus_topics': {'key': 'serviceBusTopics', 'type': '[RoutingServiceBusTopicEndpointProperties]'}, + 'event_hubs': {'key': 'eventHubs', 'type': '[RoutingEventHubProperties]'}, + 'storage_containers': {'key': 'storageContainers', 'type': '[RoutingStorageContainerProperties]'}, + } + + def __init__(self, **kwargs): + super(RoutingEndpoints, self).__init__(**kwargs) + self.service_bus_queues = kwargs.get('service_bus_queues', None) + self.service_bus_topics = kwargs.get('service_bus_topics', None) + self.event_hubs = kwargs.get('event_hubs', None) + self.storage_containers = kwargs.get('storage_containers', None) + + +class RoutingEventHubProperties(Model): + """The properties related to an event hub endpoint. + + All required parameters must be populated in order to send to Azure. + + :param connection_string: Required. The connection string of the event hub + endpoint. + :type connection_string: str + :param name: Required. The name that identifies this endpoint. The name + can only include alphanumeric characters, periods, underscores, hyphens + and has a maximum length of 64 characters. The following names are + reserved: events, fileNotifications, $default. Endpoint names must be + unique across endpoint types. + :type name: str + :param subscription_id: The subscription identifier of the event hub + endpoint. + :type subscription_id: str + :param resource_group: The name of the resource group of the event hub + endpoint. + :type resource_group: str + """ + + _validation = { + 'connection_string': {'required': True}, + 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, + } + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RoutingEventHubProperties, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.name = kwargs.get('name', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group = kwargs.get('resource_group', None) + + +class RoutingMessage(Model): + """Routing message. + + :param body: Body of routing message + :type body: str + :param app_properties: App properties + :type app_properties: dict[str, str] + :param system_properties: System properties + :type system_properties: dict[str, str] + """ + + _attribute_map = { + 'body': {'key': 'body', 'type': 'str'}, + 'app_properties': {'key': 'appProperties', 'type': '{str}'}, + 'system_properties': {'key': 'systemProperties', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(RoutingMessage, self).__init__(**kwargs) + self.body = kwargs.get('body', None) + self.app_properties = kwargs.get('app_properties', None) + self.system_properties = kwargs.get('system_properties', None) + + +class RoutingProperties(Model): + """The routing related properties of the IoT hub. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging. + + :param endpoints: + :type endpoints: ~azure.mgmt.iothub.models.RoutingEndpoints + :param routes: The list of user-provided routing rules that the IoT hub + uses to route messages to built-in and custom endpoints. A maximum of 100 + routing rules are allowed for paid hubs and a maximum of 5 routing rules + are allowed for free hubs. + :type routes: list[~azure.mgmt.iothub.models.RouteProperties] + :param fallback_route: The properties of the route that is used as a + fall-back route when none of the conditions specified in the 'routes' + section are met. This is an optional parameter. When this property is not + set, the messages which do not meet any of the conditions specified in the + 'routes' section get routed to the built-in eventhub endpoint. + :type fallback_route: ~azure.mgmt.iothub.models.FallbackRouteProperties + :param enrichments: The list of user-provided enrichments that the IoT hub + applies to messages to be delivered to built-in and custom endpoints. See: + https://aka.ms/iotmsgenrich + :type enrichments: list[~azure.mgmt.iothub.models.EnrichmentProperties] + """ + + _attribute_map = { + 'endpoints': {'key': 'endpoints', 'type': 'RoutingEndpoints'}, + 'routes': {'key': 'routes', 'type': '[RouteProperties]'}, + 'fallback_route': {'key': 'fallbackRoute', 'type': 'FallbackRouteProperties'}, + 'enrichments': {'key': 'enrichments', 'type': '[EnrichmentProperties]'}, + } + + def __init__(self, **kwargs): + super(RoutingProperties, self).__init__(**kwargs) + self.endpoints = kwargs.get('endpoints', None) + self.routes = kwargs.get('routes', None) + self.fallback_route = kwargs.get('fallback_route', None) + self.enrichments = kwargs.get('enrichments', None) + + +class RoutingServiceBusQueueEndpointProperties(Model): + """The properties related to service bus queue endpoint types. + + All required parameters must be populated in order to send to Azure. + + :param connection_string: Required. The connection string of the service + bus queue endpoint. + :type connection_string: str + :param name: Required. The name that identifies this endpoint. The name + can only include alphanumeric characters, periods, underscores, hyphens + and has a maximum length of 64 characters. The following names are + reserved: events, fileNotifications, $default. Endpoint names must be + unique across endpoint types. The name need not be the same as the actual + queue name. + :type name: str + :param subscription_id: The subscription identifier of the service bus + queue endpoint. + :type subscription_id: str + :param resource_group: The name of the resource group of the service bus + queue endpoint. + :type resource_group: str + """ + + _validation = { + 'connection_string': {'required': True}, + 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, + } + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RoutingServiceBusQueueEndpointProperties, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.name = kwargs.get('name', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group = kwargs.get('resource_group', None) + + +class RoutingServiceBusTopicEndpointProperties(Model): + """The properties related to service bus topic endpoint types. + + All required parameters must be populated in order to send to Azure. + + :param connection_string: Required. The connection string of the service + bus topic endpoint. + :type connection_string: str + :param name: Required. The name that identifies this endpoint. The name + can only include alphanumeric characters, periods, underscores, hyphens + and has a maximum length of 64 characters. The following names are + reserved: events, fileNotifications, $default. Endpoint names must be + unique across endpoint types. The name need not be the same as the actual + topic name. + :type name: str + :param subscription_id: The subscription identifier of the service bus + topic endpoint. + :type subscription_id: str + :param resource_group: The name of the resource group of the service bus + topic endpoint. + :type resource_group: str + """ + + _validation = { + 'connection_string': {'required': True}, + 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, + } + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RoutingServiceBusTopicEndpointProperties, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.name = kwargs.get('name', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group = kwargs.get('resource_group', None) + + +class RoutingStorageContainerProperties(Model): + """The properties related to a storage container endpoint. + + All required parameters must be populated in order to send to Azure. + + :param connection_string: Required. The connection string of the storage + account. + :type connection_string: str + :param name: Required. The name that identifies this endpoint. The name + can only include alphanumeric characters, periods, underscores, hyphens + and has a maximum length of 64 characters. The following names are + reserved: events, fileNotifications, $default. Endpoint names must be + unique across endpoint types. + :type name: str + :param subscription_id: The subscription identifier of the storage + account. + :type subscription_id: str + :param resource_group: The name of the resource group of the storage + account. + :type resource_group: str + :param container_name: Required. The name of storage container in the + storage account. + :type container_name: str + :param file_name_format: File name format for the blob. Default format is + {iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}. All parameters are + mandatory but can be reordered. + :type file_name_format: str + :param batch_frequency_in_seconds: Time interval at which blobs are + written to storage. Value should be between 60 and 720 seconds. Default + value is 300 seconds. + :type batch_frequency_in_seconds: int + :param max_chunk_size_in_bytes: Maximum number of bytes for each blob + written to storage. Value should be between 10485760(10MB) and + 524288000(500MB). Default value is 314572800(300MB). + :type max_chunk_size_in_bytes: int + :param encoding: Encoding that is used to serialize messages to blobs. + Supported values are 'avro', 'avrodeflate', and 'JSON'. Default value is + 'avro'. Possible values include: 'Avro', 'AvroDeflate', 'JSON' + :type encoding: str or ~azure.mgmt.iothub.models.enum + """ + + _validation = { + 'connection_string': {'required': True}, + 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, + 'container_name': {'required': True}, + 'batch_frequency_in_seconds': {'maximum': 720, 'minimum': 60}, + 'max_chunk_size_in_bytes': {'maximum': 524288000, 'minimum': 10485760}, + } + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'file_name_format': {'key': 'fileNameFormat', 'type': 'str'}, + 'batch_frequency_in_seconds': {'key': 'batchFrequencyInSeconds', 'type': 'int'}, + 'max_chunk_size_in_bytes': {'key': 'maxChunkSizeInBytes', 'type': 'int'}, + 'encoding': {'key': 'encoding', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RoutingStorageContainerProperties, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.name = kwargs.get('name', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group = kwargs.get('resource_group', None) + self.container_name = kwargs.get('container_name', None) + self.file_name_format = kwargs.get('file_name_format', None) + self.batch_frequency_in_seconds = kwargs.get('batch_frequency_in_seconds', None) + self.max_chunk_size_in_bytes = kwargs.get('max_chunk_size_in_bytes', None) + self.encoding = kwargs.get('encoding', None) + + +class RoutingTwin(Model): + """Twin reference input parameter. This is an optional parameter. + + :param tags: Twin Tags + :type tags: object + :param properties: + :type properties: ~azure.mgmt.iothub.models.RoutingTwinProperties + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': 'object'}, + 'properties': {'key': 'properties', 'type': 'RoutingTwinProperties'}, + } + + def __init__(self, **kwargs): + super(RoutingTwin, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.properties = kwargs.get('properties', None) + + +class RoutingTwinProperties(Model): + """RoutingTwinProperties. + + :param desired: Twin desired properties + :type desired: object + :param reported: Twin desired properties + :type reported: object + """ + + _attribute_map = { + 'desired': {'key': 'desired', 'type': 'object'}, + 'reported': {'key': 'reported', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(RoutingTwinProperties, self).__init__(**kwargs) + self.desired = kwargs.get('desired', None) + self.reported = kwargs.get('reported', None) + + +class SharedAccessSignatureAuthorizationRule(Model): + """The properties of an IoT hub shared access policy. + + All required parameters must be populated in order to send to Azure. + + :param key_name: Required. The name of the shared access policy. + :type key_name: str + :param primary_key: The primary key. + :type primary_key: str + :param secondary_key: The secondary key. + :type secondary_key: str + :param rights: Required. The permissions assigned to the shared access + policy. Possible values include: 'RegistryRead', 'RegistryWrite', + 'ServiceConnect', 'DeviceConnect', 'RegistryRead, RegistryWrite', + 'RegistryRead, ServiceConnect', 'RegistryRead, DeviceConnect', + 'RegistryWrite, ServiceConnect', 'RegistryWrite, DeviceConnect', + 'ServiceConnect, DeviceConnect', 'RegistryRead, RegistryWrite, + ServiceConnect', 'RegistryRead, RegistryWrite, DeviceConnect', + 'RegistryRead, ServiceConnect, DeviceConnect', 'RegistryWrite, + ServiceConnect, DeviceConnect', 'RegistryRead, RegistryWrite, + ServiceConnect, DeviceConnect' + :type rights: str or ~azure.mgmt.iothub.models.AccessRights + """ + + _validation = { + 'key_name': {'required': True}, + 'rights': {'required': True}, + } + + _attribute_map = { + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + 'rights': {'key': 'rights', 'type': 'AccessRights'}, + } + + def __init__(self, **kwargs): + super(SharedAccessSignatureAuthorizationRule, self).__init__(**kwargs) + self.key_name = kwargs.get('key_name', None) + self.primary_key = kwargs.get('primary_key', None) + self.secondary_key = kwargs.get('secondary_key', None) + self.rights = kwargs.get('rights', None) + + +class StorageEndpointProperties(Model): + """The properties of the Azure Storage endpoint for file upload. + + All required parameters must be populated in order to send to Azure. + + :param sas_ttl_as_iso8601: The period of time for which the SAS URI + generated by IoT Hub for file upload is valid. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload#file-upload-notification-configuration-options. + :type sas_ttl_as_iso8601: timedelta + :param connection_string: Required. The connection string for the Azure + Storage account to which files are uploaded. + :type connection_string: str + :param container_name: Required. The name of the root container where you + upload files. The container need not exist but should be creatable using + the connectionString specified. + :type container_name: str + """ + + _validation = { + 'connection_string': {'required': True}, + 'container_name': {'required': True}, + } + + _attribute_map = { + 'sas_ttl_as_iso8601': {'key': 'sasTtlAsIso8601', 'type': 'duration'}, + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StorageEndpointProperties, self).__init__(**kwargs) + self.sas_ttl_as_iso8601 = kwargs.get('sas_ttl_as_iso8601', None) + self.connection_string = kwargs.get('connection_string', None) + self.container_name = kwargs.get('container_name', None) + + +class TagsResource(Model): + """A container holding only the Tags for a resource, allowing the user to + update the tags on an IoT Hub instance. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(TagsResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class TestAllRoutesInput(Model): + """Input for testing all routes. + + :param routing_source: Routing source. Possible values include: 'Invalid', + 'DeviceMessages', 'TwinChangeEvents', 'DeviceLifecycleEvents', + 'DeviceJobLifecycleEvents' + :type routing_source: str or ~azure.mgmt.iothub.models.RoutingSource + :param message: Routing message + :type message: ~azure.mgmt.iothub.models.RoutingMessage + :param twin: Routing Twin Reference + :type twin: ~azure.mgmt.iothub.models.RoutingTwin + """ + + _attribute_map = { + 'routing_source': {'key': 'routingSource', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'RoutingMessage'}, + 'twin': {'key': 'twin', 'type': 'RoutingTwin'}, + } + + def __init__(self, **kwargs): + super(TestAllRoutesInput, self).__init__(**kwargs) + self.routing_source = kwargs.get('routing_source', None) + self.message = kwargs.get('message', None) + self.twin = kwargs.get('twin', None) + + +class TestAllRoutesResult(Model): + """Result of testing all routes. + + :param routes: JSON-serialized array of matched routes + :type routes: list[~azure.mgmt.iothub.models.MatchedRoute] + """ + + _attribute_map = { + 'routes': {'key': 'routes', 'type': '[MatchedRoute]'}, + } + + def __init__(self, **kwargs): + super(TestAllRoutesResult, self).__init__(**kwargs) + self.routes = kwargs.get('routes', None) + + +class TestRouteInput(Model): + """Input for testing route. + + All required parameters must be populated in order to send to Azure. + + :param message: Routing message + :type message: ~azure.mgmt.iothub.models.RoutingMessage + :param route: Required. Route properties + :type route: ~azure.mgmt.iothub.models.RouteProperties + :param twin: Routing Twin Reference + :type twin: ~azure.mgmt.iothub.models.RoutingTwin + """ + + _validation = { + 'route': {'required': True}, + } + + _attribute_map = { + 'message': {'key': 'message', 'type': 'RoutingMessage'}, + 'route': {'key': 'route', 'type': 'RouteProperties'}, + 'twin': {'key': 'twin', 'type': 'RoutingTwin'}, + } + + def __init__(self, **kwargs): + super(TestRouteInput, self).__init__(**kwargs) + self.message = kwargs.get('message', None) + self.route = kwargs.get('route', None) + self.twin = kwargs.get('twin', None) + + +class TestRouteResult(Model): + """Result of testing one route. + + :param result: Result of testing route. Possible values include: + 'undefined', 'false', 'true' + :type result: str or ~azure.mgmt.iothub.models.TestResultStatus + :param details: Detailed result of testing route + :type details: ~azure.mgmt.iothub.models.TestRouteResultDetails + """ + + _attribute_map = { + 'result': {'key': 'result', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'TestRouteResultDetails'}, + } + + def __init__(self, **kwargs): + super(TestRouteResult, self).__init__(**kwargs) + self.result = kwargs.get('result', None) + self.details = kwargs.get('details', None) + + +class TestRouteResultDetails(Model): + """Detailed result of testing a route. + + :param compilation_errors: JSON-serialized list of route compilation + errors + :type compilation_errors: + list[~azure.mgmt.iothub.models.RouteCompilationError] + """ + + _attribute_map = { + 'compilation_errors': {'key': 'compilationErrors', 'type': '[RouteCompilationError]'}, + } + + def __init__(self, **kwargs): + super(TestRouteResultDetails, self).__init__(**kwargs) + self.compilation_errors = kwargs.get('compilation_errors', None) + + +class UserSubscriptionQuota(Model): + """User subscription quota response. + + :param id: IotHub type id + :type id: str + :param type: Response type + :type type: str + :param unit: Unit of IotHub type + :type unit: str + :param current_value: Current number of IotHub type + :type current_value: int + :param limit: Numerical limit on IotHub type + :type limit: int + :param name: IotHub type + :type name: ~azure.mgmt.iothub.models.Name + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'Name'}, + } + + def __init__(self, **kwargs): + super(UserSubscriptionQuota, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.type = kwargs.get('type', None) + self.unit = kwargs.get('unit', None) + self.current_value = kwargs.get('current_value', None) + self.limit = kwargs.get('limit', None) + self.name = kwargs.get('name', None) + + +class UserSubscriptionQuotaListResult(Model): + """Json-serialized array of User subscription quota response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param value: + :type value: list[~azure.mgmt.iothub.models.UserSubscriptionQuota] + :ivar next_link: + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[UserSubscriptionQuota]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserSubscriptionQuotaListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models_py3.py new file mode 100644 index 000000000000..7de261f3b8b3 --- /dev/null +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models_py3.py @@ -0,0 +1,2107 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class CertificateBodyDescription(Model): + """The JSON-serialized X509 Certificate. + + :param certificate: base-64 representation of the X509 leaf certificate + .cer file or just .pem file content. + :type certificate: str + """ + + _attribute_map = { + 'certificate': {'key': 'certificate', 'type': 'str'}, + } + + def __init__(self, *, certificate: str=None, **kwargs) -> None: + super(CertificateBodyDescription, self).__init__(**kwargs) + self.certificate = certificate + + +class CertificateDescription(Model): + """The X509 Certificate. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: + :type properties: ~azure.mgmt.iothub.models.CertificateProperties + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The name of the certificate. + :vartype name: str + :ivar etag: The entity tag. + :vartype etag: str + :ivar type: The resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'CertificateProperties'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(CertificateDescription, self).__init__(**kwargs) + self.properties = properties + self.id = None + self.name = None + self.etag = None + self.type = None + + +class CertificateListDescription(Model): + """The JSON-serialized array of Certificate objects. + + :param value: The array of Certificate objects. + :type value: list[~azure.mgmt.iothub.models.CertificateDescription] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateDescription]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(CertificateListDescription, self).__init__(**kwargs) + self.value = value + + +class CertificateProperties(Model): + """The description of an X509 CA Certificate. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar subject: The certificate's subject name. + :vartype subject: str + :ivar expiry: The certificate's expiration date and time. + :vartype expiry: datetime + :ivar thumbprint: The certificate's thumbprint. + :vartype thumbprint: str + :ivar is_verified: Determines whether certificate has been verified. + :vartype is_verified: bool + :ivar created: The certificate's create date and time. + :vartype created: datetime + :ivar updated: The certificate's last update date and time. + :vartype updated: datetime + :param certificate: The certificate content + :type certificate: str + """ + + _validation = { + 'subject': {'readonly': True}, + 'expiry': {'readonly': True}, + 'thumbprint': {'readonly': True}, + 'is_verified': {'readonly': True}, + 'created': {'readonly': True}, + 'updated': {'readonly': True}, + } + + _attribute_map = { + 'subject': {'key': 'subject', 'type': 'str'}, + 'expiry': {'key': 'expiry', 'type': 'rfc-1123'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'is_verified': {'key': 'isVerified', 'type': 'bool'}, + 'created': {'key': 'created', 'type': 'rfc-1123'}, + 'updated': {'key': 'updated', 'type': 'rfc-1123'}, + 'certificate': {'key': 'certificate', 'type': 'str'}, + } + + def __init__(self, *, certificate: str=None, **kwargs) -> None: + super(CertificateProperties, self).__init__(**kwargs) + self.subject = None + self.expiry = None + self.thumbprint = None + self.is_verified = None + self.created = None + self.updated = None + self.certificate = certificate + + +class CertificatePropertiesWithNonce(Model): + """The description of an X509 CA Certificate including the challenge nonce + issued for the Proof-Of-Possession flow. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar subject: The certificate's subject name. + :vartype subject: str + :ivar expiry: The certificate's expiration date and time. + :vartype expiry: datetime + :ivar thumbprint: The certificate's thumbprint. + :vartype thumbprint: str + :ivar is_verified: Determines whether certificate has been verified. + :vartype is_verified: bool + :ivar created: The certificate's create date and time. + :vartype created: datetime + :ivar updated: The certificate's last update date and time. + :vartype updated: datetime + :ivar verification_code: The certificate's verification code that will be + used for proof of possession. + :vartype verification_code: str + :ivar certificate: The certificate content + :vartype certificate: str + """ + + _validation = { + 'subject': {'readonly': True}, + 'expiry': {'readonly': True}, + 'thumbprint': {'readonly': True}, + 'is_verified': {'readonly': True}, + 'created': {'readonly': True}, + 'updated': {'readonly': True}, + 'verification_code': {'readonly': True}, + 'certificate': {'readonly': True}, + } + + _attribute_map = { + 'subject': {'key': 'subject', 'type': 'str'}, + 'expiry': {'key': 'expiry', 'type': 'rfc-1123'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'is_verified': {'key': 'isVerified', 'type': 'bool'}, + 'created': {'key': 'created', 'type': 'rfc-1123'}, + 'updated': {'key': 'updated', 'type': 'rfc-1123'}, + 'verification_code': {'key': 'verificationCode', 'type': 'str'}, + 'certificate': {'key': 'certificate', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificatePropertiesWithNonce, self).__init__(**kwargs) + self.subject = None + self.expiry = None + self.thumbprint = None + self.is_verified = None + self.created = None + self.updated = None + self.verification_code = None + self.certificate = None + + +class CertificateVerificationDescription(Model): + """The JSON-serialized leaf certificate. + + :param certificate: base-64 representation of X509 certificate .cer file + or just .pem file content. + :type certificate: str + """ + + _attribute_map = { + 'certificate': {'key': 'certificate', 'type': 'str'}, + } + + def __init__(self, *, certificate: str=None, **kwargs) -> None: + super(CertificateVerificationDescription, self).__init__(**kwargs) + self.certificate = certificate + + +class CertificateWithNonceDescription(Model): + """The X509 Certificate. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: + :type properties: ~azure.mgmt.iothub.models.CertificatePropertiesWithNonce + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The name of the certificate. + :vartype name: str + :ivar etag: The entity tag. + :vartype etag: str + :ivar type: The resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'CertificatePropertiesWithNonce'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(CertificateWithNonceDescription, self).__init__(**kwargs) + self.properties = properties + self.id = None + self.name = None + self.etag = None + self.type = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class CloudToDeviceProperties(Model): + """The IoT hub cloud-to-device messaging properties. + + :param max_delivery_count: The max delivery count for cloud-to-device + messages in the device queue. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. + :type max_delivery_count: int + :param default_ttl_as_iso8601: The default time to live for + cloud-to-device messages in the device queue. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. + :type default_ttl_as_iso8601: timedelta + :param feedback: + :type feedback: ~azure.mgmt.iothub.models.FeedbackProperties + """ + + _validation = { + 'max_delivery_count': {'maximum': 100, 'minimum': 1}, + } + + _attribute_map = { + 'max_delivery_count': {'key': 'maxDeliveryCount', 'type': 'int'}, + 'default_ttl_as_iso8601': {'key': 'defaultTtlAsIso8601', 'type': 'duration'}, + 'feedback': {'key': 'feedback', 'type': 'FeedbackProperties'}, + } + + def __init__(self, *, max_delivery_count: int=None, default_ttl_as_iso8601=None, feedback=None, **kwargs) -> None: + super(CloudToDeviceProperties, self).__init__(**kwargs) + self.max_delivery_count = max_delivery_count + self.default_ttl_as_iso8601 = default_ttl_as_iso8601 + self.feedback = feedback + + +class EndpointHealthData(Model): + """The health data for an endpoint. + + :param endpoint_id: Id of the endpoint + :type endpoint_id: str + :param health_status: Health statuses have following meanings. The + 'healthy' status shows that the endpoint is accepting messages as + expected. The 'unhealthy' status shows that the endpoint is not accepting + messages as expected and IoT Hub is retrying to send data to this + endpoint. The status of an unhealthy endpoint will be updated to healthy + when IoT Hub has established an eventually consistent state of health. The + 'dead' status shows that the endpoint is not accepting messages, after IoT + Hub retried sending messages for the retrial period. See IoT Hub metrics + to identify errors and monitor issues with endpoints. The 'unknown' status + shows that the IoT Hub has not established a connection with the endpoint. + No messages have been delivered to or rejected from this endpoint. + Possible values include: 'unknown', 'healthy', 'unhealthy', 'dead' + :type health_status: str or ~azure.mgmt.iothub.models.EndpointHealthStatus + """ + + _attribute_map = { + 'endpoint_id': {'key': 'endpointId', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + } + + def __init__(self, *, endpoint_id: str=None, health_status=None, **kwargs) -> None: + super(EndpointHealthData, self).__init__(**kwargs) + self.endpoint_id = endpoint_id + self.health_status = health_status + + +class EnrichmentProperties(Model): + """The properties of an enrichment that your IoT hub applies to messages + delivered to endpoints. + + All required parameters must be populated in order to send to Azure. + + :param key: Required. The key or name for the enrichment property. + :type key: str + :param value: Required. The value for the enrichment property. + :type value: str + :param endpoint_names: Required. The list of endpoints for which the + enrichment is applied to the message. + :type endpoint_names: list[str] + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + 'endpoint_names': {'required': True, 'min_items': 1}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'endpoint_names': {'key': 'endpointNames', 'type': '[str]'}, + } + + def __init__(self, *, key: str, value: str, endpoint_names, **kwargs) -> None: + super(EnrichmentProperties, self).__init__(**kwargs) + self.key = key + self.value = value + self.endpoint_names = endpoint_names + + +class ErrorDetails(Model): + """Error details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar http_status_code: The HTTP status code. + :vartype http_status_code: str + :ivar message: The error message. + :vartype message: str + :ivar details: The error details. + :vartype details: str + """ + + _validation = { + 'code': {'readonly': True}, + 'http_status_code': {'readonly': True}, + 'message': {'readonly': True}, + 'details': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'http_status_code': {'key': 'httpStatusCode', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ErrorDetails, self).__init__(**kwargs) + self.code = None + self.http_status_code = None + self.message = None + self.details = None + + +class ErrorDetailsException(HttpOperationError): + """Server responsed with exception of type: 'ErrorDetails'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorDetailsException, self).__init__(deserialize, response, 'ErrorDetails', *args) + + +class EventHubConsumerGroupInfo(Model): + """The properties of the EventHubConsumerGroupInfo object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: The tags. + :type properties: dict[str, str] + :ivar id: The Event Hub-compatible consumer group identifier. + :vartype id: str + :ivar name: The Event Hub-compatible consumer group name. + :vartype name: str + :ivar type: the resource type. + :vartype type: str + :ivar etag: The etag. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(EventHubConsumerGroupInfo, self).__init__(**kwargs) + self.properties = properties + self.id = None + self.name = None + self.type = None + self.etag = None + + +class EventHubProperties(Model): + """The properties of the provisioned Event Hub-compatible endpoint used by the + IoT hub. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param retention_time_in_days: The retention time for device-to-cloud + messages in days. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages + :type retention_time_in_days: long + :param partition_count: The number of partitions for receiving + device-to-cloud messages in the Event Hub-compatible endpoint. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages. + :type partition_count: int + :ivar partition_ids: The partition ids in the Event Hub-compatible + endpoint. + :vartype partition_ids: list[str] + :ivar path: The Event Hub-compatible name. + :vartype path: str + :ivar endpoint: The Event Hub-compatible endpoint. + :vartype endpoint: str + """ + + _validation = { + 'partition_ids': {'readonly': True}, + 'path': {'readonly': True}, + 'endpoint': {'readonly': True}, + } + + _attribute_map = { + 'retention_time_in_days': {'key': 'retentionTimeInDays', 'type': 'long'}, + 'partition_count': {'key': 'partitionCount', 'type': 'int'}, + 'partition_ids': {'key': 'partitionIds', 'type': '[str]'}, + 'path': {'key': 'path', 'type': 'str'}, + 'endpoint': {'key': 'endpoint', 'type': 'str'}, + } + + def __init__(self, *, retention_time_in_days: int=None, partition_count: int=None, **kwargs) -> None: + super(EventHubProperties, self).__init__(**kwargs) + self.retention_time_in_days = retention_time_in_days + self.partition_count = partition_count + self.partition_ids = None + self.path = None + self.endpoint = None + + +class ExportDevicesRequest(Model): + """Use to provide parameters when requesting an export of all devices in the + IoT hub. + + All required parameters must be populated in order to send to Azure. + + :param export_blob_container_uri: Required. The export blob container URI. + :type export_blob_container_uri: str + :param exclude_keys: Required. The value indicating whether keys should be + excluded during export. + :type exclude_keys: bool + """ + + _validation = { + 'export_blob_container_uri': {'required': True}, + 'exclude_keys': {'required': True}, + } + + _attribute_map = { + 'export_blob_container_uri': {'key': 'exportBlobContainerUri', 'type': 'str'}, + 'exclude_keys': {'key': 'excludeKeys', 'type': 'bool'}, + } + + def __init__(self, *, export_blob_container_uri: str, exclude_keys: bool, **kwargs) -> None: + super(ExportDevicesRequest, self).__init__(**kwargs) + self.export_blob_container_uri = export_blob_container_uri + self.exclude_keys = exclude_keys + + +class FailoverInput(Model): + """Use to provide failover region when requesting manual Failover for a hub. + + All required parameters must be populated in order to send to Azure. + + :param failover_region: Required. Region the hub will be failed over to + :type failover_region: str + """ + + _validation = { + 'failover_region': {'required': True}, + } + + _attribute_map = { + 'failover_region': {'key': 'failoverRegion', 'type': 'str'}, + } + + def __init__(self, *, failover_region: str, **kwargs) -> None: + super(FailoverInput, self).__init__(**kwargs) + self.failover_region = failover_region + + +class FallbackRouteProperties(Model): + """The properties of the fallback route. IoT Hub uses these properties when it + routes messages to the fallback endpoint. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: The name of the route. The name can only include alphanumeric + characters, periods, underscores, hyphens, has a maximum length of 64 + characters, and must be unique. + :type name: str + :ivar source: Required. The source to which the routing rule is to be + applied to. For example, DeviceMessages. Default value: "DeviceMessages" . + :vartype source: str + :param condition: The condition which is evaluated in order to apply the + fallback route. If the condition is not provided it will evaluate to true + by default. For grammar, See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language + :type condition: str + :param endpoint_names: Required. The list of endpoints to which the + messages that satisfy the condition are routed to. Currently only 1 + endpoint is allowed. + :type endpoint_names: list[str] + :param is_enabled: Required. Used to specify whether the fallback route is + enabled. + :type is_enabled: bool + """ + + _validation = { + 'source': {'required': True, 'constant': True}, + 'endpoint_names': {'required': True, 'max_items': 1, 'min_items': 1}, + 'is_enabled': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'condition': {'key': 'condition', 'type': 'str'}, + 'endpoint_names': {'key': 'endpointNames', 'type': '[str]'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + } + + source = "DeviceMessages" + + def __init__(self, *, endpoint_names, is_enabled: bool, name: str=None, condition: str=None, **kwargs) -> None: + super(FallbackRouteProperties, self).__init__(**kwargs) + self.name = name + self.condition = condition + self.endpoint_names = endpoint_names + self.is_enabled = is_enabled + + +class FeedbackProperties(Model): + """The properties of the feedback queue for cloud-to-device messages. + + :param lock_duration_as_iso8601: The lock duration for the feedback queue. + See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. + :type lock_duration_as_iso8601: timedelta + :param ttl_as_iso8601: The period of time for which a message is available + to consume before it is expired by the IoT hub. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. + :type ttl_as_iso8601: timedelta + :param max_delivery_count: The number of times the IoT hub attempts to + deliver a message on the feedback queue. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. + :type max_delivery_count: int + """ + + _validation = { + 'max_delivery_count': {'maximum': 100, 'minimum': 1}, + } + + _attribute_map = { + 'lock_duration_as_iso8601': {'key': 'lockDurationAsIso8601', 'type': 'duration'}, + 'ttl_as_iso8601': {'key': 'ttlAsIso8601', 'type': 'duration'}, + 'max_delivery_count': {'key': 'maxDeliveryCount', 'type': 'int'}, + } + + def __init__(self, *, lock_duration_as_iso8601=None, ttl_as_iso8601=None, max_delivery_count: int=None, **kwargs) -> None: + super(FeedbackProperties, self).__init__(**kwargs) + self.lock_duration_as_iso8601 = lock_duration_as_iso8601 + self.ttl_as_iso8601 = ttl_as_iso8601 + self.max_delivery_count = max_delivery_count + + +class ImportDevicesRequest(Model): + """Use to provide parameters when requesting an import of all devices in the + hub. + + All required parameters must be populated in order to send to Azure. + + :param input_blob_container_uri: Required. The input blob container URI. + :type input_blob_container_uri: str + :param output_blob_container_uri: Required. The output blob container URI. + :type output_blob_container_uri: str + """ + + _validation = { + 'input_blob_container_uri': {'required': True}, + 'output_blob_container_uri': {'required': True}, + } + + _attribute_map = { + 'input_blob_container_uri': {'key': 'inputBlobContainerUri', 'type': 'str'}, + 'output_blob_container_uri': {'key': 'outputBlobContainerUri', 'type': 'str'}, + } + + def __init__(self, *, input_blob_container_uri: str, output_blob_container_uri: str, **kwargs) -> None: + super(ImportDevicesRequest, self).__init__(**kwargs) + self.input_blob_container_uri = input_blob_container_uri + self.output_blob_container_uri = output_blob_container_uri + + +class IotHubCapacity(Model): + """IoT Hub capacity information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar minimum: The minimum number of units. + :vartype minimum: long + :ivar maximum: The maximum number of units. + :vartype maximum: long + :ivar default: The default number of units. + :vartype default: long + :ivar scale_type: The type of the scaling enabled. Possible values + include: 'Automatic', 'Manual', 'None' + :vartype scale_type: str or ~azure.mgmt.iothub.models.IotHubScaleType + """ + + _validation = { + 'minimum': {'readonly': True, 'maximum': 1, 'minimum': 1}, + 'maximum': {'readonly': True}, + 'default': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'long'}, + 'maximum': {'key': 'maximum', 'type': 'long'}, + 'default': {'key': 'default', 'type': 'long'}, + 'scale_type': {'key': 'scaleType', 'type': 'IotHubScaleType'}, + } + + def __init__(self, **kwargs) -> None: + super(IotHubCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default = None + self.scale_type = None + + +class Resource(Model): + """The common properties of an Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :param location: Required. The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True, 'pattern': r'^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$'}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class IotHubDescription(Resource): + """The description of the IoT hub. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :param location: Required. The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param etag: The Etag field is *not* required. If it is provided in the + response body, it must also be provided as a header per the normal ETag + convention. + :type etag: str + :param properties: IotHub properties + :type properties: ~azure.mgmt.iothub.models.IotHubProperties + :param sku: Required. IotHub SKU info + :type sku: ~azure.mgmt.iothub.models.IotHubSkuInfo + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True, 'pattern': r'^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$'}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'sku': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'IotHubProperties'}, + 'sku': {'key': 'sku', 'type': 'IotHubSkuInfo'}, + } + + def __init__(self, *, location: str, sku, tags=None, etag: str=None, properties=None, **kwargs) -> None: + super(IotHubDescription, self).__init__(location=location, tags=tags, **kwargs) + self.etag = etag + self.properties = properties + self.sku = sku + + +class IotHubLocationDescription(Model): + """Public representation of one of the locations where a resource is + provisioned. + + :param location: Azure Geo Regions + :type location: str + :param role: Specific Role assigned to this location. Possible values + include: 'primary', 'secondary' + :type role: str or ~azure.mgmt.iothub.models.IotHubReplicaRoleType + """ + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'role': {'key': 'role', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, role=None, **kwargs) -> None: + super(IotHubLocationDescription, self).__init__(**kwargs) + self.location = location + self.role = role + + +class IotHubNameAvailabilityInfo(Model): + """The properties indicating whether a given IoT hub name is available. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name_available: The value which indicates whether the provided name + is available. + :vartype name_available: bool + :ivar reason: The reason for unavailability. Possible values include: + 'Invalid', 'AlreadyExists' + :vartype reason: str or + ~azure.mgmt.iothub.models.IotHubNameUnavailabilityReason + :param message: The detailed reason message. + :type message: str + """ + + _validation = { + 'name_available': {'readonly': True}, + 'reason': {'readonly': True}, + } + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'IotHubNameUnavailabilityReason'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, message: str=None, **kwargs) -> None: + super(IotHubNameAvailabilityInfo, self).__init__(**kwargs) + self.name_available = None + self.reason = None + self.message = message + + +class IotHubProperties(Model): + """The properties of an IoT hub. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param authorization_policies: The shared access policies you can use to + secure a connection to the IoT hub. + :type authorization_policies: + list[~azure.mgmt.iothub.models.SharedAccessSignatureAuthorizationRule] + :param ip_filter_rules: The IP filter rules. + :type ip_filter_rules: list[~azure.mgmt.iothub.models.IpFilterRule] + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + :ivar state: The hub state. + :vartype state: str + :ivar host_name: The name of the host. + :vartype host_name: str + :param event_hub_endpoints: The Event Hub-compatible endpoint properties. + The only possible keys to this dictionary is events. This key has to be + present in the dictionary while making create or update calls for the IoT + hub. + :type event_hub_endpoints: dict[str, + ~azure.mgmt.iothub.models.EventHubProperties] + :param routing: + :type routing: ~azure.mgmt.iothub.models.RoutingProperties + :param storage_endpoints: The list of Azure Storage endpoints where you + can upload files. Currently you can configure only one Azure Storage + account and that MUST have its key as $default. Specifying more than one + storage account causes an error to be thrown. Not specifying a value for + this property when the enableFileUploadNotifications property is set to + True, causes an error to be thrown. + :type storage_endpoints: dict[str, + ~azure.mgmt.iothub.models.StorageEndpointProperties] + :param messaging_endpoints: The messaging endpoint properties for the file + upload notification queue. + :type messaging_endpoints: dict[str, + ~azure.mgmt.iothub.models.MessagingEndpointProperties] + :param enable_file_upload_notifications: If True, file upload + notifications are enabled. + :type enable_file_upload_notifications: bool + :param cloud_to_device: + :type cloud_to_device: ~azure.mgmt.iothub.models.CloudToDeviceProperties + :param comments: IoT hub comments. + :type comments: str + :param device_streams: The device streams properties of iothub. + :type device_streams: + ~azure.mgmt.iothub.models.IotHubPropertiesDeviceStreams + :param features: The capabilities and features enabled for the IoT hub. + Possible values include: 'None', 'DeviceManagement' + :type features: str or ~azure.mgmt.iothub.models.Capabilities + :ivar locations: Primary and secondary location for iot hub + :vartype locations: + list[~azure.mgmt.iothub.models.IotHubLocationDescription] + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'state': {'readonly': True}, + 'host_name': {'readonly': True}, + 'locations': {'readonly': True}, + } + + _attribute_map = { + 'authorization_policies': {'key': 'authorizationPolicies', 'type': '[SharedAccessSignatureAuthorizationRule]'}, + 'ip_filter_rules': {'key': 'ipFilterRules', 'type': '[IpFilterRule]'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'host_name': {'key': 'hostName', 'type': 'str'}, + 'event_hub_endpoints': {'key': 'eventHubEndpoints', 'type': '{EventHubProperties}'}, + 'routing': {'key': 'routing', 'type': 'RoutingProperties'}, + 'storage_endpoints': {'key': 'storageEndpoints', 'type': '{StorageEndpointProperties}'}, + 'messaging_endpoints': {'key': 'messagingEndpoints', 'type': '{MessagingEndpointProperties}'}, + 'enable_file_upload_notifications': {'key': 'enableFileUploadNotifications', 'type': 'bool'}, + 'cloud_to_device': {'key': 'cloudToDevice', 'type': 'CloudToDeviceProperties'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'device_streams': {'key': 'deviceStreams', 'type': 'IotHubPropertiesDeviceStreams'}, + 'features': {'key': 'features', 'type': 'str'}, + 'locations': {'key': 'locations', 'type': '[IotHubLocationDescription]'}, + } + + def __init__(self, *, authorization_policies=None, ip_filter_rules=None, event_hub_endpoints=None, routing=None, storage_endpoints=None, messaging_endpoints=None, enable_file_upload_notifications: bool=None, cloud_to_device=None, comments: str=None, device_streams=None, features=None, **kwargs) -> None: + super(IotHubProperties, self).__init__(**kwargs) + self.authorization_policies = authorization_policies + self.ip_filter_rules = ip_filter_rules + self.provisioning_state = None + self.state = None + self.host_name = None + self.event_hub_endpoints = event_hub_endpoints + self.routing = routing + self.storage_endpoints = storage_endpoints + self.messaging_endpoints = messaging_endpoints + self.enable_file_upload_notifications = enable_file_upload_notifications + self.cloud_to_device = cloud_to_device + self.comments = comments + self.device_streams = device_streams + self.features = features + self.locations = None + + +class IotHubPropertiesDeviceStreams(Model): + """The device streams properties of iothub. + + :param streaming_endpoints: List of Device Streams Endpoints. + :type streaming_endpoints: list[str] + """ + + _attribute_map = { + 'streaming_endpoints': {'key': 'streamingEndpoints', 'type': '[str]'}, + } + + def __init__(self, *, streaming_endpoints=None, **kwargs) -> None: + super(IotHubPropertiesDeviceStreams, self).__init__(**kwargs) + self.streaming_endpoints = streaming_endpoints + + +class IotHubQuotaMetricInfo(Model): + """Quota metrics properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the quota metric. + :vartype name: str + :ivar current_value: The current value for the quota metric. + :vartype current_value: long + :ivar max_value: The maximum value of the quota metric. + :vartype max_value: long + """ + + _validation = { + 'name': {'readonly': True}, + 'current_value': {'readonly': True}, + 'max_value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'long'}, + 'max_value': {'key': 'maxValue', 'type': 'long'}, + } + + def __init__(self, **kwargs) -> None: + super(IotHubQuotaMetricInfo, self).__init__(**kwargs) + self.name = None + self.current_value = None + self.max_value = None + + +class IotHubSkuDescription(Model): + """SKU properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar resource_type: The type of the resource. + :vartype resource_type: str + :param sku: Required. The type of the resource. + :type sku: ~azure.mgmt.iothub.models.IotHubSkuInfo + :param capacity: Required. IotHub capacity + :type capacity: ~azure.mgmt.iothub.models.IotHubCapacity + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'sku': {'required': True}, + 'capacity': {'required': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'IotHubSkuInfo'}, + 'capacity': {'key': 'capacity', 'type': 'IotHubCapacity'}, + } + + def __init__(self, *, sku, capacity, **kwargs) -> None: + super(IotHubSkuDescription, self).__init__(**kwargs) + self.resource_type = None + self.sku = sku + self.capacity = capacity + + +class IotHubSkuInfo(Model): + """Information about the SKU of the IoT hub. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU. Possible values include: 'F1', + 'S1', 'S2', 'S3', 'B1', 'B2', 'B3' + :type name: str or ~azure.mgmt.iothub.models.IotHubSku + :ivar tier: The billing tier for the IoT hub. Possible values include: + 'Free', 'Standard', 'Basic' + :vartype tier: str or ~azure.mgmt.iothub.models.IotHubSkuTier + :param capacity: The number of provisioned IoT Hub units. See: + https://docs.microsoft.com/azure/azure-subscription-service-limits#iot-hub-limits. + :type capacity: long + """ + + _validation = { + 'name': {'required': True}, + 'tier': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'IotHubSkuTier'}, + 'capacity': {'key': 'capacity', 'type': 'long'}, + } + + def __init__(self, *, name, capacity: int=None, **kwargs) -> None: + super(IotHubSkuInfo, self).__init__(**kwargs) + self.name = name + self.tier = None + self.capacity = capacity + + +class IpFilterRule(Model): + """The IP filter rules for the IoT hub. + + All required parameters must be populated in order to send to Azure. + + :param filter_name: Required. The name of the IP filter rule. + :type filter_name: str + :param action: Required. The desired action for requests captured by this + rule. Possible values include: 'Accept', 'Reject' + :type action: str or ~azure.mgmt.iothub.models.IpFilterActionType + :param ip_mask: Required. A string that contains the IP address range in + CIDR notation for the rule. + :type ip_mask: str + """ + + _validation = { + 'filter_name': {'required': True}, + 'action': {'required': True}, + 'ip_mask': {'required': True}, + } + + _attribute_map = { + 'filter_name': {'key': 'filterName', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'IpFilterActionType'}, + 'ip_mask': {'key': 'ipMask', 'type': 'str'}, + } + + def __init__(self, *, filter_name: str, action, ip_mask: str, **kwargs) -> None: + super(IpFilterRule, self).__init__(**kwargs) + self.filter_name = filter_name + self.action = action + self.ip_mask = ip_mask + + +class JobResponse(Model): + """The properties of the Job Response object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar job_id: The job identifier. + :vartype job_id: str + :ivar start_time_utc: The start time of the job. + :vartype start_time_utc: datetime + :ivar end_time_utc: The time the job stopped processing. + :vartype end_time_utc: datetime + :ivar type: The type of the job. Possible values include: 'unknown', + 'export', 'import', 'backup', 'readDeviceProperties', + 'writeDeviceProperties', 'updateDeviceConfiguration', 'rebootDevice', + 'factoryResetDevice', 'firmwareUpdate' + :vartype type: str or ~azure.mgmt.iothub.models.JobType + :ivar status: The status of the job. Possible values include: 'unknown', + 'enqueued', 'running', 'completed', 'failed', 'cancelled' + :vartype status: str or ~azure.mgmt.iothub.models.JobStatus + :ivar failure_reason: If status == failed, this string containing the + reason for the failure. + :vartype failure_reason: str + :ivar status_message: The status message for the job. + :vartype status_message: str + :ivar parent_job_id: The job identifier of the parent job, if any. + :vartype parent_job_id: str + """ + + _validation = { + 'job_id': {'readonly': True}, + 'start_time_utc': {'readonly': True}, + 'end_time_utc': {'readonly': True}, + 'type': {'readonly': True}, + 'status': {'readonly': True}, + 'failure_reason': {'readonly': True}, + 'status_message': {'readonly': True}, + 'parent_job_id': {'readonly': True}, + } + + _attribute_map = { + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'start_time_utc': {'key': 'startTimeUtc', 'type': 'rfc-1123'}, + 'end_time_utc': {'key': 'endTimeUtc', 'type': 'rfc-1123'}, + 'type': {'key': 'type', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'JobStatus'}, + 'failure_reason': {'key': 'failureReason', 'type': 'str'}, + 'status_message': {'key': 'statusMessage', 'type': 'str'}, + 'parent_job_id': {'key': 'parentJobId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(JobResponse, self).__init__(**kwargs) + self.job_id = None + self.start_time_utc = None + self.end_time_utc = None + self.type = None + self.status = None + self.failure_reason = None + self.status_message = None + self.parent_job_id = None + + +class MatchedRoute(Model): + """Routes that matched. + + :param properties: Properties of routes that matched + :type properties: ~azure.mgmt.iothub.models.RouteProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'RouteProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(MatchedRoute, self).__init__(**kwargs) + self.properties = properties + + +class MessagingEndpointProperties(Model): + """The properties of the messaging endpoints used by this IoT hub. + + :param lock_duration_as_iso8601: The lock duration. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. + :type lock_duration_as_iso8601: timedelta + :param ttl_as_iso8601: The period of time for which a message is available + to consume before it is expired by the IoT hub. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. + :type ttl_as_iso8601: timedelta + :param max_delivery_count: The number of times the IoT hub attempts to + deliver a message. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. + :type max_delivery_count: int + """ + + _validation = { + 'max_delivery_count': {'maximum': 100, 'minimum': 1}, + } + + _attribute_map = { + 'lock_duration_as_iso8601': {'key': 'lockDurationAsIso8601', 'type': 'duration'}, + 'ttl_as_iso8601': {'key': 'ttlAsIso8601', 'type': 'duration'}, + 'max_delivery_count': {'key': 'maxDeliveryCount', 'type': 'int'}, + } + + def __init__(self, *, lock_duration_as_iso8601=None, ttl_as_iso8601=None, max_delivery_count: int=None, **kwargs) -> None: + super(MessagingEndpointProperties, self).__init__(**kwargs) + self.lock_duration_as_iso8601 = lock_duration_as_iso8601 + self.ttl_as_iso8601 = ttl_as_iso8601 + self.max_delivery_count = max_delivery_count + + +class Name(Model): + """Name of Iot Hub type. + + :param value: IotHub type + :type value: str + :param localized_value: Localized value of name + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: + super(Name, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value + + +class Operation(Model): + """IoT Hub REST API operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation name: {provider}/{resource}/{read | write | action | + delete} + :vartype name: str + :param display: The object that represents the operation. + :type display: ~azure.mgmt.iothub.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = display + + +class OperationDisplay(Model): + """The object that represents the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: Service provider: Microsoft Devices + :vartype provider: str + :ivar resource: Resource Type: IotHubs + :vartype resource: str + :ivar operation: Name of the operation + :vartype operation: str + :ivar description: Description of the operation + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class OperationInputs(Model): + """Input values. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the IoT hub to check. + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str, **kwargs) -> None: + super(OperationInputs, self).__init__(**kwargs) + self.name = name + + +class RegistryStatistics(Model): + """Identity registry statistics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar total_device_count: The total count of devices in the identity + registry. + :vartype total_device_count: long + :ivar enabled_device_count: The count of enabled devices in the identity + registry. + :vartype enabled_device_count: long + :ivar disabled_device_count: The count of disabled devices in the identity + registry. + :vartype disabled_device_count: long + """ + + _validation = { + 'total_device_count': {'readonly': True}, + 'enabled_device_count': {'readonly': True}, + 'disabled_device_count': {'readonly': True}, + } + + _attribute_map = { + 'total_device_count': {'key': 'totalDeviceCount', 'type': 'long'}, + 'enabled_device_count': {'key': 'enabledDeviceCount', 'type': 'long'}, + 'disabled_device_count': {'key': 'disabledDeviceCount', 'type': 'long'}, + } + + def __init__(self, **kwargs) -> None: + super(RegistryStatistics, self).__init__(**kwargs) + self.total_device_count = None + self.enabled_device_count = None + self.disabled_device_count = None + + +class RouteCompilationError(Model): + """Compilation error when evaluating route. + + :param message: Route error message + :type message: str + :param severity: Severity of the route error. Possible values include: + 'error', 'warning' + :type severity: str or ~azure.mgmt.iothub.models.RouteErrorSeverity + :param location: Location where the route error happened + :type location: ~azure.mgmt.iothub.models.RouteErrorRange + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'severity': {'key': 'severity', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'RouteErrorRange'}, + } + + def __init__(self, *, message: str=None, severity=None, location=None, **kwargs) -> None: + super(RouteCompilationError, self).__init__(**kwargs) + self.message = message + self.severity = severity + self.location = location + + +class RouteErrorPosition(Model): + """Position where the route error happened. + + :param line: Line where the route error happened + :type line: int + :param column: Column where the route error happened + :type column: int + """ + + _attribute_map = { + 'line': {'key': 'line', 'type': 'int'}, + 'column': {'key': 'column', 'type': 'int'}, + } + + def __init__(self, *, line: int=None, column: int=None, **kwargs) -> None: + super(RouteErrorPosition, self).__init__(**kwargs) + self.line = line + self.column = column + + +class RouteErrorRange(Model): + """Range of route errors. + + :param start: Start where the route error happened + :type start: ~azure.mgmt.iothub.models.RouteErrorPosition + :param end: End where the route error happened + :type end: ~azure.mgmt.iothub.models.RouteErrorPosition + """ + + _attribute_map = { + 'start': {'key': 'start', 'type': 'RouteErrorPosition'}, + 'end': {'key': 'end', 'type': 'RouteErrorPosition'}, + } + + def __init__(self, *, start=None, end=None, **kwargs) -> None: + super(RouteErrorRange, self).__init__(**kwargs) + self.start = start + self.end = end + + +class RouteProperties(Model): + """The properties of a routing rule that your IoT hub uses to route messages + to endpoints. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the route. The name can only include + alphanumeric characters, periods, underscores, hyphens, has a maximum + length of 64 characters, and must be unique. + :type name: str + :param source: Required. The source that the routing rule is to be applied + to, such as DeviceMessages. Possible values include: 'Invalid', + 'DeviceMessages', 'TwinChangeEvents', 'DeviceLifecycleEvents', + 'DeviceJobLifecycleEvents' + :type source: str or ~azure.mgmt.iothub.models.RoutingSource + :param condition: The condition that is evaluated to apply the routing + rule. If no condition is provided, it evaluates to true by default. For + grammar, see: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language + :type condition: str + :param endpoint_names: Required. The list of endpoints to which messages + that satisfy the condition are routed. Currently only one endpoint is + allowed. + :type endpoint_names: list[str] + :param is_enabled: Required. Used to specify whether a route is enabled. + :type is_enabled: bool + """ + + _validation = { + 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, + 'source': {'required': True}, + 'endpoint_names': {'required': True, 'max_items': 1, 'min_items': 1}, + 'is_enabled': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'condition': {'key': 'condition', 'type': 'str'}, + 'endpoint_names': {'key': 'endpointNames', 'type': '[str]'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + } + + def __init__(self, *, name: str, source, endpoint_names, is_enabled: bool, condition: str=None, **kwargs) -> None: + super(RouteProperties, self).__init__(**kwargs) + self.name = name + self.source = source + self.condition = condition + self.endpoint_names = endpoint_names + self.is_enabled = is_enabled + + +class RoutingEndpoints(Model): + """The properties related to the custom endpoints to which your IoT hub routes + messages based on the routing rules. A maximum of 10 custom endpoints are + allowed across all endpoint types for paid hubs and only 1 custom endpoint + is allowed across all endpoint types for free hubs. + + :param service_bus_queues: The list of Service Bus queue endpoints that + IoT hub routes the messages to, based on the routing rules. + :type service_bus_queues: + list[~azure.mgmt.iothub.models.RoutingServiceBusQueueEndpointProperties] + :param service_bus_topics: The list of Service Bus topic endpoints that + the IoT hub routes the messages to, based on the routing rules. + :type service_bus_topics: + list[~azure.mgmt.iothub.models.RoutingServiceBusTopicEndpointProperties] + :param event_hubs: The list of Event Hubs endpoints that IoT hub routes + messages to, based on the routing rules. This list does not include the + built-in Event Hubs endpoint. + :type event_hubs: + list[~azure.mgmt.iothub.models.RoutingEventHubProperties] + :param storage_containers: The list of storage container endpoints that + IoT hub routes messages to, based on the routing rules. + :type storage_containers: + list[~azure.mgmt.iothub.models.RoutingStorageContainerProperties] + """ + + _attribute_map = { + 'service_bus_queues': {'key': 'serviceBusQueues', 'type': '[RoutingServiceBusQueueEndpointProperties]'}, + 'service_bus_topics': {'key': 'serviceBusTopics', 'type': '[RoutingServiceBusTopicEndpointProperties]'}, + 'event_hubs': {'key': 'eventHubs', 'type': '[RoutingEventHubProperties]'}, + 'storage_containers': {'key': 'storageContainers', 'type': '[RoutingStorageContainerProperties]'}, + } + + def __init__(self, *, service_bus_queues=None, service_bus_topics=None, event_hubs=None, storage_containers=None, **kwargs) -> None: + super(RoutingEndpoints, self).__init__(**kwargs) + self.service_bus_queues = service_bus_queues + self.service_bus_topics = service_bus_topics + self.event_hubs = event_hubs + self.storage_containers = storage_containers + + +class RoutingEventHubProperties(Model): + """The properties related to an event hub endpoint. + + All required parameters must be populated in order to send to Azure. + + :param connection_string: Required. The connection string of the event hub + endpoint. + :type connection_string: str + :param name: Required. The name that identifies this endpoint. The name + can only include alphanumeric characters, periods, underscores, hyphens + and has a maximum length of 64 characters. The following names are + reserved: events, fileNotifications, $default. Endpoint names must be + unique across endpoint types. + :type name: str + :param subscription_id: The subscription identifier of the event hub + endpoint. + :type subscription_id: str + :param resource_group: The name of the resource group of the event hub + endpoint. + :type resource_group: str + """ + + _validation = { + 'connection_string': {'required': True}, + 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, + } + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + } + + def __init__(self, *, connection_string: str, name: str, subscription_id: str=None, resource_group: str=None, **kwargs) -> None: + super(RoutingEventHubProperties, self).__init__(**kwargs) + self.connection_string = connection_string + self.name = name + self.subscription_id = subscription_id + self.resource_group = resource_group + + +class RoutingMessage(Model): + """Routing message. + + :param body: Body of routing message + :type body: str + :param app_properties: App properties + :type app_properties: dict[str, str] + :param system_properties: System properties + :type system_properties: dict[str, str] + """ + + _attribute_map = { + 'body': {'key': 'body', 'type': 'str'}, + 'app_properties': {'key': 'appProperties', 'type': '{str}'}, + 'system_properties': {'key': 'systemProperties', 'type': '{str}'}, + } + + def __init__(self, *, body: str=None, app_properties=None, system_properties=None, **kwargs) -> None: + super(RoutingMessage, self).__init__(**kwargs) + self.body = body + self.app_properties = app_properties + self.system_properties = system_properties + + +class RoutingProperties(Model): + """The routing related properties of the IoT hub. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging. + + :param endpoints: + :type endpoints: ~azure.mgmt.iothub.models.RoutingEndpoints + :param routes: The list of user-provided routing rules that the IoT hub + uses to route messages to built-in and custom endpoints. A maximum of 100 + routing rules are allowed for paid hubs and a maximum of 5 routing rules + are allowed for free hubs. + :type routes: list[~azure.mgmt.iothub.models.RouteProperties] + :param fallback_route: The properties of the route that is used as a + fall-back route when none of the conditions specified in the 'routes' + section are met. This is an optional parameter. When this property is not + set, the messages which do not meet any of the conditions specified in the + 'routes' section get routed to the built-in eventhub endpoint. + :type fallback_route: ~azure.mgmt.iothub.models.FallbackRouteProperties + :param enrichments: The list of user-provided enrichments that the IoT hub + applies to messages to be delivered to built-in and custom endpoints. See: + https://aka.ms/iotmsgenrich + :type enrichments: list[~azure.mgmt.iothub.models.EnrichmentProperties] + """ + + _attribute_map = { + 'endpoints': {'key': 'endpoints', 'type': 'RoutingEndpoints'}, + 'routes': {'key': 'routes', 'type': '[RouteProperties]'}, + 'fallback_route': {'key': 'fallbackRoute', 'type': 'FallbackRouteProperties'}, + 'enrichments': {'key': 'enrichments', 'type': '[EnrichmentProperties]'}, + } + + def __init__(self, *, endpoints=None, routes=None, fallback_route=None, enrichments=None, **kwargs) -> None: + super(RoutingProperties, self).__init__(**kwargs) + self.endpoints = endpoints + self.routes = routes + self.fallback_route = fallback_route + self.enrichments = enrichments + + +class RoutingServiceBusQueueEndpointProperties(Model): + """The properties related to service bus queue endpoint types. + + All required parameters must be populated in order to send to Azure. + + :param connection_string: Required. The connection string of the service + bus queue endpoint. + :type connection_string: str + :param name: Required. The name that identifies this endpoint. The name + can only include alphanumeric characters, periods, underscores, hyphens + and has a maximum length of 64 characters. The following names are + reserved: events, fileNotifications, $default. Endpoint names must be + unique across endpoint types. The name need not be the same as the actual + queue name. + :type name: str + :param subscription_id: The subscription identifier of the service bus + queue endpoint. + :type subscription_id: str + :param resource_group: The name of the resource group of the service bus + queue endpoint. + :type resource_group: str + """ + + _validation = { + 'connection_string': {'required': True}, + 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, + } + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + } + + def __init__(self, *, connection_string: str, name: str, subscription_id: str=None, resource_group: str=None, **kwargs) -> None: + super(RoutingServiceBusQueueEndpointProperties, self).__init__(**kwargs) + self.connection_string = connection_string + self.name = name + self.subscription_id = subscription_id + self.resource_group = resource_group + + +class RoutingServiceBusTopicEndpointProperties(Model): + """The properties related to service bus topic endpoint types. + + All required parameters must be populated in order to send to Azure. + + :param connection_string: Required. The connection string of the service + bus topic endpoint. + :type connection_string: str + :param name: Required. The name that identifies this endpoint. The name + can only include alphanumeric characters, periods, underscores, hyphens + and has a maximum length of 64 characters. The following names are + reserved: events, fileNotifications, $default. Endpoint names must be + unique across endpoint types. The name need not be the same as the actual + topic name. + :type name: str + :param subscription_id: The subscription identifier of the service bus + topic endpoint. + :type subscription_id: str + :param resource_group: The name of the resource group of the service bus + topic endpoint. + :type resource_group: str + """ + + _validation = { + 'connection_string': {'required': True}, + 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, + } + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + } + + def __init__(self, *, connection_string: str, name: str, subscription_id: str=None, resource_group: str=None, **kwargs) -> None: + super(RoutingServiceBusTopicEndpointProperties, self).__init__(**kwargs) + self.connection_string = connection_string + self.name = name + self.subscription_id = subscription_id + self.resource_group = resource_group + + +class RoutingStorageContainerProperties(Model): + """The properties related to a storage container endpoint. + + All required parameters must be populated in order to send to Azure. + + :param connection_string: Required. The connection string of the storage + account. + :type connection_string: str + :param name: Required. The name that identifies this endpoint. The name + can only include alphanumeric characters, periods, underscores, hyphens + and has a maximum length of 64 characters. The following names are + reserved: events, fileNotifications, $default. Endpoint names must be + unique across endpoint types. + :type name: str + :param subscription_id: The subscription identifier of the storage + account. + :type subscription_id: str + :param resource_group: The name of the resource group of the storage + account. + :type resource_group: str + :param container_name: Required. The name of storage container in the + storage account. + :type container_name: str + :param file_name_format: File name format for the blob. Default format is + {iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}. All parameters are + mandatory but can be reordered. + :type file_name_format: str + :param batch_frequency_in_seconds: Time interval at which blobs are + written to storage. Value should be between 60 and 720 seconds. Default + value is 300 seconds. + :type batch_frequency_in_seconds: int + :param max_chunk_size_in_bytes: Maximum number of bytes for each blob + written to storage. Value should be between 10485760(10MB) and + 524288000(500MB). Default value is 314572800(300MB). + :type max_chunk_size_in_bytes: int + :param encoding: Encoding that is used to serialize messages to blobs. + Supported values are 'avro', 'avrodeflate', and 'JSON'. Default value is + 'avro'. Possible values include: 'Avro', 'AvroDeflate', 'JSON' + :type encoding: str or ~azure.mgmt.iothub.models.enum + """ + + _validation = { + 'connection_string': {'required': True}, + 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, + 'container_name': {'required': True}, + 'batch_frequency_in_seconds': {'maximum': 720, 'minimum': 60}, + 'max_chunk_size_in_bytes': {'maximum': 524288000, 'minimum': 10485760}, + } + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'file_name_format': {'key': 'fileNameFormat', 'type': 'str'}, + 'batch_frequency_in_seconds': {'key': 'batchFrequencyInSeconds', 'type': 'int'}, + 'max_chunk_size_in_bytes': {'key': 'maxChunkSizeInBytes', 'type': 'int'}, + 'encoding': {'key': 'encoding', 'type': 'str'}, + } + + def __init__(self, *, connection_string: str, name: str, container_name: str, subscription_id: str=None, resource_group: str=None, file_name_format: str=None, batch_frequency_in_seconds: int=None, max_chunk_size_in_bytes: int=None, encoding=None, **kwargs) -> None: + super(RoutingStorageContainerProperties, self).__init__(**kwargs) + self.connection_string = connection_string + self.name = name + self.subscription_id = subscription_id + self.resource_group = resource_group + self.container_name = container_name + self.file_name_format = file_name_format + self.batch_frequency_in_seconds = batch_frequency_in_seconds + self.max_chunk_size_in_bytes = max_chunk_size_in_bytes + self.encoding = encoding + + +class RoutingTwin(Model): + """Twin reference input parameter. This is an optional parameter. + + :param tags: Twin Tags + :type tags: object + :param properties: + :type properties: ~azure.mgmt.iothub.models.RoutingTwinProperties + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': 'object'}, + 'properties': {'key': 'properties', 'type': 'RoutingTwinProperties'}, + } + + def __init__(self, *, tags=None, properties=None, **kwargs) -> None: + super(RoutingTwin, self).__init__(**kwargs) + self.tags = tags + self.properties = properties + + +class RoutingTwinProperties(Model): + """RoutingTwinProperties. + + :param desired: Twin desired properties + :type desired: object + :param reported: Twin desired properties + :type reported: object + """ + + _attribute_map = { + 'desired': {'key': 'desired', 'type': 'object'}, + 'reported': {'key': 'reported', 'type': 'object'}, + } + + def __init__(self, *, desired=None, reported=None, **kwargs) -> None: + super(RoutingTwinProperties, self).__init__(**kwargs) + self.desired = desired + self.reported = reported + + +class SharedAccessSignatureAuthorizationRule(Model): + """The properties of an IoT hub shared access policy. + + All required parameters must be populated in order to send to Azure. + + :param key_name: Required. The name of the shared access policy. + :type key_name: str + :param primary_key: The primary key. + :type primary_key: str + :param secondary_key: The secondary key. + :type secondary_key: str + :param rights: Required. The permissions assigned to the shared access + policy. Possible values include: 'RegistryRead', 'RegistryWrite', + 'ServiceConnect', 'DeviceConnect', 'RegistryRead, RegistryWrite', + 'RegistryRead, ServiceConnect', 'RegistryRead, DeviceConnect', + 'RegistryWrite, ServiceConnect', 'RegistryWrite, DeviceConnect', + 'ServiceConnect, DeviceConnect', 'RegistryRead, RegistryWrite, + ServiceConnect', 'RegistryRead, RegistryWrite, DeviceConnect', + 'RegistryRead, ServiceConnect, DeviceConnect', 'RegistryWrite, + ServiceConnect, DeviceConnect', 'RegistryRead, RegistryWrite, + ServiceConnect, DeviceConnect' + :type rights: str or ~azure.mgmt.iothub.models.AccessRights + """ + + _validation = { + 'key_name': {'required': True}, + 'rights': {'required': True}, + } + + _attribute_map = { + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + 'rights': {'key': 'rights', 'type': 'AccessRights'}, + } + + def __init__(self, *, key_name: str, rights, primary_key: str=None, secondary_key: str=None, **kwargs) -> None: + super(SharedAccessSignatureAuthorizationRule, self).__init__(**kwargs) + self.key_name = key_name + self.primary_key = primary_key + self.secondary_key = secondary_key + self.rights = rights + + +class StorageEndpointProperties(Model): + """The properties of the Azure Storage endpoint for file upload. + + All required parameters must be populated in order to send to Azure. + + :param sas_ttl_as_iso8601: The period of time for which the SAS URI + generated by IoT Hub for file upload is valid. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload#file-upload-notification-configuration-options. + :type sas_ttl_as_iso8601: timedelta + :param connection_string: Required. The connection string for the Azure + Storage account to which files are uploaded. + :type connection_string: str + :param container_name: Required. The name of the root container where you + upload files. The container need not exist but should be creatable using + the connectionString specified. + :type container_name: str + """ + + _validation = { + 'connection_string': {'required': True}, + 'container_name': {'required': True}, + } + + _attribute_map = { + 'sas_ttl_as_iso8601': {'key': 'sasTtlAsIso8601', 'type': 'duration'}, + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + } + + def __init__(self, *, connection_string: str, container_name: str, sas_ttl_as_iso8601=None, **kwargs) -> None: + super(StorageEndpointProperties, self).__init__(**kwargs) + self.sas_ttl_as_iso8601 = sas_ttl_as_iso8601 + self.connection_string = connection_string + self.container_name = container_name + + +class TagsResource(Model): + """A container holding only the Tags for a resource, allowing the user to + update the tags on an IoT Hub instance. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(TagsResource, self).__init__(**kwargs) + self.tags = tags + + +class TestAllRoutesInput(Model): + """Input for testing all routes. + + :param routing_source: Routing source. Possible values include: 'Invalid', + 'DeviceMessages', 'TwinChangeEvents', 'DeviceLifecycleEvents', + 'DeviceJobLifecycleEvents' + :type routing_source: str or ~azure.mgmt.iothub.models.RoutingSource + :param message: Routing message + :type message: ~azure.mgmt.iothub.models.RoutingMessage + :param twin: Routing Twin Reference + :type twin: ~azure.mgmt.iothub.models.RoutingTwin + """ + + _attribute_map = { + 'routing_source': {'key': 'routingSource', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'RoutingMessage'}, + 'twin': {'key': 'twin', 'type': 'RoutingTwin'}, + } + + def __init__(self, *, routing_source=None, message=None, twin=None, **kwargs) -> None: + super(TestAllRoutesInput, self).__init__(**kwargs) + self.routing_source = routing_source + self.message = message + self.twin = twin + + +class TestAllRoutesResult(Model): + """Result of testing all routes. + + :param routes: JSON-serialized array of matched routes + :type routes: list[~azure.mgmt.iothub.models.MatchedRoute] + """ + + _attribute_map = { + 'routes': {'key': 'routes', 'type': '[MatchedRoute]'}, + } + + def __init__(self, *, routes=None, **kwargs) -> None: + super(TestAllRoutesResult, self).__init__(**kwargs) + self.routes = routes + + +class TestRouteInput(Model): + """Input for testing route. + + All required parameters must be populated in order to send to Azure. + + :param message: Routing message + :type message: ~azure.mgmt.iothub.models.RoutingMessage + :param route: Required. Route properties + :type route: ~azure.mgmt.iothub.models.RouteProperties + :param twin: Routing Twin Reference + :type twin: ~azure.mgmt.iothub.models.RoutingTwin + """ + + _validation = { + 'route': {'required': True}, + } + + _attribute_map = { + 'message': {'key': 'message', 'type': 'RoutingMessage'}, + 'route': {'key': 'route', 'type': 'RouteProperties'}, + 'twin': {'key': 'twin', 'type': 'RoutingTwin'}, + } + + def __init__(self, *, route, message=None, twin=None, **kwargs) -> None: + super(TestRouteInput, self).__init__(**kwargs) + self.message = message + self.route = route + self.twin = twin + + +class TestRouteResult(Model): + """Result of testing one route. + + :param result: Result of testing route. Possible values include: + 'undefined', 'false', 'true' + :type result: str or ~azure.mgmt.iothub.models.TestResultStatus + :param details: Detailed result of testing route + :type details: ~azure.mgmt.iothub.models.TestRouteResultDetails + """ + + _attribute_map = { + 'result': {'key': 'result', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'TestRouteResultDetails'}, + } + + def __init__(self, *, result=None, details=None, **kwargs) -> None: + super(TestRouteResult, self).__init__(**kwargs) + self.result = result + self.details = details + + +class TestRouteResultDetails(Model): + """Detailed result of testing a route. + + :param compilation_errors: JSON-serialized list of route compilation + errors + :type compilation_errors: + list[~azure.mgmt.iothub.models.RouteCompilationError] + """ + + _attribute_map = { + 'compilation_errors': {'key': 'compilationErrors', 'type': '[RouteCompilationError]'}, + } + + def __init__(self, *, compilation_errors=None, **kwargs) -> None: + super(TestRouteResultDetails, self).__init__(**kwargs) + self.compilation_errors = compilation_errors + + +class UserSubscriptionQuota(Model): + """User subscription quota response. + + :param id: IotHub type id + :type id: str + :param type: Response type + :type type: str + :param unit: Unit of IotHub type + :type unit: str + :param current_value: Current number of IotHub type + :type current_value: int + :param limit: Numerical limit on IotHub type + :type limit: int + :param name: IotHub type + :type name: ~azure.mgmt.iothub.models.Name + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'Name'}, + } + + def __init__(self, *, id: str=None, type: str=None, unit: str=None, current_value: int=None, limit: int=None, name=None, **kwargs) -> None: + super(UserSubscriptionQuota, self).__init__(**kwargs) + self.id = id + self.type = type + self.unit = unit + self.current_value = current_value + self.limit = limit + self.name = name + + +class UserSubscriptionQuotaListResult(Model): + """Json-serialized array of User subscription quota response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param value: + :type value: list[~azure.mgmt.iothub.models.UserSubscriptionQuota] + :ivar next_link: + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[UserSubscriptionQuota]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(UserSubscriptionQuotaListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_paged_models.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_paged_models.py new file mode 100644 index 000000000000..9efc5c83f755 --- /dev/null +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_paged_models.py @@ -0,0 +1,118 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class IotHubDescriptionPaged(Paged): + """ + A paging container for iterating over a list of :class:`IotHubDescription ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[IotHubDescription]'} + } + + def __init__(self, *args, **kwargs): + + super(IotHubDescriptionPaged, self).__init__(*args, **kwargs) +class IotHubSkuDescriptionPaged(Paged): + """ + A paging container for iterating over a list of :class:`IotHubSkuDescription ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[IotHubSkuDescription]'} + } + + def __init__(self, *args, **kwargs): + + super(IotHubSkuDescriptionPaged, self).__init__(*args, **kwargs) +class EventHubConsumerGroupInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`EventHubConsumerGroupInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[EventHubConsumerGroupInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(EventHubConsumerGroupInfoPaged, self).__init__(*args, **kwargs) +class JobResponsePaged(Paged): + """ + A paging container for iterating over a list of :class:`JobResponse ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobResponse]'} + } + + def __init__(self, *args, **kwargs): + + super(JobResponsePaged, self).__init__(*args, **kwargs) +class IotHubQuotaMetricInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`IotHubQuotaMetricInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[IotHubQuotaMetricInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(IotHubQuotaMetricInfoPaged, self).__init__(*args, **kwargs) +class EndpointHealthDataPaged(Paged): + """ + A paging container for iterating over a list of :class:`EndpointHealthData ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[EndpointHealthData]'} + } + + def __init__(self, *args, **kwargs): + + super(EndpointHealthDataPaged, self).__init__(*args, **kwargs) +class SharedAccessSignatureAuthorizationRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`SharedAccessSignatureAuthorizationRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SharedAccessSignatureAuthorizationRule]'} + } + + def __init__(self, *args, **kwargs): + + super(SharedAccessSignatureAuthorizationRulePaged, self).__init__(*args, **kwargs) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_body_description.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_body_description.py deleted file mode 100644 index 5d5a6544d3dd..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_body_description.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CertificateBodyDescription(Model): - """The JSON-serialized X509 Certificate. - - :param certificate: base-64 representation of the X509 leaf certificate - .cer file or just .pem file content. - :type certificate: str - """ - - _attribute_map = { - 'certificate': {'key': 'certificate', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CertificateBodyDescription, self).__init__(**kwargs) - self.certificate = kwargs.get('certificate', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_body_description_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_body_description_py3.py deleted file mode 100644 index be4943779261..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_body_description_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CertificateBodyDescription(Model): - """The JSON-serialized X509 Certificate. - - :param certificate: base-64 representation of the X509 leaf certificate - .cer file or just .pem file content. - :type certificate: str - """ - - _attribute_map = { - 'certificate': {'key': 'certificate', 'type': 'str'}, - } - - def __init__(self, *, certificate: str=None, **kwargs) -> None: - super(CertificateBodyDescription, self).__init__(**kwargs) - self.certificate = certificate diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_description.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_description.py deleted file mode 100644 index 479940e33fd2..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_description.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CertificateDescription(Model): - """The X509 Certificate. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param properties: - :type properties: ~azure.mgmt.iothub.models.CertificateProperties - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The name of the certificate. - :vartype name: str - :ivar etag: The entity tag. - :vartype etag: str - :ivar type: The resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'etag': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'CertificateProperties'}, - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CertificateDescription, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.id = None - self.name = None - self.etag = None - self.type = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_description_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_description_py3.py deleted file mode 100644 index 2c96f61a5857..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_description_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CertificateDescription(Model): - """The X509 Certificate. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param properties: - :type properties: ~azure.mgmt.iothub.models.CertificateProperties - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The name of the certificate. - :vartype name: str - :ivar etag: The entity tag. - :vartype etag: str - :ivar type: The resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'etag': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'CertificateProperties'}, - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(CertificateDescription, self).__init__(**kwargs) - self.properties = properties - self.id = None - self.name = None - self.etag = None - self.type = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_list_description.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_list_description.py deleted file mode 100644 index c52bf8439ba9..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_list_description.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CertificateListDescription(Model): - """The JSON-serialized array of Certificate objects. - - :param value: The array of Certificate objects. - :type value: list[~azure.mgmt.iothub.models.CertificateDescription] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[CertificateDescription]'}, - } - - def __init__(self, **kwargs): - super(CertificateListDescription, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_list_description_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_list_description_py3.py deleted file mode 100644 index 9047516be862..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_list_description_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CertificateListDescription(Model): - """The JSON-serialized array of Certificate objects. - - :param value: The array of Certificate objects. - :type value: list[~azure.mgmt.iothub.models.CertificateDescription] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[CertificateDescription]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(CertificateListDescription, self).__init__(**kwargs) - self.value = value diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_properties.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_properties.py deleted file mode 100644 index eaf2548f0f76..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_properties.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CertificateProperties(Model): - """The description of an X509 CA Certificate. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar subject: The certificate's subject name. - :vartype subject: str - :ivar expiry: The certificate's expiration date and time. - :vartype expiry: datetime - :ivar thumbprint: The certificate's thumbprint. - :vartype thumbprint: str - :ivar is_verified: Determines whether certificate has been verified. - :vartype is_verified: bool - :ivar created: The certificate's create date and time. - :vartype created: datetime - :ivar updated: The certificate's last update date and time. - :vartype updated: datetime - :param certificate: The certificate content - :type certificate: str - """ - - _validation = { - 'subject': {'readonly': True}, - 'expiry': {'readonly': True}, - 'thumbprint': {'readonly': True}, - 'is_verified': {'readonly': True}, - 'created': {'readonly': True}, - 'updated': {'readonly': True}, - } - - _attribute_map = { - 'subject': {'key': 'subject', 'type': 'str'}, - 'expiry': {'key': 'expiry', 'type': 'rfc-1123'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, - 'is_verified': {'key': 'isVerified', 'type': 'bool'}, - 'created': {'key': 'created', 'type': 'rfc-1123'}, - 'updated': {'key': 'updated', 'type': 'rfc-1123'}, - 'certificate': {'key': 'certificate', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CertificateProperties, self).__init__(**kwargs) - self.subject = None - self.expiry = None - self.thumbprint = None - self.is_verified = None - self.created = None - self.updated = None - self.certificate = kwargs.get('certificate', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_properties_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_properties_py3.py deleted file mode 100644 index d9ac812152ce..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_properties_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CertificateProperties(Model): - """The description of an X509 CA Certificate. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar subject: The certificate's subject name. - :vartype subject: str - :ivar expiry: The certificate's expiration date and time. - :vartype expiry: datetime - :ivar thumbprint: The certificate's thumbprint. - :vartype thumbprint: str - :ivar is_verified: Determines whether certificate has been verified. - :vartype is_verified: bool - :ivar created: The certificate's create date and time. - :vartype created: datetime - :ivar updated: The certificate's last update date and time. - :vartype updated: datetime - :param certificate: The certificate content - :type certificate: str - """ - - _validation = { - 'subject': {'readonly': True}, - 'expiry': {'readonly': True}, - 'thumbprint': {'readonly': True}, - 'is_verified': {'readonly': True}, - 'created': {'readonly': True}, - 'updated': {'readonly': True}, - } - - _attribute_map = { - 'subject': {'key': 'subject', 'type': 'str'}, - 'expiry': {'key': 'expiry', 'type': 'rfc-1123'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, - 'is_verified': {'key': 'isVerified', 'type': 'bool'}, - 'created': {'key': 'created', 'type': 'rfc-1123'}, - 'updated': {'key': 'updated', 'type': 'rfc-1123'}, - 'certificate': {'key': 'certificate', 'type': 'str'}, - } - - def __init__(self, *, certificate: str=None, **kwargs) -> None: - super(CertificateProperties, self).__init__(**kwargs) - self.subject = None - self.expiry = None - self.thumbprint = None - self.is_verified = None - self.created = None - self.updated = None - self.certificate = certificate diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_properties_with_nonce.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_properties_with_nonce.py deleted file mode 100644 index b5c2e7eb3a5f..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_properties_with_nonce.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CertificatePropertiesWithNonce(Model): - """The description of an X509 CA Certificate including the challenge nonce - issued for the Proof-Of-Possession flow. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar subject: The certificate's subject name. - :vartype subject: str - :ivar expiry: The certificate's expiration date and time. - :vartype expiry: datetime - :ivar thumbprint: The certificate's thumbprint. - :vartype thumbprint: str - :ivar is_verified: Determines whether certificate has been verified. - :vartype is_verified: bool - :ivar created: The certificate's create date and time. - :vartype created: datetime - :ivar updated: The certificate's last update date and time. - :vartype updated: datetime - :ivar verification_code: The certificate's verification code that will be - used for proof of possession. - :vartype verification_code: str - :ivar certificate: The certificate content - :vartype certificate: str - """ - - _validation = { - 'subject': {'readonly': True}, - 'expiry': {'readonly': True}, - 'thumbprint': {'readonly': True}, - 'is_verified': {'readonly': True}, - 'created': {'readonly': True}, - 'updated': {'readonly': True}, - 'verification_code': {'readonly': True}, - 'certificate': {'readonly': True}, - } - - _attribute_map = { - 'subject': {'key': 'subject', 'type': 'str'}, - 'expiry': {'key': 'expiry', 'type': 'rfc-1123'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, - 'is_verified': {'key': 'isVerified', 'type': 'bool'}, - 'created': {'key': 'created', 'type': 'rfc-1123'}, - 'updated': {'key': 'updated', 'type': 'rfc-1123'}, - 'verification_code': {'key': 'verificationCode', 'type': 'str'}, - 'certificate': {'key': 'certificate', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CertificatePropertiesWithNonce, self).__init__(**kwargs) - self.subject = None - self.expiry = None - self.thumbprint = None - self.is_verified = None - self.created = None - self.updated = None - self.verification_code = None - self.certificate = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_properties_with_nonce_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_properties_with_nonce_py3.py deleted file mode 100644 index 019bbed44de5..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_properties_with_nonce_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CertificatePropertiesWithNonce(Model): - """The description of an X509 CA Certificate including the challenge nonce - issued for the Proof-Of-Possession flow. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar subject: The certificate's subject name. - :vartype subject: str - :ivar expiry: The certificate's expiration date and time. - :vartype expiry: datetime - :ivar thumbprint: The certificate's thumbprint. - :vartype thumbprint: str - :ivar is_verified: Determines whether certificate has been verified. - :vartype is_verified: bool - :ivar created: The certificate's create date and time. - :vartype created: datetime - :ivar updated: The certificate's last update date and time. - :vartype updated: datetime - :ivar verification_code: The certificate's verification code that will be - used for proof of possession. - :vartype verification_code: str - :ivar certificate: The certificate content - :vartype certificate: str - """ - - _validation = { - 'subject': {'readonly': True}, - 'expiry': {'readonly': True}, - 'thumbprint': {'readonly': True}, - 'is_verified': {'readonly': True}, - 'created': {'readonly': True}, - 'updated': {'readonly': True}, - 'verification_code': {'readonly': True}, - 'certificate': {'readonly': True}, - } - - _attribute_map = { - 'subject': {'key': 'subject', 'type': 'str'}, - 'expiry': {'key': 'expiry', 'type': 'rfc-1123'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, - 'is_verified': {'key': 'isVerified', 'type': 'bool'}, - 'created': {'key': 'created', 'type': 'rfc-1123'}, - 'updated': {'key': 'updated', 'type': 'rfc-1123'}, - 'verification_code': {'key': 'verificationCode', 'type': 'str'}, - 'certificate': {'key': 'certificate', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(CertificatePropertiesWithNonce, self).__init__(**kwargs) - self.subject = None - self.expiry = None - self.thumbprint = None - self.is_verified = None - self.created = None - self.updated = None - self.verification_code = None - self.certificate = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_verification_description.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_verification_description.py deleted file mode 100644 index 58611d8cf66d..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_verification_description.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CertificateVerificationDescription(Model): - """The JSON-serialized leaf certificate. - - :param certificate: base-64 representation of X509 certificate .cer file - or just .pem file content. - :type certificate: str - """ - - _attribute_map = { - 'certificate': {'key': 'certificate', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CertificateVerificationDescription, self).__init__(**kwargs) - self.certificate = kwargs.get('certificate', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_verification_description_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_verification_description_py3.py deleted file mode 100644 index 7d243745f243..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_verification_description_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CertificateVerificationDescription(Model): - """The JSON-serialized leaf certificate. - - :param certificate: base-64 representation of X509 certificate .cer file - or just .pem file content. - :type certificate: str - """ - - _attribute_map = { - 'certificate': {'key': 'certificate', 'type': 'str'}, - } - - def __init__(self, *, certificate: str=None, **kwargs) -> None: - super(CertificateVerificationDescription, self).__init__(**kwargs) - self.certificate = certificate diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_with_nonce_description.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_with_nonce_description.py deleted file mode 100644 index 67ccd1c69340..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_with_nonce_description.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CertificateWithNonceDescription(Model): - """The X509 Certificate. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param properties: - :type properties: ~azure.mgmt.iothub.models.CertificatePropertiesWithNonce - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The name of the certificate. - :vartype name: str - :ivar etag: The entity tag. - :vartype etag: str - :ivar type: The resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'etag': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'CertificatePropertiesWithNonce'}, - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CertificateWithNonceDescription, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.id = None - self.name = None - self.etag = None - self.type = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_with_nonce_description_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_with_nonce_description_py3.py deleted file mode 100644 index aeec07b9c021..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_with_nonce_description_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CertificateWithNonceDescription(Model): - """The X509 Certificate. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param properties: - :type properties: ~azure.mgmt.iothub.models.CertificatePropertiesWithNonce - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The name of the certificate. - :vartype name: str - :ivar etag: The entity tag. - :vartype etag: str - :ivar type: The resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'etag': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'CertificatePropertiesWithNonce'}, - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(CertificateWithNonceDescription, self).__init__(**kwargs) - self.properties = properties - self.id = None - self.name = None - self.etag = None - self.type = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/cloud_to_device_properties.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/cloud_to_device_properties.py deleted file mode 100644 index 9b2600c2cd7f..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/cloud_to_device_properties.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CloudToDeviceProperties(Model): - """The IoT hub cloud-to-device messaging properties. - - :param max_delivery_count: The max delivery count for cloud-to-device - messages in the device queue. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - :type max_delivery_count: int - :param default_ttl_as_iso8601: The default time to live for - cloud-to-device messages in the device queue. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - :type default_ttl_as_iso8601: timedelta - :param feedback: - :type feedback: ~azure.mgmt.iothub.models.FeedbackProperties - """ - - _validation = { - 'max_delivery_count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'max_delivery_count': {'key': 'maxDeliveryCount', 'type': 'int'}, - 'default_ttl_as_iso8601': {'key': 'defaultTtlAsIso8601', 'type': 'duration'}, - 'feedback': {'key': 'feedback', 'type': 'FeedbackProperties'}, - } - - def __init__(self, **kwargs): - super(CloudToDeviceProperties, self).__init__(**kwargs) - self.max_delivery_count = kwargs.get('max_delivery_count', None) - self.default_ttl_as_iso8601 = kwargs.get('default_ttl_as_iso8601', None) - self.feedback = kwargs.get('feedback', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/cloud_to_device_properties_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/cloud_to_device_properties_py3.py deleted file mode 100644 index 60ee732c9492..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/cloud_to_device_properties_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CloudToDeviceProperties(Model): - """The IoT hub cloud-to-device messaging properties. - - :param max_delivery_count: The max delivery count for cloud-to-device - messages in the device queue. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - :type max_delivery_count: int - :param default_ttl_as_iso8601: The default time to live for - cloud-to-device messages in the device queue. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - :type default_ttl_as_iso8601: timedelta - :param feedback: - :type feedback: ~azure.mgmt.iothub.models.FeedbackProperties - """ - - _validation = { - 'max_delivery_count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'max_delivery_count': {'key': 'maxDeliveryCount', 'type': 'int'}, - 'default_ttl_as_iso8601': {'key': 'defaultTtlAsIso8601', 'type': 'duration'}, - 'feedback': {'key': 'feedback', 'type': 'FeedbackProperties'}, - } - - def __init__(self, *, max_delivery_count: int=None, default_ttl_as_iso8601=None, feedback=None, **kwargs) -> None: - super(CloudToDeviceProperties, self).__init__(**kwargs) - self.max_delivery_count = max_delivery_count - self.default_ttl_as_iso8601 = default_ttl_as_iso8601 - self.feedback = feedback diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/endpoint_health_data.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/endpoint_health_data.py deleted file mode 100644 index 835a14982b81..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/endpoint_health_data.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EndpointHealthData(Model): - """The health data for an endpoint. - - :param endpoint_id: Id of the endpoint - :type endpoint_id: str - :param health_status: Health statuses have following meanings. The - 'healthy' status shows that the endpoint is accepting messages as - expected. The 'unhealthy' status shows that the endpoint is not accepting - messages as expected and IoT Hub is retrying to send data to this - endpoint. The status of an unhealthy endpoint will be updated to healthy - when IoT Hub has established an eventually consistent state of health. The - 'dead' status shows that the endpoint is not accepting messages, after IoT - Hub retried sending messages for the retrial period. See IoT Hub metrics - to identify errors and monitor issues with endpoints. The 'unknown' status - shows that the IoT Hub has not established a connection with the endpoint. - No messages have been delivered to or rejected from this endpoint. - Possible values include: 'unknown', 'healthy', 'unhealthy', 'dead' - :type health_status: str or ~azure.mgmt.iothub.models.EndpointHealthStatus - """ - - _attribute_map = { - 'endpoint_id': {'key': 'endpointId', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EndpointHealthData, self).__init__(**kwargs) - self.endpoint_id = kwargs.get('endpoint_id', None) - self.health_status = kwargs.get('health_status', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/endpoint_health_data_paged.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/endpoint_health_data_paged.py deleted file mode 100644 index 7f46f9c3517d..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/endpoint_health_data_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class EndpointHealthDataPaged(Paged): - """ - A paging container for iterating over a list of :class:`EndpointHealthData ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[EndpointHealthData]'} - } - - def __init__(self, *args, **kwargs): - - super(EndpointHealthDataPaged, self).__init__(*args, **kwargs) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/endpoint_health_data_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/endpoint_health_data_py3.py deleted file mode 100644 index 1c98d7ca9e3c..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/endpoint_health_data_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EndpointHealthData(Model): - """The health data for an endpoint. - - :param endpoint_id: Id of the endpoint - :type endpoint_id: str - :param health_status: Health statuses have following meanings. The - 'healthy' status shows that the endpoint is accepting messages as - expected. The 'unhealthy' status shows that the endpoint is not accepting - messages as expected and IoT Hub is retrying to send data to this - endpoint. The status of an unhealthy endpoint will be updated to healthy - when IoT Hub has established an eventually consistent state of health. The - 'dead' status shows that the endpoint is not accepting messages, after IoT - Hub retried sending messages for the retrial period. See IoT Hub metrics - to identify errors and monitor issues with endpoints. The 'unknown' status - shows that the IoT Hub has not established a connection with the endpoint. - No messages have been delivered to or rejected from this endpoint. - Possible values include: 'unknown', 'healthy', 'unhealthy', 'dead' - :type health_status: str or ~azure.mgmt.iothub.models.EndpointHealthStatus - """ - - _attribute_map = { - 'endpoint_id': {'key': 'endpointId', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - } - - def __init__(self, *, endpoint_id: str=None, health_status=None, **kwargs) -> None: - super(EndpointHealthData, self).__init__(**kwargs) - self.endpoint_id = endpoint_id - self.health_status = health_status diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/enrichment_properties.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/enrichment_properties.py deleted file mode 100644 index 113f005e19f2..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/enrichment_properties.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EnrichmentProperties(Model): - """The properties of an enrichment that your IoT hub applies to messages - delivered to endpoints. - - All required parameters must be populated in order to send to Azure. - - :param key: Required. The key or name for the enrichment property. - :type key: str - :param value: Required. The value for the enrichment property. - :type value: str - :param endpoint_names: Required. The list of endpoints for which the - enrichment is applied to the message. - :type endpoint_names: list[str] - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - 'endpoint_names': {'required': True, 'min_items': 1}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - 'endpoint_names': {'key': 'endpointNames', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(EnrichmentProperties, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.value = kwargs.get('value', None) - self.endpoint_names = kwargs.get('endpoint_names', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/enrichment_properties_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/enrichment_properties_py3.py deleted file mode 100644 index 6a03f19fb6f8..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/enrichment_properties_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EnrichmentProperties(Model): - """The properties of an enrichment that your IoT hub applies to messages - delivered to endpoints. - - All required parameters must be populated in order to send to Azure. - - :param key: Required. The key or name for the enrichment property. - :type key: str - :param value: Required. The value for the enrichment property. - :type value: str - :param endpoint_names: Required. The list of endpoints for which the - enrichment is applied to the message. - :type endpoint_names: list[str] - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - 'endpoint_names': {'required': True, 'min_items': 1}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - 'endpoint_names': {'key': 'endpointNames', 'type': '[str]'}, - } - - def __init__(self, *, key: str, value: str, endpoint_names, **kwargs) -> None: - super(EnrichmentProperties, self).__init__(**kwargs) - self.key = key - self.value = value - self.endpoint_names = endpoint_names diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/error_details.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/error_details.py deleted file mode 100644 index 77a408028562..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/error_details.py +++ /dev/null @@ -1,63 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class ErrorDetails(Model): - """Error details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar http_status_code: The HTTP status code. - :vartype http_status_code: str - :ivar message: The error message. - :vartype message: str - :ivar details: The error details. - :vartype details: str - """ - - _validation = { - 'code': {'readonly': True}, - 'http_status_code': {'readonly': True}, - 'message': {'readonly': True}, - 'details': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'http_status_code': {'key': 'httpStatusCode', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ErrorDetails, self).__init__(**kwargs) - self.code = None - self.http_status_code = None - self.message = None - self.details = None - - -class ErrorDetailsException(HttpOperationError): - """Server responsed with exception of type: 'ErrorDetails'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorDetailsException, self).__init__(deserialize, response, 'ErrorDetails', *args) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/error_details_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/error_details_py3.py deleted file mode 100644 index a78684fab905..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/error_details_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class ErrorDetails(Model): - """Error details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar http_status_code: The HTTP status code. - :vartype http_status_code: str - :ivar message: The error message. - :vartype message: str - :ivar details: The error details. - :vartype details: str - """ - - _validation = { - 'code': {'readonly': True}, - 'http_status_code': {'readonly': True}, - 'message': {'readonly': True}, - 'details': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'http_status_code': {'key': 'httpStatusCode', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ErrorDetails, self).__init__(**kwargs) - self.code = None - self.http_status_code = None - self.message = None - self.details = None - - -class ErrorDetailsException(HttpOperationError): - """Server responsed with exception of type: 'ErrorDetails'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorDetailsException, self).__init__(deserialize, response, 'ErrorDetails', *args) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/event_hub_consumer_group_info.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/event_hub_consumer_group_info.py deleted file mode 100644 index b290422ca982..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/event_hub_consumer_group_info.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventHubConsumerGroupInfo(Model): - """The properties of the EventHubConsumerGroupInfo object. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param properties: The tags. - :type properties: dict[str, str] - :ivar id: The Event Hub-compatible consumer group identifier. - :vartype id: str - :ivar name: The Event Hub-compatible consumer group name. - :vartype name: str - :ivar type: the resource type. - :vartype type: str - :ivar etag: The etag. - :vartype etag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': '{str}'}, - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EventHubConsumerGroupInfo, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.id = None - self.name = None - self.type = None - self.etag = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/event_hub_consumer_group_info_paged.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/event_hub_consumer_group_info_paged.py deleted file mode 100644 index 260e39bc3032..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/event_hub_consumer_group_info_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class EventHubConsumerGroupInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`EventHubConsumerGroupInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[EventHubConsumerGroupInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(EventHubConsumerGroupInfoPaged, self).__init__(*args, **kwargs) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/event_hub_consumer_group_info_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/event_hub_consumer_group_info_py3.py deleted file mode 100644 index c4ee4c17d78d..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/event_hub_consumer_group_info_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventHubConsumerGroupInfo(Model): - """The properties of the EventHubConsumerGroupInfo object. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param properties: The tags. - :type properties: dict[str, str] - :ivar id: The Event Hub-compatible consumer group identifier. - :vartype id: str - :ivar name: The Event Hub-compatible consumer group name. - :vartype name: str - :ivar type: the resource type. - :vartype type: str - :ivar etag: The etag. - :vartype etag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': '{str}'}, - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(EventHubConsumerGroupInfo, self).__init__(**kwargs) - self.properties = properties - self.id = None - self.name = None - self.type = None - self.etag = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/event_hub_properties.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/event_hub_properties.py deleted file mode 100644 index 8bdf6ac53f20..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/event_hub_properties.py +++ /dev/null @@ -1,59 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventHubProperties(Model): - """The properties of the provisioned Event Hub-compatible endpoint used by the - IoT hub. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param retention_time_in_days: The retention time for device-to-cloud - messages in days. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages - :type retention_time_in_days: long - :param partition_count: The number of partitions for receiving - device-to-cloud messages in the Event Hub-compatible endpoint. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages. - :type partition_count: int - :ivar partition_ids: The partition ids in the Event Hub-compatible - endpoint. - :vartype partition_ids: list[str] - :ivar path: The Event Hub-compatible name. - :vartype path: str - :ivar endpoint: The Event Hub-compatible endpoint. - :vartype endpoint: str - """ - - _validation = { - 'partition_ids': {'readonly': True}, - 'path': {'readonly': True}, - 'endpoint': {'readonly': True}, - } - - _attribute_map = { - 'retention_time_in_days': {'key': 'retentionTimeInDays', 'type': 'long'}, - 'partition_count': {'key': 'partitionCount', 'type': 'int'}, - 'partition_ids': {'key': 'partitionIds', 'type': '[str]'}, - 'path': {'key': 'path', 'type': 'str'}, - 'endpoint': {'key': 'endpoint', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EventHubProperties, self).__init__(**kwargs) - self.retention_time_in_days = kwargs.get('retention_time_in_days', None) - self.partition_count = kwargs.get('partition_count', None) - self.partition_ids = None - self.path = None - self.endpoint = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/event_hub_properties_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/event_hub_properties_py3.py deleted file mode 100644 index 9a53091d02f8..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/event_hub_properties_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventHubProperties(Model): - """The properties of the provisioned Event Hub-compatible endpoint used by the - IoT hub. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param retention_time_in_days: The retention time for device-to-cloud - messages in days. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages - :type retention_time_in_days: long - :param partition_count: The number of partitions for receiving - device-to-cloud messages in the Event Hub-compatible endpoint. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages. - :type partition_count: int - :ivar partition_ids: The partition ids in the Event Hub-compatible - endpoint. - :vartype partition_ids: list[str] - :ivar path: The Event Hub-compatible name. - :vartype path: str - :ivar endpoint: The Event Hub-compatible endpoint. - :vartype endpoint: str - """ - - _validation = { - 'partition_ids': {'readonly': True}, - 'path': {'readonly': True}, - 'endpoint': {'readonly': True}, - } - - _attribute_map = { - 'retention_time_in_days': {'key': 'retentionTimeInDays', 'type': 'long'}, - 'partition_count': {'key': 'partitionCount', 'type': 'int'}, - 'partition_ids': {'key': 'partitionIds', 'type': '[str]'}, - 'path': {'key': 'path', 'type': 'str'}, - 'endpoint': {'key': 'endpoint', 'type': 'str'}, - } - - def __init__(self, *, retention_time_in_days: int=None, partition_count: int=None, **kwargs) -> None: - super(EventHubProperties, self).__init__(**kwargs) - self.retention_time_in_days = retention_time_in_days - self.partition_count = partition_count - self.partition_ids = None - self.path = None - self.endpoint = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/export_devices_request.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/export_devices_request.py deleted file mode 100644 index 2ae6463c8681..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/export_devices_request.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExportDevicesRequest(Model): - """Use to provide parameters when requesting an export of all devices in the - IoT hub. - - All required parameters must be populated in order to send to Azure. - - :param export_blob_container_uri: Required. The export blob container URI. - :type export_blob_container_uri: str - :param exclude_keys: Required. The value indicating whether keys should be - excluded during export. - :type exclude_keys: bool - """ - - _validation = { - 'export_blob_container_uri': {'required': True}, - 'exclude_keys': {'required': True}, - } - - _attribute_map = { - 'export_blob_container_uri': {'key': 'exportBlobContainerUri', 'type': 'str'}, - 'exclude_keys': {'key': 'excludeKeys', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ExportDevicesRequest, self).__init__(**kwargs) - self.export_blob_container_uri = kwargs.get('export_blob_container_uri', None) - self.exclude_keys = kwargs.get('exclude_keys', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/export_devices_request_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/export_devices_request_py3.py deleted file mode 100644 index 1e616734a4ea..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/export_devices_request_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExportDevicesRequest(Model): - """Use to provide parameters when requesting an export of all devices in the - IoT hub. - - All required parameters must be populated in order to send to Azure. - - :param export_blob_container_uri: Required. The export blob container URI. - :type export_blob_container_uri: str - :param exclude_keys: Required. The value indicating whether keys should be - excluded during export. - :type exclude_keys: bool - """ - - _validation = { - 'export_blob_container_uri': {'required': True}, - 'exclude_keys': {'required': True}, - } - - _attribute_map = { - 'export_blob_container_uri': {'key': 'exportBlobContainerUri', 'type': 'str'}, - 'exclude_keys': {'key': 'excludeKeys', 'type': 'bool'}, - } - - def __init__(self, *, export_blob_container_uri: str, exclude_keys: bool, **kwargs) -> None: - super(ExportDevicesRequest, self).__init__(**kwargs) - self.export_blob_container_uri = export_blob_container_uri - self.exclude_keys = exclude_keys diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/failover_input.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/failover_input.py deleted file mode 100644 index b5dfb7ae9fa3..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/failover_input.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverInput(Model): - """Use to provide failover region when requesting manual Failover for a hub. - - All required parameters must be populated in order to send to Azure. - - :param failover_region: Required. Region the hub will be failed over to - :type failover_region: str - """ - - _validation = { - 'failover_region': {'required': True}, - } - - _attribute_map = { - 'failover_region': {'key': 'failoverRegion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FailoverInput, self).__init__(**kwargs) - self.failover_region = kwargs.get('failover_region', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/failover_input_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/failover_input_py3.py deleted file mode 100644 index ef122f223f28..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/failover_input_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverInput(Model): - """Use to provide failover region when requesting manual Failover for a hub. - - All required parameters must be populated in order to send to Azure. - - :param failover_region: Required. Region the hub will be failed over to - :type failover_region: str - """ - - _validation = { - 'failover_region': {'required': True}, - } - - _attribute_map = { - 'failover_region': {'key': 'failoverRegion', 'type': 'str'}, - } - - def __init__(self, *, failover_region: str, **kwargs) -> None: - super(FailoverInput, self).__init__(**kwargs) - self.failover_region = failover_region diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/fallback_route_properties.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/fallback_route_properties.py deleted file mode 100644 index b93285c2a10b..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/fallback_route_properties.py +++ /dev/null @@ -1,66 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FallbackRouteProperties(Model): - """The properties of the fallback route. IoT Hub uses these properties when it - routes messages to the fallback endpoint. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: The name of the route. The name can only include alphanumeric - characters, periods, underscores, hyphens, has a maximum length of 64 - characters, and must be unique. - :type name: str - :ivar source: Required. The source to which the routing rule is to be - applied to. For example, DeviceMessages. Default value: "DeviceMessages" . - :vartype source: str - :param condition: The condition which is evaluated in order to apply the - fallback route. If the condition is not provided it will evaluate to true - by default. For grammar, See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language - :type condition: str - :param endpoint_names: Required. The list of endpoints to which the - messages that satisfy the condition are routed to. Currently only 1 - endpoint is allowed. - :type endpoint_names: list[str] - :param is_enabled: Required. Used to specify whether the fallback route is - enabled. - :type is_enabled: bool - """ - - _validation = { - 'source': {'required': True, 'constant': True}, - 'endpoint_names': {'required': True, 'max_items': 1, 'min_items': 1}, - 'is_enabled': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'condition': {'key': 'condition', 'type': 'str'}, - 'endpoint_names': {'key': 'endpointNames', 'type': '[str]'}, - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - } - - source = "DeviceMessages" - - def __init__(self, **kwargs): - super(FallbackRouteProperties, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.condition = kwargs.get('condition', None) - self.endpoint_names = kwargs.get('endpoint_names', None) - self.is_enabled = kwargs.get('is_enabled', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/fallback_route_properties_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/fallback_route_properties_py3.py deleted file mode 100644 index f70e677c4932..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/fallback_route_properties_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FallbackRouteProperties(Model): - """The properties of the fallback route. IoT Hub uses these properties when it - routes messages to the fallback endpoint. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: The name of the route. The name can only include alphanumeric - characters, periods, underscores, hyphens, has a maximum length of 64 - characters, and must be unique. - :type name: str - :ivar source: Required. The source to which the routing rule is to be - applied to. For example, DeviceMessages. Default value: "DeviceMessages" . - :vartype source: str - :param condition: The condition which is evaluated in order to apply the - fallback route. If the condition is not provided it will evaluate to true - by default. For grammar, See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language - :type condition: str - :param endpoint_names: Required. The list of endpoints to which the - messages that satisfy the condition are routed to. Currently only 1 - endpoint is allowed. - :type endpoint_names: list[str] - :param is_enabled: Required. Used to specify whether the fallback route is - enabled. - :type is_enabled: bool - """ - - _validation = { - 'source': {'required': True, 'constant': True}, - 'endpoint_names': {'required': True, 'max_items': 1, 'min_items': 1}, - 'is_enabled': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'condition': {'key': 'condition', 'type': 'str'}, - 'endpoint_names': {'key': 'endpointNames', 'type': '[str]'}, - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - } - - source = "DeviceMessages" - - def __init__(self, *, endpoint_names, is_enabled: bool, name: str=None, condition: str=None, **kwargs) -> None: - super(FallbackRouteProperties, self).__init__(**kwargs) - self.name = name - self.condition = condition - self.endpoint_names = endpoint_names - self.is_enabled = is_enabled diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/feedback_properties.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/feedback_properties.py deleted file mode 100644 index f1adc53ec853..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/feedback_properties.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FeedbackProperties(Model): - """The properties of the feedback queue for cloud-to-device messages. - - :param lock_duration_as_iso8601: The lock duration for the feedback queue. - See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - :type lock_duration_as_iso8601: timedelta - :param ttl_as_iso8601: The period of time for which a message is available - to consume before it is expired by the IoT hub. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - :type ttl_as_iso8601: timedelta - :param max_delivery_count: The number of times the IoT hub attempts to - deliver a message on the feedback queue. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - :type max_delivery_count: int - """ - - _validation = { - 'max_delivery_count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'lock_duration_as_iso8601': {'key': 'lockDurationAsIso8601', 'type': 'duration'}, - 'ttl_as_iso8601': {'key': 'ttlAsIso8601', 'type': 'duration'}, - 'max_delivery_count': {'key': 'maxDeliveryCount', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(FeedbackProperties, self).__init__(**kwargs) - self.lock_duration_as_iso8601 = kwargs.get('lock_duration_as_iso8601', None) - self.ttl_as_iso8601 = kwargs.get('ttl_as_iso8601', None) - self.max_delivery_count = kwargs.get('max_delivery_count', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/feedback_properties_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/feedback_properties_py3.py deleted file mode 100644 index b9b2e2bea2d1..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/feedback_properties_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FeedbackProperties(Model): - """The properties of the feedback queue for cloud-to-device messages. - - :param lock_duration_as_iso8601: The lock duration for the feedback queue. - See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - :type lock_duration_as_iso8601: timedelta - :param ttl_as_iso8601: The period of time for which a message is available - to consume before it is expired by the IoT hub. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - :type ttl_as_iso8601: timedelta - :param max_delivery_count: The number of times the IoT hub attempts to - deliver a message on the feedback queue. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - :type max_delivery_count: int - """ - - _validation = { - 'max_delivery_count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'lock_duration_as_iso8601': {'key': 'lockDurationAsIso8601', 'type': 'duration'}, - 'ttl_as_iso8601': {'key': 'ttlAsIso8601', 'type': 'duration'}, - 'max_delivery_count': {'key': 'maxDeliveryCount', 'type': 'int'}, - } - - def __init__(self, *, lock_duration_as_iso8601=None, ttl_as_iso8601=None, max_delivery_count: int=None, **kwargs) -> None: - super(FeedbackProperties, self).__init__(**kwargs) - self.lock_duration_as_iso8601 = lock_duration_as_iso8601 - self.ttl_as_iso8601 = ttl_as_iso8601 - self.max_delivery_count = max_delivery_count diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/import_devices_request.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/import_devices_request.py deleted file mode 100644 index 2280c00ee4a0..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/import_devices_request.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImportDevicesRequest(Model): - """Use to provide parameters when requesting an import of all devices in the - hub. - - All required parameters must be populated in order to send to Azure. - - :param input_blob_container_uri: Required. The input blob container URI. - :type input_blob_container_uri: str - :param output_blob_container_uri: Required. The output blob container URI. - :type output_blob_container_uri: str - """ - - _validation = { - 'input_blob_container_uri': {'required': True}, - 'output_blob_container_uri': {'required': True}, - } - - _attribute_map = { - 'input_blob_container_uri': {'key': 'inputBlobContainerUri', 'type': 'str'}, - 'output_blob_container_uri': {'key': 'outputBlobContainerUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImportDevicesRequest, self).__init__(**kwargs) - self.input_blob_container_uri = kwargs.get('input_blob_container_uri', None) - self.output_blob_container_uri = kwargs.get('output_blob_container_uri', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/import_devices_request_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/import_devices_request_py3.py deleted file mode 100644 index c97a6611d35a..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/import_devices_request_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImportDevicesRequest(Model): - """Use to provide parameters when requesting an import of all devices in the - hub. - - All required parameters must be populated in order to send to Azure. - - :param input_blob_container_uri: Required. The input blob container URI. - :type input_blob_container_uri: str - :param output_blob_container_uri: Required. The output blob container URI. - :type output_blob_container_uri: str - """ - - _validation = { - 'input_blob_container_uri': {'required': True}, - 'output_blob_container_uri': {'required': True}, - } - - _attribute_map = { - 'input_blob_container_uri': {'key': 'inputBlobContainerUri', 'type': 'str'}, - 'output_blob_container_uri': {'key': 'outputBlobContainerUri', 'type': 'str'}, - } - - def __init__(self, *, input_blob_container_uri: str, output_blob_container_uri: str, **kwargs) -> None: - super(ImportDevicesRequest, self).__init__(**kwargs) - self.input_blob_container_uri = input_blob_container_uri - self.output_blob_container_uri = output_blob_container_uri diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_capacity.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_capacity.py deleted file mode 100644 index c8bdfb3c51fc..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_capacity.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IotHubCapacity(Model): - """IoT Hub capacity information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar minimum: The minimum number of units. - :vartype minimum: long - :ivar maximum: The maximum number of units. - :vartype maximum: long - :ivar default: The default number of units. - :vartype default: long - :ivar scale_type: The type of the scaling enabled. Possible values - include: 'Automatic', 'Manual', 'None' - :vartype scale_type: str or ~azure.mgmt.iothub.models.IotHubScaleType - """ - - _validation = { - 'minimum': {'readonly': True, 'maximum': 1, 'minimum': 1}, - 'maximum': {'readonly': True}, - 'default': {'readonly': True}, - 'scale_type': {'readonly': True}, - } - - _attribute_map = { - 'minimum': {'key': 'minimum', 'type': 'long'}, - 'maximum': {'key': 'maximum', 'type': 'long'}, - 'default': {'key': 'default', 'type': 'long'}, - 'scale_type': {'key': 'scaleType', 'type': 'IotHubScaleType'}, - } - - def __init__(self, **kwargs): - super(IotHubCapacity, self).__init__(**kwargs) - self.minimum = None - self.maximum = None - self.default = None - self.scale_type = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_capacity_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_capacity_py3.py deleted file mode 100644 index 9b2092edc2ec..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_capacity_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IotHubCapacity(Model): - """IoT Hub capacity information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar minimum: The minimum number of units. - :vartype minimum: long - :ivar maximum: The maximum number of units. - :vartype maximum: long - :ivar default: The default number of units. - :vartype default: long - :ivar scale_type: The type of the scaling enabled. Possible values - include: 'Automatic', 'Manual', 'None' - :vartype scale_type: str or ~azure.mgmt.iothub.models.IotHubScaleType - """ - - _validation = { - 'minimum': {'readonly': True, 'maximum': 1, 'minimum': 1}, - 'maximum': {'readonly': True}, - 'default': {'readonly': True}, - 'scale_type': {'readonly': True}, - } - - _attribute_map = { - 'minimum': {'key': 'minimum', 'type': 'long'}, - 'maximum': {'key': 'maximum', 'type': 'long'}, - 'default': {'key': 'default', 'type': 'long'}, - 'scale_type': {'key': 'scaleType', 'type': 'IotHubScaleType'}, - } - - def __init__(self, **kwargs) -> None: - super(IotHubCapacity, self).__init__(**kwargs) - self.minimum = None - self.maximum = None - self.default = None - self.scale_type = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_client_enums.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_client_enums.py deleted file mode 100644 index 61d358448458..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_client_enums.py +++ /dev/null @@ -1,128 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class AccessRights(str, Enum): - - registry_read = "RegistryRead" - registry_write = "RegistryWrite" - service_connect = "ServiceConnect" - device_connect = "DeviceConnect" - registry_read_registry_write = "RegistryRead, RegistryWrite" - registry_read_service_connect = "RegistryRead, ServiceConnect" - registry_read_device_connect = "RegistryRead, DeviceConnect" - registry_write_service_connect = "RegistryWrite, ServiceConnect" - registry_write_device_connect = "RegistryWrite, DeviceConnect" - service_connect_device_connect = "ServiceConnect, DeviceConnect" - registry_read_registry_write_service_connect = "RegistryRead, RegistryWrite, ServiceConnect" - registry_read_registry_write_device_connect = "RegistryRead, RegistryWrite, DeviceConnect" - registry_read_service_connect_device_connect = "RegistryRead, ServiceConnect, DeviceConnect" - registry_write_service_connect_device_connect = "RegistryWrite, ServiceConnect, DeviceConnect" - registry_read_registry_write_service_connect_device_connect = "RegistryRead, RegistryWrite, ServiceConnect, DeviceConnect" - - -class IpFilterActionType(str, Enum): - - accept = "Accept" - reject = "Reject" - - -class RoutingSource(str, Enum): - - invalid = "Invalid" - device_messages = "DeviceMessages" - twin_change_events = "TwinChangeEvents" - device_lifecycle_events = "DeviceLifecycleEvents" - device_job_lifecycle_events = "DeviceJobLifecycleEvents" - - -class Capabilities(str, Enum): - - none = "None" - device_management = "DeviceManagement" - - -class IotHubSku(str, Enum): - - f1 = "F1" - s1 = "S1" - s2 = "S2" - s3 = "S3" - b1 = "B1" - b2 = "B2" - b3 = "B3" - - -class IotHubSkuTier(str, Enum): - - free = "Free" - standard = "Standard" - basic = "Basic" - - -class EndpointHealthStatus(str, Enum): - - unknown = "unknown" - healthy = "healthy" - unhealthy = "unhealthy" - dead = "dead" - - -class JobType(str, Enum): - - unknown = "unknown" - export = "export" - import_enum = "import" - backup = "backup" - read_device_properties = "readDeviceProperties" - write_device_properties = "writeDeviceProperties" - update_device_configuration = "updateDeviceConfiguration" - reboot_device = "rebootDevice" - factory_reset_device = "factoryResetDevice" - firmware_update = "firmwareUpdate" - - -class JobStatus(str, Enum): - - unknown = "unknown" - enqueued = "enqueued" - running = "running" - completed = "completed" - failed = "failed" - cancelled = "cancelled" - - -class IotHubScaleType(str, Enum): - - automatic = "Automatic" - manual = "Manual" - none = "None" - - -class IotHubNameUnavailabilityReason(str, Enum): - - invalid = "Invalid" - already_exists = "AlreadyExists" - - -class TestResultStatus(str, Enum): - - undefined = "undefined" - false = "false" - true = "true" - - -class RouteErrorSeverity(str, Enum): - - error = "error" - warning = "warning" diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_description.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_description.py deleted file mode 100644 index ce2fa05c9870..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_description.py +++ /dev/null @@ -1,66 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class IotHubDescription(Resource): - """The description of the IoT hub. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :param location: Required. The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param etag: The Etag field is *not* required. If it is provided in the - response body, it must also be provided as a header per the normal ETag - convention. - :type etag: str - :param properties: IotHub properties - :type properties: ~azure.mgmt.iothub.models.IotHubProperties - :param sku: Required. IotHub SKU info - :type sku: ~azure.mgmt.iothub.models.IotHubSkuInfo - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True, 'pattern': r'^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$'}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'sku': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'IotHubProperties'}, - 'sku': {'key': 'sku', 'type': 'IotHubSkuInfo'}, - } - - def __init__(self, **kwargs): - super(IotHubDescription, self).__init__(**kwargs) - self.etag = kwargs.get('etag', None) - self.properties = kwargs.get('properties', None) - self.sku = kwargs.get('sku', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_description_paged.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_description_paged.py deleted file mode 100644 index ea5d7b3b3832..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_description_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class IotHubDescriptionPaged(Paged): - """ - A paging container for iterating over a list of :class:`IotHubDescription ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[IotHubDescription]'} - } - - def __init__(self, *args, **kwargs): - - super(IotHubDescriptionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_description_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_description_py3.py deleted file mode 100644 index 74b29768460e..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_description_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class IotHubDescription(Resource): - """The description of the IoT hub. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :param location: Required. The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param etag: The Etag field is *not* required. If it is provided in the - response body, it must also be provided as a header per the normal ETag - convention. - :type etag: str - :param properties: IotHub properties - :type properties: ~azure.mgmt.iothub.models.IotHubProperties - :param sku: Required. IotHub SKU info - :type sku: ~azure.mgmt.iothub.models.IotHubSkuInfo - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True, 'pattern': r'^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$'}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'sku': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'IotHubProperties'}, - 'sku': {'key': 'sku', 'type': 'IotHubSkuInfo'}, - } - - def __init__(self, *, location: str, sku, tags=None, etag: str=None, properties=None, **kwargs) -> None: - super(IotHubDescription, self).__init__(location=location, tags=tags, **kwargs) - self.etag = etag - self.properties = properties - self.sku = sku diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_name_availability_info.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_name_availability_info.py deleted file mode 100644 index 83717c1fce1f..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_name_availability_info.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IotHubNameAvailabilityInfo(Model): - """The properties indicating whether a given IoT hub name is available. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name_available: The value which indicates whether the provided name - is available. - :vartype name_available: bool - :ivar reason: The reason for unavailability. Possible values include: - 'Invalid', 'AlreadyExists' - :vartype reason: str or - ~azure.mgmt.iothub.models.IotHubNameUnavailabilityReason - :param message: The detailed reason message. - :type message: str - """ - - _validation = { - 'name_available': {'readonly': True}, - 'reason': {'readonly': True}, - } - - _attribute_map = { - 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'reason': {'key': 'reason', 'type': 'IotHubNameUnavailabilityReason'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IotHubNameAvailabilityInfo, self).__init__(**kwargs) - self.name_available = None - self.reason = None - self.message = kwargs.get('message', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_name_availability_info_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_name_availability_info_py3.py deleted file mode 100644 index e782c872d683..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_name_availability_info_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IotHubNameAvailabilityInfo(Model): - """The properties indicating whether a given IoT hub name is available. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name_available: The value which indicates whether the provided name - is available. - :vartype name_available: bool - :ivar reason: The reason for unavailability. Possible values include: - 'Invalid', 'AlreadyExists' - :vartype reason: str or - ~azure.mgmt.iothub.models.IotHubNameUnavailabilityReason - :param message: The detailed reason message. - :type message: str - """ - - _validation = { - 'name_available': {'readonly': True}, - 'reason': {'readonly': True}, - } - - _attribute_map = { - 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'reason': {'key': 'reason', 'type': 'IotHubNameUnavailabilityReason'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, message: str=None, **kwargs) -> None: - super(IotHubNameAvailabilityInfo, self).__init__(**kwargs) - self.name_available = None - self.reason = None - self.message = message diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_properties.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_properties.py deleted file mode 100644 index f2de6554773e..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_properties.py +++ /dev/null @@ -1,106 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IotHubProperties(Model): - """The properties of an IoT hub. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param authorization_policies: The shared access policies you can use to - secure a connection to the IoT hub. - :type authorization_policies: - list[~azure.mgmt.iothub.models.SharedAccessSignatureAuthorizationRule] - :param ip_filter_rules: The IP filter rules. - :type ip_filter_rules: list[~azure.mgmt.iothub.models.IpFilterRule] - :ivar provisioning_state: The provisioning state. - :vartype provisioning_state: str - :ivar state: The hub state. - :vartype state: str - :ivar host_name: The name of the host. - :vartype host_name: str - :param event_hub_endpoints: The Event Hub-compatible endpoint properties. - The only possible keys to this dictionary is events. This key has to be - present in the dictionary while making create or update calls for the IoT - hub. - :type event_hub_endpoints: dict[str, - ~azure.mgmt.iothub.models.EventHubProperties] - :param routing: - :type routing: ~azure.mgmt.iothub.models.RoutingProperties - :param storage_endpoints: The list of Azure Storage endpoints where you - can upload files. Currently you can configure only one Azure Storage - account and that MUST have its key as $default. Specifying more than one - storage account causes an error to be thrown. Not specifying a value for - this property when the enableFileUploadNotifications property is set to - True, causes an error to be thrown. - :type storage_endpoints: dict[str, - ~azure.mgmt.iothub.models.StorageEndpointProperties] - :param messaging_endpoints: The messaging endpoint properties for the file - upload notification queue. - :type messaging_endpoints: dict[str, - ~azure.mgmt.iothub.models.MessagingEndpointProperties] - :param enable_file_upload_notifications: If True, file upload - notifications are enabled. - :type enable_file_upload_notifications: bool - :param cloud_to_device: - :type cloud_to_device: ~azure.mgmt.iothub.models.CloudToDeviceProperties - :param comments: IoT hub comments. - :type comments: str - :param device_streams: The device streams properties of iothub. - :type device_streams: - ~azure.mgmt.iothub.models.IotHubPropertiesDeviceStreams - :param features: The capabilities and features enabled for the IoT hub. - Possible values include: 'None', 'DeviceManagement' - :type features: str or ~azure.mgmt.iothub.models.Capabilities - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'state': {'readonly': True}, - 'host_name': {'readonly': True}, - } - - _attribute_map = { - 'authorization_policies': {'key': 'authorizationPolicies', 'type': '[SharedAccessSignatureAuthorizationRule]'}, - 'ip_filter_rules': {'key': 'ipFilterRules', 'type': '[IpFilterRule]'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'host_name': {'key': 'hostName', 'type': 'str'}, - 'event_hub_endpoints': {'key': 'eventHubEndpoints', 'type': '{EventHubProperties}'}, - 'routing': {'key': 'routing', 'type': 'RoutingProperties'}, - 'storage_endpoints': {'key': 'storageEndpoints', 'type': '{StorageEndpointProperties}'}, - 'messaging_endpoints': {'key': 'messagingEndpoints', 'type': '{MessagingEndpointProperties}'}, - 'enable_file_upload_notifications': {'key': 'enableFileUploadNotifications', 'type': 'bool'}, - 'cloud_to_device': {'key': 'cloudToDevice', 'type': 'CloudToDeviceProperties'}, - 'comments': {'key': 'comments', 'type': 'str'}, - 'device_streams': {'key': 'deviceStreams', 'type': 'IotHubPropertiesDeviceStreams'}, - 'features': {'key': 'features', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IotHubProperties, self).__init__(**kwargs) - self.authorization_policies = kwargs.get('authorization_policies', None) - self.ip_filter_rules = kwargs.get('ip_filter_rules', None) - self.provisioning_state = None - self.state = None - self.host_name = None - self.event_hub_endpoints = kwargs.get('event_hub_endpoints', None) - self.routing = kwargs.get('routing', None) - self.storage_endpoints = kwargs.get('storage_endpoints', None) - self.messaging_endpoints = kwargs.get('messaging_endpoints', None) - self.enable_file_upload_notifications = kwargs.get('enable_file_upload_notifications', None) - self.cloud_to_device = kwargs.get('cloud_to_device', None) - self.comments = kwargs.get('comments', None) - self.device_streams = kwargs.get('device_streams', None) - self.features = kwargs.get('features', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_properties_device_streams.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_properties_device_streams.py deleted file mode 100644 index 985693ac090f..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_properties_device_streams.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IotHubPropertiesDeviceStreams(Model): - """The device streams properties of iothub. - - :param streaming_endpoints: List of Device Streams Endpoints. - :type streaming_endpoints: list[str] - """ - - _attribute_map = { - 'streaming_endpoints': {'key': 'streamingEndpoints', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(IotHubPropertiesDeviceStreams, self).__init__(**kwargs) - self.streaming_endpoints = kwargs.get('streaming_endpoints', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_properties_device_streams_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_properties_device_streams_py3.py deleted file mode 100644 index d35247cc448c..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_properties_device_streams_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IotHubPropertiesDeviceStreams(Model): - """The device streams properties of iothub. - - :param streaming_endpoints: List of Device Streams Endpoints. - :type streaming_endpoints: list[str] - """ - - _attribute_map = { - 'streaming_endpoints': {'key': 'streamingEndpoints', 'type': '[str]'}, - } - - def __init__(self, *, streaming_endpoints=None, **kwargs) -> None: - super(IotHubPropertiesDeviceStreams, self).__init__(**kwargs) - self.streaming_endpoints = streaming_endpoints diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_properties_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_properties_py3.py deleted file mode 100644 index 6868384752fc..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_properties_py3.py +++ /dev/null @@ -1,106 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IotHubProperties(Model): - """The properties of an IoT hub. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param authorization_policies: The shared access policies you can use to - secure a connection to the IoT hub. - :type authorization_policies: - list[~azure.mgmt.iothub.models.SharedAccessSignatureAuthorizationRule] - :param ip_filter_rules: The IP filter rules. - :type ip_filter_rules: list[~azure.mgmt.iothub.models.IpFilterRule] - :ivar provisioning_state: The provisioning state. - :vartype provisioning_state: str - :ivar state: The hub state. - :vartype state: str - :ivar host_name: The name of the host. - :vartype host_name: str - :param event_hub_endpoints: The Event Hub-compatible endpoint properties. - The only possible keys to this dictionary is events. This key has to be - present in the dictionary while making create or update calls for the IoT - hub. - :type event_hub_endpoints: dict[str, - ~azure.mgmt.iothub.models.EventHubProperties] - :param routing: - :type routing: ~azure.mgmt.iothub.models.RoutingProperties - :param storage_endpoints: The list of Azure Storage endpoints where you - can upload files. Currently you can configure only one Azure Storage - account and that MUST have its key as $default. Specifying more than one - storage account causes an error to be thrown. Not specifying a value for - this property when the enableFileUploadNotifications property is set to - True, causes an error to be thrown. - :type storage_endpoints: dict[str, - ~azure.mgmt.iothub.models.StorageEndpointProperties] - :param messaging_endpoints: The messaging endpoint properties for the file - upload notification queue. - :type messaging_endpoints: dict[str, - ~azure.mgmt.iothub.models.MessagingEndpointProperties] - :param enable_file_upload_notifications: If True, file upload - notifications are enabled. - :type enable_file_upload_notifications: bool - :param cloud_to_device: - :type cloud_to_device: ~azure.mgmt.iothub.models.CloudToDeviceProperties - :param comments: IoT hub comments. - :type comments: str - :param device_streams: The device streams properties of iothub. - :type device_streams: - ~azure.mgmt.iothub.models.IotHubPropertiesDeviceStreams - :param features: The capabilities and features enabled for the IoT hub. - Possible values include: 'None', 'DeviceManagement' - :type features: str or ~azure.mgmt.iothub.models.Capabilities - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'state': {'readonly': True}, - 'host_name': {'readonly': True}, - } - - _attribute_map = { - 'authorization_policies': {'key': 'authorizationPolicies', 'type': '[SharedAccessSignatureAuthorizationRule]'}, - 'ip_filter_rules': {'key': 'ipFilterRules', 'type': '[IpFilterRule]'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'host_name': {'key': 'hostName', 'type': 'str'}, - 'event_hub_endpoints': {'key': 'eventHubEndpoints', 'type': '{EventHubProperties}'}, - 'routing': {'key': 'routing', 'type': 'RoutingProperties'}, - 'storage_endpoints': {'key': 'storageEndpoints', 'type': '{StorageEndpointProperties}'}, - 'messaging_endpoints': {'key': 'messagingEndpoints', 'type': '{MessagingEndpointProperties}'}, - 'enable_file_upload_notifications': {'key': 'enableFileUploadNotifications', 'type': 'bool'}, - 'cloud_to_device': {'key': 'cloudToDevice', 'type': 'CloudToDeviceProperties'}, - 'comments': {'key': 'comments', 'type': 'str'}, - 'device_streams': {'key': 'deviceStreams', 'type': 'IotHubPropertiesDeviceStreams'}, - 'features': {'key': 'features', 'type': 'str'}, - } - - def __init__(self, *, authorization_policies=None, ip_filter_rules=None, event_hub_endpoints=None, routing=None, storage_endpoints=None, messaging_endpoints=None, enable_file_upload_notifications: bool=None, cloud_to_device=None, comments: str=None, device_streams=None, features=None, **kwargs) -> None: - super(IotHubProperties, self).__init__(**kwargs) - self.authorization_policies = authorization_policies - self.ip_filter_rules = ip_filter_rules - self.provisioning_state = None - self.state = None - self.host_name = None - self.event_hub_endpoints = event_hub_endpoints - self.routing = routing - self.storage_endpoints = storage_endpoints - self.messaging_endpoints = messaging_endpoints - self.enable_file_upload_notifications = enable_file_upload_notifications - self.cloud_to_device = cloud_to_device - self.comments = comments - self.device_streams = device_streams - self.features = features diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_quota_metric_info.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_quota_metric_info.py deleted file mode 100644 index 4f00a25913ee..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_quota_metric_info.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IotHubQuotaMetricInfo(Model): - """Quota metrics properties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the quota metric. - :vartype name: str - :ivar current_value: The current value for the quota metric. - :vartype current_value: long - :ivar max_value: The maximum value of the quota metric. - :vartype max_value: long - """ - - _validation = { - 'name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'max_value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'long'}, - 'max_value': {'key': 'maxValue', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(IotHubQuotaMetricInfo, self).__init__(**kwargs) - self.name = None - self.current_value = None - self.max_value = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_quota_metric_info_paged.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_quota_metric_info_paged.py deleted file mode 100644 index 4ef7809a54a5..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_quota_metric_info_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class IotHubQuotaMetricInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`IotHubQuotaMetricInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[IotHubQuotaMetricInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(IotHubQuotaMetricInfoPaged, self).__init__(*args, **kwargs) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_quota_metric_info_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_quota_metric_info_py3.py deleted file mode 100644 index 31d074c5f5e0..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_quota_metric_info_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IotHubQuotaMetricInfo(Model): - """Quota metrics properties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the quota metric. - :vartype name: str - :ivar current_value: The current value for the quota metric. - :vartype current_value: long - :ivar max_value: The maximum value of the quota metric. - :vartype max_value: long - """ - - _validation = { - 'name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'max_value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'long'}, - 'max_value': {'key': 'maxValue', 'type': 'long'}, - } - - def __init__(self, **kwargs) -> None: - super(IotHubQuotaMetricInfo, self).__init__(**kwargs) - self.name = None - self.current_value = None - self.max_value = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_sku_description.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_sku_description.py deleted file mode 100644 index b21fec3001d0..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_sku_description.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IotHubSkuDescription(Model): - """SKU properties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar resource_type: The type of the resource. - :vartype resource_type: str - :param sku: Required. The type of the resource. - :type sku: ~azure.mgmt.iothub.models.IotHubSkuInfo - :param capacity: Required. IotHub capacity - :type capacity: ~azure.mgmt.iothub.models.IotHubCapacity - """ - - _validation = { - 'resource_type': {'readonly': True}, - 'sku': {'required': True}, - 'capacity': {'required': True}, - } - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'IotHubSkuInfo'}, - 'capacity': {'key': 'capacity', 'type': 'IotHubCapacity'}, - } - - def __init__(self, **kwargs): - super(IotHubSkuDescription, self).__init__(**kwargs) - self.resource_type = None - self.sku = kwargs.get('sku', None) - self.capacity = kwargs.get('capacity', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_sku_description_paged.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_sku_description_paged.py deleted file mode 100644 index 49f6251cb269..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_sku_description_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class IotHubSkuDescriptionPaged(Paged): - """ - A paging container for iterating over a list of :class:`IotHubSkuDescription ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[IotHubSkuDescription]'} - } - - def __init__(self, *args, **kwargs): - - super(IotHubSkuDescriptionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_sku_description_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_sku_description_py3.py deleted file mode 100644 index 7aa551a81b79..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_sku_description_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IotHubSkuDescription(Model): - """SKU properties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar resource_type: The type of the resource. - :vartype resource_type: str - :param sku: Required. The type of the resource. - :type sku: ~azure.mgmt.iothub.models.IotHubSkuInfo - :param capacity: Required. IotHub capacity - :type capacity: ~azure.mgmt.iothub.models.IotHubCapacity - """ - - _validation = { - 'resource_type': {'readonly': True}, - 'sku': {'required': True}, - 'capacity': {'required': True}, - } - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'IotHubSkuInfo'}, - 'capacity': {'key': 'capacity', 'type': 'IotHubCapacity'}, - } - - def __init__(self, *, sku, capacity, **kwargs) -> None: - super(IotHubSkuDescription, self).__init__(**kwargs) - self.resource_type = None - self.sku = sku - self.capacity = capacity diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_sku_info.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_sku_info.py deleted file mode 100644 index 053110390967..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_sku_info.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IotHubSkuInfo(Model): - """Information about the SKU of the IoT hub. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the SKU. Possible values include: 'F1', - 'S1', 'S2', 'S3', 'B1', 'B2', 'B3' - :type name: str or ~azure.mgmt.iothub.models.IotHubSku - :ivar tier: The billing tier for the IoT hub. Possible values include: - 'Free', 'Standard', 'Basic' - :vartype tier: str or ~azure.mgmt.iothub.models.IotHubSkuTier - :param capacity: The number of provisioned IoT Hub units. See: - https://docs.microsoft.com/azure/azure-subscription-service-limits#iot-hub-limits. - :type capacity: long - """ - - _validation = { - 'name': {'required': True}, - 'tier': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'IotHubSkuTier'}, - 'capacity': {'key': 'capacity', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(IotHubSkuInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = None - self.capacity = kwargs.get('capacity', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_sku_info_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_sku_info_py3.py deleted file mode 100644 index 97ffbf5dd145..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_sku_info_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IotHubSkuInfo(Model): - """Information about the SKU of the IoT hub. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the SKU. Possible values include: 'F1', - 'S1', 'S2', 'S3', 'B1', 'B2', 'B3' - :type name: str or ~azure.mgmt.iothub.models.IotHubSku - :ivar tier: The billing tier for the IoT hub. Possible values include: - 'Free', 'Standard', 'Basic' - :vartype tier: str or ~azure.mgmt.iothub.models.IotHubSkuTier - :param capacity: The number of provisioned IoT Hub units. See: - https://docs.microsoft.com/azure/azure-subscription-service-limits#iot-hub-limits. - :type capacity: long - """ - - _validation = { - 'name': {'required': True}, - 'tier': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'IotHubSkuTier'}, - 'capacity': {'key': 'capacity', 'type': 'long'}, - } - - def __init__(self, *, name, capacity: int=None, **kwargs) -> None: - super(IotHubSkuInfo, self).__init__(**kwargs) - self.name = name - self.tier = None - self.capacity = capacity diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/ip_filter_rule.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/ip_filter_rule.py deleted file mode 100644 index 5a24c50dca0a..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/ip_filter_rule.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IpFilterRule(Model): - """The IP filter rules for the IoT hub. - - All required parameters must be populated in order to send to Azure. - - :param filter_name: Required. The name of the IP filter rule. - :type filter_name: str - :param action: Required. The desired action for requests captured by this - rule. Possible values include: 'Accept', 'Reject' - :type action: str or ~azure.mgmt.iothub.models.IpFilterActionType - :param ip_mask: Required. A string that contains the IP address range in - CIDR notation for the rule. - :type ip_mask: str - """ - - _validation = { - 'filter_name': {'required': True}, - 'action': {'required': True}, - 'ip_mask': {'required': True}, - } - - _attribute_map = { - 'filter_name': {'key': 'filterName', 'type': 'str'}, - 'action': {'key': 'action', 'type': 'IpFilterActionType'}, - 'ip_mask': {'key': 'ipMask', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IpFilterRule, self).__init__(**kwargs) - self.filter_name = kwargs.get('filter_name', None) - self.action = kwargs.get('action', None) - self.ip_mask = kwargs.get('ip_mask', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/ip_filter_rule_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/ip_filter_rule_py3.py deleted file mode 100644 index 595a36af4810..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/ip_filter_rule_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IpFilterRule(Model): - """The IP filter rules for the IoT hub. - - All required parameters must be populated in order to send to Azure. - - :param filter_name: Required. The name of the IP filter rule. - :type filter_name: str - :param action: Required. The desired action for requests captured by this - rule. Possible values include: 'Accept', 'Reject' - :type action: str or ~azure.mgmt.iothub.models.IpFilterActionType - :param ip_mask: Required. A string that contains the IP address range in - CIDR notation for the rule. - :type ip_mask: str - """ - - _validation = { - 'filter_name': {'required': True}, - 'action': {'required': True}, - 'ip_mask': {'required': True}, - } - - _attribute_map = { - 'filter_name': {'key': 'filterName', 'type': 'str'}, - 'action': {'key': 'action', 'type': 'IpFilterActionType'}, - 'ip_mask': {'key': 'ipMask', 'type': 'str'}, - } - - def __init__(self, *, filter_name: str, action, ip_mask: str, **kwargs) -> None: - super(IpFilterRule, self).__init__(**kwargs) - self.filter_name = filter_name - self.action = action - self.ip_mask = ip_mask diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/job_response.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/job_response.py deleted file mode 100644 index 59b82d247244..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/job_response.py +++ /dev/null @@ -1,75 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobResponse(Model): - """The properties of the Job Response object. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar job_id: The job identifier. - :vartype job_id: str - :ivar start_time_utc: The start time of the job. - :vartype start_time_utc: datetime - :ivar end_time_utc: The time the job stopped processing. - :vartype end_time_utc: datetime - :ivar type: The type of the job. Possible values include: 'unknown', - 'export', 'import', 'backup', 'readDeviceProperties', - 'writeDeviceProperties', 'updateDeviceConfiguration', 'rebootDevice', - 'factoryResetDevice', 'firmwareUpdate' - :vartype type: str or ~azure.mgmt.iothub.models.JobType - :ivar status: The status of the job. Possible values include: 'unknown', - 'enqueued', 'running', 'completed', 'failed', 'cancelled' - :vartype status: str or ~azure.mgmt.iothub.models.JobStatus - :ivar failure_reason: If status == failed, this string containing the - reason for the failure. - :vartype failure_reason: str - :ivar status_message: The status message for the job. - :vartype status_message: str - :ivar parent_job_id: The job identifier of the parent job, if any. - :vartype parent_job_id: str - """ - - _validation = { - 'job_id': {'readonly': True}, - 'start_time_utc': {'readonly': True}, - 'end_time_utc': {'readonly': True}, - 'type': {'readonly': True}, - 'status': {'readonly': True}, - 'failure_reason': {'readonly': True}, - 'status_message': {'readonly': True}, - 'parent_job_id': {'readonly': True}, - } - - _attribute_map = { - 'job_id': {'key': 'jobId', 'type': 'str'}, - 'start_time_utc': {'key': 'startTimeUtc', 'type': 'rfc-1123'}, - 'end_time_utc': {'key': 'endTimeUtc', 'type': 'rfc-1123'}, - 'type': {'key': 'type', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'JobStatus'}, - 'failure_reason': {'key': 'failureReason', 'type': 'str'}, - 'status_message': {'key': 'statusMessage', 'type': 'str'}, - 'parent_job_id': {'key': 'parentJobId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobResponse, self).__init__(**kwargs) - self.job_id = None - self.start_time_utc = None - self.end_time_utc = None - self.type = None - self.status = None - self.failure_reason = None - self.status_message = None - self.parent_job_id = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/job_response_paged.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/job_response_paged.py deleted file mode 100644 index f4a6dd7f59ee..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/job_response_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JobResponsePaged(Paged): - """ - A paging container for iterating over a list of :class:`JobResponse ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobResponse]'} - } - - def __init__(self, *args, **kwargs): - - super(JobResponsePaged, self).__init__(*args, **kwargs) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/job_response_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/job_response_py3.py deleted file mode 100644 index 88415188e0a7..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/job_response_py3.py +++ /dev/null @@ -1,75 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobResponse(Model): - """The properties of the Job Response object. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar job_id: The job identifier. - :vartype job_id: str - :ivar start_time_utc: The start time of the job. - :vartype start_time_utc: datetime - :ivar end_time_utc: The time the job stopped processing. - :vartype end_time_utc: datetime - :ivar type: The type of the job. Possible values include: 'unknown', - 'export', 'import', 'backup', 'readDeviceProperties', - 'writeDeviceProperties', 'updateDeviceConfiguration', 'rebootDevice', - 'factoryResetDevice', 'firmwareUpdate' - :vartype type: str or ~azure.mgmt.iothub.models.JobType - :ivar status: The status of the job. Possible values include: 'unknown', - 'enqueued', 'running', 'completed', 'failed', 'cancelled' - :vartype status: str or ~azure.mgmt.iothub.models.JobStatus - :ivar failure_reason: If status == failed, this string containing the - reason for the failure. - :vartype failure_reason: str - :ivar status_message: The status message for the job. - :vartype status_message: str - :ivar parent_job_id: The job identifier of the parent job, if any. - :vartype parent_job_id: str - """ - - _validation = { - 'job_id': {'readonly': True}, - 'start_time_utc': {'readonly': True}, - 'end_time_utc': {'readonly': True}, - 'type': {'readonly': True}, - 'status': {'readonly': True}, - 'failure_reason': {'readonly': True}, - 'status_message': {'readonly': True}, - 'parent_job_id': {'readonly': True}, - } - - _attribute_map = { - 'job_id': {'key': 'jobId', 'type': 'str'}, - 'start_time_utc': {'key': 'startTimeUtc', 'type': 'rfc-1123'}, - 'end_time_utc': {'key': 'endTimeUtc', 'type': 'rfc-1123'}, - 'type': {'key': 'type', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'JobStatus'}, - 'failure_reason': {'key': 'failureReason', 'type': 'str'}, - 'status_message': {'key': 'statusMessage', 'type': 'str'}, - 'parent_job_id': {'key': 'parentJobId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(JobResponse, self).__init__(**kwargs) - self.job_id = None - self.start_time_utc = None - self.end_time_utc = None - self.type = None - self.status = None - self.failure_reason = None - self.status_message = None - self.parent_job_id = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/matched_route.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/matched_route.py deleted file mode 100644 index c0734abfdece..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/matched_route.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MatchedRoute(Model): - """Routes that matched. - - :param properties: Properties of routes that matched - :type properties: ~azure.mgmt.iothub.models.RouteProperties - """ - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'RouteProperties'}, - } - - def __init__(self, **kwargs): - super(MatchedRoute, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/matched_route_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/matched_route_py3.py deleted file mode 100644 index eecd24fd49b7..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/matched_route_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MatchedRoute(Model): - """Routes that matched. - - :param properties: Properties of routes that matched - :type properties: ~azure.mgmt.iothub.models.RouteProperties - """ - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'RouteProperties'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(MatchedRoute, self).__init__(**kwargs) - self.properties = properties diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/messaging_endpoint_properties.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/messaging_endpoint_properties.py deleted file mode 100644 index 576bd3c0aa2a..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/messaging_endpoint_properties.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MessagingEndpointProperties(Model): - """The properties of the messaging endpoints used by this IoT hub. - - :param lock_duration_as_iso8601: The lock duration. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. - :type lock_duration_as_iso8601: timedelta - :param ttl_as_iso8601: The period of time for which a message is available - to consume before it is expired by the IoT hub. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. - :type ttl_as_iso8601: timedelta - :param max_delivery_count: The number of times the IoT hub attempts to - deliver a message. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. - :type max_delivery_count: int - """ - - _validation = { - 'max_delivery_count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'lock_duration_as_iso8601': {'key': 'lockDurationAsIso8601', 'type': 'duration'}, - 'ttl_as_iso8601': {'key': 'ttlAsIso8601', 'type': 'duration'}, - 'max_delivery_count': {'key': 'maxDeliveryCount', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(MessagingEndpointProperties, self).__init__(**kwargs) - self.lock_duration_as_iso8601 = kwargs.get('lock_duration_as_iso8601', None) - self.ttl_as_iso8601 = kwargs.get('ttl_as_iso8601', None) - self.max_delivery_count = kwargs.get('max_delivery_count', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/messaging_endpoint_properties_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/messaging_endpoint_properties_py3.py deleted file mode 100644 index f3d0d8c5f122..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/messaging_endpoint_properties_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MessagingEndpointProperties(Model): - """The properties of the messaging endpoints used by this IoT hub. - - :param lock_duration_as_iso8601: The lock duration. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. - :type lock_duration_as_iso8601: timedelta - :param ttl_as_iso8601: The period of time for which a message is available - to consume before it is expired by the IoT hub. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. - :type ttl_as_iso8601: timedelta - :param max_delivery_count: The number of times the IoT hub attempts to - deliver a message. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. - :type max_delivery_count: int - """ - - _validation = { - 'max_delivery_count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'lock_duration_as_iso8601': {'key': 'lockDurationAsIso8601', 'type': 'duration'}, - 'ttl_as_iso8601': {'key': 'ttlAsIso8601', 'type': 'duration'}, - 'max_delivery_count': {'key': 'maxDeliveryCount', 'type': 'int'}, - } - - def __init__(self, *, lock_duration_as_iso8601=None, ttl_as_iso8601=None, max_delivery_count: int=None, **kwargs) -> None: - super(MessagingEndpointProperties, self).__init__(**kwargs) - self.lock_duration_as_iso8601 = lock_duration_as_iso8601 - self.ttl_as_iso8601 = ttl_as_iso8601 - self.max_delivery_count = max_delivery_count diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/name.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/name.py deleted file mode 100644 index 119fdb10cea5..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/name.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Name(Model): - """Name of Iot Hub type. - - :param value: IotHub type - :type value: str - :param localized_value: Localized value of name - :type localized_value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Name, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.localized_value = kwargs.get('localized_value', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/name_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/name_py3.py deleted file mode 100644 index d40236f73bc7..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/name_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Name(Model): - """Name of Iot Hub type. - - :param value: IotHub type - :type value: str - :param localized_value: Localized value of name - :type localized_value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: - super(Name, self).__init__(**kwargs) - self.value = value - self.localized_value = localized_value diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation.py deleted file mode 100644 index 1730239229f4..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """IoT Hub REST API operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Operation name: {provider}/{resource}/{read | write | action | - delete} - :vartype name: str - :param display: The object that represents the operation. - :type display: ~azure.mgmt.iothub.models.OperationDisplay - """ - - _validation = { - 'name': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = kwargs.get('display', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_display.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_display.py deleted file mode 100644 index 1be587a52f9d..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_display.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """The object that represents the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: Service provider: Microsoft Devices - :vartype provider: str - :ivar resource: Resource Type: IotHubs - :vartype resource: str - :ivar operation: Name of the operation - :vartype operation: str - :ivar description: Description of the operation - :vartype description: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_display_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_display_py3.py deleted file mode 100644 index 6d30aa033547..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_display_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """The object that represents the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: Service provider: Microsoft Devices - :vartype provider: str - :ivar resource: Resource Type: IotHubs - :vartype resource: str - :ivar operation: Name of the operation - :vartype operation: str - :ivar description: Description of the operation - :vartype description: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_inputs.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_inputs.py deleted file mode 100644 index 206391142c95..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_inputs.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationInputs(Model): - """Input values. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the IoT hub to check. - :type name: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationInputs, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_inputs_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_inputs_py3.py deleted file mode 100644 index 9fc6f5468506..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_inputs_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationInputs(Model): - """Input values. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the IoT hub to check. - :type name: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name: str, **kwargs) -> None: - super(OperationInputs, self).__init__(**kwargs) - self.name = name diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_paged.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_paged.py deleted file mode 100644 index 3b8a1df408c9..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_py3.py deleted file mode 100644 index 9915ab12b45e..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """IoT Hub REST API operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Operation name: {provider}/{resource}/{read | write | action | - delete} - :vartype name: str - :param display: The object that represents the operation. - :type display: ~azure.mgmt.iothub.models.OperationDisplay - """ - - _validation = { - 'name': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, *, display=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = display diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/registry_statistics.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/registry_statistics.py deleted file mode 100644 index fc9d0e72cb40..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/registry_statistics.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RegistryStatistics(Model): - """Identity registry statistics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar total_device_count: The total count of devices in the identity - registry. - :vartype total_device_count: long - :ivar enabled_device_count: The count of enabled devices in the identity - registry. - :vartype enabled_device_count: long - :ivar disabled_device_count: The count of disabled devices in the identity - registry. - :vartype disabled_device_count: long - """ - - _validation = { - 'total_device_count': {'readonly': True}, - 'enabled_device_count': {'readonly': True}, - 'disabled_device_count': {'readonly': True}, - } - - _attribute_map = { - 'total_device_count': {'key': 'totalDeviceCount', 'type': 'long'}, - 'enabled_device_count': {'key': 'enabledDeviceCount', 'type': 'long'}, - 'disabled_device_count': {'key': 'disabledDeviceCount', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(RegistryStatistics, self).__init__(**kwargs) - self.total_device_count = None - self.enabled_device_count = None - self.disabled_device_count = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/registry_statistics_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/registry_statistics_py3.py deleted file mode 100644 index 7607caca6707..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/registry_statistics_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RegistryStatistics(Model): - """Identity registry statistics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar total_device_count: The total count of devices in the identity - registry. - :vartype total_device_count: long - :ivar enabled_device_count: The count of enabled devices in the identity - registry. - :vartype enabled_device_count: long - :ivar disabled_device_count: The count of disabled devices in the identity - registry. - :vartype disabled_device_count: long - """ - - _validation = { - 'total_device_count': {'readonly': True}, - 'enabled_device_count': {'readonly': True}, - 'disabled_device_count': {'readonly': True}, - } - - _attribute_map = { - 'total_device_count': {'key': 'totalDeviceCount', 'type': 'long'}, - 'enabled_device_count': {'key': 'enabledDeviceCount', 'type': 'long'}, - 'disabled_device_count': {'key': 'disabledDeviceCount', 'type': 'long'}, - } - - def __init__(self, **kwargs) -> None: - super(RegistryStatistics, self).__init__(**kwargs) - self.total_device_count = None - self.enabled_device_count = None - self.disabled_device_count = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/resource.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/resource.py deleted file mode 100644 index e03d78711115..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/resource.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The common properties of an Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :param location: Required. The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True, 'pattern': r'^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$'}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/resource_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/resource_py3.py deleted file mode 100644 index 436710184586..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/resource_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The common properties of an Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :param location: Required. The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True, 'pattern': r'^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$'}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_compilation_error.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_compilation_error.py deleted file mode 100644 index c11e230581d6..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_compilation_error.py +++ /dev/null @@ -1,37 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RouteCompilationError(Model): - """Compilation error when evaluating route. - - :param message: Route error message - :type message: str - :param severity: Severity of the route error. Possible values include: - 'error', 'warning' - :type severity: str or ~azure.mgmt.iothub.models.RouteErrorSeverity - :param location: Location where the route error happened - :type location: ~azure.mgmt.iothub.models.RouteErrorRange - """ - - _attribute_map = { - 'message': {'key': 'message', 'type': 'str'}, - 'severity': {'key': 'severity', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'RouteErrorRange'}, - } - - def __init__(self, **kwargs): - super(RouteCompilationError, self).__init__(**kwargs) - self.message = kwargs.get('message', None) - self.severity = kwargs.get('severity', None) - self.location = kwargs.get('location', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_compilation_error_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_compilation_error_py3.py deleted file mode 100644 index f179c58b5f91..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_compilation_error_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RouteCompilationError(Model): - """Compilation error when evaluating route. - - :param message: Route error message - :type message: str - :param severity: Severity of the route error. Possible values include: - 'error', 'warning' - :type severity: str or ~azure.mgmt.iothub.models.RouteErrorSeverity - :param location: Location where the route error happened - :type location: ~azure.mgmt.iothub.models.RouteErrorRange - """ - - _attribute_map = { - 'message': {'key': 'message', 'type': 'str'}, - 'severity': {'key': 'severity', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'RouteErrorRange'}, - } - - def __init__(self, *, message: str=None, severity=None, location=None, **kwargs) -> None: - super(RouteCompilationError, self).__init__(**kwargs) - self.message = message - self.severity = severity - self.location = location diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_error_position.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_error_position.py deleted file mode 100644 index 5c2c05a70195..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_error_position.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RouteErrorPosition(Model): - """Position where the route error happened. - - :param line: Line where the route error happened - :type line: int - :param column: Column where the route error happened - :type column: int - """ - - _attribute_map = { - 'line': {'key': 'line', 'type': 'int'}, - 'column': {'key': 'column', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(RouteErrorPosition, self).__init__(**kwargs) - self.line = kwargs.get('line', None) - self.column = kwargs.get('column', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_error_position_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_error_position_py3.py deleted file mode 100644 index a8d6b7c139bf..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_error_position_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RouteErrorPosition(Model): - """Position where the route error happened. - - :param line: Line where the route error happened - :type line: int - :param column: Column where the route error happened - :type column: int - """ - - _attribute_map = { - 'line': {'key': 'line', 'type': 'int'}, - 'column': {'key': 'column', 'type': 'int'}, - } - - def __init__(self, *, line: int=None, column: int=None, **kwargs) -> None: - super(RouteErrorPosition, self).__init__(**kwargs) - self.line = line - self.column = column diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_error_range.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_error_range.py deleted file mode 100644 index 2bc28d2281f6..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_error_range.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RouteErrorRange(Model): - """Range of route errors. - - :param start: Start where the route error happened - :type start: ~azure.mgmt.iothub.models.RouteErrorPosition - :param end: End where the route error happened - :type end: ~azure.mgmt.iothub.models.RouteErrorPosition - """ - - _attribute_map = { - 'start': {'key': 'start', 'type': 'RouteErrorPosition'}, - 'end': {'key': 'end', 'type': 'RouteErrorPosition'}, - } - - def __init__(self, **kwargs): - super(RouteErrorRange, self).__init__(**kwargs) - self.start = kwargs.get('start', None) - self.end = kwargs.get('end', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_error_range_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_error_range_py3.py deleted file mode 100644 index bcafcaa32fa4..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_error_range_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RouteErrorRange(Model): - """Range of route errors. - - :param start: Start where the route error happened - :type start: ~azure.mgmt.iothub.models.RouteErrorPosition - :param end: End where the route error happened - :type end: ~azure.mgmt.iothub.models.RouteErrorPosition - """ - - _attribute_map = { - 'start': {'key': 'start', 'type': 'RouteErrorPosition'}, - 'end': {'key': 'end', 'type': 'RouteErrorPosition'}, - } - - def __init__(self, *, start=None, end=None, **kwargs) -> None: - super(RouteErrorRange, self).__init__(**kwargs) - self.start = start - self.end = end diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_properties.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_properties.py deleted file mode 100644 index cb23780b6f71..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_properties.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RouteProperties(Model): - """The properties of a routing rule that your IoT hub uses to route messages - to endpoints. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the route. The name can only include - alphanumeric characters, periods, underscores, hyphens, has a maximum - length of 64 characters, and must be unique. - :type name: str - :param source: Required. The source that the routing rule is to be applied - to, such as DeviceMessages. Possible values include: 'Invalid', - 'DeviceMessages', 'TwinChangeEvents', 'DeviceLifecycleEvents', - 'DeviceJobLifecycleEvents' - :type source: str or ~azure.mgmt.iothub.models.RoutingSource - :param condition: The condition that is evaluated to apply the routing - rule. If no condition is provided, it evaluates to true by default. For - grammar, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language - :type condition: str - :param endpoint_names: Required. The list of endpoints to which messages - that satisfy the condition are routed. Currently only one endpoint is - allowed. - :type endpoint_names: list[str] - :param is_enabled: Required. Used to specify whether a route is enabled. - :type is_enabled: bool - """ - - _validation = { - 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, - 'source': {'required': True}, - 'endpoint_names': {'required': True, 'max_items': 1, 'min_items': 1}, - 'is_enabled': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'condition': {'key': 'condition', 'type': 'str'}, - 'endpoint_names': {'key': 'endpointNames', 'type': '[str]'}, - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(RouteProperties, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.source = kwargs.get('source', None) - self.condition = kwargs.get('condition', None) - self.endpoint_names = kwargs.get('endpoint_names', None) - self.is_enabled = kwargs.get('is_enabled', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_properties_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_properties_py3.py deleted file mode 100644 index a913d4880714..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_properties_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RouteProperties(Model): - """The properties of a routing rule that your IoT hub uses to route messages - to endpoints. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the route. The name can only include - alphanumeric characters, periods, underscores, hyphens, has a maximum - length of 64 characters, and must be unique. - :type name: str - :param source: Required. The source that the routing rule is to be applied - to, such as DeviceMessages. Possible values include: 'Invalid', - 'DeviceMessages', 'TwinChangeEvents', 'DeviceLifecycleEvents', - 'DeviceJobLifecycleEvents' - :type source: str or ~azure.mgmt.iothub.models.RoutingSource - :param condition: The condition that is evaluated to apply the routing - rule. If no condition is provided, it evaluates to true by default. For - grammar, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language - :type condition: str - :param endpoint_names: Required. The list of endpoints to which messages - that satisfy the condition are routed. Currently only one endpoint is - allowed. - :type endpoint_names: list[str] - :param is_enabled: Required. Used to specify whether a route is enabled. - :type is_enabled: bool - """ - - _validation = { - 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, - 'source': {'required': True}, - 'endpoint_names': {'required': True, 'max_items': 1, 'min_items': 1}, - 'is_enabled': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'condition': {'key': 'condition', 'type': 'str'}, - 'endpoint_names': {'key': 'endpointNames', 'type': '[str]'}, - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - } - - def __init__(self, *, name: str, source, endpoint_names, is_enabled: bool, condition: str=None, **kwargs) -> None: - super(RouteProperties, self).__init__(**kwargs) - self.name = name - self.source = source - self.condition = condition - self.endpoint_names = endpoint_names - self.is_enabled = is_enabled diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_endpoints.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_endpoints.py deleted file mode 100644 index cdd1114e883a..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_endpoints.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RoutingEndpoints(Model): - """The properties related to the custom endpoints to which your IoT hub routes - messages based on the routing rules. A maximum of 10 custom endpoints are - allowed across all endpoint types for paid hubs and only 1 custom endpoint - is allowed across all endpoint types for free hubs. - - :param service_bus_queues: The list of Service Bus queue endpoints that - IoT hub routes the messages to, based on the routing rules. - :type service_bus_queues: - list[~azure.mgmt.iothub.models.RoutingServiceBusQueueEndpointProperties] - :param service_bus_topics: The list of Service Bus topic endpoints that - the IoT hub routes the messages to, based on the routing rules. - :type service_bus_topics: - list[~azure.mgmt.iothub.models.RoutingServiceBusTopicEndpointProperties] - :param event_hubs: The list of Event Hubs endpoints that IoT hub routes - messages to, based on the routing rules. This list does not include the - built-in Event Hubs endpoint. - :type event_hubs: - list[~azure.mgmt.iothub.models.RoutingEventHubProperties] - :param storage_containers: The list of storage container endpoints that - IoT hub routes messages to, based on the routing rules. - :type storage_containers: - list[~azure.mgmt.iothub.models.RoutingStorageContainerProperties] - """ - - _attribute_map = { - 'service_bus_queues': {'key': 'serviceBusQueues', 'type': '[RoutingServiceBusQueueEndpointProperties]'}, - 'service_bus_topics': {'key': 'serviceBusTopics', 'type': '[RoutingServiceBusTopicEndpointProperties]'}, - 'event_hubs': {'key': 'eventHubs', 'type': '[RoutingEventHubProperties]'}, - 'storage_containers': {'key': 'storageContainers', 'type': '[RoutingStorageContainerProperties]'}, - } - - def __init__(self, **kwargs): - super(RoutingEndpoints, self).__init__(**kwargs) - self.service_bus_queues = kwargs.get('service_bus_queues', None) - self.service_bus_topics = kwargs.get('service_bus_topics', None) - self.event_hubs = kwargs.get('event_hubs', None) - self.storage_containers = kwargs.get('storage_containers', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_endpoints_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_endpoints_py3.py deleted file mode 100644 index 518e57b44b16..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_endpoints_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RoutingEndpoints(Model): - """The properties related to the custom endpoints to which your IoT hub routes - messages based on the routing rules. A maximum of 10 custom endpoints are - allowed across all endpoint types for paid hubs and only 1 custom endpoint - is allowed across all endpoint types for free hubs. - - :param service_bus_queues: The list of Service Bus queue endpoints that - IoT hub routes the messages to, based on the routing rules. - :type service_bus_queues: - list[~azure.mgmt.iothub.models.RoutingServiceBusQueueEndpointProperties] - :param service_bus_topics: The list of Service Bus topic endpoints that - the IoT hub routes the messages to, based on the routing rules. - :type service_bus_topics: - list[~azure.mgmt.iothub.models.RoutingServiceBusTopicEndpointProperties] - :param event_hubs: The list of Event Hubs endpoints that IoT hub routes - messages to, based on the routing rules. This list does not include the - built-in Event Hubs endpoint. - :type event_hubs: - list[~azure.mgmt.iothub.models.RoutingEventHubProperties] - :param storage_containers: The list of storage container endpoints that - IoT hub routes messages to, based on the routing rules. - :type storage_containers: - list[~azure.mgmt.iothub.models.RoutingStorageContainerProperties] - """ - - _attribute_map = { - 'service_bus_queues': {'key': 'serviceBusQueues', 'type': '[RoutingServiceBusQueueEndpointProperties]'}, - 'service_bus_topics': {'key': 'serviceBusTopics', 'type': '[RoutingServiceBusTopicEndpointProperties]'}, - 'event_hubs': {'key': 'eventHubs', 'type': '[RoutingEventHubProperties]'}, - 'storage_containers': {'key': 'storageContainers', 'type': '[RoutingStorageContainerProperties]'}, - } - - def __init__(self, *, service_bus_queues=None, service_bus_topics=None, event_hubs=None, storage_containers=None, **kwargs) -> None: - super(RoutingEndpoints, self).__init__(**kwargs) - self.service_bus_queues = service_bus_queues - self.service_bus_topics = service_bus_topics - self.event_hubs = event_hubs - self.storage_containers = storage_containers diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_event_hub_properties.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_event_hub_properties.py deleted file mode 100644 index de61cf4cca85..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_event_hub_properties.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RoutingEventHubProperties(Model): - """The properties related to an event hub endpoint. - - All required parameters must be populated in order to send to Azure. - - :param connection_string: Required. The connection string of the event hub - endpoint. - :type connection_string: str - :param name: Required. The name that identifies this endpoint. The name - can only include alphanumeric characters, periods, underscores, hyphens - and has a maximum length of 64 characters. The following names are - reserved: events, fileNotifications, $default. Endpoint names must be - unique across endpoint types. - :type name: str - :param subscription_id: The subscription identifier of the event hub - endpoint. - :type subscription_id: str - :param resource_group: The name of the resource group of the event hub - endpoint. - :type resource_group: str - """ - - _validation = { - 'connection_string': {'required': True}, - 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, - } - - _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RoutingEventHubProperties, self).__init__(**kwargs) - self.connection_string = kwargs.get('connection_string', None) - self.name = kwargs.get('name', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group = kwargs.get('resource_group', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_event_hub_properties_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_event_hub_properties_py3.py deleted file mode 100644 index 28029340935e..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_event_hub_properties_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RoutingEventHubProperties(Model): - """The properties related to an event hub endpoint. - - All required parameters must be populated in order to send to Azure. - - :param connection_string: Required. The connection string of the event hub - endpoint. - :type connection_string: str - :param name: Required. The name that identifies this endpoint. The name - can only include alphanumeric characters, periods, underscores, hyphens - and has a maximum length of 64 characters. The following names are - reserved: events, fileNotifications, $default. Endpoint names must be - unique across endpoint types. - :type name: str - :param subscription_id: The subscription identifier of the event hub - endpoint. - :type subscription_id: str - :param resource_group: The name of the resource group of the event hub - endpoint. - :type resource_group: str - """ - - _validation = { - 'connection_string': {'required': True}, - 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, - } - - _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - } - - def __init__(self, *, connection_string: str, name: str, subscription_id: str=None, resource_group: str=None, **kwargs) -> None: - super(RoutingEventHubProperties, self).__init__(**kwargs) - self.connection_string = connection_string - self.name = name - self.subscription_id = subscription_id - self.resource_group = resource_group diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_message.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_message.py deleted file mode 100644 index 542d091cd9d5..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_message.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RoutingMessage(Model): - """Routing message. - - :param body: Body of routing message - :type body: str - :param app_properties: App properties - :type app_properties: dict[str, str] - :param system_properties: System properties - :type system_properties: dict[str, str] - """ - - _attribute_map = { - 'body': {'key': 'body', 'type': 'str'}, - 'app_properties': {'key': 'appProperties', 'type': '{str}'}, - 'system_properties': {'key': 'systemProperties', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(RoutingMessage, self).__init__(**kwargs) - self.body = kwargs.get('body', None) - self.app_properties = kwargs.get('app_properties', None) - self.system_properties = kwargs.get('system_properties', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_message_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_message_py3.py deleted file mode 100644 index 049f4a5a427b..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_message_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RoutingMessage(Model): - """Routing message. - - :param body: Body of routing message - :type body: str - :param app_properties: App properties - :type app_properties: dict[str, str] - :param system_properties: System properties - :type system_properties: dict[str, str] - """ - - _attribute_map = { - 'body': {'key': 'body', 'type': 'str'}, - 'app_properties': {'key': 'appProperties', 'type': '{str}'}, - 'system_properties': {'key': 'systemProperties', 'type': '{str}'}, - } - - def __init__(self, *, body: str=None, app_properties=None, system_properties=None, **kwargs) -> None: - super(RoutingMessage, self).__init__(**kwargs) - self.body = body - self.app_properties = app_properties - self.system_properties = system_properties diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_properties.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_properties.py deleted file mode 100644 index 23ae743a28c4..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_properties.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RoutingProperties(Model): - """The routing related properties of the IoT hub. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging. - - :param endpoints: - :type endpoints: ~azure.mgmt.iothub.models.RoutingEndpoints - :param routes: The list of user-provided routing rules that the IoT hub - uses to route messages to built-in and custom endpoints. A maximum of 100 - routing rules are allowed for paid hubs and a maximum of 5 routing rules - are allowed for free hubs. - :type routes: list[~azure.mgmt.iothub.models.RouteProperties] - :param fallback_route: The properties of the route that is used as a - fall-back route when none of the conditions specified in the 'routes' - section are met. This is an optional parameter. When this property is not - set, the messages which do not meet any of the conditions specified in the - 'routes' section get routed to the built-in eventhub endpoint. - :type fallback_route: ~azure.mgmt.iothub.models.FallbackRouteProperties - :param enrichments: The list of user-provided enrichments that the IoT hub - applies to messages to be delivered to built-in and custom endpoints. See: - https://aka.ms/iotmsgenrich - :type enrichments: list[~azure.mgmt.iothub.models.EnrichmentProperties] - """ - - _attribute_map = { - 'endpoints': {'key': 'endpoints', 'type': 'RoutingEndpoints'}, - 'routes': {'key': 'routes', 'type': '[RouteProperties]'}, - 'fallback_route': {'key': 'fallbackRoute', 'type': 'FallbackRouteProperties'}, - 'enrichments': {'key': 'enrichments', 'type': '[EnrichmentProperties]'}, - } - - def __init__(self, **kwargs): - super(RoutingProperties, self).__init__(**kwargs) - self.endpoints = kwargs.get('endpoints', None) - self.routes = kwargs.get('routes', None) - self.fallback_route = kwargs.get('fallback_route', None) - self.enrichments = kwargs.get('enrichments', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_properties_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_properties_py3.py deleted file mode 100644 index fdde758a305c..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_properties_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RoutingProperties(Model): - """The routing related properties of the IoT hub. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging. - - :param endpoints: - :type endpoints: ~azure.mgmt.iothub.models.RoutingEndpoints - :param routes: The list of user-provided routing rules that the IoT hub - uses to route messages to built-in and custom endpoints. A maximum of 100 - routing rules are allowed for paid hubs and a maximum of 5 routing rules - are allowed for free hubs. - :type routes: list[~azure.mgmt.iothub.models.RouteProperties] - :param fallback_route: The properties of the route that is used as a - fall-back route when none of the conditions specified in the 'routes' - section are met. This is an optional parameter. When this property is not - set, the messages which do not meet any of the conditions specified in the - 'routes' section get routed to the built-in eventhub endpoint. - :type fallback_route: ~azure.mgmt.iothub.models.FallbackRouteProperties - :param enrichments: The list of user-provided enrichments that the IoT hub - applies to messages to be delivered to built-in and custom endpoints. See: - https://aka.ms/iotmsgenrich - :type enrichments: list[~azure.mgmt.iothub.models.EnrichmentProperties] - """ - - _attribute_map = { - 'endpoints': {'key': 'endpoints', 'type': 'RoutingEndpoints'}, - 'routes': {'key': 'routes', 'type': '[RouteProperties]'}, - 'fallback_route': {'key': 'fallbackRoute', 'type': 'FallbackRouteProperties'}, - 'enrichments': {'key': 'enrichments', 'type': '[EnrichmentProperties]'}, - } - - def __init__(self, *, endpoints=None, routes=None, fallback_route=None, enrichments=None, **kwargs) -> None: - super(RoutingProperties, self).__init__(**kwargs) - self.endpoints = endpoints - self.routes = routes - self.fallback_route = fallback_route - self.enrichments = enrichments diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_service_bus_queue_endpoint_properties.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_service_bus_queue_endpoint_properties.py deleted file mode 100644 index 6aa29a456714..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_service_bus_queue_endpoint_properties.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RoutingServiceBusQueueEndpointProperties(Model): - """The properties related to service bus queue endpoint types. - - All required parameters must be populated in order to send to Azure. - - :param connection_string: Required. The connection string of the service - bus queue endpoint. - :type connection_string: str - :param name: Required. The name that identifies this endpoint. The name - can only include alphanumeric characters, periods, underscores, hyphens - and has a maximum length of 64 characters. The following names are - reserved: events, fileNotifications, $default. Endpoint names must be - unique across endpoint types. The name need not be the same as the actual - queue name. - :type name: str - :param subscription_id: The subscription identifier of the service bus - queue endpoint. - :type subscription_id: str - :param resource_group: The name of the resource group of the service bus - queue endpoint. - :type resource_group: str - """ - - _validation = { - 'connection_string': {'required': True}, - 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, - } - - _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RoutingServiceBusQueueEndpointProperties, self).__init__(**kwargs) - self.connection_string = kwargs.get('connection_string', None) - self.name = kwargs.get('name', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group = kwargs.get('resource_group', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_service_bus_queue_endpoint_properties_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_service_bus_queue_endpoint_properties_py3.py deleted file mode 100644 index fdd7aeffa58d..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_service_bus_queue_endpoint_properties_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RoutingServiceBusQueueEndpointProperties(Model): - """The properties related to service bus queue endpoint types. - - All required parameters must be populated in order to send to Azure. - - :param connection_string: Required. The connection string of the service - bus queue endpoint. - :type connection_string: str - :param name: Required. The name that identifies this endpoint. The name - can only include alphanumeric characters, periods, underscores, hyphens - and has a maximum length of 64 characters. The following names are - reserved: events, fileNotifications, $default. Endpoint names must be - unique across endpoint types. The name need not be the same as the actual - queue name. - :type name: str - :param subscription_id: The subscription identifier of the service bus - queue endpoint. - :type subscription_id: str - :param resource_group: The name of the resource group of the service bus - queue endpoint. - :type resource_group: str - """ - - _validation = { - 'connection_string': {'required': True}, - 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, - } - - _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - } - - def __init__(self, *, connection_string: str, name: str, subscription_id: str=None, resource_group: str=None, **kwargs) -> None: - super(RoutingServiceBusQueueEndpointProperties, self).__init__(**kwargs) - self.connection_string = connection_string - self.name = name - self.subscription_id = subscription_id - self.resource_group = resource_group diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_service_bus_topic_endpoint_properties.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_service_bus_topic_endpoint_properties.py deleted file mode 100644 index fb171d9549c0..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_service_bus_topic_endpoint_properties.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RoutingServiceBusTopicEndpointProperties(Model): - """The properties related to service bus topic endpoint types. - - All required parameters must be populated in order to send to Azure. - - :param connection_string: Required. The connection string of the service - bus topic endpoint. - :type connection_string: str - :param name: Required. The name that identifies this endpoint. The name - can only include alphanumeric characters, periods, underscores, hyphens - and has a maximum length of 64 characters. The following names are - reserved: events, fileNotifications, $default. Endpoint names must be - unique across endpoint types. The name need not be the same as the actual - topic name. - :type name: str - :param subscription_id: The subscription identifier of the service bus - topic endpoint. - :type subscription_id: str - :param resource_group: The name of the resource group of the service bus - topic endpoint. - :type resource_group: str - """ - - _validation = { - 'connection_string': {'required': True}, - 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, - } - - _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RoutingServiceBusTopicEndpointProperties, self).__init__(**kwargs) - self.connection_string = kwargs.get('connection_string', None) - self.name = kwargs.get('name', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group = kwargs.get('resource_group', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_service_bus_topic_endpoint_properties_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_service_bus_topic_endpoint_properties_py3.py deleted file mode 100644 index 11722e951025..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_service_bus_topic_endpoint_properties_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RoutingServiceBusTopicEndpointProperties(Model): - """The properties related to service bus topic endpoint types. - - All required parameters must be populated in order to send to Azure. - - :param connection_string: Required. The connection string of the service - bus topic endpoint. - :type connection_string: str - :param name: Required. The name that identifies this endpoint. The name - can only include alphanumeric characters, periods, underscores, hyphens - and has a maximum length of 64 characters. The following names are - reserved: events, fileNotifications, $default. Endpoint names must be - unique across endpoint types. The name need not be the same as the actual - topic name. - :type name: str - :param subscription_id: The subscription identifier of the service bus - topic endpoint. - :type subscription_id: str - :param resource_group: The name of the resource group of the service bus - topic endpoint. - :type resource_group: str - """ - - _validation = { - 'connection_string': {'required': True}, - 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, - } - - _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - } - - def __init__(self, *, connection_string: str, name: str, subscription_id: str=None, resource_group: str=None, **kwargs) -> None: - super(RoutingServiceBusTopicEndpointProperties, self).__init__(**kwargs) - self.connection_string = connection_string - self.name = name - self.subscription_id = subscription_id - self.resource_group = resource_group diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_storage_container_properties.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_storage_container_properties.py deleted file mode 100644 index 094d6e27f0b2..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_storage_container_properties.py +++ /dev/null @@ -1,86 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RoutingStorageContainerProperties(Model): - """The properties related to a storage container endpoint. - - All required parameters must be populated in order to send to Azure. - - :param connection_string: Required. The connection string of the storage - account. - :type connection_string: str - :param name: Required. The name that identifies this endpoint. The name - can only include alphanumeric characters, periods, underscores, hyphens - and has a maximum length of 64 characters. The following names are - reserved: events, fileNotifications, $default. Endpoint names must be - unique across endpoint types. - :type name: str - :param subscription_id: The subscription identifier of the storage - account. - :type subscription_id: str - :param resource_group: The name of the resource group of the storage - account. - :type resource_group: str - :param container_name: Required. The name of storage container in the - storage account. - :type container_name: str - :param file_name_format: File name format for the blob. Default format is - {iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}. All parameters are - mandatory but can be reordered. - :type file_name_format: str - :param batch_frequency_in_seconds: Time interval at which blobs are - written to storage. Value should be between 60 and 720 seconds. Default - value is 300 seconds. - :type batch_frequency_in_seconds: int - :param max_chunk_size_in_bytes: Maximum number of bytes for each blob - written to storage. Value should be between 10485760(10MB) and - 524288000(500MB). Default value is 314572800(300MB). - :type max_chunk_size_in_bytes: int - :param encoding: Encoding that is used to serialize messages to blobs. - Supported values are 'avro', 'avrodeflate', and 'JSON'. Default value is - 'avro'. Possible values include: 'Avro', 'AvroDeflate', 'JSON' - :type encoding: str or ~azure.mgmt.iothub.models.enum - """ - - _validation = { - 'connection_string': {'required': True}, - 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, - 'container_name': {'required': True}, - 'batch_frequency_in_seconds': {'maximum': 720, 'minimum': 60}, - 'max_chunk_size_in_bytes': {'maximum': 524288000, 'minimum': 10485760}, - } - - _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'container_name': {'key': 'containerName', 'type': 'str'}, - 'file_name_format': {'key': 'fileNameFormat', 'type': 'str'}, - 'batch_frequency_in_seconds': {'key': 'batchFrequencyInSeconds', 'type': 'int'}, - 'max_chunk_size_in_bytes': {'key': 'maxChunkSizeInBytes', 'type': 'int'}, - 'encoding': {'key': 'encoding', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RoutingStorageContainerProperties, self).__init__(**kwargs) - self.connection_string = kwargs.get('connection_string', None) - self.name = kwargs.get('name', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group = kwargs.get('resource_group', None) - self.container_name = kwargs.get('container_name', None) - self.file_name_format = kwargs.get('file_name_format', None) - self.batch_frequency_in_seconds = kwargs.get('batch_frequency_in_seconds', None) - self.max_chunk_size_in_bytes = kwargs.get('max_chunk_size_in_bytes', None) - self.encoding = kwargs.get('encoding', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_storage_container_properties_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_storage_container_properties_py3.py deleted file mode 100644 index 232ce49b5f5d..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_storage_container_properties_py3.py +++ /dev/null @@ -1,86 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RoutingStorageContainerProperties(Model): - """The properties related to a storage container endpoint. - - All required parameters must be populated in order to send to Azure. - - :param connection_string: Required. The connection string of the storage - account. - :type connection_string: str - :param name: Required. The name that identifies this endpoint. The name - can only include alphanumeric characters, periods, underscores, hyphens - and has a maximum length of 64 characters. The following names are - reserved: events, fileNotifications, $default. Endpoint names must be - unique across endpoint types. - :type name: str - :param subscription_id: The subscription identifier of the storage - account. - :type subscription_id: str - :param resource_group: The name of the resource group of the storage - account. - :type resource_group: str - :param container_name: Required. The name of storage container in the - storage account. - :type container_name: str - :param file_name_format: File name format for the blob. Default format is - {iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}. All parameters are - mandatory but can be reordered. - :type file_name_format: str - :param batch_frequency_in_seconds: Time interval at which blobs are - written to storage. Value should be between 60 and 720 seconds. Default - value is 300 seconds. - :type batch_frequency_in_seconds: int - :param max_chunk_size_in_bytes: Maximum number of bytes for each blob - written to storage. Value should be between 10485760(10MB) and - 524288000(500MB). Default value is 314572800(300MB). - :type max_chunk_size_in_bytes: int - :param encoding: Encoding that is used to serialize messages to blobs. - Supported values are 'avro', 'avrodeflate', and 'JSON'. Default value is - 'avro'. Possible values include: 'Avro', 'AvroDeflate', 'JSON' - :type encoding: str or ~azure.mgmt.iothub.models.enum - """ - - _validation = { - 'connection_string': {'required': True}, - 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, - 'container_name': {'required': True}, - 'batch_frequency_in_seconds': {'maximum': 720, 'minimum': 60}, - 'max_chunk_size_in_bytes': {'maximum': 524288000, 'minimum': 10485760}, - } - - _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'container_name': {'key': 'containerName', 'type': 'str'}, - 'file_name_format': {'key': 'fileNameFormat', 'type': 'str'}, - 'batch_frequency_in_seconds': {'key': 'batchFrequencyInSeconds', 'type': 'int'}, - 'max_chunk_size_in_bytes': {'key': 'maxChunkSizeInBytes', 'type': 'int'}, - 'encoding': {'key': 'encoding', 'type': 'str'}, - } - - def __init__(self, *, connection_string: str, name: str, container_name: str, subscription_id: str=None, resource_group: str=None, file_name_format: str=None, batch_frequency_in_seconds: int=None, max_chunk_size_in_bytes: int=None, encoding=None, **kwargs) -> None: - super(RoutingStorageContainerProperties, self).__init__(**kwargs) - self.connection_string = connection_string - self.name = name - self.subscription_id = subscription_id - self.resource_group = resource_group - self.container_name = container_name - self.file_name_format = file_name_format - self.batch_frequency_in_seconds = batch_frequency_in_seconds - self.max_chunk_size_in_bytes = max_chunk_size_in_bytes - self.encoding = encoding diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_twin.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_twin.py deleted file mode 100644 index e2405ca5f721..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_twin.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RoutingTwin(Model): - """Twin reference input parameter. This is an optional parameter. - - :param tags: Twin Tags - :type tags: object - :param properties: - :type properties: ~azure.mgmt.iothub.models.RoutingTwinProperties - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': 'object'}, - 'properties': {'key': 'properties', 'type': 'RoutingTwinProperties'}, - } - - def __init__(self, **kwargs): - super(RoutingTwin, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.properties = kwargs.get('properties', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_twin_properties.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_twin_properties.py deleted file mode 100644 index dca08414ddf2..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_twin_properties.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RoutingTwinProperties(Model): - """RoutingTwinProperties. - - :param desired: Twin desired properties - :type desired: object - :param reported: Twin desired properties - :type reported: object - """ - - _attribute_map = { - 'desired': {'key': 'desired', 'type': 'object'}, - 'reported': {'key': 'reported', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(RoutingTwinProperties, self).__init__(**kwargs) - self.desired = kwargs.get('desired', None) - self.reported = kwargs.get('reported', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_twin_properties_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_twin_properties_py3.py deleted file mode 100644 index 9e77dccafaeb..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_twin_properties_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RoutingTwinProperties(Model): - """RoutingTwinProperties. - - :param desired: Twin desired properties - :type desired: object - :param reported: Twin desired properties - :type reported: object - """ - - _attribute_map = { - 'desired': {'key': 'desired', 'type': 'object'}, - 'reported': {'key': 'reported', 'type': 'object'}, - } - - def __init__(self, *, desired=None, reported=None, **kwargs) -> None: - super(RoutingTwinProperties, self).__init__(**kwargs) - self.desired = desired - self.reported = reported diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_twin_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_twin_py3.py deleted file mode 100644 index 0badfbc7e89e..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_twin_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RoutingTwin(Model): - """Twin reference input parameter. This is an optional parameter. - - :param tags: Twin Tags - :type tags: object - :param properties: - :type properties: ~azure.mgmt.iothub.models.RoutingTwinProperties - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': 'object'}, - 'properties': {'key': 'properties', 'type': 'RoutingTwinProperties'}, - } - - def __init__(self, *, tags=None, properties=None, **kwargs) -> None: - super(RoutingTwin, self).__init__(**kwargs) - self.tags = tags - self.properties = properties diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/shared_access_signature_authorization_rule.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/shared_access_signature_authorization_rule.py deleted file mode 100644 index be54ad8ab717..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/shared_access_signature_authorization_rule.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SharedAccessSignatureAuthorizationRule(Model): - """The properties of an IoT hub shared access policy. - - All required parameters must be populated in order to send to Azure. - - :param key_name: Required. The name of the shared access policy. - :type key_name: str - :param primary_key: The primary key. - :type primary_key: str - :param secondary_key: The secondary key. - :type secondary_key: str - :param rights: Required. The permissions assigned to the shared access - policy. Possible values include: 'RegistryRead', 'RegistryWrite', - 'ServiceConnect', 'DeviceConnect', 'RegistryRead, RegistryWrite', - 'RegistryRead, ServiceConnect', 'RegistryRead, DeviceConnect', - 'RegistryWrite, ServiceConnect', 'RegistryWrite, DeviceConnect', - 'ServiceConnect, DeviceConnect', 'RegistryRead, RegistryWrite, - ServiceConnect', 'RegistryRead, RegistryWrite, DeviceConnect', - 'RegistryRead, ServiceConnect, DeviceConnect', 'RegistryWrite, - ServiceConnect, DeviceConnect', 'RegistryRead, RegistryWrite, - ServiceConnect, DeviceConnect' - :type rights: str or ~azure.mgmt.iothub.models.AccessRights - """ - - _validation = { - 'key_name': {'required': True}, - 'rights': {'required': True}, - } - - _attribute_map = { - 'key_name': {'key': 'keyName', 'type': 'str'}, - 'primary_key': {'key': 'primaryKey', 'type': 'str'}, - 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, - 'rights': {'key': 'rights', 'type': 'AccessRights'}, - } - - def __init__(self, **kwargs): - super(SharedAccessSignatureAuthorizationRule, self).__init__(**kwargs) - self.key_name = kwargs.get('key_name', None) - self.primary_key = kwargs.get('primary_key', None) - self.secondary_key = kwargs.get('secondary_key', None) - self.rights = kwargs.get('rights', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/shared_access_signature_authorization_rule_paged.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/shared_access_signature_authorization_rule_paged.py deleted file mode 100644 index 72971de285e6..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/shared_access_signature_authorization_rule_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SharedAccessSignatureAuthorizationRulePaged(Paged): - """ - A paging container for iterating over a list of :class:`SharedAccessSignatureAuthorizationRule ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SharedAccessSignatureAuthorizationRule]'} - } - - def __init__(self, *args, **kwargs): - - super(SharedAccessSignatureAuthorizationRulePaged, self).__init__(*args, **kwargs) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/shared_access_signature_authorization_rule_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/shared_access_signature_authorization_rule_py3.py deleted file mode 100644 index e65028a6ec16..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/shared_access_signature_authorization_rule_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SharedAccessSignatureAuthorizationRule(Model): - """The properties of an IoT hub shared access policy. - - All required parameters must be populated in order to send to Azure. - - :param key_name: Required. The name of the shared access policy. - :type key_name: str - :param primary_key: The primary key. - :type primary_key: str - :param secondary_key: The secondary key. - :type secondary_key: str - :param rights: Required. The permissions assigned to the shared access - policy. Possible values include: 'RegistryRead', 'RegistryWrite', - 'ServiceConnect', 'DeviceConnect', 'RegistryRead, RegistryWrite', - 'RegistryRead, ServiceConnect', 'RegistryRead, DeviceConnect', - 'RegistryWrite, ServiceConnect', 'RegistryWrite, DeviceConnect', - 'ServiceConnect, DeviceConnect', 'RegistryRead, RegistryWrite, - ServiceConnect', 'RegistryRead, RegistryWrite, DeviceConnect', - 'RegistryRead, ServiceConnect, DeviceConnect', 'RegistryWrite, - ServiceConnect, DeviceConnect', 'RegistryRead, RegistryWrite, - ServiceConnect, DeviceConnect' - :type rights: str or ~azure.mgmt.iothub.models.AccessRights - """ - - _validation = { - 'key_name': {'required': True}, - 'rights': {'required': True}, - } - - _attribute_map = { - 'key_name': {'key': 'keyName', 'type': 'str'}, - 'primary_key': {'key': 'primaryKey', 'type': 'str'}, - 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, - 'rights': {'key': 'rights', 'type': 'AccessRights'}, - } - - def __init__(self, *, key_name: str, rights, primary_key: str=None, secondary_key: str=None, **kwargs) -> None: - super(SharedAccessSignatureAuthorizationRule, self).__init__(**kwargs) - self.key_name = key_name - self.primary_key = primary_key - self.secondary_key = secondary_key - self.rights = rights diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/storage_endpoint_properties.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/storage_endpoint_properties.py deleted file mode 100644 index c7d89dd13b2b..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/storage_endpoint_properties.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class StorageEndpointProperties(Model): - """The properties of the Azure Storage endpoint for file upload. - - All required parameters must be populated in order to send to Azure. - - :param sas_ttl_as_iso8601: The period of time for which the SAS URI - generated by IoT Hub for file upload is valid. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload#file-upload-notification-configuration-options. - :type sas_ttl_as_iso8601: timedelta - :param connection_string: Required. The connection string for the Azure - Storage account to which files are uploaded. - :type connection_string: str - :param container_name: Required. The name of the root container where you - upload files. The container need not exist but should be creatable using - the connectionString specified. - :type container_name: str - """ - - _validation = { - 'connection_string': {'required': True}, - 'container_name': {'required': True}, - } - - _attribute_map = { - 'sas_ttl_as_iso8601': {'key': 'sasTtlAsIso8601', 'type': 'duration'}, - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'container_name': {'key': 'containerName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(StorageEndpointProperties, self).__init__(**kwargs) - self.sas_ttl_as_iso8601 = kwargs.get('sas_ttl_as_iso8601', None) - self.connection_string = kwargs.get('connection_string', None) - self.container_name = kwargs.get('container_name', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/storage_endpoint_properties_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/storage_endpoint_properties_py3.py deleted file mode 100644 index 015e0488bd7b..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/storage_endpoint_properties_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class StorageEndpointProperties(Model): - """The properties of the Azure Storage endpoint for file upload. - - All required parameters must be populated in order to send to Azure. - - :param sas_ttl_as_iso8601: The period of time for which the SAS URI - generated by IoT Hub for file upload is valid. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload#file-upload-notification-configuration-options. - :type sas_ttl_as_iso8601: timedelta - :param connection_string: Required. The connection string for the Azure - Storage account to which files are uploaded. - :type connection_string: str - :param container_name: Required. The name of the root container where you - upload files. The container need not exist but should be creatable using - the connectionString specified. - :type container_name: str - """ - - _validation = { - 'connection_string': {'required': True}, - 'container_name': {'required': True}, - } - - _attribute_map = { - 'sas_ttl_as_iso8601': {'key': 'sasTtlAsIso8601', 'type': 'duration'}, - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'container_name': {'key': 'containerName', 'type': 'str'}, - } - - def __init__(self, *, connection_string: str, container_name: str, sas_ttl_as_iso8601=None, **kwargs) -> None: - super(StorageEndpointProperties, self).__init__(**kwargs) - self.sas_ttl_as_iso8601 = sas_ttl_as_iso8601 - self.connection_string = connection_string - self.container_name = container_name diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/tags_resource.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/tags_resource.py deleted file mode 100644 index 76bbf8349862..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/tags_resource.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TagsResource(Model): - """A container holding only the Tags for a resource, allowing the user to - update the tags on an IoT Hub instance. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TagsResource, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/tags_resource_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/tags_resource_py3.py deleted file mode 100644 index d7b8c492a731..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/tags_resource_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TagsResource(Model): - """A container holding only the Tags for a resource, allowing the user to - update the tags on an IoT Hub instance. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(TagsResource, self).__init__(**kwargs) - self.tags = tags diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_all_routes_input.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_all_routes_input.py deleted file mode 100644 index ac6820f6df5d..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_all_routes_input.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TestAllRoutesInput(Model): - """Input for testing all routes. - - :param routing_source: Routing source. Possible values include: 'Invalid', - 'DeviceMessages', 'TwinChangeEvents', 'DeviceLifecycleEvents', - 'DeviceJobLifecycleEvents' - :type routing_source: str or ~azure.mgmt.iothub.models.RoutingSource - :param message: Routing message - :type message: ~azure.mgmt.iothub.models.RoutingMessage - :param twin: Routing Twin Reference - :type twin: ~azure.mgmt.iothub.models.RoutingTwin - """ - - _attribute_map = { - 'routing_source': {'key': 'routingSource', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'RoutingMessage'}, - 'twin': {'key': 'twin', 'type': 'RoutingTwin'}, - } - - def __init__(self, **kwargs): - super(TestAllRoutesInput, self).__init__(**kwargs) - self.routing_source = kwargs.get('routing_source', None) - self.message = kwargs.get('message', None) - self.twin = kwargs.get('twin', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_all_routes_input_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_all_routes_input_py3.py deleted file mode 100644 index 17e18f80df1f..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_all_routes_input_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TestAllRoutesInput(Model): - """Input for testing all routes. - - :param routing_source: Routing source. Possible values include: 'Invalid', - 'DeviceMessages', 'TwinChangeEvents', 'DeviceLifecycleEvents', - 'DeviceJobLifecycleEvents' - :type routing_source: str or ~azure.mgmt.iothub.models.RoutingSource - :param message: Routing message - :type message: ~azure.mgmt.iothub.models.RoutingMessage - :param twin: Routing Twin Reference - :type twin: ~azure.mgmt.iothub.models.RoutingTwin - """ - - _attribute_map = { - 'routing_source': {'key': 'routingSource', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'RoutingMessage'}, - 'twin': {'key': 'twin', 'type': 'RoutingTwin'}, - } - - def __init__(self, *, routing_source=None, message=None, twin=None, **kwargs) -> None: - super(TestAllRoutesInput, self).__init__(**kwargs) - self.routing_source = routing_source - self.message = message - self.twin = twin diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_all_routes_result.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_all_routes_result.py deleted file mode 100644 index 7d9488f8c551..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_all_routes_result.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TestAllRoutesResult(Model): - """Result of testing all routes. - - :param routes: JSON-serialized array of matched routes - :type routes: list[~azure.mgmt.iothub.models.MatchedRoute] - """ - - _attribute_map = { - 'routes': {'key': 'routes', 'type': '[MatchedRoute]'}, - } - - def __init__(self, **kwargs): - super(TestAllRoutesResult, self).__init__(**kwargs) - self.routes = kwargs.get('routes', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_all_routes_result_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_all_routes_result_py3.py deleted file mode 100644 index da5c085f8e0a..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_all_routes_result_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TestAllRoutesResult(Model): - """Result of testing all routes. - - :param routes: JSON-serialized array of matched routes - :type routes: list[~azure.mgmt.iothub.models.MatchedRoute] - """ - - _attribute_map = { - 'routes': {'key': 'routes', 'type': '[MatchedRoute]'}, - } - - def __init__(self, *, routes=None, **kwargs) -> None: - super(TestAllRoutesResult, self).__init__(**kwargs) - self.routes = routes diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_input.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_input.py deleted file mode 100644 index 68fce8a3fcc2..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_input.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TestRouteInput(Model): - """Input for testing route. - - All required parameters must be populated in order to send to Azure. - - :param message: Routing message - :type message: ~azure.mgmt.iothub.models.RoutingMessage - :param route: Required. Route properties - :type route: ~azure.mgmt.iothub.models.RouteProperties - :param twin: Routing Twin Reference - :type twin: ~azure.mgmt.iothub.models.RoutingTwin - """ - - _validation = { - 'route': {'required': True}, - } - - _attribute_map = { - 'message': {'key': 'message', 'type': 'RoutingMessage'}, - 'route': {'key': 'route', 'type': 'RouteProperties'}, - 'twin': {'key': 'twin', 'type': 'RoutingTwin'}, - } - - def __init__(self, **kwargs): - super(TestRouteInput, self).__init__(**kwargs) - self.message = kwargs.get('message', None) - self.route = kwargs.get('route', None) - self.twin = kwargs.get('twin', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_input_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_input_py3.py deleted file mode 100644 index 65df810dfd73..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_input_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TestRouteInput(Model): - """Input for testing route. - - All required parameters must be populated in order to send to Azure. - - :param message: Routing message - :type message: ~azure.mgmt.iothub.models.RoutingMessage - :param route: Required. Route properties - :type route: ~azure.mgmt.iothub.models.RouteProperties - :param twin: Routing Twin Reference - :type twin: ~azure.mgmt.iothub.models.RoutingTwin - """ - - _validation = { - 'route': {'required': True}, - } - - _attribute_map = { - 'message': {'key': 'message', 'type': 'RoutingMessage'}, - 'route': {'key': 'route', 'type': 'RouteProperties'}, - 'twin': {'key': 'twin', 'type': 'RoutingTwin'}, - } - - def __init__(self, *, route, message=None, twin=None, **kwargs) -> None: - super(TestRouteInput, self).__init__(**kwargs) - self.message = message - self.route = route - self.twin = twin diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_result.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_result.py deleted file mode 100644 index 5c0ae7ff8f1d..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_result.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TestRouteResult(Model): - """Result of testing one route. - - :param result: Result of testing route. Possible values include: - 'undefined', 'false', 'true' - :type result: str or ~azure.mgmt.iothub.models.TestResultStatus - :param details: Detailed result of testing route - :type details: ~azure.mgmt.iothub.models.TestRouteResultDetails - """ - - _attribute_map = { - 'result': {'key': 'result', 'type': 'str'}, - 'details': {'key': 'details', 'type': 'TestRouteResultDetails'}, - } - - def __init__(self, **kwargs): - super(TestRouteResult, self).__init__(**kwargs) - self.result = kwargs.get('result', None) - self.details = kwargs.get('details', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_result_details.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_result_details.py deleted file mode 100644 index 53e3b99b6e8e..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_result_details.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TestRouteResultDetails(Model): - """Detailed result of testing a route. - - :param compilation_errors: JSON-serialized list of route compilation - errors - :type compilation_errors: - list[~azure.mgmt.iothub.models.RouteCompilationError] - """ - - _attribute_map = { - 'compilation_errors': {'key': 'compilationErrors', 'type': '[RouteCompilationError]'}, - } - - def __init__(self, **kwargs): - super(TestRouteResultDetails, self).__init__(**kwargs) - self.compilation_errors = kwargs.get('compilation_errors', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_result_details_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_result_details_py3.py deleted file mode 100644 index 6a1b850bb223..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_result_details_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TestRouteResultDetails(Model): - """Detailed result of testing a route. - - :param compilation_errors: JSON-serialized list of route compilation - errors - :type compilation_errors: - list[~azure.mgmt.iothub.models.RouteCompilationError] - """ - - _attribute_map = { - 'compilation_errors': {'key': 'compilationErrors', 'type': '[RouteCompilationError]'}, - } - - def __init__(self, *, compilation_errors=None, **kwargs) -> None: - super(TestRouteResultDetails, self).__init__(**kwargs) - self.compilation_errors = compilation_errors diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_result_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_result_py3.py deleted file mode 100644 index 40bc12b3c63c..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_result_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TestRouteResult(Model): - """Result of testing one route. - - :param result: Result of testing route. Possible values include: - 'undefined', 'false', 'true' - :type result: str or ~azure.mgmt.iothub.models.TestResultStatus - :param details: Detailed result of testing route - :type details: ~azure.mgmt.iothub.models.TestRouteResultDetails - """ - - _attribute_map = { - 'result': {'key': 'result', 'type': 'str'}, - 'details': {'key': 'details', 'type': 'TestRouteResultDetails'}, - } - - def __init__(self, *, result=None, details=None, **kwargs) -> None: - super(TestRouteResult, self).__init__(**kwargs) - self.result = result - self.details = details diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/user_subscription_quota.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/user_subscription_quota.py deleted file mode 100644 index 5c5e474c74d4..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/user_subscription_quota.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserSubscriptionQuota(Model): - """User subscription quota response. - - :param id: IotHub type id - :type id: str - :param type: Response type - :type type: str - :param unit: Unit of IotHub type - :type unit: str - :param current_value: Current number of IotHub type - :type current_value: int - :param limit: Numerical limit on IotHub type - :type limit: int - :param name: IotHub type - :type name: ~azure.mgmt.iothub.models.Name - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'int'}, - 'limit': {'key': 'limit', 'type': 'int'}, - 'name': {'key': 'name', 'type': 'Name'}, - } - - def __init__(self, **kwargs): - super(UserSubscriptionQuota, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.type = kwargs.get('type', None) - self.unit = kwargs.get('unit', None) - self.current_value = kwargs.get('current_value', None) - self.limit = kwargs.get('limit', None) - self.name = kwargs.get('name', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/user_subscription_quota_list_result.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/user_subscription_quota_list_result.py deleted file mode 100644 index 28595a1a5dbb..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/user_subscription_quota_list_result.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserSubscriptionQuotaListResult(Model): - """Json-serialized array of User subscription quota response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param value: - :type value: list[~azure.mgmt.iothub.models.UserSubscriptionQuota] - :ivar next_link: - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[UserSubscriptionQuota]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserSubscriptionQuotaListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/user_subscription_quota_list_result_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/user_subscription_quota_list_result_py3.py deleted file mode 100644 index 23ee4346bc48..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/user_subscription_quota_list_result_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserSubscriptionQuotaListResult(Model): - """Json-serialized array of User subscription quota response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param value: - :type value: list[~azure.mgmt.iothub.models.UserSubscriptionQuota] - :ivar next_link: - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[UserSubscriptionQuota]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(UserSubscriptionQuotaListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/user_subscription_quota_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/user_subscription_quota_py3.py deleted file mode 100644 index fb3011550948..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/user_subscription_quota_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserSubscriptionQuota(Model): - """User subscription quota response. - - :param id: IotHub type id - :type id: str - :param type: Response type - :type type: str - :param unit: Unit of IotHub type - :type unit: str - :param current_value: Current number of IotHub type - :type current_value: int - :param limit: Numerical limit on IotHub type - :type limit: int - :param name: IotHub type - :type name: ~azure.mgmt.iothub.models.Name - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'int'}, - 'limit': {'key': 'limit', 'type': 'int'}, - 'name': {'key': 'name', 'type': 'Name'}, - } - - def __init__(self, *, id: str=None, type: str=None, unit: str=None, current_value: int=None, limit: int=None, name=None, **kwargs) -> None: - super(UserSubscriptionQuota, self).__init__(**kwargs) - self.id = id - self.type = type - self.unit = unit - self.current_value = current_value - self.limit = limit - self.name = name diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/__init__.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/__init__.py index e95609a34834..a30b3dc26f79 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/__init__.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/__init__.py @@ -9,11 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .operations import Operations -from .iot_hub_resource_operations import IotHubResourceOperations -from .resource_provider_common_operations import ResourceProviderCommonOperations -from .certificates_operations import CertificatesOperations -from .iot_hub_operations import IotHubOperations +from ._operations import Operations +from ._iot_hub_resource_operations import IotHubResourceOperations +from ._resource_provider_common_operations import ResourceProviderCommonOperations +from ._certificates_operations import CertificatesOperations +from ._iot_hub_operations import IotHubOperations __all__ = [ 'Operations', diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_certificates_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_certificates_operations.py new file mode 100644 index 000000000000..aaade9ffcdee --- /dev/null +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_certificates_operations.py @@ -0,0 +1,462 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class CertificatesOperations(object): + """CertificatesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API. Constant value: "2019-03-22-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-03-22-preview" + + self.config = config + + def list_by_iot_hub( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Get the certificate list. + + Returns the list of certificates. + + :param resource_group_name: The name of the resource group that + contains the IoT hub. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CertificateListDescription or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.iothub.models.CertificateListDescription or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorDetailsException` + """ + # Construct URL + url = self.list_by_iot_hub.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CertificateListDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_by_iot_hub.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates'} + + def get( + self, resource_group_name, resource_name, certificate_name, custom_headers=None, raw=False, **operation_config): + """Get the certificate. + + Returns the certificate. + + :param resource_group_name: The name of the resource group that + contains the IoT hub. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. + :type resource_name: str + :param certificate_name: The name of the certificate + :type certificate_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CertificateDescription or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.iothub.models.CertificateDescription or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorDetailsException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str', pattern=r'^[A-Za-z0-9-._]{1,64}$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CertificateDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}'} + + def create_or_update( + self, resource_group_name, resource_name, certificate_name, if_match=None, certificate=None, custom_headers=None, raw=False, **operation_config): + """Upload the certificate to the IoT hub. + + Adds new or replaces existing certificate. + + :param resource_group_name: The name of the resource group that + contains the IoT hub. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. + :type resource_name: str + :param certificate_name: The name of the certificate + :type certificate_name: str + :param if_match: ETag of the Certificate. Do not specify for creating + a brand new certificate. Required to update an existing certificate. + :type if_match: str + :param certificate: base-64 representation of the X509 leaf + certificate .cer file or just .pem file content. + :type certificate: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CertificateDescription or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.iothub.models.CertificateDescription or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorDetailsException` + """ + certificate_description = models.CertificateBodyDescription(certificate=certificate) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str', pattern=r'^[A-Za-z0-9-._]{1,64}$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(certificate_description, 'CertificateBodyDescription') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CertificateDescription', response) + if response.status_code == 201: + deserialized = self._deserialize('CertificateDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}'} + + def delete( + self, resource_group_name, resource_name, certificate_name, if_match, custom_headers=None, raw=False, **operation_config): + """Delete an X509 certificate. + + Deletes an existing X509 certificate or does nothing if it does not + exist. + + :param resource_group_name: The name of the resource group that + contains the IoT hub. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. + :type resource_name: str + :param certificate_name: The name of the certificate + :type certificate_name: str + :param if_match: ETag of the Certificate. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorDetailsException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str', pattern=r'^[A-Za-z0-9-._]{1,64}$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorDetailsException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}'} + + def generate_verification_code( + self, resource_group_name, resource_name, certificate_name, if_match, custom_headers=None, raw=False, **operation_config): + """Generate verification code for proof of possession flow. + + Generates verification code for proof of possession flow. The + verification code will be used to generate a leaf certificate. + + :param resource_group_name: The name of the resource group that + contains the IoT hub. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. + :type resource_name: str + :param certificate_name: The name of the certificate + :type certificate_name: str + :param if_match: ETag of the Certificate. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CertificateWithNonceDescription or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.iothub.models.CertificateWithNonceDescription or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorDetailsException` + """ + # Construct URL + url = self.generate_verification_code.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str', pattern=r'^[A-Za-z0-9-._]{1,64}$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CertificateWithNonceDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + generate_verification_code.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}/generateVerificationCode'} + + def verify( + self, resource_group_name, resource_name, certificate_name, if_match, certificate=None, custom_headers=None, raw=False, **operation_config): + """Verify certificate's private key possession. + + Verifies the certificate's private key possession by providing the leaf + cert issued by the verifying pre uploaded certificate. + + :param resource_group_name: The name of the resource group that + contains the IoT hub. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. + :type resource_name: str + :param certificate_name: The name of the certificate + :type certificate_name: str + :param if_match: ETag of the Certificate. + :type if_match: str + :param certificate: base-64 representation of X509 certificate .cer + file or just .pem file content. + :type certificate: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CertificateDescription or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.iothub.models.CertificateDescription or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorDetailsException` + """ + certificate_verification_body = models.CertificateVerificationDescription(certificate=certificate) + + # Construct URL + url = self.verify.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str', pattern=r'^[A-Za-z0-9-._]{1,64}$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(certificate_verification_body, 'CertificateVerificationDescription') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CertificateDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + verify.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}/verify'} diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_operations.py new file mode 100644 index 000000000000..30830c6175c9 --- /dev/null +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_operations.py @@ -0,0 +1,130 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class IotHubOperations(object): + """IotHubOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API. Constant value: "2019-03-22-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-03-22-preview" + + self.config = config + + + def _manual_failover_initial( + self, iot_hub_name, resource_group_name, failover_region, custom_headers=None, raw=False, **operation_config): + failover_input = models.FailoverInput(failover_region=failover_region) + + # Construct URL + url = self.manual_failover.metadata['url'] + path_format_arguments = { + 'iotHubName': self._serialize.url("iot_hub_name", iot_hub_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(failover_input, 'FailoverInput') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.ErrorDetailsException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def manual_failover( + self, iot_hub_name, resource_group_name, failover_region, custom_headers=None, raw=False, polling=True, **operation_config): + """Manual Failover Fail over. + + Perform manual fail over of given hub. + + :param iot_hub_name: IotHub to fail over + :type iot_hub_name: str + :param resource_group_name: resource group which Iot Hub belongs to + :type resource_group_name: str + :param failover_region: Region the hub will be failed over to + :type failover_region: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ErrorDetailsException` + """ + raw_result = self._manual_failover_initial( + iot_hub_name=iot_hub_name, + resource_group_name=resource_group_name, + failover_region=failover_region, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + manual_failover.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{iotHubName}/failover'} diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_resource_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_resource_operations.py new file mode 100644 index 000000000000..631ec6479d81 --- /dev/null +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_resource_operations.py @@ -0,0 +1,1777 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class IotHubResourceOperations(object): + """IotHubResourceOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API. Constant value: "2019-03-22-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-03-22-preview" + + self.config = config + + def get( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Get the non-security related metadata of an IoT hub. + + Get the non-security related metadata of an IoT hub. + + :param resource_group_name: The name of the resource group that + contains the IoT hub. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IotHubDescription or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.iothub.models.IotHubDescription or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorDetailsException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IotHubDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}'} + + + def _create_or_update_initial( + self, resource_group_name, resource_name, iot_hub_description, if_match=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(iot_hub_description, 'IotHubDescription') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('IotHubDescription', response) + if response.status_code == 201: + deserialized = self._deserialize('IotHubDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, resource_name, iot_hub_description, if_match=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update the metadata of an IoT hub. + + Create or update the metadata of an Iot hub. The usual pattern to + modify a property is to retrieve the IoT hub metadata and security + metadata, and then combine them with the modified values in a new body + to update the IoT hub. + + :param resource_group_name: The name of the resource group that + contains the IoT hub. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. + :type resource_name: str + :param iot_hub_description: The IoT hub metadata and security + metadata. + :type iot_hub_description: ~azure.mgmt.iothub.models.IotHubDescription + :param if_match: ETag of the IoT Hub. Do not specify for creating a + brand new IoT Hub. Required to update an existing IoT Hub. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns IotHubDescription or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.iothub.models.IotHubDescription] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.iothub.models.IotHubDescription]] + :raises: + :class:`ErrorDetailsException` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + iot_hub_description=iot_hub_description, + if_match=if_match, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('IotHubDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}'} + + + def _update_initial( + self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): + iot_hub_tags = models.TagsResource(tags=tags) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(iot_hub_tags, 'TagsResource') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('IotHubDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Update an existing IoT Hubs tags. + + Update an existing IoT Hub tags. to update other fields use the + CreateOrUpdate method. + + :param resource_group_name: Resource group identifier. + :type resource_group_name: str + :param resource_name: Name of iot hub to update. + :type resource_name: str + :param tags: Resource tags + :type tags: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns IotHubDescription or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.iothub.models.IotHubDescription] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.iothub.models.IotHubDescription]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + tags=tags, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('IotHubDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}'} + + + def _delete_initial( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204, 404]: + raise models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('IotHubDescription', response) + if response.status_code == 202: + deserialized = self._deserialize('IotHubDescription', response) + if response.status_code == 404: + deserialized = self._deserialize('ErrorDetails', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete( + self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Delete an IoT hub. + + Delete an IoT hub. + + :param resource_group_name: The name of the resource group that + contains the IoT hub. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns object or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[object] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[object]] + :raises: + :class:`ErrorDetailsException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('object', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}'} + + def list_by_subscription( + self, custom_headers=None, raw=False, **operation_config): + """Get all the IoT hubs in a subscription. + + Get all the IoT hubs in a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of IotHubDescription + :rtype: + ~azure.mgmt.iothub.models.IotHubDescriptionPaged[~azure.mgmt.iothub.models.IotHubDescription] + :raises: + :class:`ErrorDetailsException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IotHubDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Devices/IotHubs'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Get all the IoT hubs in a resource group. + + Get all the IoT hubs in a resource group. + + :param resource_group_name: The name of the resource group that + contains the IoT hub. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of IotHubDescription + :rtype: + ~azure.mgmt.iothub.models.IotHubDescriptionPaged[~azure.mgmt.iothub.models.IotHubDescription] + :raises: + :class:`ErrorDetailsException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IotHubDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs'} + + def get_stats( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Get the statistics from an IoT hub. + + Get the statistics from an IoT hub. + + :param resource_group_name: The name of the resource group that + contains the IoT hub. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RegistryStatistics or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.iothub.models.RegistryStatistics or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorDetailsException` + """ + # Construct URL + url = self.get_stats.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RegistryStatistics', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_stats.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/IotHubStats'} + + def get_valid_skus( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Get the list of valid SKUs for an IoT hub. + + Get the list of valid SKUs for an IoT hub. + + :param resource_group_name: The name of the resource group that + contains the IoT hub. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of IotHubSkuDescription + :rtype: + ~azure.mgmt.iothub.models.IotHubSkuDescriptionPaged[~azure.mgmt.iothub.models.IotHubSkuDescription] + :raises: + :class:`ErrorDetailsException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_valid_skus.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IotHubSkuDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_valid_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/skus'} + + def list_event_hub_consumer_groups( + self, resource_group_name, resource_name, event_hub_endpoint_name, custom_headers=None, raw=False, **operation_config): + """Get a list of the consumer groups in the Event Hub-compatible + device-to-cloud endpoint in an IoT hub. + + Get a list of the consumer groups in the Event Hub-compatible + device-to-cloud endpoint in an IoT hub. + + :param resource_group_name: The name of the resource group that + contains the IoT hub. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. + :type resource_name: str + :param event_hub_endpoint_name: The name of the Event Hub-compatible + endpoint. + :type event_hub_endpoint_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of EventHubConsumerGroupInfo + :rtype: + ~azure.mgmt.iothub.models.EventHubConsumerGroupInfoPaged[~azure.mgmt.iothub.models.EventHubConsumerGroupInfo] + :raises: + :class:`ErrorDetailsException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_event_hub_consumer_groups.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'eventHubEndpointName': self._serialize.url("event_hub_endpoint_name", event_hub_endpoint_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.EventHubConsumerGroupInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_event_hub_consumer_groups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups'} + + def get_event_hub_consumer_group( + self, resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers=None, raw=False, **operation_config): + """Get a consumer group from the Event Hub-compatible device-to-cloud + endpoint for an IoT hub. + + Get a consumer group from the Event Hub-compatible device-to-cloud + endpoint for an IoT hub. + + :param resource_group_name: The name of the resource group that + contains the IoT hub. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. + :type resource_name: str + :param event_hub_endpoint_name: The name of the Event Hub-compatible + endpoint in the IoT hub. + :type event_hub_endpoint_name: str + :param name: The name of the consumer group to retrieve. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: EventHubConsumerGroupInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.iothub.models.EventHubConsumerGroupInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorDetailsException` + """ + # Construct URL + url = self.get_event_hub_consumer_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'eventHubEndpointName': self._serialize.url("event_hub_endpoint_name", event_hub_endpoint_name, 'str'), + 'name': self._serialize.url("name", name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('EventHubConsumerGroupInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_event_hub_consumer_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups/{name}'} + + def create_event_hub_consumer_group( + self, resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers=None, raw=False, **operation_config): + """Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. + + Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. + + :param resource_group_name: The name of the resource group that + contains the IoT hub. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. + :type resource_name: str + :param event_hub_endpoint_name: The name of the Event Hub-compatible + endpoint in the IoT hub. + :type event_hub_endpoint_name: str + :param name: The name of the consumer group to add. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: EventHubConsumerGroupInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.iothub.models.EventHubConsumerGroupInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorDetailsException` + """ + # Construct URL + url = self.create_event_hub_consumer_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'eventHubEndpointName': self._serialize.url("event_hub_endpoint_name", event_hub_endpoint_name, 'str'), + 'name': self._serialize.url("name", name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('EventHubConsumerGroupInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_event_hub_consumer_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups/{name}'} + + def delete_event_hub_consumer_group( + self, resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers=None, raw=False, **operation_config): + """Delete a consumer group from an Event Hub-compatible endpoint in an IoT + hub. + + Delete a consumer group from an Event Hub-compatible endpoint in an IoT + hub. + + :param resource_group_name: The name of the resource group that + contains the IoT hub. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. + :type resource_name: str + :param event_hub_endpoint_name: The name of the Event Hub-compatible + endpoint in the IoT hub. + :type event_hub_endpoint_name: str + :param name: The name of the consumer group to delete. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorDetailsException` + """ + # Construct URL + url = self.delete_event_hub_consumer_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'eventHubEndpointName': self._serialize.url("event_hub_endpoint_name", event_hub_endpoint_name, 'str'), + 'name': self._serialize.url("name", name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_event_hub_consumer_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups/{name}'} + + def list_jobs( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Get a list of all the jobs in an IoT hub. For more information, see: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. + + Get a list of all the jobs in an IoT hub. For more information, see: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. + + :param resource_group_name: The name of the resource group that + contains the IoT hub. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of JobResponse + :rtype: + ~azure.mgmt.iothub.models.JobResponsePaged[~azure.mgmt.iothub.models.JobResponse] + :raises: + :class:`ErrorDetailsException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_jobs.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.JobResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/jobs'} + + def get_job( + self, resource_group_name, resource_name, job_id, custom_headers=None, raw=False, **operation_config): + """Get the details of a job from an IoT hub. For more information, see: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. + + Get the details of a job from an IoT hub. For more information, see: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. + + :param resource_group_name: The name of the resource group that + contains the IoT hub. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. + :type resource_name: str + :param job_id: The job identifier. + :type job_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: JobResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.iothub.models.JobResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorDetailsException` + """ + # Construct URL + url = self.get_job.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'jobId': self._serialize.url("job_id", job_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('JobResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/jobs/{jobId}'} + + def get_quota_metrics( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Get the quota metrics for an IoT hub. + + Get the quota metrics for an IoT hub. + + :param resource_group_name: The name of the resource group that + contains the IoT hub. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of IotHubQuotaMetricInfo + :rtype: + ~azure.mgmt.iothub.models.IotHubQuotaMetricInfoPaged[~azure.mgmt.iothub.models.IotHubQuotaMetricInfo] + :raises: + :class:`ErrorDetailsException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_quota_metrics.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IotHubQuotaMetricInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_quota_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/quotaMetrics'} + + def get_endpoint_health( + self, resource_group_name, iot_hub_name, custom_headers=None, raw=False, **operation_config): + """Get the health for routing endpoints. + + Get the health for routing endpoints. + + :param resource_group_name: + :type resource_group_name: str + :param iot_hub_name: + :type iot_hub_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of EndpointHealthData + :rtype: + ~azure.mgmt.iothub.models.EndpointHealthDataPaged[~azure.mgmt.iothub.models.EndpointHealthData] + :raises: + :class:`ErrorDetailsException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.get_endpoint_health.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'iotHubName': self._serialize.url("iot_hub_name", iot_hub_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.EndpointHealthDataPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + get_endpoint_health.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{iotHubName}/routingEndpointsHealth'} + + def check_name_availability( + self, name, custom_headers=None, raw=False, **operation_config): + """Check if an IoT hub name is available. + + Check if an IoT hub name is available. + + :param name: The name of the IoT hub to check. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IotHubNameAvailabilityInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.iothub.models.IotHubNameAvailabilityInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorDetailsException` + """ + operation_inputs = models.OperationInputs(name=name) + + # Construct URL + url = self.check_name_availability.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(operation_inputs, 'OperationInputs') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IotHubNameAvailabilityInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Devices/checkNameAvailability'} + + def test_all_routes( + self, input, iot_hub_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Test all routes. + + Test all routes configured in this Iot Hub. + + :param input: Input for testing all routes + :type input: ~azure.mgmt.iothub.models.TestAllRoutesInput + :param iot_hub_name: IotHub to be tested + :type iot_hub_name: str + :param resource_group_name: resource group which Iot Hub belongs to + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TestAllRoutesResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.iothub.models.TestAllRoutesResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorDetailsException` + """ + # Construct URL + url = self.test_all_routes.metadata['url'] + path_format_arguments = { + 'iotHubName': self._serialize.url("iot_hub_name", iot_hub_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(input, 'TestAllRoutesInput') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TestAllRoutesResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + test_all_routes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{iotHubName}/routing/routes/$testall'} + + def test_route( + self, input, iot_hub_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Test the new route. + + Test the new route for this Iot Hub. + + :param input: Route that needs to be tested + :type input: ~azure.mgmt.iothub.models.TestRouteInput + :param iot_hub_name: IotHub to be tested + :type iot_hub_name: str + :param resource_group_name: resource group which Iot Hub belongs to + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TestRouteResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.iothub.models.TestRouteResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorDetailsException` + """ + # Construct URL + url = self.test_route.metadata['url'] + path_format_arguments = { + 'iotHubName': self._serialize.url("iot_hub_name", iot_hub_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(input, 'TestRouteInput') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TestRouteResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + test_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{iotHubName}/routing/routes/$testnew'} + + def list_keys( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Get the security metadata for an IoT hub. For more information, see: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. + + Get the security metadata for an IoT hub. For more information, see: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. + + :param resource_group_name: The name of the resource group that + contains the IoT hub. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of + SharedAccessSignatureAuthorizationRule + :rtype: + ~azure.mgmt.iothub.models.SharedAccessSignatureAuthorizationRulePaged[~azure.mgmt.iothub.models.SharedAccessSignatureAuthorizationRule] + :raises: + :class:`ErrorDetailsException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_keys.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SharedAccessSignatureAuthorizationRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/listkeys'} + + def get_keys_for_key_name( + self, resource_group_name, resource_name, key_name, custom_headers=None, raw=False, **operation_config): + """Get a shared access policy by name from an IoT hub. For more + information, see: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. + + Get a shared access policy by name from an IoT hub. For more + information, see: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. + + :param resource_group_name: The name of the resource group that + contains the IoT hub. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. + :type resource_name: str + :param key_name: The name of the shared access policy. + :type key_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SharedAccessSignatureAuthorizationRule or ClientRawResponse + if raw=true + :rtype: + ~azure.mgmt.iothub.models.SharedAccessSignatureAuthorizationRule or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorDetailsException` + """ + # Construct URL + url = self.get_keys_for_key_name.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'keyName': self._serialize.url("key_name", key_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SharedAccessSignatureAuthorizationRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_keys_for_key_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/IotHubKeys/{keyName}/listkeys'} + + def export_devices( + self, resource_group_name, resource_name, export_blob_container_uri, exclude_keys, custom_headers=None, raw=False, **operation_config): + """Exports all the device identities in the IoT hub identity registry to + an Azure Storage blob container. For more information, see: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. + + Exports all the device identities in the IoT hub identity registry to + an Azure Storage blob container. For more information, see: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. + + :param resource_group_name: The name of the resource group that + contains the IoT hub. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. + :type resource_name: str + :param export_blob_container_uri: The export blob container URI. + :type export_blob_container_uri: str + :param exclude_keys: The value indicating whether keys should be + excluded during export. + :type exclude_keys: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: JobResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.iothub.models.JobResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorDetailsException` + """ + export_devices_parameters = models.ExportDevicesRequest(export_blob_container_uri=export_blob_container_uri, exclude_keys=exclude_keys) + + # Construct URL + url = self.export_devices.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(export_devices_parameters, 'ExportDevicesRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('JobResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + export_devices.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/exportDevices'} + + def import_devices( + self, resource_group_name, resource_name, input_blob_container_uri, output_blob_container_uri, custom_headers=None, raw=False, **operation_config): + """Import, update, or delete device identities in the IoT hub identity + registry from a blob. For more information, see: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. + + Import, update, or delete device identities in the IoT hub identity + registry from a blob. For more information, see: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. + + :param resource_group_name: The name of the resource group that + contains the IoT hub. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. + :type resource_name: str + :param input_blob_container_uri: The input blob container URI. + :type input_blob_container_uri: str + :param output_blob_container_uri: The output blob container URI. + :type output_blob_container_uri: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: JobResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.iothub.models.JobResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorDetailsException` + """ + import_devices_parameters = models.ImportDevicesRequest(input_blob_container_uri=input_blob_container_uri, output_blob_container_uri=output_blob_container_uri) + + # Construct URL + url = self.import_devices.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(import_devices_parameters, 'ImportDevicesRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('JobResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + import_devices.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/importDevices'} diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_operations.py new file mode 100644 index 000000000000..e05cdc550f92 --- /dev/null +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_operations.py @@ -0,0 +1,100 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class Operations(object): + """Operations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API. Constant value: "2019-03-22-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-03-22-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the available IoT Hub REST API operations. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Operation + :rtype: + ~azure.mgmt.iothub.models.OperationPaged[~azure.mgmt.iothub.models.Operation] + :raises: + :class:`ErrorDetailsException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Devices/operations'} diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_resource_provider_common_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_resource_provider_common_operations.py new file mode 100644 index 000000000000..fe5f959b5b3c --- /dev/null +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_resource_provider_common_operations.py @@ -0,0 +1,96 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ResourceProviderCommonOperations(object): + """ResourceProviderCommonOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API. Constant value: "2019-03-22-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-03-22-preview" + + self.config = config + + def get_subscription_quota( + self, custom_headers=None, raw=False, **operation_config): + """Get the number of iot hubs in the subscription. + + Get the number of free and paid iot hubs in the subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: UserSubscriptionQuotaListResult or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.iothub.models.UserSubscriptionQuotaListResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorDetailsException` + """ + # Construct URL + url = self.get_subscription_quota.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('UserSubscriptionQuotaListResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_subscription_quota.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Devices/usages'} diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/certificates_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/certificates_operations.py deleted file mode 100644 index 50b3adffbc10..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/certificates_operations.py +++ /dev/null @@ -1,465 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class CertificatesOperations(object): - """CertificatesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. Constant value: "2019-03-22-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-03-22-preview" - - self.config = config - - def list_by_iot_hub( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Get the certificate list. - - Returns the list of certificates. - - :param resource_group_name: The name of the resource group that - contains the IoT hub. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CertificateListDescription or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.iothub.models.CertificateListDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorDetailsException` - """ - # Construct URL - url = self.list_by_iot_hub.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorDetailsException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('CertificateListDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_by_iot_hub.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates'} - - def get( - self, resource_group_name, resource_name, certificate_name, custom_headers=None, raw=False, **operation_config): - """Get the certificate. - - Returns the certificate. - - :param resource_group_name: The name of the resource group that - contains the IoT hub. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. - :type resource_name: str - :param certificate_name: The name of the certificate - :type certificate_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CertificateDescription or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.iothub.models.CertificateDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorDetailsException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str', pattern=r'^[A-Za-z0-9-._]{1,64}$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorDetailsException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('CertificateDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}'} - - def create_or_update( - self, resource_group_name, resource_name, certificate_name, if_match=None, certificate=None, custom_headers=None, raw=False, **operation_config): - """Upload the certificate to the IoT hub. - - Adds new or replaces existing certificate. - - :param resource_group_name: The name of the resource group that - contains the IoT hub. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. - :type resource_name: str - :param certificate_name: The name of the certificate - :type certificate_name: str - :param if_match: ETag of the Certificate. Do not specify for creating - a brand new certificate. Required to update an existing certificate. - :type if_match: str - :param certificate: base-64 representation of the X509 leaf - certificate .cer file or just .pem file content. - :type certificate: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CertificateDescription or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.iothub.models.CertificateDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorDetailsException` - """ - certificate_description = models.CertificateBodyDescription(certificate=certificate) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str', pattern=r'^[A-Za-z0-9-._]{1,64}$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(certificate_description, 'CertificateBodyDescription') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorDetailsException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('CertificateDescription', response) - if response.status_code == 201: - deserialized = self._deserialize('CertificateDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}'} - - def delete( - self, resource_group_name, resource_name, certificate_name, if_match, custom_headers=None, raw=False, **operation_config): - """Delete an X509 certificate. - - Deletes an existing X509 certificate or does nothing if it does not - exist. - - :param resource_group_name: The name of the resource group that - contains the IoT hub. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. - :type resource_name: str - :param certificate_name: The name of the certificate - :type certificate_name: str - :param if_match: ETag of the Certificate. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorDetailsException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str', pattern=r'^[A-Za-z0-9-._]{1,64}$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - raise models.ErrorDetailsException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}'} - - def generate_verification_code( - self, resource_group_name, resource_name, certificate_name, if_match, custom_headers=None, raw=False, **operation_config): - """Generate verification code for proof of possession flow. - - Generates verification code for proof of possession flow. The - verification code will be used to generate a leaf certificate. - - :param resource_group_name: The name of the resource group that - contains the IoT hub. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. - :type resource_name: str - :param certificate_name: The name of the certificate - :type certificate_name: str - :param if_match: ETag of the Certificate. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CertificateWithNonceDescription or ClientRawResponse if - raw=true - :rtype: ~azure.mgmt.iothub.models.CertificateWithNonceDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorDetailsException` - """ - # Construct URL - url = self.generate_verification_code.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str', pattern=r'^[A-Za-z0-9-._]{1,64}$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorDetailsException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('CertificateWithNonceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - generate_verification_code.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}/generateVerificationCode'} - - def verify( - self, resource_group_name, resource_name, certificate_name, if_match, certificate=None, custom_headers=None, raw=False, **operation_config): - """Verify certificate's private key possession. - - Verifies the certificate's private key possession by providing the leaf - cert issued by the verifying pre uploaded certificate. - - :param resource_group_name: The name of the resource group that - contains the IoT hub. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. - :type resource_name: str - :param certificate_name: The name of the certificate - :type certificate_name: str - :param if_match: ETag of the Certificate. - :type if_match: str - :param certificate: base-64 representation of X509 certificate .cer - file or just .pem file content. - :type certificate: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CertificateDescription or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.iothub.models.CertificateDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorDetailsException` - """ - certificate_verification_body = models.CertificateVerificationDescription(certificate=certificate) - - # Construct URL - url = self.verify.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str', pattern=r'^[A-Za-z0-9-._]{1,64}$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(certificate_verification_body, 'CertificateVerificationDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorDetailsException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('CertificateDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - verify.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}/verify'} diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/iot_hub_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/iot_hub_operations.py deleted file mode 100644 index 073723a53a72..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/iot_hub_operations.py +++ /dev/null @@ -1,128 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class IotHubOperations(object): - """IotHubOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. Constant value: "2019-03-22-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-03-22-preview" - - self.config = config - - - def _manual_failover_initial( - self, iot_hub_name, resource_group_name, failover_region, custom_headers=None, raw=False, **operation_config): - failover_input = models.FailoverInput(failover_region=failover_region) - - # Construct URL - url = self.manual_failover.metadata['url'] - path_format_arguments = { - 'iotHubName': self._serialize.url("iot_hub_name", iot_hub_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(failover_input, 'FailoverInput') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.ErrorDetailsException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def manual_failover( - self, iot_hub_name, resource_group_name, failover_region, custom_headers=None, raw=False, polling=True, **operation_config): - """Manual Failover Fail over. - - Perform manual fail over of given hub. - - :param iot_hub_name: IotHub to fail over - :type iot_hub_name: str - :param resource_group_name: resource group which Iot Hub belongs to - :type resource_group_name: str - :param failover_region: Region the hub will be failed over to - :type failover_region: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`ErrorDetailsException` - """ - raw_result = self._manual_failover_initial( - iot_hub_name=iot_hub_name, - resource_group_name=resource_group_name, - failover_region=failover_region, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - manual_failover.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{iotHubName}/failover'} diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/iot_hub_resource_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/iot_hub_resource_operations.py deleted file mode 100644 index 28e8ff21971d..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/iot_hub_resource_operations.py +++ /dev/null @@ -1,1770 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class IotHubResourceOperations(object): - """IotHubResourceOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. Constant value: "2019-03-22-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-03-22-preview" - - self.config = config - - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Get the non-security related metadata of an IoT hub. - - Get the non-security related metadata of an IoT hub. - - :param resource_group_name: The name of the resource group that - contains the IoT hub. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IotHubDescription or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.iothub.models.IotHubDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorDetailsException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorDetailsException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('IotHubDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, iot_hub_description, if_match=None, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(iot_hub_description, 'IotHubDescription') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorDetailsException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('IotHubDescription', response) - if response.status_code == 201: - deserialized = self._deserialize('IotHubDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, iot_hub_description, if_match=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update the metadata of an IoT hub. - - Create or update the metadata of an Iot hub. The usual pattern to - modify a property is to retrieve the IoT hub metadata and security - metadata, and then combine them with the modified values in a new body - to update the IoT hub. - - :param resource_group_name: The name of the resource group that - contains the IoT hub. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. - :type resource_name: str - :param iot_hub_description: The IoT hub metadata and security - metadata. - :type iot_hub_description: ~azure.mgmt.iothub.models.IotHubDescription - :param if_match: ETag of the IoT Hub. Do not specify for creating a - brand new IoT Hub. Required to update an existing IoT Hub. - :type if_match: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns IotHubDescription or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.iothub.models.IotHubDescription] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.iothub.models.IotHubDescription]] - :raises: - :class:`ErrorDetailsException` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - iot_hub_description=iot_hub_description, - if_match=if_match, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('IotHubDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}'} - - - def _update_initial( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): - iot_hub_tags = models.TagsResource(tags=tags) - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(iot_hub_tags, 'TagsResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('IotHubDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Update an existing IoT Hubs tags. - - Update an existing IoT Hub tags. to update other fields use the - CreateOrUpdate method. - - :param resource_group_name: Resource group identifier. - :type resource_group_name: str - :param resource_name: Name of iot hub to update. - :type resource_name: str - :param tags: Resource tags - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns IotHubDescription or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.iothub.models.IotHubDescription] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.iothub.models.IotHubDescription]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('IotHubDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204, 404]: - raise models.ErrorDetailsException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('IotHubDescription', response) - if response.status_code == 202: - deserialized = self._deserialize('IotHubDescription', response) - if response.status_code == 404: - deserialized = self._deserialize('ErrorDetails', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Delete an IoT hub. - - Delete an IoT hub. - - :param resource_group_name: The name of the resource group that - contains the IoT hub. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns object or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[object] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[object]] - :raises: - :class:`ErrorDetailsException` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('object', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}'} - - def list_by_subscription( - self, custom_headers=None, raw=False, **operation_config): - """Get all the IoT hubs in a subscription. - - Get all the IoT hubs in a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of IotHubDescription - :rtype: - ~azure.mgmt.iothub.models.IotHubDescriptionPaged[~azure.mgmt.iothub.models.IotHubDescription] - :raises: - :class:`ErrorDetailsException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorDetailsException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.IotHubDescriptionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.IotHubDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Devices/IotHubs'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Get all the IoT hubs in a resource group. - - Get all the IoT hubs in a resource group. - - :param resource_group_name: The name of the resource group that - contains the IoT hub. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of IotHubDescription - :rtype: - ~azure.mgmt.iothub.models.IotHubDescriptionPaged[~azure.mgmt.iothub.models.IotHubDescription] - :raises: - :class:`ErrorDetailsException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorDetailsException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.IotHubDescriptionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.IotHubDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs'} - - def get_stats( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Get the statistics from an IoT hub. - - Get the statistics from an IoT hub. - - :param resource_group_name: The name of the resource group that - contains the IoT hub. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RegistryStatistics or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.iothub.models.RegistryStatistics or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorDetailsException` - """ - # Construct URL - url = self.get_stats.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorDetailsException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RegistryStatistics', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_stats.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/IotHubStats'} - - def get_valid_skus( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Get the list of valid SKUs for an IoT hub. - - Get the list of valid SKUs for an IoT hub. - - :param resource_group_name: The name of the resource group that - contains the IoT hub. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of IotHubSkuDescription - :rtype: - ~azure.mgmt.iothub.models.IotHubSkuDescriptionPaged[~azure.mgmt.iothub.models.IotHubSkuDescription] - :raises: - :class:`ErrorDetailsException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.get_valid_skus.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorDetailsException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.IotHubSkuDescriptionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.IotHubSkuDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - get_valid_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/skus'} - - def list_event_hub_consumer_groups( - self, resource_group_name, resource_name, event_hub_endpoint_name, custom_headers=None, raw=False, **operation_config): - """Get a list of the consumer groups in the Event Hub-compatible - device-to-cloud endpoint in an IoT hub. - - Get a list of the consumer groups in the Event Hub-compatible - device-to-cloud endpoint in an IoT hub. - - :param resource_group_name: The name of the resource group that - contains the IoT hub. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. - :type resource_name: str - :param event_hub_endpoint_name: The name of the Event Hub-compatible - endpoint. - :type event_hub_endpoint_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of EventHubConsumerGroupInfo - :rtype: - ~azure.mgmt.iothub.models.EventHubConsumerGroupInfoPaged[~azure.mgmt.iothub.models.EventHubConsumerGroupInfo] - :raises: - :class:`ErrorDetailsException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_event_hub_consumer_groups.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'eventHubEndpointName': self._serialize.url("event_hub_endpoint_name", event_hub_endpoint_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorDetailsException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.EventHubConsumerGroupInfoPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.EventHubConsumerGroupInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_event_hub_consumer_groups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups'} - - def get_event_hub_consumer_group( - self, resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers=None, raw=False, **operation_config): - """Get a consumer group from the Event Hub-compatible device-to-cloud - endpoint for an IoT hub. - - Get a consumer group from the Event Hub-compatible device-to-cloud - endpoint for an IoT hub. - - :param resource_group_name: The name of the resource group that - contains the IoT hub. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. - :type resource_name: str - :param event_hub_endpoint_name: The name of the Event Hub-compatible - endpoint in the IoT hub. - :type event_hub_endpoint_name: str - :param name: The name of the consumer group to retrieve. - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: EventHubConsumerGroupInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.iothub.models.EventHubConsumerGroupInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorDetailsException` - """ - # Construct URL - url = self.get_event_hub_consumer_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'eventHubEndpointName': self._serialize.url("event_hub_endpoint_name", event_hub_endpoint_name, 'str'), - 'name': self._serialize.url("name", name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorDetailsException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('EventHubConsumerGroupInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_event_hub_consumer_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups/{name}'} - - def create_event_hub_consumer_group( - self, resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers=None, raw=False, **operation_config): - """Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. - - Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. - - :param resource_group_name: The name of the resource group that - contains the IoT hub. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. - :type resource_name: str - :param event_hub_endpoint_name: The name of the Event Hub-compatible - endpoint in the IoT hub. - :type event_hub_endpoint_name: str - :param name: The name of the consumer group to add. - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: EventHubConsumerGroupInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.iothub.models.EventHubConsumerGroupInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorDetailsException` - """ - # Construct URL - url = self.create_event_hub_consumer_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'eventHubEndpointName': self._serialize.url("event_hub_endpoint_name", event_hub_endpoint_name, 'str'), - 'name': self._serialize.url("name", name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorDetailsException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('EventHubConsumerGroupInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_event_hub_consumer_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups/{name}'} - - def delete_event_hub_consumer_group( - self, resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers=None, raw=False, **operation_config): - """Delete a consumer group from an Event Hub-compatible endpoint in an IoT - hub. - - Delete a consumer group from an Event Hub-compatible endpoint in an IoT - hub. - - :param resource_group_name: The name of the resource group that - contains the IoT hub. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. - :type resource_name: str - :param event_hub_endpoint_name: The name of the Event Hub-compatible - endpoint in the IoT hub. - :type event_hub_endpoint_name: str - :param name: The name of the consumer group to delete. - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorDetailsException` - """ - # Construct URL - url = self.delete_event_hub_consumer_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'eventHubEndpointName': self._serialize.url("event_hub_endpoint_name", event_hub_endpoint_name, 'str'), - 'name': self._serialize.url("name", name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorDetailsException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_event_hub_consumer_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups/{name}'} - - def list_jobs( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Get a list of all the jobs in an IoT hub. For more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - - Get a list of all the jobs in an IoT hub. For more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - - :param resource_group_name: The name of the resource group that - contains the IoT hub. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of JobResponse - :rtype: - ~azure.mgmt.iothub.models.JobResponsePaged[~azure.mgmt.iothub.models.JobResponse] - :raises: - :class:`ErrorDetailsException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_jobs.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorDetailsException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.JobResponsePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.JobResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/jobs'} - - def get_job( - self, resource_group_name, resource_name, job_id, custom_headers=None, raw=False, **operation_config): - """Get the details of a job from an IoT hub. For more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - - Get the details of a job from an IoT hub. For more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - - :param resource_group_name: The name of the resource group that - contains the IoT hub. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. - :type resource_name: str - :param job_id: The job identifier. - :type job_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: JobResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.iothub.models.JobResponse or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorDetailsException` - """ - # Construct URL - url = self.get_job.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'jobId': self._serialize.url("job_id", job_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorDetailsException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('JobResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/jobs/{jobId}'} - - def get_quota_metrics( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Get the quota metrics for an IoT hub. - - Get the quota metrics for an IoT hub. - - :param resource_group_name: The name of the resource group that - contains the IoT hub. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of IotHubQuotaMetricInfo - :rtype: - ~azure.mgmt.iothub.models.IotHubQuotaMetricInfoPaged[~azure.mgmt.iothub.models.IotHubQuotaMetricInfo] - :raises: - :class:`ErrorDetailsException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.get_quota_metrics.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorDetailsException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.IotHubQuotaMetricInfoPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.IotHubQuotaMetricInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - get_quota_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/quotaMetrics'} - - def get_endpoint_health( - self, resource_group_name, iot_hub_name, custom_headers=None, raw=False, **operation_config): - """Get the health for routing endpoints. - - Get the health for routing endpoints. - - :param resource_group_name: - :type resource_group_name: str - :param iot_hub_name: - :type iot_hub_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of EndpointHealthData - :rtype: - ~azure.mgmt.iothub.models.EndpointHealthDataPaged[~azure.mgmt.iothub.models.EndpointHealthData] - :raises: - :class:`ErrorDetailsException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.get_endpoint_health.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'iotHubName': self._serialize.url("iot_hub_name", iot_hub_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorDetailsException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.EndpointHealthDataPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.EndpointHealthDataPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - get_endpoint_health.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{iotHubName}/routingEndpointsHealth'} - - def check_name_availability( - self, name, custom_headers=None, raw=False, **operation_config): - """Check if an IoT hub name is available. - - Check if an IoT hub name is available. - - :param name: The name of the IoT hub to check. - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IotHubNameAvailabilityInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.iothub.models.IotHubNameAvailabilityInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorDetailsException` - """ - operation_inputs = models.OperationInputs(name=name) - - # Construct URL - url = self.check_name_availability.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(operation_inputs, 'OperationInputs') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorDetailsException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('IotHubNameAvailabilityInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Devices/checkNameAvailability'} - - def test_all_routes( - self, input, iot_hub_name, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Test all routes. - - Test all routes configured in this Iot Hub. - - :param input: Input for testing all routes - :type input: ~azure.mgmt.iothub.models.TestAllRoutesInput - :param iot_hub_name: IotHub to be tested - :type iot_hub_name: str - :param resource_group_name: resource group which Iot Hub belongs to - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TestAllRoutesResult or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.iothub.models.TestAllRoutesResult or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorDetailsException` - """ - # Construct URL - url = self.test_all_routes.metadata['url'] - path_format_arguments = { - 'iotHubName': self._serialize.url("iot_hub_name", iot_hub_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(input, 'TestAllRoutesInput') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorDetailsException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('TestAllRoutesResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - test_all_routes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{iotHubName}/routing/routes/$testall'} - - def test_route( - self, input, iot_hub_name, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Test the new route. - - Test the new route for this Iot Hub. - - :param input: Route that needs to be tested - :type input: ~azure.mgmt.iothub.models.TestRouteInput - :param iot_hub_name: IotHub to be tested - :type iot_hub_name: str - :param resource_group_name: resource group which Iot Hub belongs to - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TestRouteResult or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.iothub.models.TestRouteResult or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorDetailsException` - """ - # Construct URL - url = self.test_route.metadata['url'] - path_format_arguments = { - 'iotHubName': self._serialize.url("iot_hub_name", iot_hub_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(input, 'TestRouteInput') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorDetailsException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('TestRouteResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - test_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{iotHubName}/routing/routes/$testnew'} - - def list_keys( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Get the security metadata for an IoT hub. For more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - - Get the security metadata for an IoT hub. For more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - - :param resource_group_name: The name of the resource group that - contains the IoT hub. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of - SharedAccessSignatureAuthorizationRule - :rtype: - ~azure.mgmt.iothub.models.SharedAccessSignatureAuthorizationRulePaged[~azure.mgmt.iothub.models.SharedAccessSignatureAuthorizationRule] - :raises: - :class:`ErrorDetailsException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_keys.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorDetailsException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.SharedAccessSignatureAuthorizationRulePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.SharedAccessSignatureAuthorizationRulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/listkeys'} - - def get_keys_for_key_name( - self, resource_group_name, resource_name, key_name, custom_headers=None, raw=False, **operation_config): - """Get a shared access policy by name from an IoT hub. For more - information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - - Get a shared access policy by name from an IoT hub. For more - information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - - :param resource_group_name: The name of the resource group that - contains the IoT hub. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. - :type resource_name: str - :param key_name: The name of the shared access policy. - :type key_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SharedAccessSignatureAuthorizationRule or ClientRawResponse - if raw=true - :rtype: - ~azure.mgmt.iothub.models.SharedAccessSignatureAuthorizationRule or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorDetailsException` - """ - # Construct URL - url = self.get_keys_for_key_name.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'keyName': self._serialize.url("key_name", key_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorDetailsException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SharedAccessSignatureAuthorizationRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_keys_for_key_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/IotHubKeys/{keyName}/listkeys'} - - def export_devices( - self, resource_group_name, resource_name, export_blob_container_uri, exclude_keys, custom_headers=None, raw=False, **operation_config): - """Exports all the device identities in the IoT hub identity registry to - an Azure Storage blob container. For more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - - Exports all the device identities in the IoT hub identity registry to - an Azure Storage blob container. For more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - - :param resource_group_name: The name of the resource group that - contains the IoT hub. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. - :type resource_name: str - :param export_blob_container_uri: The export blob container URI. - :type export_blob_container_uri: str - :param exclude_keys: The value indicating whether keys should be - excluded during export. - :type exclude_keys: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: JobResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.iothub.models.JobResponse or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorDetailsException` - """ - export_devices_parameters = models.ExportDevicesRequest(export_blob_container_uri=export_blob_container_uri, exclude_keys=exclude_keys) - - # Construct URL - url = self.export_devices.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(export_devices_parameters, 'ExportDevicesRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorDetailsException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('JobResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - export_devices.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/exportDevices'} - - def import_devices( - self, resource_group_name, resource_name, input_blob_container_uri, output_blob_container_uri, custom_headers=None, raw=False, **operation_config): - """Import, update, or delete device identities in the IoT hub identity - registry from a blob. For more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - - Import, update, or delete device identities in the IoT hub identity - registry from a blob. For more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - - :param resource_group_name: The name of the resource group that - contains the IoT hub. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. - :type resource_name: str - :param input_blob_container_uri: The input blob container URI. - :type input_blob_container_uri: str - :param output_blob_container_uri: The output blob container URI. - :type output_blob_container_uri: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: JobResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.iothub.models.JobResponse or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorDetailsException` - """ - import_devices_parameters = models.ImportDevicesRequest(input_blob_container_uri=input_blob_container_uri, output_blob_container_uri=output_blob_container_uri) - - # Construct URL - url = self.import_devices.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(import_devices_parameters, 'ImportDevicesRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorDetailsException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('JobResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - import_devices.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/importDevices'} diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/operations.py deleted file mode 100644 index ba7b4b76996b..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/operations.py +++ /dev/null @@ -1,96 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class Operations(object): - """Operations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. Constant value: "2019-03-22-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-03-22-preview" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all of the available IoT Hub REST API operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Operation - :rtype: - ~azure.mgmt.iothub.models.OperationPaged[~azure.mgmt.iothub.models.Operation] - :raises: - :class:`ErrorDetailsException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorDetailsException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/providers/Microsoft.Devices/operations'} diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/resource_provider_common_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/resource_provider_common_operations.py deleted file mode 100644 index 73a256dda3a0..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/resource_provider_common_operations.py +++ /dev/null @@ -1,95 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ResourceProviderCommonOperations(object): - """ResourceProviderCommonOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. Constant value: "2019-03-22-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-03-22-preview" - - self.config = config - - def get_subscription_quota( - self, custom_headers=None, raw=False, **operation_config): - """Get the number of iot hubs in the subscription. - - Get the number of free and paid iot hubs in the subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: UserSubscriptionQuotaListResult or ClientRawResponse if - raw=true - :rtype: ~azure.mgmt.iothub.models.UserSubscriptionQuotaListResult or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorDetailsException` - """ - # Construct URL - url = self.get_subscription_quota.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorDetailsException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('UserSubscriptionQuotaListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_subscription_quota.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Devices/usages'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/__init__.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/__init__.py index 9082c0270d47..5f5eb54bbb00 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/__init__.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .logic_management_client import LogicManagementClient -from .version import VERSION +from ._configuration import LogicManagementClientConfiguration +from ._logic_management_client import LogicManagementClient +__all__ = ['LogicManagementClient', 'LogicManagementClientConfiguration'] -__all__ = ['LogicManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/_configuration.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/_configuration.py new file mode 100644 index 000000000000..5b28d6952a63 --- /dev/null +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/_configuration.py @@ -0,0 +1,48 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class LogicManagementClientConfiguration(AzureConfiguration): + """Configuration for LogicManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The subscription id. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(LogicManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-logic/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/_logic_management_client.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/_logic_management_client.py new file mode 100644 index 000000000000..fe78cf9ddf73 --- /dev/null +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/_logic_management_client.py @@ -0,0 +1,154 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import LogicManagementClientConfiguration +from .operations import WorkflowsOperations +from .operations import WorkflowVersionsOperations +from .operations import WorkflowTriggersOperations +from .operations import WorkflowVersionTriggersOperations +from .operations import WorkflowTriggerHistoriesOperations +from .operations import WorkflowRunsOperations +from .operations import WorkflowRunActionsOperations +from .operations import WorkflowRunActionRepetitionsOperations +from .operations import WorkflowRunActionRepetitionsRequestHistoriesOperations +from .operations import WorkflowRunActionRequestHistoriesOperations +from .operations import WorkflowRunActionScopeRepetitionsOperations +from .operations import WorkflowRunOperations +from .operations import IntegrationAccountsOperations +from .operations import IntegrationAccountAssembliesOperations +from .operations import IntegrationAccountBatchConfigurationsOperations +from .operations import IntegrationAccountSchemasOperations +from .operations import IntegrationAccountMapsOperations +from .operations import IntegrationAccountPartnersOperations +from .operations import IntegrationAccountAgreementsOperations +from .operations import IntegrationAccountCertificatesOperations +from .operations import IntegrationAccountSessionsOperations +from .operations import Operations +from . import models + + +class LogicManagementClient(SDKClient): + """REST API for Azure Logic Apps. + + :ivar config: Configuration for client. + :vartype config: LogicManagementClientConfiguration + + :ivar workflows: Workflows operations + :vartype workflows: azure.mgmt.logic.operations.WorkflowsOperations + :ivar workflow_versions: WorkflowVersions operations + :vartype workflow_versions: azure.mgmt.logic.operations.WorkflowVersionsOperations + :ivar workflow_triggers: WorkflowTriggers operations + :vartype workflow_triggers: azure.mgmt.logic.operations.WorkflowTriggersOperations + :ivar workflow_version_triggers: WorkflowVersionTriggers operations + :vartype workflow_version_triggers: azure.mgmt.logic.operations.WorkflowVersionTriggersOperations + :ivar workflow_trigger_histories: WorkflowTriggerHistories operations + :vartype workflow_trigger_histories: azure.mgmt.logic.operations.WorkflowTriggerHistoriesOperations + :ivar workflow_runs: WorkflowRuns operations + :vartype workflow_runs: azure.mgmt.logic.operations.WorkflowRunsOperations + :ivar workflow_run_actions: WorkflowRunActions operations + :vartype workflow_run_actions: azure.mgmt.logic.operations.WorkflowRunActionsOperations + :ivar workflow_run_action_repetitions: WorkflowRunActionRepetitions operations + :vartype workflow_run_action_repetitions: azure.mgmt.logic.operations.WorkflowRunActionRepetitionsOperations + :ivar workflow_run_action_repetitions_request_histories: WorkflowRunActionRepetitionsRequestHistories operations + :vartype workflow_run_action_repetitions_request_histories: azure.mgmt.logic.operations.WorkflowRunActionRepetitionsRequestHistoriesOperations + :ivar workflow_run_action_request_histories: WorkflowRunActionRequestHistories operations + :vartype workflow_run_action_request_histories: azure.mgmt.logic.operations.WorkflowRunActionRequestHistoriesOperations + :ivar workflow_run_action_scope_repetitions: WorkflowRunActionScopeRepetitions operations + :vartype workflow_run_action_scope_repetitions: azure.mgmt.logic.operations.WorkflowRunActionScopeRepetitionsOperations + :ivar workflow_run_operations: WorkflowRunOperations operations + :vartype workflow_run_operations: azure.mgmt.logic.operations.WorkflowRunOperations + :ivar integration_accounts: IntegrationAccounts operations + :vartype integration_accounts: azure.mgmt.logic.operations.IntegrationAccountsOperations + :ivar integration_account_assemblies: IntegrationAccountAssemblies operations + :vartype integration_account_assemblies: azure.mgmt.logic.operations.IntegrationAccountAssembliesOperations + :ivar integration_account_batch_configurations: IntegrationAccountBatchConfigurations operations + :vartype integration_account_batch_configurations: azure.mgmt.logic.operations.IntegrationAccountBatchConfigurationsOperations + :ivar integration_account_schemas: IntegrationAccountSchemas operations + :vartype integration_account_schemas: azure.mgmt.logic.operations.IntegrationAccountSchemasOperations + :ivar integration_account_maps: IntegrationAccountMaps operations + :vartype integration_account_maps: azure.mgmt.logic.operations.IntegrationAccountMapsOperations + :ivar integration_account_partners: IntegrationAccountPartners operations + :vartype integration_account_partners: azure.mgmt.logic.operations.IntegrationAccountPartnersOperations + :ivar integration_account_agreements: IntegrationAccountAgreements operations + :vartype integration_account_agreements: azure.mgmt.logic.operations.IntegrationAccountAgreementsOperations + :ivar integration_account_certificates: IntegrationAccountCertificates operations + :vartype integration_account_certificates: azure.mgmt.logic.operations.IntegrationAccountCertificatesOperations + :ivar integration_account_sessions: IntegrationAccountSessions operations + :vartype integration_account_sessions: azure.mgmt.logic.operations.IntegrationAccountSessionsOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.logic.operations.Operations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The subscription id. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = LogicManagementClientConfiguration(credentials, subscription_id, base_url) + super(LogicManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2018-07-01-preview' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.workflows = WorkflowsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.workflow_versions = WorkflowVersionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.workflow_triggers = WorkflowTriggersOperations( + self._client, self.config, self._serialize, self._deserialize) + self.workflow_version_triggers = WorkflowVersionTriggersOperations( + self._client, self.config, self._serialize, self._deserialize) + self.workflow_trigger_histories = WorkflowTriggerHistoriesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.workflow_runs = WorkflowRunsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.workflow_run_actions = WorkflowRunActionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.workflow_run_action_repetitions = WorkflowRunActionRepetitionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.workflow_run_action_repetitions_request_histories = WorkflowRunActionRepetitionsRequestHistoriesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.workflow_run_action_request_histories = WorkflowRunActionRequestHistoriesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.workflow_run_action_scope_repetitions = WorkflowRunActionScopeRepetitionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.workflow_run_operations = WorkflowRunOperations( + self._client, self.config, self._serialize, self._deserialize) + self.integration_accounts = IntegrationAccountsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.integration_account_assemblies = IntegrationAccountAssembliesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.integration_account_batch_configurations = IntegrationAccountBatchConfigurationsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.integration_account_schemas = IntegrationAccountSchemasOperations( + self._client, self.config, self._serialize, self._deserialize) + self.integration_account_maps = IntegrationAccountMapsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.integration_account_partners = IntegrationAccountPartnersOperations( + self._client, self.config, self._serialize, self._deserialize) + self.integration_account_agreements = IntegrationAccountAgreementsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.integration_account_certificates = IntegrationAccountCertificatesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.integration_account_sessions = IntegrationAccountSessionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/logic_management_client.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/logic_management_client.py deleted file mode 100644 index ea6f82d78e58..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/logic_management_client.py +++ /dev/null @@ -1,186 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.workflows_operations import WorkflowsOperations -from .operations.workflow_versions_operations import WorkflowVersionsOperations -from .operations.workflow_triggers_operations import WorkflowTriggersOperations -from .operations.workflow_version_triggers_operations import WorkflowVersionTriggersOperations -from .operations.workflow_trigger_histories_operations import WorkflowTriggerHistoriesOperations -from .operations.workflow_runs_operations import WorkflowRunsOperations -from .operations.workflow_run_actions_operations import WorkflowRunActionsOperations -from .operations.workflow_run_action_repetitions_operations import WorkflowRunActionRepetitionsOperations -from .operations.workflow_run_action_repetitions_request_histories_operations import WorkflowRunActionRepetitionsRequestHistoriesOperations -from .operations.workflow_run_action_request_histories_operations import WorkflowRunActionRequestHistoriesOperations -from .operations.workflow_run_action_scope_repetitions_operations import WorkflowRunActionScopeRepetitionsOperations -from .operations.workflow_run_operations import WorkflowRunOperations -from .operations.integration_accounts_operations import IntegrationAccountsOperations -from .operations.integration_account_assemblies_operations import IntegrationAccountAssembliesOperations -from .operations.integration_account_batch_configurations_operations import IntegrationAccountBatchConfigurationsOperations -from .operations.integration_account_schemas_operations import IntegrationAccountSchemasOperations -from .operations.integration_account_maps_operations import IntegrationAccountMapsOperations -from .operations.integration_account_partners_operations import IntegrationAccountPartnersOperations -from .operations.integration_account_agreements_operations import IntegrationAccountAgreementsOperations -from .operations.integration_account_certificates_operations import IntegrationAccountCertificatesOperations -from .operations.integration_account_sessions_operations import IntegrationAccountSessionsOperations -from .operations.operations import Operations -from . import models - - -class LogicManagementClientConfiguration(AzureConfiguration): - """Configuration for LogicManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The subscription id. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(LogicManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-logic/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class LogicManagementClient(SDKClient): - """REST API for Azure Logic Apps. - - :ivar config: Configuration for client. - :vartype config: LogicManagementClientConfiguration - - :ivar workflows: Workflows operations - :vartype workflows: azure.mgmt.logic.operations.WorkflowsOperations - :ivar workflow_versions: WorkflowVersions operations - :vartype workflow_versions: azure.mgmt.logic.operations.WorkflowVersionsOperations - :ivar workflow_triggers: WorkflowTriggers operations - :vartype workflow_triggers: azure.mgmt.logic.operations.WorkflowTriggersOperations - :ivar workflow_version_triggers: WorkflowVersionTriggers operations - :vartype workflow_version_triggers: azure.mgmt.logic.operations.WorkflowVersionTriggersOperations - :ivar workflow_trigger_histories: WorkflowTriggerHistories operations - :vartype workflow_trigger_histories: azure.mgmt.logic.operations.WorkflowTriggerHistoriesOperations - :ivar workflow_runs: WorkflowRuns operations - :vartype workflow_runs: azure.mgmt.logic.operations.WorkflowRunsOperations - :ivar workflow_run_actions: WorkflowRunActions operations - :vartype workflow_run_actions: azure.mgmt.logic.operations.WorkflowRunActionsOperations - :ivar workflow_run_action_repetitions: WorkflowRunActionRepetitions operations - :vartype workflow_run_action_repetitions: azure.mgmt.logic.operations.WorkflowRunActionRepetitionsOperations - :ivar workflow_run_action_repetitions_request_histories: WorkflowRunActionRepetitionsRequestHistories operations - :vartype workflow_run_action_repetitions_request_histories: azure.mgmt.logic.operations.WorkflowRunActionRepetitionsRequestHistoriesOperations - :ivar workflow_run_action_request_histories: WorkflowRunActionRequestHistories operations - :vartype workflow_run_action_request_histories: azure.mgmt.logic.operations.WorkflowRunActionRequestHistoriesOperations - :ivar workflow_run_action_scope_repetitions: WorkflowRunActionScopeRepetitions operations - :vartype workflow_run_action_scope_repetitions: azure.mgmt.logic.operations.WorkflowRunActionScopeRepetitionsOperations - :ivar workflow_run_operations: WorkflowRunOperations operations - :vartype workflow_run_operations: azure.mgmt.logic.operations.WorkflowRunOperations - :ivar integration_accounts: IntegrationAccounts operations - :vartype integration_accounts: azure.mgmt.logic.operations.IntegrationAccountsOperations - :ivar integration_account_assemblies: IntegrationAccountAssemblies operations - :vartype integration_account_assemblies: azure.mgmt.logic.operations.IntegrationAccountAssembliesOperations - :ivar integration_account_batch_configurations: IntegrationAccountBatchConfigurations operations - :vartype integration_account_batch_configurations: azure.mgmt.logic.operations.IntegrationAccountBatchConfigurationsOperations - :ivar integration_account_schemas: IntegrationAccountSchemas operations - :vartype integration_account_schemas: azure.mgmt.logic.operations.IntegrationAccountSchemasOperations - :ivar integration_account_maps: IntegrationAccountMaps operations - :vartype integration_account_maps: azure.mgmt.logic.operations.IntegrationAccountMapsOperations - :ivar integration_account_partners: IntegrationAccountPartners operations - :vartype integration_account_partners: azure.mgmt.logic.operations.IntegrationAccountPartnersOperations - :ivar integration_account_agreements: IntegrationAccountAgreements operations - :vartype integration_account_agreements: azure.mgmt.logic.operations.IntegrationAccountAgreementsOperations - :ivar integration_account_certificates: IntegrationAccountCertificates operations - :vartype integration_account_certificates: azure.mgmt.logic.operations.IntegrationAccountCertificatesOperations - :ivar integration_account_sessions: IntegrationAccountSessions operations - :vartype integration_account_sessions: azure.mgmt.logic.operations.IntegrationAccountSessionsOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.logic.operations.Operations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The subscription id. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = LogicManagementClientConfiguration(credentials, subscription_id, base_url) - super(LogicManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2018-07-01-preview' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.workflows = WorkflowsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.workflow_versions = WorkflowVersionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.workflow_triggers = WorkflowTriggersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.workflow_version_triggers = WorkflowVersionTriggersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.workflow_trigger_histories = WorkflowTriggerHistoriesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.workflow_runs = WorkflowRunsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.workflow_run_actions = WorkflowRunActionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.workflow_run_action_repetitions = WorkflowRunActionRepetitionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.workflow_run_action_repetitions_request_histories = WorkflowRunActionRepetitionsRequestHistoriesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.workflow_run_action_request_histories = WorkflowRunActionRequestHistoriesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.workflow_run_action_scope_repetitions = WorkflowRunActionScopeRepetitionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.workflow_run_operations = WorkflowRunOperations( - self._client, self.config, self._serialize, self._deserialize) - self.integration_accounts = IntegrationAccountsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.integration_account_assemblies = IntegrationAccountAssembliesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.integration_account_batch_configurations = IntegrationAccountBatchConfigurationsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.integration_account_schemas = IntegrationAccountSchemasOperations( - self._client, self.config, self._serialize, self._deserialize) - self.integration_account_maps = IntegrationAccountMapsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.integration_account_partners = IntegrationAccountPartnersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.integration_account_agreements = IntegrationAccountAgreementsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.integration_account_certificates = IntegrationAccountCertificatesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.integration_account_sessions = IntegrationAccountSessionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/__init__.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/__init__.py index 62165dd50eb4..90ccb4f39b2f 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/__init__.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/__init__.py @@ -10,278 +10,278 @@ # -------------------------------------------------------------------------- try: - from .resource_py3 import Resource - from .sub_resource_py3 import SubResource - from .resource_reference_py3 import ResourceReference - from .sku_py3 import Sku - from .workflow_parameter_py3 import WorkflowParameter - from .workflow_py3 import Workflow - from .workflow_filter_py3 import WorkflowFilter - from .workflow_version_py3 import WorkflowVersion - from .recurrence_schedule_occurrence_py3 import RecurrenceScheduleOccurrence - from .recurrence_schedule_py3 import RecurrenceSchedule - from .workflow_trigger_recurrence_py3 import WorkflowTriggerRecurrence - from .workflow_trigger_py3 import WorkflowTrigger - from .workflow_trigger_filter_py3 import WorkflowTriggerFilter - from .workflow_trigger_list_callback_url_queries_py3 import WorkflowTriggerListCallbackUrlQueries - from .workflow_trigger_callback_url_py3 import WorkflowTriggerCallbackUrl - from .correlation_py3 import Correlation - from .content_hash_py3 import ContentHash - from .content_link_py3 import ContentLink - from .workflow_trigger_history_py3 import WorkflowTriggerHistory - from .workflow_trigger_history_filter_py3 import WorkflowTriggerHistoryFilter - from .workflow_run_trigger_py3 import WorkflowRunTrigger - from .workflow_output_parameter_py3 import WorkflowOutputParameter - from .workflow_run_py3 import WorkflowRun - from .workflow_run_filter_py3 import WorkflowRunFilter - from .error_properties_py3 import ErrorProperties - from .error_response_py3 import ErrorResponse, ErrorResponseException - from .retry_history_py3 import RetryHistory - from .workflow_run_action_py3 import WorkflowRunAction - from .workflow_run_action_filter_py3 import WorkflowRunActionFilter - from .regenerate_action_parameter_py3 import RegenerateActionParameter - from .generate_upgraded_definition_parameters_py3 import GenerateUpgradedDefinitionParameters - from .integration_account_sku_py3 import IntegrationAccountSku - from .integration_account_py3 import IntegrationAccount - from .get_callback_url_parameters_py3 import GetCallbackUrlParameters - from .callback_url_py3 import CallbackUrl - from .integration_account_schema_py3 import IntegrationAccountSchema - from .integration_account_schema_filter_py3 import IntegrationAccountSchemaFilter - from .integration_account_map_properties_parameters_schema_py3 import IntegrationAccountMapPropertiesParametersSchema - from .integration_account_map_py3 import IntegrationAccountMap - from .integration_account_map_filter_py3 import IntegrationAccountMapFilter - from .business_identity_py3 import BusinessIdentity - from .b2_bpartner_content_py3 import B2BPartnerContent - from .partner_content_py3 import PartnerContent - from .integration_account_partner_py3 import IntegrationAccountPartner - from .integration_account_partner_filter_py3 import IntegrationAccountPartnerFilter - from .as2_message_connection_settings_py3 import AS2MessageConnectionSettings - from .as2_acknowledgement_connection_settings_py3 import AS2AcknowledgementConnectionSettings - from .as2_mdn_settings_py3 import AS2MdnSettings - from .as2_security_settings_py3 import AS2SecuritySettings - from .as2_validation_settings_py3 import AS2ValidationSettings - from .as2_envelope_settings_py3 import AS2EnvelopeSettings - from .as2_error_settings_py3 import AS2ErrorSettings - from .as2_protocol_settings_py3 import AS2ProtocolSettings - from .as2_one_way_agreement_py3 import AS2OneWayAgreement - from .as2_agreement_content_py3 import AS2AgreementContent - from .x12_validation_settings_py3 import X12ValidationSettings - from .x12_framing_settings_py3 import X12FramingSettings - from .x12_envelope_settings_py3 import X12EnvelopeSettings - from .x12_acknowledgement_settings_py3 import X12AcknowledgementSettings - from .x12_message_filter_py3 import X12MessageFilter - from .x12_security_settings_py3 import X12SecuritySettings - from .x12_processing_settings_py3 import X12ProcessingSettings - from .x12_envelope_override_py3 import X12EnvelopeOverride - from .x12_validation_override_py3 import X12ValidationOverride - from .x12_message_identifier_py3 import X12MessageIdentifier - from .x12_schema_reference_py3 import X12SchemaReference - from .x12_delimiter_overrides_py3 import X12DelimiterOverrides - from .x12_protocol_settings_py3 import X12ProtocolSettings - from .x12_one_way_agreement_py3 import X12OneWayAgreement - from .x12_agreement_content_py3 import X12AgreementContent - from .edifact_validation_settings_py3 import EdifactValidationSettings - from .edifact_framing_settings_py3 import EdifactFramingSettings - from .edifact_envelope_settings_py3 import EdifactEnvelopeSettings - from .edifact_acknowledgement_settings_py3 import EdifactAcknowledgementSettings - from .edifact_message_filter_py3 import EdifactMessageFilter - from .edifact_processing_settings_py3 import EdifactProcessingSettings - from .edifact_envelope_override_py3 import EdifactEnvelopeOverride - from .edifact_message_identifier_py3 import EdifactMessageIdentifier - from .edifact_schema_reference_py3 import EdifactSchemaReference - from .edifact_validation_override_py3 import EdifactValidationOverride - from .edifact_delimiter_override_py3 import EdifactDelimiterOverride - from .edifact_protocol_settings_py3 import EdifactProtocolSettings - from .edifact_one_way_agreement_py3 import EdifactOneWayAgreement - from .edifact_agreement_content_py3 import EdifactAgreementContent - from .agreement_content_py3 import AgreementContent - from .integration_account_agreement_py3 import IntegrationAccountAgreement - from .integration_account_agreement_filter_py3 import IntegrationAccountAgreementFilter - from .key_vault_key_reference_key_vault_py3 import KeyVaultKeyReferenceKeyVault - from .key_vault_key_reference_py3 import KeyVaultKeyReference - from .integration_account_certificate_py3 import IntegrationAccountCertificate - from .integration_account_session_filter_py3 import IntegrationAccountSessionFilter - from .integration_account_session_py3 import IntegrationAccountSession - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .key_vault_reference_py3 import KeyVaultReference - from .list_key_vault_keys_definition_py3 import ListKeyVaultKeysDefinition - from .key_vault_key_attributes_py3 import KeyVaultKeyAttributes - from .key_vault_key_py3 import KeyVaultKey - from .tracking_event_error_info_py3 import TrackingEventErrorInfo - from .tracking_event_py3 import TrackingEvent - from .tracking_events_definition_py3 import TrackingEventsDefinition - from .set_trigger_state_action_definition_py3 import SetTriggerStateActionDefinition - from .expression_root_py3 import ExpressionRoot - from .azure_resource_error_info_py3 import AzureResourceErrorInfo - from .expression_py3 import Expression - from .error_info_py3 import ErrorInfo - from .repetition_index_py3 import RepetitionIndex - from .workflow_run_action_repetition_definition_py3 import WorkflowRunActionRepetitionDefinition - from .workflow_run_action_repetition_definition_collection_py3 import WorkflowRunActionRepetitionDefinitionCollection - from .operation_result_py3 import OperationResult - from .run_action_correlation_py3 import RunActionCorrelation - from .operation_result_properties_py3 import OperationResultProperties - from .run_correlation_py3 import RunCorrelation - from .json_schema_py3 import JsonSchema - from .assembly_properties_py3 import AssemblyProperties - from .assembly_definition_py3 import AssemblyDefinition - from .artifact_content_properties_definition_py3 import ArtifactContentPropertiesDefinition - from .artifact_properties_py3 import ArtifactProperties - from .batch_release_criteria_py3 import BatchReleaseCriteria - from .batch_configuration_properties_py3 import BatchConfigurationProperties - from .batch_configuration_py3 import BatchConfiguration - from .request_py3 import Request - from .response_py3 import Response - from .request_history_properties_py3 import RequestHistoryProperties - from .request_history_py3 import RequestHistory + from ._models_py3 import AgreementContent + from ._models_py3 import ArtifactContentPropertiesDefinition + from ._models_py3 import ArtifactProperties + from ._models_py3 import AS2AcknowledgementConnectionSettings + from ._models_py3 import AS2AgreementContent + from ._models_py3 import AS2EnvelopeSettings + from ._models_py3 import AS2ErrorSettings + from ._models_py3 import AS2MdnSettings + from ._models_py3 import AS2MessageConnectionSettings + from ._models_py3 import AS2OneWayAgreement + from ._models_py3 import AS2ProtocolSettings + from ._models_py3 import AS2SecuritySettings + from ._models_py3 import AS2ValidationSettings + from ._models_py3 import AssemblyDefinition + from ._models_py3 import AssemblyProperties + from ._models_py3 import AzureResourceErrorInfo + from ._models_py3 import B2BPartnerContent + from ._models_py3 import BatchConfiguration + from ._models_py3 import BatchConfigurationProperties + from ._models_py3 import BatchReleaseCriteria + from ._models_py3 import BusinessIdentity + from ._models_py3 import CallbackUrl + from ._models_py3 import ContentHash + from ._models_py3 import ContentLink + from ._models_py3 import Correlation + from ._models_py3 import EdifactAcknowledgementSettings + from ._models_py3 import EdifactAgreementContent + from ._models_py3 import EdifactDelimiterOverride + from ._models_py3 import EdifactEnvelopeOverride + from ._models_py3 import EdifactEnvelopeSettings + from ._models_py3 import EdifactFramingSettings + from ._models_py3 import EdifactMessageFilter + from ._models_py3 import EdifactMessageIdentifier + from ._models_py3 import EdifactOneWayAgreement + from ._models_py3 import EdifactProcessingSettings + from ._models_py3 import EdifactProtocolSettings + from ._models_py3 import EdifactSchemaReference + from ._models_py3 import EdifactValidationOverride + from ._models_py3 import EdifactValidationSettings + from ._models_py3 import ErrorInfo + from ._models_py3 import ErrorProperties + from ._models_py3 import ErrorResponse, ErrorResponseException + from ._models_py3 import Expression + from ._models_py3 import ExpressionRoot + from ._models_py3 import GenerateUpgradedDefinitionParameters + from ._models_py3 import GetCallbackUrlParameters + from ._models_py3 import IntegrationAccount + from ._models_py3 import IntegrationAccountAgreement + from ._models_py3 import IntegrationAccountAgreementFilter + from ._models_py3 import IntegrationAccountCertificate + from ._models_py3 import IntegrationAccountMap + from ._models_py3 import IntegrationAccountMapFilter + from ._models_py3 import IntegrationAccountMapPropertiesParametersSchema + from ._models_py3 import IntegrationAccountPartner + from ._models_py3 import IntegrationAccountPartnerFilter + from ._models_py3 import IntegrationAccountSchema + from ._models_py3 import IntegrationAccountSchemaFilter + from ._models_py3 import IntegrationAccountSession + from ._models_py3 import IntegrationAccountSessionFilter + from ._models_py3 import IntegrationAccountSku + from ._models_py3 import JsonSchema + from ._models_py3 import KeyVaultKey + from ._models_py3 import KeyVaultKeyAttributes + from ._models_py3 import KeyVaultKeyReference + from ._models_py3 import KeyVaultKeyReferenceKeyVault + from ._models_py3 import KeyVaultReference + from ._models_py3 import ListKeyVaultKeysDefinition + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import OperationResult + from ._models_py3 import OperationResultProperties + from ._models_py3 import PartnerContent + from ._models_py3 import RecurrenceSchedule + from ._models_py3 import RecurrenceScheduleOccurrence + from ._models_py3 import RegenerateActionParameter + from ._models_py3 import RepetitionIndex + from ._models_py3 import Request + from ._models_py3 import RequestHistory + from ._models_py3 import RequestHistoryProperties + from ._models_py3 import Resource + from ._models_py3 import ResourceReference + from ._models_py3 import Response + from ._models_py3 import RetryHistory + from ._models_py3 import RunActionCorrelation + from ._models_py3 import RunCorrelation + from ._models_py3 import SetTriggerStateActionDefinition + from ._models_py3 import Sku + from ._models_py3 import SubResource + from ._models_py3 import TrackingEvent + from ._models_py3 import TrackingEventErrorInfo + from ._models_py3 import TrackingEventsDefinition + from ._models_py3 import Workflow + from ._models_py3 import WorkflowFilter + from ._models_py3 import WorkflowOutputParameter + from ._models_py3 import WorkflowParameter + from ._models_py3 import WorkflowRun + from ._models_py3 import WorkflowRunAction + from ._models_py3 import WorkflowRunActionFilter + from ._models_py3 import WorkflowRunActionRepetitionDefinition + from ._models_py3 import WorkflowRunActionRepetitionDefinitionCollection + from ._models_py3 import WorkflowRunFilter + from ._models_py3 import WorkflowRunTrigger + from ._models_py3 import WorkflowTrigger + from ._models_py3 import WorkflowTriggerCallbackUrl + from ._models_py3 import WorkflowTriggerFilter + from ._models_py3 import WorkflowTriggerHistory + from ._models_py3 import WorkflowTriggerHistoryFilter + from ._models_py3 import WorkflowTriggerListCallbackUrlQueries + from ._models_py3 import WorkflowTriggerRecurrence + from ._models_py3 import WorkflowVersion + from ._models_py3 import X12AcknowledgementSettings + from ._models_py3 import X12AgreementContent + from ._models_py3 import X12DelimiterOverrides + from ._models_py3 import X12EnvelopeOverride + from ._models_py3 import X12EnvelopeSettings + from ._models_py3 import X12FramingSettings + from ._models_py3 import X12MessageFilter + from ._models_py3 import X12MessageIdentifier + from ._models_py3 import X12OneWayAgreement + from ._models_py3 import X12ProcessingSettings + from ._models_py3 import X12ProtocolSettings + from ._models_py3 import X12SchemaReference + from ._models_py3 import X12SecuritySettings + from ._models_py3 import X12ValidationOverride + from ._models_py3 import X12ValidationSettings except (SyntaxError, ImportError): - from .resource import Resource - from .sub_resource import SubResource - from .resource_reference import ResourceReference - from .sku import Sku - from .workflow_parameter import WorkflowParameter - from .workflow import Workflow - from .workflow_filter import WorkflowFilter - from .workflow_version import WorkflowVersion - from .recurrence_schedule_occurrence import RecurrenceScheduleOccurrence - from .recurrence_schedule import RecurrenceSchedule - from .workflow_trigger_recurrence import WorkflowTriggerRecurrence - from .workflow_trigger import WorkflowTrigger - from .workflow_trigger_filter import WorkflowTriggerFilter - from .workflow_trigger_list_callback_url_queries import WorkflowTriggerListCallbackUrlQueries - from .workflow_trigger_callback_url import WorkflowTriggerCallbackUrl - from .correlation import Correlation - from .content_hash import ContentHash - from .content_link import ContentLink - from .workflow_trigger_history import WorkflowTriggerHistory - from .workflow_trigger_history_filter import WorkflowTriggerHistoryFilter - from .workflow_run_trigger import WorkflowRunTrigger - from .workflow_output_parameter import WorkflowOutputParameter - from .workflow_run import WorkflowRun - from .workflow_run_filter import WorkflowRunFilter - from .error_properties import ErrorProperties - from .error_response import ErrorResponse, ErrorResponseException - from .retry_history import RetryHistory - from .workflow_run_action import WorkflowRunAction - from .workflow_run_action_filter import WorkflowRunActionFilter - from .regenerate_action_parameter import RegenerateActionParameter - from .generate_upgraded_definition_parameters import GenerateUpgradedDefinitionParameters - from .integration_account_sku import IntegrationAccountSku - from .integration_account import IntegrationAccount - from .get_callback_url_parameters import GetCallbackUrlParameters - from .callback_url import CallbackUrl - from .integration_account_schema import IntegrationAccountSchema - from .integration_account_schema_filter import IntegrationAccountSchemaFilter - from .integration_account_map_properties_parameters_schema import IntegrationAccountMapPropertiesParametersSchema - from .integration_account_map import IntegrationAccountMap - from .integration_account_map_filter import IntegrationAccountMapFilter - from .business_identity import BusinessIdentity - from .b2_bpartner_content import B2BPartnerContent - from .partner_content import PartnerContent - from .integration_account_partner import IntegrationAccountPartner - from .integration_account_partner_filter import IntegrationAccountPartnerFilter - from .as2_message_connection_settings import AS2MessageConnectionSettings - from .as2_acknowledgement_connection_settings import AS2AcknowledgementConnectionSettings - from .as2_mdn_settings import AS2MdnSettings - from .as2_security_settings import AS2SecuritySettings - from .as2_validation_settings import AS2ValidationSettings - from .as2_envelope_settings import AS2EnvelopeSettings - from .as2_error_settings import AS2ErrorSettings - from .as2_protocol_settings import AS2ProtocolSettings - from .as2_one_way_agreement import AS2OneWayAgreement - from .as2_agreement_content import AS2AgreementContent - from .x12_validation_settings import X12ValidationSettings - from .x12_framing_settings import X12FramingSettings - from .x12_envelope_settings import X12EnvelopeSettings - from .x12_acknowledgement_settings import X12AcknowledgementSettings - from .x12_message_filter import X12MessageFilter - from .x12_security_settings import X12SecuritySettings - from .x12_processing_settings import X12ProcessingSettings - from .x12_envelope_override import X12EnvelopeOverride - from .x12_validation_override import X12ValidationOverride - from .x12_message_identifier import X12MessageIdentifier - from .x12_schema_reference import X12SchemaReference - from .x12_delimiter_overrides import X12DelimiterOverrides - from .x12_protocol_settings import X12ProtocolSettings - from .x12_one_way_agreement import X12OneWayAgreement - from .x12_agreement_content import X12AgreementContent - from .edifact_validation_settings import EdifactValidationSettings - from .edifact_framing_settings import EdifactFramingSettings - from .edifact_envelope_settings import EdifactEnvelopeSettings - from .edifact_acknowledgement_settings import EdifactAcknowledgementSettings - from .edifact_message_filter import EdifactMessageFilter - from .edifact_processing_settings import EdifactProcessingSettings - from .edifact_envelope_override import EdifactEnvelopeOverride - from .edifact_message_identifier import EdifactMessageIdentifier - from .edifact_schema_reference import EdifactSchemaReference - from .edifact_validation_override import EdifactValidationOverride - from .edifact_delimiter_override import EdifactDelimiterOverride - from .edifact_protocol_settings import EdifactProtocolSettings - from .edifact_one_way_agreement import EdifactOneWayAgreement - from .edifact_agreement_content import EdifactAgreementContent - from .agreement_content import AgreementContent - from .integration_account_agreement import IntegrationAccountAgreement - from .integration_account_agreement_filter import IntegrationAccountAgreementFilter - from .key_vault_key_reference_key_vault import KeyVaultKeyReferenceKeyVault - from .key_vault_key_reference import KeyVaultKeyReference - from .integration_account_certificate import IntegrationAccountCertificate - from .integration_account_session_filter import IntegrationAccountSessionFilter - from .integration_account_session import IntegrationAccountSession - from .operation_display import OperationDisplay - from .operation import Operation - from .key_vault_reference import KeyVaultReference - from .list_key_vault_keys_definition import ListKeyVaultKeysDefinition - from .key_vault_key_attributes import KeyVaultKeyAttributes - from .key_vault_key import KeyVaultKey - from .tracking_event_error_info import TrackingEventErrorInfo - from .tracking_event import TrackingEvent - from .tracking_events_definition import TrackingEventsDefinition - from .set_trigger_state_action_definition import SetTriggerStateActionDefinition - from .expression_root import ExpressionRoot - from .azure_resource_error_info import AzureResourceErrorInfo - from .expression import Expression - from .error_info import ErrorInfo - from .repetition_index import RepetitionIndex - from .workflow_run_action_repetition_definition import WorkflowRunActionRepetitionDefinition - from .workflow_run_action_repetition_definition_collection import WorkflowRunActionRepetitionDefinitionCollection - from .operation_result import OperationResult - from .run_action_correlation import RunActionCorrelation - from .operation_result_properties import OperationResultProperties - from .run_correlation import RunCorrelation - from .json_schema import JsonSchema - from .assembly_properties import AssemblyProperties - from .assembly_definition import AssemblyDefinition - from .artifact_content_properties_definition import ArtifactContentPropertiesDefinition - from .artifact_properties import ArtifactProperties - from .batch_release_criteria import BatchReleaseCriteria - from .batch_configuration_properties import BatchConfigurationProperties - from .batch_configuration import BatchConfiguration - from .request import Request - from .response import Response - from .request_history_properties import RequestHistoryProperties - from .request_history import RequestHistory -from .workflow_paged import WorkflowPaged -from .workflow_version_paged import WorkflowVersionPaged -from .workflow_trigger_paged import WorkflowTriggerPaged -from .workflow_trigger_history_paged import WorkflowTriggerHistoryPaged -from .workflow_run_paged import WorkflowRunPaged -from .workflow_run_action_paged import WorkflowRunActionPaged -from .expression_root_paged import ExpressionRootPaged -from .workflow_run_action_repetition_definition_paged import WorkflowRunActionRepetitionDefinitionPaged -from .request_history_paged import RequestHistoryPaged -from .integration_account_paged import IntegrationAccountPaged -from .key_vault_key_paged import KeyVaultKeyPaged -from .assembly_definition_paged import AssemblyDefinitionPaged -from .batch_configuration_paged import BatchConfigurationPaged -from .integration_account_schema_paged import IntegrationAccountSchemaPaged -from .integration_account_map_paged import IntegrationAccountMapPaged -from .integration_account_partner_paged import IntegrationAccountPartnerPaged -from .integration_account_agreement_paged import IntegrationAccountAgreementPaged -from .integration_account_certificate_paged import IntegrationAccountCertificatePaged -from .integration_account_session_paged import IntegrationAccountSessionPaged -from .operation_paged import OperationPaged -from .logic_management_client_enums import ( + from ._models import AgreementContent + from ._models import ArtifactContentPropertiesDefinition + from ._models import ArtifactProperties + from ._models import AS2AcknowledgementConnectionSettings + from ._models import AS2AgreementContent + from ._models import AS2EnvelopeSettings + from ._models import AS2ErrorSettings + from ._models import AS2MdnSettings + from ._models import AS2MessageConnectionSettings + from ._models import AS2OneWayAgreement + from ._models import AS2ProtocolSettings + from ._models import AS2SecuritySettings + from ._models import AS2ValidationSettings + from ._models import AssemblyDefinition + from ._models import AssemblyProperties + from ._models import AzureResourceErrorInfo + from ._models import B2BPartnerContent + from ._models import BatchConfiguration + from ._models import BatchConfigurationProperties + from ._models import BatchReleaseCriteria + from ._models import BusinessIdentity + from ._models import CallbackUrl + from ._models import ContentHash + from ._models import ContentLink + from ._models import Correlation + from ._models import EdifactAcknowledgementSettings + from ._models import EdifactAgreementContent + from ._models import EdifactDelimiterOverride + from ._models import EdifactEnvelopeOverride + from ._models import EdifactEnvelopeSettings + from ._models import EdifactFramingSettings + from ._models import EdifactMessageFilter + from ._models import EdifactMessageIdentifier + from ._models import EdifactOneWayAgreement + from ._models import EdifactProcessingSettings + from ._models import EdifactProtocolSettings + from ._models import EdifactSchemaReference + from ._models import EdifactValidationOverride + from ._models import EdifactValidationSettings + from ._models import ErrorInfo + from ._models import ErrorProperties + from ._models import ErrorResponse, ErrorResponseException + from ._models import Expression + from ._models import ExpressionRoot + from ._models import GenerateUpgradedDefinitionParameters + from ._models import GetCallbackUrlParameters + from ._models import IntegrationAccount + from ._models import IntegrationAccountAgreement + from ._models import IntegrationAccountAgreementFilter + from ._models import IntegrationAccountCertificate + from ._models import IntegrationAccountMap + from ._models import IntegrationAccountMapFilter + from ._models import IntegrationAccountMapPropertiesParametersSchema + from ._models import IntegrationAccountPartner + from ._models import IntegrationAccountPartnerFilter + from ._models import IntegrationAccountSchema + from ._models import IntegrationAccountSchemaFilter + from ._models import IntegrationAccountSession + from ._models import IntegrationAccountSessionFilter + from ._models import IntegrationAccountSku + from ._models import JsonSchema + from ._models import KeyVaultKey + from ._models import KeyVaultKeyAttributes + from ._models import KeyVaultKeyReference + from ._models import KeyVaultKeyReferenceKeyVault + from ._models import KeyVaultReference + from ._models import ListKeyVaultKeysDefinition + from ._models import Operation + from ._models import OperationDisplay + from ._models import OperationResult + from ._models import OperationResultProperties + from ._models import PartnerContent + from ._models import RecurrenceSchedule + from ._models import RecurrenceScheduleOccurrence + from ._models import RegenerateActionParameter + from ._models import RepetitionIndex + from ._models import Request + from ._models import RequestHistory + from ._models import RequestHistoryProperties + from ._models import Resource + from ._models import ResourceReference + from ._models import Response + from ._models import RetryHistory + from ._models import RunActionCorrelation + from ._models import RunCorrelation + from ._models import SetTriggerStateActionDefinition + from ._models import Sku + from ._models import SubResource + from ._models import TrackingEvent + from ._models import TrackingEventErrorInfo + from ._models import TrackingEventsDefinition + from ._models import Workflow + from ._models import WorkflowFilter + from ._models import WorkflowOutputParameter + from ._models import WorkflowParameter + from ._models import WorkflowRun + from ._models import WorkflowRunAction + from ._models import WorkflowRunActionFilter + from ._models import WorkflowRunActionRepetitionDefinition + from ._models import WorkflowRunActionRepetitionDefinitionCollection + from ._models import WorkflowRunFilter + from ._models import WorkflowRunTrigger + from ._models import WorkflowTrigger + from ._models import WorkflowTriggerCallbackUrl + from ._models import WorkflowTriggerFilter + from ._models import WorkflowTriggerHistory + from ._models import WorkflowTriggerHistoryFilter + from ._models import WorkflowTriggerListCallbackUrlQueries + from ._models import WorkflowTriggerRecurrence + from ._models import WorkflowVersion + from ._models import X12AcknowledgementSettings + from ._models import X12AgreementContent + from ._models import X12DelimiterOverrides + from ._models import X12EnvelopeOverride + from ._models import X12EnvelopeSettings + from ._models import X12FramingSettings + from ._models import X12MessageFilter + from ._models import X12MessageIdentifier + from ._models import X12OneWayAgreement + from ._models import X12ProcessingSettings + from ._models import X12ProtocolSettings + from ._models import X12SchemaReference + from ._models import X12SecuritySettings + from ._models import X12ValidationOverride + from ._models import X12ValidationSettings +from ._paged_models import AssemblyDefinitionPaged +from ._paged_models import BatchConfigurationPaged +from ._paged_models import ExpressionRootPaged +from ._paged_models import IntegrationAccountAgreementPaged +from ._paged_models import IntegrationAccountCertificatePaged +from ._paged_models import IntegrationAccountMapPaged +from ._paged_models import IntegrationAccountPaged +from ._paged_models import IntegrationAccountPartnerPaged +from ._paged_models import IntegrationAccountSchemaPaged +from ._paged_models import IntegrationAccountSessionPaged +from ._paged_models import KeyVaultKeyPaged +from ._paged_models import OperationPaged +from ._paged_models import RequestHistoryPaged +from ._paged_models import WorkflowPaged +from ._paged_models import WorkflowRunActionPaged +from ._paged_models import WorkflowRunActionRepetitionDefinitionPaged +from ._paged_models import WorkflowRunPaged +from ._paged_models import WorkflowTriggerHistoryPaged +from ._paged_models import WorkflowTriggerPaged +from ._paged_models import WorkflowVersionPaged +from ._logic_management_client_enums import ( WorkflowProvisioningState, WorkflowState, SkuName, @@ -315,131 +315,131 @@ ) __all__ = [ - 'Resource', - 'SubResource', - 'ResourceReference', - 'Sku', - 'WorkflowParameter', - 'Workflow', - 'WorkflowFilter', - 'WorkflowVersion', - 'RecurrenceScheduleOccurrence', - 'RecurrenceSchedule', - 'WorkflowTriggerRecurrence', - 'WorkflowTrigger', - 'WorkflowTriggerFilter', - 'WorkflowTriggerListCallbackUrlQueries', - 'WorkflowTriggerCallbackUrl', - 'Correlation', - 'ContentHash', - 'ContentLink', - 'WorkflowTriggerHistory', - 'WorkflowTriggerHistoryFilter', - 'WorkflowRunTrigger', - 'WorkflowOutputParameter', - 'WorkflowRun', - 'WorkflowRunFilter', - 'ErrorProperties', - 'ErrorResponse', 'ErrorResponseException', - 'RetryHistory', - 'WorkflowRunAction', - 'WorkflowRunActionFilter', - 'RegenerateActionParameter', - 'GenerateUpgradedDefinitionParameters', - 'IntegrationAccountSku', - 'IntegrationAccount', - 'GetCallbackUrlParameters', - 'CallbackUrl', - 'IntegrationAccountSchema', - 'IntegrationAccountSchemaFilter', - 'IntegrationAccountMapPropertiesParametersSchema', - 'IntegrationAccountMap', - 'IntegrationAccountMapFilter', - 'BusinessIdentity', - 'B2BPartnerContent', - 'PartnerContent', - 'IntegrationAccountPartner', - 'IntegrationAccountPartnerFilter', - 'AS2MessageConnectionSettings', + 'AgreementContent', + 'ArtifactContentPropertiesDefinition', + 'ArtifactProperties', 'AS2AcknowledgementConnectionSettings', - 'AS2MdnSettings', - 'AS2SecuritySettings', - 'AS2ValidationSettings', + 'AS2AgreementContent', 'AS2EnvelopeSettings', 'AS2ErrorSettings', - 'AS2ProtocolSettings', + 'AS2MdnSettings', + 'AS2MessageConnectionSettings', 'AS2OneWayAgreement', - 'AS2AgreementContent', - 'X12ValidationSettings', - 'X12FramingSettings', - 'X12EnvelopeSettings', - 'X12AcknowledgementSettings', - 'X12MessageFilter', - 'X12SecuritySettings', - 'X12ProcessingSettings', - 'X12EnvelopeOverride', - 'X12ValidationOverride', - 'X12MessageIdentifier', - 'X12SchemaReference', - 'X12DelimiterOverrides', - 'X12ProtocolSettings', - 'X12OneWayAgreement', - 'X12AgreementContent', - 'EdifactValidationSettings', - 'EdifactFramingSettings', - 'EdifactEnvelopeSettings', + 'AS2ProtocolSettings', + 'AS2SecuritySettings', + 'AS2ValidationSettings', + 'AssemblyDefinition', + 'AssemblyProperties', + 'AzureResourceErrorInfo', + 'B2BPartnerContent', + 'BatchConfiguration', + 'BatchConfigurationProperties', + 'BatchReleaseCriteria', + 'BusinessIdentity', + 'CallbackUrl', + 'ContentHash', + 'ContentLink', + 'Correlation', 'EdifactAcknowledgementSettings', - 'EdifactMessageFilter', - 'EdifactProcessingSettings', + 'EdifactAgreementContent', + 'EdifactDelimiterOverride', 'EdifactEnvelopeOverride', + 'EdifactEnvelopeSettings', + 'EdifactFramingSettings', + 'EdifactMessageFilter', 'EdifactMessageIdentifier', + 'EdifactOneWayAgreement', + 'EdifactProcessingSettings', + 'EdifactProtocolSettings', 'EdifactSchemaReference', 'EdifactValidationOverride', - 'EdifactDelimiterOverride', - 'EdifactProtocolSettings', - 'EdifactOneWayAgreement', - 'EdifactAgreementContent', - 'AgreementContent', + 'EdifactValidationSettings', + 'ErrorInfo', + 'ErrorProperties', + 'ErrorResponse', 'ErrorResponseException', + 'Expression', + 'ExpressionRoot', + 'GenerateUpgradedDefinitionParameters', + 'GetCallbackUrlParameters', + 'IntegrationAccount', 'IntegrationAccountAgreement', 'IntegrationAccountAgreementFilter', - 'KeyVaultKeyReferenceKeyVault', - 'KeyVaultKeyReference', 'IntegrationAccountCertificate', - 'IntegrationAccountSessionFilter', + 'IntegrationAccountMap', + 'IntegrationAccountMapFilter', + 'IntegrationAccountMapPropertiesParametersSchema', + 'IntegrationAccountPartner', + 'IntegrationAccountPartnerFilter', + 'IntegrationAccountSchema', + 'IntegrationAccountSchemaFilter', 'IntegrationAccountSession', - 'OperationDisplay', - 'Operation', + 'IntegrationAccountSessionFilter', + 'IntegrationAccountSku', + 'JsonSchema', + 'KeyVaultKey', + 'KeyVaultKeyAttributes', + 'KeyVaultKeyReference', + 'KeyVaultKeyReferenceKeyVault', 'KeyVaultReference', 'ListKeyVaultKeysDefinition', - 'KeyVaultKeyAttributes', - 'KeyVaultKey', - 'TrackingEventErrorInfo', - 'TrackingEvent', - 'TrackingEventsDefinition', - 'SetTriggerStateActionDefinition', - 'ExpressionRoot', - 'AzureResourceErrorInfo', - 'Expression', - 'ErrorInfo', - 'RepetitionIndex', - 'WorkflowRunActionRepetitionDefinition', - 'WorkflowRunActionRepetitionDefinitionCollection', + 'Operation', + 'OperationDisplay', 'OperationResult', - 'RunActionCorrelation', 'OperationResultProperties', - 'RunCorrelation', - 'JsonSchema', - 'AssemblyProperties', - 'AssemblyDefinition', - 'ArtifactContentPropertiesDefinition', - 'ArtifactProperties', - 'BatchReleaseCriteria', - 'BatchConfigurationProperties', - 'BatchConfiguration', + 'PartnerContent', + 'RecurrenceSchedule', + 'RecurrenceScheduleOccurrence', + 'RegenerateActionParameter', + 'RepetitionIndex', 'Request', - 'Response', - 'RequestHistoryProperties', 'RequestHistory', + 'RequestHistoryProperties', + 'Resource', + 'ResourceReference', + 'Response', + 'RetryHistory', + 'RunActionCorrelation', + 'RunCorrelation', + 'SetTriggerStateActionDefinition', + 'Sku', + 'SubResource', + 'TrackingEvent', + 'TrackingEventErrorInfo', + 'TrackingEventsDefinition', + 'Workflow', + 'WorkflowFilter', + 'WorkflowOutputParameter', + 'WorkflowParameter', + 'WorkflowRun', + 'WorkflowRunAction', + 'WorkflowRunActionFilter', + 'WorkflowRunActionRepetitionDefinition', + 'WorkflowRunActionRepetitionDefinitionCollection', + 'WorkflowRunFilter', + 'WorkflowRunTrigger', + 'WorkflowTrigger', + 'WorkflowTriggerCallbackUrl', + 'WorkflowTriggerFilter', + 'WorkflowTriggerHistory', + 'WorkflowTriggerHistoryFilter', + 'WorkflowTriggerListCallbackUrlQueries', + 'WorkflowTriggerRecurrence', + 'WorkflowVersion', + 'X12AcknowledgementSettings', + 'X12AgreementContent', + 'X12DelimiterOverrides', + 'X12EnvelopeOverride', + 'X12EnvelopeSettings', + 'X12FramingSettings', + 'X12MessageFilter', + 'X12MessageIdentifier', + 'X12OneWayAgreement', + 'X12ProcessingSettings', + 'X12ProtocolSettings', + 'X12SchemaReference', + 'X12SecuritySettings', + 'X12ValidationOverride', + 'X12ValidationSettings', 'WorkflowPaged', 'WorkflowVersionPaged', 'WorkflowTriggerPaged', diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/logic_management_client_enums.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/_logic_management_client_enums.py similarity index 100% rename from sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/logic_management_client_enums.py rename to sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/_logic_management_client_enums.py diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/_models.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/_models.py new file mode 100644 index 000000000000..dc3e07a4d437 --- /dev/null +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/_models.py @@ -0,0 +1,5486 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AgreementContent(Model): + """The integration account agreement content. + + :param a_s2: The AS2 agreement content. + :type a_s2: ~azure.mgmt.logic.models.AS2AgreementContent + :param x12: The X12 agreement content. + :type x12: ~azure.mgmt.logic.models.X12AgreementContent + :param edifact: The EDIFACT agreement content. + :type edifact: ~azure.mgmt.logic.models.EdifactAgreementContent + """ + + _attribute_map = { + 'a_s2': {'key': 'aS2', 'type': 'AS2AgreementContent'}, + 'x12': {'key': 'x12', 'type': 'X12AgreementContent'}, + 'edifact': {'key': 'edifact', 'type': 'EdifactAgreementContent'}, + } + + def __init__(self, **kwargs): + super(AgreementContent, self).__init__(**kwargs) + self.a_s2 = kwargs.get('a_s2', None) + self.x12 = kwargs.get('x12', None) + self.edifact = kwargs.get('edifact', None) + + +class ArtifactProperties(Model): + """The artifact properties definition. + + :param created_time: The artifact creation time. + :type created_time: datetime + :param changed_time: The artifact changed time. + :type changed_time: datetime + :param metadata: + :type metadata: object + """ + + _attribute_map = { + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'metadata', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ArtifactProperties, self).__init__(**kwargs) + self.created_time = kwargs.get('created_time', None) + self.changed_time = kwargs.get('changed_time', None) + self.metadata = kwargs.get('metadata', None) + + +class ArtifactContentPropertiesDefinition(ArtifactProperties): + """The artifact content properties definition. + + :param created_time: The artifact creation time. + :type created_time: datetime + :param changed_time: The artifact changed time. + :type changed_time: datetime + :param metadata: + :type metadata: object + :param content: + :type content: object + :param content_type: The content type. + :type content_type: str + :param content_link: The content link. + :type content_link: ~azure.mgmt.logic.models.ContentLink + """ + + _attribute_map = { + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'metadata', 'type': 'object'}, + 'content': {'key': 'content', 'type': 'object'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'content_link': {'key': 'contentLink', 'type': 'ContentLink'}, + } + + def __init__(self, **kwargs): + super(ArtifactContentPropertiesDefinition, self).__init__(**kwargs) + self.content = kwargs.get('content', None) + self.content_type = kwargs.get('content_type', None) + self.content_link = kwargs.get('content_link', None) + + +class AS2AcknowledgementConnectionSettings(Model): + """The AS2 agreement acknowledgement connection settings. + + All required parameters must be populated in order to send to Azure. + + :param ignore_certificate_name_mismatch: Required. The value indicating + whether to ignore mismatch in certificate name. + :type ignore_certificate_name_mismatch: bool + :param support_http_status_code_continue: Required. The value indicating + whether to support HTTP status code 'CONTINUE'. + :type support_http_status_code_continue: bool + :param keep_http_connection_alive: Required. The value indicating whether + to keep the connection alive. + :type keep_http_connection_alive: bool + :param unfold_http_headers: Required. The value indicating whether to + unfold the HTTP headers. + :type unfold_http_headers: bool + """ + + _validation = { + 'ignore_certificate_name_mismatch': {'required': True}, + 'support_http_status_code_continue': {'required': True}, + 'keep_http_connection_alive': {'required': True}, + 'unfold_http_headers': {'required': True}, + } + + _attribute_map = { + 'ignore_certificate_name_mismatch': {'key': 'ignoreCertificateNameMismatch', 'type': 'bool'}, + 'support_http_status_code_continue': {'key': 'supportHttpStatusCodeContinue', 'type': 'bool'}, + 'keep_http_connection_alive': {'key': 'keepHttpConnectionAlive', 'type': 'bool'}, + 'unfold_http_headers': {'key': 'unfoldHttpHeaders', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(AS2AcknowledgementConnectionSettings, self).__init__(**kwargs) + self.ignore_certificate_name_mismatch = kwargs.get('ignore_certificate_name_mismatch', None) + self.support_http_status_code_continue = kwargs.get('support_http_status_code_continue', None) + self.keep_http_connection_alive = kwargs.get('keep_http_connection_alive', None) + self.unfold_http_headers = kwargs.get('unfold_http_headers', None) + + +class AS2AgreementContent(Model): + """The integration account AS2 agreement content. + + All required parameters must be populated in order to send to Azure. + + :param receive_agreement: Required. The AS2 one-way receive agreement. + :type receive_agreement: ~azure.mgmt.logic.models.AS2OneWayAgreement + :param send_agreement: Required. The AS2 one-way send agreement. + :type send_agreement: ~azure.mgmt.logic.models.AS2OneWayAgreement + """ + + _validation = { + 'receive_agreement': {'required': True}, + 'send_agreement': {'required': True}, + } + + _attribute_map = { + 'receive_agreement': {'key': 'receiveAgreement', 'type': 'AS2OneWayAgreement'}, + 'send_agreement': {'key': 'sendAgreement', 'type': 'AS2OneWayAgreement'}, + } + + def __init__(self, **kwargs): + super(AS2AgreementContent, self).__init__(**kwargs) + self.receive_agreement = kwargs.get('receive_agreement', None) + self.send_agreement = kwargs.get('send_agreement', None) + + +class AS2EnvelopeSettings(Model): + """The AS2 agreement envelope settings. + + All required parameters must be populated in order to send to Azure. + + :param message_content_type: Required. The message content type. + :type message_content_type: str + :param transmit_file_name_in_mime_header: Required. The value indicating + whether to transmit file name in mime header. + :type transmit_file_name_in_mime_header: bool + :param file_name_template: Required. The template for file name. + :type file_name_template: str + :param suspend_message_on_file_name_generation_error: Required. The value + indicating whether to suspend message on file name generation error. + :type suspend_message_on_file_name_generation_error: bool + :param autogenerate_file_name: Required. The value indicating whether to + auto generate file name. + :type autogenerate_file_name: bool + """ + + _validation = { + 'message_content_type': {'required': True}, + 'transmit_file_name_in_mime_header': {'required': True}, + 'file_name_template': {'required': True}, + 'suspend_message_on_file_name_generation_error': {'required': True}, + 'autogenerate_file_name': {'required': True}, + } + + _attribute_map = { + 'message_content_type': {'key': 'messageContentType', 'type': 'str'}, + 'transmit_file_name_in_mime_header': {'key': 'transmitFileNameInMimeHeader', 'type': 'bool'}, + 'file_name_template': {'key': 'fileNameTemplate', 'type': 'str'}, + 'suspend_message_on_file_name_generation_error': {'key': 'suspendMessageOnFileNameGenerationError', 'type': 'bool'}, + 'autogenerate_file_name': {'key': 'autogenerateFileName', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(AS2EnvelopeSettings, self).__init__(**kwargs) + self.message_content_type = kwargs.get('message_content_type', None) + self.transmit_file_name_in_mime_header = kwargs.get('transmit_file_name_in_mime_header', None) + self.file_name_template = kwargs.get('file_name_template', None) + self.suspend_message_on_file_name_generation_error = kwargs.get('suspend_message_on_file_name_generation_error', None) + self.autogenerate_file_name = kwargs.get('autogenerate_file_name', None) + + +class AS2ErrorSettings(Model): + """The AS2 agreement error settings. + + All required parameters must be populated in order to send to Azure. + + :param suspend_duplicate_message: Required. The value indicating whether + to suspend duplicate message. + :type suspend_duplicate_message: bool + :param resend_if_mdn_not_received: Required. The value indicating whether + to resend message If MDN is not received. + :type resend_if_mdn_not_received: bool + """ + + _validation = { + 'suspend_duplicate_message': {'required': True}, + 'resend_if_mdn_not_received': {'required': True}, + } + + _attribute_map = { + 'suspend_duplicate_message': {'key': 'suspendDuplicateMessage', 'type': 'bool'}, + 'resend_if_mdn_not_received': {'key': 'resendIfMDNNotReceived', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(AS2ErrorSettings, self).__init__(**kwargs) + self.suspend_duplicate_message = kwargs.get('suspend_duplicate_message', None) + self.resend_if_mdn_not_received = kwargs.get('resend_if_mdn_not_received', None) + + +class AS2MdnSettings(Model): + """The AS2 agreement mdn settings. + + All required parameters must be populated in order to send to Azure. + + :param need_mdn: Required. The value indicating whether to send or request + a MDN. + :type need_mdn: bool + :param sign_mdn: Required. The value indicating whether the MDN needs to + be signed or not. + :type sign_mdn: bool + :param send_mdn_asynchronously: Required. The value indicating whether to + send the asynchronous MDN. + :type send_mdn_asynchronously: bool + :param receipt_delivery_url: The receipt delivery URL. + :type receipt_delivery_url: str + :param disposition_notification_to: The disposition notification to header + value. + :type disposition_notification_to: str + :param sign_outbound_mdn_if_optional: Required. The value indicating + whether to sign the outbound MDN if optional. + :type sign_outbound_mdn_if_optional: bool + :param mdn_text: The MDN text. + :type mdn_text: str + :param send_inbound_mdn_to_message_box: Required. The value indicating + whether to send inbound MDN to message box. + :type send_inbound_mdn_to_message_box: bool + :param mic_hashing_algorithm: Required. The signing or hashing algorithm. + Possible values include: 'NotSpecified', 'None', 'MD5', 'SHA1', 'SHA2256', + 'SHA2384', 'SHA2512' + :type mic_hashing_algorithm: str or + ~azure.mgmt.logic.models.HashingAlgorithm + """ + + _validation = { + 'need_mdn': {'required': True}, + 'sign_mdn': {'required': True}, + 'send_mdn_asynchronously': {'required': True}, + 'sign_outbound_mdn_if_optional': {'required': True}, + 'send_inbound_mdn_to_message_box': {'required': True}, + 'mic_hashing_algorithm': {'required': True}, + } + + _attribute_map = { + 'need_mdn': {'key': 'needMDN', 'type': 'bool'}, + 'sign_mdn': {'key': 'signMDN', 'type': 'bool'}, + 'send_mdn_asynchronously': {'key': 'sendMDNAsynchronously', 'type': 'bool'}, + 'receipt_delivery_url': {'key': 'receiptDeliveryUrl', 'type': 'str'}, + 'disposition_notification_to': {'key': 'dispositionNotificationTo', 'type': 'str'}, + 'sign_outbound_mdn_if_optional': {'key': 'signOutboundMDNIfOptional', 'type': 'bool'}, + 'mdn_text': {'key': 'mdnText', 'type': 'str'}, + 'send_inbound_mdn_to_message_box': {'key': 'sendInboundMDNToMessageBox', 'type': 'bool'}, + 'mic_hashing_algorithm': {'key': 'micHashingAlgorithm', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AS2MdnSettings, self).__init__(**kwargs) + self.need_mdn = kwargs.get('need_mdn', None) + self.sign_mdn = kwargs.get('sign_mdn', None) + self.send_mdn_asynchronously = kwargs.get('send_mdn_asynchronously', None) + self.receipt_delivery_url = kwargs.get('receipt_delivery_url', None) + self.disposition_notification_to = kwargs.get('disposition_notification_to', None) + self.sign_outbound_mdn_if_optional = kwargs.get('sign_outbound_mdn_if_optional', None) + self.mdn_text = kwargs.get('mdn_text', None) + self.send_inbound_mdn_to_message_box = kwargs.get('send_inbound_mdn_to_message_box', None) + self.mic_hashing_algorithm = kwargs.get('mic_hashing_algorithm', None) + + +class AS2MessageConnectionSettings(Model): + """The AS2 agreement message connection settings. + + All required parameters must be populated in order to send to Azure. + + :param ignore_certificate_name_mismatch: Required. The value indicating + whether to ignore mismatch in certificate name. + :type ignore_certificate_name_mismatch: bool + :param support_http_status_code_continue: Required. The value indicating + whether to support HTTP status code 'CONTINUE'. + :type support_http_status_code_continue: bool + :param keep_http_connection_alive: Required. The value indicating whether + to keep the connection alive. + :type keep_http_connection_alive: bool + :param unfold_http_headers: Required. The value indicating whether to + unfold the HTTP headers. + :type unfold_http_headers: bool + """ + + _validation = { + 'ignore_certificate_name_mismatch': {'required': True}, + 'support_http_status_code_continue': {'required': True}, + 'keep_http_connection_alive': {'required': True}, + 'unfold_http_headers': {'required': True}, + } + + _attribute_map = { + 'ignore_certificate_name_mismatch': {'key': 'ignoreCertificateNameMismatch', 'type': 'bool'}, + 'support_http_status_code_continue': {'key': 'supportHttpStatusCodeContinue', 'type': 'bool'}, + 'keep_http_connection_alive': {'key': 'keepHttpConnectionAlive', 'type': 'bool'}, + 'unfold_http_headers': {'key': 'unfoldHttpHeaders', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(AS2MessageConnectionSettings, self).__init__(**kwargs) + self.ignore_certificate_name_mismatch = kwargs.get('ignore_certificate_name_mismatch', None) + self.support_http_status_code_continue = kwargs.get('support_http_status_code_continue', None) + self.keep_http_connection_alive = kwargs.get('keep_http_connection_alive', None) + self.unfold_http_headers = kwargs.get('unfold_http_headers', None) + + +class AS2OneWayAgreement(Model): + """The integration account AS2 one-way agreement. + + All required parameters must be populated in order to send to Azure. + + :param sender_business_identity: Required. The sender business identity + :type sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :param receiver_business_identity: Required. The receiver business + identity + :type receiver_business_identity: + ~azure.mgmt.logic.models.BusinessIdentity + :param protocol_settings: Required. The AS2 protocol settings. + :type protocol_settings: ~azure.mgmt.logic.models.AS2ProtocolSettings + """ + + _validation = { + 'sender_business_identity': {'required': True}, + 'receiver_business_identity': {'required': True}, + 'protocol_settings': {'required': True}, + } + + _attribute_map = { + 'sender_business_identity': {'key': 'senderBusinessIdentity', 'type': 'BusinessIdentity'}, + 'receiver_business_identity': {'key': 'receiverBusinessIdentity', 'type': 'BusinessIdentity'}, + 'protocol_settings': {'key': 'protocolSettings', 'type': 'AS2ProtocolSettings'}, + } + + def __init__(self, **kwargs): + super(AS2OneWayAgreement, self).__init__(**kwargs) + self.sender_business_identity = kwargs.get('sender_business_identity', None) + self.receiver_business_identity = kwargs.get('receiver_business_identity', None) + self.protocol_settings = kwargs.get('protocol_settings', None) + + +class AS2ProtocolSettings(Model): + """The AS2 agreement protocol settings. + + All required parameters must be populated in order to send to Azure. + + :param message_connection_settings: Required. The message connection + settings. + :type message_connection_settings: + ~azure.mgmt.logic.models.AS2MessageConnectionSettings + :param acknowledgement_connection_settings: Required. The acknowledgement + connection settings. + :type acknowledgement_connection_settings: + ~azure.mgmt.logic.models.AS2AcknowledgementConnectionSettings + :param mdn_settings: Required. The MDN settings. + :type mdn_settings: ~azure.mgmt.logic.models.AS2MdnSettings + :param security_settings: Required. The security settings. + :type security_settings: ~azure.mgmt.logic.models.AS2SecuritySettings + :param validation_settings: Required. The validation settings. + :type validation_settings: ~azure.mgmt.logic.models.AS2ValidationSettings + :param envelope_settings: Required. The envelope settings. + :type envelope_settings: ~azure.mgmt.logic.models.AS2EnvelopeSettings + :param error_settings: Required. The error settings. + :type error_settings: ~azure.mgmt.logic.models.AS2ErrorSettings + """ + + _validation = { + 'message_connection_settings': {'required': True}, + 'acknowledgement_connection_settings': {'required': True}, + 'mdn_settings': {'required': True}, + 'security_settings': {'required': True}, + 'validation_settings': {'required': True}, + 'envelope_settings': {'required': True}, + 'error_settings': {'required': True}, + } + + _attribute_map = { + 'message_connection_settings': {'key': 'messageConnectionSettings', 'type': 'AS2MessageConnectionSettings'}, + 'acknowledgement_connection_settings': {'key': 'acknowledgementConnectionSettings', 'type': 'AS2AcknowledgementConnectionSettings'}, + 'mdn_settings': {'key': 'mdnSettings', 'type': 'AS2MdnSettings'}, + 'security_settings': {'key': 'securitySettings', 'type': 'AS2SecuritySettings'}, + 'validation_settings': {'key': 'validationSettings', 'type': 'AS2ValidationSettings'}, + 'envelope_settings': {'key': 'envelopeSettings', 'type': 'AS2EnvelopeSettings'}, + 'error_settings': {'key': 'errorSettings', 'type': 'AS2ErrorSettings'}, + } + + def __init__(self, **kwargs): + super(AS2ProtocolSettings, self).__init__(**kwargs) + self.message_connection_settings = kwargs.get('message_connection_settings', None) + self.acknowledgement_connection_settings = kwargs.get('acknowledgement_connection_settings', None) + self.mdn_settings = kwargs.get('mdn_settings', None) + self.security_settings = kwargs.get('security_settings', None) + self.validation_settings = kwargs.get('validation_settings', None) + self.envelope_settings = kwargs.get('envelope_settings', None) + self.error_settings = kwargs.get('error_settings', None) + + +class AS2SecuritySettings(Model): + """The AS2 agreement security settings. + + All required parameters must be populated in order to send to Azure. + + :param override_group_signing_certificate: Required. The value indicating + whether to send or request a MDN. + :type override_group_signing_certificate: bool + :param signing_certificate_name: The name of the signing certificate. + :type signing_certificate_name: str + :param encryption_certificate_name: The name of the encryption + certificate. + :type encryption_certificate_name: str + :param enable_nrr_for_inbound_encoded_messages: Required. The value + indicating whether to enable NRR for inbound encoded messages. + :type enable_nrr_for_inbound_encoded_messages: bool + :param enable_nrr_for_inbound_decoded_messages: Required. The value + indicating whether to enable NRR for inbound decoded messages. + :type enable_nrr_for_inbound_decoded_messages: bool + :param enable_nrr_for_outbound_mdn: Required. The value indicating whether + to enable NRR for outbound MDN. + :type enable_nrr_for_outbound_mdn: bool + :param enable_nrr_for_outbound_encoded_messages: Required. The value + indicating whether to enable NRR for outbound encoded messages. + :type enable_nrr_for_outbound_encoded_messages: bool + :param enable_nrr_for_outbound_decoded_messages: Required. The value + indicating whether to enable NRR for outbound decoded messages. + :type enable_nrr_for_outbound_decoded_messages: bool + :param enable_nrr_for_inbound_mdn: Required. The value indicating whether + to enable NRR for inbound MDN. + :type enable_nrr_for_inbound_mdn: bool + :param sha2_algorithm_format: The Sha2 algorithm format. Valid values are + Sha2, ShaHashSize, ShaHyphenHashSize, Sha2UnderscoreHashSize. + :type sha2_algorithm_format: str + """ + + _validation = { + 'override_group_signing_certificate': {'required': True}, + 'enable_nrr_for_inbound_encoded_messages': {'required': True}, + 'enable_nrr_for_inbound_decoded_messages': {'required': True}, + 'enable_nrr_for_outbound_mdn': {'required': True}, + 'enable_nrr_for_outbound_encoded_messages': {'required': True}, + 'enable_nrr_for_outbound_decoded_messages': {'required': True}, + 'enable_nrr_for_inbound_mdn': {'required': True}, + } + + _attribute_map = { + 'override_group_signing_certificate': {'key': 'overrideGroupSigningCertificate', 'type': 'bool'}, + 'signing_certificate_name': {'key': 'signingCertificateName', 'type': 'str'}, + 'encryption_certificate_name': {'key': 'encryptionCertificateName', 'type': 'str'}, + 'enable_nrr_for_inbound_encoded_messages': {'key': 'enableNRRForInboundEncodedMessages', 'type': 'bool'}, + 'enable_nrr_for_inbound_decoded_messages': {'key': 'enableNRRForInboundDecodedMessages', 'type': 'bool'}, + 'enable_nrr_for_outbound_mdn': {'key': 'enableNRRForOutboundMDN', 'type': 'bool'}, + 'enable_nrr_for_outbound_encoded_messages': {'key': 'enableNRRForOutboundEncodedMessages', 'type': 'bool'}, + 'enable_nrr_for_outbound_decoded_messages': {'key': 'enableNRRForOutboundDecodedMessages', 'type': 'bool'}, + 'enable_nrr_for_inbound_mdn': {'key': 'enableNRRForInboundMDN', 'type': 'bool'}, + 'sha2_algorithm_format': {'key': 'sha2AlgorithmFormat', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AS2SecuritySettings, self).__init__(**kwargs) + self.override_group_signing_certificate = kwargs.get('override_group_signing_certificate', None) + self.signing_certificate_name = kwargs.get('signing_certificate_name', None) + self.encryption_certificate_name = kwargs.get('encryption_certificate_name', None) + self.enable_nrr_for_inbound_encoded_messages = kwargs.get('enable_nrr_for_inbound_encoded_messages', None) + self.enable_nrr_for_inbound_decoded_messages = kwargs.get('enable_nrr_for_inbound_decoded_messages', None) + self.enable_nrr_for_outbound_mdn = kwargs.get('enable_nrr_for_outbound_mdn', None) + self.enable_nrr_for_outbound_encoded_messages = kwargs.get('enable_nrr_for_outbound_encoded_messages', None) + self.enable_nrr_for_outbound_decoded_messages = kwargs.get('enable_nrr_for_outbound_decoded_messages', None) + self.enable_nrr_for_inbound_mdn = kwargs.get('enable_nrr_for_inbound_mdn', None) + self.sha2_algorithm_format = kwargs.get('sha2_algorithm_format', None) + + +class AS2ValidationSettings(Model): + """The AS2 agreement validation settings. + + All required parameters must be populated in order to send to Azure. + + :param override_message_properties: Required. The value indicating whether + to override incoming message properties with those in agreement. + :type override_message_properties: bool + :param encrypt_message: Required. The value indicating whether the message + has to be encrypted. + :type encrypt_message: bool + :param sign_message: Required. The value indicating whether the message + has to be signed. + :type sign_message: bool + :param compress_message: Required. The value indicating whether the + message has to be compressed. + :type compress_message: bool + :param check_duplicate_message: Required. The value indicating whether to + check for duplicate message. + :type check_duplicate_message: bool + :param interchange_duplicates_validity_days: Required. The number of days + to look back for duplicate interchange. + :type interchange_duplicates_validity_days: int + :param check_certificate_revocation_list_on_send: Required. The value + indicating whether to check for certificate revocation list on send. + :type check_certificate_revocation_list_on_send: bool + :param check_certificate_revocation_list_on_receive: Required. The value + indicating whether to check for certificate revocation list on receive. + :type check_certificate_revocation_list_on_receive: bool + :param encryption_algorithm: Required. The encryption algorithm. Possible + values include: 'NotSpecified', 'None', 'DES3', 'RC2', 'AES128', 'AES192', + 'AES256' + :type encryption_algorithm: str or + ~azure.mgmt.logic.models.EncryptionAlgorithm + :param signing_algorithm: The signing algorithm. Possible values include: + 'NotSpecified', 'Default', 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' + :type signing_algorithm: str or ~azure.mgmt.logic.models.SigningAlgorithm + """ + + _validation = { + 'override_message_properties': {'required': True}, + 'encrypt_message': {'required': True}, + 'sign_message': {'required': True}, + 'compress_message': {'required': True}, + 'check_duplicate_message': {'required': True}, + 'interchange_duplicates_validity_days': {'required': True}, + 'check_certificate_revocation_list_on_send': {'required': True}, + 'check_certificate_revocation_list_on_receive': {'required': True}, + 'encryption_algorithm': {'required': True}, + } + + _attribute_map = { + 'override_message_properties': {'key': 'overrideMessageProperties', 'type': 'bool'}, + 'encrypt_message': {'key': 'encryptMessage', 'type': 'bool'}, + 'sign_message': {'key': 'signMessage', 'type': 'bool'}, + 'compress_message': {'key': 'compressMessage', 'type': 'bool'}, + 'check_duplicate_message': {'key': 'checkDuplicateMessage', 'type': 'bool'}, + 'interchange_duplicates_validity_days': {'key': 'interchangeDuplicatesValidityDays', 'type': 'int'}, + 'check_certificate_revocation_list_on_send': {'key': 'checkCertificateRevocationListOnSend', 'type': 'bool'}, + 'check_certificate_revocation_list_on_receive': {'key': 'checkCertificateRevocationListOnReceive', 'type': 'bool'}, + 'encryption_algorithm': {'key': 'encryptionAlgorithm', 'type': 'str'}, + 'signing_algorithm': {'key': 'signingAlgorithm', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AS2ValidationSettings, self).__init__(**kwargs) + self.override_message_properties = kwargs.get('override_message_properties', None) + self.encrypt_message = kwargs.get('encrypt_message', None) + self.sign_message = kwargs.get('sign_message', None) + self.compress_message = kwargs.get('compress_message', None) + self.check_duplicate_message = kwargs.get('check_duplicate_message', None) + self.interchange_duplicates_validity_days = kwargs.get('interchange_duplicates_validity_days', None) + self.check_certificate_revocation_list_on_send = kwargs.get('check_certificate_revocation_list_on_send', None) + self.check_certificate_revocation_list_on_receive = kwargs.get('check_certificate_revocation_list_on_receive', None) + self.encryption_algorithm = kwargs.get('encryption_algorithm', None) + self.signing_algorithm = kwargs.get('signing_algorithm', None) + + +class Resource(Model): + """The base resource type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class AssemblyDefinition(Resource): + """The assembly definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param properties: Required. The assembly properties. + :type properties: ~azure.mgmt.logic.models.AssemblyProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'AssemblyProperties'}, + } + + def __init__(self, **kwargs): + super(AssemblyDefinition, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class AssemblyProperties(ArtifactContentPropertiesDefinition): + """The assembly properties definition. + + All required parameters must be populated in order to send to Azure. + + :param created_time: The artifact creation time. + :type created_time: datetime + :param changed_time: The artifact changed time. + :type changed_time: datetime + :param metadata: + :type metadata: object + :param content: + :type content: object + :param content_type: The content type. + :type content_type: str + :param content_link: The content link. + :type content_link: ~azure.mgmt.logic.models.ContentLink + :param assembly_name: Required. The assembly name. + :type assembly_name: str + :param assembly_version: The assembly version. + :type assembly_version: str + :param assembly_culture: The assembly culture. + :type assembly_culture: str + :param assembly_public_key_token: The assembly public key token. + :type assembly_public_key_token: str + """ + + _validation = { + 'assembly_name': {'required': True}, + } + + _attribute_map = { + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'metadata', 'type': 'object'}, + 'content': {'key': 'content', 'type': 'object'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'content_link': {'key': 'contentLink', 'type': 'ContentLink'}, + 'assembly_name': {'key': 'assemblyName', 'type': 'str'}, + 'assembly_version': {'key': 'assemblyVersion', 'type': 'str'}, + 'assembly_culture': {'key': 'assemblyCulture', 'type': 'str'}, + 'assembly_public_key_token': {'key': 'assemblyPublicKeyToken', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AssemblyProperties, self).__init__(**kwargs) + self.assembly_name = kwargs.get('assembly_name', None) + self.assembly_version = kwargs.get('assembly_version', None) + self.assembly_culture = kwargs.get('assembly_culture', None) + self.assembly_public_key_token = kwargs.get('assembly_public_key_token', None) + + +class ErrorInfo(Model): + """The error info. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. The error code. + :type code: str + """ + + _validation = { + 'code': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorInfo, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + + +class AzureResourceErrorInfo(ErrorInfo): + """The azure resource error info. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. The error code. + :type code: str + :param message: Required. The error message. + :type message: str + :param details: The error details. + :type details: list[~azure.mgmt.logic.models.AzureResourceErrorInfo] + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[AzureResourceErrorInfo]'}, + } + + def __init__(self, **kwargs): + super(AzureResourceErrorInfo, self).__init__(**kwargs) + self.message = kwargs.get('message', None) + self.details = kwargs.get('details', None) + + +class B2BPartnerContent(Model): + """The B2B partner content. + + :param business_identities: The list of partner business identities. + :type business_identities: list[~azure.mgmt.logic.models.BusinessIdentity] + """ + + _attribute_map = { + 'business_identities': {'key': 'businessIdentities', 'type': '[BusinessIdentity]'}, + } + + def __init__(self, **kwargs): + super(B2BPartnerContent, self).__init__(**kwargs) + self.business_identities = kwargs.get('business_identities', None) + + +class BatchConfiguration(Resource): + """The batch configuration resource definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param properties: Required. The batch configuration properties. + :type properties: ~azure.mgmt.logic.models.BatchConfigurationProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'BatchConfigurationProperties'}, + } + + def __init__(self, **kwargs): + super(BatchConfiguration, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class BatchConfigurationProperties(ArtifactProperties): + """The batch configuration properties definition. + + All required parameters must be populated in order to send to Azure. + + :param created_time: The artifact creation time. + :type created_time: datetime + :param changed_time: The artifact changed time. + :type changed_time: datetime + :param metadata: + :type metadata: object + :param batch_group_name: Required. The name of the batch group. + :type batch_group_name: str + :param release_criteria: Required. The batch release criteria. + :type release_criteria: ~azure.mgmt.logic.models.BatchReleaseCriteria + """ + + _validation = { + 'batch_group_name': {'required': True}, + 'release_criteria': {'required': True}, + } + + _attribute_map = { + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'metadata', 'type': 'object'}, + 'batch_group_name': {'key': 'batchGroupName', 'type': 'str'}, + 'release_criteria': {'key': 'releaseCriteria', 'type': 'BatchReleaseCriteria'}, + } + + def __init__(self, **kwargs): + super(BatchConfigurationProperties, self).__init__(**kwargs) + self.batch_group_name = kwargs.get('batch_group_name', None) + self.release_criteria = kwargs.get('release_criteria', None) + + +class BatchReleaseCriteria(Model): + """The batch release criteria. + + :param message_count: The message count. + :type message_count: int + :param batch_size: The batch size in bytes. + :type batch_size: int + :param recurrence: The recurrence. + :type recurrence: ~azure.mgmt.logic.models.WorkflowTriggerRecurrence + """ + + _attribute_map = { + 'message_count': {'key': 'messageCount', 'type': 'int'}, + 'batch_size': {'key': 'batchSize', 'type': 'int'}, + 'recurrence': {'key': 'recurrence', 'type': 'WorkflowTriggerRecurrence'}, + } + + def __init__(self, **kwargs): + super(BatchReleaseCriteria, self).__init__(**kwargs) + self.message_count = kwargs.get('message_count', None) + self.batch_size = kwargs.get('batch_size', None) + self.recurrence = kwargs.get('recurrence', None) + + +class BusinessIdentity(Model): + """The integration account partner's business identity. + + All required parameters must be populated in order to send to Azure. + + :param qualifier: Required. The business identity qualifier e.g. + as2identity, ZZ, ZZZ, 31, 32 + :type qualifier: str + :param value: Required. The user defined business identity value. + :type value: str + """ + + _validation = { + 'qualifier': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'qualifier': {'key': 'qualifier', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BusinessIdentity, self).__init__(**kwargs) + self.qualifier = kwargs.get('qualifier', None) + self.value = kwargs.get('value', None) + + +class CallbackUrl(Model): + """The callback url. + + :param value: The URL value. + :type value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CallbackUrl, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ContentHash(Model): + """The content hash. + + :param algorithm: The algorithm of the content hash. + :type algorithm: str + :param value: The value of the content hash. + :type value: str + """ + + _attribute_map = { + 'algorithm': {'key': 'algorithm', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContentHash, self).__init__(**kwargs) + self.algorithm = kwargs.get('algorithm', None) + self.value = kwargs.get('value', None) + + +class ContentLink(Model): + """The content link. + + :param uri: The content link URI. + :type uri: str + :param content_version: The content version. + :type content_version: str + :param content_size: The content size. + :type content_size: long + :param content_hash: The content hash. + :type content_hash: ~azure.mgmt.logic.models.ContentHash + :param metadata: The metadata. + :type metadata: object + """ + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'}, + 'content_version': {'key': 'contentVersion', 'type': 'str'}, + 'content_size': {'key': 'contentSize', 'type': 'long'}, + 'content_hash': {'key': 'contentHash', 'type': 'ContentHash'}, + 'metadata': {'key': 'metadata', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ContentLink, self).__init__(**kwargs) + self.uri = kwargs.get('uri', None) + self.content_version = kwargs.get('content_version', None) + self.content_size = kwargs.get('content_size', None) + self.content_hash = kwargs.get('content_hash', None) + self.metadata = kwargs.get('metadata', None) + + +class Correlation(Model): + """The correlation property. + + :param client_tracking_id: The client tracking id. + :type client_tracking_id: str + """ + + _attribute_map = { + 'client_tracking_id': {'key': 'clientTrackingId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Correlation, self).__init__(**kwargs) + self.client_tracking_id = kwargs.get('client_tracking_id', None) + + +class EdifactAcknowledgementSettings(Model): + """The Edifact agreement acknowledgement settings. + + All required parameters must be populated in order to send to Azure. + + :param need_technical_acknowledgement: Required. The value indicating + whether technical acknowledgement is needed. + :type need_technical_acknowledgement: bool + :param batch_technical_acknowledgements: Required. The value indicating + whether to batch the technical acknowledgements. + :type batch_technical_acknowledgements: bool + :param need_functional_acknowledgement: Required. The value indicating + whether functional acknowledgement is needed. + :type need_functional_acknowledgement: bool + :param batch_functional_acknowledgements: Required. The value indicating + whether to batch functional acknowledgements. + :type batch_functional_acknowledgements: bool + :param need_loop_for_valid_messages: Required. The value indicating + whether a loop is needed for valid messages. + :type need_loop_for_valid_messages: bool + :param send_synchronous_acknowledgement: Required. The value indicating + whether to send synchronous acknowledgement. + :type send_synchronous_acknowledgement: bool + :param acknowledgement_control_number_prefix: The acknowledgement control + number prefix. + :type acknowledgement_control_number_prefix: str + :param acknowledgement_control_number_suffix: The acknowledgement control + number suffix. + :type acknowledgement_control_number_suffix: str + :param acknowledgement_control_number_lower_bound: Required. The + acknowledgement control number lower bound. + :type acknowledgement_control_number_lower_bound: int + :param acknowledgement_control_number_upper_bound: Required. The + acknowledgement control number upper bound. + :type acknowledgement_control_number_upper_bound: int + :param rollover_acknowledgement_control_number: Required. The value + indicating whether to rollover acknowledgement control number. + :type rollover_acknowledgement_control_number: bool + """ + + _validation = { + 'need_technical_acknowledgement': {'required': True}, + 'batch_technical_acknowledgements': {'required': True}, + 'need_functional_acknowledgement': {'required': True}, + 'batch_functional_acknowledgements': {'required': True}, + 'need_loop_for_valid_messages': {'required': True}, + 'send_synchronous_acknowledgement': {'required': True}, + 'acknowledgement_control_number_lower_bound': {'required': True}, + 'acknowledgement_control_number_upper_bound': {'required': True}, + 'rollover_acknowledgement_control_number': {'required': True}, + } + + _attribute_map = { + 'need_technical_acknowledgement': {'key': 'needTechnicalAcknowledgement', 'type': 'bool'}, + 'batch_technical_acknowledgements': {'key': 'batchTechnicalAcknowledgements', 'type': 'bool'}, + 'need_functional_acknowledgement': {'key': 'needFunctionalAcknowledgement', 'type': 'bool'}, + 'batch_functional_acknowledgements': {'key': 'batchFunctionalAcknowledgements', 'type': 'bool'}, + 'need_loop_for_valid_messages': {'key': 'needLoopForValidMessages', 'type': 'bool'}, + 'send_synchronous_acknowledgement': {'key': 'sendSynchronousAcknowledgement', 'type': 'bool'}, + 'acknowledgement_control_number_prefix': {'key': 'acknowledgementControlNumberPrefix', 'type': 'str'}, + 'acknowledgement_control_number_suffix': {'key': 'acknowledgementControlNumberSuffix', 'type': 'str'}, + 'acknowledgement_control_number_lower_bound': {'key': 'acknowledgementControlNumberLowerBound', 'type': 'int'}, + 'acknowledgement_control_number_upper_bound': {'key': 'acknowledgementControlNumberUpperBound', 'type': 'int'}, + 'rollover_acknowledgement_control_number': {'key': 'rolloverAcknowledgementControlNumber', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(EdifactAcknowledgementSettings, self).__init__(**kwargs) + self.need_technical_acknowledgement = kwargs.get('need_technical_acknowledgement', None) + self.batch_technical_acknowledgements = kwargs.get('batch_technical_acknowledgements', None) + self.need_functional_acknowledgement = kwargs.get('need_functional_acknowledgement', None) + self.batch_functional_acknowledgements = kwargs.get('batch_functional_acknowledgements', None) + self.need_loop_for_valid_messages = kwargs.get('need_loop_for_valid_messages', None) + self.send_synchronous_acknowledgement = kwargs.get('send_synchronous_acknowledgement', None) + self.acknowledgement_control_number_prefix = kwargs.get('acknowledgement_control_number_prefix', None) + self.acknowledgement_control_number_suffix = kwargs.get('acknowledgement_control_number_suffix', None) + self.acknowledgement_control_number_lower_bound = kwargs.get('acknowledgement_control_number_lower_bound', None) + self.acknowledgement_control_number_upper_bound = kwargs.get('acknowledgement_control_number_upper_bound', None) + self.rollover_acknowledgement_control_number = kwargs.get('rollover_acknowledgement_control_number', None) + + +class EdifactAgreementContent(Model): + """The Edifact agreement content. + + All required parameters must be populated in order to send to Azure. + + :param receive_agreement: Required. The EDIFACT one-way receive agreement. + :type receive_agreement: ~azure.mgmt.logic.models.EdifactOneWayAgreement + :param send_agreement: Required. The EDIFACT one-way send agreement. + :type send_agreement: ~azure.mgmt.logic.models.EdifactOneWayAgreement + """ + + _validation = { + 'receive_agreement': {'required': True}, + 'send_agreement': {'required': True}, + } + + _attribute_map = { + 'receive_agreement': {'key': 'receiveAgreement', 'type': 'EdifactOneWayAgreement'}, + 'send_agreement': {'key': 'sendAgreement', 'type': 'EdifactOneWayAgreement'}, + } + + def __init__(self, **kwargs): + super(EdifactAgreementContent, self).__init__(**kwargs) + self.receive_agreement = kwargs.get('receive_agreement', None) + self.send_agreement = kwargs.get('send_agreement', None) + + +class EdifactDelimiterOverride(Model): + """The Edifact delimiter override settings. + + All required parameters must be populated in order to send to Azure. + + :param message_id: The message id. + :type message_id: str + :param message_version: The message version. + :type message_version: str + :param message_release: The message release. + :type message_release: str + :param data_element_separator: Required. The data element separator. + :type data_element_separator: int + :param component_separator: Required. The component separator. + :type component_separator: int + :param segment_terminator: Required. The segment terminator. + :type segment_terminator: int + :param repetition_separator: Required. The repetition separator. + :type repetition_separator: int + :param segment_terminator_suffix: Required. The segment terminator suffix. + Possible values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' + :type segment_terminator_suffix: str or + ~azure.mgmt.logic.models.SegmentTerminatorSuffix + :param decimal_point_indicator: Required. The decimal point indicator. + Possible values include: 'NotSpecified', 'Comma', 'Decimal' + :type decimal_point_indicator: str or + ~azure.mgmt.logic.models.EdifactDecimalIndicator + :param release_indicator: Required. The release indicator. + :type release_indicator: int + :param message_association_assigned_code: The message association assigned + code. + :type message_association_assigned_code: str + :param target_namespace: The target namespace on which this delimiter + settings has to be applied. + :type target_namespace: str + """ + + _validation = { + 'data_element_separator': {'required': True}, + 'component_separator': {'required': True}, + 'segment_terminator': {'required': True}, + 'repetition_separator': {'required': True}, + 'segment_terminator_suffix': {'required': True}, + 'decimal_point_indicator': {'required': True}, + 'release_indicator': {'required': True}, + } + + _attribute_map = { + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'message_version': {'key': 'messageVersion', 'type': 'str'}, + 'message_release': {'key': 'messageRelease', 'type': 'str'}, + 'data_element_separator': {'key': 'dataElementSeparator', 'type': 'int'}, + 'component_separator': {'key': 'componentSeparator', 'type': 'int'}, + 'segment_terminator': {'key': 'segmentTerminator', 'type': 'int'}, + 'repetition_separator': {'key': 'repetitionSeparator', 'type': 'int'}, + 'segment_terminator_suffix': {'key': 'segmentTerminatorSuffix', 'type': 'SegmentTerminatorSuffix'}, + 'decimal_point_indicator': {'key': 'decimalPointIndicator', 'type': 'EdifactDecimalIndicator'}, + 'release_indicator': {'key': 'releaseIndicator', 'type': 'int'}, + 'message_association_assigned_code': {'key': 'messageAssociationAssignedCode', 'type': 'str'}, + 'target_namespace': {'key': 'targetNamespace', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EdifactDelimiterOverride, self).__init__(**kwargs) + self.message_id = kwargs.get('message_id', None) + self.message_version = kwargs.get('message_version', None) + self.message_release = kwargs.get('message_release', None) + self.data_element_separator = kwargs.get('data_element_separator', None) + self.component_separator = kwargs.get('component_separator', None) + self.segment_terminator = kwargs.get('segment_terminator', None) + self.repetition_separator = kwargs.get('repetition_separator', None) + self.segment_terminator_suffix = kwargs.get('segment_terminator_suffix', None) + self.decimal_point_indicator = kwargs.get('decimal_point_indicator', None) + self.release_indicator = kwargs.get('release_indicator', None) + self.message_association_assigned_code = kwargs.get('message_association_assigned_code', None) + self.target_namespace = kwargs.get('target_namespace', None) + + +class EdifactEnvelopeOverride(Model): + """The Edifact envelope override settings. + + :param message_id: The message id on which this envelope settings has to + be applied. + :type message_id: str + :param message_version: The message version on which this envelope + settings has to be applied. + :type message_version: str + :param message_release: The message release version on which this envelope + settings has to be applied. + :type message_release: str + :param message_association_assigned_code: The message association assigned + code. + :type message_association_assigned_code: str + :param target_namespace: The target namespace on which this envelope + settings has to be applied. + :type target_namespace: str + :param functional_group_id: The functional group id. + :type functional_group_id: str + :param sender_application_qualifier: The sender application qualifier. + :type sender_application_qualifier: str + :param sender_application_id: The sender application id. + :type sender_application_id: str + :param receiver_application_qualifier: The receiver application qualifier. + :type receiver_application_qualifier: str + :param receiver_application_id: The receiver application id. + :type receiver_application_id: str + :param controlling_agency_code: The controlling agency code. + :type controlling_agency_code: str + :param group_header_message_version: The group header message version. + :type group_header_message_version: str + :param group_header_message_release: The group header message release. + :type group_header_message_release: str + :param association_assigned_code: The association assigned code. + :type association_assigned_code: str + :param application_password: The application password. + :type application_password: str + """ + + _attribute_map = { + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'message_version': {'key': 'messageVersion', 'type': 'str'}, + 'message_release': {'key': 'messageRelease', 'type': 'str'}, + 'message_association_assigned_code': {'key': 'messageAssociationAssignedCode', 'type': 'str'}, + 'target_namespace': {'key': 'targetNamespace', 'type': 'str'}, + 'functional_group_id': {'key': 'functionalGroupId', 'type': 'str'}, + 'sender_application_qualifier': {'key': 'senderApplicationQualifier', 'type': 'str'}, + 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, + 'receiver_application_qualifier': {'key': 'receiverApplicationQualifier', 'type': 'str'}, + 'receiver_application_id': {'key': 'receiverApplicationId', 'type': 'str'}, + 'controlling_agency_code': {'key': 'controllingAgencyCode', 'type': 'str'}, + 'group_header_message_version': {'key': 'groupHeaderMessageVersion', 'type': 'str'}, + 'group_header_message_release': {'key': 'groupHeaderMessageRelease', 'type': 'str'}, + 'association_assigned_code': {'key': 'associationAssignedCode', 'type': 'str'}, + 'application_password': {'key': 'applicationPassword', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EdifactEnvelopeOverride, self).__init__(**kwargs) + self.message_id = kwargs.get('message_id', None) + self.message_version = kwargs.get('message_version', None) + self.message_release = kwargs.get('message_release', None) + self.message_association_assigned_code = kwargs.get('message_association_assigned_code', None) + self.target_namespace = kwargs.get('target_namespace', None) + self.functional_group_id = kwargs.get('functional_group_id', None) + self.sender_application_qualifier = kwargs.get('sender_application_qualifier', None) + self.sender_application_id = kwargs.get('sender_application_id', None) + self.receiver_application_qualifier = kwargs.get('receiver_application_qualifier', None) + self.receiver_application_id = kwargs.get('receiver_application_id', None) + self.controlling_agency_code = kwargs.get('controlling_agency_code', None) + self.group_header_message_version = kwargs.get('group_header_message_version', None) + self.group_header_message_release = kwargs.get('group_header_message_release', None) + self.association_assigned_code = kwargs.get('association_assigned_code', None) + self.application_password = kwargs.get('application_password', None) + + +class EdifactEnvelopeSettings(Model): + """The Edifact agreement envelope settings. + + All required parameters must be populated in order to send to Azure. + + :param group_association_assigned_code: The group association assigned + code. + :type group_association_assigned_code: str + :param communication_agreement_id: The communication agreement id. + :type communication_agreement_id: str + :param apply_delimiter_string_advice: Required. The value indicating + whether to apply delimiter string advice. + :type apply_delimiter_string_advice: bool + :param create_grouping_segments: Required. The value indicating whether to + create grouping segments. + :type create_grouping_segments: bool + :param enable_default_group_headers: Required. The value indicating + whether to enable default group headers. + :type enable_default_group_headers: bool + :param recipient_reference_password_value: The recipient reference + password value. + :type recipient_reference_password_value: str + :param recipient_reference_password_qualifier: The recipient reference + password qualifier. + :type recipient_reference_password_qualifier: str + :param application_reference_id: The application reference id. + :type application_reference_id: str + :param processing_priority_code: The processing priority code. + :type processing_priority_code: str + :param interchange_control_number_lower_bound: Required. The interchange + control number lower bound. + :type interchange_control_number_lower_bound: long + :param interchange_control_number_upper_bound: Required. The interchange + control number upper bound. + :type interchange_control_number_upper_bound: long + :param rollover_interchange_control_number: Required. The value indicating + whether to rollover interchange control number. + :type rollover_interchange_control_number: bool + :param interchange_control_number_prefix: The interchange control number + prefix. + :type interchange_control_number_prefix: str + :param interchange_control_number_suffix: The interchange control number + suffix. + :type interchange_control_number_suffix: str + :param sender_reverse_routing_address: The sender reverse routing address. + :type sender_reverse_routing_address: str + :param receiver_reverse_routing_address: The receiver reverse routing + address. + :type receiver_reverse_routing_address: str + :param functional_group_id: The functional group id. + :type functional_group_id: str + :param group_controlling_agency_code: The group controlling agency code. + :type group_controlling_agency_code: str + :param group_message_version: The group message version. + :type group_message_version: str + :param group_message_release: The group message release. + :type group_message_release: str + :param group_control_number_lower_bound: Required. The group control + number lower bound. + :type group_control_number_lower_bound: long + :param group_control_number_upper_bound: Required. The group control + number upper bound. + :type group_control_number_upper_bound: long + :param rollover_group_control_number: Required. The value indicating + whether to rollover group control number. + :type rollover_group_control_number: bool + :param group_control_number_prefix: The group control number prefix. + :type group_control_number_prefix: str + :param group_control_number_suffix: The group control number suffix. + :type group_control_number_suffix: str + :param group_application_receiver_qualifier: The group application + receiver qualifier. + :type group_application_receiver_qualifier: str + :param group_application_receiver_id: The group application receiver id. + :type group_application_receiver_id: str + :param group_application_sender_qualifier: The group application sender + qualifier. + :type group_application_sender_qualifier: str + :param group_application_sender_id: The group application sender id. + :type group_application_sender_id: str + :param group_application_password: The group application password. + :type group_application_password: str + :param overwrite_existing_transaction_set_control_number: Required. The + value indicating whether to overwrite existing transaction set control + number. + :type overwrite_existing_transaction_set_control_number: bool + :param transaction_set_control_number_prefix: The transaction set control + number prefix. + :type transaction_set_control_number_prefix: str + :param transaction_set_control_number_suffix: The transaction set control + number suffix. + :type transaction_set_control_number_suffix: str + :param transaction_set_control_number_lower_bound: Required. The + transaction set control number lower bound. + :type transaction_set_control_number_lower_bound: long + :param transaction_set_control_number_upper_bound: Required. The + transaction set control number upper bound. + :type transaction_set_control_number_upper_bound: long + :param rollover_transaction_set_control_number: Required. The value + indicating whether to rollover transaction set control number. + :type rollover_transaction_set_control_number: bool + :param is_test_interchange: Required. The value indicating whether the + message is a test interchange. + :type is_test_interchange: bool + :param sender_internal_identification: The sender internal identification. + :type sender_internal_identification: str + :param sender_internal_sub_identification: The sender internal sub + identification. + :type sender_internal_sub_identification: str + :param receiver_internal_identification: The receiver internal + identification. + :type receiver_internal_identification: str + :param receiver_internal_sub_identification: The receiver internal sub + identification. + :type receiver_internal_sub_identification: str + """ + + _validation = { + 'apply_delimiter_string_advice': {'required': True}, + 'create_grouping_segments': {'required': True}, + 'enable_default_group_headers': {'required': True}, + 'interchange_control_number_lower_bound': {'required': True}, + 'interchange_control_number_upper_bound': {'required': True}, + 'rollover_interchange_control_number': {'required': True}, + 'group_control_number_lower_bound': {'required': True}, + 'group_control_number_upper_bound': {'required': True}, + 'rollover_group_control_number': {'required': True}, + 'overwrite_existing_transaction_set_control_number': {'required': True}, + 'transaction_set_control_number_lower_bound': {'required': True}, + 'transaction_set_control_number_upper_bound': {'required': True}, + 'rollover_transaction_set_control_number': {'required': True}, + 'is_test_interchange': {'required': True}, + } + + _attribute_map = { + 'group_association_assigned_code': {'key': 'groupAssociationAssignedCode', 'type': 'str'}, + 'communication_agreement_id': {'key': 'communicationAgreementId', 'type': 'str'}, + 'apply_delimiter_string_advice': {'key': 'applyDelimiterStringAdvice', 'type': 'bool'}, + 'create_grouping_segments': {'key': 'createGroupingSegments', 'type': 'bool'}, + 'enable_default_group_headers': {'key': 'enableDefaultGroupHeaders', 'type': 'bool'}, + 'recipient_reference_password_value': {'key': 'recipientReferencePasswordValue', 'type': 'str'}, + 'recipient_reference_password_qualifier': {'key': 'recipientReferencePasswordQualifier', 'type': 'str'}, + 'application_reference_id': {'key': 'applicationReferenceId', 'type': 'str'}, + 'processing_priority_code': {'key': 'processingPriorityCode', 'type': 'str'}, + 'interchange_control_number_lower_bound': {'key': 'interchangeControlNumberLowerBound', 'type': 'long'}, + 'interchange_control_number_upper_bound': {'key': 'interchangeControlNumberUpperBound', 'type': 'long'}, + 'rollover_interchange_control_number': {'key': 'rolloverInterchangeControlNumber', 'type': 'bool'}, + 'interchange_control_number_prefix': {'key': 'interchangeControlNumberPrefix', 'type': 'str'}, + 'interchange_control_number_suffix': {'key': 'interchangeControlNumberSuffix', 'type': 'str'}, + 'sender_reverse_routing_address': {'key': 'senderReverseRoutingAddress', 'type': 'str'}, + 'receiver_reverse_routing_address': {'key': 'receiverReverseRoutingAddress', 'type': 'str'}, + 'functional_group_id': {'key': 'functionalGroupId', 'type': 'str'}, + 'group_controlling_agency_code': {'key': 'groupControllingAgencyCode', 'type': 'str'}, + 'group_message_version': {'key': 'groupMessageVersion', 'type': 'str'}, + 'group_message_release': {'key': 'groupMessageRelease', 'type': 'str'}, + 'group_control_number_lower_bound': {'key': 'groupControlNumberLowerBound', 'type': 'long'}, + 'group_control_number_upper_bound': {'key': 'groupControlNumberUpperBound', 'type': 'long'}, + 'rollover_group_control_number': {'key': 'rolloverGroupControlNumber', 'type': 'bool'}, + 'group_control_number_prefix': {'key': 'groupControlNumberPrefix', 'type': 'str'}, + 'group_control_number_suffix': {'key': 'groupControlNumberSuffix', 'type': 'str'}, + 'group_application_receiver_qualifier': {'key': 'groupApplicationReceiverQualifier', 'type': 'str'}, + 'group_application_receiver_id': {'key': 'groupApplicationReceiverId', 'type': 'str'}, + 'group_application_sender_qualifier': {'key': 'groupApplicationSenderQualifier', 'type': 'str'}, + 'group_application_sender_id': {'key': 'groupApplicationSenderId', 'type': 'str'}, + 'group_application_password': {'key': 'groupApplicationPassword', 'type': 'str'}, + 'overwrite_existing_transaction_set_control_number': {'key': 'overwriteExistingTransactionSetControlNumber', 'type': 'bool'}, + 'transaction_set_control_number_prefix': {'key': 'transactionSetControlNumberPrefix', 'type': 'str'}, + 'transaction_set_control_number_suffix': {'key': 'transactionSetControlNumberSuffix', 'type': 'str'}, + 'transaction_set_control_number_lower_bound': {'key': 'transactionSetControlNumberLowerBound', 'type': 'long'}, + 'transaction_set_control_number_upper_bound': {'key': 'transactionSetControlNumberUpperBound', 'type': 'long'}, + 'rollover_transaction_set_control_number': {'key': 'rolloverTransactionSetControlNumber', 'type': 'bool'}, + 'is_test_interchange': {'key': 'isTestInterchange', 'type': 'bool'}, + 'sender_internal_identification': {'key': 'senderInternalIdentification', 'type': 'str'}, + 'sender_internal_sub_identification': {'key': 'senderInternalSubIdentification', 'type': 'str'}, + 'receiver_internal_identification': {'key': 'receiverInternalIdentification', 'type': 'str'}, + 'receiver_internal_sub_identification': {'key': 'receiverInternalSubIdentification', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EdifactEnvelopeSettings, self).__init__(**kwargs) + self.group_association_assigned_code = kwargs.get('group_association_assigned_code', None) + self.communication_agreement_id = kwargs.get('communication_agreement_id', None) + self.apply_delimiter_string_advice = kwargs.get('apply_delimiter_string_advice', None) + self.create_grouping_segments = kwargs.get('create_grouping_segments', None) + self.enable_default_group_headers = kwargs.get('enable_default_group_headers', None) + self.recipient_reference_password_value = kwargs.get('recipient_reference_password_value', None) + self.recipient_reference_password_qualifier = kwargs.get('recipient_reference_password_qualifier', None) + self.application_reference_id = kwargs.get('application_reference_id', None) + self.processing_priority_code = kwargs.get('processing_priority_code', None) + self.interchange_control_number_lower_bound = kwargs.get('interchange_control_number_lower_bound', None) + self.interchange_control_number_upper_bound = kwargs.get('interchange_control_number_upper_bound', None) + self.rollover_interchange_control_number = kwargs.get('rollover_interchange_control_number', None) + self.interchange_control_number_prefix = kwargs.get('interchange_control_number_prefix', None) + self.interchange_control_number_suffix = kwargs.get('interchange_control_number_suffix', None) + self.sender_reverse_routing_address = kwargs.get('sender_reverse_routing_address', None) + self.receiver_reverse_routing_address = kwargs.get('receiver_reverse_routing_address', None) + self.functional_group_id = kwargs.get('functional_group_id', None) + self.group_controlling_agency_code = kwargs.get('group_controlling_agency_code', None) + self.group_message_version = kwargs.get('group_message_version', None) + self.group_message_release = kwargs.get('group_message_release', None) + self.group_control_number_lower_bound = kwargs.get('group_control_number_lower_bound', None) + self.group_control_number_upper_bound = kwargs.get('group_control_number_upper_bound', None) + self.rollover_group_control_number = kwargs.get('rollover_group_control_number', None) + self.group_control_number_prefix = kwargs.get('group_control_number_prefix', None) + self.group_control_number_suffix = kwargs.get('group_control_number_suffix', None) + self.group_application_receiver_qualifier = kwargs.get('group_application_receiver_qualifier', None) + self.group_application_receiver_id = kwargs.get('group_application_receiver_id', None) + self.group_application_sender_qualifier = kwargs.get('group_application_sender_qualifier', None) + self.group_application_sender_id = kwargs.get('group_application_sender_id', None) + self.group_application_password = kwargs.get('group_application_password', None) + self.overwrite_existing_transaction_set_control_number = kwargs.get('overwrite_existing_transaction_set_control_number', None) + self.transaction_set_control_number_prefix = kwargs.get('transaction_set_control_number_prefix', None) + self.transaction_set_control_number_suffix = kwargs.get('transaction_set_control_number_suffix', None) + self.transaction_set_control_number_lower_bound = kwargs.get('transaction_set_control_number_lower_bound', None) + self.transaction_set_control_number_upper_bound = kwargs.get('transaction_set_control_number_upper_bound', None) + self.rollover_transaction_set_control_number = kwargs.get('rollover_transaction_set_control_number', None) + self.is_test_interchange = kwargs.get('is_test_interchange', None) + self.sender_internal_identification = kwargs.get('sender_internal_identification', None) + self.sender_internal_sub_identification = kwargs.get('sender_internal_sub_identification', None) + self.receiver_internal_identification = kwargs.get('receiver_internal_identification', None) + self.receiver_internal_sub_identification = kwargs.get('receiver_internal_sub_identification', None) + + +class EdifactFramingSettings(Model): + """The Edifact agreement framing settings. + + All required parameters must be populated in order to send to Azure. + + :param service_code_list_directory_version: The service code list + directory version. + :type service_code_list_directory_version: str + :param character_encoding: The character encoding. + :type character_encoding: str + :param protocol_version: Required. The protocol version. + :type protocol_version: int + :param data_element_separator: Required. The data element separator. + :type data_element_separator: int + :param component_separator: Required. The component separator. + :type component_separator: int + :param segment_terminator: Required. The segment terminator. + :type segment_terminator: int + :param release_indicator: Required. The release indicator. + :type release_indicator: int + :param repetition_separator: Required. The repetition separator. + :type repetition_separator: int + :param character_set: Required. The EDIFACT frame setting characterSet. + Possible values include: 'NotSpecified', 'UNOB', 'UNOA', 'UNOC', 'UNOD', + 'UNOE', 'UNOF', 'UNOG', 'UNOH', 'UNOI', 'UNOJ', 'UNOK', 'UNOX', 'UNOY', + 'KECA' + :type character_set: str or ~azure.mgmt.logic.models.EdifactCharacterSet + :param decimal_point_indicator: Required. The EDIFACT frame setting + decimal indicator. Possible values include: 'NotSpecified', 'Comma', + 'Decimal' + :type decimal_point_indicator: str or + ~azure.mgmt.logic.models.EdifactDecimalIndicator + :param segment_terminator_suffix: Required. The EDIFACT frame setting + segment terminator suffix. Possible values include: 'NotSpecified', + 'None', 'CR', 'LF', 'CRLF' + :type segment_terminator_suffix: str or + ~azure.mgmt.logic.models.SegmentTerminatorSuffix + """ + + _validation = { + 'protocol_version': {'required': True}, + 'data_element_separator': {'required': True}, + 'component_separator': {'required': True}, + 'segment_terminator': {'required': True}, + 'release_indicator': {'required': True}, + 'repetition_separator': {'required': True}, + 'character_set': {'required': True}, + 'decimal_point_indicator': {'required': True}, + 'segment_terminator_suffix': {'required': True}, + } + + _attribute_map = { + 'service_code_list_directory_version': {'key': 'serviceCodeListDirectoryVersion', 'type': 'str'}, + 'character_encoding': {'key': 'characterEncoding', 'type': 'str'}, + 'protocol_version': {'key': 'protocolVersion', 'type': 'int'}, + 'data_element_separator': {'key': 'dataElementSeparator', 'type': 'int'}, + 'component_separator': {'key': 'componentSeparator', 'type': 'int'}, + 'segment_terminator': {'key': 'segmentTerminator', 'type': 'int'}, + 'release_indicator': {'key': 'releaseIndicator', 'type': 'int'}, + 'repetition_separator': {'key': 'repetitionSeparator', 'type': 'int'}, + 'character_set': {'key': 'characterSet', 'type': 'str'}, + 'decimal_point_indicator': {'key': 'decimalPointIndicator', 'type': 'EdifactDecimalIndicator'}, + 'segment_terminator_suffix': {'key': 'segmentTerminatorSuffix', 'type': 'SegmentTerminatorSuffix'}, + } + + def __init__(self, **kwargs): + super(EdifactFramingSettings, self).__init__(**kwargs) + self.service_code_list_directory_version = kwargs.get('service_code_list_directory_version', None) + self.character_encoding = kwargs.get('character_encoding', None) + self.protocol_version = kwargs.get('protocol_version', None) + self.data_element_separator = kwargs.get('data_element_separator', None) + self.component_separator = kwargs.get('component_separator', None) + self.segment_terminator = kwargs.get('segment_terminator', None) + self.release_indicator = kwargs.get('release_indicator', None) + self.repetition_separator = kwargs.get('repetition_separator', None) + self.character_set = kwargs.get('character_set', None) + self.decimal_point_indicator = kwargs.get('decimal_point_indicator', None) + self.segment_terminator_suffix = kwargs.get('segment_terminator_suffix', None) + + +class EdifactMessageFilter(Model): + """The Edifact message filter for odata query. + + All required parameters must be populated in order to send to Azure. + + :param message_filter_type: Required. The message filter type. Possible + values include: 'NotSpecified', 'Include', 'Exclude' + :type message_filter_type: str or + ~azure.mgmt.logic.models.MessageFilterType + """ + + _validation = { + 'message_filter_type': {'required': True}, + } + + _attribute_map = { + 'message_filter_type': {'key': 'messageFilterType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EdifactMessageFilter, self).__init__(**kwargs) + self.message_filter_type = kwargs.get('message_filter_type', None) + + +class EdifactMessageIdentifier(Model): + """The Edifact message identifier. + + All required parameters must be populated in order to send to Azure. + + :param message_id: Required. The message id on which this envelope + settings has to be applied. + :type message_id: str + """ + + _validation = { + 'message_id': {'required': True}, + } + + _attribute_map = { + 'message_id': {'key': 'messageId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EdifactMessageIdentifier, self).__init__(**kwargs) + self.message_id = kwargs.get('message_id', None) + + +class EdifactOneWayAgreement(Model): + """The Edifact one way agreement. + + All required parameters must be populated in order to send to Azure. + + :param sender_business_identity: Required. The sender business identity + :type sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :param receiver_business_identity: Required. The receiver business + identity + :type receiver_business_identity: + ~azure.mgmt.logic.models.BusinessIdentity + :param protocol_settings: Required. The EDIFACT protocol settings. + :type protocol_settings: ~azure.mgmt.logic.models.EdifactProtocolSettings + """ + + _validation = { + 'sender_business_identity': {'required': True}, + 'receiver_business_identity': {'required': True}, + 'protocol_settings': {'required': True}, + } + + _attribute_map = { + 'sender_business_identity': {'key': 'senderBusinessIdentity', 'type': 'BusinessIdentity'}, + 'receiver_business_identity': {'key': 'receiverBusinessIdentity', 'type': 'BusinessIdentity'}, + 'protocol_settings': {'key': 'protocolSettings', 'type': 'EdifactProtocolSettings'}, + } + + def __init__(self, **kwargs): + super(EdifactOneWayAgreement, self).__init__(**kwargs) + self.sender_business_identity = kwargs.get('sender_business_identity', None) + self.receiver_business_identity = kwargs.get('receiver_business_identity', None) + self.protocol_settings = kwargs.get('protocol_settings', None) + + +class EdifactProcessingSettings(Model): + """The Edifact agreement protocol settings. + + All required parameters must be populated in order to send to Azure. + + :param mask_security_info: Required. The value indicating whether to mask + security information. + :type mask_security_info: bool + :param preserve_interchange: Required. The value indicating whether to + preserve interchange. + :type preserve_interchange: bool + :param suspend_interchange_on_error: Required. The value indicating + whether to suspend interchange on error. + :type suspend_interchange_on_error: bool + :param create_empty_xml_tags_for_trailing_separators: Required. The value + indicating whether to create empty xml tags for trailing separators. + :type create_empty_xml_tags_for_trailing_separators: bool + :param use_dot_as_decimal_separator: Required. The value indicating + whether to use dot as decimal separator. + :type use_dot_as_decimal_separator: bool + """ + + _validation = { + 'mask_security_info': {'required': True}, + 'preserve_interchange': {'required': True}, + 'suspend_interchange_on_error': {'required': True}, + 'create_empty_xml_tags_for_trailing_separators': {'required': True}, + 'use_dot_as_decimal_separator': {'required': True}, + } + + _attribute_map = { + 'mask_security_info': {'key': 'maskSecurityInfo', 'type': 'bool'}, + 'preserve_interchange': {'key': 'preserveInterchange', 'type': 'bool'}, + 'suspend_interchange_on_error': {'key': 'suspendInterchangeOnError', 'type': 'bool'}, + 'create_empty_xml_tags_for_trailing_separators': {'key': 'createEmptyXmlTagsForTrailingSeparators', 'type': 'bool'}, + 'use_dot_as_decimal_separator': {'key': 'useDotAsDecimalSeparator', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(EdifactProcessingSettings, self).__init__(**kwargs) + self.mask_security_info = kwargs.get('mask_security_info', None) + self.preserve_interchange = kwargs.get('preserve_interchange', None) + self.suspend_interchange_on_error = kwargs.get('suspend_interchange_on_error', None) + self.create_empty_xml_tags_for_trailing_separators = kwargs.get('create_empty_xml_tags_for_trailing_separators', None) + self.use_dot_as_decimal_separator = kwargs.get('use_dot_as_decimal_separator', None) + + +class EdifactProtocolSettings(Model): + """The Edifact agreement protocol settings. + + All required parameters must be populated in order to send to Azure. + + :param validation_settings: Required. The EDIFACT validation settings. + :type validation_settings: + ~azure.mgmt.logic.models.EdifactValidationSettings + :param framing_settings: Required. The EDIFACT framing settings. + :type framing_settings: ~azure.mgmt.logic.models.EdifactFramingSettings + :param envelope_settings: Required. The EDIFACT envelope settings. + :type envelope_settings: ~azure.mgmt.logic.models.EdifactEnvelopeSettings + :param acknowledgement_settings: Required. The EDIFACT acknowledgement + settings. + :type acknowledgement_settings: + ~azure.mgmt.logic.models.EdifactAcknowledgementSettings + :param message_filter: Required. The EDIFACT message filter. + :type message_filter: ~azure.mgmt.logic.models.EdifactMessageFilter + :param processing_settings: Required. The EDIFACT processing Settings. + :type processing_settings: + ~azure.mgmt.logic.models.EdifactProcessingSettings + :param envelope_overrides: The EDIFACT envelope override settings. + :type envelope_overrides: + list[~azure.mgmt.logic.models.EdifactEnvelopeOverride] + :param message_filter_list: The EDIFACT message filter list. + :type message_filter_list: + list[~azure.mgmt.logic.models.EdifactMessageIdentifier] + :param schema_references: Required. The EDIFACT schema references. + :type schema_references: + list[~azure.mgmt.logic.models.EdifactSchemaReference] + :param validation_overrides: The EDIFACT validation override settings. + :type validation_overrides: + list[~azure.mgmt.logic.models.EdifactValidationOverride] + :param edifact_delimiter_overrides: The EDIFACT delimiter override + settings. + :type edifact_delimiter_overrides: + list[~azure.mgmt.logic.models.EdifactDelimiterOverride] + """ + + _validation = { + 'validation_settings': {'required': True}, + 'framing_settings': {'required': True}, + 'envelope_settings': {'required': True}, + 'acknowledgement_settings': {'required': True}, + 'message_filter': {'required': True}, + 'processing_settings': {'required': True}, + 'schema_references': {'required': True}, + } + + _attribute_map = { + 'validation_settings': {'key': 'validationSettings', 'type': 'EdifactValidationSettings'}, + 'framing_settings': {'key': 'framingSettings', 'type': 'EdifactFramingSettings'}, + 'envelope_settings': {'key': 'envelopeSettings', 'type': 'EdifactEnvelopeSettings'}, + 'acknowledgement_settings': {'key': 'acknowledgementSettings', 'type': 'EdifactAcknowledgementSettings'}, + 'message_filter': {'key': 'messageFilter', 'type': 'EdifactMessageFilter'}, + 'processing_settings': {'key': 'processingSettings', 'type': 'EdifactProcessingSettings'}, + 'envelope_overrides': {'key': 'envelopeOverrides', 'type': '[EdifactEnvelopeOverride]'}, + 'message_filter_list': {'key': 'messageFilterList', 'type': '[EdifactMessageIdentifier]'}, + 'schema_references': {'key': 'schemaReferences', 'type': '[EdifactSchemaReference]'}, + 'validation_overrides': {'key': 'validationOverrides', 'type': '[EdifactValidationOverride]'}, + 'edifact_delimiter_overrides': {'key': 'edifactDelimiterOverrides', 'type': '[EdifactDelimiterOverride]'}, + } + + def __init__(self, **kwargs): + super(EdifactProtocolSettings, self).__init__(**kwargs) + self.validation_settings = kwargs.get('validation_settings', None) + self.framing_settings = kwargs.get('framing_settings', None) + self.envelope_settings = kwargs.get('envelope_settings', None) + self.acknowledgement_settings = kwargs.get('acknowledgement_settings', None) + self.message_filter = kwargs.get('message_filter', None) + self.processing_settings = kwargs.get('processing_settings', None) + self.envelope_overrides = kwargs.get('envelope_overrides', None) + self.message_filter_list = kwargs.get('message_filter_list', None) + self.schema_references = kwargs.get('schema_references', None) + self.validation_overrides = kwargs.get('validation_overrides', None) + self.edifact_delimiter_overrides = kwargs.get('edifact_delimiter_overrides', None) + + +class EdifactSchemaReference(Model): + """The Edifact schema reference. + + All required parameters must be populated in order to send to Azure. + + :param message_id: Required. The message id. + :type message_id: str + :param message_version: Required. The message version. + :type message_version: str + :param message_release: Required. The message release version. + :type message_release: str + :param sender_application_id: The sender application id. + :type sender_application_id: str + :param sender_application_qualifier: The sender application qualifier. + :type sender_application_qualifier: str + :param association_assigned_code: The association assigned code. + :type association_assigned_code: str + :param schema_name: Required. The schema name. + :type schema_name: str + """ + + _validation = { + 'message_id': {'required': True}, + 'message_version': {'required': True}, + 'message_release': {'required': True}, + 'schema_name': {'required': True}, + } + + _attribute_map = { + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'message_version': {'key': 'messageVersion', 'type': 'str'}, + 'message_release': {'key': 'messageRelease', 'type': 'str'}, + 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, + 'sender_application_qualifier': {'key': 'senderApplicationQualifier', 'type': 'str'}, + 'association_assigned_code': {'key': 'associationAssignedCode', 'type': 'str'}, + 'schema_name': {'key': 'schemaName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EdifactSchemaReference, self).__init__(**kwargs) + self.message_id = kwargs.get('message_id', None) + self.message_version = kwargs.get('message_version', None) + self.message_release = kwargs.get('message_release', None) + self.sender_application_id = kwargs.get('sender_application_id', None) + self.sender_application_qualifier = kwargs.get('sender_application_qualifier', None) + self.association_assigned_code = kwargs.get('association_assigned_code', None) + self.schema_name = kwargs.get('schema_name', None) + + +class EdifactValidationOverride(Model): + """The Edifact validation override settings. + + All required parameters must be populated in order to send to Azure. + + :param message_id: Required. The message id on which the validation + settings has to be applied. + :type message_id: str + :param enforce_character_set: Required. The value indicating whether to + validate character Set. + :type enforce_character_set: bool + :param validate_edi_types: Required. The value indicating whether to + validate EDI types. + :type validate_edi_types: bool + :param validate_xsd_types: Required. The value indicating whether to + validate XSD types. + :type validate_xsd_types: bool + :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to allow leading and trailing spaces and zeroes. + :type allow_leading_and_trailing_spaces_and_zeroes: bool + :param trailing_separator_policy: Required. The trailing separator policy. + Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', + 'Mandatory' + :type trailing_separator_policy: str or + ~azure.mgmt.logic.models.TrailingSeparatorPolicy + :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to trim leading and trailing spaces and zeroes. + :type trim_leading_and_trailing_spaces_and_zeroes: bool + """ + + _validation = { + 'message_id': {'required': True}, + 'enforce_character_set': {'required': True}, + 'validate_edi_types': {'required': True}, + 'validate_xsd_types': {'required': True}, + 'allow_leading_and_trailing_spaces_and_zeroes': {'required': True}, + 'trailing_separator_policy': {'required': True}, + 'trim_leading_and_trailing_spaces_and_zeroes': {'required': True}, + } + + _attribute_map = { + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'enforce_character_set': {'key': 'enforceCharacterSet', 'type': 'bool'}, + 'validate_edi_types': {'key': 'validateEDITypes', 'type': 'bool'}, + 'validate_xsd_types': {'key': 'validateXSDTypes', 'type': 'bool'}, + 'allow_leading_and_trailing_spaces_and_zeroes': {'key': 'allowLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, + 'trailing_separator_policy': {'key': 'trailingSeparatorPolicy', 'type': 'str'}, + 'trim_leading_and_trailing_spaces_and_zeroes': {'key': 'trimLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(EdifactValidationOverride, self).__init__(**kwargs) + self.message_id = kwargs.get('message_id', None) + self.enforce_character_set = kwargs.get('enforce_character_set', None) + self.validate_edi_types = kwargs.get('validate_edi_types', None) + self.validate_xsd_types = kwargs.get('validate_xsd_types', None) + self.allow_leading_and_trailing_spaces_and_zeroes = kwargs.get('allow_leading_and_trailing_spaces_and_zeroes', None) + self.trailing_separator_policy = kwargs.get('trailing_separator_policy', None) + self.trim_leading_and_trailing_spaces_and_zeroes = kwargs.get('trim_leading_and_trailing_spaces_and_zeroes', None) + + +class EdifactValidationSettings(Model): + """The Edifact agreement validation settings. + + All required parameters must be populated in order to send to Azure. + + :param validate_character_set: Required. The value indicating whether to + validate character set in the message. + :type validate_character_set: bool + :param check_duplicate_interchange_control_number: Required. The value + indicating whether to check for duplicate interchange control number. + :type check_duplicate_interchange_control_number: bool + :param interchange_control_number_validity_days: Required. The validity + period of interchange control number. + :type interchange_control_number_validity_days: int + :param check_duplicate_group_control_number: Required. The value + indicating whether to check for duplicate group control number. + :type check_duplicate_group_control_number: bool + :param check_duplicate_transaction_set_control_number: Required. The value + indicating whether to check for duplicate transaction set control number. + :type check_duplicate_transaction_set_control_number: bool + :param validate_edi_types: Required. The value indicating whether to + Whether to validate EDI types. + :type validate_edi_types: bool + :param validate_xsd_types: Required. The value indicating whether to + Whether to validate XSD types. + :type validate_xsd_types: bool + :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to allow leading and trailing spaces and zeroes. + :type allow_leading_and_trailing_spaces_and_zeroes: bool + :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to trim leading and trailing spaces and zeroes. + :type trim_leading_and_trailing_spaces_and_zeroes: bool + :param trailing_separator_policy: Required. The trailing separator policy. + Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', + 'Mandatory' + :type trailing_separator_policy: str or + ~azure.mgmt.logic.models.TrailingSeparatorPolicy + """ + + _validation = { + 'validate_character_set': {'required': True}, + 'check_duplicate_interchange_control_number': {'required': True}, + 'interchange_control_number_validity_days': {'required': True}, + 'check_duplicate_group_control_number': {'required': True}, + 'check_duplicate_transaction_set_control_number': {'required': True}, + 'validate_edi_types': {'required': True}, + 'validate_xsd_types': {'required': True}, + 'allow_leading_and_trailing_spaces_and_zeroes': {'required': True}, + 'trim_leading_and_trailing_spaces_and_zeroes': {'required': True}, + 'trailing_separator_policy': {'required': True}, + } + + _attribute_map = { + 'validate_character_set': {'key': 'validateCharacterSet', 'type': 'bool'}, + 'check_duplicate_interchange_control_number': {'key': 'checkDuplicateInterchangeControlNumber', 'type': 'bool'}, + 'interchange_control_number_validity_days': {'key': 'interchangeControlNumberValidityDays', 'type': 'int'}, + 'check_duplicate_group_control_number': {'key': 'checkDuplicateGroupControlNumber', 'type': 'bool'}, + 'check_duplicate_transaction_set_control_number': {'key': 'checkDuplicateTransactionSetControlNumber', 'type': 'bool'}, + 'validate_edi_types': {'key': 'validateEDITypes', 'type': 'bool'}, + 'validate_xsd_types': {'key': 'validateXSDTypes', 'type': 'bool'}, + 'allow_leading_and_trailing_spaces_and_zeroes': {'key': 'allowLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, + 'trim_leading_and_trailing_spaces_and_zeroes': {'key': 'trimLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, + 'trailing_separator_policy': {'key': 'trailingSeparatorPolicy', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EdifactValidationSettings, self).__init__(**kwargs) + self.validate_character_set = kwargs.get('validate_character_set', None) + self.check_duplicate_interchange_control_number = kwargs.get('check_duplicate_interchange_control_number', None) + self.interchange_control_number_validity_days = kwargs.get('interchange_control_number_validity_days', None) + self.check_duplicate_group_control_number = kwargs.get('check_duplicate_group_control_number', None) + self.check_duplicate_transaction_set_control_number = kwargs.get('check_duplicate_transaction_set_control_number', None) + self.validate_edi_types = kwargs.get('validate_edi_types', None) + self.validate_xsd_types = kwargs.get('validate_xsd_types', None) + self.allow_leading_and_trailing_spaces_and_zeroes = kwargs.get('allow_leading_and_trailing_spaces_and_zeroes', None) + self.trim_leading_and_trailing_spaces_and_zeroes = kwargs.get('trim_leading_and_trailing_spaces_and_zeroes', None) + self.trailing_separator_policy = kwargs.get('trailing_separator_policy', None) + + +class ErrorProperties(Model): + """Error properties indicate why the Logic service was not able to process the + incoming request. The reason is provided in the error message. + + :param code: Error code. + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorProperties, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class ErrorResponse(Model): + """Error response indicates Logic service is not able to process the incoming + request. The error property contains the error details. + + :param error: The error properties. + :type error: ~azure.mgmt.logic.models.ErrorProperties + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorProperties'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class Expression(Model): + """Expression. + + :param text: + :type text: str + :param value: + :type value: object + :param subexpressions: + :type subexpressions: list[~azure.mgmt.logic.models.Expression] + :param error: + :type error: ~azure.mgmt.logic.models.AzureResourceErrorInfo + """ + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'object'}, + 'subexpressions': {'key': 'subexpressions', 'type': '[Expression]'}, + 'error': {'key': 'error', 'type': 'AzureResourceErrorInfo'}, + } + + def __init__(self, **kwargs): + super(Expression, self).__init__(**kwargs) + self.text = kwargs.get('text', None) + self.value = kwargs.get('value', None) + self.subexpressions = kwargs.get('subexpressions', None) + self.error = kwargs.get('error', None) + + +class ExpressionRoot(Expression): + """ExpressionRoot. + + :param text: + :type text: str + :param value: + :type value: object + :param subexpressions: + :type subexpressions: list[~azure.mgmt.logic.models.Expression] + :param error: + :type error: ~azure.mgmt.logic.models.AzureResourceErrorInfo + :param path: The path. + :type path: str + """ + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'object'}, + 'subexpressions': {'key': 'subexpressions', 'type': '[Expression]'}, + 'error': {'key': 'error', 'type': 'AzureResourceErrorInfo'}, + 'path': {'key': 'path', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExpressionRoot, self).__init__(**kwargs) + self.path = kwargs.get('path', None) + + +class GenerateUpgradedDefinitionParameters(Model): + """The parameters to generate upgraded definition. + + :param target_schema_version: The target schema version. + :type target_schema_version: str + """ + + _attribute_map = { + 'target_schema_version': {'key': 'targetSchemaVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GenerateUpgradedDefinitionParameters, self).__init__(**kwargs) + self.target_schema_version = kwargs.get('target_schema_version', None) + + +class GetCallbackUrlParameters(Model): + """The callback url parameters. + + :param not_after: The expiry time. + :type not_after: datetime + :param key_type: The key type. Possible values include: 'NotSpecified', + 'Primary', 'Secondary' + :type key_type: str or ~azure.mgmt.logic.models.KeyType + """ + + _attribute_map = { + 'not_after': {'key': 'notAfter', 'type': 'iso-8601'}, + 'key_type': {'key': 'keyType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GetCallbackUrlParameters, self).__init__(**kwargs) + self.not_after = kwargs.get('not_after', None) + self.key_type = kwargs.get('key_type', None) + + +class IntegrationAccount(Resource): + """The integration account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param properties: The integration account properties. + :type properties: object + :param sku: The sku. + :type sku: ~azure.mgmt.logic.models.IntegrationAccountSku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'sku': {'key': 'sku', 'type': 'IntegrationAccountSku'}, + } + + def __init__(self, **kwargs): + super(IntegrationAccount, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.sku = kwargs.get('sku', None) + + +class IntegrationAccountAgreement(Resource): + """The integration account agreement. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :ivar created_time: The created time. + :vartype created_time: datetime + :ivar changed_time: The changed time. + :vartype changed_time: datetime + :param metadata: The metadata. + :type metadata: object + :param agreement_type: Required. The agreement type. Possible values + include: 'NotSpecified', 'AS2', 'X12', 'Edifact' + :type agreement_type: str or ~azure.mgmt.logic.models.AgreementType + :param host_partner: Required. The integration account partner that is set + as host partner for this agreement. + :type host_partner: str + :param guest_partner: Required. The integration account partner that is + set as guest partner for this agreement. + :type guest_partner: str + :param host_identity: Required. The business identity of the host partner. + :type host_identity: ~azure.mgmt.logic.models.BusinessIdentity + :param guest_identity: Required. The business identity of the guest + partner. + :type guest_identity: ~azure.mgmt.logic.models.BusinessIdentity + :param content: Required. The agreement content. + :type content: ~azure.mgmt.logic.models.AgreementContent + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'agreement_type': {'required': True}, + 'host_partner': {'required': True}, + 'guest_partner': {'required': True}, + 'host_identity': {'required': True}, + 'guest_identity': {'required': True}, + 'content': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'properties.metadata', 'type': 'object'}, + 'agreement_type': {'key': 'properties.agreementType', 'type': 'AgreementType'}, + 'host_partner': {'key': 'properties.hostPartner', 'type': 'str'}, + 'guest_partner': {'key': 'properties.guestPartner', 'type': 'str'}, + 'host_identity': {'key': 'properties.hostIdentity', 'type': 'BusinessIdentity'}, + 'guest_identity': {'key': 'properties.guestIdentity', 'type': 'BusinessIdentity'}, + 'content': {'key': 'properties.content', 'type': 'AgreementContent'}, + } + + def __init__(self, **kwargs): + super(IntegrationAccountAgreement, self).__init__(**kwargs) + self.created_time = None + self.changed_time = None + self.metadata = kwargs.get('metadata', None) + self.agreement_type = kwargs.get('agreement_type', None) + self.host_partner = kwargs.get('host_partner', None) + self.guest_partner = kwargs.get('guest_partner', None) + self.host_identity = kwargs.get('host_identity', None) + self.guest_identity = kwargs.get('guest_identity', None) + self.content = kwargs.get('content', None) + + +class IntegrationAccountAgreementFilter(Model): + """The integration account agreement filter for odata query. + + All required parameters must be populated in order to send to Azure. + + :param agreement_type: Required. The agreement type of integration account + agreement. Possible values include: 'NotSpecified', 'AS2', 'X12', + 'Edifact' + :type agreement_type: str or ~azure.mgmt.logic.models.AgreementType + """ + + _validation = { + 'agreement_type': {'required': True}, + } + + _attribute_map = { + 'agreement_type': {'key': 'agreementType', 'type': 'AgreementType'}, + } + + def __init__(self, **kwargs): + super(IntegrationAccountAgreementFilter, self).__init__(**kwargs) + self.agreement_type = kwargs.get('agreement_type', None) + + +class IntegrationAccountCertificate(Resource): + """The integration account certificate. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :ivar created_time: The created time. + :vartype created_time: datetime + :ivar changed_time: The changed time. + :vartype changed_time: datetime + :param metadata: The metadata. + :type metadata: object + :param key: The key details in the key vault. + :type key: ~azure.mgmt.logic.models.KeyVaultKeyReference + :param public_certificate: The public certificate. + :type public_certificate: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'properties.metadata', 'type': 'object'}, + 'key': {'key': 'properties.key', 'type': 'KeyVaultKeyReference'}, + 'public_certificate': {'key': 'properties.publicCertificate', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IntegrationAccountCertificate, self).__init__(**kwargs) + self.created_time = None + self.changed_time = None + self.metadata = kwargs.get('metadata', None) + self.key = kwargs.get('key', None) + self.public_certificate = kwargs.get('public_certificate', None) + + +class IntegrationAccountMap(Resource): + """The integration account map. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param map_type: Required. The map type. Possible values include: + 'NotSpecified', 'Xslt', 'Xslt20', 'Xslt30', 'Liquid' + :type map_type: str or ~azure.mgmt.logic.models.MapType + :param parameters_schema: The parameters schema of integration account + map. + :type parameters_schema: + ~azure.mgmt.logic.models.IntegrationAccountMapPropertiesParametersSchema + :ivar created_time: The created time. + :vartype created_time: datetime + :ivar changed_time: The changed time. + :vartype changed_time: datetime + :param content: The content. + :type content: str + :param content_type: The content type. + :type content_type: str + :ivar content_link: The content link. + :vartype content_link: ~azure.mgmt.logic.models.ContentLink + :param metadata: The metadata. + :type metadata: object + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'map_type': {'required': True}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'content_link': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'map_type': {'key': 'properties.mapType', 'type': 'str'}, + 'parameters_schema': {'key': 'properties.parametersSchema', 'type': 'IntegrationAccountMapPropertiesParametersSchema'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, + 'content': {'key': 'properties.content', 'type': 'str'}, + 'content_type': {'key': 'properties.contentType', 'type': 'str'}, + 'content_link': {'key': 'properties.contentLink', 'type': 'ContentLink'}, + 'metadata': {'key': 'properties.metadata', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(IntegrationAccountMap, self).__init__(**kwargs) + self.map_type = kwargs.get('map_type', None) + self.parameters_schema = kwargs.get('parameters_schema', None) + self.created_time = None + self.changed_time = None + self.content = kwargs.get('content', None) + self.content_type = kwargs.get('content_type', None) + self.content_link = None + self.metadata = kwargs.get('metadata', None) + + +class IntegrationAccountMapFilter(Model): + """The integration account map filter for odata query. + + All required parameters must be populated in order to send to Azure. + + :param map_type: Required. The map type of integration account map. + Possible values include: 'NotSpecified', 'Xslt', 'Xslt20', 'Xslt30', + 'Liquid' + :type map_type: str or ~azure.mgmt.logic.models.MapType + """ + + _validation = { + 'map_type': {'required': True}, + } + + _attribute_map = { + 'map_type': {'key': 'mapType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IntegrationAccountMapFilter, self).__init__(**kwargs) + self.map_type = kwargs.get('map_type', None) + + +class IntegrationAccountMapPropertiesParametersSchema(Model): + """The parameters schema of integration account map. + + :param ref: The reference name. + :type ref: str + """ + + _attribute_map = { + 'ref': {'key': 'ref', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IntegrationAccountMapPropertiesParametersSchema, self).__init__(**kwargs) + self.ref = kwargs.get('ref', None) + + +class IntegrationAccountPartner(Resource): + """The integration account partner. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param partner_type: Required. The partner type. Possible values include: + 'NotSpecified', 'B2B' + :type partner_type: str or ~azure.mgmt.logic.models.PartnerType + :ivar created_time: The created time. + :vartype created_time: datetime + :ivar changed_time: The changed time. + :vartype changed_time: datetime + :param metadata: The metadata. + :type metadata: object + :param content: Required. The partner content. + :type content: ~azure.mgmt.logic.models.PartnerContent + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'partner_type': {'required': True}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'content': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'partner_type': {'key': 'properties.partnerType', 'type': 'str'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'properties.metadata', 'type': 'object'}, + 'content': {'key': 'properties.content', 'type': 'PartnerContent'}, + } + + def __init__(self, **kwargs): + super(IntegrationAccountPartner, self).__init__(**kwargs) + self.partner_type = kwargs.get('partner_type', None) + self.created_time = None + self.changed_time = None + self.metadata = kwargs.get('metadata', None) + self.content = kwargs.get('content', None) + + +class IntegrationAccountPartnerFilter(Model): + """The integration account partner filter for odata query. + + All required parameters must be populated in order to send to Azure. + + :param partner_type: Required. The partner type of integration account + partner. Possible values include: 'NotSpecified', 'B2B' + :type partner_type: str or ~azure.mgmt.logic.models.PartnerType + """ + + _validation = { + 'partner_type': {'required': True}, + } + + _attribute_map = { + 'partner_type': {'key': 'partnerType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IntegrationAccountPartnerFilter, self).__init__(**kwargs) + self.partner_type = kwargs.get('partner_type', None) + + +class IntegrationAccountSchema(Resource): + """The integration account schema. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param schema_type: Required. The schema type. Possible values include: + 'NotSpecified', 'Xml' + :type schema_type: str or ~azure.mgmt.logic.models.SchemaType + :param target_namespace: The target namespace of the schema. + :type target_namespace: str + :param document_name: The document name. + :type document_name: str + :param file_name: The file name. + :type file_name: str + :ivar created_time: The created time. + :vartype created_time: datetime + :ivar changed_time: The changed time. + :vartype changed_time: datetime + :param metadata: The metadata. + :type metadata: object + :param content: The content. + :type content: str + :param content_type: The content type. + :type content_type: str + :ivar content_link: The content link. + :vartype content_link: ~azure.mgmt.logic.models.ContentLink + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'schema_type': {'required': True}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'content_link': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'schema_type': {'key': 'properties.schemaType', 'type': 'str'}, + 'target_namespace': {'key': 'properties.targetNamespace', 'type': 'str'}, + 'document_name': {'key': 'properties.documentName', 'type': 'str'}, + 'file_name': {'key': 'properties.fileName', 'type': 'str'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'properties.metadata', 'type': 'object'}, + 'content': {'key': 'properties.content', 'type': 'str'}, + 'content_type': {'key': 'properties.contentType', 'type': 'str'}, + 'content_link': {'key': 'properties.contentLink', 'type': 'ContentLink'}, + } + + def __init__(self, **kwargs): + super(IntegrationAccountSchema, self).__init__(**kwargs) + self.schema_type = kwargs.get('schema_type', None) + self.target_namespace = kwargs.get('target_namespace', None) + self.document_name = kwargs.get('document_name', None) + self.file_name = kwargs.get('file_name', None) + self.created_time = None + self.changed_time = None + self.metadata = kwargs.get('metadata', None) + self.content = kwargs.get('content', None) + self.content_type = kwargs.get('content_type', None) + self.content_link = None + + +class IntegrationAccountSchemaFilter(Model): + """The integration account schema filter for odata query. + + All required parameters must be populated in order to send to Azure. + + :param schema_type: Required. The schema type of integration account + schema. Possible values include: 'NotSpecified', 'Xml' + :type schema_type: str or ~azure.mgmt.logic.models.SchemaType + """ + + _validation = { + 'schema_type': {'required': True}, + } + + _attribute_map = { + 'schema_type': {'key': 'schemaType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IntegrationAccountSchemaFilter, self).__init__(**kwargs) + self.schema_type = kwargs.get('schema_type', None) + + +class IntegrationAccountSession(Resource): + """The integration account session. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :ivar created_time: The created time. + :vartype created_time: datetime + :ivar changed_time: The changed time. + :vartype changed_time: datetime + :param content: The session content. + :type content: object + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, + 'content': {'key': 'properties.content', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(IntegrationAccountSession, self).__init__(**kwargs) + self.created_time = None + self.changed_time = None + self.content = kwargs.get('content', None) + + +class IntegrationAccountSessionFilter(Model): + """The integration account session filter. + + All required parameters must be populated in order to send to Azure. + + :param changed_time: Required. The changed time of integration account + sessions. + :type changed_time: datetime + """ + + _validation = { + 'changed_time': {'required': True}, + } + + _attribute_map = { + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(IntegrationAccountSessionFilter, self).__init__(**kwargs) + self.changed_time = kwargs.get('changed_time', None) + + +class IntegrationAccountSku(Model): + """The integration account sku. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The sku name. Possible values include: + 'NotSpecified', 'Free', 'Basic', 'Standard' + :type name: str or ~azure.mgmt.logic.models.IntegrationAccountSkuName + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IntegrationAccountSku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class JsonSchema(Model): + """The JSON schema. + + :param title: The JSON title. + :type title: str + :param content: The JSON content. + :type content: str + """ + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'content': {'key': 'content', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JsonSchema, self).__init__(**kwargs) + self.title = kwargs.get('title', None) + self.content = kwargs.get('content', None) + + +class KeyVaultKey(Model): + """The key vault key. + + :param kid: The key id. + :type kid: str + :param attributes: The key attributes. + :type attributes: ~azure.mgmt.logic.models.KeyVaultKeyAttributes + """ + + _attribute_map = { + 'kid': {'key': 'kid', 'type': 'str'}, + 'attributes': {'key': 'attributes', 'type': 'KeyVaultKeyAttributes'}, + } + + def __init__(self, **kwargs): + super(KeyVaultKey, self).__init__(**kwargs) + self.kid = kwargs.get('kid', None) + self.attributes = kwargs.get('attributes', None) + + +class KeyVaultKeyAttributes(Model): + """The key attributes. + + :param enabled: Whether the key is enabled or not. + :type enabled: bool + :param created: When the key was created. + :type created: long + :param updated: When the key was updated. + :type updated: long + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'created': {'key': 'created', 'type': 'long'}, + 'updated': {'key': 'updated', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(KeyVaultKeyAttributes, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.created = kwargs.get('created', None) + self.updated = kwargs.get('updated', None) + + +class KeyVaultKeyReference(Model): + """The reference to the key vault key. + + All required parameters must be populated in order to send to Azure. + + :param key_vault: Required. The key vault reference. + :type key_vault: ~azure.mgmt.logic.models.KeyVaultKeyReferenceKeyVault + :param key_name: Required. The private key name in key vault. + :type key_name: str + :param key_version: The private key version in key vault. + :type key_version: str + """ + + _validation = { + 'key_vault': {'required': True}, + 'key_name': {'required': True}, + } + + _attribute_map = { + 'key_vault': {'key': 'keyVault', 'type': 'KeyVaultKeyReferenceKeyVault'}, + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'key_version': {'key': 'keyVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyVaultKeyReference, self).__init__(**kwargs) + self.key_vault = kwargs.get('key_vault', None) + self.key_name = kwargs.get('key_name', None) + self.key_version = kwargs.get('key_version', None) + + +class KeyVaultKeyReferenceKeyVault(Model): + """The key vault reference. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: The resource id. + :type id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyVaultKeyReferenceKeyVault, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = None + self.type = None + + +class ResourceReference(Model): + """The resource reference. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: The resource id. + :type id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceReference, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = None + self.type = None + + +class KeyVaultReference(ResourceReference): + """The key vault reference. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: The resource id. + :type id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyVaultReference, self).__init__(**kwargs) + + +class ListKeyVaultKeysDefinition(Model): + """The list key vault keys definition. + + All required parameters must be populated in order to send to Azure. + + :param key_vault: Required. The key vault reference. + :type key_vault: ~azure.mgmt.logic.models.KeyVaultReference + :param skip_token: The skip token. + :type skip_token: str + """ + + _validation = { + 'key_vault': {'required': True}, + } + + _attribute_map = { + 'key_vault': {'key': 'keyVault', 'type': 'KeyVaultReference'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ListKeyVaultKeysDefinition, self).__init__(**kwargs) + self.key_vault = kwargs.get('key_vault', None) + self.skip_token = kwargs.get('skip_token', None) + + +class Operation(Model): + """Logic REST API operation. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: The object that represents the operation. + :type display: ~azure.mgmt.logic.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + + +class OperationDisplay(Model): + """The object that represents the operation. + + :param provider: Service provider: Microsoft.Logic + :type provider: str + :param resource: Resource on which the operation is performed: Profile, + endpoint, etc. + :type resource: str + :param operation: Operation type: Read, write, delete, etc. + :type operation: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + + +class OperationResultProperties(Model): + """The run operation result properties. + + :param start_time: The start time of the workflow scope repetition. + :type start_time: datetime + :param end_time: The end time of the workflow scope repetition. + :type end_time: datetime + :param correlation: The correlation properties. + :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation + :param status: The status of the workflow scope repetition. Possible + values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + 'TimedOut', 'Aborted', 'Ignored' + :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + :param code: The workflow scope repetition code. + :type code: str + :param error: + :type error: object + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'correlation': {'key': 'correlation', 'type': 'RunActionCorrelation'}, + 'status': {'key': 'status', 'type': 'str'}, + 'code': {'key': 'code', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(OperationResultProperties, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.correlation = kwargs.get('correlation', None) + self.status = kwargs.get('status', None) + self.code = kwargs.get('code', None) + self.error = kwargs.get('error', None) + + +class OperationResult(OperationResultProperties): + """The operation result definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param start_time: The start time of the workflow scope repetition. + :type start_time: datetime + :param end_time: The end time of the workflow scope repetition. + :type end_time: datetime + :param correlation: The correlation properties. + :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation + :param status: The status of the workflow scope repetition. Possible + values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + 'TimedOut', 'Aborted', 'Ignored' + :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + :param code: The workflow scope repetition code. + :type code: str + :param error: + :type error: object + :ivar tracking_id: Gets the tracking id. + :vartype tracking_id: str + :ivar inputs: Gets the inputs. + :vartype inputs: object + :ivar inputs_link: Gets the link to inputs. + :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar outputs: Gets the outputs. + :vartype outputs: object + :ivar outputs_link: Gets the link to outputs. + :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar tracked_properties: Gets the tracked properties. + :vartype tracked_properties: object + :param retry_history: Gets the retry histories. + :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] + :param iteration_count: + :type iteration_count: int + """ + + _validation = { + 'tracking_id': {'readonly': True}, + 'inputs': {'readonly': True}, + 'inputs_link': {'readonly': True}, + 'outputs': {'readonly': True}, + 'outputs_link': {'readonly': True}, + 'tracked_properties': {'readonly': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'correlation': {'key': 'correlation', 'type': 'RunActionCorrelation'}, + 'status': {'key': 'status', 'type': 'str'}, + 'code': {'key': 'code', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'object'}, + 'tracking_id': {'key': 'trackingId', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': 'object'}, + 'inputs_link': {'key': 'inputsLink', 'type': 'ContentLink'}, + 'outputs': {'key': 'outputs', 'type': 'object'}, + 'outputs_link': {'key': 'outputsLink', 'type': 'ContentLink'}, + 'tracked_properties': {'key': 'trackedProperties', 'type': 'object'}, + 'retry_history': {'key': 'retryHistory', 'type': '[RetryHistory]'}, + 'iteration_count': {'key': 'iterationCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(OperationResult, self).__init__(**kwargs) + self.tracking_id = None + self.inputs = None + self.inputs_link = None + self.outputs = None + self.outputs_link = None + self.tracked_properties = None + self.retry_history = kwargs.get('retry_history', None) + self.iteration_count = kwargs.get('iteration_count', None) + + +class PartnerContent(Model): + """The integration account partner content. + + :param b2b: The B2B partner content. + :type b2b: ~azure.mgmt.logic.models.B2BPartnerContent + """ + + _attribute_map = { + 'b2b': {'key': 'b2b', 'type': 'B2BPartnerContent'}, + } + + def __init__(self, **kwargs): + super(PartnerContent, self).__init__(**kwargs) + self.b2b = kwargs.get('b2b', None) + + +class RecurrenceSchedule(Model): + """The recurrence schedule. + + :param minutes: The minutes. + :type minutes: list[int] + :param hours: The hours. + :type hours: list[int] + :param week_days: The days of the week. + :type week_days: list[str or ~azure.mgmt.logic.models.DaysOfWeek] + :param month_days: The month days. + :type month_days: list[int] + :param monthly_occurrences: The monthly occurrences. + :type monthly_occurrences: + list[~azure.mgmt.logic.models.RecurrenceScheduleOccurrence] + """ + + _attribute_map = { + 'minutes': {'key': 'minutes', 'type': '[int]'}, + 'hours': {'key': 'hours', 'type': '[int]'}, + 'week_days': {'key': 'weekDays', 'type': '[DaysOfWeek]'}, + 'month_days': {'key': 'monthDays', 'type': '[int]'}, + 'monthly_occurrences': {'key': 'monthlyOccurrences', 'type': '[RecurrenceScheduleOccurrence]'}, + } + + def __init__(self, **kwargs): + super(RecurrenceSchedule, self).__init__(**kwargs) + self.minutes = kwargs.get('minutes', None) + self.hours = kwargs.get('hours', None) + self.week_days = kwargs.get('week_days', None) + self.month_days = kwargs.get('month_days', None) + self.monthly_occurrences = kwargs.get('monthly_occurrences', None) + + +class RecurrenceScheduleOccurrence(Model): + """The recurrence schedule occurrence. + + :param day: The day of the week. Possible values include: 'Sunday', + 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' + :type day: str or ~azure.mgmt.logic.models.DayOfWeek + :param occurrence: The occurrence. + :type occurrence: int + """ + + _attribute_map = { + 'day': {'key': 'day', 'type': 'DayOfWeek'}, + 'occurrence': {'key': 'occurrence', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RecurrenceScheduleOccurrence, self).__init__(**kwargs) + self.day = kwargs.get('day', None) + self.occurrence = kwargs.get('occurrence', None) + + +class RegenerateActionParameter(Model): + """The access key regenerate action content. + + :param key_type: The key type. Possible values include: 'NotSpecified', + 'Primary', 'Secondary' + :type key_type: str or ~azure.mgmt.logic.models.KeyType + """ + + _attribute_map = { + 'key_type': {'key': 'keyType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RegenerateActionParameter, self).__init__(**kwargs) + self.key_type = kwargs.get('key_type', None) + + +class RepetitionIndex(Model): + """The workflow run action repetition index. + + All required parameters must be populated in order to send to Azure. + + :param scope_name: The scope. + :type scope_name: str + :param item_index: Required. The index. + :type item_index: int + """ + + _validation = { + 'item_index': {'required': True}, + } + + _attribute_map = { + 'scope_name': {'key': 'scopeName', 'type': 'str'}, + 'item_index': {'key': 'itemIndex', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RepetitionIndex, self).__init__(**kwargs) + self.scope_name = kwargs.get('scope_name', None) + self.item_index = kwargs.get('item_index', None) + + +class Request(Model): + """A request. + + :param headers: A list of all the headers attached to the request. + :type headers: object + :param uri: The destination for the request. + :type uri: str + :param method: The HTTP method used for the request. + :type method: str + """ + + _attribute_map = { + 'headers': {'key': 'headers', 'type': 'object'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'method': {'key': 'method', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Request, self).__init__(**kwargs) + self.headers = kwargs.get('headers', None) + self.uri = kwargs.get('uri', None) + self.method = kwargs.get('method', None) + + +class RequestHistory(Resource): + """The request history. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param properties: The request history properties. + :type properties: ~azure.mgmt.logic.models.RequestHistoryProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'RequestHistoryProperties'}, + } + + def __init__(self, **kwargs): + super(RequestHistory, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class RequestHistoryProperties(Model): + """The request history. + + :param start_time: The time the request started. + :type start_time: datetime + :param end_time: The time the request ended. + :type end_time: datetime + :param request: The request. + :type request: ~azure.mgmt.logic.models.Request + :param response: The response. + :type response: ~azure.mgmt.logic.models.Response + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'request': {'key': 'request', 'type': 'Request'}, + 'response': {'key': 'response', 'type': 'Response'}, + } + + def __init__(self, **kwargs): + super(RequestHistoryProperties, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.request = kwargs.get('request', None) + self.response = kwargs.get('response', None) + + +class Response(Model): + """A response. + + :param headers: A list of all the headers attached to the response. + :type headers: object + :param status_code: The status code of the response. + :type status_code: int + :param body_link: Details on the location of the body content. + :type body_link: ~azure.mgmt.logic.models.ContentLink + """ + + _attribute_map = { + 'headers': {'key': 'headers', 'type': 'object'}, + 'status_code': {'key': 'statusCode', 'type': 'int'}, + 'body_link': {'key': 'bodyLink', 'type': 'ContentLink'}, + } + + def __init__(self, **kwargs): + super(Response, self).__init__(**kwargs) + self.headers = kwargs.get('headers', None) + self.status_code = kwargs.get('status_code', None) + self.body_link = kwargs.get('body_link', None) + + +class RetryHistory(Model): + """The retry history. + + :param start_time: Gets the start time. + :type start_time: datetime + :param end_time: Gets the end time. + :type end_time: datetime + :param code: Gets the status code. + :type code: str + :param client_request_id: Gets the client request Id. + :type client_request_id: str + :param service_request_id: Gets the service request Id. + :type service_request_id: str + :param error: Gets the error response. + :type error: ~azure.mgmt.logic.models.ErrorResponse + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'code': {'key': 'code', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'service_request_id': {'key': 'serviceRequestId', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ErrorResponse'}, + } + + def __init__(self, **kwargs): + super(RetryHistory, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.code = kwargs.get('code', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.service_request_id = kwargs.get('service_request_id', None) + self.error = kwargs.get('error', None) + + +class RunCorrelation(Model): + """The correlation properties. + + :param client_tracking_id: The client tracking identifier. + :type client_tracking_id: str + :param client_keywords: The client keywords. + :type client_keywords: list[str] + """ + + _attribute_map = { + 'client_tracking_id': {'key': 'clientTrackingId', 'type': 'str'}, + 'client_keywords': {'key': 'clientKeywords', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(RunCorrelation, self).__init__(**kwargs) + self.client_tracking_id = kwargs.get('client_tracking_id', None) + self.client_keywords = kwargs.get('client_keywords', None) + + +class RunActionCorrelation(RunCorrelation): + """The workflow run action correlation properties. + + :param client_tracking_id: The client tracking identifier. + :type client_tracking_id: str + :param client_keywords: The client keywords. + :type client_keywords: list[str] + :param action_tracking_id: The action tracking identifier. + :type action_tracking_id: str + """ + + _attribute_map = { + 'client_tracking_id': {'key': 'clientTrackingId', 'type': 'str'}, + 'client_keywords': {'key': 'clientKeywords', 'type': '[str]'}, + 'action_tracking_id': {'key': 'actionTrackingId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RunActionCorrelation, self).__init__(**kwargs) + self.action_tracking_id = kwargs.get('action_tracking_id', None) + + +class SetTriggerStateActionDefinition(Model): + """SetTriggerStateActionDefinition. + + All required parameters must be populated in order to send to Azure. + + :param source: Required. + :type source: ~azure.mgmt.logic.models.WorkflowTrigger + """ + + _validation = { + 'source': {'required': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'WorkflowTrigger'}, + } + + def __init__(self, **kwargs): + super(SetTriggerStateActionDefinition, self).__init__(**kwargs) + self.source = kwargs.get('source', None) + + +class Sku(Model): + """The sku type. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name. Possible values include: 'NotSpecified', + 'Free', 'Shared', 'Basic', 'Standard', 'Premium' + :type name: str or ~azure.mgmt.logic.models.SkuName + :param plan: The reference to plan. + :type plan: ~azure.mgmt.logic.models.ResourceReference + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'plan': {'key': 'plan', 'type': 'ResourceReference'}, + } + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.plan = kwargs.get('plan', None) + + +class SubResource(Model): + """The sub resource type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubResource, self).__init__(**kwargs) + self.id = None + + +class TrackingEvent(Model): + """TrackingEvent. + + All required parameters must be populated in order to send to Azure. + + :param event_level: Required. Possible values include: 'LogAlways', + 'Critical', 'Error', 'Warning', 'Informational', 'Verbose' + :type event_level: str or ~azure.mgmt.logic.models.EventLevel + :param event_time: Required. + :type event_time: datetime + :param record_type: Required. Possible values include: 'NotSpecified', + 'Custom', 'AS2Message', 'AS2MDN', 'X12Interchange', 'X12FunctionalGroup', + 'X12TransactionSet', 'X12InterchangeAcknowledgment', + 'X12FunctionalGroupAcknowledgment', 'X12TransactionSetAcknowledgment', + 'EdifactInterchange', 'EdifactFunctionalGroup', 'EdifactTransactionSet', + 'EdifactInterchangeAcknowledgment', + 'EdifactFunctionalGroupAcknowledgment', + 'EdifactTransactionSetAcknowledgment' + :type record_type: str or ~azure.mgmt.logic.models.TrackingRecordType + :param error: + :type error: ~azure.mgmt.logic.models.TrackingEventErrorInfo + """ + + _validation = { + 'event_level': {'required': True}, + 'event_time': {'required': True}, + 'record_type': {'required': True}, + } + + _attribute_map = { + 'event_level': {'key': 'eventLevel', 'type': 'EventLevel'}, + 'event_time': {'key': 'eventTime', 'type': 'iso-8601'}, + 'record_type': {'key': 'recordType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'TrackingEventErrorInfo'}, + } + + def __init__(self, **kwargs): + super(TrackingEvent, self).__init__(**kwargs) + self.event_level = kwargs.get('event_level', None) + self.event_time = kwargs.get('event_time', None) + self.record_type = kwargs.get('record_type', None) + self.error = kwargs.get('error', None) + + +class TrackingEventErrorInfo(Model): + """TrackingEventErrorInfo. + + :param message: + :type message: str + :param code: + :type code: str + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'code': {'key': 'code', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TrackingEventErrorInfo, self).__init__(**kwargs) + self.message = kwargs.get('message', None) + self.code = kwargs.get('code', None) + + +class TrackingEventsDefinition(Model): + """TrackingEventsDefinition. + + All required parameters must be populated in order to send to Azure. + + :param source_type: Required. + :type source_type: str + :param track_events_options: Possible values include: 'None', + 'DisableSourceInfoEnrich' + :type track_events_options: str or + ~azure.mgmt.logic.models.TrackEventsOperationOptions + :param events: Required. + :type events: list[~azure.mgmt.logic.models.TrackingEvent] + """ + + _validation = { + 'source_type': {'required': True}, + 'events': {'required': True}, + } + + _attribute_map = { + 'source_type': {'key': 'sourceType', 'type': 'str'}, + 'track_events_options': {'key': 'trackEventsOptions', 'type': 'str'}, + 'events': {'key': 'events', 'type': '[TrackingEvent]'}, + } + + def __init__(self, **kwargs): + super(TrackingEventsDefinition, self).__init__(**kwargs) + self.source_type = kwargs.get('source_type', None) + self.track_events_options = kwargs.get('track_events_options', None) + self.events = kwargs.get('events', None) + + +class Workflow(Resource): + """The workflow type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :ivar provisioning_state: Gets the provisioning state. Possible values + include: 'NotSpecified', 'Accepted', 'Running', 'Ready', 'Creating', + 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', + 'Moving', 'Updating', 'Registering', 'Registered', 'Unregistering', + 'Unregistered', 'Completed' + :vartype provisioning_state: str or + ~azure.mgmt.logic.models.WorkflowProvisioningState + :ivar created_time: Gets the created time. + :vartype created_time: datetime + :ivar changed_time: Gets the changed time. + :vartype changed_time: datetime + :param state: The state. Possible values include: 'NotSpecified', + 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + :type state: str or ~azure.mgmt.logic.models.WorkflowState + :ivar version: Gets the version. + :vartype version: str + :ivar access_endpoint: Gets the access endpoint. + :vartype access_endpoint: str + :param sku: The sku. + :type sku: ~azure.mgmt.logic.models.Sku + :param integration_account: The integration account. + :type integration_account: ~azure.mgmt.logic.models.ResourceReference + :param definition: The definition. + :type definition: object + :param parameters: The parameters. + :type parameters: dict[str, ~azure.mgmt.logic.models.WorkflowParameter] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'version': {'readonly': True}, + 'access_endpoint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'access_endpoint': {'key': 'properties.accessEndpoint', 'type': 'str'}, + 'sku': {'key': 'properties.sku', 'type': 'Sku'}, + 'integration_account': {'key': 'properties.integrationAccount', 'type': 'ResourceReference'}, + 'definition': {'key': 'properties.definition', 'type': 'object'}, + 'parameters': {'key': 'properties.parameters', 'type': '{WorkflowParameter}'}, + } + + def __init__(self, **kwargs): + super(Workflow, self).__init__(**kwargs) + self.provisioning_state = None + self.created_time = None + self.changed_time = None + self.state = kwargs.get('state', None) + self.version = None + self.access_endpoint = None + self.sku = kwargs.get('sku', None) + self.integration_account = kwargs.get('integration_account', None) + self.definition = kwargs.get('definition', None) + self.parameters = kwargs.get('parameters', None) + + +class WorkflowFilter(Model): + """The workflow filter. + + :param state: The state of workflows. Possible values include: + 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + :type state: str or ~azure.mgmt.logic.models.WorkflowState + """ + + _attribute_map = { + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WorkflowFilter, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + + +class WorkflowParameter(Model): + """The workflow parameters. + + :param type: The type. Possible values include: 'NotSpecified', 'String', + 'SecureString', 'Int', 'Float', 'Bool', 'Array', 'Object', 'SecureObject' + :type type: str or ~azure.mgmt.logic.models.ParameterType + :param value: The value. + :type value: object + :param metadata: The metadata. + :type metadata: object + :param description: The description. + :type description: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'object'}, + 'metadata': {'key': 'metadata', 'type': 'object'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WorkflowParameter, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.value = kwargs.get('value', None) + self.metadata = kwargs.get('metadata', None) + self.description = kwargs.get('description', None) + + +class WorkflowOutputParameter(WorkflowParameter): + """The workflow output parameter. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param type: The type. Possible values include: 'NotSpecified', 'String', + 'SecureString', 'Int', 'Float', 'Bool', 'Array', 'Object', 'SecureObject' + :type type: str or ~azure.mgmt.logic.models.ParameterType + :param value: The value. + :type value: object + :param metadata: The metadata. + :type metadata: object + :param description: The description. + :type description: str + :ivar error: Gets the error. + :vartype error: object + """ + + _validation = { + 'error': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'object'}, + 'metadata': {'key': 'metadata', 'type': 'object'}, + 'description': {'key': 'description', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(WorkflowOutputParameter, self).__init__(**kwargs) + self.error = None + + +class WorkflowRun(SubResource): + """The workflow run. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar wait_end_time: Gets the wait end time. + :vartype wait_end_time: datetime + :ivar start_time: Gets the start time. + :vartype start_time: datetime + :ivar end_time: Gets the end time. + :vartype end_time: datetime + :ivar status: Gets the status. Possible values include: 'NotSpecified', + 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', + 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' + :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus + :ivar code: Gets the code. + :vartype code: str + :ivar error: Gets the error. + :vartype error: object + :ivar correlation_id: Gets the correlation id. + :vartype correlation_id: str + :param correlation: The run correlation. + :type correlation: ~azure.mgmt.logic.models.Correlation + :ivar workflow: Gets the reference to workflow version. + :vartype workflow: ~azure.mgmt.logic.models.ResourceReference + :ivar trigger: Gets the fired trigger. + :vartype trigger: ~azure.mgmt.logic.models.WorkflowRunTrigger + :ivar outputs: Gets the outputs. + :vartype outputs: dict[str, + ~azure.mgmt.logic.models.WorkflowOutputParameter] + :ivar response: Gets the response of the flow run. + :vartype response: ~azure.mgmt.logic.models.WorkflowRunTrigger + :ivar name: Gets the workflow run name. + :vartype name: str + :ivar type: Gets the workflow run type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'wait_end_time': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'status': {'readonly': True}, + 'code': {'readonly': True}, + 'error': {'readonly': True}, + 'correlation_id': {'readonly': True}, + 'workflow': {'readonly': True}, + 'trigger': {'readonly': True}, + 'outputs': {'readonly': True}, + 'response': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'wait_end_time': {'key': 'properties.waitEndTime', 'type': 'iso-8601'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'code': {'key': 'properties.code', 'type': 'str'}, + 'error': {'key': 'properties.error', 'type': 'object'}, + 'correlation_id': {'key': 'properties.correlationId', 'type': 'str'}, + 'correlation': {'key': 'properties.correlation', 'type': 'Correlation'}, + 'workflow': {'key': 'properties.workflow', 'type': 'ResourceReference'}, + 'trigger': {'key': 'properties.trigger', 'type': 'WorkflowRunTrigger'}, + 'outputs': {'key': 'properties.outputs', 'type': '{WorkflowOutputParameter}'}, + 'response': {'key': 'properties.response', 'type': 'WorkflowRunTrigger'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WorkflowRun, self).__init__(**kwargs) + self.wait_end_time = None + self.start_time = None + self.end_time = None + self.status = None + self.code = None + self.error = None + self.correlation_id = None + self.correlation = kwargs.get('correlation', None) + self.workflow = None + self.trigger = None + self.outputs = None + self.response = None + self.name = None + self.type = None + + +class WorkflowRunAction(SubResource): + """The workflow run action. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar start_time: Gets the start time. + :vartype start_time: datetime + :ivar end_time: Gets the end time. + :vartype end_time: datetime + :ivar status: Gets the status. Possible values include: 'NotSpecified', + 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', + 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' + :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus + :ivar code: Gets the code. + :vartype code: str + :ivar error: Gets the error. + :vartype error: object + :ivar tracking_id: Gets the tracking id. + :vartype tracking_id: str + :param correlation: The correlation properties. + :type correlation: ~azure.mgmt.logic.models.Correlation + :ivar inputs_link: Gets the link to inputs. + :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar outputs_link: Gets the link to outputs. + :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar tracked_properties: Gets the tracked properties. + :vartype tracked_properties: object + :param retry_history: Gets the retry histories. + :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] + :ivar name: Gets the workflow run action name. + :vartype name: str + :ivar type: Gets the workflow run action type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'status': {'readonly': True}, + 'code': {'readonly': True}, + 'error': {'readonly': True}, + 'tracking_id': {'readonly': True}, + 'inputs_link': {'readonly': True}, + 'outputs_link': {'readonly': True}, + 'tracked_properties': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'code': {'key': 'properties.code', 'type': 'str'}, + 'error': {'key': 'properties.error', 'type': 'object'}, + 'tracking_id': {'key': 'properties.trackingId', 'type': 'str'}, + 'correlation': {'key': 'properties.correlation', 'type': 'Correlation'}, + 'inputs_link': {'key': 'properties.inputsLink', 'type': 'ContentLink'}, + 'outputs_link': {'key': 'properties.outputsLink', 'type': 'ContentLink'}, + 'tracked_properties': {'key': 'properties.trackedProperties', 'type': 'object'}, + 'retry_history': {'key': 'properties.retryHistory', 'type': '[RetryHistory]'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WorkflowRunAction, self).__init__(**kwargs) + self.start_time = None + self.end_time = None + self.status = None + self.code = None + self.error = None + self.tracking_id = None + self.correlation = kwargs.get('correlation', None) + self.inputs_link = None + self.outputs_link = None + self.tracked_properties = None + self.retry_history = kwargs.get('retry_history', None) + self.name = None + self.type = None + + +class WorkflowRunActionFilter(Model): + """The workflow run action filter. + + :param status: The status of workflow run action. Possible values include: + 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', + 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', + 'Ignored' + :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WorkflowRunActionFilter, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + + +class WorkflowRunActionRepetitionDefinition(Resource): + """The workflow run action repetition definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param start_time: The start time of the workflow scope repetition. + :type start_time: datetime + :param end_time: The end time of the workflow scope repetition. + :type end_time: datetime + :param correlation: The correlation properties. + :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation + :param status: The status of the workflow scope repetition. Possible + values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + 'TimedOut', 'Aborted', 'Ignored' + :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + :param code: The workflow scope repetition code. + :type code: str + :param error: + :type error: object + :ivar tracking_id: Gets the tracking id. + :vartype tracking_id: str + :ivar inputs: Gets the inputs. + :vartype inputs: object + :ivar inputs_link: Gets the link to inputs. + :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar outputs: Gets the outputs. + :vartype outputs: object + :ivar outputs_link: Gets the link to outputs. + :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar tracked_properties: Gets the tracked properties. + :vartype tracked_properties: object + :param retry_history: Gets the retry histories. + :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] + :param iteration_count: + :type iteration_count: int + :param repetition_indexes: The repetition indexes. + :type repetition_indexes: list[~azure.mgmt.logic.models.RepetitionIndex] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tracking_id': {'readonly': True}, + 'inputs': {'readonly': True}, + 'inputs_link': {'readonly': True}, + 'outputs': {'readonly': True}, + 'outputs_link': {'readonly': True}, + 'tracked_properties': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'correlation': {'key': 'properties.correlation', 'type': 'RunActionCorrelation'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'code': {'key': 'properties.code', 'type': 'str'}, + 'error': {'key': 'properties.error', 'type': 'object'}, + 'tracking_id': {'key': 'properties.trackingId', 'type': 'str'}, + 'inputs': {'key': 'properties.inputs', 'type': 'object'}, + 'inputs_link': {'key': 'properties.inputsLink', 'type': 'ContentLink'}, + 'outputs': {'key': 'properties.outputs', 'type': 'object'}, + 'outputs_link': {'key': 'properties.outputsLink', 'type': 'ContentLink'}, + 'tracked_properties': {'key': 'properties.trackedProperties', 'type': 'object'}, + 'retry_history': {'key': 'properties.retryHistory', 'type': '[RetryHistory]'}, + 'iteration_count': {'key': 'properties.iterationCount', 'type': 'int'}, + 'repetition_indexes': {'key': 'properties.repetitionIndexes', 'type': '[RepetitionIndex]'}, + } + + def __init__(self, **kwargs): + super(WorkflowRunActionRepetitionDefinition, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.correlation = kwargs.get('correlation', None) + self.status = kwargs.get('status', None) + self.code = kwargs.get('code', None) + self.error = kwargs.get('error', None) + self.tracking_id = None + self.inputs = None + self.inputs_link = None + self.outputs = None + self.outputs_link = None + self.tracked_properties = None + self.retry_history = kwargs.get('retry_history', None) + self.iteration_count = kwargs.get('iteration_count', None) + self.repetition_indexes = kwargs.get('repetition_indexes', None) + + +class WorkflowRunActionRepetitionDefinitionCollection(Model): + """A collection of workflow run action repetitions. + + :param value: + :type value: + list[~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinition] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[WorkflowRunActionRepetitionDefinition]'}, + } + + def __init__(self, **kwargs): + super(WorkflowRunActionRepetitionDefinitionCollection, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class WorkflowRunFilter(Model): + """The workflow run filter. + + :param status: The status of workflow run. Possible values include: + 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', + 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', + 'Ignored' + :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WorkflowRunFilter, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + + +class WorkflowRunTrigger(Model): + """The workflow run trigger. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Gets the name. + :vartype name: str + :ivar inputs: Gets the inputs. + :vartype inputs: object + :ivar inputs_link: Gets the link to inputs. + :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar outputs: Gets the outputs. + :vartype outputs: object + :ivar outputs_link: Gets the link to outputs. + :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar scheduled_time: Gets the scheduled time. + :vartype scheduled_time: datetime + :ivar start_time: Gets the start time. + :vartype start_time: datetime + :ivar end_time: Gets the end time. + :vartype end_time: datetime + :ivar tracking_id: Gets the tracking id. + :vartype tracking_id: str + :param correlation: The run correlation. + :type correlation: ~azure.mgmt.logic.models.Correlation + :ivar code: Gets the code. + :vartype code: str + :ivar status: Gets the status. Possible values include: 'NotSpecified', + 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', + 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' + :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus + :ivar error: Gets the error. + :vartype error: object + :ivar tracked_properties: Gets the tracked properties. + :vartype tracked_properties: object + """ + + _validation = { + 'name': {'readonly': True}, + 'inputs': {'readonly': True}, + 'inputs_link': {'readonly': True}, + 'outputs': {'readonly': True}, + 'outputs_link': {'readonly': True}, + 'scheduled_time': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'tracking_id': {'readonly': True}, + 'code': {'readonly': True}, + 'status': {'readonly': True}, + 'error': {'readonly': True}, + 'tracked_properties': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': 'object'}, + 'inputs_link': {'key': 'inputsLink', 'type': 'ContentLink'}, + 'outputs': {'key': 'outputs', 'type': 'object'}, + 'outputs_link': {'key': 'outputsLink', 'type': 'ContentLink'}, + 'scheduled_time': {'key': 'scheduledTime', 'type': 'iso-8601'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'tracking_id': {'key': 'trackingId', 'type': 'str'}, + 'correlation': {'key': 'correlation', 'type': 'Correlation'}, + 'code': {'key': 'code', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'object'}, + 'tracked_properties': {'key': 'trackedProperties', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(WorkflowRunTrigger, self).__init__(**kwargs) + self.name = None + self.inputs = None + self.inputs_link = None + self.outputs = None + self.outputs_link = None + self.scheduled_time = None + self.start_time = None + self.end_time = None + self.tracking_id = None + self.correlation = kwargs.get('correlation', None) + self.code = None + self.status = None + self.error = None + self.tracked_properties = None + + +class WorkflowTrigger(SubResource): + """The workflow trigger. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar provisioning_state: Gets the provisioning state. Possible values + include: 'NotSpecified', 'Accepted', 'Running', 'Ready', 'Creating', + 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', + 'Moving', 'Updating', 'Registering', 'Registered', 'Unregistering', + 'Unregistered', 'Completed' + :vartype provisioning_state: str or + ~azure.mgmt.logic.models.WorkflowTriggerProvisioningState + :ivar created_time: Gets the created time. + :vartype created_time: datetime + :ivar changed_time: Gets the changed time. + :vartype changed_time: datetime + :ivar state: Gets the state. Possible values include: 'NotSpecified', + 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + :vartype state: str or ~azure.mgmt.logic.models.WorkflowState + :ivar status: Gets the status. Possible values include: 'NotSpecified', + 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', + 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' + :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus + :ivar last_execution_time: Gets the last execution time. + :vartype last_execution_time: datetime + :ivar next_execution_time: Gets the next execution time. + :vartype next_execution_time: datetime + :ivar recurrence: Gets the workflow trigger recurrence. + :vartype recurrence: ~azure.mgmt.logic.models.WorkflowTriggerRecurrence + :ivar workflow: Gets the reference to workflow. + :vartype workflow: ~azure.mgmt.logic.models.ResourceReference + :ivar name: Gets the workflow trigger name. + :vartype name: str + :ivar type: Gets the workflow trigger type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'state': {'readonly': True}, + 'status': {'readonly': True}, + 'last_execution_time': {'readonly': True}, + 'next_execution_time': {'readonly': True}, + 'recurrence': {'readonly': True}, + 'workflow': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'last_execution_time': {'key': 'properties.lastExecutionTime', 'type': 'iso-8601'}, + 'next_execution_time': {'key': 'properties.nextExecutionTime', 'type': 'iso-8601'}, + 'recurrence': {'key': 'properties.recurrence', 'type': 'WorkflowTriggerRecurrence'}, + 'workflow': {'key': 'properties.workflow', 'type': 'ResourceReference'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WorkflowTrigger, self).__init__(**kwargs) + self.provisioning_state = None + self.created_time = None + self.changed_time = None + self.state = None + self.status = None + self.last_execution_time = None + self.next_execution_time = None + self.recurrence = None + self.workflow = None + self.name = None + self.type = None + + +class WorkflowTriggerCallbackUrl(Model): + """The workflow trigger callback URL. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: Gets the workflow trigger callback URL. + :vartype value: str + :ivar method: Gets the workflow trigger callback URL HTTP method. + :vartype method: str + :ivar base_path: Gets the workflow trigger callback URL base path. + :vartype base_path: str + :ivar relative_path: Gets the workflow trigger callback URL relative path. + :vartype relative_path: str + :param relative_path_parameters: Gets the workflow trigger callback URL + relative path parameters. + :type relative_path_parameters: list[str] + :param queries: Gets the workflow trigger callback URL query parameters. + :type queries: + ~azure.mgmt.logic.models.WorkflowTriggerListCallbackUrlQueries + """ + + _validation = { + 'value': {'readonly': True}, + 'method': {'readonly': True}, + 'base_path': {'readonly': True}, + 'relative_path': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'method': {'key': 'method', 'type': 'str'}, + 'base_path': {'key': 'basePath', 'type': 'str'}, + 'relative_path': {'key': 'relativePath', 'type': 'str'}, + 'relative_path_parameters': {'key': 'relativePathParameters', 'type': '[str]'}, + 'queries': {'key': 'queries', 'type': 'WorkflowTriggerListCallbackUrlQueries'}, + } + + def __init__(self, **kwargs): + super(WorkflowTriggerCallbackUrl, self).__init__(**kwargs) + self.value = None + self.method = None + self.base_path = None + self.relative_path = None + self.relative_path_parameters = kwargs.get('relative_path_parameters', None) + self.queries = kwargs.get('queries', None) + + +class WorkflowTriggerFilter(Model): + """The workflow trigger filter. + + :param state: The state of workflow trigger. Possible values include: + 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + :type state: str or ~azure.mgmt.logic.models.WorkflowState + """ + + _attribute_map = { + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WorkflowTriggerFilter, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + + +class WorkflowTriggerHistory(SubResource): + """The workflow trigger history. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar start_time: Gets the start time. + :vartype start_time: datetime + :ivar end_time: Gets the end time. + :vartype end_time: datetime + :ivar status: Gets the status. Possible values include: 'NotSpecified', + 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', + 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' + :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus + :ivar code: Gets the code. + :vartype code: str + :ivar error: Gets the error. + :vartype error: object + :ivar tracking_id: Gets the tracking id. + :vartype tracking_id: str + :param correlation: The run correlation. + :type correlation: ~azure.mgmt.logic.models.Correlation + :ivar inputs_link: Gets the link to input parameters. + :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar outputs_link: Gets the link to output parameters. + :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar fired: Gets a value indicating whether trigger was fired. + :vartype fired: bool + :ivar run: Gets the reference to workflow run. + :vartype run: ~azure.mgmt.logic.models.ResourceReference + :ivar name: Gets the workflow trigger history name. + :vartype name: str + :ivar type: Gets the workflow trigger history type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'status': {'readonly': True}, + 'code': {'readonly': True}, + 'error': {'readonly': True}, + 'tracking_id': {'readonly': True}, + 'inputs_link': {'readonly': True}, + 'outputs_link': {'readonly': True}, + 'fired': {'readonly': True}, + 'run': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'code': {'key': 'properties.code', 'type': 'str'}, + 'error': {'key': 'properties.error', 'type': 'object'}, + 'tracking_id': {'key': 'properties.trackingId', 'type': 'str'}, + 'correlation': {'key': 'properties.correlation', 'type': 'Correlation'}, + 'inputs_link': {'key': 'properties.inputsLink', 'type': 'ContentLink'}, + 'outputs_link': {'key': 'properties.outputsLink', 'type': 'ContentLink'}, + 'fired': {'key': 'properties.fired', 'type': 'bool'}, + 'run': {'key': 'properties.run', 'type': 'ResourceReference'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WorkflowTriggerHistory, self).__init__(**kwargs) + self.start_time = None + self.end_time = None + self.status = None + self.code = None + self.error = None + self.tracking_id = None + self.correlation = kwargs.get('correlation', None) + self.inputs_link = None + self.outputs_link = None + self.fired = None + self.run = None + self.name = None + self.type = None + + +class WorkflowTriggerHistoryFilter(Model): + """The workflow trigger history filter. + + :param status: The status of workflow trigger history. Possible values + include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', + 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', + 'Aborted', 'Ignored' + :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WorkflowTriggerHistoryFilter, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + + +class WorkflowTriggerListCallbackUrlQueries(Model): + """Gets the workflow trigger callback URL query parameters. + + :param api_version: The api version. + :type api_version: str + :param sp: The SAS permissions. + :type sp: str + :param sv: The SAS version. + :type sv: str + :param sig: The SAS signature. + :type sig: str + :param se: The SAS timestamp. + :type se: str + """ + + _attribute_map = { + 'api_version': {'key': 'api-version', 'type': 'str'}, + 'sp': {'key': 'sp', 'type': 'str'}, + 'sv': {'key': 'sv', 'type': 'str'}, + 'sig': {'key': 'sig', 'type': 'str'}, + 'se': {'key': 'se', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WorkflowTriggerListCallbackUrlQueries, self).__init__(**kwargs) + self.api_version = kwargs.get('api_version', None) + self.sp = kwargs.get('sp', None) + self.sv = kwargs.get('sv', None) + self.sig = kwargs.get('sig', None) + self.se = kwargs.get('se', None) + + +class WorkflowTriggerRecurrence(Model): + """The workflow trigger recurrence. + + :param frequency: The frequency. Possible values include: 'NotSpecified', + 'Second', 'Minute', 'Hour', 'Day', 'Week', 'Month', 'Year' + :type frequency: str or ~azure.mgmt.logic.models.RecurrenceFrequency + :param interval: The interval. + :type interval: int + :param start_time: The start time. + :type start_time: str + :param end_time: The end time. + :type end_time: str + :param time_zone: The time zone. + :type time_zone: str + :param schedule: The recurrence schedule. + :type schedule: ~azure.mgmt.logic.models.RecurrenceSchedule + """ + + _attribute_map = { + 'frequency': {'key': 'frequency', 'type': 'str'}, + 'interval': {'key': 'interval', 'type': 'int'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'schedule': {'key': 'schedule', 'type': 'RecurrenceSchedule'}, + } + + def __init__(self, **kwargs): + super(WorkflowTriggerRecurrence, self).__init__(**kwargs) + self.frequency = kwargs.get('frequency', None) + self.interval = kwargs.get('interval', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.time_zone = kwargs.get('time_zone', None) + self.schedule = kwargs.get('schedule', None) + + +class WorkflowVersion(Resource): + """The workflow version. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :ivar created_time: Gets the created time. + :vartype created_time: datetime + :ivar changed_time: Gets the changed time. + :vartype changed_time: datetime + :param state: The state. Possible values include: 'NotSpecified', + 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + :type state: str or ~azure.mgmt.logic.models.WorkflowState + :ivar version: Gets the version. + :vartype version: str + :ivar access_endpoint: Gets the access endpoint. + :vartype access_endpoint: str + :param sku: The sku. + :type sku: ~azure.mgmt.logic.models.Sku + :param integration_account: The integration account. + :type integration_account: ~azure.mgmt.logic.models.ResourceReference + :param definition: The definition. + :type definition: object + :param parameters: The parameters. + :type parameters: dict[str, ~azure.mgmt.logic.models.WorkflowParameter] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'version': {'readonly': True}, + 'access_endpoint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'access_endpoint': {'key': 'properties.accessEndpoint', 'type': 'str'}, + 'sku': {'key': 'properties.sku', 'type': 'Sku'}, + 'integration_account': {'key': 'properties.integrationAccount', 'type': 'ResourceReference'}, + 'definition': {'key': 'properties.definition', 'type': 'object'}, + 'parameters': {'key': 'properties.parameters', 'type': '{WorkflowParameter}'}, + } + + def __init__(self, **kwargs): + super(WorkflowVersion, self).__init__(**kwargs) + self.created_time = None + self.changed_time = None + self.state = kwargs.get('state', None) + self.version = None + self.access_endpoint = None + self.sku = kwargs.get('sku', None) + self.integration_account = kwargs.get('integration_account', None) + self.definition = kwargs.get('definition', None) + self.parameters = kwargs.get('parameters', None) + + +class X12AcknowledgementSettings(Model): + """The X12 agreement acknowledgement settings. + + All required parameters must be populated in order to send to Azure. + + :param need_technical_acknowledgement: Required. The value indicating + whether technical acknowledgement is needed. + :type need_technical_acknowledgement: bool + :param batch_technical_acknowledgements: Required. The value indicating + whether to batch the technical acknowledgements. + :type batch_technical_acknowledgements: bool + :param need_functional_acknowledgement: Required. The value indicating + whether functional acknowledgement is needed. + :type need_functional_acknowledgement: bool + :param functional_acknowledgement_version: The functional acknowledgement + version. + :type functional_acknowledgement_version: str + :param batch_functional_acknowledgements: Required. The value indicating + whether to batch functional acknowledgements. + :type batch_functional_acknowledgements: bool + :param need_implementation_acknowledgement: Required. The value indicating + whether implementation acknowledgement is needed. + :type need_implementation_acknowledgement: bool + :param implementation_acknowledgement_version: The implementation + acknowledgement version. + :type implementation_acknowledgement_version: str + :param batch_implementation_acknowledgements: Required. The value + indicating whether to batch implementation acknowledgements. + :type batch_implementation_acknowledgements: bool + :param need_loop_for_valid_messages: Required. The value indicating + whether a loop is needed for valid messages. + :type need_loop_for_valid_messages: bool + :param send_synchronous_acknowledgement: Required. The value indicating + whether to send synchronous acknowledgement. + :type send_synchronous_acknowledgement: bool + :param acknowledgement_control_number_prefix: The acknowledgement control + number prefix. + :type acknowledgement_control_number_prefix: str + :param acknowledgement_control_number_suffix: The acknowledgement control + number suffix. + :type acknowledgement_control_number_suffix: str + :param acknowledgement_control_number_lower_bound: Required. The + acknowledgement control number lower bound. + :type acknowledgement_control_number_lower_bound: int + :param acknowledgement_control_number_upper_bound: Required. The + acknowledgement control number upper bound. + :type acknowledgement_control_number_upper_bound: int + :param rollover_acknowledgement_control_number: Required. The value + indicating whether to rollover acknowledgement control number. + :type rollover_acknowledgement_control_number: bool + """ + + _validation = { + 'need_technical_acknowledgement': {'required': True}, + 'batch_technical_acknowledgements': {'required': True}, + 'need_functional_acknowledgement': {'required': True}, + 'batch_functional_acknowledgements': {'required': True}, + 'need_implementation_acknowledgement': {'required': True}, + 'batch_implementation_acknowledgements': {'required': True}, + 'need_loop_for_valid_messages': {'required': True}, + 'send_synchronous_acknowledgement': {'required': True}, + 'acknowledgement_control_number_lower_bound': {'required': True}, + 'acknowledgement_control_number_upper_bound': {'required': True}, + 'rollover_acknowledgement_control_number': {'required': True}, + } + + _attribute_map = { + 'need_technical_acknowledgement': {'key': 'needTechnicalAcknowledgement', 'type': 'bool'}, + 'batch_technical_acknowledgements': {'key': 'batchTechnicalAcknowledgements', 'type': 'bool'}, + 'need_functional_acknowledgement': {'key': 'needFunctionalAcknowledgement', 'type': 'bool'}, + 'functional_acknowledgement_version': {'key': 'functionalAcknowledgementVersion', 'type': 'str'}, + 'batch_functional_acknowledgements': {'key': 'batchFunctionalAcknowledgements', 'type': 'bool'}, + 'need_implementation_acknowledgement': {'key': 'needImplementationAcknowledgement', 'type': 'bool'}, + 'implementation_acknowledgement_version': {'key': 'implementationAcknowledgementVersion', 'type': 'str'}, + 'batch_implementation_acknowledgements': {'key': 'batchImplementationAcknowledgements', 'type': 'bool'}, + 'need_loop_for_valid_messages': {'key': 'needLoopForValidMessages', 'type': 'bool'}, + 'send_synchronous_acknowledgement': {'key': 'sendSynchronousAcknowledgement', 'type': 'bool'}, + 'acknowledgement_control_number_prefix': {'key': 'acknowledgementControlNumberPrefix', 'type': 'str'}, + 'acknowledgement_control_number_suffix': {'key': 'acknowledgementControlNumberSuffix', 'type': 'str'}, + 'acknowledgement_control_number_lower_bound': {'key': 'acknowledgementControlNumberLowerBound', 'type': 'int'}, + 'acknowledgement_control_number_upper_bound': {'key': 'acknowledgementControlNumberUpperBound', 'type': 'int'}, + 'rollover_acknowledgement_control_number': {'key': 'rolloverAcknowledgementControlNumber', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(X12AcknowledgementSettings, self).__init__(**kwargs) + self.need_technical_acknowledgement = kwargs.get('need_technical_acknowledgement', None) + self.batch_technical_acknowledgements = kwargs.get('batch_technical_acknowledgements', None) + self.need_functional_acknowledgement = kwargs.get('need_functional_acknowledgement', None) + self.functional_acknowledgement_version = kwargs.get('functional_acknowledgement_version', None) + self.batch_functional_acknowledgements = kwargs.get('batch_functional_acknowledgements', None) + self.need_implementation_acknowledgement = kwargs.get('need_implementation_acknowledgement', None) + self.implementation_acknowledgement_version = kwargs.get('implementation_acknowledgement_version', None) + self.batch_implementation_acknowledgements = kwargs.get('batch_implementation_acknowledgements', None) + self.need_loop_for_valid_messages = kwargs.get('need_loop_for_valid_messages', None) + self.send_synchronous_acknowledgement = kwargs.get('send_synchronous_acknowledgement', None) + self.acknowledgement_control_number_prefix = kwargs.get('acknowledgement_control_number_prefix', None) + self.acknowledgement_control_number_suffix = kwargs.get('acknowledgement_control_number_suffix', None) + self.acknowledgement_control_number_lower_bound = kwargs.get('acknowledgement_control_number_lower_bound', None) + self.acknowledgement_control_number_upper_bound = kwargs.get('acknowledgement_control_number_upper_bound', None) + self.rollover_acknowledgement_control_number = kwargs.get('rollover_acknowledgement_control_number', None) + + +class X12AgreementContent(Model): + """The X12 agreement content. + + All required parameters must be populated in order to send to Azure. + + :param receive_agreement: Required. The X12 one-way receive agreement. + :type receive_agreement: ~azure.mgmt.logic.models.X12OneWayAgreement + :param send_agreement: Required. The X12 one-way send agreement. + :type send_agreement: ~azure.mgmt.logic.models.X12OneWayAgreement + """ + + _validation = { + 'receive_agreement': {'required': True}, + 'send_agreement': {'required': True}, + } + + _attribute_map = { + 'receive_agreement': {'key': 'receiveAgreement', 'type': 'X12OneWayAgreement'}, + 'send_agreement': {'key': 'sendAgreement', 'type': 'X12OneWayAgreement'}, + } + + def __init__(self, **kwargs): + super(X12AgreementContent, self).__init__(**kwargs) + self.receive_agreement = kwargs.get('receive_agreement', None) + self.send_agreement = kwargs.get('send_agreement', None) + + +class X12DelimiterOverrides(Model): + """The X12 delimiter override settings. + + All required parameters must be populated in order to send to Azure. + + :param protocol_version: The protocol version. + :type protocol_version: str + :param message_id: The message id. + :type message_id: str + :param data_element_separator: Required. The data element separator. + :type data_element_separator: int + :param component_separator: Required. The component separator. + :type component_separator: int + :param segment_terminator: Required. The segment terminator. + :type segment_terminator: int + :param segment_terminator_suffix: Required. The segment terminator suffix. + Possible values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' + :type segment_terminator_suffix: str or + ~azure.mgmt.logic.models.SegmentTerminatorSuffix + :param replace_character: Required. The replacement character. + :type replace_character: int + :param replace_separators_in_payload: Required. The value indicating + whether to replace separators in payload. + :type replace_separators_in_payload: bool + :param target_namespace: The target namespace on which this delimiter + settings has to be applied. + :type target_namespace: str + """ + + _validation = { + 'data_element_separator': {'required': True}, + 'component_separator': {'required': True}, + 'segment_terminator': {'required': True}, + 'segment_terminator_suffix': {'required': True}, + 'replace_character': {'required': True}, + 'replace_separators_in_payload': {'required': True}, + } + + _attribute_map = { + 'protocol_version': {'key': 'protocolVersion', 'type': 'str'}, + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'data_element_separator': {'key': 'dataElementSeparator', 'type': 'int'}, + 'component_separator': {'key': 'componentSeparator', 'type': 'int'}, + 'segment_terminator': {'key': 'segmentTerminator', 'type': 'int'}, + 'segment_terminator_suffix': {'key': 'segmentTerminatorSuffix', 'type': 'SegmentTerminatorSuffix'}, + 'replace_character': {'key': 'replaceCharacter', 'type': 'int'}, + 'replace_separators_in_payload': {'key': 'replaceSeparatorsInPayload', 'type': 'bool'}, + 'target_namespace': {'key': 'targetNamespace', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(X12DelimiterOverrides, self).__init__(**kwargs) + self.protocol_version = kwargs.get('protocol_version', None) + self.message_id = kwargs.get('message_id', None) + self.data_element_separator = kwargs.get('data_element_separator', None) + self.component_separator = kwargs.get('component_separator', None) + self.segment_terminator = kwargs.get('segment_terminator', None) + self.segment_terminator_suffix = kwargs.get('segment_terminator_suffix', None) + self.replace_character = kwargs.get('replace_character', None) + self.replace_separators_in_payload = kwargs.get('replace_separators_in_payload', None) + self.target_namespace = kwargs.get('target_namespace', None) + + +class X12EnvelopeOverride(Model): + """The X12 envelope override settings. + + All required parameters must be populated in order to send to Azure. + + :param target_namespace: Required. The target namespace on which this + envelope settings has to be applied. + :type target_namespace: str + :param protocol_version: Required. The protocol version on which this + envelope settings has to be applied. + :type protocol_version: str + :param message_id: Required. The message id on which this envelope + settings has to be applied. + :type message_id: str + :param responsible_agency_code: Required. The responsible agency code. + :type responsible_agency_code: str + :param header_version: Required. The header version. + :type header_version: str + :param sender_application_id: Required. The sender application id. + :type sender_application_id: str + :param receiver_application_id: Required. The receiver application id. + :type receiver_application_id: str + :param functional_identifier_code: The functional identifier code. + :type functional_identifier_code: str + :param date_format: Required. The date format. Possible values include: + 'NotSpecified', 'CCYYMMDD', 'YYMMDD' + :type date_format: str or ~azure.mgmt.logic.models.X12DateFormat + :param time_format: Required. The time format. Possible values include: + 'NotSpecified', 'HHMM', 'HHMMSS', 'HHMMSSdd', 'HHMMSSd' + :type time_format: str or ~azure.mgmt.logic.models.X12TimeFormat + """ + + _validation = { + 'target_namespace': {'required': True}, + 'protocol_version': {'required': True}, + 'message_id': {'required': True}, + 'responsible_agency_code': {'required': True}, + 'header_version': {'required': True}, + 'sender_application_id': {'required': True}, + 'receiver_application_id': {'required': True}, + 'date_format': {'required': True}, + 'time_format': {'required': True}, + } + + _attribute_map = { + 'target_namespace': {'key': 'targetNamespace', 'type': 'str'}, + 'protocol_version': {'key': 'protocolVersion', 'type': 'str'}, + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'responsible_agency_code': {'key': 'responsibleAgencyCode', 'type': 'str'}, + 'header_version': {'key': 'headerVersion', 'type': 'str'}, + 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, + 'receiver_application_id': {'key': 'receiverApplicationId', 'type': 'str'}, + 'functional_identifier_code': {'key': 'functionalIdentifierCode', 'type': 'str'}, + 'date_format': {'key': 'dateFormat', 'type': 'str'}, + 'time_format': {'key': 'timeFormat', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(X12EnvelopeOverride, self).__init__(**kwargs) + self.target_namespace = kwargs.get('target_namespace', None) + self.protocol_version = kwargs.get('protocol_version', None) + self.message_id = kwargs.get('message_id', None) + self.responsible_agency_code = kwargs.get('responsible_agency_code', None) + self.header_version = kwargs.get('header_version', None) + self.sender_application_id = kwargs.get('sender_application_id', None) + self.receiver_application_id = kwargs.get('receiver_application_id', None) + self.functional_identifier_code = kwargs.get('functional_identifier_code', None) + self.date_format = kwargs.get('date_format', None) + self.time_format = kwargs.get('time_format', None) + + +class X12EnvelopeSettings(Model): + """The X12 agreement envelope settings. + + All required parameters must be populated in order to send to Azure. + + :param control_standards_id: Required. The controls standards id. + :type control_standards_id: int + :param use_control_standards_id_as_repetition_character: Required. The + value indicating whether to use control standards id as repetition + character. + :type use_control_standards_id_as_repetition_character: bool + :param sender_application_id: Required. The sender application id. + :type sender_application_id: str + :param receiver_application_id: Required. The receiver application id. + :type receiver_application_id: str + :param control_version_number: Required. The control version number. + :type control_version_number: str + :param interchange_control_number_lower_bound: Required. The interchange + control number lower bound. + :type interchange_control_number_lower_bound: int + :param interchange_control_number_upper_bound: Required. The interchange + control number upper bound. + :type interchange_control_number_upper_bound: int + :param rollover_interchange_control_number: Required. The value indicating + whether to rollover interchange control number. + :type rollover_interchange_control_number: bool + :param enable_default_group_headers: Required. The value indicating + whether to enable default group headers. + :type enable_default_group_headers: bool + :param functional_group_id: The functional group id. + :type functional_group_id: str + :param group_control_number_lower_bound: Required. The group control + number lower bound. + :type group_control_number_lower_bound: int + :param group_control_number_upper_bound: Required. The group control + number upper bound. + :type group_control_number_upper_bound: int + :param rollover_group_control_number: Required. The value indicating + whether to rollover group control number. + :type rollover_group_control_number: bool + :param group_header_agency_code: Required. The group header agency code. + :type group_header_agency_code: str + :param group_header_version: Required. The group header version. + :type group_header_version: str + :param transaction_set_control_number_lower_bound: Required. The + transaction set control number lower bound. + :type transaction_set_control_number_lower_bound: int + :param transaction_set_control_number_upper_bound: Required. The + transaction set control number upper bound. + :type transaction_set_control_number_upper_bound: int + :param rollover_transaction_set_control_number: Required. The value + indicating whether to rollover transaction set control number. + :type rollover_transaction_set_control_number: bool + :param transaction_set_control_number_prefix: The transaction set control + number prefix. + :type transaction_set_control_number_prefix: str + :param transaction_set_control_number_suffix: The transaction set control + number suffix. + :type transaction_set_control_number_suffix: str + :param overwrite_existing_transaction_set_control_number: Required. The + value indicating whether to overwrite existing transaction set control + number. + :type overwrite_existing_transaction_set_control_number: bool + :param group_header_date_format: Required. The group header date format. + Possible values include: 'NotSpecified', 'CCYYMMDD', 'YYMMDD' + :type group_header_date_format: str or + ~azure.mgmt.logic.models.X12DateFormat + :param group_header_time_format: Required. The group header time format. + Possible values include: 'NotSpecified', 'HHMM', 'HHMMSS', 'HHMMSSdd', + 'HHMMSSd' + :type group_header_time_format: str or + ~azure.mgmt.logic.models.X12TimeFormat + :param usage_indicator: Required. The usage indicator. Possible values + include: 'NotSpecified', 'Test', 'Information', 'Production' + :type usage_indicator: str or ~azure.mgmt.logic.models.UsageIndicator + """ + + _validation = { + 'control_standards_id': {'required': True}, + 'use_control_standards_id_as_repetition_character': {'required': True}, + 'sender_application_id': {'required': True}, + 'receiver_application_id': {'required': True}, + 'control_version_number': {'required': True}, + 'interchange_control_number_lower_bound': {'required': True}, + 'interchange_control_number_upper_bound': {'required': True}, + 'rollover_interchange_control_number': {'required': True}, + 'enable_default_group_headers': {'required': True}, + 'group_control_number_lower_bound': {'required': True}, + 'group_control_number_upper_bound': {'required': True}, + 'rollover_group_control_number': {'required': True}, + 'group_header_agency_code': {'required': True}, + 'group_header_version': {'required': True}, + 'transaction_set_control_number_lower_bound': {'required': True}, + 'transaction_set_control_number_upper_bound': {'required': True}, + 'rollover_transaction_set_control_number': {'required': True}, + 'overwrite_existing_transaction_set_control_number': {'required': True}, + 'group_header_date_format': {'required': True}, + 'group_header_time_format': {'required': True}, + 'usage_indicator': {'required': True}, + } + + _attribute_map = { + 'control_standards_id': {'key': 'controlStandardsId', 'type': 'int'}, + 'use_control_standards_id_as_repetition_character': {'key': 'useControlStandardsIdAsRepetitionCharacter', 'type': 'bool'}, + 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, + 'receiver_application_id': {'key': 'receiverApplicationId', 'type': 'str'}, + 'control_version_number': {'key': 'controlVersionNumber', 'type': 'str'}, + 'interchange_control_number_lower_bound': {'key': 'interchangeControlNumberLowerBound', 'type': 'int'}, + 'interchange_control_number_upper_bound': {'key': 'interchangeControlNumberUpperBound', 'type': 'int'}, + 'rollover_interchange_control_number': {'key': 'rolloverInterchangeControlNumber', 'type': 'bool'}, + 'enable_default_group_headers': {'key': 'enableDefaultGroupHeaders', 'type': 'bool'}, + 'functional_group_id': {'key': 'functionalGroupId', 'type': 'str'}, + 'group_control_number_lower_bound': {'key': 'groupControlNumberLowerBound', 'type': 'int'}, + 'group_control_number_upper_bound': {'key': 'groupControlNumberUpperBound', 'type': 'int'}, + 'rollover_group_control_number': {'key': 'rolloverGroupControlNumber', 'type': 'bool'}, + 'group_header_agency_code': {'key': 'groupHeaderAgencyCode', 'type': 'str'}, + 'group_header_version': {'key': 'groupHeaderVersion', 'type': 'str'}, + 'transaction_set_control_number_lower_bound': {'key': 'transactionSetControlNumberLowerBound', 'type': 'int'}, + 'transaction_set_control_number_upper_bound': {'key': 'transactionSetControlNumberUpperBound', 'type': 'int'}, + 'rollover_transaction_set_control_number': {'key': 'rolloverTransactionSetControlNumber', 'type': 'bool'}, + 'transaction_set_control_number_prefix': {'key': 'transactionSetControlNumberPrefix', 'type': 'str'}, + 'transaction_set_control_number_suffix': {'key': 'transactionSetControlNumberSuffix', 'type': 'str'}, + 'overwrite_existing_transaction_set_control_number': {'key': 'overwriteExistingTransactionSetControlNumber', 'type': 'bool'}, + 'group_header_date_format': {'key': 'groupHeaderDateFormat', 'type': 'str'}, + 'group_header_time_format': {'key': 'groupHeaderTimeFormat', 'type': 'str'}, + 'usage_indicator': {'key': 'usageIndicator', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(X12EnvelopeSettings, self).__init__(**kwargs) + self.control_standards_id = kwargs.get('control_standards_id', None) + self.use_control_standards_id_as_repetition_character = kwargs.get('use_control_standards_id_as_repetition_character', None) + self.sender_application_id = kwargs.get('sender_application_id', None) + self.receiver_application_id = kwargs.get('receiver_application_id', None) + self.control_version_number = kwargs.get('control_version_number', None) + self.interchange_control_number_lower_bound = kwargs.get('interchange_control_number_lower_bound', None) + self.interchange_control_number_upper_bound = kwargs.get('interchange_control_number_upper_bound', None) + self.rollover_interchange_control_number = kwargs.get('rollover_interchange_control_number', None) + self.enable_default_group_headers = kwargs.get('enable_default_group_headers', None) + self.functional_group_id = kwargs.get('functional_group_id', None) + self.group_control_number_lower_bound = kwargs.get('group_control_number_lower_bound', None) + self.group_control_number_upper_bound = kwargs.get('group_control_number_upper_bound', None) + self.rollover_group_control_number = kwargs.get('rollover_group_control_number', None) + self.group_header_agency_code = kwargs.get('group_header_agency_code', None) + self.group_header_version = kwargs.get('group_header_version', None) + self.transaction_set_control_number_lower_bound = kwargs.get('transaction_set_control_number_lower_bound', None) + self.transaction_set_control_number_upper_bound = kwargs.get('transaction_set_control_number_upper_bound', None) + self.rollover_transaction_set_control_number = kwargs.get('rollover_transaction_set_control_number', None) + self.transaction_set_control_number_prefix = kwargs.get('transaction_set_control_number_prefix', None) + self.transaction_set_control_number_suffix = kwargs.get('transaction_set_control_number_suffix', None) + self.overwrite_existing_transaction_set_control_number = kwargs.get('overwrite_existing_transaction_set_control_number', None) + self.group_header_date_format = kwargs.get('group_header_date_format', None) + self.group_header_time_format = kwargs.get('group_header_time_format', None) + self.usage_indicator = kwargs.get('usage_indicator', None) + + +class X12FramingSettings(Model): + """The X12 agreement framing settings. + + All required parameters must be populated in order to send to Azure. + + :param data_element_separator: Required. The data element separator. + :type data_element_separator: int + :param component_separator: Required. The component separator. + :type component_separator: int + :param replace_separators_in_payload: Required. The value indicating + whether to replace separators in payload. + :type replace_separators_in_payload: bool + :param replace_character: Required. The replacement character. + :type replace_character: int + :param segment_terminator: Required. The segment terminator. + :type segment_terminator: int + :param character_set: Required. The X12 character set. Possible values + include: 'NotSpecified', 'Basic', 'Extended', 'UTF8' + :type character_set: str or ~azure.mgmt.logic.models.X12CharacterSet + :param segment_terminator_suffix: Required. The segment terminator suffix. + Possible values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' + :type segment_terminator_suffix: str or + ~azure.mgmt.logic.models.SegmentTerminatorSuffix + """ + + _validation = { + 'data_element_separator': {'required': True}, + 'component_separator': {'required': True}, + 'replace_separators_in_payload': {'required': True}, + 'replace_character': {'required': True}, + 'segment_terminator': {'required': True}, + 'character_set': {'required': True}, + 'segment_terminator_suffix': {'required': True}, + } + + _attribute_map = { + 'data_element_separator': {'key': 'dataElementSeparator', 'type': 'int'}, + 'component_separator': {'key': 'componentSeparator', 'type': 'int'}, + 'replace_separators_in_payload': {'key': 'replaceSeparatorsInPayload', 'type': 'bool'}, + 'replace_character': {'key': 'replaceCharacter', 'type': 'int'}, + 'segment_terminator': {'key': 'segmentTerminator', 'type': 'int'}, + 'character_set': {'key': 'characterSet', 'type': 'str'}, + 'segment_terminator_suffix': {'key': 'segmentTerminatorSuffix', 'type': 'SegmentTerminatorSuffix'}, + } + + def __init__(self, **kwargs): + super(X12FramingSettings, self).__init__(**kwargs) + self.data_element_separator = kwargs.get('data_element_separator', None) + self.component_separator = kwargs.get('component_separator', None) + self.replace_separators_in_payload = kwargs.get('replace_separators_in_payload', None) + self.replace_character = kwargs.get('replace_character', None) + self.segment_terminator = kwargs.get('segment_terminator', None) + self.character_set = kwargs.get('character_set', None) + self.segment_terminator_suffix = kwargs.get('segment_terminator_suffix', None) + + +class X12MessageFilter(Model): + """The X12 message filter for odata query. + + All required parameters must be populated in order to send to Azure. + + :param message_filter_type: Required. The message filter type. Possible + values include: 'NotSpecified', 'Include', 'Exclude' + :type message_filter_type: str or + ~azure.mgmt.logic.models.MessageFilterType + """ + + _validation = { + 'message_filter_type': {'required': True}, + } + + _attribute_map = { + 'message_filter_type': {'key': 'messageFilterType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(X12MessageFilter, self).__init__(**kwargs) + self.message_filter_type = kwargs.get('message_filter_type', None) + + +class X12MessageIdentifier(Model): + """The X12 message identifier. + + All required parameters must be populated in order to send to Azure. + + :param message_id: Required. The message id. + :type message_id: str + """ + + _validation = { + 'message_id': {'required': True}, + } + + _attribute_map = { + 'message_id': {'key': 'messageId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(X12MessageIdentifier, self).__init__(**kwargs) + self.message_id = kwargs.get('message_id', None) + + +class X12OneWayAgreement(Model): + """The X12 one-way agreement. + + All required parameters must be populated in order to send to Azure. + + :param sender_business_identity: Required. The sender business identity + :type sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :param receiver_business_identity: Required. The receiver business + identity + :type receiver_business_identity: + ~azure.mgmt.logic.models.BusinessIdentity + :param protocol_settings: Required. The X12 protocol settings. + :type protocol_settings: ~azure.mgmt.logic.models.X12ProtocolSettings + """ + + _validation = { + 'sender_business_identity': {'required': True}, + 'receiver_business_identity': {'required': True}, + 'protocol_settings': {'required': True}, + } + + _attribute_map = { + 'sender_business_identity': {'key': 'senderBusinessIdentity', 'type': 'BusinessIdentity'}, + 'receiver_business_identity': {'key': 'receiverBusinessIdentity', 'type': 'BusinessIdentity'}, + 'protocol_settings': {'key': 'protocolSettings', 'type': 'X12ProtocolSettings'}, + } + + def __init__(self, **kwargs): + super(X12OneWayAgreement, self).__init__(**kwargs) + self.sender_business_identity = kwargs.get('sender_business_identity', None) + self.receiver_business_identity = kwargs.get('receiver_business_identity', None) + self.protocol_settings = kwargs.get('protocol_settings', None) + + +class X12ProcessingSettings(Model): + """The X12 processing settings. + + All required parameters must be populated in order to send to Azure. + + :param mask_security_info: Required. The value indicating whether to mask + security information. + :type mask_security_info: bool + :param convert_implied_decimal: Required. The value indicating whether to + convert numerical type to implied decimal. + :type convert_implied_decimal: bool + :param preserve_interchange: Required. The value indicating whether to + preserve interchange. + :type preserve_interchange: bool + :param suspend_interchange_on_error: Required. The value indicating + whether to suspend interchange on error. + :type suspend_interchange_on_error: bool + :param create_empty_xml_tags_for_trailing_separators: Required. The value + indicating whether to create empty xml tags for trailing separators. + :type create_empty_xml_tags_for_trailing_separators: bool + :param use_dot_as_decimal_separator: Required. The value indicating + whether to use dot as decimal separator. + :type use_dot_as_decimal_separator: bool + """ + + _validation = { + 'mask_security_info': {'required': True}, + 'convert_implied_decimal': {'required': True}, + 'preserve_interchange': {'required': True}, + 'suspend_interchange_on_error': {'required': True}, + 'create_empty_xml_tags_for_trailing_separators': {'required': True}, + 'use_dot_as_decimal_separator': {'required': True}, + } + + _attribute_map = { + 'mask_security_info': {'key': 'maskSecurityInfo', 'type': 'bool'}, + 'convert_implied_decimal': {'key': 'convertImpliedDecimal', 'type': 'bool'}, + 'preserve_interchange': {'key': 'preserveInterchange', 'type': 'bool'}, + 'suspend_interchange_on_error': {'key': 'suspendInterchangeOnError', 'type': 'bool'}, + 'create_empty_xml_tags_for_trailing_separators': {'key': 'createEmptyXmlTagsForTrailingSeparators', 'type': 'bool'}, + 'use_dot_as_decimal_separator': {'key': 'useDotAsDecimalSeparator', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(X12ProcessingSettings, self).__init__(**kwargs) + self.mask_security_info = kwargs.get('mask_security_info', None) + self.convert_implied_decimal = kwargs.get('convert_implied_decimal', None) + self.preserve_interchange = kwargs.get('preserve_interchange', None) + self.suspend_interchange_on_error = kwargs.get('suspend_interchange_on_error', None) + self.create_empty_xml_tags_for_trailing_separators = kwargs.get('create_empty_xml_tags_for_trailing_separators', None) + self.use_dot_as_decimal_separator = kwargs.get('use_dot_as_decimal_separator', None) + + +class X12ProtocolSettings(Model): + """The X12 agreement protocol settings. + + All required parameters must be populated in order to send to Azure. + + :param validation_settings: Required. The X12 validation settings. + :type validation_settings: ~azure.mgmt.logic.models.X12ValidationSettings + :param framing_settings: Required. The X12 framing settings. + :type framing_settings: ~azure.mgmt.logic.models.X12FramingSettings + :param envelope_settings: Required. The X12 envelope settings. + :type envelope_settings: ~azure.mgmt.logic.models.X12EnvelopeSettings + :param acknowledgement_settings: Required. The X12 acknowledgment + settings. + :type acknowledgement_settings: + ~azure.mgmt.logic.models.X12AcknowledgementSettings + :param message_filter: Required. The X12 message filter. + :type message_filter: ~azure.mgmt.logic.models.X12MessageFilter + :param security_settings: Required. The X12 security settings. + :type security_settings: ~azure.mgmt.logic.models.X12SecuritySettings + :param processing_settings: Required. The X12 processing settings. + :type processing_settings: ~azure.mgmt.logic.models.X12ProcessingSettings + :param envelope_overrides: The X12 envelope override settings. + :type envelope_overrides: + list[~azure.mgmt.logic.models.X12EnvelopeOverride] + :param validation_overrides: The X12 validation override settings. + :type validation_overrides: + list[~azure.mgmt.logic.models.X12ValidationOverride] + :param message_filter_list: The X12 message filter list. + :type message_filter_list: + list[~azure.mgmt.logic.models.X12MessageIdentifier] + :param schema_references: Required. The X12 schema references. + :type schema_references: list[~azure.mgmt.logic.models.X12SchemaReference] + :param x12_delimiter_overrides: The X12 delimiter override settings. + :type x12_delimiter_overrides: + list[~azure.mgmt.logic.models.X12DelimiterOverrides] + """ + + _validation = { + 'validation_settings': {'required': True}, + 'framing_settings': {'required': True}, + 'envelope_settings': {'required': True}, + 'acknowledgement_settings': {'required': True}, + 'message_filter': {'required': True}, + 'security_settings': {'required': True}, + 'processing_settings': {'required': True}, + 'schema_references': {'required': True}, + } + + _attribute_map = { + 'validation_settings': {'key': 'validationSettings', 'type': 'X12ValidationSettings'}, + 'framing_settings': {'key': 'framingSettings', 'type': 'X12FramingSettings'}, + 'envelope_settings': {'key': 'envelopeSettings', 'type': 'X12EnvelopeSettings'}, + 'acknowledgement_settings': {'key': 'acknowledgementSettings', 'type': 'X12AcknowledgementSettings'}, + 'message_filter': {'key': 'messageFilter', 'type': 'X12MessageFilter'}, + 'security_settings': {'key': 'securitySettings', 'type': 'X12SecuritySettings'}, + 'processing_settings': {'key': 'processingSettings', 'type': 'X12ProcessingSettings'}, + 'envelope_overrides': {'key': 'envelopeOverrides', 'type': '[X12EnvelopeOverride]'}, + 'validation_overrides': {'key': 'validationOverrides', 'type': '[X12ValidationOverride]'}, + 'message_filter_list': {'key': 'messageFilterList', 'type': '[X12MessageIdentifier]'}, + 'schema_references': {'key': 'schemaReferences', 'type': '[X12SchemaReference]'}, + 'x12_delimiter_overrides': {'key': 'x12DelimiterOverrides', 'type': '[X12DelimiterOverrides]'}, + } + + def __init__(self, **kwargs): + super(X12ProtocolSettings, self).__init__(**kwargs) + self.validation_settings = kwargs.get('validation_settings', None) + self.framing_settings = kwargs.get('framing_settings', None) + self.envelope_settings = kwargs.get('envelope_settings', None) + self.acknowledgement_settings = kwargs.get('acknowledgement_settings', None) + self.message_filter = kwargs.get('message_filter', None) + self.security_settings = kwargs.get('security_settings', None) + self.processing_settings = kwargs.get('processing_settings', None) + self.envelope_overrides = kwargs.get('envelope_overrides', None) + self.validation_overrides = kwargs.get('validation_overrides', None) + self.message_filter_list = kwargs.get('message_filter_list', None) + self.schema_references = kwargs.get('schema_references', None) + self.x12_delimiter_overrides = kwargs.get('x12_delimiter_overrides', None) + + +class X12SchemaReference(Model): + """The X12 schema reference. + + All required parameters must be populated in order to send to Azure. + + :param message_id: Required. The message id. + :type message_id: str + :param sender_application_id: The sender application id. + :type sender_application_id: str + :param schema_version: Required. The schema version. + :type schema_version: str + :param schema_name: Required. The schema name. + :type schema_name: str + """ + + _validation = { + 'message_id': {'required': True}, + 'schema_version': {'required': True}, + 'schema_name': {'required': True}, + } + + _attribute_map = { + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, + 'schema_version': {'key': 'schemaVersion', 'type': 'str'}, + 'schema_name': {'key': 'schemaName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(X12SchemaReference, self).__init__(**kwargs) + self.message_id = kwargs.get('message_id', None) + self.sender_application_id = kwargs.get('sender_application_id', None) + self.schema_version = kwargs.get('schema_version', None) + self.schema_name = kwargs.get('schema_name', None) + + +class X12SecuritySettings(Model): + """The X12 agreement security settings. + + All required parameters must be populated in order to send to Azure. + + :param authorization_qualifier: Required. The authorization qualifier. + :type authorization_qualifier: str + :param authorization_value: The authorization value. + :type authorization_value: str + :param security_qualifier: Required. The security qualifier. + :type security_qualifier: str + :param password_value: The password value. + :type password_value: str + """ + + _validation = { + 'authorization_qualifier': {'required': True}, + 'security_qualifier': {'required': True}, + } + + _attribute_map = { + 'authorization_qualifier': {'key': 'authorizationQualifier', 'type': 'str'}, + 'authorization_value': {'key': 'authorizationValue', 'type': 'str'}, + 'security_qualifier': {'key': 'securityQualifier', 'type': 'str'}, + 'password_value': {'key': 'passwordValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(X12SecuritySettings, self).__init__(**kwargs) + self.authorization_qualifier = kwargs.get('authorization_qualifier', None) + self.authorization_value = kwargs.get('authorization_value', None) + self.security_qualifier = kwargs.get('security_qualifier', None) + self.password_value = kwargs.get('password_value', None) + + +class X12ValidationOverride(Model): + """The X12 validation override settings. + + All required parameters must be populated in order to send to Azure. + + :param message_id: Required. The message id on which the validation + settings has to be applied. + :type message_id: str + :param validate_edi_types: Required. The value indicating whether to + validate EDI types. + :type validate_edi_types: bool + :param validate_xsd_types: Required. The value indicating whether to + validate XSD types. + :type validate_xsd_types: bool + :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to allow leading and trailing spaces and zeroes. + :type allow_leading_and_trailing_spaces_and_zeroes: bool + :param validate_character_set: Required. The value indicating whether to + validate character Set. + :type validate_character_set: bool + :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to trim leading and trailing spaces and zeroes. + :type trim_leading_and_trailing_spaces_and_zeroes: bool + :param trailing_separator_policy: Required. The trailing separator policy. + Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', + 'Mandatory' + :type trailing_separator_policy: str or + ~azure.mgmt.logic.models.TrailingSeparatorPolicy + """ + + _validation = { + 'message_id': {'required': True}, + 'validate_edi_types': {'required': True}, + 'validate_xsd_types': {'required': True}, + 'allow_leading_and_trailing_spaces_and_zeroes': {'required': True}, + 'validate_character_set': {'required': True}, + 'trim_leading_and_trailing_spaces_and_zeroes': {'required': True}, + 'trailing_separator_policy': {'required': True}, + } + + _attribute_map = { + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'validate_edi_types': {'key': 'validateEDITypes', 'type': 'bool'}, + 'validate_xsd_types': {'key': 'validateXSDTypes', 'type': 'bool'}, + 'allow_leading_and_trailing_spaces_and_zeroes': {'key': 'allowLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, + 'validate_character_set': {'key': 'validateCharacterSet', 'type': 'bool'}, + 'trim_leading_and_trailing_spaces_and_zeroes': {'key': 'trimLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, + 'trailing_separator_policy': {'key': 'trailingSeparatorPolicy', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(X12ValidationOverride, self).__init__(**kwargs) + self.message_id = kwargs.get('message_id', None) + self.validate_edi_types = kwargs.get('validate_edi_types', None) + self.validate_xsd_types = kwargs.get('validate_xsd_types', None) + self.allow_leading_and_trailing_spaces_and_zeroes = kwargs.get('allow_leading_and_trailing_spaces_and_zeroes', None) + self.validate_character_set = kwargs.get('validate_character_set', None) + self.trim_leading_and_trailing_spaces_and_zeroes = kwargs.get('trim_leading_and_trailing_spaces_and_zeroes', None) + self.trailing_separator_policy = kwargs.get('trailing_separator_policy', None) + + +class X12ValidationSettings(Model): + """The X12 agreement validation settings. + + All required parameters must be populated in order to send to Azure. + + :param validate_character_set: Required. The value indicating whether to + validate character set in the message. + :type validate_character_set: bool + :param check_duplicate_interchange_control_number: Required. The value + indicating whether to check for duplicate interchange control number. + :type check_duplicate_interchange_control_number: bool + :param interchange_control_number_validity_days: Required. The validity + period of interchange control number. + :type interchange_control_number_validity_days: int + :param check_duplicate_group_control_number: Required. The value + indicating whether to check for duplicate group control number. + :type check_duplicate_group_control_number: bool + :param check_duplicate_transaction_set_control_number: Required. The value + indicating whether to check for duplicate transaction set control number. + :type check_duplicate_transaction_set_control_number: bool + :param validate_edi_types: Required. The value indicating whether to + Whether to validate EDI types. + :type validate_edi_types: bool + :param validate_xsd_types: Required. The value indicating whether to + Whether to validate XSD types. + :type validate_xsd_types: bool + :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to allow leading and trailing spaces and zeroes. + :type allow_leading_and_trailing_spaces_and_zeroes: bool + :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to trim leading and trailing spaces and zeroes. + :type trim_leading_and_trailing_spaces_and_zeroes: bool + :param trailing_separator_policy: Required. The trailing separator policy. + Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', + 'Mandatory' + :type trailing_separator_policy: str or + ~azure.mgmt.logic.models.TrailingSeparatorPolicy + """ + + _validation = { + 'validate_character_set': {'required': True}, + 'check_duplicate_interchange_control_number': {'required': True}, + 'interchange_control_number_validity_days': {'required': True}, + 'check_duplicate_group_control_number': {'required': True}, + 'check_duplicate_transaction_set_control_number': {'required': True}, + 'validate_edi_types': {'required': True}, + 'validate_xsd_types': {'required': True}, + 'allow_leading_and_trailing_spaces_and_zeroes': {'required': True}, + 'trim_leading_and_trailing_spaces_and_zeroes': {'required': True}, + 'trailing_separator_policy': {'required': True}, + } + + _attribute_map = { + 'validate_character_set': {'key': 'validateCharacterSet', 'type': 'bool'}, + 'check_duplicate_interchange_control_number': {'key': 'checkDuplicateInterchangeControlNumber', 'type': 'bool'}, + 'interchange_control_number_validity_days': {'key': 'interchangeControlNumberValidityDays', 'type': 'int'}, + 'check_duplicate_group_control_number': {'key': 'checkDuplicateGroupControlNumber', 'type': 'bool'}, + 'check_duplicate_transaction_set_control_number': {'key': 'checkDuplicateTransactionSetControlNumber', 'type': 'bool'}, + 'validate_edi_types': {'key': 'validateEDITypes', 'type': 'bool'}, + 'validate_xsd_types': {'key': 'validateXSDTypes', 'type': 'bool'}, + 'allow_leading_and_trailing_spaces_and_zeroes': {'key': 'allowLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, + 'trim_leading_and_trailing_spaces_and_zeroes': {'key': 'trimLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, + 'trailing_separator_policy': {'key': 'trailingSeparatorPolicy', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(X12ValidationSettings, self).__init__(**kwargs) + self.validate_character_set = kwargs.get('validate_character_set', None) + self.check_duplicate_interchange_control_number = kwargs.get('check_duplicate_interchange_control_number', None) + self.interchange_control_number_validity_days = kwargs.get('interchange_control_number_validity_days', None) + self.check_duplicate_group_control_number = kwargs.get('check_duplicate_group_control_number', None) + self.check_duplicate_transaction_set_control_number = kwargs.get('check_duplicate_transaction_set_control_number', None) + self.validate_edi_types = kwargs.get('validate_edi_types', None) + self.validate_xsd_types = kwargs.get('validate_xsd_types', None) + self.allow_leading_and_trailing_spaces_and_zeroes = kwargs.get('allow_leading_and_trailing_spaces_and_zeroes', None) + self.trim_leading_and_trailing_spaces_and_zeroes = kwargs.get('trim_leading_and_trailing_spaces_and_zeroes', None) + self.trailing_separator_policy = kwargs.get('trailing_separator_policy', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/_models_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/_models_py3.py new file mode 100644 index 000000000000..3a03480b4ecb --- /dev/null +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/_models_py3.py @@ -0,0 +1,5486 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AgreementContent(Model): + """The integration account agreement content. + + :param a_s2: The AS2 agreement content. + :type a_s2: ~azure.mgmt.logic.models.AS2AgreementContent + :param x12: The X12 agreement content. + :type x12: ~azure.mgmt.logic.models.X12AgreementContent + :param edifact: The EDIFACT agreement content. + :type edifact: ~azure.mgmt.logic.models.EdifactAgreementContent + """ + + _attribute_map = { + 'a_s2': {'key': 'aS2', 'type': 'AS2AgreementContent'}, + 'x12': {'key': 'x12', 'type': 'X12AgreementContent'}, + 'edifact': {'key': 'edifact', 'type': 'EdifactAgreementContent'}, + } + + def __init__(self, *, a_s2=None, x12=None, edifact=None, **kwargs) -> None: + super(AgreementContent, self).__init__(**kwargs) + self.a_s2 = a_s2 + self.x12 = x12 + self.edifact = edifact + + +class ArtifactProperties(Model): + """The artifact properties definition. + + :param created_time: The artifact creation time. + :type created_time: datetime + :param changed_time: The artifact changed time. + :type changed_time: datetime + :param metadata: + :type metadata: object + """ + + _attribute_map = { + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'metadata', 'type': 'object'}, + } + + def __init__(self, *, created_time=None, changed_time=None, metadata=None, **kwargs) -> None: + super(ArtifactProperties, self).__init__(**kwargs) + self.created_time = created_time + self.changed_time = changed_time + self.metadata = metadata + + +class ArtifactContentPropertiesDefinition(ArtifactProperties): + """The artifact content properties definition. + + :param created_time: The artifact creation time. + :type created_time: datetime + :param changed_time: The artifact changed time. + :type changed_time: datetime + :param metadata: + :type metadata: object + :param content: + :type content: object + :param content_type: The content type. + :type content_type: str + :param content_link: The content link. + :type content_link: ~azure.mgmt.logic.models.ContentLink + """ + + _attribute_map = { + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'metadata', 'type': 'object'}, + 'content': {'key': 'content', 'type': 'object'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'content_link': {'key': 'contentLink', 'type': 'ContentLink'}, + } + + def __init__(self, *, created_time=None, changed_time=None, metadata=None, content=None, content_type: str=None, content_link=None, **kwargs) -> None: + super(ArtifactContentPropertiesDefinition, self).__init__(created_time=created_time, changed_time=changed_time, metadata=metadata, **kwargs) + self.content = content + self.content_type = content_type + self.content_link = content_link + + +class AS2AcknowledgementConnectionSettings(Model): + """The AS2 agreement acknowledgement connection settings. + + All required parameters must be populated in order to send to Azure. + + :param ignore_certificate_name_mismatch: Required. The value indicating + whether to ignore mismatch in certificate name. + :type ignore_certificate_name_mismatch: bool + :param support_http_status_code_continue: Required. The value indicating + whether to support HTTP status code 'CONTINUE'. + :type support_http_status_code_continue: bool + :param keep_http_connection_alive: Required. The value indicating whether + to keep the connection alive. + :type keep_http_connection_alive: bool + :param unfold_http_headers: Required. The value indicating whether to + unfold the HTTP headers. + :type unfold_http_headers: bool + """ + + _validation = { + 'ignore_certificate_name_mismatch': {'required': True}, + 'support_http_status_code_continue': {'required': True}, + 'keep_http_connection_alive': {'required': True}, + 'unfold_http_headers': {'required': True}, + } + + _attribute_map = { + 'ignore_certificate_name_mismatch': {'key': 'ignoreCertificateNameMismatch', 'type': 'bool'}, + 'support_http_status_code_continue': {'key': 'supportHttpStatusCodeContinue', 'type': 'bool'}, + 'keep_http_connection_alive': {'key': 'keepHttpConnectionAlive', 'type': 'bool'}, + 'unfold_http_headers': {'key': 'unfoldHttpHeaders', 'type': 'bool'}, + } + + def __init__(self, *, ignore_certificate_name_mismatch: bool, support_http_status_code_continue: bool, keep_http_connection_alive: bool, unfold_http_headers: bool, **kwargs) -> None: + super(AS2AcknowledgementConnectionSettings, self).__init__(**kwargs) + self.ignore_certificate_name_mismatch = ignore_certificate_name_mismatch + self.support_http_status_code_continue = support_http_status_code_continue + self.keep_http_connection_alive = keep_http_connection_alive + self.unfold_http_headers = unfold_http_headers + + +class AS2AgreementContent(Model): + """The integration account AS2 agreement content. + + All required parameters must be populated in order to send to Azure. + + :param receive_agreement: Required. The AS2 one-way receive agreement. + :type receive_agreement: ~azure.mgmt.logic.models.AS2OneWayAgreement + :param send_agreement: Required. The AS2 one-way send agreement. + :type send_agreement: ~azure.mgmt.logic.models.AS2OneWayAgreement + """ + + _validation = { + 'receive_agreement': {'required': True}, + 'send_agreement': {'required': True}, + } + + _attribute_map = { + 'receive_agreement': {'key': 'receiveAgreement', 'type': 'AS2OneWayAgreement'}, + 'send_agreement': {'key': 'sendAgreement', 'type': 'AS2OneWayAgreement'}, + } + + def __init__(self, *, receive_agreement, send_agreement, **kwargs) -> None: + super(AS2AgreementContent, self).__init__(**kwargs) + self.receive_agreement = receive_agreement + self.send_agreement = send_agreement + + +class AS2EnvelopeSettings(Model): + """The AS2 agreement envelope settings. + + All required parameters must be populated in order to send to Azure. + + :param message_content_type: Required. The message content type. + :type message_content_type: str + :param transmit_file_name_in_mime_header: Required. The value indicating + whether to transmit file name in mime header. + :type transmit_file_name_in_mime_header: bool + :param file_name_template: Required. The template for file name. + :type file_name_template: str + :param suspend_message_on_file_name_generation_error: Required. The value + indicating whether to suspend message on file name generation error. + :type suspend_message_on_file_name_generation_error: bool + :param autogenerate_file_name: Required. The value indicating whether to + auto generate file name. + :type autogenerate_file_name: bool + """ + + _validation = { + 'message_content_type': {'required': True}, + 'transmit_file_name_in_mime_header': {'required': True}, + 'file_name_template': {'required': True}, + 'suspend_message_on_file_name_generation_error': {'required': True}, + 'autogenerate_file_name': {'required': True}, + } + + _attribute_map = { + 'message_content_type': {'key': 'messageContentType', 'type': 'str'}, + 'transmit_file_name_in_mime_header': {'key': 'transmitFileNameInMimeHeader', 'type': 'bool'}, + 'file_name_template': {'key': 'fileNameTemplate', 'type': 'str'}, + 'suspend_message_on_file_name_generation_error': {'key': 'suspendMessageOnFileNameGenerationError', 'type': 'bool'}, + 'autogenerate_file_name': {'key': 'autogenerateFileName', 'type': 'bool'}, + } + + def __init__(self, *, message_content_type: str, transmit_file_name_in_mime_header: bool, file_name_template: str, suspend_message_on_file_name_generation_error: bool, autogenerate_file_name: bool, **kwargs) -> None: + super(AS2EnvelopeSettings, self).__init__(**kwargs) + self.message_content_type = message_content_type + self.transmit_file_name_in_mime_header = transmit_file_name_in_mime_header + self.file_name_template = file_name_template + self.suspend_message_on_file_name_generation_error = suspend_message_on_file_name_generation_error + self.autogenerate_file_name = autogenerate_file_name + + +class AS2ErrorSettings(Model): + """The AS2 agreement error settings. + + All required parameters must be populated in order to send to Azure. + + :param suspend_duplicate_message: Required. The value indicating whether + to suspend duplicate message. + :type suspend_duplicate_message: bool + :param resend_if_mdn_not_received: Required. The value indicating whether + to resend message If MDN is not received. + :type resend_if_mdn_not_received: bool + """ + + _validation = { + 'suspend_duplicate_message': {'required': True}, + 'resend_if_mdn_not_received': {'required': True}, + } + + _attribute_map = { + 'suspend_duplicate_message': {'key': 'suspendDuplicateMessage', 'type': 'bool'}, + 'resend_if_mdn_not_received': {'key': 'resendIfMDNNotReceived', 'type': 'bool'}, + } + + def __init__(self, *, suspend_duplicate_message: bool, resend_if_mdn_not_received: bool, **kwargs) -> None: + super(AS2ErrorSettings, self).__init__(**kwargs) + self.suspend_duplicate_message = suspend_duplicate_message + self.resend_if_mdn_not_received = resend_if_mdn_not_received + + +class AS2MdnSettings(Model): + """The AS2 agreement mdn settings. + + All required parameters must be populated in order to send to Azure. + + :param need_mdn: Required. The value indicating whether to send or request + a MDN. + :type need_mdn: bool + :param sign_mdn: Required. The value indicating whether the MDN needs to + be signed or not. + :type sign_mdn: bool + :param send_mdn_asynchronously: Required. The value indicating whether to + send the asynchronous MDN. + :type send_mdn_asynchronously: bool + :param receipt_delivery_url: The receipt delivery URL. + :type receipt_delivery_url: str + :param disposition_notification_to: The disposition notification to header + value. + :type disposition_notification_to: str + :param sign_outbound_mdn_if_optional: Required. The value indicating + whether to sign the outbound MDN if optional. + :type sign_outbound_mdn_if_optional: bool + :param mdn_text: The MDN text. + :type mdn_text: str + :param send_inbound_mdn_to_message_box: Required. The value indicating + whether to send inbound MDN to message box. + :type send_inbound_mdn_to_message_box: bool + :param mic_hashing_algorithm: Required. The signing or hashing algorithm. + Possible values include: 'NotSpecified', 'None', 'MD5', 'SHA1', 'SHA2256', + 'SHA2384', 'SHA2512' + :type mic_hashing_algorithm: str or + ~azure.mgmt.logic.models.HashingAlgorithm + """ + + _validation = { + 'need_mdn': {'required': True}, + 'sign_mdn': {'required': True}, + 'send_mdn_asynchronously': {'required': True}, + 'sign_outbound_mdn_if_optional': {'required': True}, + 'send_inbound_mdn_to_message_box': {'required': True}, + 'mic_hashing_algorithm': {'required': True}, + } + + _attribute_map = { + 'need_mdn': {'key': 'needMDN', 'type': 'bool'}, + 'sign_mdn': {'key': 'signMDN', 'type': 'bool'}, + 'send_mdn_asynchronously': {'key': 'sendMDNAsynchronously', 'type': 'bool'}, + 'receipt_delivery_url': {'key': 'receiptDeliveryUrl', 'type': 'str'}, + 'disposition_notification_to': {'key': 'dispositionNotificationTo', 'type': 'str'}, + 'sign_outbound_mdn_if_optional': {'key': 'signOutboundMDNIfOptional', 'type': 'bool'}, + 'mdn_text': {'key': 'mdnText', 'type': 'str'}, + 'send_inbound_mdn_to_message_box': {'key': 'sendInboundMDNToMessageBox', 'type': 'bool'}, + 'mic_hashing_algorithm': {'key': 'micHashingAlgorithm', 'type': 'str'}, + } + + def __init__(self, *, need_mdn: bool, sign_mdn: bool, send_mdn_asynchronously: bool, sign_outbound_mdn_if_optional: bool, send_inbound_mdn_to_message_box: bool, mic_hashing_algorithm, receipt_delivery_url: str=None, disposition_notification_to: str=None, mdn_text: str=None, **kwargs) -> None: + super(AS2MdnSettings, self).__init__(**kwargs) + self.need_mdn = need_mdn + self.sign_mdn = sign_mdn + self.send_mdn_asynchronously = send_mdn_asynchronously + self.receipt_delivery_url = receipt_delivery_url + self.disposition_notification_to = disposition_notification_to + self.sign_outbound_mdn_if_optional = sign_outbound_mdn_if_optional + self.mdn_text = mdn_text + self.send_inbound_mdn_to_message_box = send_inbound_mdn_to_message_box + self.mic_hashing_algorithm = mic_hashing_algorithm + + +class AS2MessageConnectionSettings(Model): + """The AS2 agreement message connection settings. + + All required parameters must be populated in order to send to Azure. + + :param ignore_certificate_name_mismatch: Required. The value indicating + whether to ignore mismatch in certificate name. + :type ignore_certificate_name_mismatch: bool + :param support_http_status_code_continue: Required. The value indicating + whether to support HTTP status code 'CONTINUE'. + :type support_http_status_code_continue: bool + :param keep_http_connection_alive: Required. The value indicating whether + to keep the connection alive. + :type keep_http_connection_alive: bool + :param unfold_http_headers: Required. The value indicating whether to + unfold the HTTP headers. + :type unfold_http_headers: bool + """ + + _validation = { + 'ignore_certificate_name_mismatch': {'required': True}, + 'support_http_status_code_continue': {'required': True}, + 'keep_http_connection_alive': {'required': True}, + 'unfold_http_headers': {'required': True}, + } + + _attribute_map = { + 'ignore_certificate_name_mismatch': {'key': 'ignoreCertificateNameMismatch', 'type': 'bool'}, + 'support_http_status_code_continue': {'key': 'supportHttpStatusCodeContinue', 'type': 'bool'}, + 'keep_http_connection_alive': {'key': 'keepHttpConnectionAlive', 'type': 'bool'}, + 'unfold_http_headers': {'key': 'unfoldHttpHeaders', 'type': 'bool'}, + } + + def __init__(self, *, ignore_certificate_name_mismatch: bool, support_http_status_code_continue: bool, keep_http_connection_alive: bool, unfold_http_headers: bool, **kwargs) -> None: + super(AS2MessageConnectionSettings, self).__init__(**kwargs) + self.ignore_certificate_name_mismatch = ignore_certificate_name_mismatch + self.support_http_status_code_continue = support_http_status_code_continue + self.keep_http_connection_alive = keep_http_connection_alive + self.unfold_http_headers = unfold_http_headers + + +class AS2OneWayAgreement(Model): + """The integration account AS2 one-way agreement. + + All required parameters must be populated in order to send to Azure. + + :param sender_business_identity: Required. The sender business identity + :type sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :param receiver_business_identity: Required. The receiver business + identity + :type receiver_business_identity: + ~azure.mgmt.logic.models.BusinessIdentity + :param protocol_settings: Required. The AS2 protocol settings. + :type protocol_settings: ~azure.mgmt.logic.models.AS2ProtocolSettings + """ + + _validation = { + 'sender_business_identity': {'required': True}, + 'receiver_business_identity': {'required': True}, + 'protocol_settings': {'required': True}, + } + + _attribute_map = { + 'sender_business_identity': {'key': 'senderBusinessIdentity', 'type': 'BusinessIdentity'}, + 'receiver_business_identity': {'key': 'receiverBusinessIdentity', 'type': 'BusinessIdentity'}, + 'protocol_settings': {'key': 'protocolSettings', 'type': 'AS2ProtocolSettings'}, + } + + def __init__(self, *, sender_business_identity, receiver_business_identity, protocol_settings, **kwargs) -> None: + super(AS2OneWayAgreement, self).__init__(**kwargs) + self.sender_business_identity = sender_business_identity + self.receiver_business_identity = receiver_business_identity + self.protocol_settings = protocol_settings + + +class AS2ProtocolSettings(Model): + """The AS2 agreement protocol settings. + + All required parameters must be populated in order to send to Azure. + + :param message_connection_settings: Required. The message connection + settings. + :type message_connection_settings: + ~azure.mgmt.logic.models.AS2MessageConnectionSettings + :param acknowledgement_connection_settings: Required. The acknowledgement + connection settings. + :type acknowledgement_connection_settings: + ~azure.mgmt.logic.models.AS2AcknowledgementConnectionSettings + :param mdn_settings: Required. The MDN settings. + :type mdn_settings: ~azure.mgmt.logic.models.AS2MdnSettings + :param security_settings: Required. The security settings. + :type security_settings: ~azure.mgmt.logic.models.AS2SecuritySettings + :param validation_settings: Required. The validation settings. + :type validation_settings: ~azure.mgmt.logic.models.AS2ValidationSettings + :param envelope_settings: Required. The envelope settings. + :type envelope_settings: ~azure.mgmt.logic.models.AS2EnvelopeSettings + :param error_settings: Required. The error settings. + :type error_settings: ~azure.mgmt.logic.models.AS2ErrorSettings + """ + + _validation = { + 'message_connection_settings': {'required': True}, + 'acknowledgement_connection_settings': {'required': True}, + 'mdn_settings': {'required': True}, + 'security_settings': {'required': True}, + 'validation_settings': {'required': True}, + 'envelope_settings': {'required': True}, + 'error_settings': {'required': True}, + } + + _attribute_map = { + 'message_connection_settings': {'key': 'messageConnectionSettings', 'type': 'AS2MessageConnectionSettings'}, + 'acknowledgement_connection_settings': {'key': 'acknowledgementConnectionSettings', 'type': 'AS2AcknowledgementConnectionSettings'}, + 'mdn_settings': {'key': 'mdnSettings', 'type': 'AS2MdnSettings'}, + 'security_settings': {'key': 'securitySettings', 'type': 'AS2SecuritySettings'}, + 'validation_settings': {'key': 'validationSettings', 'type': 'AS2ValidationSettings'}, + 'envelope_settings': {'key': 'envelopeSettings', 'type': 'AS2EnvelopeSettings'}, + 'error_settings': {'key': 'errorSettings', 'type': 'AS2ErrorSettings'}, + } + + def __init__(self, *, message_connection_settings, acknowledgement_connection_settings, mdn_settings, security_settings, validation_settings, envelope_settings, error_settings, **kwargs) -> None: + super(AS2ProtocolSettings, self).__init__(**kwargs) + self.message_connection_settings = message_connection_settings + self.acknowledgement_connection_settings = acknowledgement_connection_settings + self.mdn_settings = mdn_settings + self.security_settings = security_settings + self.validation_settings = validation_settings + self.envelope_settings = envelope_settings + self.error_settings = error_settings + + +class AS2SecuritySettings(Model): + """The AS2 agreement security settings. + + All required parameters must be populated in order to send to Azure. + + :param override_group_signing_certificate: Required. The value indicating + whether to send or request a MDN. + :type override_group_signing_certificate: bool + :param signing_certificate_name: The name of the signing certificate. + :type signing_certificate_name: str + :param encryption_certificate_name: The name of the encryption + certificate. + :type encryption_certificate_name: str + :param enable_nrr_for_inbound_encoded_messages: Required. The value + indicating whether to enable NRR for inbound encoded messages. + :type enable_nrr_for_inbound_encoded_messages: bool + :param enable_nrr_for_inbound_decoded_messages: Required. The value + indicating whether to enable NRR for inbound decoded messages. + :type enable_nrr_for_inbound_decoded_messages: bool + :param enable_nrr_for_outbound_mdn: Required. The value indicating whether + to enable NRR for outbound MDN. + :type enable_nrr_for_outbound_mdn: bool + :param enable_nrr_for_outbound_encoded_messages: Required. The value + indicating whether to enable NRR for outbound encoded messages. + :type enable_nrr_for_outbound_encoded_messages: bool + :param enable_nrr_for_outbound_decoded_messages: Required. The value + indicating whether to enable NRR for outbound decoded messages. + :type enable_nrr_for_outbound_decoded_messages: bool + :param enable_nrr_for_inbound_mdn: Required. The value indicating whether + to enable NRR for inbound MDN. + :type enable_nrr_for_inbound_mdn: bool + :param sha2_algorithm_format: The Sha2 algorithm format. Valid values are + Sha2, ShaHashSize, ShaHyphenHashSize, Sha2UnderscoreHashSize. + :type sha2_algorithm_format: str + """ + + _validation = { + 'override_group_signing_certificate': {'required': True}, + 'enable_nrr_for_inbound_encoded_messages': {'required': True}, + 'enable_nrr_for_inbound_decoded_messages': {'required': True}, + 'enable_nrr_for_outbound_mdn': {'required': True}, + 'enable_nrr_for_outbound_encoded_messages': {'required': True}, + 'enable_nrr_for_outbound_decoded_messages': {'required': True}, + 'enable_nrr_for_inbound_mdn': {'required': True}, + } + + _attribute_map = { + 'override_group_signing_certificate': {'key': 'overrideGroupSigningCertificate', 'type': 'bool'}, + 'signing_certificate_name': {'key': 'signingCertificateName', 'type': 'str'}, + 'encryption_certificate_name': {'key': 'encryptionCertificateName', 'type': 'str'}, + 'enable_nrr_for_inbound_encoded_messages': {'key': 'enableNRRForInboundEncodedMessages', 'type': 'bool'}, + 'enable_nrr_for_inbound_decoded_messages': {'key': 'enableNRRForInboundDecodedMessages', 'type': 'bool'}, + 'enable_nrr_for_outbound_mdn': {'key': 'enableNRRForOutboundMDN', 'type': 'bool'}, + 'enable_nrr_for_outbound_encoded_messages': {'key': 'enableNRRForOutboundEncodedMessages', 'type': 'bool'}, + 'enable_nrr_for_outbound_decoded_messages': {'key': 'enableNRRForOutboundDecodedMessages', 'type': 'bool'}, + 'enable_nrr_for_inbound_mdn': {'key': 'enableNRRForInboundMDN', 'type': 'bool'}, + 'sha2_algorithm_format': {'key': 'sha2AlgorithmFormat', 'type': 'str'}, + } + + def __init__(self, *, override_group_signing_certificate: bool, enable_nrr_for_inbound_encoded_messages: bool, enable_nrr_for_inbound_decoded_messages: bool, enable_nrr_for_outbound_mdn: bool, enable_nrr_for_outbound_encoded_messages: bool, enable_nrr_for_outbound_decoded_messages: bool, enable_nrr_for_inbound_mdn: bool, signing_certificate_name: str=None, encryption_certificate_name: str=None, sha2_algorithm_format: str=None, **kwargs) -> None: + super(AS2SecuritySettings, self).__init__(**kwargs) + self.override_group_signing_certificate = override_group_signing_certificate + self.signing_certificate_name = signing_certificate_name + self.encryption_certificate_name = encryption_certificate_name + self.enable_nrr_for_inbound_encoded_messages = enable_nrr_for_inbound_encoded_messages + self.enable_nrr_for_inbound_decoded_messages = enable_nrr_for_inbound_decoded_messages + self.enable_nrr_for_outbound_mdn = enable_nrr_for_outbound_mdn + self.enable_nrr_for_outbound_encoded_messages = enable_nrr_for_outbound_encoded_messages + self.enable_nrr_for_outbound_decoded_messages = enable_nrr_for_outbound_decoded_messages + self.enable_nrr_for_inbound_mdn = enable_nrr_for_inbound_mdn + self.sha2_algorithm_format = sha2_algorithm_format + + +class AS2ValidationSettings(Model): + """The AS2 agreement validation settings. + + All required parameters must be populated in order to send to Azure. + + :param override_message_properties: Required. The value indicating whether + to override incoming message properties with those in agreement. + :type override_message_properties: bool + :param encrypt_message: Required. The value indicating whether the message + has to be encrypted. + :type encrypt_message: bool + :param sign_message: Required. The value indicating whether the message + has to be signed. + :type sign_message: bool + :param compress_message: Required. The value indicating whether the + message has to be compressed. + :type compress_message: bool + :param check_duplicate_message: Required. The value indicating whether to + check for duplicate message. + :type check_duplicate_message: bool + :param interchange_duplicates_validity_days: Required. The number of days + to look back for duplicate interchange. + :type interchange_duplicates_validity_days: int + :param check_certificate_revocation_list_on_send: Required. The value + indicating whether to check for certificate revocation list on send. + :type check_certificate_revocation_list_on_send: bool + :param check_certificate_revocation_list_on_receive: Required. The value + indicating whether to check for certificate revocation list on receive. + :type check_certificate_revocation_list_on_receive: bool + :param encryption_algorithm: Required. The encryption algorithm. Possible + values include: 'NotSpecified', 'None', 'DES3', 'RC2', 'AES128', 'AES192', + 'AES256' + :type encryption_algorithm: str or + ~azure.mgmt.logic.models.EncryptionAlgorithm + :param signing_algorithm: The signing algorithm. Possible values include: + 'NotSpecified', 'Default', 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' + :type signing_algorithm: str or ~azure.mgmt.logic.models.SigningAlgorithm + """ + + _validation = { + 'override_message_properties': {'required': True}, + 'encrypt_message': {'required': True}, + 'sign_message': {'required': True}, + 'compress_message': {'required': True}, + 'check_duplicate_message': {'required': True}, + 'interchange_duplicates_validity_days': {'required': True}, + 'check_certificate_revocation_list_on_send': {'required': True}, + 'check_certificate_revocation_list_on_receive': {'required': True}, + 'encryption_algorithm': {'required': True}, + } + + _attribute_map = { + 'override_message_properties': {'key': 'overrideMessageProperties', 'type': 'bool'}, + 'encrypt_message': {'key': 'encryptMessage', 'type': 'bool'}, + 'sign_message': {'key': 'signMessage', 'type': 'bool'}, + 'compress_message': {'key': 'compressMessage', 'type': 'bool'}, + 'check_duplicate_message': {'key': 'checkDuplicateMessage', 'type': 'bool'}, + 'interchange_duplicates_validity_days': {'key': 'interchangeDuplicatesValidityDays', 'type': 'int'}, + 'check_certificate_revocation_list_on_send': {'key': 'checkCertificateRevocationListOnSend', 'type': 'bool'}, + 'check_certificate_revocation_list_on_receive': {'key': 'checkCertificateRevocationListOnReceive', 'type': 'bool'}, + 'encryption_algorithm': {'key': 'encryptionAlgorithm', 'type': 'str'}, + 'signing_algorithm': {'key': 'signingAlgorithm', 'type': 'str'}, + } + + def __init__(self, *, override_message_properties: bool, encrypt_message: bool, sign_message: bool, compress_message: bool, check_duplicate_message: bool, interchange_duplicates_validity_days: int, check_certificate_revocation_list_on_send: bool, check_certificate_revocation_list_on_receive: bool, encryption_algorithm, signing_algorithm=None, **kwargs) -> None: + super(AS2ValidationSettings, self).__init__(**kwargs) + self.override_message_properties = override_message_properties + self.encrypt_message = encrypt_message + self.sign_message = sign_message + self.compress_message = compress_message + self.check_duplicate_message = check_duplicate_message + self.interchange_duplicates_validity_days = interchange_duplicates_validity_days + self.check_certificate_revocation_list_on_send = check_certificate_revocation_list_on_send + self.check_certificate_revocation_list_on_receive = check_certificate_revocation_list_on_receive + self.encryption_algorithm = encryption_algorithm + self.signing_algorithm = signing_algorithm + + +class Resource(Model): + """The base resource type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class AssemblyDefinition(Resource): + """The assembly definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param properties: Required. The assembly properties. + :type properties: ~azure.mgmt.logic.models.AssemblyProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'AssemblyProperties'}, + } + + def __init__(self, *, properties, location: str=None, tags=None, **kwargs) -> None: + super(AssemblyDefinition, self).__init__(location=location, tags=tags, **kwargs) + self.properties = properties + + +class AssemblyProperties(ArtifactContentPropertiesDefinition): + """The assembly properties definition. + + All required parameters must be populated in order to send to Azure. + + :param created_time: The artifact creation time. + :type created_time: datetime + :param changed_time: The artifact changed time. + :type changed_time: datetime + :param metadata: + :type metadata: object + :param content: + :type content: object + :param content_type: The content type. + :type content_type: str + :param content_link: The content link. + :type content_link: ~azure.mgmt.logic.models.ContentLink + :param assembly_name: Required. The assembly name. + :type assembly_name: str + :param assembly_version: The assembly version. + :type assembly_version: str + :param assembly_culture: The assembly culture. + :type assembly_culture: str + :param assembly_public_key_token: The assembly public key token. + :type assembly_public_key_token: str + """ + + _validation = { + 'assembly_name': {'required': True}, + } + + _attribute_map = { + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'metadata', 'type': 'object'}, + 'content': {'key': 'content', 'type': 'object'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'content_link': {'key': 'contentLink', 'type': 'ContentLink'}, + 'assembly_name': {'key': 'assemblyName', 'type': 'str'}, + 'assembly_version': {'key': 'assemblyVersion', 'type': 'str'}, + 'assembly_culture': {'key': 'assemblyCulture', 'type': 'str'}, + 'assembly_public_key_token': {'key': 'assemblyPublicKeyToken', 'type': 'str'}, + } + + def __init__(self, *, assembly_name: str, created_time=None, changed_time=None, metadata=None, content=None, content_type: str=None, content_link=None, assembly_version: str=None, assembly_culture: str=None, assembly_public_key_token: str=None, **kwargs) -> None: + super(AssemblyProperties, self).__init__(created_time=created_time, changed_time=changed_time, metadata=metadata, content=content, content_type=content_type, content_link=content_link, **kwargs) + self.assembly_name = assembly_name + self.assembly_version = assembly_version + self.assembly_culture = assembly_culture + self.assembly_public_key_token = assembly_public_key_token + + +class ErrorInfo(Model): + """The error info. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. The error code. + :type code: str + """ + + _validation = { + 'code': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + } + + def __init__(self, *, code: str, **kwargs) -> None: + super(ErrorInfo, self).__init__(**kwargs) + self.code = code + + +class AzureResourceErrorInfo(ErrorInfo): + """The azure resource error info. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. The error code. + :type code: str + :param message: Required. The error message. + :type message: str + :param details: The error details. + :type details: list[~azure.mgmt.logic.models.AzureResourceErrorInfo] + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[AzureResourceErrorInfo]'}, + } + + def __init__(self, *, code: str, message: str, details=None, **kwargs) -> None: + super(AzureResourceErrorInfo, self).__init__(code=code, **kwargs) + self.message = message + self.details = details + + +class B2BPartnerContent(Model): + """The B2B partner content. + + :param business_identities: The list of partner business identities. + :type business_identities: list[~azure.mgmt.logic.models.BusinessIdentity] + """ + + _attribute_map = { + 'business_identities': {'key': 'businessIdentities', 'type': '[BusinessIdentity]'}, + } + + def __init__(self, *, business_identities=None, **kwargs) -> None: + super(B2BPartnerContent, self).__init__(**kwargs) + self.business_identities = business_identities + + +class BatchConfiguration(Resource): + """The batch configuration resource definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param properties: Required. The batch configuration properties. + :type properties: ~azure.mgmt.logic.models.BatchConfigurationProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'BatchConfigurationProperties'}, + } + + def __init__(self, *, properties, location: str=None, tags=None, **kwargs) -> None: + super(BatchConfiguration, self).__init__(location=location, tags=tags, **kwargs) + self.properties = properties + + +class BatchConfigurationProperties(ArtifactProperties): + """The batch configuration properties definition. + + All required parameters must be populated in order to send to Azure. + + :param created_time: The artifact creation time. + :type created_time: datetime + :param changed_time: The artifact changed time. + :type changed_time: datetime + :param metadata: + :type metadata: object + :param batch_group_name: Required. The name of the batch group. + :type batch_group_name: str + :param release_criteria: Required. The batch release criteria. + :type release_criteria: ~azure.mgmt.logic.models.BatchReleaseCriteria + """ + + _validation = { + 'batch_group_name': {'required': True}, + 'release_criteria': {'required': True}, + } + + _attribute_map = { + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'metadata', 'type': 'object'}, + 'batch_group_name': {'key': 'batchGroupName', 'type': 'str'}, + 'release_criteria': {'key': 'releaseCriteria', 'type': 'BatchReleaseCriteria'}, + } + + def __init__(self, *, batch_group_name: str, release_criteria, created_time=None, changed_time=None, metadata=None, **kwargs) -> None: + super(BatchConfigurationProperties, self).__init__(created_time=created_time, changed_time=changed_time, metadata=metadata, **kwargs) + self.batch_group_name = batch_group_name + self.release_criteria = release_criteria + + +class BatchReleaseCriteria(Model): + """The batch release criteria. + + :param message_count: The message count. + :type message_count: int + :param batch_size: The batch size in bytes. + :type batch_size: int + :param recurrence: The recurrence. + :type recurrence: ~azure.mgmt.logic.models.WorkflowTriggerRecurrence + """ + + _attribute_map = { + 'message_count': {'key': 'messageCount', 'type': 'int'}, + 'batch_size': {'key': 'batchSize', 'type': 'int'}, + 'recurrence': {'key': 'recurrence', 'type': 'WorkflowTriggerRecurrence'}, + } + + def __init__(self, *, message_count: int=None, batch_size: int=None, recurrence=None, **kwargs) -> None: + super(BatchReleaseCriteria, self).__init__(**kwargs) + self.message_count = message_count + self.batch_size = batch_size + self.recurrence = recurrence + + +class BusinessIdentity(Model): + """The integration account partner's business identity. + + All required parameters must be populated in order to send to Azure. + + :param qualifier: Required. The business identity qualifier e.g. + as2identity, ZZ, ZZZ, 31, 32 + :type qualifier: str + :param value: Required. The user defined business identity value. + :type value: str + """ + + _validation = { + 'qualifier': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'qualifier': {'key': 'qualifier', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, qualifier: str, value: str, **kwargs) -> None: + super(BusinessIdentity, self).__init__(**kwargs) + self.qualifier = qualifier + self.value = value + + +class CallbackUrl(Model): + """The callback url. + + :param value: The URL value. + :type value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, **kwargs) -> None: + super(CallbackUrl, self).__init__(**kwargs) + self.value = value + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ContentHash(Model): + """The content hash. + + :param algorithm: The algorithm of the content hash. + :type algorithm: str + :param value: The value of the content hash. + :type value: str + """ + + _attribute_map = { + 'algorithm': {'key': 'algorithm', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, algorithm: str=None, value: str=None, **kwargs) -> None: + super(ContentHash, self).__init__(**kwargs) + self.algorithm = algorithm + self.value = value + + +class ContentLink(Model): + """The content link. + + :param uri: The content link URI. + :type uri: str + :param content_version: The content version. + :type content_version: str + :param content_size: The content size. + :type content_size: long + :param content_hash: The content hash. + :type content_hash: ~azure.mgmt.logic.models.ContentHash + :param metadata: The metadata. + :type metadata: object + """ + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'}, + 'content_version': {'key': 'contentVersion', 'type': 'str'}, + 'content_size': {'key': 'contentSize', 'type': 'long'}, + 'content_hash': {'key': 'contentHash', 'type': 'ContentHash'}, + 'metadata': {'key': 'metadata', 'type': 'object'}, + } + + def __init__(self, *, uri: str=None, content_version: str=None, content_size: int=None, content_hash=None, metadata=None, **kwargs) -> None: + super(ContentLink, self).__init__(**kwargs) + self.uri = uri + self.content_version = content_version + self.content_size = content_size + self.content_hash = content_hash + self.metadata = metadata + + +class Correlation(Model): + """The correlation property. + + :param client_tracking_id: The client tracking id. + :type client_tracking_id: str + """ + + _attribute_map = { + 'client_tracking_id': {'key': 'clientTrackingId', 'type': 'str'}, + } + + def __init__(self, *, client_tracking_id: str=None, **kwargs) -> None: + super(Correlation, self).__init__(**kwargs) + self.client_tracking_id = client_tracking_id + + +class EdifactAcknowledgementSettings(Model): + """The Edifact agreement acknowledgement settings. + + All required parameters must be populated in order to send to Azure. + + :param need_technical_acknowledgement: Required. The value indicating + whether technical acknowledgement is needed. + :type need_technical_acknowledgement: bool + :param batch_technical_acknowledgements: Required. The value indicating + whether to batch the technical acknowledgements. + :type batch_technical_acknowledgements: bool + :param need_functional_acknowledgement: Required. The value indicating + whether functional acknowledgement is needed. + :type need_functional_acknowledgement: bool + :param batch_functional_acknowledgements: Required. The value indicating + whether to batch functional acknowledgements. + :type batch_functional_acknowledgements: bool + :param need_loop_for_valid_messages: Required. The value indicating + whether a loop is needed for valid messages. + :type need_loop_for_valid_messages: bool + :param send_synchronous_acknowledgement: Required. The value indicating + whether to send synchronous acknowledgement. + :type send_synchronous_acknowledgement: bool + :param acknowledgement_control_number_prefix: The acknowledgement control + number prefix. + :type acknowledgement_control_number_prefix: str + :param acknowledgement_control_number_suffix: The acknowledgement control + number suffix. + :type acknowledgement_control_number_suffix: str + :param acknowledgement_control_number_lower_bound: Required. The + acknowledgement control number lower bound. + :type acknowledgement_control_number_lower_bound: int + :param acknowledgement_control_number_upper_bound: Required. The + acknowledgement control number upper bound. + :type acknowledgement_control_number_upper_bound: int + :param rollover_acknowledgement_control_number: Required. The value + indicating whether to rollover acknowledgement control number. + :type rollover_acknowledgement_control_number: bool + """ + + _validation = { + 'need_technical_acknowledgement': {'required': True}, + 'batch_technical_acknowledgements': {'required': True}, + 'need_functional_acknowledgement': {'required': True}, + 'batch_functional_acknowledgements': {'required': True}, + 'need_loop_for_valid_messages': {'required': True}, + 'send_synchronous_acknowledgement': {'required': True}, + 'acknowledgement_control_number_lower_bound': {'required': True}, + 'acknowledgement_control_number_upper_bound': {'required': True}, + 'rollover_acknowledgement_control_number': {'required': True}, + } + + _attribute_map = { + 'need_technical_acknowledgement': {'key': 'needTechnicalAcknowledgement', 'type': 'bool'}, + 'batch_technical_acknowledgements': {'key': 'batchTechnicalAcknowledgements', 'type': 'bool'}, + 'need_functional_acknowledgement': {'key': 'needFunctionalAcknowledgement', 'type': 'bool'}, + 'batch_functional_acknowledgements': {'key': 'batchFunctionalAcknowledgements', 'type': 'bool'}, + 'need_loop_for_valid_messages': {'key': 'needLoopForValidMessages', 'type': 'bool'}, + 'send_synchronous_acknowledgement': {'key': 'sendSynchronousAcknowledgement', 'type': 'bool'}, + 'acknowledgement_control_number_prefix': {'key': 'acknowledgementControlNumberPrefix', 'type': 'str'}, + 'acknowledgement_control_number_suffix': {'key': 'acknowledgementControlNumberSuffix', 'type': 'str'}, + 'acknowledgement_control_number_lower_bound': {'key': 'acknowledgementControlNumberLowerBound', 'type': 'int'}, + 'acknowledgement_control_number_upper_bound': {'key': 'acknowledgementControlNumberUpperBound', 'type': 'int'}, + 'rollover_acknowledgement_control_number': {'key': 'rolloverAcknowledgementControlNumber', 'type': 'bool'}, + } + + def __init__(self, *, need_technical_acknowledgement: bool, batch_technical_acknowledgements: bool, need_functional_acknowledgement: bool, batch_functional_acknowledgements: bool, need_loop_for_valid_messages: bool, send_synchronous_acknowledgement: bool, acknowledgement_control_number_lower_bound: int, acknowledgement_control_number_upper_bound: int, rollover_acknowledgement_control_number: bool, acknowledgement_control_number_prefix: str=None, acknowledgement_control_number_suffix: str=None, **kwargs) -> None: + super(EdifactAcknowledgementSettings, self).__init__(**kwargs) + self.need_technical_acknowledgement = need_technical_acknowledgement + self.batch_technical_acknowledgements = batch_technical_acknowledgements + self.need_functional_acknowledgement = need_functional_acknowledgement + self.batch_functional_acknowledgements = batch_functional_acknowledgements + self.need_loop_for_valid_messages = need_loop_for_valid_messages + self.send_synchronous_acknowledgement = send_synchronous_acknowledgement + self.acknowledgement_control_number_prefix = acknowledgement_control_number_prefix + self.acknowledgement_control_number_suffix = acknowledgement_control_number_suffix + self.acknowledgement_control_number_lower_bound = acknowledgement_control_number_lower_bound + self.acknowledgement_control_number_upper_bound = acknowledgement_control_number_upper_bound + self.rollover_acknowledgement_control_number = rollover_acknowledgement_control_number + + +class EdifactAgreementContent(Model): + """The Edifact agreement content. + + All required parameters must be populated in order to send to Azure. + + :param receive_agreement: Required. The EDIFACT one-way receive agreement. + :type receive_agreement: ~azure.mgmt.logic.models.EdifactOneWayAgreement + :param send_agreement: Required. The EDIFACT one-way send agreement. + :type send_agreement: ~azure.mgmt.logic.models.EdifactOneWayAgreement + """ + + _validation = { + 'receive_agreement': {'required': True}, + 'send_agreement': {'required': True}, + } + + _attribute_map = { + 'receive_agreement': {'key': 'receiveAgreement', 'type': 'EdifactOneWayAgreement'}, + 'send_agreement': {'key': 'sendAgreement', 'type': 'EdifactOneWayAgreement'}, + } + + def __init__(self, *, receive_agreement, send_agreement, **kwargs) -> None: + super(EdifactAgreementContent, self).__init__(**kwargs) + self.receive_agreement = receive_agreement + self.send_agreement = send_agreement + + +class EdifactDelimiterOverride(Model): + """The Edifact delimiter override settings. + + All required parameters must be populated in order to send to Azure. + + :param message_id: The message id. + :type message_id: str + :param message_version: The message version. + :type message_version: str + :param message_release: The message release. + :type message_release: str + :param data_element_separator: Required. The data element separator. + :type data_element_separator: int + :param component_separator: Required. The component separator. + :type component_separator: int + :param segment_terminator: Required. The segment terminator. + :type segment_terminator: int + :param repetition_separator: Required. The repetition separator. + :type repetition_separator: int + :param segment_terminator_suffix: Required. The segment terminator suffix. + Possible values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' + :type segment_terminator_suffix: str or + ~azure.mgmt.logic.models.SegmentTerminatorSuffix + :param decimal_point_indicator: Required. The decimal point indicator. + Possible values include: 'NotSpecified', 'Comma', 'Decimal' + :type decimal_point_indicator: str or + ~azure.mgmt.logic.models.EdifactDecimalIndicator + :param release_indicator: Required. The release indicator. + :type release_indicator: int + :param message_association_assigned_code: The message association assigned + code. + :type message_association_assigned_code: str + :param target_namespace: The target namespace on which this delimiter + settings has to be applied. + :type target_namespace: str + """ + + _validation = { + 'data_element_separator': {'required': True}, + 'component_separator': {'required': True}, + 'segment_terminator': {'required': True}, + 'repetition_separator': {'required': True}, + 'segment_terminator_suffix': {'required': True}, + 'decimal_point_indicator': {'required': True}, + 'release_indicator': {'required': True}, + } + + _attribute_map = { + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'message_version': {'key': 'messageVersion', 'type': 'str'}, + 'message_release': {'key': 'messageRelease', 'type': 'str'}, + 'data_element_separator': {'key': 'dataElementSeparator', 'type': 'int'}, + 'component_separator': {'key': 'componentSeparator', 'type': 'int'}, + 'segment_terminator': {'key': 'segmentTerminator', 'type': 'int'}, + 'repetition_separator': {'key': 'repetitionSeparator', 'type': 'int'}, + 'segment_terminator_suffix': {'key': 'segmentTerminatorSuffix', 'type': 'SegmentTerminatorSuffix'}, + 'decimal_point_indicator': {'key': 'decimalPointIndicator', 'type': 'EdifactDecimalIndicator'}, + 'release_indicator': {'key': 'releaseIndicator', 'type': 'int'}, + 'message_association_assigned_code': {'key': 'messageAssociationAssignedCode', 'type': 'str'}, + 'target_namespace': {'key': 'targetNamespace', 'type': 'str'}, + } + + def __init__(self, *, data_element_separator: int, component_separator: int, segment_terminator: int, repetition_separator: int, segment_terminator_suffix, decimal_point_indicator, release_indicator: int, message_id: str=None, message_version: str=None, message_release: str=None, message_association_assigned_code: str=None, target_namespace: str=None, **kwargs) -> None: + super(EdifactDelimiterOverride, self).__init__(**kwargs) + self.message_id = message_id + self.message_version = message_version + self.message_release = message_release + self.data_element_separator = data_element_separator + self.component_separator = component_separator + self.segment_terminator = segment_terminator + self.repetition_separator = repetition_separator + self.segment_terminator_suffix = segment_terminator_suffix + self.decimal_point_indicator = decimal_point_indicator + self.release_indicator = release_indicator + self.message_association_assigned_code = message_association_assigned_code + self.target_namespace = target_namespace + + +class EdifactEnvelopeOverride(Model): + """The Edifact envelope override settings. + + :param message_id: The message id on which this envelope settings has to + be applied. + :type message_id: str + :param message_version: The message version on which this envelope + settings has to be applied. + :type message_version: str + :param message_release: The message release version on which this envelope + settings has to be applied. + :type message_release: str + :param message_association_assigned_code: The message association assigned + code. + :type message_association_assigned_code: str + :param target_namespace: The target namespace on which this envelope + settings has to be applied. + :type target_namespace: str + :param functional_group_id: The functional group id. + :type functional_group_id: str + :param sender_application_qualifier: The sender application qualifier. + :type sender_application_qualifier: str + :param sender_application_id: The sender application id. + :type sender_application_id: str + :param receiver_application_qualifier: The receiver application qualifier. + :type receiver_application_qualifier: str + :param receiver_application_id: The receiver application id. + :type receiver_application_id: str + :param controlling_agency_code: The controlling agency code. + :type controlling_agency_code: str + :param group_header_message_version: The group header message version. + :type group_header_message_version: str + :param group_header_message_release: The group header message release. + :type group_header_message_release: str + :param association_assigned_code: The association assigned code. + :type association_assigned_code: str + :param application_password: The application password. + :type application_password: str + """ + + _attribute_map = { + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'message_version': {'key': 'messageVersion', 'type': 'str'}, + 'message_release': {'key': 'messageRelease', 'type': 'str'}, + 'message_association_assigned_code': {'key': 'messageAssociationAssignedCode', 'type': 'str'}, + 'target_namespace': {'key': 'targetNamespace', 'type': 'str'}, + 'functional_group_id': {'key': 'functionalGroupId', 'type': 'str'}, + 'sender_application_qualifier': {'key': 'senderApplicationQualifier', 'type': 'str'}, + 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, + 'receiver_application_qualifier': {'key': 'receiverApplicationQualifier', 'type': 'str'}, + 'receiver_application_id': {'key': 'receiverApplicationId', 'type': 'str'}, + 'controlling_agency_code': {'key': 'controllingAgencyCode', 'type': 'str'}, + 'group_header_message_version': {'key': 'groupHeaderMessageVersion', 'type': 'str'}, + 'group_header_message_release': {'key': 'groupHeaderMessageRelease', 'type': 'str'}, + 'association_assigned_code': {'key': 'associationAssignedCode', 'type': 'str'}, + 'application_password': {'key': 'applicationPassword', 'type': 'str'}, + } + + def __init__(self, *, message_id: str=None, message_version: str=None, message_release: str=None, message_association_assigned_code: str=None, target_namespace: str=None, functional_group_id: str=None, sender_application_qualifier: str=None, sender_application_id: str=None, receiver_application_qualifier: str=None, receiver_application_id: str=None, controlling_agency_code: str=None, group_header_message_version: str=None, group_header_message_release: str=None, association_assigned_code: str=None, application_password: str=None, **kwargs) -> None: + super(EdifactEnvelopeOverride, self).__init__(**kwargs) + self.message_id = message_id + self.message_version = message_version + self.message_release = message_release + self.message_association_assigned_code = message_association_assigned_code + self.target_namespace = target_namespace + self.functional_group_id = functional_group_id + self.sender_application_qualifier = sender_application_qualifier + self.sender_application_id = sender_application_id + self.receiver_application_qualifier = receiver_application_qualifier + self.receiver_application_id = receiver_application_id + self.controlling_agency_code = controlling_agency_code + self.group_header_message_version = group_header_message_version + self.group_header_message_release = group_header_message_release + self.association_assigned_code = association_assigned_code + self.application_password = application_password + + +class EdifactEnvelopeSettings(Model): + """The Edifact agreement envelope settings. + + All required parameters must be populated in order to send to Azure. + + :param group_association_assigned_code: The group association assigned + code. + :type group_association_assigned_code: str + :param communication_agreement_id: The communication agreement id. + :type communication_agreement_id: str + :param apply_delimiter_string_advice: Required. The value indicating + whether to apply delimiter string advice. + :type apply_delimiter_string_advice: bool + :param create_grouping_segments: Required. The value indicating whether to + create grouping segments. + :type create_grouping_segments: bool + :param enable_default_group_headers: Required. The value indicating + whether to enable default group headers. + :type enable_default_group_headers: bool + :param recipient_reference_password_value: The recipient reference + password value. + :type recipient_reference_password_value: str + :param recipient_reference_password_qualifier: The recipient reference + password qualifier. + :type recipient_reference_password_qualifier: str + :param application_reference_id: The application reference id. + :type application_reference_id: str + :param processing_priority_code: The processing priority code. + :type processing_priority_code: str + :param interchange_control_number_lower_bound: Required. The interchange + control number lower bound. + :type interchange_control_number_lower_bound: long + :param interchange_control_number_upper_bound: Required. The interchange + control number upper bound. + :type interchange_control_number_upper_bound: long + :param rollover_interchange_control_number: Required. The value indicating + whether to rollover interchange control number. + :type rollover_interchange_control_number: bool + :param interchange_control_number_prefix: The interchange control number + prefix. + :type interchange_control_number_prefix: str + :param interchange_control_number_suffix: The interchange control number + suffix. + :type interchange_control_number_suffix: str + :param sender_reverse_routing_address: The sender reverse routing address. + :type sender_reverse_routing_address: str + :param receiver_reverse_routing_address: The receiver reverse routing + address. + :type receiver_reverse_routing_address: str + :param functional_group_id: The functional group id. + :type functional_group_id: str + :param group_controlling_agency_code: The group controlling agency code. + :type group_controlling_agency_code: str + :param group_message_version: The group message version. + :type group_message_version: str + :param group_message_release: The group message release. + :type group_message_release: str + :param group_control_number_lower_bound: Required. The group control + number lower bound. + :type group_control_number_lower_bound: long + :param group_control_number_upper_bound: Required. The group control + number upper bound. + :type group_control_number_upper_bound: long + :param rollover_group_control_number: Required. The value indicating + whether to rollover group control number. + :type rollover_group_control_number: bool + :param group_control_number_prefix: The group control number prefix. + :type group_control_number_prefix: str + :param group_control_number_suffix: The group control number suffix. + :type group_control_number_suffix: str + :param group_application_receiver_qualifier: The group application + receiver qualifier. + :type group_application_receiver_qualifier: str + :param group_application_receiver_id: The group application receiver id. + :type group_application_receiver_id: str + :param group_application_sender_qualifier: The group application sender + qualifier. + :type group_application_sender_qualifier: str + :param group_application_sender_id: The group application sender id. + :type group_application_sender_id: str + :param group_application_password: The group application password. + :type group_application_password: str + :param overwrite_existing_transaction_set_control_number: Required. The + value indicating whether to overwrite existing transaction set control + number. + :type overwrite_existing_transaction_set_control_number: bool + :param transaction_set_control_number_prefix: The transaction set control + number prefix. + :type transaction_set_control_number_prefix: str + :param transaction_set_control_number_suffix: The transaction set control + number suffix. + :type transaction_set_control_number_suffix: str + :param transaction_set_control_number_lower_bound: Required. The + transaction set control number lower bound. + :type transaction_set_control_number_lower_bound: long + :param transaction_set_control_number_upper_bound: Required. The + transaction set control number upper bound. + :type transaction_set_control_number_upper_bound: long + :param rollover_transaction_set_control_number: Required. The value + indicating whether to rollover transaction set control number. + :type rollover_transaction_set_control_number: bool + :param is_test_interchange: Required. The value indicating whether the + message is a test interchange. + :type is_test_interchange: bool + :param sender_internal_identification: The sender internal identification. + :type sender_internal_identification: str + :param sender_internal_sub_identification: The sender internal sub + identification. + :type sender_internal_sub_identification: str + :param receiver_internal_identification: The receiver internal + identification. + :type receiver_internal_identification: str + :param receiver_internal_sub_identification: The receiver internal sub + identification. + :type receiver_internal_sub_identification: str + """ + + _validation = { + 'apply_delimiter_string_advice': {'required': True}, + 'create_grouping_segments': {'required': True}, + 'enable_default_group_headers': {'required': True}, + 'interchange_control_number_lower_bound': {'required': True}, + 'interchange_control_number_upper_bound': {'required': True}, + 'rollover_interchange_control_number': {'required': True}, + 'group_control_number_lower_bound': {'required': True}, + 'group_control_number_upper_bound': {'required': True}, + 'rollover_group_control_number': {'required': True}, + 'overwrite_existing_transaction_set_control_number': {'required': True}, + 'transaction_set_control_number_lower_bound': {'required': True}, + 'transaction_set_control_number_upper_bound': {'required': True}, + 'rollover_transaction_set_control_number': {'required': True}, + 'is_test_interchange': {'required': True}, + } + + _attribute_map = { + 'group_association_assigned_code': {'key': 'groupAssociationAssignedCode', 'type': 'str'}, + 'communication_agreement_id': {'key': 'communicationAgreementId', 'type': 'str'}, + 'apply_delimiter_string_advice': {'key': 'applyDelimiterStringAdvice', 'type': 'bool'}, + 'create_grouping_segments': {'key': 'createGroupingSegments', 'type': 'bool'}, + 'enable_default_group_headers': {'key': 'enableDefaultGroupHeaders', 'type': 'bool'}, + 'recipient_reference_password_value': {'key': 'recipientReferencePasswordValue', 'type': 'str'}, + 'recipient_reference_password_qualifier': {'key': 'recipientReferencePasswordQualifier', 'type': 'str'}, + 'application_reference_id': {'key': 'applicationReferenceId', 'type': 'str'}, + 'processing_priority_code': {'key': 'processingPriorityCode', 'type': 'str'}, + 'interchange_control_number_lower_bound': {'key': 'interchangeControlNumberLowerBound', 'type': 'long'}, + 'interchange_control_number_upper_bound': {'key': 'interchangeControlNumberUpperBound', 'type': 'long'}, + 'rollover_interchange_control_number': {'key': 'rolloverInterchangeControlNumber', 'type': 'bool'}, + 'interchange_control_number_prefix': {'key': 'interchangeControlNumberPrefix', 'type': 'str'}, + 'interchange_control_number_suffix': {'key': 'interchangeControlNumberSuffix', 'type': 'str'}, + 'sender_reverse_routing_address': {'key': 'senderReverseRoutingAddress', 'type': 'str'}, + 'receiver_reverse_routing_address': {'key': 'receiverReverseRoutingAddress', 'type': 'str'}, + 'functional_group_id': {'key': 'functionalGroupId', 'type': 'str'}, + 'group_controlling_agency_code': {'key': 'groupControllingAgencyCode', 'type': 'str'}, + 'group_message_version': {'key': 'groupMessageVersion', 'type': 'str'}, + 'group_message_release': {'key': 'groupMessageRelease', 'type': 'str'}, + 'group_control_number_lower_bound': {'key': 'groupControlNumberLowerBound', 'type': 'long'}, + 'group_control_number_upper_bound': {'key': 'groupControlNumberUpperBound', 'type': 'long'}, + 'rollover_group_control_number': {'key': 'rolloverGroupControlNumber', 'type': 'bool'}, + 'group_control_number_prefix': {'key': 'groupControlNumberPrefix', 'type': 'str'}, + 'group_control_number_suffix': {'key': 'groupControlNumberSuffix', 'type': 'str'}, + 'group_application_receiver_qualifier': {'key': 'groupApplicationReceiverQualifier', 'type': 'str'}, + 'group_application_receiver_id': {'key': 'groupApplicationReceiverId', 'type': 'str'}, + 'group_application_sender_qualifier': {'key': 'groupApplicationSenderQualifier', 'type': 'str'}, + 'group_application_sender_id': {'key': 'groupApplicationSenderId', 'type': 'str'}, + 'group_application_password': {'key': 'groupApplicationPassword', 'type': 'str'}, + 'overwrite_existing_transaction_set_control_number': {'key': 'overwriteExistingTransactionSetControlNumber', 'type': 'bool'}, + 'transaction_set_control_number_prefix': {'key': 'transactionSetControlNumberPrefix', 'type': 'str'}, + 'transaction_set_control_number_suffix': {'key': 'transactionSetControlNumberSuffix', 'type': 'str'}, + 'transaction_set_control_number_lower_bound': {'key': 'transactionSetControlNumberLowerBound', 'type': 'long'}, + 'transaction_set_control_number_upper_bound': {'key': 'transactionSetControlNumberUpperBound', 'type': 'long'}, + 'rollover_transaction_set_control_number': {'key': 'rolloverTransactionSetControlNumber', 'type': 'bool'}, + 'is_test_interchange': {'key': 'isTestInterchange', 'type': 'bool'}, + 'sender_internal_identification': {'key': 'senderInternalIdentification', 'type': 'str'}, + 'sender_internal_sub_identification': {'key': 'senderInternalSubIdentification', 'type': 'str'}, + 'receiver_internal_identification': {'key': 'receiverInternalIdentification', 'type': 'str'}, + 'receiver_internal_sub_identification': {'key': 'receiverInternalSubIdentification', 'type': 'str'}, + } + + def __init__(self, *, apply_delimiter_string_advice: bool, create_grouping_segments: bool, enable_default_group_headers: bool, interchange_control_number_lower_bound: int, interchange_control_number_upper_bound: int, rollover_interchange_control_number: bool, group_control_number_lower_bound: int, group_control_number_upper_bound: int, rollover_group_control_number: bool, overwrite_existing_transaction_set_control_number: bool, transaction_set_control_number_lower_bound: int, transaction_set_control_number_upper_bound: int, rollover_transaction_set_control_number: bool, is_test_interchange: bool, group_association_assigned_code: str=None, communication_agreement_id: str=None, recipient_reference_password_value: str=None, recipient_reference_password_qualifier: str=None, application_reference_id: str=None, processing_priority_code: str=None, interchange_control_number_prefix: str=None, interchange_control_number_suffix: str=None, sender_reverse_routing_address: str=None, receiver_reverse_routing_address: str=None, functional_group_id: str=None, group_controlling_agency_code: str=None, group_message_version: str=None, group_message_release: str=None, group_control_number_prefix: str=None, group_control_number_suffix: str=None, group_application_receiver_qualifier: str=None, group_application_receiver_id: str=None, group_application_sender_qualifier: str=None, group_application_sender_id: str=None, group_application_password: str=None, transaction_set_control_number_prefix: str=None, transaction_set_control_number_suffix: str=None, sender_internal_identification: str=None, sender_internal_sub_identification: str=None, receiver_internal_identification: str=None, receiver_internal_sub_identification: str=None, **kwargs) -> None: + super(EdifactEnvelopeSettings, self).__init__(**kwargs) + self.group_association_assigned_code = group_association_assigned_code + self.communication_agreement_id = communication_agreement_id + self.apply_delimiter_string_advice = apply_delimiter_string_advice + self.create_grouping_segments = create_grouping_segments + self.enable_default_group_headers = enable_default_group_headers + self.recipient_reference_password_value = recipient_reference_password_value + self.recipient_reference_password_qualifier = recipient_reference_password_qualifier + self.application_reference_id = application_reference_id + self.processing_priority_code = processing_priority_code + self.interchange_control_number_lower_bound = interchange_control_number_lower_bound + self.interchange_control_number_upper_bound = interchange_control_number_upper_bound + self.rollover_interchange_control_number = rollover_interchange_control_number + self.interchange_control_number_prefix = interchange_control_number_prefix + self.interchange_control_number_suffix = interchange_control_number_suffix + self.sender_reverse_routing_address = sender_reverse_routing_address + self.receiver_reverse_routing_address = receiver_reverse_routing_address + self.functional_group_id = functional_group_id + self.group_controlling_agency_code = group_controlling_agency_code + self.group_message_version = group_message_version + self.group_message_release = group_message_release + self.group_control_number_lower_bound = group_control_number_lower_bound + self.group_control_number_upper_bound = group_control_number_upper_bound + self.rollover_group_control_number = rollover_group_control_number + self.group_control_number_prefix = group_control_number_prefix + self.group_control_number_suffix = group_control_number_suffix + self.group_application_receiver_qualifier = group_application_receiver_qualifier + self.group_application_receiver_id = group_application_receiver_id + self.group_application_sender_qualifier = group_application_sender_qualifier + self.group_application_sender_id = group_application_sender_id + self.group_application_password = group_application_password + self.overwrite_existing_transaction_set_control_number = overwrite_existing_transaction_set_control_number + self.transaction_set_control_number_prefix = transaction_set_control_number_prefix + self.transaction_set_control_number_suffix = transaction_set_control_number_suffix + self.transaction_set_control_number_lower_bound = transaction_set_control_number_lower_bound + self.transaction_set_control_number_upper_bound = transaction_set_control_number_upper_bound + self.rollover_transaction_set_control_number = rollover_transaction_set_control_number + self.is_test_interchange = is_test_interchange + self.sender_internal_identification = sender_internal_identification + self.sender_internal_sub_identification = sender_internal_sub_identification + self.receiver_internal_identification = receiver_internal_identification + self.receiver_internal_sub_identification = receiver_internal_sub_identification + + +class EdifactFramingSettings(Model): + """The Edifact agreement framing settings. + + All required parameters must be populated in order to send to Azure. + + :param service_code_list_directory_version: The service code list + directory version. + :type service_code_list_directory_version: str + :param character_encoding: The character encoding. + :type character_encoding: str + :param protocol_version: Required. The protocol version. + :type protocol_version: int + :param data_element_separator: Required. The data element separator. + :type data_element_separator: int + :param component_separator: Required. The component separator. + :type component_separator: int + :param segment_terminator: Required. The segment terminator. + :type segment_terminator: int + :param release_indicator: Required. The release indicator. + :type release_indicator: int + :param repetition_separator: Required. The repetition separator. + :type repetition_separator: int + :param character_set: Required. The EDIFACT frame setting characterSet. + Possible values include: 'NotSpecified', 'UNOB', 'UNOA', 'UNOC', 'UNOD', + 'UNOE', 'UNOF', 'UNOG', 'UNOH', 'UNOI', 'UNOJ', 'UNOK', 'UNOX', 'UNOY', + 'KECA' + :type character_set: str or ~azure.mgmt.logic.models.EdifactCharacterSet + :param decimal_point_indicator: Required. The EDIFACT frame setting + decimal indicator. Possible values include: 'NotSpecified', 'Comma', + 'Decimal' + :type decimal_point_indicator: str or + ~azure.mgmt.logic.models.EdifactDecimalIndicator + :param segment_terminator_suffix: Required. The EDIFACT frame setting + segment terminator suffix. Possible values include: 'NotSpecified', + 'None', 'CR', 'LF', 'CRLF' + :type segment_terminator_suffix: str or + ~azure.mgmt.logic.models.SegmentTerminatorSuffix + """ + + _validation = { + 'protocol_version': {'required': True}, + 'data_element_separator': {'required': True}, + 'component_separator': {'required': True}, + 'segment_terminator': {'required': True}, + 'release_indicator': {'required': True}, + 'repetition_separator': {'required': True}, + 'character_set': {'required': True}, + 'decimal_point_indicator': {'required': True}, + 'segment_terminator_suffix': {'required': True}, + } + + _attribute_map = { + 'service_code_list_directory_version': {'key': 'serviceCodeListDirectoryVersion', 'type': 'str'}, + 'character_encoding': {'key': 'characterEncoding', 'type': 'str'}, + 'protocol_version': {'key': 'protocolVersion', 'type': 'int'}, + 'data_element_separator': {'key': 'dataElementSeparator', 'type': 'int'}, + 'component_separator': {'key': 'componentSeparator', 'type': 'int'}, + 'segment_terminator': {'key': 'segmentTerminator', 'type': 'int'}, + 'release_indicator': {'key': 'releaseIndicator', 'type': 'int'}, + 'repetition_separator': {'key': 'repetitionSeparator', 'type': 'int'}, + 'character_set': {'key': 'characterSet', 'type': 'str'}, + 'decimal_point_indicator': {'key': 'decimalPointIndicator', 'type': 'EdifactDecimalIndicator'}, + 'segment_terminator_suffix': {'key': 'segmentTerminatorSuffix', 'type': 'SegmentTerminatorSuffix'}, + } + + def __init__(self, *, protocol_version: int, data_element_separator: int, component_separator: int, segment_terminator: int, release_indicator: int, repetition_separator: int, character_set, decimal_point_indicator, segment_terminator_suffix, service_code_list_directory_version: str=None, character_encoding: str=None, **kwargs) -> None: + super(EdifactFramingSettings, self).__init__(**kwargs) + self.service_code_list_directory_version = service_code_list_directory_version + self.character_encoding = character_encoding + self.protocol_version = protocol_version + self.data_element_separator = data_element_separator + self.component_separator = component_separator + self.segment_terminator = segment_terminator + self.release_indicator = release_indicator + self.repetition_separator = repetition_separator + self.character_set = character_set + self.decimal_point_indicator = decimal_point_indicator + self.segment_terminator_suffix = segment_terminator_suffix + + +class EdifactMessageFilter(Model): + """The Edifact message filter for odata query. + + All required parameters must be populated in order to send to Azure. + + :param message_filter_type: Required. The message filter type. Possible + values include: 'NotSpecified', 'Include', 'Exclude' + :type message_filter_type: str or + ~azure.mgmt.logic.models.MessageFilterType + """ + + _validation = { + 'message_filter_type': {'required': True}, + } + + _attribute_map = { + 'message_filter_type': {'key': 'messageFilterType', 'type': 'str'}, + } + + def __init__(self, *, message_filter_type, **kwargs) -> None: + super(EdifactMessageFilter, self).__init__(**kwargs) + self.message_filter_type = message_filter_type + + +class EdifactMessageIdentifier(Model): + """The Edifact message identifier. + + All required parameters must be populated in order to send to Azure. + + :param message_id: Required. The message id on which this envelope + settings has to be applied. + :type message_id: str + """ + + _validation = { + 'message_id': {'required': True}, + } + + _attribute_map = { + 'message_id': {'key': 'messageId', 'type': 'str'}, + } + + def __init__(self, *, message_id: str, **kwargs) -> None: + super(EdifactMessageIdentifier, self).__init__(**kwargs) + self.message_id = message_id + + +class EdifactOneWayAgreement(Model): + """The Edifact one way agreement. + + All required parameters must be populated in order to send to Azure. + + :param sender_business_identity: Required. The sender business identity + :type sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :param receiver_business_identity: Required. The receiver business + identity + :type receiver_business_identity: + ~azure.mgmt.logic.models.BusinessIdentity + :param protocol_settings: Required. The EDIFACT protocol settings. + :type protocol_settings: ~azure.mgmt.logic.models.EdifactProtocolSettings + """ + + _validation = { + 'sender_business_identity': {'required': True}, + 'receiver_business_identity': {'required': True}, + 'protocol_settings': {'required': True}, + } + + _attribute_map = { + 'sender_business_identity': {'key': 'senderBusinessIdentity', 'type': 'BusinessIdentity'}, + 'receiver_business_identity': {'key': 'receiverBusinessIdentity', 'type': 'BusinessIdentity'}, + 'protocol_settings': {'key': 'protocolSettings', 'type': 'EdifactProtocolSettings'}, + } + + def __init__(self, *, sender_business_identity, receiver_business_identity, protocol_settings, **kwargs) -> None: + super(EdifactOneWayAgreement, self).__init__(**kwargs) + self.sender_business_identity = sender_business_identity + self.receiver_business_identity = receiver_business_identity + self.protocol_settings = protocol_settings + + +class EdifactProcessingSettings(Model): + """The Edifact agreement protocol settings. + + All required parameters must be populated in order to send to Azure. + + :param mask_security_info: Required. The value indicating whether to mask + security information. + :type mask_security_info: bool + :param preserve_interchange: Required. The value indicating whether to + preserve interchange. + :type preserve_interchange: bool + :param suspend_interchange_on_error: Required. The value indicating + whether to suspend interchange on error. + :type suspend_interchange_on_error: bool + :param create_empty_xml_tags_for_trailing_separators: Required. The value + indicating whether to create empty xml tags for trailing separators. + :type create_empty_xml_tags_for_trailing_separators: bool + :param use_dot_as_decimal_separator: Required. The value indicating + whether to use dot as decimal separator. + :type use_dot_as_decimal_separator: bool + """ + + _validation = { + 'mask_security_info': {'required': True}, + 'preserve_interchange': {'required': True}, + 'suspend_interchange_on_error': {'required': True}, + 'create_empty_xml_tags_for_trailing_separators': {'required': True}, + 'use_dot_as_decimal_separator': {'required': True}, + } + + _attribute_map = { + 'mask_security_info': {'key': 'maskSecurityInfo', 'type': 'bool'}, + 'preserve_interchange': {'key': 'preserveInterchange', 'type': 'bool'}, + 'suspend_interchange_on_error': {'key': 'suspendInterchangeOnError', 'type': 'bool'}, + 'create_empty_xml_tags_for_trailing_separators': {'key': 'createEmptyXmlTagsForTrailingSeparators', 'type': 'bool'}, + 'use_dot_as_decimal_separator': {'key': 'useDotAsDecimalSeparator', 'type': 'bool'}, + } + + def __init__(self, *, mask_security_info: bool, preserve_interchange: bool, suspend_interchange_on_error: bool, create_empty_xml_tags_for_trailing_separators: bool, use_dot_as_decimal_separator: bool, **kwargs) -> None: + super(EdifactProcessingSettings, self).__init__(**kwargs) + self.mask_security_info = mask_security_info + self.preserve_interchange = preserve_interchange + self.suspend_interchange_on_error = suspend_interchange_on_error + self.create_empty_xml_tags_for_trailing_separators = create_empty_xml_tags_for_trailing_separators + self.use_dot_as_decimal_separator = use_dot_as_decimal_separator + + +class EdifactProtocolSettings(Model): + """The Edifact agreement protocol settings. + + All required parameters must be populated in order to send to Azure. + + :param validation_settings: Required. The EDIFACT validation settings. + :type validation_settings: + ~azure.mgmt.logic.models.EdifactValidationSettings + :param framing_settings: Required. The EDIFACT framing settings. + :type framing_settings: ~azure.mgmt.logic.models.EdifactFramingSettings + :param envelope_settings: Required. The EDIFACT envelope settings. + :type envelope_settings: ~azure.mgmt.logic.models.EdifactEnvelopeSettings + :param acknowledgement_settings: Required. The EDIFACT acknowledgement + settings. + :type acknowledgement_settings: + ~azure.mgmt.logic.models.EdifactAcknowledgementSettings + :param message_filter: Required. The EDIFACT message filter. + :type message_filter: ~azure.mgmt.logic.models.EdifactMessageFilter + :param processing_settings: Required. The EDIFACT processing Settings. + :type processing_settings: + ~azure.mgmt.logic.models.EdifactProcessingSettings + :param envelope_overrides: The EDIFACT envelope override settings. + :type envelope_overrides: + list[~azure.mgmt.logic.models.EdifactEnvelopeOverride] + :param message_filter_list: The EDIFACT message filter list. + :type message_filter_list: + list[~azure.mgmt.logic.models.EdifactMessageIdentifier] + :param schema_references: Required. The EDIFACT schema references. + :type schema_references: + list[~azure.mgmt.logic.models.EdifactSchemaReference] + :param validation_overrides: The EDIFACT validation override settings. + :type validation_overrides: + list[~azure.mgmt.logic.models.EdifactValidationOverride] + :param edifact_delimiter_overrides: The EDIFACT delimiter override + settings. + :type edifact_delimiter_overrides: + list[~azure.mgmt.logic.models.EdifactDelimiterOverride] + """ + + _validation = { + 'validation_settings': {'required': True}, + 'framing_settings': {'required': True}, + 'envelope_settings': {'required': True}, + 'acknowledgement_settings': {'required': True}, + 'message_filter': {'required': True}, + 'processing_settings': {'required': True}, + 'schema_references': {'required': True}, + } + + _attribute_map = { + 'validation_settings': {'key': 'validationSettings', 'type': 'EdifactValidationSettings'}, + 'framing_settings': {'key': 'framingSettings', 'type': 'EdifactFramingSettings'}, + 'envelope_settings': {'key': 'envelopeSettings', 'type': 'EdifactEnvelopeSettings'}, + 'acknowledgement_settings': {'key': 'acknowledgementSettings', 'type': 'EdifactAcknowledgementSettings'}, + 'message_filter': {'key': 'messageFilter', 'type': 'EdifactMessageFilter'}, + 'processing_settings': {'key': 'processingSettings', 'type': 'EdifactProcessingSettings'}, + 'envelope_overrides': {'key': 'envelopeOverrides', 'type': '[EdifactEnvelopeOverride]'}, + 'message_filter_list': {'key': 'messageFilterList', 'type': '[EdifactMessageIdentifier]'}, + 'schema_references': {'key': 'schemaReferences', 'type': '[EdifactSchemaReference]'}, + 'validation_overrides': {'key': 'validationOverrides', 'type': '[EdifactValidationOverride]'}, + 'edifact_delimiter_overrides': {'key': 'edifactDelimiterOverrides', 'type': '[EdifactDelimiterOverride]'}, + } + + def __init__(self, *, validation_settings, framing_settings, envelope_settings, acknowledgement_settings, message_filter, processing_settings, schema_references, envelope_overrides=None, message_filter_list=None, validation_overrides=None, edifact_delimiter_overrides=None, **kwargs) -> None: + super(EdifactProtocolSettings, self).__init__(**kwargs) + self.validation_settings = validation_settings + self.framing_settings = framing_settings + self.envelope_settings = envelope_settings + self.acknowledgement_settings = acknowledgement_settings + self.message_filter = message_filter + self.processing_settings = processing_settings + self.envelope_overrides = envelope_overrides + self.message_filter_list = message_filter_list + self.schema_references = schema_references + self.validation_overrides = validation_overrides + self.edifact_delimiter_overrides = edifact_delimiter_overrides + + +class EdifactSchemaReference(Model): + """The Edifact schema reference. + + All required parameters must be populated in order to send to Azure. + + :param message_id: Required. The message id. + :type message_id: str + :param message_version: Required. The message version. + :type message_version: str + :param message_release: Required. The message release version. + :type message_release: str + :param sender_application_id: The sender application id. + :type sender_application_id: str + :param sender_application_qualifier: The sender application qualifier. + :type sender_application_qualifier: str + :param association_assigned_code: The association assigned code. + :type association_assigned_code: str + :param schema_name: Required. The schema name. + :type schema_name: str + """ + + _validation = { + 'message_id': {'required': True}, + 'message_version': {'required': True}, + 'message_release': {'required': True}, + 'schema_name': {'required': True}, + } + + _attribute_map = { + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'message_version': {'key': 'messageVersion', 'type': 'str'}, + 'message_release': {'key': 'messageRelease', 'type': 'str'}, + 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, + 'sender_application_qualifier': {'key': 'senderApplicationQualifier', 'type': 'str'}, + 'association_assigned_code': {'key': 'associationAssignedCode', 'type': 'str'}, + 'schema_name': {'key': 'schemaName', 'type': 'str'}, + } + + def __init__(self, *, message_id: str, message_version: str, message_release: str, schema_name: str, sender_application_id: str=None, sender_application_qualifier: str=None, association_assigned_code: str=None, **kwargs) -> None: + super(EdifactSchemaReference, self).__init__(**kwargs) + self.message_id = message_id + self.message_version = message_version + self.message_release = message_release + self.sender_application_id = sender_application_id + self.sender_application_qualifier = sender_application_qualifier + self.association_assigned_code = association_assigned_code + self.schema_name = schema_name + + +class EdifactValidationOverride(Model): + """The Edifact validation override settings. + + All required parameters must be populated in order to send to Azure. + + :param message_id: Required. The message id on which the validation + settings has to be applied. + :type message_id: str + :param enforce_character_set: Required. The value indicating whether to + validate character Set. + :type enforce_character_set: bool + :param validate_edi_types: Required. The value indicating whether to + validate EDI types. + :type validate_edi_types: bool + :param validate_xsd_types: Required. The value indicating whether to + validate XSD types. + :type validate_xsd_types: bool + :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to allow leading and trailing spaces and zeroes. + :type allow_leading_and_trailing_spaces_and_zeroes: bool + :param trailing_separator_policy: Required. The trailing separator policy. + Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', + 'Mandatory' + :type trailing_separator_policy: str or + ~azure.mgmt.logic.models.TrailingSeparatorPolicy + :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to trim leading and trailing spaces and zeroes. + :type trim_leading_and_trailing_spaces_and_zeroes: bool + """ + + _validation = { + 'message_id': {'required': True}, + 'enforce_character_set': {'required': True}, + 'validate_edi_types': {'required': True}, + 'validate_xsd_types': {'required': True}, + 'allow_leading_and_trailing_spaces_and_zeroes': {'required': True}, + 'trailing_separator_policy': {'required': True}, + 'trim_leading_and_trailing_spaces_and_zeroes': {'required': True}, + } + + _attribute_map = { + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'enforce_character_set': {'key': 'enforceCharacterSet', 'type': 'bool'}, + 'validate_edi_types': {'key': 'validateEDITypes', 'type': 'bool'}, + 'validate_xsd_types': {'key': 'validateXSDTypes', 'type': 'bool'}, + 'allow_leading_and_trailing_spaces_and_zeroes': {'key': 'allowLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, + 'trailing_separator_policy': {'key': 'trailingSeparatorPolicy', 'type': 'str'}, + 'trim_leading_and_trailing_spaces_and_zeroes': {'key': 'trimLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, + } + + def __init__(self, *, message_id: str, enforce_character_set: bool, validate_edi_types: bool, validate_xsd_types: bool, allow_leading_and_trailing_spaces_and_zeroes: bool, trailing_separator_policy, trim_leading_and_trailing_spaces_and_zeroes: bool, **kwargs) -> None: + super(EdifactValidationOverride, self).__init__(**kwargs) + self.message_id = message_id + self.enforce_character_set = enforce_character_set + self.validate_edi_types = validate_edi_types + self.validate_xsd_types = validate_xsd_types + self.allow_leading_and_trailing_spaces_and_zeroes = allow_leading_and_trailing_spaces_and_zeroes + self.trailing_separator_policy = trailing_separator_policy + self.trim_leading_and_trailing_spaces_and_zeroes = trim_leading_and_trailing_spaces_and_zeroes + + +class EdifactValidationSettings(Model): + """The Edifact agreement validation settings. + + All required parameters must be populated in order to send to Azure. + + :param validate_character_set: Required. The value indicating whether to + validate character set in the message. + :type validate_character_set: bool + :param check_duplicate_interchange_control_number: Required. The value + indicating whether to check for duplicate interchange control number. + :type check_duplicate_interchange_control_number: bool + :param interchange_control_number_validity_days: Required. The validity + period of interchange control number. + :type interchange_control_number_validity_days: int + :param check_duplicate_group_control_number: Required. The value + indicating whether to check for duplicate group control number. + :type check_duplicate_group_control_number: bool + :param check_duplicate_transaction_set_control_number: Required. The value + indicating whether to check for duplicate transaction set control number. + :type check_duplicate_transaction_set_control_number: bool + :param validate_edi_types: Required. The value indicating whether to + Whether to validate EDI types. + :type validate_edi_types: bool + :param validate_xsd_types: Required. The value indicating whether to + Whether to validate XSD types. + :type validate_xsd_types: bool + :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to allow leading and trailing spaces and zeroes. + :type allow_leading_and_trailing_spaces_and_zeroes: bool + :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to trim leading and trailing spaces and zeroes. + :type trim_leading_and_trailing_spaces_and_zeroes: bool + :param trailing_separator_policy: Required. The trailing separator policy. + Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', + 'Mandatory' + :type trailing_separator_policy: str or + ~azure.mgmt.logic.models.TrailingSeparatorPolicy + """ + + _validation = { + 'validate_character_set': {'required': True}, + 'check_duplicate_interchange_control_number': {'required': True}, + 'interchange_control_number_validity_days': {'required': True}, + 'check_duplicate_group_control_number': {'required': True}, + 'check_duplicate_transaction_set_control_number': {'required': True}, + 'validate_edi_types': {'required': True}, + 'validate_xsd_types': {'required': True}, + 'allow_leading_and_trailing_spaces_and_zeroes': {'required': True}, + 'trim_leading_and_trailing_spaces_and_zeroes': {'required': True}, + 'trailing_separator_policy': {'required': True}, + } + + _attribute_map = { + 'validate_character_set': {'key': 'validateCharacterSet', 'type': 'bool'}, + 'check_duplicate_interchange_control_number': {'key': 'checkDuplicateInterchangeControlNumber', 'type': 'bool'}, + 'interchange_control_number_validity_days': {'key': 'interchangeControlNumberValidityDays', 'type': 'int'}, + 'check_duplicate_group_control_number': {'key': 'checkDuplicateGroupControlNumber', 'type': 'bool'}, + 'check_duplicate_transaction_set_control_number': {'key': 'checkDuplicateTransactionSetControlNumber', 'type': 'bool'}, + 'validate_edi_types': {'key': 'validateEDITypes', 'type': 'bool'}, + 'validate_xsd_types': {'key': 'validateXSDTypes', 'type': 'bool'}, + 'allow_leading_and_trailing_spaces_and_zeroes': {'key': 'allowLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, + 'trim_leading_and_trailing_spaces_and_zeroes': {'key': 'trimLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, + 'trailing_separator_policy': {'key': 'trailingSeparatorPolicy', 'type': 'str'}, + } + + def __init__(self, *, validate_character_set: bool, check_duplicate_interchange_control_number: bool, interchange_control_number_validity_days: int, check_duplicate_group_control_number: bool, check_duplicate_transaction_set_control_number: bool, validate_edi_types: bool, validate_xsd_types: bool, allow_leading_and_trailing_spaces_and_zeroes: bool, trim_leading_and_trailing_spaces_and_zeroes: bool, trailing_separator_policy, **kwargs) -> None: + super(EdifactValidationSettings, self).__init__(**kwargs) + self.validate_character_set = validate_character_set + self.check_duplicate_interchange_control_number = check_duplicate_interchange_control_number + self.interchange_control_number_validity_days = interchange_control_number_validity_days + self.check_duplicate_group_control_number = check_duplicate_group_control_number + self.check_duplicate_transaction_set_control_number = check_duplicate_transaction_set_control_number + self.validate_edi_types = validate_edi_types + self.validate_xsd_types = validate_xsd_types + self.allow_leading_and_trailing_spaces_and_zeroes = allow_leading_and_trailing_spaces_and_zeroes + self.trim_leading_and_trailing_spaces_and_zeroes = trim_leading_and_trailing_spaces_and_zeroes + self.trailing_separator_policy = trailing_separator_policy + + +class ErrorProperties(Model): + """Error properties indicate why the Logic service was not able to process the + incoming request. The reason is provided in the error message. + + :param code: Error code. + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(ErrorProperties, self).__init__(**kwargs) + self.code = code + self.message = message + + +class ErrorResponse(Model): + """Error response indicates Logic service is not able to process the incoming + request. The error property contains the error details. + + :param error: The error properties. + :type error: ~azure.mgmt.logic.models.ErrorProperties + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorProperties'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class Expression(Model): + """Expression. + + :param text: + :type text: str + :param value: + :type value: object + :param subexpressions: + :type subexpressions: list[~azure.mgmt.logic.models.Expression] + :param error: + :type error: ~azure.mgmt.logic.models.AzureResourceErrorInfo + """ + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'object'}, + 'subexpressions': {'key': 'subexpressions', 'type': '[Expression]'}, + 'error': {'key': 'error', 'type': 'AzureResourceErrorInfo'}, + } + + def __init__(self, *, text: str=None, value=None, subexpressions=None, error=None, **kwargs) -> None: + super(Expression, self).__init__(**kwargs) + self.text = text + self.value = value + self.subexpressions = subexpressions + self.error = error + + +class ExpressionRoot(Expression): + """ExpressionRoot. + + :param text: + :type text: str + :param value: + :type value: object + :param subexpressions: + :type subexpressions: list[~azure.mgmt.logic.models.Expression] + :param error: + :type error: ~azure.mgmt.logic.models.AzureResourceErrorInfo + :param path: The path. + :type path: str + """ + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'object'}, + 'subexpressions': {'key': 'subexpressions', 'type': '[Expression]'}, + 'error': {'key': 'error', 'type': 'AzureResourceErrorInfo'}, + 'path': {'key': 'path', 'type': 'str'}, + } + + def __init__(self, *, text: str=None, value=None, subexpressions=None, error=None, path: str=None, **kwargs) -> None: + super(ExpressionRoot, self).__init__(text=text, value=value, subexpressions=subexpressions, error=error, **kwargs) + self.path = path + + +class GenerateUpgradedDefinitionParameters(Model): + """The parameters to generate upgraded definition. + + :param target_schema_version: The target schema version. + :type target_schema_version: str + """ + + _attribute_map = { + 'target_schema_version': {'key': 'targetSchemaVersion', 'type': 'str'}, + } + + def __init__(self, *, target_schema_version: str=None, **kwargs) -> None: + super(GenerateUpgradedDefinitionParameters, self).__init__(**kwargs) + self.target_schema_version = target_schema_version + + +class GetCallbackUrlParameters(Model): + """The callback url parameters. + + :param not_after: The expiry time. + :type not_after: datetime + :param key_type: The key type. Possible values include: 'NotSpecified', + 'Primary', 'Secondary' + :type key_type: str or ~azure.mgmt.logic.models.KeyType + """ + + _attribute_map = { + 'not_after': {'key': 'notAfter', 'type': 'iso-8601'}, + 'key_type': {'key': 'keyType', 'type': 'str'}, + } + + def __init__(self, *, not_after=None, key_type=None, **kwargs) -> None: + super(GetCallbackUrlParameters, self).__init__(**kwargs) + self.not_after = not_after + self.key_type = key_type + + +class IntegrationAccount(Resource): + """The integration account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param properties: The integration account properties. + :type properties: object + :param sku: The sku. + :type sku: ~azure.mgmt.logic.models.IntegrationAccountSku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'sku': {'key': 'sku', 'type': 'IntegrationAccountSku'}, + } + + def __init__(self, *, location: str=None, tags=None, properties=None, sku=None, **kwargs) -> None: + super(IntegrationAccount, self).__init__(location=location, tags=tags, **kwargs) + self.properties = properties + self.sku = sku + + +class IntegrationAccountAgreement(Resource): + """The integration account agreement. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :ivar created_time: The created time. + :vartype created_time: datetime + :ivar changed_time: The changed time. + :vartype changed_time: datetime + :param metadata: The metadata. + :type metadata: object + :param agreement_type: Required. The agreement type. Possible values + include: 'NotSpecified', 'AS2', 'X12', 'Edifact' + :type agreement_type: str or ~azure.mgmt.logic.models.AgreementType + :param host_partner: Required. The integration account partner that is set + as host partner for this agreement. + :type host_partner: str + :param guest_partner: Required. The integration account partner that is + set as guest partner for this agreement. + :type guest_partner: str + :param host_identity: Required. The business identity of the host partner. + :type host_identity: ~azure.mgmt.logic.models.BusinessIdentity + :param guest_identity: Required. The business identity of the guest + partner. + :type guest_identity: ~azure.mgmt.logic.models.BusinessIdentity + :param content: Required. The agreement content. + :type content: ~azure.mgmt.logic.models.AgreementContent + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'agreement_type': {'required': True}, + 'host_partner': {'required': True}, + 'guest_partner': {'required': True}, + 'host_identity': {'required': True}, + 'guest_identity': {'required': True}, + 'content': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'properties.metadata', 'type': 'object'}, + 'agreement_type': {'key': 'properties.agreementType', 'type': 'AgreementType'}, + 'host_partner': {'key': 'properties.hostPartner', 'type': 'str'}, + 'guest_partner': {'key': 'properties.guestPartner', 'type': 'str'}, + 'host_identity': {'key': 'properties.hostIdentity', 'type': 'BusinessIdentity'}, + 'guest_identity': {'key': 'properties.guestIdentity', 'type': 'BusinessIdentity'}, + 'content': {'key': 'properties.content', 'type': 'AgreementContent'}, + } + + def __init__(self, *, agreement_type, host_partner: str, guest_partner: str, host_identity, guest_identity, content, location: str=None, tags=None, metadata=None, **kwargs) -> None: + super(IntegrationAccountAgreement, self).__init__(location=location, tags=tags, **kwargs) + self.created_time = None + self.changed_time = None + self.metadata = metadata + self.agreement_type = agreement_type + self.host_partner = host_partner + self.guest_partner = guest_partner + self.host_identity = host_identity + self.guest_identity = guest_identity + self.content = content + + +class IntegrationAccountAgreementFilter(Model): + """The integration account agreement filter for odata query. + + All required parameters must be populated in order to send to Azure. + + :param agreement_type: Required. The agreement type of integration account + agreement. Possible values include: 'NotSpecified', 'AS2', 'X12', + 'Edifact' + :type agreement_type: str or ~azure.mgmt.logic.models.AgreementType + """ + + _validation = { + 'agreement_type': {'required': True}, + } + + _attribute_map = { + 'agreement_type': {'key': 'agreementType', 'type': 'AgreementType'}, + } + + def __init__(self, *, agreement_type, **kwargs) -> None: + super(IntegrationAccountAgreementFilter, self).__init__(**kwargs) + self.agreement_type = agreement_type + + +class IntegrationAccountCertificate(Resource): + """The integration account certificate. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :ivar created_time: The created time. + :vartype created_time: datetime + :ivar changed_time: The changed time. + :vartype changed_time: datetime + :param metadata: The metadata. + :type metadata: object + :param key: The key details in the key vault. + :type key: ~azure.mgmt.logic.models.KeyVaultKeyReference + :param public_certificate: The public certificate. + :type public_certificate: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'properties.metadata', 'type': 'object'}, + 'key': {'key': 'properties.key', 'type': 'KeyVaultKeyReference'}, + 'public_certificate': {'key': 'properties.publicCertificate', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, metadata=None, key=None, public_certificate: str=None, **kwargs) -> None: + super(IntegrationAccountCertificate, self).__init__(location=location, tags=tags, **kwargs) + self.created_time = None + self.changed_time = None + self.metadata = metadata + self.key = key + self.public_certificate = public_certificate + + +class IntegrationAccountMap(Resource): + """The integration account map. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param map_type: Required. The map type. Possible values include: + 'NotSpecified', 'Xslt', 'Xslt20', 'Xslt30', 'Liquid' + :type map_type: str or ~azure.mgmt.logic.models.MapType + :param parameters_schema: The parameters schema of integration account + map. + :type parameters_schema: + ~azure.mgmt.logic.models.IntegrationAccountMapPropertiesParametersSchema + :ivar created_time: The created time. + :vartype created_time: datetime + :ivar changed_time: The changed time. + :vartype changed_time: datetime + :param content: The content. + :type content: str + :param content_type: The content type. + :type content_type: str + :ivar content_link: The content link. + :vartype content_link: ~azure.mgmt.logic.models.ContentLink + :param metadata: The metadata. + :type metadata: object + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'map_type': {'required': True}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'content_link': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'map_type': {'key': 'properties.mapType', 'type': 'str'}, + 'parameters_schema': {'key': 'properties.parametersSchema', 'type': 'IntegrationAccountMapPropertiesParametersSchema'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, + 'content': {'key': 'properties.content', 'type': 'str'}, + 'content_type': {'key': 'properties.contentType', 'type': 'str'}, + 'content_link': {'key': 'properties.contentLink', 'type': 'ContentLink'}, + 'metadata': {'key': 'properties.metadata', 'type': 'object'}, + } + + def __init__(self, *, map_type, location: str=None, tags=None, parameters_schema=None, content: str=None, content_type: str=None, metadata=None, **kwargs) -> None: + super(IntegrationAccountMap, self).__init__(location=location, tags=tags, **kwargs) + self.map_type = map_type + self.parameters_schema = parameters_schema + self.created_time = None + self.changed_time = None + self.content = content + self.content_type = content_type + self.content_link = None + self.metadata = metadata + + +class IntegrationAccountMapFilter(Model): + """The integration account map filter for odata query. + + All required parameters must be populated in order to send to Azure. + + :param map_type: Required. The map type of integration account map. + Possible values include: 'NotSpecified', 'Xslt', 'Xslt20', 'Xslt30', + 'Liquid' + :type map_type: str or ~azure.mgmt.logic.models.MapType + """ + + _validation = { + 'map_type': {'required': True}, + } + + _attribute_map = { + 'map_type': {'key': 'mapType', 'type': 'str'}, + } + + def __init__(self, *, map_type, **kwargs) -> None: + super(IntegrationAccountMapFilter, self).__init__(**kwargs) + self.map_type = map_type + + +class IntegrationAccountMapPropertiesParametersSchema(Model): + """The parameters schema of integration account map. + + :param ref: The reference name. + :type ref: str + """ + + _attribute_map = { + 'ref': {'key': 'ref', 'type': 'str'}, + } + + def __init__(self, *, ref: str=None, **kwargs) -> None: + super(IntegrationAccountMapPropertiesParametersSchema, self).__init__(**kwargs) + self.ref = ref + + +class IntegrationAccountPartner(Resource): + """The integration account partner. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param partner_type: Required. The partner type. Possible values include: + 'NotSpecified', 'B2B' + :type partner_type: str or ~azure.mgmt.logic.models.PartnerType + :ivar created_time: The created time. + :vartype created_time: datetime + :ivar changed_time: The changed time. + :vartype changed_time: datetime + :param metadata: The metadata. + :type metadata: object + :param content: Required. The partner content. + :type content: ~azure.mgmt.logic.models.PartnerContent + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'partner_type': {'required': True}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'content': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'partner_type': {'key': 'properties.partnerType', 'type': 'str'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'properties.metadata', 'type': 'object'}, + 'content': {'key': 'properties.content', 'type': 'PartnerContent'}, + } + + def __init__(self, *, partner_type, content, location: str=None, tags=None, metadata=None, **kwargs) -> None: + super(IntegrationAccountPartner, self).__init__(location=location, tags=tags, **kwargs) + self.partner_type = partner_type + self.created_time = None + self.changed_time = None + self.metadata = metadata + self.content = content + + +class IntegrationAccountPartnerFilter(Model): + """The integration account partner filter for odata query. + + All required parameters must be populated in order to send to Azure. + + :param partner_type: Required. The partner type of integration account + partner. Possible values include: 'NotSpecified', 'B2B' + :type partner_type: str or ~azure.mgmt.logic.models.PartnerType + """ + + _validation = { + 'partner_type': {'required': True}, + } + + _attribute_map = { + 'partner_type': {'key': 'partnerType', 'type': 'str'}, + } + + def __init__(self, *, partner_type, **kwargs) -> None: + super(IntegrationAccountPartnerFilter, self).__init__(**kwargs) + self.partner_type = partner_type + + +class IntegrationAccountSchema(Resource): + """The integration account schema. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param schema_type: Required. The schema type. Possible values include: + 'NotSpecified', 'Xml' + :type schema_type: str or ~azure.mgmt.logic.models.SchemaType + :param target_namespace: The target namespace of the schema. + :type target_namespace: str + :param document_name: The document name. + :type document_name: str + :param file_name: The file name. + :type file_name: str + :ivar created_time: The created time. + :vartype created_time: datetime + :ivar changed_time: The changed time. + :vartype changed_time: datetime + :param metadata: The metadata. + :type metadata: object + :param content: The content. + :type content: str + :param content_type: The content type. + :type content_type: str + :ivar content_link: The content link. + :vartype content_link: ~azure.mgmt.logic.models.ContentLink + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'schema_type': {'required': True}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'content_link': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'schema_type': {'key': 'properties.schemaType', 'type': 'str'}, + 'target_namespace': {'key': 'properties.targetNamespace', 'type': 'str'}, + 'document_name': {'key': 'properties.documentName', 'type': 'str'}, + 'file_name': {'key': 'properties.fileName', 'type': 'str'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'properties.metadata', 'type': 'object'}, + 'content': {'key': 'properties.content', 'type': 'str'}, + 'content_type': {'key': 'properties.contentType', 'type': 'str'}, + 'content_link': {'key': 'properties.contentLink', 'type': 'ContentLink'}, + } + + def __init__(self, *, schema_type, location: str=None, tags=None, target_namespace: str=None, document_name: str=None, file_name: str=None, metadata=None, content: str=None, content_type: str=None, **kwargs) -> None: + super(IntegrationAccountSchema, self).__init__(location=location, tags=tags, **kwargs) + self.schema_type = schema_type + self.target_namespace = target_namespace + self.document_name = document_name + self.file_name = file_name + self.created_time = None + self.changed_time = None + self.metadata = metadata + self.content = content + self.content_type = content_type + self.content_link = None + + +class IntegrationAccountSchemaFilter(Model): + """The integration account schema filter for odata query. + + All required parameters must be populated in order to send to Azure. + + :param schema_type: Required. The schema type of integration account + schema. Possible values include: 'NotSpecified', 'Xml' + :type schema_type: str or ~azure.mgmt.logic.models.SchemaType + """ + + _validation = { + 'schema_type': {'required': True}, + } + + _attribute_map = { + 'schema_type': {'key': 'schemaType', 'type': 'str'}, + } + + def __init__(self, *, schema_type, **kwargs) -> None: + super(IntegrationAccountSchemaFilter, self).__init__(**kwargs) + self.schema_type = schema_type + + +class IntegrationAccountSession(Resource): + """The integration account session. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :ivar created_time: The created time. + :vartype created_time: datetime + :ivar changed_time: The changed time. + :vartype changed_time: datetime + :param content: The session content. + :type content: object + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, + 'content': {'key': 'properties.content', 'type': 'object'}, + } + + def __init__(self, *, location: str=None, tags=None, content=None, **kwargs) -> None: + super(IntegrationAccountSession, self).__init__(location=location, tags=tags, **kwargs) + self.created_time = None + self.changed_time = None + self.content = content + + +class IntegrationAccountSessionFilter(Model): + """The integration account session filter. + + All required parameters must be populated in order to send to Azure. + + :param changed_time: Required. The changed time of integration account + sessions. + :type changed_time: datetime + """ + + _validation = { + 'changed_time': {'required': True}, + } + + _attribute_map = { + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, changed_time, **kwargs) -> None: + super(IntegrationAccountSessionFilter, self).__init__(**kwargs) + self.changed_time = changed_time + + +class IntegrationAccountSku(Model): + """The integration account sku. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The sku name. Possible values include: + 'NotSpecified', 'Free', 'Basic', 'Standard' + :type name: str or ~azure.mgmt.logic.models.IntegrationAccountSkuName + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name, **kwargs) -> None: + super(IntegrationAccountSku, self).__init__(**kwargs) + self.name = name + + +class JsonSchema(Model): + """The JSON schema. + + :param title: The JSON title. + :type title: str + :param content: The JSON content. + :type content: str + """ + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'content': {'key': 'content', 'type': 'str'}, + } + + def __init__(self, *, title: str=None, content: str=None, **kwargs) -> None: + super(JsonSchema, self).__init__(**kwargs) + self.title = title + self.content = content + + +class KeyVaultKey(Model): + """The key vault key. + + :param kid: The key id. + :type kid: str + :param attributes: The key attributes. + :type attributes: ~azure.mgmt.logic.models.KeyVaultKeyAttributes + """ + + _attribute_map = { + 'kid': {'key': 'kid', 'type': 'str'}, + 'attributes': {'key': 'attributes', 'type': 'KeyVaultKeyAttributes'}, + } + + def __init__(self, *, kid: str=None, attributes=None, **kwargs) -> None: + super(KeyVaultKey, self).__init__(**kwargs) + self.kid = kid + self.attributes = attributes + + +class KeyVaultKeyAttributes(Model): + """The key attributes. + + :param enabled: Whether the key is enabled or not. + :type enabled: bool + :param created: When the key was created. + :type created: long + :param updated: When the key was updated. + :type updated: long + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'created': {'key': 'created', 'type': 'long'}, + 'updated': {'key': 'updated', 'type': 'long'}, + } + + def __init__(self, *, enabled: bool=None, created: int=None, updated: int=None, **kwargs) -> None: + super(KeyVaultKeyAttributes, self).__init__(**kwargs) + self.enabled = enabled + self.created = created + self.updated = updated + + +class KeyVaultKeyReference(Model): + """The reference to the key vault key. + + All required parameters must be populated in order to send to Azure. + + :param key_vault: Required. The key vault reference. + :type key_vault: ~azure.mgmt.logic.models.KeyVaultKeyReferenceKeyVault + :param key_name: Required. The private key name in key vault. + :type key_name: str + :param key_version: The private key version in key vault. + :type key_version: str + """ + + _validation = { + 'key_vault': {'required': True}, + 'key_name': {'required': True}, + } + + _attribute_map = { + 'key_vault': {'key': 'keyVault', 'type': 'KeyVaultKeyReferenceKeyVault'}, + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'key_version': {'key': 'keyVersion', 'type': 'str'}, + } + + def __init__(self, *, key_vault, key_name: str, key_version: str=None, **kwargs) -> None: + super(KeyVaultKeyReference, self).__init__(**kwargs) + self.key_vault = key_vault + self.key_name = key_name + self.key_version = key_version + + +class KeyVaultKeyReferenceKeyVault(Model): + """The key vault reference. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: The resource id. + :type id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(KeyVaultKeyReferenceKeyVault, self).__init__(**kwargs) + self.id = id + self.name = None + self.type = None + + +class ResourceReference(Model): + """The resource reference. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: The resource id. + :type id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(ResourceReference, self).__init__(**kwargs) + self.id = id + self.name = None + self.type = None + + +class KeyVaultReference(ResourceReference): + """The key vault reference. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: The resource id. + :type id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(KeyVaultReference, self).__init__(id=id, **kwargs) + + +class ListKeyVaultKeysDefinition(Model): + """The list key vault keys definition. + + All required parameters must be populated in order to send to Azure. + + :param key_vault: Required. The key vault reference. + :type key_vault: ~azure.mgmt.logic.models.KeyVaultReference + :param skip_token: The skip token. + :type skip_token: str + """ + + _validation = { + 'key_vault': {'required': True}, + } + + _attribute_map = { + 'key_vault': {'key': 'keyVault', 'type': 'KeyVaultReference'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__(self, *, key_vault, skip_token: str=None, **kwargs) -> None: + super(ListKeyVaultKeysDefinition, self).__init__(**kwargs) + self.key_vault = key_vault + self.skip_token = skip_token + + +class Operation(Model): + """Logic REST API operation. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: The object that represents the operation. + :type display: ~azure.mgmt.logic.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, name: str=None, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display + + +class OperationDisplay(Model): + """The object that represents the operation. + + :param provider: Service provider: Microsoft.Logic + :type provider: str + :param resource: Resource on which the operation is performed: Profile, + endpoint, etc. + :type resource: str + :param operation: Operation type: Read, write, delete, etc. + :type operation: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + + +class OperationResultProperties(Model): + """The run operation result properties. + + :param start_time: The start time of the workflow scope repetition. + :type start_time: datetime + :param end_time: The end time of the workflow scope repetition. + :type end_time: datetime + :param correlation: The correlation properties. + :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation + :param status: The status of the workflow scope repetition. Possible + values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + 'TimedOut', 'Aborted', 'Ignored' + :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + :param code: The workflow scope repetition code. + :type code: str + :param error: + :type error: object + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'correlation': {'key': 'correlation', 'type': 'RunActionCorrelation'}, + 'status': {'key': 'status', 'type': 'str'}, + 'code': {'key': 'code', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'object'}, + } + + def __init__(self, *, start_time=None, end_time=None, correlation=None, status=None, code: str=None, error=None, **kwargs) -> None: + super(OperationResultProperties, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time + self.correlation = correlation + self.status = status + self.code = code + self.error = error + + +class OperationResult(OperationResultProperties): + """The operation result definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param start_time: The start time of the workflow scope repetition. + :type start_time: datetime + :param end_time: The end time of the workflow scope repetition. + :type end_time: datetime + :param correlation: The correlation properties. + :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation + :param status: The status of the workflow scope repetition. Possible + values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + 'TimedOut', 'Aborted', 'Ignored' + :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + :param code: The workflow scope repetition code. + :type code: str + :param error: + :type error: object + :ivar tracking_id: Gets the tracking id. + :vartype tracking_id: str + :ivar inputs: Gets the inputs. + :vartype inputs: object + :ivar inputs_link: Gets the link to inputs. + :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar outputs: Gets the outputs. + :vartype outputs: object + :ivar outputs_link: Gets the link to outputs. + :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar tracked_properties: Gets the tracked properties. + :vartype tracked_properties: object + :param retry_history: Gets the retry histories. + :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] + :param iteration_count: + :type iteration_count: int + """ + + _validation = { + 'tracking_id': {'readonly': True}, + 'inputs': {'readonly': True}, + 'inputs_link': {'readonly': True}, + 'outputs': {'readonly': True}, + 'outputs_link': {'readonly': True}, + 'tracked_properties': {'readonly': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'correlation': {'key': 'correlation', 'type': 'RunActionCorrelation'}, + 'status': {'key': 'status', 'type': 'str'}, + 'code': {'key': 'code', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'object'}, + 'tracking_id': {'key': 'trackingId', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': 'object'}, + 'inputs_link': {'key': 'inputsLink', 'type': 'ContentLink'}, + 'outputs': {'key': 'outputs', 'type': 'object'}, + 'outputs_link': {'key': 'outputsLink', 'type': 'ContentLink'}, + 'tracked_properties': {'key': 'trackedProperties', 'type': 'object'}, + 'retry_history': {'key': 'retryHistory', 'type': '[RetryHistory]'}, + 'iteration_count': {'key': 'iterationCount', 'type': 'int'}, + } + + def __init__(self, *, start_time=None, end_time=None, correlation=None, status=None, code: str=None, error=None, retry_history=None, iteration_count: int=None, **kwargs) -> None: + super(OperationResult, self).__init__(start_time=start_time, end_time=end_time, correlation=correlation, status=status, code=code, error=error, **kwargs) + self.tracking_id = None + self.inputs = None + self.inputs_link = None + self.outputs = None + self.outputs_link = None + self.tracked_properties = None + self.retry_history = retry_history + self.iteration_count = iteration_count + + +class PartnerContent(Model): + """The integration account partner content. + + :param b2b: The B2B partner content. + :type b2b: ~azure.mgmt.logic.models.B2BPartnerContent + """ + + _attribute_map = { + 'b2b': {'key': 'b2b', 'type': 'B2BPartnerContent'}, + } + + def __init__(self, *, b2b=None, **kwargs) -> None: + super(PartnerContent, self).__init__(**kwargs) + self.b2b = b2b + + +class RecurrenceSchedule(Model): + """The recurrence schedule. + + :param minutes: The minutes. + :type minutes: list[int] + :param hours: The hours. + :type hours: list[int] + :param week_days: The days of the week. + :type week_days: list[str or ~azure.mgmt.logic.models.DaysOfWeek] + :param month_days: The month days. + :type month_days: list[int] + :param monthly_occurrences: The monthly occurrences. + :type monthly_occurrences: + list[~azure.mgmt.logic.models.RecurrenceScheduleOccurrence] + """ + + _attribute_map = { + 'minutes': {'key': 'minutes', 'type': '[int]'}, + 'hours': {'key': 'hours', 'type': '[int]'}, + 'week_days': {'key': 'weekDays', 'type': '[DaysOfWeek]'}, + 'month_days': {'key': 'monthDays', 'type': '[int]'}, + 'monthly_occurrences': {'key': 'monthlyOccurrences', 'type': '[RecurrenceScheduleOccurrence]'}, + } + + def __init__(self, *, minutes=None, hours=None, week_days=None, month_days=None, monthly_occurrences=None, **kwargs) -> None: + super(RecurrenceSchedule, self).__init__(**kwargs) + self.minutes = minutes + self.hours = hours + self.week_days = week_days + self.month_days = month_days + self.monthly_occurrences = monthly_occurrences + + +class RecurrenceScheduleOccurrence(Model): + """The recurrence schedule occurrence. + + :param day: The day of the week. Possible values include: 'Sunday', + 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' + :type day: str or ~azure.mgmt.logic.models.DayOfWeek + :param occurrence: The occurrence. + :type occurrence: int + """ + + _attribute_map = { + 'day': {'key': 'day', 'type': 'DayOfWeek'}, + 'occurrence': {'key': 'occurrence', 'type': 'int'}, + } + + def __init__(self, *, day=None, occurrence: int=None, **kwargs) -> None: + super(RecurrenceScheduleOccurrence, self).__init__(**kwargs) + self.day = day + self.occurrence = occurrence + + +class RegenerateActionParameter(Model): + """The access key regenerate action content. + + :param key_type: The key type. Possible values include: 'NotSpecified', + 'Primary', 'Secondary' + :type key_type: str or ~azure.mgmt.logic.models.KeyType + """ + + _attribute_map = { + 'key_type': {'key': 'keyType', 'type': 'str'}, + } + + def __init__(self, *, key_type=None, **kwargs) -> None: + super(RegenerateActionParameter, self).__init__(**kwargs) + self.key_type = key_type + + +class RepetitionIndex(Model): + """The workflow run action repetition index. + + All required parameters must be populated in order to send to Azure. + + :param scope_name: The scope. + :type scope_name: str + :param item_index: Required. The index. + :type item_index: int + """ + + _validation = { + 'item_index': {'required': True}, + } + + _attribute_map = { + 'scope_name': {'key': 'scopeName', 'type': 'str'}, + 'item_index': {'key': 'itemIndex', 'type': 'int'}, + } + + def __init__(self, *, item_index: int, scope_name: str=None, **kwargs) -> None: + super(RepetitionIndex, self).__init__(**kwargs) + self.scope_name = scope_name + self.item_index = item_index + + +class Request(Model): + """A request. + + :param headers: A list of all the headers attached to the request. + :type headers: object + :param uri: The destination for the request. + :type uri: str + :param method: The HTTP method used for the request. + :type method: str + """ + + _attribute_map = { + 'headers': {'key': 'headers', 'type': 'object'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'method': {'key': 'method', 'type': 'str'}, + } + + def __init__(self, *, headers=None, uri: str=None, method: str=None, **kwargs) -> None: + super(Request, self).__init__(**kwargs) + self.headers = headers + self.uri = uri + self.method = method + + +class RequestHistory(Resource): + """The request history. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param properties: The request history properties. + :type properties: ~azure.mgmt.logic.models.RequestHistoryProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'RequestHistoryProperties'}, + } + + def __init__(self, *, location: str=None, tags=None, properties=None, **kwargs) -> None: + super(RequestHistory, self).__init__(location=location, tags=tags, **kwargs) + self.properties = properties + + +class RequestHistoryProperties(Model): + """The request history. + + :param start_time: The time the request started. + :type start_time: datetime + :param end_time: The time the request ended. + :type end_time: datetime + :param request: The request. + :type request: ~azure.mgmt.logic.models.Request + :param response: The response. + :type response: ~azure.mgmt.logic.models.Response + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'request': {'key': 'request', 'type': 'Request'}, + 'response': {'key': 'response', 'type': 'Response'}, + } + + def __init__(self, *, start_time=None, end_time=None, request=None, response=None, **kwargs) -> None: + super(RequestHistoryProperties, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time + self.request = request + self.response = response + + +class Response(Model): + """A response. + + :param headers: A list of all the headers attached to the response. + :type headers: object + :param status_code: The status code of the response. + :type status_code: int + :param body_link: Details on the location of the body content. + :type body_link: ~azure.mgmt.logic.models.ContentLink + """ + + _attribute_map = { + 'headers': {'key': 'headers', 'type': 'object'}, + 'status_code': {'key': 'statusCode', 'type': 'int'}, + 'body_link': {'key': 'bodyLink', 'type': 'ContentLink'}, + } + + def __init__(self, *, headers=None, status_code: int=None, body_link=None, **kwargs) -> None: + super(Response, self).__init__(**kwargs) + self.headers = headers + self.status_code = status_code + self.body_link = body_link + + +class RetryHistory(Model): + """The retry history. + + :param start_time: Gets the start time. + :type start_time: datetime + :param end_time: Gets the end time. + :type end_time: datetime + :param code: Gets the status code. + :type code: str + :param client_request_id: Gets the client request Id. + :type client_request_id: str + :param service_request_id: Gets the service request Id. + :type service_request_id: str + :param error: Gets the error response. + :type error: ~azure.mgmt.logic.models.ErrorResponse + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'code': {'key': 'code', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'service_request_id': {'key': 'serviceRequestId', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ErrorResponse'}, + } + + def __init__(self, *, start_time=None, end_time=None, code: str=None, client_request_id: str=None, service_request_id: str=None, error=None, **kwargs) -> None: + super(RetryHistory, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time + self.code = code + self.client_request_id = client_request_id + self.service_request_id = service_request_id + self.error = error + + +class RunCorrelation(Model): + """The correlation properties. + + :param client_tracking_id: The client tracking identifier. + :type client_tracking_id: str + :param client_keywords: The client keywords. + :type client_keywords: list[str] + """ + + _attribute_map = { + 'client_tracking_id': {'key': 'clientTrackingId', 'type': 'str'}, + 'client_keywords': {'key': 'clientKeywords', 'type': '[str]'}, + } + + def __init__(self, *, client_tracking_id: str=None, client_keywords=None, **kwargs) -> None: + super(RunCorrelation, self).__init__(**kwargs) + self.client_tracking_id = client_tracking_id + self.client_keywords = client_keywords + + +class RunActionCorrelation(RunCorrelation): + """The workflow run action correlation properties. + + :param client_tracking_id: The client tracking identifier. + :type client_tracking_id: str + :param client_keywords: The client keywords. + :type client_keywords: list[str] + :param action_tracking_id: The action tracking identifier. + :type action_tracking_id: str + """ + + _attribute_map = { + 'client_tracking_id': {'key': 'clientTrackingId', 'type': 'str'}, + 'client_keywords': {'key': 'clientKeywords', 'type': '[str]'}, + 'action_tracking_id': {'key': 'actionTrackingId', 'type': 'str'}, + } + + def __init__(self, *, client_tracking_id: str=None, client_keywords=None, action_tracking_id: str=None, **kwargs) -> None: + super(RunActionCorrelation, self).__init__(client_tracking_id=client_tracking_id, client_keywords=client_keywords, **kwargs) + self.action_tracking_id = action_tracking_id + + +class SetTriggerStateActionDefinition(Model): + """SetTriggerStateActionDefinition. + + All required parameters must be populated in order to send to Azure. + + :param source: Required. + :type source: ~azure.mgmt.logic.models.WorkflowTrigger + """ + + _validation = { + 'source': {'required': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'WorkflowTrigger'}, + } + + def __init__(self, *, source, **kwargs) -> None: + super(SetTriggerStateActionDefinition, self).__init__(**kwargs) + self.source = source + + +class Sku(Model): + """The sku type. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name. Possible values include: 'NotSpecified', + 'Free', 'Shared', 'Basic', 'Standard', 'Premium' + :type name: str or ~azure.mgmt.logic.models.SkuName + :param plan: The reference to plan. + :type plan: ~azure.mgmt.logic.models.ResourceReference + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'plan': {'key': 'plan', 'type': 'ResourceReference'}, + } + + def __init__(self, *, name, plan=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.plan = plan + + +class SubResource(Model): + """The sub resource type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SubResource, self).__init__(**kwargs) + self.id = None + + +class TrackingEvent(Model): + """TrackingEvent. + + All required parameters must be populated in order to send to Azure. + + :param event_level: Required. Possible values include: 'LogAlways', + 'Critical', 'Error', 'Warning', 'Informational', 'Verbose' + :type event_level: str or ~azure.mgmt.logic.models.EventLevel + :param event_time: Required. + :type event_time: datetime + :param record_type: Required. Possible values include: 'NotSpecified', + 'Custom', 'AS2Message', 'AS2MDN', 'X12Interchange', 'X12FunctionalGroup', + 'X12TransactionSet', 'X12InterchangeAcknowledgment', + 'X12FunctionalGroupAcknowledgment', 'X12TransactionSetAcknowledgment', + 'EdifactInterchange', 'EdifactFunctionalGroup', 'EdifactTransactionSet', + 'EdifactInterchangeAcknowledgment', + 'EdifactFunctionalGroupAcknowledgment', + 'EdifactTransactionSetAcknowledgment' + :type record_type: str or ~azure.mgmt.logic.models.TrackingRecordType + :param error: + :type error: ~azure.mgmt.logic.models.TrackingEventErrorInfo + """ + + _validation = { + 'event_level': {'required': True}, + 'event_time': {'required': True}, + 'record_type': {'required': True}, + } + + _attribute_map = { + 'event_level': {'key': 'eventLevel', 'type': 'EventLevel'}, + 'event_time': {'key': 'eventTime', 'type': 'iso-8601'}, + 'record_type': {'key': 'recordType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'TrackingEventErrorInfo'}, + } + + def __init__(self, *, event_level, event_time, record_type, error=None, **kwargs) -> None: + super(TrackingEvent, self).__init__(**kwargs) + self.event_level = event_level + self.event_time = event_time + self.record_type = record_type + self.error = error + + +class TrackingEventErrorInfo(Model): + """TrackingEventErrorInfo. + + :param message: + :type message: str + :param code: + :type code: str + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'code': {'key': 'code', 'type': 'str'}, + } + + def __init__(self, *, message: str=None, code: str=None, **kwargs) -> None: + super(TrackingEventErrorInfo, self).__init__(**kwargs) + self.message = message + self.code = code + + +class TrackingEventsDefinition(Model): + """TrackingEventsDefinition. + + All required parameters must be populated in order to send to Azure. + + :param source_type: Required. + :type source_type: str + :param track_events_options: Possible values include: 'None', + 'DisableSourceInfoEnrich' + :type track_events_options: str or + ~azure.mgmt.logic.models.TrackEventsOperationOptions + :param events: Required. + :type events: list[~azure.mgmt.logic.models.TrackingEvent] + """ + + _validation = { + 'source_type': {'required': True}, + 'events': {'required': True}, + } + + _attribute_map = { + 'source_type': {'key': 'sourceType', 'type': 'str'}, + 'track_events_options': {'key': 'trackEventsOptions', 'type': 'str'}, + 'events': {'key': 'events', 'type': '[TrackingEvent]'}, + } + + def __init__(self, *, source_type: str, events, track_events_options=None, **kwargs) -> None: + super(TrackingEventsDefinition, self).__init__(**kwargs) + self.source_type = source_type + self.track_events_options = track_events_options + self.events = events + + +class Workflow(Resource): + """The workflow type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :ivar provisioning_state: Gets the provisioning state. Possible values + include: 'NotSpecified', 'Accepted', 'Running', 'Ready', 'Creating', + 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', + 'Moving', 'Updating', 'Registering', 'Registered', 'Unregistering', + 'Unregistered', 'Completed' + :vartype provisioning_state: str or + ~azure.mgmt.logic.models.WorkflowProvisioningState + :ivar created_time: Gets the created time. + :vartype created_time: datetime + :ivar changed_time: Gets the changed time. + :vartype changed_time: datetime + :param state: The state. Possible values include: 'NotSpecified', + 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + :type state: str or ~azure.mgmt.logic.models.WorkflowState + :ivar version: Gets the version. + :vartype version: str + :ivar access_endpoint: Gets the access endpoint. + :vartype access_endpoint: str + :param sku: The sku. + :type sku: ~azure.mgmt.logic.models.Sku + :param integration_account: The integration account. + :type integration_account: ~azure.mgmt.logic.models.ResourceReference + :param definition: The definition. + :type definition: object + :param parameters: The parameters. + :type parameters: dict[str, ~azure.mgmt.logic.models.WorkflowParameter] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'version': {'readonly': True}, + 'access_endpoint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'access_endpoint': {'key': 'properties.accessEndpoint', 'type': 'str'}, + 'sku': {'key': 'properties.sku', 'type': 'Sku'}, + 'integration_account': {'key': 'properties.integrationAccount', 'type': 'ResourceReference'}, + 'definition': {'key': 'properties.definition', 'type': 'object'}, + 'parameters': {'key': 'properties.parameters', 'type': '{WorkflowParameter}'}, + } + + def __init__(self, *, location: str=None, tags=None, state=None, sku=None, integration_account=None, definition=None, parameters=None, **kwargs) -> None: + super(Workflow, self).__init__(location=location, tags=tags, **kwargs) + self.provisioning_state = None + self.created_time = None + self.changed_time = None + self.state = state + self.version = None + self.access_endpoint = None + self.sku = sku + self.integration_account = integration_account + self.definition = definition + self.parameters = parameters + + +class WorkflowFilter(Model): + """The workflow filter. + + :param state: The state of workflows. Possible values include: + 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + :type state: str or ~azure.mgmt.logic.models.WorkflowState + """ + + _attribute_map = { + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__(self, *, state=None, **kwargs) -> None: + super(WorkflowFilter, self).__init__(**kwargs) + self.state = state + + +class WorkflowParameter(Model): + """The workflow parameters. + + :param type: The type. Possible values include: 'NotSpecified', 'String', + 'SecureString', 'Int', 'Float', 'Bool', 'Array', 'Object', 'SecureObject' + :type type: str or ~azure.mgmt.logic.models.ParameterType + :param value: The value. + :type value: object + :param metadata: The metadata. + :type metadata: object + :param description: The description. + :type description: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'object'}, + 'metadata': {'key': 'metadata', 'type': 'object'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, type=None, value=None, metadata=None, description: str=None, **kwargs) -> None: + super(WorkflowParameter, self).__init__(**kwargs) + self.type = type + self.value = value + self.metadata = metadata + self.description = description + + +class WorkflowOutputParameter(WorkflowParameter): + """The workflow output parameter. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param type: The type. Possible values include: 'NotSpecified', 'String', + 'SecureString', 'Int', 'Float', 'Bool', 'Array', 'Object', 'SecureObject' + :type type: str or ~azure.mgmt.logic.models.ParameterType + :param value: The value. + :type value: object + :param metadata: The metadata. + :type metadata: object + :param description: The description. + :type description: str + :ivar error: Gets the error. + :vartype error: object + """ + + _validation = { + 'error': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'object'}, + 'metadata': {'key': 'metadata', 'type': 'object'}, + 'description': {'key': 'description', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'object'}, + } + + def __init__(self, *, type=None, value=None, metadata=None, description: str=None, **kwargs) -> None: + super(WorkflowOutputParameter, self).__init__(type=type, value=value, metadata=metadata, description=description, **kwargs) + self.error = None + + +class WorkflowRun(SubResource): + """The workflow run. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar wait_end_time: Gets the wait end time. + :vartype wait_end_time: datetime + :ivar start_time: Gets the start time. + :vartype start_time: datetime + :ivar end_time: Gets the end time. + :vartype end_time: datetime + :ivar status: Gets the status. Possible values include: 'NotSpecified', + 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', + 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' + :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus + :ivar code: Gets the code. + :vartype code: str + :ivar error: Gets the error. + :vartype error: object + :ivar correlation_id: Gets the correlation id. + :vartype correlation_id: str + :param correlation: The run correlation. + :type correlation: ~azure.mgmt.logic.models.Correlation + :ivar workflow: Gets the reference to workflow version. + :vartype workflow: ~azure.mgmt.logic.models.ResourceReference + :ivar trigger: Gets the fired trigger. + :vartype trigger: ~azure.mgmt.logic.models.WorkflowRunTrigger + :ivar outputs: Gets the outputs. + :vartype outputs: dict[str, + ~azure.mgmt.logic.models.WorkflowOutputParameter] + :ivar response: Gets the response of the flow run. + :vartype response: ~azure.mgmt.logic.models.WorkflowRunTrigger + :ivar name: Gets the workflow run name. + :vartype name: str + :ivar type: Gets the workflow run type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'wait_end_time': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'status': {'readonly': True}, + 'code': {'readonly': True}, + 'error': {'readonly': True}, + 'correlation_id': {'readonly': True}, + 'workflow': {'readonly': True}, + 'trigger': {'readonly': True}, + 'outputs': {'readonly': True}, + 'response': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'wait_end_time': {'key': 'properties.waitEndTime', 'type': 'iso-8601'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'code': {'key': 'properties.code', 'type': 'str'}, + 'error': {'key': 'properties.error', 'type': 'object'}, + 'correlation_id': {'key': 'properties.correlationId', 'type': 'str'}, + 'correlation': {'key': 'properties.correlation', 'type': 'Correlation'}, + 'workflow': {'key': 'properties.workflow', 'type': 'ResourceReference'}, + 'trigger': {'key': 'properties.trigger', 'type': 'WorkflowRunTrigger'}, + 'outputs': {'key': 'properties.outputs', 'type': '{WorkflowOutputParameter}'}, + 'response': {'key': 'properties.response', 'type': 'WorkflowRunTrigger'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, correlation=None, **kwargs) -> None: + super(WorkflowRun, self).__init__(**kwargs) + self.wait_end_time = None + self.start_time = None + self.end_time = None + self.status = None + self.code = None + self.error = None + self.correlation_id = None + self.correlation = correlation + self.workflow = None + self.trigger = None + self.outputs = None + self.response = None + self.name = None + self.type = None + + +class WorkflowRunAction(SubResource): + """The workflow run action. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar start_time: Gets the start time. + :vartype start_time: datetime + :ivar end_time: Gets the end time. + :vartype end_time: datetime + :ivar status: Gets the status. Possible values include: 'NotSpecified', + 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', + 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' + :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus + :ivar code: Gets the code. + :vartype code: str + :ivar error: Gets the error. + :vartype error: object + :ivar tracking_id: Gets the tracking id. + :vartype tracking_id: str + :param correlation: The correlation properties. + :type correlation: ~azure.mgmt.logic.models.Correlation + :ivar inputs_link: Gets the link to inputs. + :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar outputs_link: Gets the link to outputs. + :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar tracked_properties: Gets the tracked properties. + :vartype tracked_properties: object + :param retry_history: Gets the retry histories. + :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] + :ivar name: Gets the workflow run action name. + :vartype name: str + :ivar type: Gets the workflow run action type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'status': {'readonly': True}, + 'code': {'readonly': True}, + 'error': {'readonly': True}, + 'tracking_id': {'readonly': True}, + 'inputs_link': {'readonly': True}, + 'outputs_link': {'readonly': True}, + 'tracked_properties': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'code': {'key': 'properties.code', 'type': 'str'}, + 'error': {'key': 'properties.error', 'type': 'object'}, + 'tracking_id': {'key': 'properties.trackingId', 'type': 'str'}, + 'correlation': {'key': 'properties.correlation', 'type': 'Correlation'}, + 'inputs_link': {'key': 'properties.inputsLink', 'type': 'ContentLink'}, + 'outputs_link': {'key': 'properties.outputsLink', 'type': 'ContentLink'}, + 'tracked_properties': {'key': 'properties.trackedProperties', 'type': 'object'}, + 'retry_history': {'key': 'properties.retryHistory', 'type': '[RetryHistory]'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, correlation=None, retry_history=None, **kwargs) -> None: + super(WorkflowRunAction, self).__init__(**kwargs) + self.start_time = None + self.end_time = None + self.status = None + self.code = None + self.error = None + self.tracking_id = None + self.correlation = correlation + self.inputs_link = None + self.outputs_link = None + self.tracked_properties = None + self.retry_history = retry_history + self.name = None + self.type = None + + +class WorkflowRunActionFilter(Model): + """The workflow run action filter. + + :param status: The status of workflow run action. Possible values include: + 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', + 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', + 'Ignored' + :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, *, status=None, **kwargs) -> None: + super(WorkflowRunActionFilter, self).__init__(**kwargs) + self.status = status + + +class WorkflowRunActionRepetitionDefinition(Resource): + """The workflow run action repetition definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param start_time: The start time of the workflow scope repetition. + :type start_time: datetime + :param end_time: The end time of the workflow scope repetition. + :type end_time: datetime + :param correlation: The correlation properties. + :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation + :param status: The status of the workflow scope repetition. Possible + values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + 'TimedOut', 'Aborted', 'Ignored' + :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + :param code: The workflow scope repetition code. + :type code: str + :param error: + :type error: object + :ivar tracking_id: Gets the tracking id. + :vartype tracking_id: str + :ivar inputs: Gets the inputs. + :vartype inputs: object + :ivar inputs_link: Gets the link to inputs. + :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar outputs: Gets the outputs. + :vartype outputs: object + :ivar outputs_link: Gets the link to outputs. + :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar tracked_properties: Gets the tracked properties. + :vartype tracked_properties: object + :param retry_history: Gets the retry histories. + :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] + :param iteration_count: + :type iteration_count: int + :param repetition_indexes: The repetition indexes. + :type repetition_indexes: list[~azure.mgmt.logic.models.RepetitionIndex] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tracking_id': {'readonly': True}, + 'inputs': {'readonly': True}, + 'inputs_link': {'readonly': True}, + 'outputs': {'readonly': True}, + 'outputs_link': {'readonly': True}, + 'tracked_properties': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'correlation': {'key': 'properties.correlation', 'type': 'RunActionCorrelation'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'code': {'key': 'properties.code', 'type': 'str'}, + 'error': {'key': 'properties.error', 'type': 'object'}, + 'tracking_id': {'key': 'properties.trackingId', 'type': 'str'}, + 'inputs': {'key': 'properties.inputs', 'type': 'object'}, + 'inputs_link': {'key': 'properties.inputsLink', 'type': 'ContentLink'}, + 'outputs': {'key': 'properties.outputs', 'type': 'object'}, + 'outputs_link': {'key': 'properties.outputsLink', 'type': 'ContentLink'}, + 'tracked_properties': {'key': 'properties.trackedProperties', 'type': 'object'}, + 'retry_history': {'key': 'properties.retryHistory', 'type': '[RetryHistory]'}, + 'iteration_count': {'key': 'properties.iterationCount', 'type': 'int'}, + 'repetition_indexes': {'key': 'properties.repetitionIndexes', 'type': '[RepetitionIndex]'}, + } + + def __init__(self, *, location: str=None, tags=None, start_time=None, end_time=None, correlation=None, status=None, code: str=None, error=None, retry_history=None, iteration_count: int=None, repetition_indexes=None, **kwargs) -> None: + super(WorkflowRunActionRepetitionDefinition, self).__init__(location=location, tags=tags, **kwargs) + self.start_time = start_time + self.end_time = end_time + self.correlation = correlation + self.status = status + self.code = code + self.error = error + self.tracking_id = None + self.inputs = None + self.inputs_link = None + self.outputs = None + self.outputs_link = None + self.tracked_properties = None + self.retry_history = retry_history + self.iteration_count = iteration_count + self.repetition_indexes = repetition_indexes + + +class WorkflowRunActionRepetitionDefinitionCollection(Model): + """A collection of workflow run action repetitions. + + :param value: + :type value: + list[~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinition] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[WorkflowRunActionRepetitionDefinition]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(WorkflowRunActionRepetitionDefinitionCollection, self).__init__(**kwargs) + self.value = value + + +class WorkflowRunFilter(Model): + """The workflow run filter. + + :param status: The status of workflow run. Possible values include: + 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', + 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', + 'Ignored' + :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, *, status=None, **kwargs) -> None: + super(WorkflowRunFilter, self).__init__(**kwargs) + self.status = status + + +class WorkflowRunTrigger(Model): + """The workflow run trigger. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Gets the name. + :vartype name: str + :ivar inputs: Gets the inputs. + :vartype inputs: object + :ivar inputs_link: Gets the link to inputs. + :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar outputs: Gets the outputs. + :vartype outputs: object + :ivar outputs_link: Gets the link to outputs. + :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar scheduled_time: Gets the scheduled time. + :vartype scheduled_time: datetime + :ivar start_time: Gets the start time. + :vartype start_time: datetime + :ivar end_time: Gets the end time. + :vartype end_time: datetime + :ivar tracking_id: Gets the tracking id. + :vartype tracking_id: str + :param correlation: The run correlation. + :type correlation: ~azure.mgmt.logic.models.Correlation + :ivar code: Gets the code. + :vartype code: str + :ivar status: Gets the status. Possible values include: 'NotSpecified', + 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', + 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' + :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus + :ivar error: Gets the error. + :vartype error: object + :ivar tracked_properties: Gets the tracked properties. + :vartype tracked_properties: object + """ + + _validation = { + 'name': {'readonly': True}, + 'inputs': {'readonly': True}, + 'inputs_link': {'readonly': True}, + 'outputs': {'readonly': True}, + 'outputs_link': {'readonly': True}, + 'scheduled_time': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'tracking_id': {'readonly': True}, + 'code': {'readonly': True}, + 'status': {'readonly': True}, + 'error': {'readonly': True}, + 'tracked_properties': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': 'object'}, + 'inputs_link': {'key': 'inputsLink', 'type': 'ContentLink'}, + 'outputs': {'key': 'outputs', 'type': 'object'}, + 'outputs_link': {'key': 'outputsLink', 'type': 'ContentLink'}, + 'scheduled_time': {'key': 'scheduledTime', 'type': 'iso-8601'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'tracking_id': {'key': 'trackingId', 'type': 'str'}, + 'correlation': {'key': 'correlation', 'type': 'Correlation'}, + 'code': {'key': 'code', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'object'}, + 'tracked_properties': {'key': 'trackedProperties', 'type': 'object'}, + } + + def __init__(self, *, correlation=None, **kwargs) -> None: + super(WorkflowRunTrigger, self).__init__(**kwargs) + self.name = None + self.inputs = None + self.inputs_link = None + self.outputs = None + self.outputs_link = None + self.scheduled_time = None + self.start_time = None + self.end_time = None + self.tracking_id = None + self.correlation = correlation + self.code = None + self.status = None + self.error = None + self.tracked_properties = None + + +class WorkflowTrigger(SubResource): + """The workflow trigger. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar provisioning_state: Gets the provisioning state. Possible values + include: 'NotSpecified', 'Accepted', 'Running', 'Ready', 'Creating', + 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', + 'Moving', 'Updating', 'Registering', 'Registered', 'Unregistering', + 'Unregistered', 'Completed' + :vartype provisioning_state: str or + ~azure.mgmt.logic.models.WorkflowTriggerProvisioningState + :ivar created_time: Gets the created time. + :vartype created_time: datetime + :ivar changed_time: Gets the changed time. + :vartype changed_time: datetime + :ivar state: Gets the state. Possible values include: 'NotSpecified', + 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + :vartype state: str or ~azure.mgmt.logic.models.WorkflowState + :ivar status: Gets the status. Possible values include: 'NotSpecified', + 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', + 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' + :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus + :ivar last_execution_time: Gets the last execution time. + :vartype last_execution_time: datetime + :ivar next_execution_time: Gets the next execution time. + :vartype next_execution_time: datetime + :ivar recurrence: Gets the workflow trigger recurrence. + :vartype recurrence: ~azure.mgmt.logic.models.WorkflowTriggerRecurrence + :ivar workflow: Gets the reference to workflow. + :vartype workflow: ~azure.mgmt.logic.models.ResourceReference + :ivar name: Gets the workflow trigger name. + :vartype name: str + :ivar type: Gets the workflow trigger type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'state': {'readonly': True}, + 'status': {'readonly': True}, + 'last_execution_time': {'readonly': True}, + 'next_execution_time': {'readonly': True}, + 'recurrence': {'readonly': True}, + 'workflow': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'last_execution_time': {'key': 'properties.lastExecutionTime', 'type': 'iso-8601'}, + 'next_execution_time': {'key': 'properties.nextExecutionTime', 'type': 'iso-8601'}, + 'recurrence': {'key': 'properties.recurrence', 'type': 'WorkflowTriggerRecurrence'}, + 'workflow': {'key': 'properties.workflow', 'type': 'ResourceReference'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(WorkflowTrigger, self).__init__(**kwargs) + self.provisioning_state = None + self.created_time = None + self.changed_time = None + self.state = None + self.status = None + self.last_execution_time = None + self.next_execution_time = None + self.recurrence = None + self.workflow = None + self.name = None + self.type = None + + +class WorkflowTriggerCallbackUrl(Model): + """The workflow trigger callback URL. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: Gets the workflow trigger callback URL. + :vartype value: str + :ivar method: Gets the workflow trigger callback URL HTTP method. + :vartype method: str + :ivar base_path: Gets the workflow trigger callback URL base path. + :vartype base_path: str + :ivar relative_path: Gets the workflow trigger callback URL relative path. + :vartype relative_path: str + :param relative_path_parameters: Gets the workflow trigger callback URL + relative path parameters. + :type relative_path_parameters: list[str] + :param queries: Gets the workflow trigger callback URL query parameters. + :type queries: + ~azure.mgmt.logic.models.WorkflowTriggerListCallbackUrlQueries + """ + + _validation = { + 'value': {'readonly': True}, + 'method': {'readonly': True}, + 'base_path': {'readonly': True}, + 'relative_path': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'method': {'key': 'method', 'type': 'str'}, + 'base_path': {'key': 'basePath', 'type': 'str'}, + 'relative_path': {'key': 'relativePath', 'type': 'str'}, + 'relative_path_parameters': {'key': 'relativePathParameters', 'type': '[str]'}, + 'queries': {'key': 'queries', 'type': 'WorkflowTriggerListCallbackUrlQueries'}, + } + + def __init__(self, *, relative_path_parameters=None, queries=None, **kwargs) -> None: + super(WorkflowTriggerCallbackUrl, self).__init__(**kwargs) + self.value = None + self.method = None + self.base_path = None + self.relative_path = None + self.relative_path_parameters = relative_path_parameters + self.queries = queries + + +class WorkflowTriggerFilter(Model): + """The workflow trigger filter. + + :param state: The state of workflow trigger. Possible values include: + 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + :type state: str or ~azure.mgmt.logic.models.WorkflowState + """ + + _attribute_map = { + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__(self, *, state=None, **kwargs) -> None: + super(WorkflowTriggerFilter, self).__init__(**kwargs) + self.state = state + + +class WorkflowTriggerHistory(SubResource): + """The workflow trigger history. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar start_time: Gets the start time. + :vartype start_time: datetime + :ivar end_time: Gets the end time. + :vartype end_time: datetime + :ivar status: Gets the status. Possible values include: 'NotSpecified', + 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', + 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' + :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus + :ivar code: Gets the code. + :vartype code: str + :ivar error: Gets the error. + :vartype error: object + :ivar tracking_id: Gets the tracking id. + :vartype tracking_id: str + :param correlation: The run correlation. + :type correlation: ~azure.mgmt.logic.models.Correlation + :ivar inputs_link: Gets the link to input parameters. + :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar outputs_link: Gets the link to output parameters. + :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar fired: Gets a value indicating whether trigger was fired. + :vartype fired: bool + :ivar run: Gets the reference to workflow run. + :vartype run: ~azure.mgmt.logic.models.ResourceReference + :ivar name: Gets the workflow trigger history name. + :vartype name: str + :ivar type: Gets the workflow trigger history type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'status': {'readonly': True}, + 'code': {'readonly': True}, + 'error': {'readonly': True}, + 'tracking_id': {'readonly': True}, + 'inputs_link': {'readonly': True}, + 'outputs_link': {'readonly': True}, + 'fired': {'readonly': True}, + 'run': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'code': {'key': 'properties.code', 'type': 'str'}, + 'error': {'key': 'properties.error', 'type': 'object'}, + 'tracking_id': {'key': 'properties.trackingId', 'type': 'str'}, + 'correlation': {'key': 'properties.correlation', 'type': 'Correlation'}, + 'inputs_link': {'key': 'properties.inputsLink', 'type': 'ContentLink'}, + 'outputs_link': {'key': 'properties.outputsLink', 'type': 'ContentLink'}, + 'fired': {'key': 'properties.fired', 'type': 'bool'}, + 'run': {'key': 'properties.run', 'type': 'ResourceReference'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, correlation=None, **kwargs) -> None: + super(WorkflowTriggerHistory, self).__init__(**kwargs) + self.start_time = None + self.end_time = None + self.status = None + self.code = None + self.error = None + self.tracking_id = None + self.correlation = correlation + self.inputs_link = None + self.outputs_link = None + self.fired = None + self.run = None + self.name = None + self.type = None + + +class WorkflowTriggerHistoryFilter(Model): + """The workflow trigger history filter. + + :param status: The status of workflow trigger history. Possible values + include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', + 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', + 'Aborted', 'Ignored' + :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, *, status=None, **kwargs) -> None: + super(WorkflowTriggerHistoryFilter, self).__init__(**kwargs) + self.status = status + + +class WorkflowTriggerListCallbackUrlQueries(Model): + """Gets the workflow trigger callback URL query parameters. + + :param api_version: The api version. + :type api_version: str + :param sp: The SAS permissions. + :type sp: str + :param sv: The SAS version. + :type sv: str + :param sig: The SAS signature. + :type sig: str + :param se: The SAS timestamp. + :type se: str + """ + + _attribute_map = { + 'api_version': {'key': 'api-version', 'type': 'str'}, + 'sp': {'key': 'sp', 'type': 'str'}, + 'sv': {'key': 'sv', 'type': 'str'}, + 'sig': {'key': 'sig', 'type': 'str'}, + 'se': {'key': 'se', 'type': 'str'}, + } + + def __init__(self, *, api_version: str=None, sp: str=None, sv: str=None, sig: str=None, se: str=None, **kwargs) -> None: + super(WorkflowTriggerListCallbackUrlQueries, self).__init__(**kwargs) + self.api_version = api_version + self.sp = sp + self.sv = sv + self.sig = sig + self.se = se + + +class WorkflowTriggerRecurrence(Model): + """The workflow trigger recurrence. + + :param frequency: The frequency. Possible values include: 'NotSpecified', + 'Second', 'Minute', 'Hour', 'Day', 'Week', 'Month', 'Year' + :type frequency: str or ~azure.mgmt.logic.models.RecurrenceFrequency + :param interval: The interval. + :type interval: int + :param start_time: The start time. + :type start_time: str + :param end_time: The end time. + :type end_time: str + :param time_zone: The time zone. + :type time_zone: str + :param schedule: The recurrence schedule. + :type schedule: ~azure.mgmt.logic.models.RecurrenceSchedule + """ + + _attribute_map = { + 'frequency': {'key': 'frequency', 'type': 'str'}, + 'interval': {'key': 'interval', 'type': 'int'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'schedule': {'key': 'schedule', 'type': 'RecurrenceSchedule'}, + } + + def __init__(self, *, frequency=None, interval: int=None, start_time: str=None, end_time: str=None, time_zone: str=None, schedule=None, **kwargs) -> None: + super(WorkflowTriggerRecurrence, self).__init__(**kwargs) + self.frequency = frequency + self.interval = interval + self.start_time = start_time + self.end_time = end_time + self.time_zone = time_zone + self.schedule = schedule + + +class WorkflowVersion(Resource): + """The workflow version. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :ivar created_time: Gets the created time. + :vartype created_time: datetime + :ivar changed_time: Gets the changed time. + :vartype changed_time: datetime + :param state: The state. Possible values include: 'NotSpecified', + 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + :type state: str or ~azure.mgmt.logic.models.WorkflowState + :ivar version: Gets the version. + :vartype version: str + :ivar access_endpoint: Gets the access endpoint. + :vartype access_endpoint: str + :param sku: The sku. + :type sku: ~azure.mgmt.logic.models.Sku + :param integration_account: The integration account. + :type integration_account: ~azure.mgmt.logic.models.ResourceReference + :param definition: The definition. + :type definition: object + :param parameters: The parameters. + :type parameters: dict[str, ~azure.mgmt.logic.models.WorkflowParameter] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'version': {'readonly': True}, + 'access_endpoint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'access_endpoint': {'key': 'properties.accessEndpoint', 'type': 'str'}, + 'sku': {'key': 'properties.sku', 'type': 'Sku'}, + 'integration_account': {'key': 'properties.integrationAccount', 'type': 'ResourceReference'}, + 'definition': {'key': 'properties.definition', 'type': 'object'}, + 'parameters': {'key': 'properties.parameters', 'type': '{WorkflowParameter}'}, + } + + def __init__(self, *, location: str=None, tags=None, state=None, sku=None, integration_account=None, definition=None, parameters=None, **kwargs) -> None: + super(WorkflowVersion, self).__init__(location=location, tags=tags, **kwargs) + self.created_time = None + self.changed_time = None + self.state = state + self.version = None + self.access_endpoint = None + self.sku = sku + self.integration_account = integration_account + self.definition = definition + self.parameters = parameters + + +class X12AcknowledgementSettings(Model): + """The X12 agreement acknowledgement settings. + + All required parameters must be populated in order to send to Azure. + + :param need_technical_acknowledgement: Required. The value indicating + whether technical acknowledgement is needed. + :type need_technical_acknowledgement: bool + :param batch_technical_acknowledgements: Required. The value indicating + whether to batch the technical acknowledgements. + :type batch_technical_acknowledgements: bool + :param need_functional_acknowledgement: Required. The value indicating + whether functional acknowledgement is needed. + :type need_functional_acknowledgement: bool + :param functional_acknowledgement_version: The functional acknowledgement + version. + :type functional_acknowledgement_version: str + :param batch_functional_acknowledgements: Required. The value indicating + whether to batch functional acknowledgements. + :type batch_functional_acknowledgements: bool + :param need_implementation_acknowledgement: Required. The value indicating + whether implementation acknowledgement is needed. + :type need_implementation_acknowledgement: bool + :param implementation_acknowledgement_version: The implementation + acknowledgement version. + :type implementation_acknowledgement_version: str + :param batch_implementation_acknowledgements: Required. The value + indicating whether to batch implementation acknowledgements. + :type batch_implementation_acknowledgements: bool + :param need_loop_for_valid_messages: Required. The value indicating + whether a loop is needed for valid messages. + :type need_loop_for_valid_messages: bool + :param send_synchronous_acknowledgement: Required. The value indicating + whether to send synchronous acknowledgement. + :type send_synchronous_acknowledgement: bool + :param acknowledgement_control_number_prefix: The acknowledgement control + number prefix. + :type acknowledgement_control_number_prefix: str + :param acknowledgement_control_number_suffix: The acknowledgement control + number suffix. + :type acknowledgement_control_number_suffix: str + :param acknowledgement_control_number_lower_bound: Required. The + acknowledgement control number lower bound. + :type acknowledgement_control_number_lower_bound: int + :param acknowledgement_control_number_upper_bound: Required. The + acknowledgement control number upper bound. + :type acknowledgement_control_number_upper_bound: int + :param rollover_acknowledgement_control_number: Required. The value + indicating whether to rollover acknowledgement control number. + :type rollover_acknowledgement_control_number: bool + """ + + _validation = { + 'need_technical_acknowledgement': {'required': True}, + 'batch_technical_acknowledgements': {'required': True}, + 'need_functional_acknowledgement': {'required': True}, + 'batch_functional_acknowledgements': {'required': True}, + 'need_implementation_acknowledgement': {'required': True}, + 'batch_implementation_acknowledgements': {'required': True}, + 'need_loop_for_valid_messages': {'required': True}, + 'send_synchronous_acknowledgement': {'required': True}, + 'acknowledgement_control_number_lower_bound': {'required': True}, + 'acknowledgement_control_number_upper_bound': {'required': True}, + 'rollover_acknowledgement_control_number': {'required': True}, + } + + _attribute_map = { + 'need_technical_acknowledgement': {'key': 'needTechnicalAcknowledgement', 'type': 'bool'}, + 'batch_technical_acknowledgements': {'key': 'batchTechnicalAcknowledgements', 'type': 'bool'}, + 'need_functional_acknowledgement': {'key': 'needFunctionalAcknowledgement', 'type': 'bool'}, + 'functional_acknowledgement_version': {'key': 'functionalAcknowledgementVersion', 'type': 'str'}, + 'batch_functional_acknowledgements': {'key': 'batchFunctionalAcknowledgements', 'type': 'bool'}, + 'need_implementation_acknowledgement': {'key': 'needImplementationAcknowledgement', 'type': 'bool'}, + 'implementation_acknowledgement_version': {'key': 'implementationAcknowledgementVersion', 'type': 'str'}, + 'batch_implementation_acknowledgements': {'key': 'batchImplementationAcknowledgements', 'type': 'bool'}, + 'need_loop_for_valid_messages': {'key': 'needLoopForValidMessages', 'type': 'bool'}, + 'send_synchronous_acknowledgement': {'key': 'sendSynchronousAcknowledgement', 'type': 'bool'}, + 'acknowledgement_control_number_prefix': {'key': 'acknowledgementControlNumberPrefix', 'type': 'str'}, + 'acknowledgement_control_number_suffix': {'key': 'acknowledgementControlNumberSuffix', 'type': 'str'}, + 'acknowledgement_control_number_lower_bound': {'key': 'acknowledgementControlNumberLowerBound', 'type': 'int'}, + 'acknowledgement_control_number_upper_bound': {'key': 'acknowledgementControlNumberUpperBound', 'type': 'int'}, + 'rollover_acknowledgement_control_number': {'key': 'rolloverAcknowledgementControlNumber', 'type': 'bool'}, + } + + def __init__(self, *, need_technical_acknowledgement: bool, batch_technical_acknowledgements: bool, need_functional_acknowledgement: bool, batch_functional_acknowledgements: bool, need_implementation_acknowledgement: bool, batch_implementation_acknowledgements: bool, need_loop_for_valid_messages: bool, send_synchronous_acknowledgement: bool, acknowledgement_control_number_lower_bound: int, acknowledgement_control_number_upper_bound: int, rollover_acknowledgement_control_number: bool, functional_acknowledgement_version: str=None, implementation_acknowledgement_version: str=None, acknowledgement_control_number_prefix: str=None, acknowledgement_control_number_suffix: str=None, **kwargs) -> None: + super(X12AcknowledgementSettings, self).__init__(**kwargs) + self.need_technical_acknowledgement = need_technical_acknowledgement + self.batch_technical_acknowledgements = batch_technical_acknowledgements + self.need_functional_acknowledgement = need_functional_acknowledgement + self.functional_acknowledgement_version = functional_acknowledgement_version + self.batch_functional_acknowledgements = batch_functional_acknowledgements + self.need_implementation_acknowledgement = need_implementation_acknowledgement + self.implementation_acknowledgement_version = implementation_acknowledgement_version + self.batch_implementation_acknowledgements = batch_implementation_acknowledgements + self.need_loop_for_valid_messages = need_loop_for_valid_messages + self.send_synchronous_acknowledgement = send_synchronous_acknowledgement + self.acknowledgement_control_number_prefix = acknowledgement_control_number_prefix + self.acknowledgement_control_number_suffix = acknowledgement_control_number_suffix + self.acknowledgement_control_number_lower_bound = acknowledgement_control_number_lower_bound + self.acknowledgement_control_number_upper_bound = acknowledgement_control_number_upper_bound + self.rollover_acknowledgement_control_number = rollover_acknowledgement_control_number + + +class X12AgreementContent(Model): + """The X12 agreement content. + + All required parameters must be populated in order to send to Azure. + + :param receive_agreement: Required. The X12 one-way receive agreement. + :type receive_agreement: ~azure.mgmt.logic.models.X12OneWayAgreement + :param send_agreement: Required. The X12 one-way send agreement. + :type send_agreement: ~azure.mgmt.logic.models.X12OneWayAgreement + """ + + _validation = { + 'receive_agreement': {'required': True}, + 'send_agreement': {'required': True}, + } + + _attribute_map = { + 'receive_agreement': {'key': 'receiveAgreement', 'type': 'X12OneWayAgreement'}, + 'send_agreement': {'key': 'sendAgreement', 'type': 'X12OneWayAgreement'}, + } + + def __init__(self, *, receive_agreement, send_agreement, **kwargs) -> None: + super(X12AgreementContent, self).__init__(**kwargs) + self.receive_agreement = receive_agreement + self.send_agreement = send_agreement + + +class X12DelimiterOverrides(Model): + """The X12 delimiter override settings. + + All required parameters must be populated in order to send to Azure. + + :param protocol_version: The protocol version. + :type protocol_version: str + :param message_id: The message id. + :type message_id: str + :param data_element_separator: Required. The data element separator. + :type data_element_separator: int + :param component_separator: Required. The component separator. + :type component_separator: int + :param segment_terminator: Required. The segment terminator. + :type segment_terminator: int + :param segment_terminator_suffix: Required. The segment terminator suffix. + Possible values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' + :type segment_terminator_suffix: str or + ~azure.mgmt.logic.models.SegmentTerminatorSuffix + :param replace_character: Required. The replacement character. + :type replace_character: int + :param replace_separators_in_payload: Required. The value indicating + whether to replace separators in payload. + :type replace_separators_in_payload: bool + :param target_namespace: The target namespace on which this delimiter + settings has to be applied. + :type target_namespace: str + """ + + _validation = { + 'data_element_separator': {'required': True}, + 'component_separator': {'required': True}, + 'segment_terminator': {'required': True}, + 'segment_terminator_suffix': {'required': True}, + 'replace_character': {'required': True}, + 'replace_separators_in_payload': {'required': True}, + } + + _attribute_map = { + 'protocol_version': {'key': 'protocolVersion', 'type': 'str'}, + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'data_element_separator': {'key': 'dataElementSeparator', 'type': 'int'}, + 'component_separator': {'key': 'componentSeparator', 'type': 'int'}, + 'segment_terminator': {'key': 'segmentTerminator', 'type': 'int'}, + 'segment_terminator_suffix': {'key': 'segmentTerminatorSuffix', 'type': 'SegmentTerminatorSuffix'}, + 'replace_character': {'key': 'replaceCharacter', 'type': 'int'}, + 'replace_separators_in_payload': {'key': 'replaceSeparatorsInPayload', 'type': 'bool'}, + 'target_namespace': {'key': 'targetNamespace', 'type': 'str'}, + } + + def __init__(self, *, data_element_separator: int, component_separator: int, segment_terminator: int, segment_terminator_suffix, replace_character: int, replace_separators_in_payload: bool, protocol_version: str=None, message_id: str=None, target_namespace: str=None, **kwargs) -> None: + super(X12DelimiterOverrides, self).__init__(**kwargs) + self.protocol_version = protocol_version + self.message_id = message_id + self.data_element_separator = data_element_separator + self.component_separator = component_separator + self.segment_terminator = segment_terminator + self.segment_terminator_suffix = segment_terminator_suffix + self.replace_character = replace_character + self.replace_separators_in_payload = replace_separators_in_payload + self.target_namespace = target_namespace + + +class X12EnvelopeOverride(Model): + """The X12 envelope override settings. + + All required parameters must be populated in order to send to Azure. + + :param target_namespace: Required. The target namespace on which this + envelope settings has to be applied. + :type target_namespace: str + :param protocol_version: Required. The protocol version on which this + envelope settings has to be applied. + :type protocol_version: str + :param message_id: Required. The message id on which this envelope + settings has to be applied. + :type message_id: str + :param responsible_agency_code: Required. The responsible agency code. + :type responsible_agency_code: str + :param header_version: Required. The header version. + :type header_version: str + :param sender_application_id: Required. The sender application id. + :type sender_application_id: str + :param receiver_application_id: Required. The receiver application id. + :type receiver_application_id: str + :param functional_identifier_code: The functional identifier code. + :type functional_identifier_code: str + :param date_format: Required. The date format. Possible values include: + 'NotSpecified', 'CCYYMMDD', 'YYMMDD' + :type date_format: str or ~azure.mgmt.logic.models.X12DateFormat + :param time_format: Required. The time format. Possible values include: + 'NotSpecified', 'HHMM', 'HHMMSS', 'HHMMSSdd', 'HHMMSSd' + :type time_format: str or ~azure.mgmt.logic.models.X12TimeFormat + """ + + _validation = { + 'target_namespace': {'required': True}, + 'protocol_version': {'required': True}, + 'message_id': {'required': True}, + 'responsible_agency_code': {'required': True}, + 'header_version': {'required': True}, + 'sender_application_id': {'required': True}, + 'receiver_application_id': {'required': True}, + 'date_format': {'required': True}, + 'time_format': {'required': True}, + } + + _attribute_map = { + 'target_namespace': {'key': 'targetNamespace', 'type': 'str'}, + 'protocol_version': {'key': 'protocolVersion', 'type': 'str'}, + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'responsible_agency_code': {'key': 'responsibleAgencyCode', 'type': 'str'}, + 'header_version': {'key': 'headerVersion', 'type': 'str'}, + 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, + 'receiver_application_id': {'key': 'receiverApplicationId', 'type': 'str'}, + 'functional_identifier_code': {'key': 'functionalIdentifierCode', 'type': 'str'}, + 'date_format': {'key': 'dateFormat', 'type': 'str'}, + 'time_format': {'key': 'timeFormat', 'type': 'str'}, + } + + def __init__(self, *, target_namespace: str, protocol_version: str, message_id: str, responsible_agency_code: str, header_version: str, sender_application_id: str, receiver_application_id: str, date_format, time_format, functional_identifier_code: str=None, **kwargs) -> None: + super(X12EnvelopeOverride, self).__init__(**kwargs) + self.target_namespace = target_namespace + self.protocol_version = protocol_version + self.message_id = message_id + self.responsible_agency_code = responsible_agency_code + self.header_version = header_version + self.sender_application_id = sender_application_id + self.receiver_application_id = receiver_application_id + self.functional_identifier_code = functional_identifier_code + self.date_format = date_format + self.time_format = time_format + + +class X12EnvelopeSettings(Model): + """The X12 agreement envelope settings. + + All required parameters must be populated in order to send to Azure. + + :param control_standards_id: Required. The controls standards id. + :type control_standards_id: int + :param use_control_standards_id_as_repetition_character: Required. The + value indicating whether to use control standards id as repetition + character. + :type use_control_standards_id_as_repetition_character: bool + :param sender_application_id: Required. The sender application id. + :type sender_application_id: str + :param receiver_application_id: Required. The receiver application id. + :type receiver_application_id: str + :param control_version_number: Required. The control version number. + :type control_version_number: str + :param interchange_control_number_lower_bound: Required. The interchange + control number lower bound. + :type interchange_control_number_lower_bound: int + :param interchange_control_number_upper_bound: Required. The interchange + control number upper bound. + :type interchange_control_number_upper_bound: int + :param rollover_interchange_control_number: Required. The value indicating + whether to rollover interchange control number. + :type rollover_interchange_control_number: bool + :param enable_default_group_headers: Required. The value indicating + whether to enable default group headers. + :type enable_default_group_headers: bool + :param functional_group_id: The functional group id. + :type functional_group_id: str + :param group_control_number_lower_bound: Required. The group control + number lower bound. + :type group_control_number_lower_bound: int + :param group_control_number_upper_bound: Required. The group control + number upper bound. + :type group_control_number_upper_bound: int + :param rollover_group_control_number: Required. The value indicating + whether to rollover group control number. + :type rollover_group_control_number: bool + :param group_header_agency_code: Required. The group header agency code. + :type group_header_agency_code: str + :param group_header_version: Required. The group header version. + :type group_header_version: str + :param transaction_set_control_number_lower_bound: Required. The + transaction set control number lower bound. + :type transaction_set_control_number_lower_bound: int + :param transaction_set_control_number_upper_bound: Required. The + transaction set control number upper bound. + :type transaction_set_control_number_upper_bound: int + :param rollover_transaction_set_control_number: Required. The value + indicating whether to rollover transaction set control number. + :type rollover_transaction_set_control_number: bool + :param transaction_set_control_number_prefix: The transaction set control + number prefix. + :type transaction_set_control_number_prefix: str + :param transaction_set_control_number_suffix: The transaction set control + number suffix. + :type transaction_set_control_number_suffix: str + :param overwrite_existing_transaction_set_control_number: Required. The + value indicating whether to overwrite existing transaction set control + number. + :type overwrite_existing_transaction_set_control_number: bool + :param group_header_date_format: Required. The group header date format. + Possible values include: 'NotSpecified', 'CCYYMMDD', 'YYMMDD' + :type group_header_date_format: str or + ~azure.mgmt.logic.models.X12DateFormat + :param group_header_time_format: Required. The group header time format. + Possible values include: 'NotSpecified', 'HHMM', 'HHMMSS', 'HHMMSSdd', + 'HHMMSSd' + :type group_header_time_format: str or + ~azure.mgmt.logic.models.X12TimeFormat + :param usage_indicator: Required. The usage indicator. Possible values + include: 'NotSpecified', 'Test', 'Information', 'Production' + :type usage_indicator: str or ~azure.mgmt.logic.models.UsageIndicator + """ + + _validation = { + 'control_standards_id': {'required': True}, + 'use_control_standards_id_as_repetition_character': {'required': True}, + 'sender_application_id': {'required': True}, + 'receiver_application_id': {'required': True}, + 'control_version_number': {'required': True}, + 'interchange_control_number_lower_bound': {'required': True}, + 'interchange_control_number_upper_bound': {'required': True}, + 'rollover_interchange_control_number': {'required': True}, + 'enable_default_group_headers': {'required': True}, + 'group_control_number_lower_bound': {'required': True}, + 'group_control_number_upper_bound': {'required': True}, + 'rollover_group_control_number': {'required': True}, + 'group_header_agency_code': {'required': True}, + 'group_header_version': {'required': True}, + 'transaction_set_control_number_lower_bound': {'required': True}, + 'transaction_set_control_number_upper_bound': {'required': True}, + 'rollover_transaction_set_control_number': {'required': True}, + 'overwrite_existing_transaction_set_control_number': {'required': True}, + 'group_header_date_format': {'required': True}, + 'group_header_time_format': {'required': True}, + 'usage_indicator': {'required': True}, + } + + _attribute_map = { + 'control_standards_id': {'key': 'controlStandardsId', 'type': 'int'}, + 'use_control_standards_id_as_repetition_character': {'key': 'useControlStandardsIdAsRepetitionCharacter', 'type': 'bool'}, + 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, + 'receiver_application_id': {'key': 'receiverApplicationId', 'type': 'str'}, + 'control_version_number': {'key': 'controlVersionNumber', 'type': 'str'}, + 'interchange_control_number_lower_bound': {'key': 'interchangeControlNumberLowerBound', 'type': 'int'}, + 'interchange_control_number_upper_bound': {'key': 'interchangeControlNumberUpperBound', 'type': 'int'}, + 'rollover_interchange_control_number': {'key': 'rolloverInterchangeControlNumber', 'type': 'bool'}, + 'enable_default_group_headers': {'key': 'enableDefaultGroupHeaders', 'type': 'bool'}, + 'functional_group_id': {'key': 'functionalGroupId', 'type': 'str'}, + 'group_control_number_lower_bound': {'key': 'groupControlNumberLowerBound', 'type': 'int'}, + 'group_control_number_upper_bound': {'key': 'groupControlNumberUpperBound', 'type': 'int'}, + 'rollover_group_control_number': {'key': 'rolloverGroupControlNumber', 'type': 'bool'}, + 'group_header_agency_code': {'key': 'groupHeaderAgencyCode', 'type': 'str'}, + 'group_header_version': {'key': 'groupHeaderVersion', 'type': 'str'}, + 'transaction_set_control_number_lower_bound': {'key': 'transactionSetControlNumberLowerBound', 'type': 'int'}, + 'transaction_set_control_number_upper_bound': {'key': 'transactionSetControlNumberUpperBound', 'type': 'int'}, + 'rollover_transaction_set_control_number': {'key': 'rolloverTransactionSetControlNumber', 'type': 'bool'}, + 'transaction_set_control_number_prefix': {'key': 'transactionSetControlNumberPrefix', 'type': 'str'}, + 'transaction_set_control_number_suffix': {'key': 'transactionSetControlNumberSuffix', 'type': 'str'}, + 'overwrite_existing_transaction_set_control_number': {'key': 'overwriteExistingTransactionSetControlNumber', 'type': 'bool'}, + 'group_header_date_format': {'key': 'groupHeaderDateFormat', 'type': 'str'}, + 'group_header_time_format': {'key': 'groupHeaderTimeFormat', 'type': 'str'}, + 'usage_indicator': {'key': 'usageIndicator', 'type': 'str'}, + } + + def __init__(self, *, control_standards_id: int, use_control_standards_id_as_repetition_character: bool, sender_application_id: str, receiver_application_id: str, control_version_number: str, interchange_control_number_lower_bound: int, interchange_control_number_upper_bound: int, rollover_interchange_control_number: bool, enable_default_group_headers: bool, group_control_number_lower_bound: int, group_control_number_upper_bound: int, rollover_group_control_number: bool, group_header_agency_code: str, group_header_version: str, transaction_set_control_number_lower_bound: int, transaction_set_control_number_upper_bound: int, rollover_transaction_set_control_number: bool, overwrite_existing_transaction_set_control_number: bool, group_header_date_format, group_header_time_format, usage_indicator, functional_group_id: str=None, transaction_set_control_number_prefix: str=None, transaction_set_control_number_suffix: str=None, **kwargs) -> None: + super(X12EnvelopeSettings, self).__init__(**kwargs) + self.control_standards_id = control_standards_id + self.use_control_standards_id_as_repetition_character = use_control_standards_id_as_repetition_character + self.sender_application_id = sender_application_id + self.receiver_application_id = receiver_application_id + self.control_version_number = control_version_number + self.interchange_control_number_lower_bound = interchange_control_number_lower_bound + self.interchange_control_number_upper_bound = interchange_control_number_upper_bound + self.rollover_interchange_control_number = rollover_interchange_control_number + self.enable_default_group_headers = enable_default_group_headers + self.functional_group_id = functional_group_id + self.group_control_number_lower_bound = group_control_number_lower_bound + self.group_control_number_upper_bound = group_control_number_upper_bound + self.rollover_group_control_number = rollover_group_control_number + self.group_header_agency_code = group_header_agency_code + self.group_header_version = group_header_version + self.transaction_set_control_number_lower_bound = transaction_set_control_number_lower_bound + self.transaction_set_control_number_upper_bound = transaction_set_control_number_upper_bound + self.rollover_transaction_set_control_number = rollover_transaction_set_control_number + self.transaction_set_control_number_prefix = transaction_set_control_number_prefix + self.transaction_set_control_number_suffix = transaction_set_control_number_suffix + self.overwrite_existing_transaction_set_control_number = overwrite_existing_transaction_set_control_number + self.group_header_date_format = group_header_date_format + self.group_header_time_format = group_header_time_format + self.usage_indicator = usage_indicator + + +class X12FramingSettings(Model): + """The X12 agreement framing settings. + + All required parameters must be populated in order to send to Azure. + + :param data_element_separator: Required. The data element separator. + :type data_element_separator: int + :param component_separator: Required. The component separator. + :type component_separator: int + :param replace_separators_in_payload: Required. The value indicating + whether to replace separators in payload. + :type replace_separators_in_payload: bool + :param replace_character: Required. The replacement character. + :type replace_character: int + :param segment_terminator: Required. The segment terminator. + :type segment_terminator: int + :param character_set: Required. The X12 character set. Possible values + include: 'NotSpecified', 'Basic', 'Extended', 'UTF8' + :type character_set: str or ~azure.mgmt.logic.models.X12CharacterSet + :param segment_terminator_suffix: Required. The segment terminator suffix. + Possible values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' + :type segment_terminator_suffix: str or + ~azure.mgmt.logic.models.SegmentTerminatorSuffix + """ + + _validation = { + 'data_element_separator': {'required': True}, + 'component_separator': {'required': True}, + 'replace_separators_in_payload': {'required': True}, + 'replace_character': {'required': True}, + 'segment_terminator': {'required': True}, + 'character_set': {'required': True}, + 'segment_terminator_suffix': {'required': True}, + } + + _attribute_map = { + 'data_element_separator': {'key': 'dataElementSeparator', 'type': 'int'}, + 'component_separator': {'key': 'componentSeparator', 'type': 'int'}, + 'replace_separators_in_payload': {'key': 'replaceSeparatorsInPayload', 'type': 'bool'}, + 'replace_character': {'key': 'replaceCharacter', 'type': 'int'}, + 'segment_terminator': {'key': 'segmentTerminator', 'type': 'int'}, + 'character_set': {'key': 'characterSet', 'type': 'str'}, + 'segment_terminator_suffix': {'key': 'segmentTerminatorSuffix', 'type': 'SegmentTerminatorSuffix'}, + } + + def __init__(self, *, data_element_separator: int, component_separator: int, replace_separators_in_payload: bool, replace_character: int, segment_terminator: int, character_set, segment_terminator_suffix, **kwargs) -> None: + super(X12FramingSettings, self).__init__(**kwargs) + self.data_element_separator = data_element_separator + self.component_separator = component_separator + self.replace_separators_in_payload = replace_separators_in_payload + self.replace_character = replace_character + self.segment_terminator = segment_terminator + self.character_set = character_set + self.segment_terminator_suffix = segment_terminator_suffix + + +class X12MessageFilter(Model): + """The X12 message filter for odata query. + + All required parameters must be populated in order to send to Azure. + + :param message_filter_type: Required. The message filter type. Possible + values include: 'NotSpecified', 'Include', 'Exclude' + :type message_filter_type: str or + ~azure.mgmt.logic.models.MessageFilterType + """ + + _validation = { + 'message_filter_type': {'required': True}, + } + + _attribute_map = { + 'message_filter_type': {'key': 'messageFilterType', 'type': 'str'}, + } + + def __init__(self, *, message_filter_type, **kwargs) -> None: + super(X12MessageFilter, self).__init__(**kwargs) + self.message_filter_type = message_filter_type + + +class X12MessageIdentifier(Model): + """The X12 message identifier. + + All required parameters must be populated in order to send to Azure. + + :param message_id: Required. The message id. + :type message_id: str + """ + + _validation = { + 'message_id': {'required': True}, + } + + _attribute_map = { + 'message_id': {'key': 'messageId', 'type': 'str'}, + } + + def __init__(self, *, message_id: str, **kwargs) -> None: + super(X12MessageIdentifier, self).__init__(**kwargs) + self.message_id = message_id + + +class X12OneWayAgreement(Model): + """The X12 one-way agreement. + + All required parameters must be populated in order to send to Azure. + + :param sender_business_identity: Required. The sender business identity + :type sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :param receiver_business_identity: Required. The receiver business + identity + :type receiver_business_identity: + ~azure.mgmt.logic.models.BusinessIdentity + :param protocol_settings: Required. The X12 protocol settings. + :type protocol_settings: ~azure.mgmt.logic.models.X12ProtocolSettings + """ + + _validation = { + 'sender_business_identity': {'required': True}, + 'receiver_business_identity': {'required': True}, + 'protocol_settings': {'required': True}, + } + + _attribute_map = { + 'sender_business_identity': {'key': 'senderBusinessIdentity', 'type': 'BusinessIdentity'}, + 'receiver_business_identity': {'key': 'receiverBusinessIdentity', 'type': 'BusinessIdentity'}, + 'protocol_settings': {'key': 'protocolSettings', 'type': 'X12ProtocolSettings'}, + } + + def __init__(self, *, sender_business_identity, receiver_business_identity, protocol_settings, **kwargs) -> None: + super(X12OneWayAgreement, self).__init__(**kwargs) + self.sender_business_identity = sender_business_identity + self.receiver_business_identity = receiver_business_identity + self.protocol_settings = protocol_settings + + +class X12ProcessingSettings(Model): + """The X12 processing settings. + + All required parameters must be populated in order to send to Azure. + + :param mask_security_info: Required. The value indicating whether to mask + security information. + :type mask_security_info: bool + :param convert_implied_decimal: Required. The value indicating whether to + convert numerical type to implied decimal. + :type convert_implied_decimal: bool + :param preserve_interchange: Required. The value indicating whether to + preserve interchange. + :type preserve_interchange: bool + :param suspend_interchange_on_error: Required. The value indicating + whether to suspend interchange on error. + :type suspend_interchange_on_error: bool + :param create_empty_xml_tags_for_trailing_separators: Required. The value + indicating whether to create empty xml tags for trailing separators. + :type create_empty_xml_tags_for_trailing_separators: bool + :param use_dot_as_decimal_separator: Required. The value indicating + whether to use dot as decimal separator. + :type use_dot_as_decimal_separator: bool + """ + + _validation = { + 'mask_security_info': {'required': True}, + 'convert_implied_decimal': {'required': True}, + 'preserve_interchange': {'required': True}, + 'suspend_interchange_on_error': {'required': True}, + 'create_empty_xml_tags_for_trailing_separators': {'required': True}, + 'use_dot_as_decimal_separator': {'required': True}, + } + + _attribute_map = { + 'mask_security_info': {'key': 'maskSecurityInfo', 'type': 'bool'}, + 'convert_implied_decimal': {'key': 'convertImpliedDecimal', 'type': 'bool'}, + 'preserve_interchange': {'key': 'preserveInterchange', 'type': 'bool'}, + 'suspend_interchange_on_error': {'key': 'suspendInterchangeOnError', 'type': 'bool'}, + 'create_empty_xml_tags_for_trailing_separators': {'key': 'createEmptyXmlTagsForTrailingSeparators', 'type': 'bool'}, + 'use_dot_as_decimal_separator': {'key': 'useDotAsDecimalSeparator', 'type': 'bool'}, + } + + def __init__(self, *, mask_security_info: bool, convert_implied_decimal: bool, preserve_interchange: bool, suspend_interchange_on_error: bool, create_empty_xml_tags_for_trailing_separators: bool, use_dot_as_decimal_separator: bool, **kwargs) -> None: + super(X12ProcessingSettings, self).__init__(**kwargs) + self.mask_security_info = mask_security_info + self.convert_implied_decimal = convert_implied_decimal + self.preserve_interchange = preserve_interchange + self.suspend_interchange_on_error = suspend_interchange_on_error + self.create_empty_xml_tags_for_trailing_separators = create_empty_xml_tags_for_trailing_separators + self.use_dot_as_decimal_separator = use_dot_as_decimal_separator + + +class X12ProtocolSettings(Model): + """The X12 agreement protocol settings. + + All required parameters must be populated in order to send to Azure. + + :param validation_settings: Required. The X12 validation settings. + :type validation_settings: ~azure.mgmt.logic.models.X12ValidationSettings + :param framing_settings: Required. The X12 framing settings. + :type framing_settings: ~azure.mgmt.logic.models.X12FramingSettings + :param envelope_settings: Required. The X12 envelope settings. + :type envelope_settings: ~azure.mgmt.logic.models.X12EnvelopeSettings + :param acknowledgement_settings: Required. The X12 acknowledgment + settings. + :type acknowledgement_settings: + ~azure.mgmt.logic.models.X12AcknowledgementSettings + :param message_filter: Required. The X12 message filter. + :type message_filter: ~azure.mgmt.logic.models.X12MessageFilter + :param security_settings: Required. The X12 security settings. + :type security_settings: ~azure.mgmt.logic.models.X12SecuritySettings + :param processing_settings: Required. The X12 processing settings. + :type processing_settings: ~azure.mgmt.logic.models.X12ProcessingSettings + :param envelope_overrides: The X12 envelope override settings. + :type envelope_overrides: + list[~azure.mgmt.logic.models.X12EnvelopeOverride] + :param validation_overrides: The X12 validation override settings. + :type validation_overrides: + list[~azure.mgmt.logic.models.X12ValidationOverride] + :param message_filter_list: The X12 message filter list. + :type message_filter_list: + list[~azure.mgmt.logic.models.X12MessageIdentifier] + :param schema_references: Required. The X12 schema references. + :type schema_references: list[~azure.mgmt.logic.models.X12SchemaReference] + :param x12_delimiter_overrides: The X12 delimiter override settings. + :type x12_delimiter_overrides: + list[~azure.mgmt.logic.models.X12DelimiterOverrides] + """ + + _validation = { + 'validation_settings': {'required': True}, + 'framing_settings': {'required': True}, + 'envelope_settings': {'required': True}, + 'acknowledgement_settings': {'required': True}, + 'message_filter': {'required': True}, + 'security_settings': {'required': True}, + 'processing_settings': {'required': True}, + 'schema_references': {'required': True}, + } + + _attribute_map = { + 'validation_settings': {'key': 'validationSettings', 'type': 'X12ValidationSettings'}, + 'framing_settings': {'key': 'framingSettings', 'type': 'X12FramingSettings'}, + 'envelope_settings': {'key': 'envelopeSettings', 'type': 'X12EnvelopeSettings'}, + 'acknowledgement_settings': {'key': 'acknowledgementSettings', 'type': 'X12AcknowledgementSettings'}, + 'message_filter': {'key': 'messageFilter', 'type': 'X12MessageFilter'}, + 'security_settings': {'key': 'securitySettings', 'type': 'X12SecuritySettings'}, + 'processing_settings': {'key': 'processingSettings', 'type': 'X12ProcessingSettings'}, + 'envelope_overrides': {'key': 'envelopeOverrides', 'type': '[X12EnvelopeOverride]'}, + 'validation_overrides': {'key': 'validationOverrides', 'type': '[X12ValidationOverride]'}, + 'message_filter_list': {'key': 'messageFilterList', 'type': '[X12MessageIdentifier]'}, + 'schema_references': {'key': 'schemaReferences', 'type': '[X12SchemaReference]'}, + 'x12_delimiter_overrides': {'key': 'x12DelimiterOverrides', 'type': '[X12DelimiterOverrides]'}, + } + + def __init__(self, *, validation_settings, framing_settings, envelope_settings, acknowledgement_settings, message_filter, security_settings, processing_settings, schema_references, envelope_overrides=None, validation_overrides=None, message_filter_list=None, x12_delimiter_overrides=None, **kwargs) -> None: + super(X12ProtocolSettings, self).__init__(**kwargs) + self.validation_settings = validation_settings + self.framing_settings = framing_settings + self.envelope_settings = envelope_settings + self.acknowledgement_settings = acknowledgement_settings + self.message_filter = message_filter + self.security_settings = security_settings + self.processing_settings = processing_settings + self.envelope_overrides = envelope_overrides + self.validation_overrides = validation_overrides + self.message_filter_list = message_filter_list + self.schema_references = schema_references + self.x12_delimiter_overrides = x12_delimiter_overrides + + +class X12SchemaReference(Model): + """The X12 schema reference. + + All required parameters must be populated in order to send to Azure. + + :param message_id: Required. The message id. + :type message_id: str + :param sender_application_id: The sender application id. + :type sender_application_id: str + :param schema_version: Required. The schema version. + :type schema_version: str + :param schema_name: Required. The schema name. + :type schema_name: str + """ + + _validation = { + 'message_id': {'required': True}, + 'schema_version': {'required': True}, + 'schema_name': {'required': True}, + } + + _attribute_map = { + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, + 'schema_version': {'key': 'schemaVersion', 'type': 'str'}, + 'schema_name': {'key': 'schemaName', 'type': 'str'}, + } + + def __init__(self, *, message_id: str, schema_version: str, schema_name: str, sender_application_id: str=None, **kwargs) -> None: + super(X12SchemaReference, self).__init__(**kwargs) + self.message_id = message_id + self.sender_application_id = sender_application_id + self.schema_version = schema_version + self.schema_name = schema_name + + +class X12SecuritySettings(Model): + """The X12 agreement security settings. + + All required parameters must be populated in order to send to Azure. + + :param authorization_qualifier: Required. The authorization qualifier. + :type authorization_qualifier: str + :param authorization_value: The authorization value. + :type authorization_value: str + :param security_qualifier: Required. The security qualifier. + :type security_qualifier: str + :param password_value: The password value. + :type password_value: str + """ + + _validation = { + 'authorization_qualifier': {'required': True}, + 'security_qualifier': {'required': True}, + } + + _attribute_map = { + 'authorization_qualifier': {'key': 'authorizationQualifier', 'type': 'str'}, + 'authorization_value': {'key': 'authorizationValue', 'type': 'str'}, + 'security_qualifier': {'key': 'securityQualifier', 'type': 'str'}, + 'password_value': {'key': 'passwordValue', 'type': 'str'}, + } + + def __init__(self, *, authorization_qualifier: str, security_qualifier: str, authorization_value: str=None, password_value: str=None, **kwargs) -> None: + super(X12SecuritySettings, self).__init__(**kwargs) + self.authorization_qualifier = authorization_qualifier + self.authorization_value = authorization_value + self.security_qualifier = security_qualifier + self.password_value = password_value + + +class X12ValidationOverride(Model): + """The X12 validation override settings. + + All required parameters must be populated in order to send to Azure. + + :param message_id: Required. The message id on which the validation + settings has to be applied. + :type message_id: str + :param validate_edi_types: Required. The value indicating whether to + validate EDI types. + :type validate_edi_types: bool + :param validate_xsd_types: Required. The value indicating whether to + validate XSD types. + :type validate_xsd_types: bool + :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to allow leading and trailing spaces and zeroes. + :type allow_leading_and_trailing_spaces_and_zeroes: bool + :param validate_character_set: Required. The value indicating whether to + validate character Set. + :type validate_character_set: bool + :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to trim leading and trailing spaces and zeroes. + :type trim_leading_and_trailing_spaces_and_zeroes: bool + :param trailing_separator_policy: Required. The trailing separator policy. + Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', + 'Mandatory' + :type trailing_separator_policy: str or + ~azure.mgmt.logic.models.TrailingSeparatorPolicy + """ + + _validation = { + 'message_id': {'required': True}, + 'validate_edi_types': {'required': True}, + 'validate_xsd_types': {'required': True}, + 'allow_leading_and_trailing_spaces_and_zeroes': {'required': True}, + 'validate_character_set': {'required': True}, + 'trim_leading_and_trailing_spaces_and_zeroes': {'required': True}, + 'trailing_separator_policy': {'required': True}, + } + + _attribute_map = { + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'validate_edi_types': {'key': 'validateEDITypes', 'type': 'bool'}, + 'validate_xsd_types': {'key': 'validateXSDTypes', 'type': 'bool'}, + 'allow_leading_and_trailing_spaces_and_zeroes': {'key': 'allowLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, + 'validate_character_set': {'key': 'validateCharacterSet', 'type': 'bool'}, + 'trim_leading_and_trailing_spaces_and_zeroes': {'key': 'trimLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, + 'trailing_separator_policy': {'key': 'trailingSeparatorPolicy', 'type': 'str'}, + } + + def __init__(self, *, message_id: str, validate_edi_types: bool, validate_xsd_types: bool, allow_leading_and_trailing_spaces_and_zeroes: bool, validate_character_set: bool, trim_leading_and_trailing_spaces_and_zeroes: bool, trailing_separator_policy, **kwargs) -> None: + super(X12ValidationOverride, self).__init__(**kwargs) + self.message_id = message_id + self.validate_edi_types = validate_edi_types + self.validate_xsd_types = validate_xsd_types + self.allow_leading_and_trailing_spaces_and_zeroes = allow_leading_and_trailing_spaces_and_zeroes + self.validate_character_set = validate_character_set + self.trim_leading_and_trailing_spaces_and_zeroes = trim_leading_and_trailing_spaces_and_zeroes + self.trailing_separator_policy = trailing_separator_policy + + +class X12ValidationSettings(Model): + """The X12 agreement validation settings. + + All required parameters must be populated in order to send to Azure. + + :param validate_character_set: Required. The value indicating whether to + validate character set in the message. + :type validate_character_set: bool + :param check_duplicate_interchange_control_number: Required. The value + indicating whether to check for duplicate interchange control number. + :type check_duplicate_interchange_control_number: bool + :param interchange_control_number_validity_days: Required. The validity + period of interchange control number. + :type interchange_control_number_validity_days: int + :param check_duplicate_group_control_number: Required. The value + indicating whether to check for duplicate group control number. + :type check_duplicate_group_control_number: bool + :param check_duplicate_transaction_set_control_number: Required. The value + indicating whether to check for duplicate transaction set control number. + :type check_duplicate_transaction_set_control_number: bool + :param validate_edi_types: Required. The value indicating whether to + Whether to validate EDI types. + :type validate_edi_types: bool + :param validate_xsd_types: Required. The value indicating whether to + Whether to validate XSD types. + :type validate_xsd_types: bool + :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to allow leading and trailing spaces and zeroes. + :type allow_leading_and_trailing_spaces_and_zeroes: bool + :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to trim leading and trailing spaces and zeroes. + :type trim_leading_and_trailing_spaces_and_zeroes: bool + :param trailing_separator_policy: Required. The trailing separator policy. + Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', + 'Mandatory' + :type trailing_separator_policy: str or + ~azure.mgmt.logic.models.TrailingSeparatorPolicy + """ + + _validation = { + 'validate_character_set': {'required': True}, + 'check_duplicate_interchange_control_number': {'required': True}, + 'interchange_control_number_validity_days': {'required': True}, + 'check_duplicate_group_control_number': {'required': True}, + 'check_duplicate_transaction_set_control_number': {'required': True}, + 'validate_edi_types': {'required': True}, + 'validate_xsd_types': {'required': True}, + 'allow_leading_and_trailing_spaces_and_zeroes': {'required': True}, + 'trim_leading_and_trailing_spaces_and_zeroes': {'required': True}, + 'trailing_separator_policy': {'required': True}, + } + + _attribute_map = { + 'validate_character_set': {'key': 'validateCharacterSet', 'type': 'bool'}, + 'check_duplicate_interchange_control_number': {'key': 'checkDuplicateInterchangeControlNumber', 'type': 'bool'}, + 'interchange_control_number_validity_days': {'key': 'interchangeControlNumberValidityDays', 'type': 'int'}, + 'check_duplicate_group_control_number': {'key': 'checkDuplicateGroupControlNumber', 'type': 'bool'}, + 'check_duplicate_transaction_set_control_number': {'key': 'checkDuplicateTransactionSetControlNumber', 'type': 'bool'}, + 'validate_edi_types': {'key': 'validateEDITypes', 'type': 'bool'}, + 'validate_xsd_types': {'key': 'validateXSDTypes', 'type': 'bool'}, + 'allow_leading_and_trailing_spaces_and_zeroes': {'key': 'allowLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, + 'trim_leading_and_trailing_spaces_and_zeroes': {'key': 'trimLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, + 'trailing_separator_policy': {'key': 'trailingSeparatorPolicy', 'type': 'str'}, + } + + def __init__(self, *, validate_character_set: bool, check_duplicate_interchange_control_number: bool, interchange_control_number_validity_days: int, check_duplicate_group_control_number: bool, check_duplicate_transaction_set_control_number: bool, validate_edi_types: bool, validate_xsd_types: bool, allow_leading_and_trailing_spaces_and_zeroes: bool, trim_leading_and_trailing_spaces_and_zeroes: bool, trailing_separator_policy, **kwargs) -> None: + super(X12ValidationSettings, self).__init__(**kwargs) + self.validate_character_set = validate_character_set + self.check_duplicate_interchange_control_number = check_duplicate_interchange_control_number + self.interchange_control_number_validity_days = interchange_control_number_validity_days + self.check_duplicate_group_control_number = check_duplicate_group_control_number + self.check_duplicate_transaction_set_control_number = check_duplicate_transaction_set_control_number + self.validate_edi_types = validate_edi_types + self.validate_xsd_types = validate_xsd_types + self.allow_leading_and_trailing_spaces_and_zeroes = allow_leading_and_trailing_spaces_and_zeroes + self.trim_leading_and_trailing_spaces_and_zeroes = trim_leading_and_trailing_spaces_and_zeroes + self.trailing_separator_policy = trailing_separator_policy diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/_paged_models.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/_paged_models.py new file mode 100644 index 000000000000..e73bed124968 --- /dev/null +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/_paged_models.py @@ -0,0 +1,274 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class WorkflowPaged(Paged): + """ + A paging container for iterating over a list of :class:`Workflow ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Workflow]'} + } + + def __init__(self, *args, **kwargs): + + super(WorkflowPaged, self).__init__(*args, **kwargs) +class WorkflowVersionPaged(Paged): + """ + A paging container for iterating over a list of :class:`WorkflowVersion ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[WorkflowVersion]'} + } + + def __init__(self, *args, **kwargs): + + super(WorkflowVersionPaged, self).__init__(*args, **kwargs) +class WorkflowTriggerPaged(Paged): + """ + A paging container for iterating over a list of :class:`WorkflowTrigger ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[WorkflowTrigger]'} + } + + def __init__(self, *args, **kwargs): + + super(WorkflowTriggerPaged, self).__init__(*args, **kwargs) +class WorkflowTriggerHistoryPaged(Paged): + """ + A paging container for iterating over a list of :class:`WorkflowTriggerHistory ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[WorkflowTriggerHistory]'} + } + + def __init__(self, *args, **kwargs): + + super(WorkflowTriggerHistoryPaged, self).__init__(*args, **kwargs) +class WorkflowRunPaged(Paged): + """ + A paging container for iterating over a list of :class:`WorkflowRun ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[WorkflowRun]'} + } + + def __init__(self, *args, **kwargs): + + super(WorkflowRunPaged, self).__init__(*args, **kwargs) +class WorkflowRunActionPaged(Paged): + """ + A paging container for iterating over a list of :class:`WorkflowRunAction ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[WorkflowRunAction]'} + } + + def __init__(self, *args, **kwargs): + + super(WorkflowRunActionPaged, self).__init__(*args, **kwargs) +class ExpressionRootPaged(Paged): + """ + A paging container for iterating over a list of :class:`ExpressionRoot ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'inputs', 'type': '[ExpressionRoot]'} + } + + def __init__(self, *args, **kwargs): + + super(ExpressionRootPaged, self).__init__(*args, **kwargs) +class WorkflowRunActionRepetitionDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`WorkflowRunActionRepetitionDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[WorkflowRunActionRepetitionDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(WorkflowRunActionRepetitionDefinitionPaged, self).__init__(*args, **kwargs) +class RequestHistoryPaged(Paged): + """ + A paging container for iterating over a list of :class:`RequestHistory ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RequestHistory]'} + } + + def __init__(self, *args, **kwargs): + + super(RequestHistoryPaged, self).__init__(*args, **kwargs) +class IntegrationAccountPaged(Paged): + """ + A paging container for iterating over a list of :class:`IntegrationAccount ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[IntegrationAccount]'} + } + + def __init__(self, *args, **kwargs): + + super(IntegrationAccountPaged, self).__init__(*args, **kwargs) +class KeyVaultKeyPaged(Paged): + """ + A paging container for iterating over a list of :class:`KeyVaultKey ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[KeyVaultKey]'} + } + + def __init__(self, *args, **kwargs): + + super(KeyVaultKeyPaged, self).__init__(*args, **kwargs) +class AssemblyDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`AssemblyDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AssemblyDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(AssemblyDefinitionPaged, self).__init__(*args, **kwargs) +class BatchConfigurationPaged(Paged): + """ + A paging container for iterating over a list of :class:`BatchConfiguration ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[BatchConfiguration]'} + } + + def __init__(self, *args, **kwargs): + + super(BatchConfigurationPaged, self).__init__(*args, **kwargs) +class IntegrationAccountSchemaPaged(Paged): + """ + A paging container for iterating over a list of :class:`IntegrationAccountSchema ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[IntegrationAccountSchema]'} + } + + def __init__(self, *args, **kwargs): + + super(IntegrationAccountSchemaPaged, self).__init__(*args, **kwargs) +class IntegrationAccountMapPaged(Paged): + """ + A paging container for iterating over a list of :class:`IntegrationAccountMap ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[IntegrationAccountMap]'} + } + + def __init__(self, *args, **kwargs): + + super(IntegrationAccountMapPaged, self).__init__(*args, **kwargs) +class IntegrationAccountPartnerPaged(Paged): + """ + A paging container for iterating over a list of :class:`IntegrationAccountPartner ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[IntegrationAccountPartner]'} + } + + def __init__(self, *args, **kwargs): + + super(IntegrationAccountPartnerPaged, self).__init__(*args, **kwargs) +class IntegrationAccountAgreementPaged(Paged): + """ + A paging container for iterating over a list of :class:`IntegrationAccountAgreement ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[IntegrationAccountAgreement]'} + } + + def __init__(self, *args, **kwargs): + + super(IntegrationAccountAgreementPaged, self).__init__(*args, **kwargs) +class IntegrationAccountCertificatePaged(Paged): + """ + A paging container for iterating over a list of :class:`IntegrationAccountCertificate ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[IntegrationAccountCertificate]'} + } + + def __init__(self, *args, **kwargs): + + super(IntegrationAccountCertificatePaged, self).__init__(*args, **kwargs) +class IntegrationAccountSessionPaged(Paged): + """ + A paging container for iterating over a list of :class:`IntegrationAccountSession ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[IntegrationAccountSession]'} + } + + def __init__(self, *args, **kwargs): + + super(IntegrationAccountSessionPaged, self).__init__(*args, **kwargs) +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/agreement_content.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/agreement_content.py deleted file mode 100644 index a447ae65cea8..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/agreement_content.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AgreementContent(Model): - """The integration account agreement content. - - :param a_s2: The AS2 agreement content. - :type a_s2: ~azure.mgmt.logic.models.AS2AgreementContent - :param x12: The X12 agreement content. - :type x12: ~azure.mgmt.logic.models.X12AgreementContent - :param edifact: The EDIFACT agreement content. - :type edifact: ~azure.mgmt.logic.models.EdifactAgreementContent - """ - - _attribute_map = { - 'a_s2': {'key': 'aS2', 'type': 'AS2AgreementContent'}, - 'x12': {'key': 'x12', 'type': 'X12AgreementContent'}, - 'edifact': {'key': 'edifact', 'type': 'EdifactAgreementContent'}, - } - - def __init__(self, **kwargs): - super(AgreementContent, self).__init__(**kwargs) - self.a_s2 = kwargs.get('a_s2', None) - self.x12 = kwargs.get('x12', None) - self.edifact = kwargs.get('edifact', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/agreement_content_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/agreement_content_py3.py deleted file mode 100644 index a0b8c0c0868a..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/agreement_content_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AgreementContent(Model): - """The integration account agreement content. - - :param a_s2: The AS2 agreement content. - :type a_s2: ~azure.mgmt.logic.models.AS2AgreementContent - :param x12: The X12 agreement content. - :type x12: ~azure.mgmt.logic.models.X12AgreementContent - :param edifact: The EDIFACT agreement content. - :type edifact: ~azure.mgmt.logic.models.EdifactAgreementContent - """ - - _attribute_map = { - 'a_s2': {'key': 'aS2', 'type': 'AS2AgreementContent'}, - 'x12': {'key': 'x12', 'type': 'X12AgreementContent'}, - 'edifact': {'key': 'edifact', 'type': 'EdifactAgreementContent'}, - } - - def __init__(self, *, a_s2=None, x12=None, edifact=None, **kwargs) -> None: - super(AgreementContent, self).__init__(**kwargs) - self.a_s2 = a_s2 - self.x12 = x12 - self.edifact = edifact diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/artifact_content_properties_definition.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/artifact_content_properties_definition.py deleted file mode 100644 index 7a6e617e023b..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/artifact_content_properties_definition.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .artifact_properties import ArtifactProperties - - -class ArtifactContentPropertiesDefinition(ArtifactProperties): - """The artifact content properties definition. - - :param created_time: The artifact creation time. - :type created_time: datetime - :param changed_time: The artifact changed time. - :type changed_time: datetime - :param metadata: - :type metadata: object - :param content: - :type content: object - :param content_type: The content type. - :type content_type: str - :param content_link: The content link. - :type content_link: ~azure.mgmt.logic.models.ContentLink - """ - - _attribute_map = { - 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - 'content': {'key': 'content', 'type': 'object'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, - 'content_link': {'key': 'contentLink', 'type': 'ContentLink'}, - } - - def __init__(self, **kwargs): - super(ArtifactContentPropertiesDefinition, self).__init__(**kwargs) - self.content = kwargs.get('content', None) - self.content_type = kwargs.get('content_type', None) - self.content_link = kwargs.get('content_link', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/artifact_content_properties_definition_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/artifact_content_properties_definition_py3.py deleted file mode 100644 index 64690564073c..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/artifact_content_properties_definition_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .artifact_properties_py3 import ArtifactProperties - - -class ArtifactContentPropertiesDefinition(ArtifactProperties): - """The artifact content properties definition. - - :param created_time: The artifact creation time. - :type created_time: datetime - :param changed_time: The artifact changed time. - :type changed_time: datetime - :param metadata: - :type metadata: object - :param content: - :type content: object - :param content_type: The content type. - :type content_type: str - :param content_link: The content link. - :type content_link: ~azure.mgmt.logic.models.ContentLink - """ - - _attribute_map = { - 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - 'content': {'key': 'content', 'type': 'object'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, - 'content_link': {'key': 'contentLink', 'type': 'ContentLink'}, - } - - def __init__(self, *, created_time=None, changed_time=None, metadata=None, content=None, content_type: str=None, content_link=None, **kwargs) -> None: - super(ArtifactContentPropertiesDefinition, self).__init__(created_time=created_time, changed_time=changed_time, metadata=metadata, **kwargs) - self.content = content - self.content_type = content_type - self.content_link = content_link diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/artifact_properties.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/artifact_properties.py deleted file mode 100644 index a2f3088a0fbf..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/artifact_properties.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactProperties(Model): - """The artifact properties definition. - - :param created_time: The artifact creation time. - :type created_time: datetime - :param changed_time: The artifact changed time. - :type changed_time: datetime - :param metadata: - :type metadata: object - """ - - _attribute_map = { - 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ArtifactProperties, self).__init__(**kwargs) - self.created_time = kwargs.get('created_time', None) - self.changed_time = kwargs.get('changed_time', None) - self.metadata = kwargs.get('metadata', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/artifact_properties_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/artifact_properties_py3.py deleted file mode 100644 index cf7381007c5b..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/artifact_properties_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ArtifactProperties(Model): - """The artifact properties definition. - - :param created_time: The artifact creation time. - :type created_time: datetime - :param changed_time: The artifact changed time. - :type changed_time: datetime - :param metadata: - :type metadata: object - """ - - _attribute_map = { - 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - } - - def __init__(self, *, created_time=None, changed_time=None, metadata=None, **kwargs) -> None: - super(ArtifactProperties, self).__init__(**kwargs) - self.created_time = created_time - self.changed_time = changed_time - self.metadata = metadata diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_acknowledgement_connection_settings.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_acknowledgement_connection_settings.py deleted file mode 100644 index ed3f318153d3..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_acknowledgement_connection_settings.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AS2AcknowledgementConnectionSettings(Model): - """The AS2 agreement acknowledgement connection settings. - - All required parameters must be populated in order to send to Azure. - - :param ignore_certificate_name_mismatch: Required. The value indicating - whether to ignore mismatch in certificate name. - :type ignore_certificate_name_mismatch: bool - :param support_http_status_code_continue: Required. The value indicating - whether to support HTTP status code 'CONTINUE'. - :type support_http_status_code_continue: bool - :param keep_http_connection_alive: Required. The value indicating whether - to keep the connection alive. - :type keep_http_connection_alive: bool - :param unfold_http_headers: Required. The value indicating whether to - unfold the HTTP headers. - :type unfold_http_headers: bool - """ - - _validation = { - 'ignore_certificate_name_mismatch': {'required': True}, - 'support_http_status_code_continue': {'required': True}, - 'keep_http_connection_alive': {'required': True}, - 'unfold_http_headers': {'required': True}, - } - - _attribute_map = { - 'ignore_certificate_name_mismatch': {'key': 'ignoreCertificateNameMismatch', 'type': 'bool'}, - 'support_http_status_code_continue': {'key': 'supportHttpStatusCodeContinue', 'type': 'bool'}, - 'keep_http_connection_alive': {'key': 'keepHttpConnectionAlive', 'type': 'bool'}, - 'unfold_http_headers': {'key': 'unfoldHttpHeaders', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AS2AcknowledgementConnectionSettings, self).__init__(**kwargs) - self.ignore_certificate_name_mismatch = kwargs.get('ignore_certificate_name_mismatch', None) - self.support_http_status_code_continue = kwargs.get('support_http_status_code_continue', None) - self.keep_http_connection_alive = kwargs.get('keep_http_connection_alive', None) - self.unfold_http_headers = kwargs.get('unfold_http_headers', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_acknowledgement_connection_settings_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_acknowledgement_connection_settings_py3.py deleted file mode 100644 index 1b9fc2467be1..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_acknowledgement_connection_settings_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AS2AcknowledgementConnectionSettings(Model): - """The AS2 agreement acknowledgement connection settings. - - All required parameters must be populated in order to send to Azure. - - :param ignore_certificate_name_mismatch: Required. The value indicating - whether to ignore mismatch in certificate name. - :type ignore_certificate_name_mismatch: bool - :param support_http_status_code_continue: Required. The value indicating - whether to support HTTP status code 'CONTINUE'. - :type support_http_status_code_continue: bool - :param keep_http_connection_alive: Required. The value indicating whether - to keep the connection alive. - :type keep_http_connection_alive: bool - :param unfold_http_headers: Required. The value indicating whether to - unfold the HTTP headers. - :type unfold_http_headers: bool - """ - - _validation = { - 'ignore_certificate_name_mismatch': {'required': True}, - 'support_http_status_code_continue': {'required': True}, - 'keep_http_connection_alive': {'required': True}, - 'unfold_http_headers': {'required': True}, - } - - _attribute_map = { - 'ignore_certificate_name_mismatch': {'key': 'ignoreCertificateNameMismatch', 'type': 'bool'}, - 'support_http_status_code_continue': {'key': 'supportHttpStatusCodeContinue', 'type': 'bool'}, - 'keep_http_connection_alive': {'key': 'keepHttpConnectionAlive', 'type': 'bool'}, - 'unfold_http_headers': {'key': 'unfoldHttpHeaders', 'type': 'bool'}, - } - - def __init__(self, *, ignore_certificate_name_mismatch: bool, support_http_status_code_continue: bool, keep_http_connection_alive: bool, unfold_http_headers: bool, **kwargs) -> None: - super(AS2AcknowledgementConnectionSettings, self).__init__(**kwargs) - self.ignore_certificate_name_mismatch = ignore_certificate_name_mismatch - self.support_http_status_code_continue = support_http_status_code_continue - self.keep_http_connection_alive = keep_http_connection_alive - self.unfold_http_headers = unfold_http_headers diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_agreement_content.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_agreement_content.py deleted file mode 100644 index 933c916cf751..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_agreement_content.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AS2AgreementContent(Model): - """The integration account AS2 agreement content. - - All required parameters must be populated in order to send to Azure. - - :param receive_agreement: Required. The AS2 one-way receive agreement. - :type receive_agreement: ~azure.mgmt.logic.models.AS2OneWayAgreement - :param send_agreement: Required. The AS2 one-way send agreement. - :type send_agreement: ~azure.mgmt.logic.models.AS2OneWayAgreement - """ - - _validation = { - 'receive_agreement': {'required': True}, - 'send_agreement': {'required': True}, - } - - _attribute_map = { - 'receive_agreement': {'key': 'receiveAgreement', 'type': 'AS2OneWayAgreement'}, - 'send_agreement': {'key': 'sendAgreement', 'type': 'AS2OneWayAgreement'}, - } - - def __init__(self, **kwargs): - super(AS2AgreementContent, self).__init__(**kwargs) - self.receive_agreement = kwargs.get('receive_agreement', None) - self.send_agreement = kwargs.get('send_agreement', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_agreement_content_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_agreement_content_py3.py deleted file mode 100644 index 2c20e5c4cc5d..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_agreement_content_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AS2AgreementContent(Model): - """The integration account AS2 agreement content. - - All required parameters must be populated in order to send to Azure. - - :param receive_agreement: Required. The AS2 one-way receive agreement. - :type receive_agreement: ~azure.mgmt.logic.models.AS2OneWayAgreement - :param send_agreement: Required. The AS2 one-way send agreement. - :type send_agreement: ~azure.mgmt.logic.models.AS2OneWayAgreement - """ - - _validation = { - 'receive_agreement': {'required': True}, - 'send_agreement': {'required': True}, - } - - _attribute_map = { - 'receive_agreement': {'key': 'receiveAgreement', 'type': 'AS2OneWayAgreement'}, - 'send_agreement': {'key': 'sendAgreement', 'type': 'AS2OneWayAgreement'}, - } - - def __init__(self, *, receive_agreement, send_agreement, **kwargs) -> None: - super(AS2AgreementContent, self).__init__(**kwargs) - self.receive_agreement = receive_agreement - self.send_agreement = send_agreement diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_envelope_settings.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_envelope_settings.py deleted file mode 100644 index 1c912b9dfcdc..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_envelope_settings.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AS2EnvelopeSettings(Model): - """The AS2 agreement envelope settings. - - All required parameters must be populated in order to send to Azure. - - :param message_content_type: Required. The message content type. - :type message_content_type: str - :param transmit_file_name_in_mime_header: Required. The value indicating - whether to transmit file name in mime header. - :type transmit_file_name_in_mime_header: bool - :param file_name_template: Required. The template for file name. - :type file_name_template: str - :param suspend_message_on_file_name_generation_error: Required. The value - indicating whether to suspend message on file name generation error. - :type suspend_message_on_file_name_generation_error: bool - :param autogenerate_file_name: Required. The value indicating whether to - auto generate file name. - :type autogenerate_file_name: bool - """ - - _validation = { - 'message_content_type': {'required': True}, - 'transmit_file_name_in_mime_header': {'required': True}, - 'file_name_template': {'required': True}, - 'suspend_message_on_file_name_generation_error': {'required': True}, - 'autogenerate_file_name': {'required': True}, - } - - _attribute_map = { - 'message_content_type': {'key': 'messageContentType', 'type': 'str'}, - 'transmit_file_name_in_mime_header': {'key': 'transmitFileNameInMimeHeader', 'type': 'bool'}, - 'file_name_template': {'key': 'fileNameTemplate', 'type': 'str'}, - 'suspend_message_on_file_name_generation_error': {'key': 'suspendMessageOnFileNameGenerationError', 'type': 'bool'}, - 'autogenerate_file_name': {'key': 'autogenerateFileName', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AS2EnvelopeSettings, self).__init__(**kwargs) - self.message_content_type = kwargs.get('message_content_type', None) - self.transmit_file_name_in_mime_header = kwargs.get('transmit_file_name_in_mime_header', None) - self.file_name_template = kwargs.get('file_name_template', None) - self.suspend_message_on_file_name_generation_error = kwargs.get('suspend_message_on_file_name_generation_error', None) - self.autogenerate_file_name = kwargs.get('autogenerate_file_name', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_envelope_settings_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_envelope_settings_py3.py deleted file mode 100644 index a39fe640d9f6..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_envelope_settings_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AS2EnvelopeSettings(Model): - """The AS2 agreement envelope settings. - - All required parameters must be populated in order to send to Azure. - - :param message_content_type: Required. The message content type. - :type message_content_type: str - :param transmit_file_name_in_mime_header: Required. The value indicating - whether to transmit file name in mime header. - :type transmit_file_name_in_mime_header: bool - :param file_name_template: Required. The template for file name. - :type file_name_template: str - :param suspend_message_on_file_name_generation_error: Required. The value - indicating whether to suspend message on file name generation error. - :type suspend_message_on_file_name_generation_error: bool - :param autogenerate_file_name: Required. The value indicating whether to - auto generate file name. - :type autogenerate_file_name: bool - """ - - _validation = { - 'message_content_type': {'required': True}, - 'transmit_file_name_in_mime_header': {'required': True}, - 'file_name_template': {'required': True}, - 'suspend_message_on_file_name_generation_error': {'required': True}, - 'autogenerate_file_name': {'required': True}, - } - - _attribute_map = { - 'message_content_type': {'key': 'messageContentType', 'type': 'str'}, - 'transmit_file_name_in_mime_header': {'key': 'transmitFileNameInMimeHeader', 'type': 'bool'}, - 'file_name_template': {'key': 'fileNameTemplate', 'type': 'str'}, - 'suspend_message_on_file_name_generation_error': {'key': 'suspendMessageOnFileNameGenerationError', 'type': 'bool'}, - 'autogenerate_file_name': {'key': 'autogenerateFileName', 'type': 'bool'}, - } - - def __init__(self, *, message_content_type: str, transmit_file_name_in_mime_header: bool, file_name_template: str, suspend_message_on_file_name_generation_error: bool, autogenerate_file_name: bool, **kwargs) -> None: - super(AS2EnvelopeSettings, self).__init__(**kwargs) - self.message_content_type = message_content_type - self.transmit_file_name_in_mime_header = transmit_file_name_in_mime_header - self.file_name_template = file_name_template - self.suspend_message_on_file_name_generation_error = suspend_message_on_file_name_generation_error - self.autogenerate_file_name = autogenerate_file_name diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_error_settings.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_error_settings.py deleted file mode 100644 index 3279147b5ee9..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_error_settings.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AS2ErrorSettings(Model): - """The AS2 agreement error settings. - - All required parameters must be populated in order to send to Azure. - - :param suspend_duplicate_message: Required. The value indicating whether - to suspend duplicate message. - :type suspend_duplicate_message: bool - :param resend_if_mdn_not_received: Required. The value indicating whether - to resend message If MDN is not received. - :type resend_if_mdn_not_received: bool - """ - - _validation = { - 'suspend_duplicate_message': {'required': True}, - 'resend_if_mdn_not_received': {'required': True}, - } - - _attribute_map = { - 'suspend_duplicate_message': {'key': 'suspendDuplicateMessage', 'type': 'bool'}, - 'resend_if_mdn_not_received': {'key': 'resendIfMDNNotReceived', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AS2ErrorSettings, self).__init__(**kwargs) - self.suspend_duplicate_message = kwargs.get('suspend_duplicate_message', None) - self.resend_if_mdn_not_received = kwargs.get('resend_if_mdn_not_received', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_error_settings_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_error_settings_py3.py deleted file mode 100644 index a149add69b12..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_error_settings_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AS2ErrorSettings(Model): - """The AS2 agreement error settings. - - All required parameters must be populated in order to send to Azure. - - :param suspend_duplicate_message: Required. The value indicating whether - to suspend duplicate message. - :type suspend_duplicate_message: bool - :param resend_if_mdn_not_received: Required. The value indicating whether - to resend message If MDN is not received. - :type resend_if_mdn_not_received: bool - """ - - _validation = { - 'suspend_duplicate_message': {'required': True}, - 'resend_if_mdn_not_received': {'required': True}, - } - - _attribute_map = { - 'suspend_duplicate_message': {'key': 'suspendDuplicateMessage', 'type': 'bool'}, - 'resend_if_mdn_not_received': {'key': 'resendIfMDNNotReceived', 'type': 'bool'}, - } - - def __init__(self, *, suspend_duplicate_message: bool, resend_if_mdn_not_received: bool, **kwargs) -> None: - super(AS2ErrorSettings, self).__init__(**kwargs) - self.suspend_duplicate_message = suspend_duplicate_message - self.resend_if_mdn_not_received = resend_if_mdn_not_received diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_mdn_settings.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_mdn_settings.py deleted file mode 100644 index 9a6d9cbbe90b..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_mdn_settings.py +++ /dev/null @@ -1,80 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AS2MdnSettings(Model): - """The AS2 agreement mdn settings. - - All required parameters must be populated in order to send to Azure. - - :param need_mdn: Required. The value indicating whether to send or request - a MDN. - :type need_mdn: bool - :param sign_mdn: Required. The value indicating whether the MDN needs to - be signed or not. - :type sign_mdn: bool - :param send_mdn_asynchronously: Required. The value indicating whether to - send the asynchronous MDN. - :type send_mdn_asynchronously: bool - :param receipt_delivery_url: The receipt delivery URL. - :type receipt_delivery_url: str - :param disposition_notification_to: The disposition notification to header - value. - :type disposition_notification_to: str - :param sign_outbound_mdn_if_optional: Required. The value indicating - whether to sign the outbound MDN if optional. - :type sign_outbound_mdn_if_optional: bool - :param mdn_text: The MDN text. - :type mdn_text: str - :param send_inbound_mdn_to_message_box: Required. The value indicating - whether to send inbound MDN to message box. - :type send_inbound_mdn_to_message_box: bool - :param mic_hashing_algorithm: Required. The signing or hashing algorithm. - Possible values include: 'NotSpecified', 'None', 'MD5', 'SHA1', 'SHA2256', - 'SHA2384', 'SHA2512' - :type mic_hashing_algorithm: str or - ~azure.mgmt.logic.models.HashingAlgorithm - """ - - _validation = { - 'need_mdn': {'required': True}, - 'sign_mdn': {'required': True}, - 'send_mdn_asynchronously': {'required': True}, - 'sign_outbound_mdn_if_optional': {'required': True}, - 'send_inbound_mdn_to_message_box': {'required': True}, - 'mic_hashing_algorithm': {'required': True}, - } - - _attribute_map = { - 'need_mdn': {'key': 'needMDN', 'type': 'bool'}, - 'sign_mdn': {'key': 'signMDN', 'type': 'bool'}, - 'send_mdn_asynchronously': {'key': 'sendMDNAsynchronously', 'type': 'bool'}, - 'receipt_delivery_url': {'key': 'receiptDeliveryUrl', 'type': 'str'}, - 'disposition_notification_to': {'key': 'dispositionNotificationTo', 'type': 'str'}, - 'sign_outbound_mdn_if_optional': {'key': 'signOutboundMDNIfOptional', 'type': 'bool'}, - 'mdn_text': {'key': 'mdnText', 'type': 'str'}, - 'send_inbound_mdn_to_message_box': {'key': 'sendInboundMDNToMessageBox', 'type': 'bool'}, - 'mic_hashing_algorithm': {'key': 'micHashingAlgorithm', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AS2MdnSettings, self).__init__(**kwargs) - self.need_mdn = kwargs.get('need_mdn', None) - self.sign_mdn = kwargs.get('sign_mdn', None) - self.send_mdn_asynchronously = kwargs.get('send_mdn_asynchronously', None) - self.receipt_delivery_url = kwargs.get('receipt_delivery_url', None) - self.disposition_notification_to = kwargs.get('disposition_notification_to', None) - self.sign_outbound_mdn_if_optional = kwargs.get('sign_outbound_mdn_if_optional', None) - self.mdn_text = kwargs.get('mdn_text', None) - self.send_inbound_mdn_to_message_box = kwargs.get('send_inbound_mdn_to_message_box', None) - self.mic_hashing_algorithm = kwargs.get('mic_hashing_algorithm', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_mdn_settings_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_mdn_settings_py3.py deleted file mode 100644 index 9ecf6010005d..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_mdn_settings_py3.py +++ /dev/null @@ -1,80 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AS2MdnSettings(Model): - """The AS2 agreement mdn settings. - - All required parameters must be populated in order to send to Azure. - - :param need_mdn: Required. The value indicating whether to send or request - a MDN. - :type need_mdn: bool - :param sign_mdn: Required. The value indicating whether the MDN needs to - be signed or not. - :type sign_mdn: bool - :param send_mdn_asynchronously: Required. The value indicating whether to - send the asynchronous MDN. - :type send_mdn_asynchronously: bool - :param receipt_delivery_url: The receipt delivery URL. - :type receipt_delivery_url: str - :param disposition_notification_to: The disposition notification to header - value. - :type disposition_notification_to: str - :param sign_outbound_mdn_if_optional: Required. The value indicating - whether to sign the outbound MDN if optional. - :type sign_outbound_mdn_if_optional: bool - :param mdn_text: The MDN text. - :type mdn_text: str - :param send_inbound_mdn_to_message_box: Required. The value indicating - whether to send inbound MDN to message box. - :type send_inbound_mdn_to_message_box: bool - :param mic_hashing_algorithm: Required. The signing or hashing algorithm. - Possible values include: 'NotSpecified', 'None', 'MD5', 'SHA1', 'SHA2256', - 'SHA2384', 'SHA2512' - :type mic_hashing_algorithm: str or - ~azure.mgmt.logic.models.HashingAlgorithm - """ - - _validation = { - 'need_mdn': {'required': True}, - 'sign_mdn': {'required': True}, - 'send_mdn_asynchronously': {'required': True}, - 'sign_outbound_mdn_if_optional': {'required': True}, - 'send_inbound_mdn_to_message_box': {'required': True}, - 'mic_hashing_algorithm': {'required': True}, - } - - _attribute_map = { - 'need_mdn': {'key': 'needMDN', 'type': 'bool'}, - 'sign_mdn': {'key': 'signMDN', 'type': 'bool'}, - 'send_mdn_asynchronously': {'key': 'sendMDNAsynchronously', 'type': 'bool'}, - 'receipt_delivery_url': {'key': 'receiptDeliveryUrl', 'type': 'str'}, - 'disposition_notification_to': {'key': 'dispositionNotificationTo', 'type': 'str'}, - 'sign_outbound_mdn_if_optional': {'key': 'signOutboundMDNIfOptional', 'type': 'bool'}, - 'mdn_text': {'key': 'mdnText', 'type': 'str'}, - 'send_inbound_mdn_to_message_box': {'key': 'sendInboundMDNToMessageBox', 'type': 'bool'}, - 'mic_hashing_algorithm': {'key': 'micHashingAlgorithm', 'type': 'str'}, - } - - def __init__(self, *, need_mdn: bool, sign_mdn: bool, send_mdn_asynchronously: bool, sign_outbound_mdn_if_optional: bool, send_inbound_mdn_to_message_box: bool, mic_hashing_algorithm, receipt_delivery_url: str=None, disposition_notification_to: str=None, mdn_text: str=None, **kwargs) -> None: - super(AS2MdnSettings, self).__init__(**kwargs) - self.need_mdn = need_mdn - self.sign_mdn = sign_mdn - self.send_mdn_asynchronously = send_mdn_asynchronously - self.receipt_delivery_url = receipt_delivery_url - self.disposition_notification_to = disposition_notification_to - self.sign_outbound_mdn_if_optional = sign_outbound_mdn_if_optional - self.mdn_text = mdn_text - self.send_inbound_mdn_to_message_box = send_inbound_mdn_to_message_box - self.mic_hashing_algorithm = mic_hashing_algorithm diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_message_connection_settings.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_message_connection_settings.py deleted file mode 100644 index 887855c734f9..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_message_connection_settings.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AS2MessageConnectionSettings(Model): - """The AS2 agreement message connection settings. - - All required parameters must be populated in order to send to Azure. - - :param ignore_certificate_name_mismatch: Required. The value indicating - whether to ignore mismatch in certificate name. - :type ignore_certificate_name_mismatch: bool - :param support_http_status_code_continue: Required. The value indicating - whether to support HTTP status code 'CONTINUE'. - :type support_http_status_code_continue: bool - :param keep_http_connection_alive: Required. The value indicating whether - to keep the connection alive. - :type keep_http_connection_alive: bool - :param unfold_http_headers: Required. The value indicating whether to - unfold the HTTP headers. - :type unfold_http_headers: bool - """ - - _validation = { - 'ignore_certificate_name_mismatch': {'required': True}, - 'support_http_status_code_continue': {'required': True}, - 'keep_http_connection_alive': {'required': True}, - 'unfold_http_headers': {'required': True}, - } - - _attribute_map = { - 'ignore_certificate_name_mismatch': {'key': 'ignoreCertificateNameMismatch', 'type': 'bool'}, - 'support_http_status_code_continue': {'key': 'supportHttpStatusCodeContinue', 'type': 'bool'}, - 'keep_http_connection_alive': {'key': 'keepHttpConnectionAlive', 'type': 'bool'}, - 'unfold_http_headers': {'key': 'unfoldHttpHeaders', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AS2MessageConnectionSettings, self).__init__(**kwargs) - self.ignore_certificate_name_mismatch = kwargs.get('ignore_certificate_name_mismatch', None) - self.support_http_status_code_continue = kwargs.get('support_http_status_code_continue', None) - self.keep_http_connection_alive = kwargs.get('keep_http_connection_alive', None) - self.unfold_http_headers = kwargs.get('unfold_http_headers', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_message_connection_settings_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_message_connection_settings_py3.py deleted file mode 100644 index 377250f5802f..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_message_connection_settings_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AS2MessageConnectionSettings(Model): - """The AS2 agreement message connection settings. - - All required parameters must be populated in order to send to Azure. - - :param ignore_certificate_name_mismatch: Required. The value indicating - whether to ignore mismatch in certificate name. - :type ignore_certificate_name_mismatch: bool - :param support_http_status_code_continue: Required. The value indicating - whether to support HTTP status code 'CONTINUE'. - :type support_http_status_code_continue: bool - :param keep_http_connection_alive: Required. The value indicating whether - to keep the connection alive. - :type keep_http_connection_alive: bool - :param unfold_http_headers: Required. The value indicating whether to - unfold the HTTP headers. - :type unfold_http_headers: bool - """ - - _validation = { - 'ignore_certificate_name_mismatch': {'required': True}, - 'support_http_status_code_continue': {'required': True}, - 'keep_http_connection_alive': {'required': True}, - 'unfold_http_headers': {'required': True}, - } - - _attribute_map = { - 'ignore_certificate_name_mismatch': {'key': 'ignoreCertificateNameMismatch', 'type': 'bool'}, - 'support_http_status_code_continue': {'key': 'supportHttpStatusCodeContinue', 'type': 'bool'}, - 'keep_http_connection_alive': {'key': 'keepHttpConnectionAlive', 'type': 'bool'}, - 'unfold_http_headers': {'key': 'unfoldHttpHeaders', 'type': 'bool'}, - } - - def __init__(self, *, ignore_certificate_name_mismatch: bool, support_http_status_code_continue: bool, keep_http_connection_alive: bool, unfold_http_headers: bool, **kwargs) -> None: - super(AS2MessageConnectionSettings, self).__init__(**kwargs) - self.ignore_certificate_name_mismatch = ignore_certificate_name_mismatch - self.support_http_status_code_continue = support_http_status_code_continue - self.keep_http_connection_alive = keep_http_connection_alive - self.unfold_http_headers = unfold_http_headers diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_one_way_agreement.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_one_way_agreement.py deleted file mode 100644 index 1f75e787d1da..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_one_way_agreement.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AS2OneWayAgreement(Model): - """The integration account AS2 one-way agreement. - - All required parameters must be populated in order to send to Azure. - - :param sender_business_identity: Required. The sender business identity - :type sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity - :param receiver_business_identity: Required. The receiver business - identity - :type receiver_business_identity: - ~azure.mgmt.logic.models.BusinessIdentity - :param protocol_settings: Required. The AS2 protocol settings. - :type protocol_settings: ~azure.mgmt.logic.models.AS2ProtocolSettings - """ - - _validation = { - 'sender_business_identity': {'required': True}, - 'receiver_business_identity': {'required': True}, - 'protocol_settings': {'required': True}, - } - - _attribute_map = { - 'sender_business_identity': {'key': 'senderBusinessIdentity', 'type': 'BusinessIdentity'}, - 'receiver_business_identity': {'key': 'receiverBusinessIdentity', 'type': 'BusinessIdentity'}, - 'protocol_settings': {'key': 'protocolSettings', 'type': 'AS2ProtocolSettings'}, - } - - def __init__(self, **kwargs): - super(AS2OneWayAgreement, self).__init__(**kwargs) - self.sender_business_identity = kwargs.get('sender_business_identity', None) - self.receiver_business_identity = kwargs.get('receiver_business_identity', None) - self.protocol_settings = kwargs.get('protocol_settings', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_one_way_agreement_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_one_way_agreement_py3.py deleted file mode 100644 index 54315da2006a..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_one_way_agreement_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AS2OneWayAgreement(Model): - """The integration account AS2 one-way agreement. - - All required parameters must be populated in order to send to Azure. - - :param sender_business_identity: Required. The sender business identity - :type sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity - :param receiver_business_identity: Required. The receiver business - identity - :type receiver_business_identity: - ~azure.mgmt.logic.models.BusinessIdentity - :param protocol_settings: Required. The AS2 protocol settings. - :type protocol_settings: ~azure.mgmt.logic.models.AS2ProtocolSettings - """ - - _validation = { - 'sender_business_identity': {'required': True}, - 'receiver_business_identity': {'required': True}, - 'protocol_settings': {'required': True}, - } - - _attribute_map = { - 'sender_business_identity': {'key': 'senderBusinessIdentity', 'type': 'BusinessIdentity'}, - 'receiver_business_identity': {'key': 'receiverBusinessIdentity', 'type': 'BusinessIdentity'}, - 'protocol_settings': {'key': 'protocolSettings', 'type': 'AS2ProtocolSettings'}, - } - - def __init__(self, *, sender_business_identity, receiver_business_identity, protocol_settings, **kwargs) -> None: - super(AS2OneWayAgreement, self).__init__(**kwargs) - self.sender_business_identity = sender_business_identity - self.receiver_business_identity = receiver_business_identity - self.protocol_settings = protocol_settings diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_protocol_settings.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_protocol_settings.py deleted file mode 100644 index 1c79994dd5fd..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_protocol_settings.py +++ /dev/null @@ -1,68 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AS2ProtocolSettings(Model): - """The AS2 agreement protocol settings. - - All required parameters must be populated in order to send to Azure. - - :param message_connection_settings: Required. The message connection - settings. - :type message_connection_settings: - ~azure.mgmt.logic.models.AS2MessageConnectionSettings - :param acknowledgement_connection_settings: Required. The acknowledgement - connection settings. - :type acknowledgement_connection_settings: - ~azure.mgmt.logic.models.AS2AcknowledgementConnectionSettings - :param mdn_settings: Required. The MDN settings. - :type mdn_settings: ~azure.mgmt.logic.models.AS2MdnSettings - :param security_settings: Required. The security settings. - :type security_settings: ~azure.mgmt.logic.models.AS2SecuritySettings - :param validation_settings: Required. The validation settings. - :type validation_settings: ~azure.mgmt.logic.models.AS2ValidationSettings - :param envelope_settings: Required. The envelope settings. - :type envelope_settings: ~azure.mgmt.logic.models.AS2EnvelopeSettings - :param error_settings: Required. The error settings. - :type error_settings: ~azure.mgmt.logic.models.AS2ErrorSettings - """ - - _validation = { - 'message_connection_settings': {'required': True}, - 'acknowledgement_connection_settings': {'required': True}, - 'mdn_settings': {'required': True}, - 'security_settings': {'required': True}, - 'validation_settings': {'required': True}, - 'envelope_settings': {'required': True}, - 'error_settings': {'required': True}, - } - - _attribute_map = { - 'message_connection_settings': {'key': 'messageConnectionSettings', 'type': 'AS2MessageConnectionSettings'}, - 'acknowledgement_connection_settings': {'key': 'acknowledgementConnectionSettings', 'type': 'AS2AcknowledgementConnectionSettings'}, - 'mdn_settings': {'key': 'mdnSettings', 'type': 'AS2MdnSettings'}, - 'security_settings': {'key': 'securitySettings', 'type': 'AS2SecuritySettings'}, - 'validation_settings': {'key': 'validationSettings', 'type': 'AS2ValidationSettings'}, - 'envelope_settings': {'key': 'envelopeSettings', 'type': 'AS2EnvelopeSettings'}, - 'error_settings': {'key': 'errorSettings', 'type': 'AS2ErrorSettings'}, - } - - def __init__(self, **kwargs): - super(AS2ProtocolSettings, self).__init__(**kwargs) - self.message_connection_settings = kwargs.get('message_connection_settings', None) - self.acknowledgement_connection_settings = kwargs.get('acknowledgement_connection_settings', None) - self.mdn_settings = kwargs.get('mdn_settings', None) - self.security_settings = kwargs.get('security_settings', None) - self.validation_settings = kwargs.get('validation_settings', None) - self.envelope_settings = kwargs.get('envelope_settings', None) - self.error_settings = kwargs.get('error_settings', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_protocol_settings_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_protocol_settings_py3.py deleted file mode 100644 index 217fdc55147d..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_protocol_settings_py3.py +++ /dev/null @@ -1,68 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AS2ProtocolSettings(Model): - """The AS2 agreement protocol settings. - - All required parameters must be populated in order to send to Azure. - - :param message_connection_settings: Required. The message connection - settings. - :type message_connection_settings: - ~azure.mgmt.logic.models.AS2MessageConnectionSettings - :param acknowledgement_connection_settings: Required. The acknowledgement - connection settings. - :type acknowledgement_connection_settings: - ~azure.mgmt.logic.models.AS2AcknowledgementConnectionSettings - :param mdn_settings: Required. The MDN settings. - :type mdn_settings: ~azure.mgmt.logic.models.AS2MdnSettings - :param security_settings: Required. The security settings. - :type security_settings: ~azure.mgmt.logic.models.AS2SecuritySettings - :param validation_settings: Required. The validation settings. - :type validation_settings: ~azure.mgmt.logic.models.AS2ValidationSettings - :param envelope_settings: Required. The envelope settings. - :type envelope_settings: ~azure.mgmt.logic.models.AS2EnvelopeSettings - :param error_settings: Required. The error settings. - :type error_settings: ~azure.mgmt.logic.models.AS2ErrorSettings - """ - - _validation = { - 'message_connection_settings': {'required': True}, - 'acknowledgement_connection_settings': {'required': True}, - 'mdn_settings': {'required': True}, - 'security_settings': {'required': True}, - 'validation_settings': {'required': True}, - 'envelope_settings': {'required': True}, - 'error_settings': {'required': True}, - } - - _attribute_map = { - 'message_connection_settings': {'key': 'messageConnectionSettings', 'type': 'AS2MessageConnectionSettings'}, - 'acknowledgement_connection_settings': {'key': 'acknowledgementConnectionSettings', 'type': 'AS2AcknowledgementConnectionSettings'}, - 'mdn_settings': {'key': 'mdnSettings', 'type': 'AS2MdnSettings'}, - 'security_settings': {'key': 'securitySettings', 'type': 'AS2SecuritySettings'}, - 'validation_settings': {'key': 'validationSettings', 'type': 'AS2ValidationSettings'}, - 'envelope_settings': {'key': 'envelopeSettings', 'type': 'AS2EnvelopeSettings'}, - 'error_settings': {'key': 'errorSettings', 'type': 'AS2ErrorSettings'}, - } - - def __init__(self, *, message_connection_settings, acknowledgement_connection_settings, mdn_settings, security_settings, validation_settings, envelope_settings, error_settings, **kwargs) -> None: - super(AS2ProtocolSettings, self).__init__(**kwargs) - self.message_connection_settings = message_connection_settings - self.acknowledgement_connection_settings = acknowledgement_connection_settings - self.mdn_settings = mdn_settings - self.security_settings = security_settings - self.validation_settings = validation_settings - self.envelope_settings = envelope_settings - self.error_settings = error_settings diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_security_settings.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_security_settings.py deleted file mode 100644 index dfefc91ef3c4..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_security_settings.py +++ /dev/null @@ -1,85 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AS2SecuritySettings(Model): - """The AS2 agreement security settings. - - All required parameters must be populated in order to send to Azure. - - :param override_group_signing_certificate: Required. The value indicating - whether to send or request a MDN. - :type override_group_signing_certificate: bool - :param signing_certificate_name: The name of the signing certificate. - :type signing_certificate_name: str - :param encryption_certificate_name: The name of the encryption - certificate. - :type encryption_certificate_name: str - :param enable_nrr_for_inbound_encoded_messages: Required. The value - indicating whether to enable NRR for inbound encoded messages. - :type enable_nrr_for_inbound_encoded_messages: bool - :param enable_nrr_for_inbound_decoded_messages: Required. The value - indicating whether to enable NRR for inbound decoded messages. - :type enable_nrr_for_inbound_decoded_messages: bool - :param enable_nrr_for_outbound_mdn: Required. The value indicating whether - to enable NRR for outbound MDN. - :type enable_nrr_for_outbound_mdn: bool - :param enable_nrr_for_outbound_encoded_messages: Required. The value - indicating whether to enable NRR for outbound encoded messages. - :type enable_nrr_for_outbound_encoded_messages: bool - :param enable_nrr_for_outbound_decoded_messages: Required. The value - indicating whether to enable NRR for outbound decoded messages. - :type enable_nrr_for_outbound_decoded_messages: bool - :param enable_nrr_for_inbound_mdn: Required. The value indicating whether - to enable NRR for inbound MDN. - :type enable_nrr_for_inbound_mdn: bool - :param sha2_algorithm_format: The Sha2 algorithm format. Valid values are - Sha2, ShaHashSize, ShaHyphenHashSize, Sha2UnderscoreHashSize. - :type sha2_algorithm_format: str - """ - - _validation = { - 'override_group_signing_certificate': {'required': True}, - 'enable_nrr_for_inbound_encoded_messages': {'required': True}, - 'enable_nrr_for_inbound_decoded_messages': {'required': True}, - 'enable_nrr_for_outbound_mdn': {'required': True}, - 'enable_nrr_for_outbound_encoded_messages': {'required': True}, - 'enable_nrr_for_outbound_decoded_messages': {'required': True}, - 'enable_nrr_for_inbound_mdn': {'required': True}, - } - - _attribute_map = { - 'override_group_signing_certificate': {'key': 'overrideGroupSigningCertificate', 'type': 'bool'}, - 'signing_certificate_name': {'key': 'signingCertificateName', 'type': 'str'}, - 'encryption_certificate_name': {'key': 'encryptionCertificateName', 'type': 'str'}, - 'enable_nrr_for_inbound_encoded_messages': {'key': 'enableNRRForInboundEncodedMessages', 'type': 'bool'}, - 'enable_nrr_for_inbound_decoded_messages': {'key': 'enableNRRForInboundDecodedMessages', 'type': 'bool'}, - 'enable_nrr_for_outbound_mdn': {'key': 'enableNRRForOutboundMDN', 'type': 'bool'}, - 'enable_nrr_for_outbound_encoded_messages': {'key': 'enableNRRForOutboundEncodedMessages', 'type': 'bool'}, - 'enable_nrr_for_outbound_decoded_messages': {'key': 'enableNRRForOutboundDecodedMessages', 'type': 'bool'}, - 'enable_nrr_for_inbound_mdn': {'key': 'enableNRRForInboundMDN', 'type': 'bool'}, - 'sha2_algorithm_format': {'key': 'sha2AlgorithmFormat', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AS2SecuritySettings, self).__init__(**kwargs) - self.override_group_signing_certificate = kwargs.get('override_group_signing_certificate', None) - self.signing_certificate_name = kwargs.get('signing_certificate_name', None) - self.encryption_certificate_name = kwargs.get('encryption_certificate_name', None) - self.enable_nrr_for_inbound_encoded_messages = kwargs.get('enable_nrr_for_inbound_encoded_messages', None) - self.enable_nrr_for_inbound_decoded_messages = kwargs.get('enable_nrr_for_inbound_decoded_messages', None) - self.enable_nrr_for_outbound_mdn = kwargs.get('enable_nrr_for_outbound_mdn', None) - self.enable_nrr_for_outbound_encoded_messages = kwargs.get('enable_nrr_for_outbound_encoded_messages', None) - self.enable_nrr_for_outbound_decoded_messages = kwargs.get('enable_nrr_for_outbound_decoded_messages', None) - self.enable_nrr_for_inbound_mdn = kwargs.get('enable_nrr_for_inbound_mdn', None) - self.sha2_algorithm_format = kwargs.get('sha2_algorithm_format', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_security_settings_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_security_settings_py3.py deleted file mode 100644 index 47f6b62c209f..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_security_settings_py3.py +++ /dev/null @@ -1,85 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AS2SecuritySettings(Model): - """The AS2 agreement security settings. - - All required parameters must be populated in order to send to Azure. - - :param override_group_signing_certificate: Required. The value indicating - whether to send or request a MDN. - :type override_group_signing_certificate: bool - :param signing_certificate_name: The name of the signing certificate. - :type signing_certificate_name: str - :param encryption_certificate_name: The name of the encryption - certificate. - :type encryption_certificate_name: str - :param enable_nrr_for_inbound_encoded_messages: Required. The value - indicating whether to enable NRR for inbound encoded messages. - :type enable_nrr_for_inbound_encoded_messages: bool - :param enable_nrr_for_inbound_decoded_messages: Required. The value - indicating whether to enable NRR for inbound decoded messages. - :type enable_nrr_for_inbound_decoded_messages: bool - :param enable_nrr_for_outbound_mdn: Required. The value indicating whether - to enable NRR for outbound MDN. - :type enable_nrr_for_outbound_mdn: bool - :param enable_nrr_for_outbound_encoded_messages: Required. The value - indicating whether to enable NRR for outbound encoded messages. - :type enable_nrr_for_outbound_encoded_messages: bool - :param enable_nrr_for_outbound_decoded_messages: Required. The value - indicating whether to enable NRR for outbound decoded messages. - :type enable_nrr_for_outbound_decoded_messages: bool - :param enable_nrr_for_inbound_mdn: Required. The value indicating whether - to enable NRR for inbound MDN. - :type enable_nrr_for_inbound_mdn: bool - :param sha2_algorithm_format: The Sha2 algorithm format. Valid values are - Sha2, ShaHashSize, ShaHyphenHashSize, Sha2UnderscoreHashSize. - :type sha2_algorithm_format: str - """ - - _validation = { - 'override_group_signing_certificate': {'required': True}, - 'enable_nrr_for_inbound_encoded_messages': {'required': True}, - 'enable_nrr_for_inbound_decoded_messages': {'required': True}, - 'enable_nrr_for_outbound_mdn': {'required': True}, - 'enable_nrr_for_outbound_encoded_messages': {'required': True}, - 'enable_nrr_for_outbound_decoded_messages': {'required': True}, - 'enable_nrr_for_inbound_mdn': {'required': True}, - } - - _attribute_map = { - 'override_group_signing_certificate': {'key': 'overrideGroupSigningCertificate', 'type': 'bool'}, - 'signing_certificate_name': {'key': 'signingCertificateName', 'type': 'str'}, - 'encryption_certificate_name': {'key': 'encryptionCertificateName', 'type': 'str'}, - 'enable_nrr_for_inbound_encoded_messages': {'key': 'enableNRRForInboundEncodedMessages', 'type': 'bool'}, - 'enable_nrr_for_inbound_decoded_messages': {'key': 'enableNRRForInboundDecodedMessages', 'type': 'bool'}, - 'enable_nrr_for_outbound_mdn': {'key': 'enableNRRForOutboundMDN', 'type': 'bool'}, - 'enable_nrr_for_outbound_encoded_messages': {'key': 'enableNRRForOutboundEncodedMessages', 'type': 'bool'}, - 'enable_nrr_for_outbound_decoded_messages': {'key': 'enableNRRForOutboundDecodedMessages', 'type': 'bool'}, - 'enable_nrr_for_inbound_mdn': {'key': 'enableNRRForInboundMDN', 'type': 'bool'}, - 'sha2_algorithm_format': {'key': 'sha2AlgorithmFormat', 'type': 'str'}, - } - - def __init__(self, *, override_group_signing_certificate: bool, enable_nrr_for_inbound_encoded_messages: bool, enable_nrr_for_inbound_decoded_messages: bool, enable_nrr_for_outbound_mdn: bool, enable_nrr_for_outbound_encoded_messages: bool, enable_nrr_for_outbound_decoded_messages: bool, enable_nrr_for_inbound_mdn: bool, signing_certificate_name: str=None, encryption_certificate_name: str=None, sha2_algorithm_format: str=None, **kwargs) -> None: - super(AS2SecuritySettings, self).__init__(**kwargs) - self.override_group_signing_certificate = override_group_signing_certificate - self.signing_certificate_name = signing_certificate_name - self.encryption_certificate_name = encryption_certificate_name - self.enable_nrr_for_inbound_encoded_messages = enable_nrr_for_inbound_encoded_messages - self.enable_nrr_for_inbound_decoded_messages = enable_nrr_for_inbound_decoded_messages - self.enable_nrr_for_outbound_mdn = enable_nrr_for_outbound_mdn - self.enable_nrr_for_outbound_encoded_messages = enable_nrr_for_outbound_encoded_messages - self.enable_nrr_for_outbound_decoded_messages = enable_nrr_for_outbound_decoded_messages - self.enable_nrr_for_inbound_mdn = enable_nrr_for_inbound_mdn - self.sha2_algorithm_format = sha2_algorithm_format diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_validation_settings.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_validation_settings.py deleted file mode 100644 index e5b7aee2eba5..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_validation_settings.py +++ /dev/null @@ -1,90 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AS2ValidationSettings(Model): - """The AS2 agreement validation settings. - - All required parameters must be populated in order to send to Azure. - - :param override_message_properties: Required. The value indicating whether - to override incoming message properties with those in agreement. - :type override_message_properties: bool - :param encrypt_message: Required. The value indicating whether the message - has to be encrypted. - :type encrypt_message: bool - :param sign_message: Required. The value indicating whether the message - has to be signed. - :type sign_message: bool - :param compress_message: Required. The value indicating whether the - message has to be compressed. - :type compress_message: bool - :param check_duplicate_message: Required. The value indicating whether to - check for duplicate message. - :type check_duplicate_message: bool - :param interchange_duplicates_validity_days: Required. The number of days - to look back for duplicate interchange. - :type interchange_duplicates_validity_days: int - :param check_certificate_revocation_list_on_send: Required. The value - indicating whether to check for certificate revocation list on send. - :type check_certificate_revocation_list_on_send: bool - :param check_certificate_revocation_list_on_receive: Required. The value - indicating whether to check for certificate revocation list on receive. - :type check_certificate_revocation_list_on_receive: bool - :param encryption_algorithm: Required. The encryption algorithm. Possible - values include: 'NotSpecified', 'None', 'DES3', 'RC2', 'AES128', 'AES192', - 'AES256' - :type encryption_algorithm: str or - ~azure.mgmt.logic.models.EncryptionAlgorithm - :param signing_algorithm: The signing algorithm. Possible values include: - 'NotSpecified', 'Default', 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' - :type signing_algorithm: str or ~azure.mgmt.logic.models.SigningAlgorithm - """ - - _validation = { - 'override_message_properties': {'required': True}, - 'encrypt_message': {'required': True}, - 'sign_message': {'required': True}, - 'compress_message': {'required': True}, - 'check_duplicate_message': {'required': True}, - 'interchange_duplicates_validity_days': {'required': True}, - 'check_certificate_revocation_list_on_send': {'required': True}, - 'check_certificate_revocation_list_on_receive': {'required': True}, - 'encryption_algorithm': {'required': True}, - } - - _attribute_map = { - 'override_message_properties': {'key': 'overrideMessageProperties', 'type': 'bool'}, - 'encrypt_message': {'key': 'encryptMessage', 'type': 'bool'}, - 'sign_message': {'key': 'signMessage', 'type': 'bool'}, - 'compress_message': {'key': 'compressMessage', 'type': 'bool'}, - 'check_duplicate_message': {'key': 'checkDuplicateMessage', 'type': 'bool'}, - 'interchange_duplicates_validity_days': {'key': 'interchangeDuplicatesValidityDays', 'type': 'int'}, - 'check_certificate_revocation_list_on_send': {'key': 'checkCertificateRevocationListOnSend', 'type': 'bool'}, - 'check_certificate_revocation_list_on_receive': {'key': 'checkCertificateRevocationListOnReceive', 'type': 'bool'}, - 'encryption_algorithm': {'key': 'encryptionAlgorithm', 'type': 'str'}, - 'signing_algorithm': {'key': 'signingAlgorithm', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AS2ValidationSettings, self).__init__(**kwargs) - self.override_message_properties = kwargs.get('override_message_properties', None) - self.encrypt_message = kwargs.get('encrypt_message', None) - self.sign_message = kwargs.get('sign_message', None) - self.compress_message = kwargs.get('compress_message', None) - self.check_duplicate_message = kwargs.get('check_duplicate_message', None) - self.interchange_duplicates_validity_days = kwargs.get('interchange_duplicates_validity_days', None) - self.check_certificate_revocation_list_on_send = kwargs.get('check_certificate_revocation_list_on_send', None) - self.check_certificate_revocation_list_on_receive = kwargs.get('check_certificate_revocation_list_on_receive', None) - self.encryption_algorithm = kwargs.get('encryption_algorithm', None) - self.signing_algorithm = kwargs.get('signing_algorithm', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_validation_settings_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_validation_settings_py3.py deleted file mode 100644 index 05c6a689f528..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/as2_validation_settings_py3.py +++ /dev/null @@ -1,90 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AS2ValidationSettings(Model): - """The AS2 agreement validation settings. - - All required parameters must be populated in order to send to Azure. - - :param override_message_properties: Required. The value indicating whether - to override incoming message properties with those in agreement. - :type override_message_properties: bool - :param encrypt_message: Required. The value indicating whether the message - has to be encrypted. - :type encrypt_message: bool - :param sign_message: Required. The value indicating whether the message - has to be signed. - :type sign_message: bool - :param compress_message: Required. The value indicating whether the - message has to be compressed. - :type compress_message: bool - :param check_duplicate_message: Required. The value indicating whether to - check for duplicate message. - :type check_duplicate_message: bool - :param interchange_duplicates_validity_days: Required. The number of days - to look back for duplicate interchange. - :type interchange_duplicates_validity_days: int - :param check_certificate_revocation_list_on_send: Required. The value - indicating whether to check for certificate revocation list on send. - :type check_certificate_revocation_list_on_send: bool - :param check_certificate_revocation_list_on_receive: Required. The value - indicating whether to check for certificate revocation list on receive. - :type check_certificate_revocation_list_on_receive: bool - :param encryption_algorithm: Required. The encryption algorithm. Possible - values include: 'NotSpecified', 'None', 'DES3', 'RC2', 'AES128', 'AES192', - 'AES256' - :type encryption_algorithm: str or - ~azure.mgmt.logic.models.EncryptionAlgorithm - :param signing_algorithm: The signing algorithm. Possible values include: - 'NotSpecified', 'Default', 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' - :type signing_algorithm: str or ~azure.mgmt.logic.models.SigningAlgorithm - """ - - _validation = { - 'override_message_properties': {'required': True}, - 'encrypt_message': {'required': True}, - 'sign_message': {'required': True}, - 'compress_message': {'required': True}, - 'check_duplicate_message': {'required': True}, - 'interchange_duplicates_validity_days': {'required': True}, - 'check_certificate_revocation_list_on_send': {'required': True}, - 'check_certificate_revocation_list_on_receive': {'required': True}, - 'encryption_algorithm': {'required': True}, - } - - _attribute_map = { - 'override_message_properties': {'key': 'overrideMessageProperties', 'type': 'bool'}, - 'encrypt_message': {'key': 'encryptMessage', 'type': 'bool'}, - 'sign_message': {'key': 'signMessage', 'type': 'bool'}, - 'compress_message': {'key': 'compressMessage', 'type': 'bool'}, - 'check_duplicate_message': {'key': 'checkDuplicateMessage', 'type': 'bool'}, - 'interchange_duplicates_validity_days': {'key': 'interchangeDuplicatesValidityDays', 'type': 'int'}, - 'check_certificate_revocation_list_on_send': {'key': 'checkCertificateRevocationListOnSend', 'type': 'bool'}, - 'check_certificate_revocation_list_on_receive': {'key': 'checkCertificateRevocationListOnReceive', 'type': 'bool'}, - 'encryption_algorithm': {'key': 'encryptionAlgorithm', 'type': 'str'}, - 'signing_algorithm': {'key': 'signingAlgorithm', 'type': 'str'}, - } - - def __init__(self, *, override_message_properties: bool, encrypt_message: bool, sign_message: bool, compress_message: bool, check_duplicate_message: bool, interchange_duplicates_validity_days: int, check_certificate_revocation_list_on_send: bool, check_certificate_revocation_list_on_receive: bool, encryption_algorithm, signing_algorithm=None, **kwargs) -> None: - super(AS2ValidationSettings, self).__init__(**kwargs) - self.override_message_properties = override_message_properties - self.encrypt_message = encrypt_message - self.sign_message = sign_message - self.compress_message = compress_message - self.check_duplicate_message = check_duplicate_message - self.interchange_duplicates_validity_days = interchange_duplicates_validity_days - self.check_certificate_revocation_list_on_send = check_certificate_revocation_list_on_send - self.check_certificate_revocation_list_on_receive = check_certificate_revocation_list_on_receive - self.encryption_algorithm = encryption_algorithm - self.signing_algorithm = signing_algorithm diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/assembly_definition.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/assembly_definition.py deleted file mode 100644 index 0332e1a65491..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/assembly_definition.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class AssemblyDefinition(Resource): - """The assembly definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param properties: Required. The assembly properties. - :type properties: ~azure.mgmt.logic.models.AssemblyProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'properties': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'AssemblyProperties'}, - } - - def __init__(self, **kwargs): - super(AssemblyDefinition, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/assembly_definition_paged.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/assembly_definition_paged.py deleted file mode 100644 index fbe3cc995683..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/assembly_definition_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class AssemblyDefinitionPaged(Paged): - """ - A paging container for iterating over a list of :class:`AssemblyDefinition ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AssemblyDefinition]'} - } - - def __init__(self, *args, **kwargs): - - super(AssemblyDefinitionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/assembly_definition_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/assembly_definition_py3.py deleted file mode 100644 index e30c214c6a87..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/assembly_definition_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class AssemblyDefinition(Resource): - """The assembly definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param properties: Required. The assembly properties. - :type properties: ~azure.mgmt.logic.models.AssemblyProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'properties': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'AssemblyProperties'}, - } - - def __init__(self, *, properties, location: str=None, tags=None, **kwargs) -> None: - super(AssemblyDefinition, self).__init__(location=location, tags=tags, **kwargs) - self.properties = properties diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/assembly_properties.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/assembly_properties.py deleted file mode 100644 index e6ec176ecf0a..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/assembly_properties.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .artifact_content_properties_definition import ArtifactContentPropertiesDefinition - - -class AssemblyProperties(ArtifactContentPropertiesDefinition): - """The assembly properties definition. - - All required parameters must be populated in order to send to Azure. - - :param created_time: The artifact creation time. - :type created_time: datetime - :param changed_time: The artifact changed time. - :type changed_time: datetime - :param metadata: - :type metadata: object - :param content: - :type content: object - :param content_type: The content type. - :type content_type: str - :param content_link: The content link. - :type content_link: ~azure.mgmt.logic.models.ContentLink - :param assembly_name: Required. The assembly name. - :type assembly_name: str - :param assembly_version: The assembly version. - :type assembly_version: str - :param assembly_culture: The assembly culture. - :type assembly_culture: str - :param assembly_public_key_token: The assembly public key token. - :type assembly_public_key_token: str - """ - - _validation = { - 'assembly_name': {'required': True}, - } - - _attribute_map = { - 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - 'content': {'key': 'content', 'type': 'object'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, - 'content_link': {'key': 'contentLink', 'type': 'ContentLink'}, - 'assembly_name': {'key': 'assemblyName', 'type': 'str'}, - 'assembly_version': {'key': 'assemblyVersion', 'type': 'str'}, - 'assembly_culture': {'key': 'assemblyCulture', 'type': 'str'}, - 'assembly_public_key_token': {'key': 'assemblyPublicKeyToken', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AssemblyProperties, self).__init__(**kwargs) - self.assembly_name = kwargs.get('assembly_name', None) - self.assembly_version = kwargs.get('assembly_version', None) - self.assembly_culture = kwargs.get('assembly_culture', None) - self.assembly_public_key_token = kwargs.get('assembly_public_key_token', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/assembly_properties_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/assembly_properties_py3.py deleted file mode 100644 index a0676a264c9d..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/assembly_properties_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .artifact_content_properties_definition_py3 import ArtifactContentPropertiesDefinition - - -class AssemblyProperties(ArtifactContentPropertiesDefinition): - """The assembly properties definition. - - All required parameters must be populated in order to send to Azure. - - :param created_time: The artifact creation time. - :type created_time: datetime - :param changed_time: The artifact changed time. - :type changed_time: datetime - :param metadata: - :type metadata: object - :param content: - :type content: object - :param content_type: The content type. - :type content_type: str - :param content_link: The content link. - :type content_link: ~azure.mgmt.logic.models.ContentLink - :param assembly_name: Required. The assembly name. - :type assembly_name: str - :param assembly_version: The assembly version. - :type assembly_version: str - :param assembly_culture: The assembly culture. - :type assembly_culture: str - :param assembly_public_key_token: The assembly public key token. - :type assembly_public_key_token: str - """ - - _validation = { - 'assembly_name': {'required': True}, - } - - _attribute_map = { - 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - 'content': {'key': 'content', 'type': 'object'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, - 'content_link': {'key': 'contentLink', 'type': 'ContentLink'}, - 'assembly_name': {'key': 'assemblyName', 'type': 'str'}, - 'assembly_version': {'key': 'assemblyVersion', 'type': 'str'}, - 'assembly_culture': {'key': 'assemblyCulture', 'type': 'str'}, - 'assembly_public_key_token': {'key': 'assemblyPublicKeyToken', 'type': 'str'}, - } - - def __init__(self, *, assembly_name: str, created_time=None, changed_time=None, metadata=None, content=None, content_type: str=None, content_link=None, assembly_version: str=None, assembly_culture: str=None, assembly_public_key_token: str=None, **kwargs) -> None: - super(AssemblyProperties, self).__init__(created_time=created_time, changed_time=changed_time, metadata=metadata, content=content, content_type=content_type, content_link=content_link, **kwargs) - self.assembly_name = assembly_name - self.assembly_version = assembly_version - self.assembly_culture = assembly_culture - self.assembly_public_key_token = assembly_public_key_token diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/azure_resource_error_info.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/azure_resource_error_info.py deleted file mode 100644 index ecec1dd28437..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/azure_resource_error_info.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .error_info import ErrorInfo - - -class AzureResourceErrorInfo(ErrorInfo): - """The azure resource error info. - - All required parameters must be populated in order to send to Azure. - - :param code: Required. The error code. - :type code: str - :param message: Required. The error message. - :type message: str - :param details: The error details. - :type details: list[~azure.mgmt.logic.models.AzureResourceErrorInfo] - """ - - _validation = { - 'code': {'required': True}, - 'message': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[AzureResourceErrorInfo]'}, - } - - def __init__(self, **kwargs): - super(AzureResourceErrorInfo, self).__init__(**kwargs) - self.message = kwargs.get('message', None) - self.details = kwargs.get('details', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/azure_resource_error_info_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/azure_resource_error_info_py3.py deleted file mode 100644 index cd39d5f68870..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/azure_resource_error_info_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .error_info_py3 import ErrorInfo - - -class AzureResourceErrorInfo(ErrorInfo): - """The azure resource error info. - - All required parameters must be populated in order to send to Azure. - - :param code: Required. The error code. - :type code: str - :param message: Required. The error message. - :type message: str - :param details: The error details. - :type details: list[~azure.mgmt.logic.models.AzureResourceErrorInfo] - """ - - _validation = { - 'code': {'required': True}, - 'message': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[AzureResourceErrorInfo]'}, - } - - def __init__(self, *, code: str, message: str, details=None, **kwargs) -> None: - super(AzureResourceErrorInfo, self).__init__(code=code, **kwargs) - self.message = message - self.details = details diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/b2_bpartner_content.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/b2_bpartner_content.py deleted file mode 100644 index ede9238ab529..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/b2_bpartner_content.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class B2BPartnerContent(Model): - """The B2B partner content. - - :param business_identities: The list of partner business identities. - :type business_identities: list[~azure.mgmt.logic.models.BusinessIdentity] - """ - - _attribute_map = { - 'business_identities': {'key': 'businessIdentities', 'type': '[BusinessIdentity]'}, - } - - def __init__(self, **kwargs): - super(B2BPartnerContent, self).__init__(**kwargs) - self.business_identities = kwargs.get('business_identities', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/b2_bpartner_content_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/b2_bpartner_content_py3.py deleted file mode 100644 index 7563514fe683..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/b2_bpartner_content_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class B2BPartnerContent(Model): - """The B2B partner content. - - :param business_identities: The list of partner business identities. - :type business_identities: list[~azure.mgmt.logic.models.BusinessIdentity] - """ - - _attribute_map = { - 'business_identities': {'key': 'businessIdentities', 'type': '[BusinessIdentity]'}, - } - - def __init__(self, *, business_identities=None, **kwargs) -> None: - super(B2BPartnerContent, self).__init__(**kwargs) - self.business_identities = business_identities diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration.py deleted file mode 100644 index 12920895e108..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class BatchConfiguration(Resource): - """The batch configuration resource definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param properties: Required. The batch configuration properties. - :type properties: ~azure.mgmt.logic.models.BatchConfigurationProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'properties': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'BatchConfigurationProperties'}, - } - - def __init__(self, **kwargs): - super(BatchConfiguration, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration_paged.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration_paged.py deleted file mode 100644 index 965308916323..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class BatchConfigurationPaged(Paged): - """ - A paging container for iterating over a list of :class:`BatchConfiguration ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[BatchConfiguration]'} - } - - def __init__(self, *args, **kwargs): - - super(BatchConfigurationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration_properties.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration_properties.py deleted file mode 100644 index 8b3038836ccb..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration_properties.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .artifact_properties import ArtifactProperties - - -class BatchConfigurationProperties(ArtifactProperties): - """The batch configuration properties definition. - - All required parameters must be populated in order to send to Azure. - - :param created_time: The artifact creation time. - :type created_time: datetime - :param changed_time: The artifact changed time. - :type changed_time: datetime - :param metadata: - :type metadata: object - :param batch_group_name: Required. The name of the batch group. - :type batch_group_name: str - :param release_criteria: Required. The batch release criteria. - :type release_criteria: ~azure.mgmt.logic.models.BatchReleaseCriteria - """ - - _validation = { - 'batch_group_name': {'required': True}, - 'release_criteria': {'required': True}, - } - - _attribute_map = { - 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - 'batch_group_name': {'key': 'batchGroupName', 'type': 'str'}, - 'release_criteria': {'key': 'releaseCriteria', 'type': 'BatchReleaseCriteria'}, - } - - def __init__(self, **kwargs): - super(BatchConfigurationProperties, self).__init__(**kwargs) - self.batch_group_name = kwargs.get('batch_group_name', None) - self.release_criteria = kwargs.get('release_criteria', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration_properties_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration_properties_py3.py deleted file mode 100644 index 5729113a66f3..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration_properties_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .artifact_properties_py3 import ArtifactProperties - - -class BatchConfigurationProperties(ArtifactProperties): - """The batch configuration properties definition. - - All required parameters must be populated in order to send to Azure. - - :param created_time: The artifact creation time. - :type created_time: datetime - :param changed_time: The artifact changed time. - :type changed_time: datetime - :param metadata: - :type metadata: object - :param batch_group_name: Required. The name of the batch group. - :type batch_group_name: str - :param release_criteria: Required. The batch release criteria. - :type release_criteria: ~azure.mgmt.logic.models.BatchReleaseCriteria - """ - - _validation = { - 'batch_group_name': {'required': True}, - 'release_criteria': {'required': True}, - } - - _attribute_map = { - 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - 'batch_group_name': {'key': 'batchGroupName', 'type': 'str'}, - 'release_criteria': {'key': 'releaseCriteria', 'type': 'BatchReleaseCriteria'}, - } - - def __init__(self, *, batch_group_name: str, release_criteria, created_time=None, changed_time=None, metadata=None, **kwargs) -> None: - super(BatchConfigurationProperties, self).__init__(created_time=created_time, changed_time=changed_time, metadata=metadata, **kwargs) - self.batch_group_name = batch_group_name - self.release_criteria = release_criteria diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration_py3.py deleted file mode 100644 index 19dc6458274d..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class BatchConfiguration(Resource): - """The batch configuration resource definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param properties: Required. The batch configuration properties. - :type properties: ~azure.mgmt.logic.models.BatchConfigurationProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'properties': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'BatchConfigurationProperties'}, - } - - def __init__(self, *, properties, location: str=None, tags=None, **kwargs) -> None: - super(BatchConfiguration, self).__init__(location=location, tags=tags, **kwargs) - self.properties = properties diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/batch_release_criteria.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/batch_release_criteria.py deleted file mode 100644 index 55217abd6e46..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/batch_release_criteria.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BatchReleaseCriteria(Model): - """The batch release criteria. - - :param message_count: The message count. - :type message_count: int - :param batch_size: The batch size in bytes. - :type batch_size: int - :param recurrence: The recurrence. - :type recurrence: ~azure.mgmt.logic.models.WorkflowTriggerRecurrence - """ - - _attribute_map = { - 'message_count': {'key': 'messageCount', 'type': 'int'}, - 'batch_size': {'key': 'batchSize', 'type': 'int'}, - 'recurrence': {'key': 'recurrence', 'type': 'WorkflowTriggerRecurrence'}, - } - - def __init__(self, **kwargs): - super(BatchReleaseCriteria, self).__init__(**kwargs) - self.message_count = kwargs.get('message_count', None) - self.batch_size = kwargs.get('batch_size', None) - self.recurrence = kwargs.get('recurrence', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/batch_release_criteria_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/batch_release_criteria_py3.py deleted file mode 100644 index 33d596dc902c..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/batch_release_criteria_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BatchReleaseCriteria(Model): - """The batch release criteria. - - :param message_count: The message count. - :type message_count: int - :param batch_size: The batch size in bytes. - :type batch_size: int - :param recurrence: The recurrence. - :type recurrence: ~azure.mgmt.logic.models.WorkflowTriggerRecurrence - """ - - _attribute_map = { - 'message_count': {'key': 'messageCount', 'type': 'int'}, - 'batch_size': {'key': 'batchSize', 'type': 'int'}, - 'recurrence': {'key': 'recurrence', 'type': 'WorkflowTriggerRecurrence'}, - } - - def __init__(self, *, message_count: int=None, batch_size: int=None, recurrence=None, **kwargs) -> None: - super(BatchReleaseCriteria, self).__init__(**kwargs) - self.message_count = message_count - self.batch_size = batch_size - self.recurrence = recurrence diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/business_identity.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/business_identity.py deleted file mode 100644 index f3ece263cff5..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/business_identity.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BusinessIdentity(Model): - """The integration account partner's business identity. - - All required parameters must be populated in order to send to Azure. - - :param qualifier: Required. The business identity qualifier e.g. - as2identity, ZZ, ZZZ, 31, 32 - :type qualifier: str - :param value: Required. The user defined business identity value. - :type value: str - """ - - _validation = { - 'qualifier': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'qualifier': {'key': 'qualifier', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(BusinessIdentity, self).__init__(**kwargs) - self.qualifier = kwargs.get('qualifier', None) - self.value = kwargs.get('value', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/business_identity_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/business_identity_py3.py deleted file mode 100644 index 41c27a99d299..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/business_identity_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BusinessIdentity(Model): - """The integration account partner's business identity. - - All required parameters must be populated in order to send to Azure. - - :param qualifier: Required. The business identity qualifier e.g. - as2identity, ZZ, ZZZ, 31, 32 - :type qualifier: str - :param value: Required. The user defined business identity value. - :type value: str - """ - - _validation = { - 'qualifier': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'qualifier': {'key': 'qualifier', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, qualifier: str, value: str, **kwargs) -> None: - super(BusinessIdentity, self).__init__(**kwargs) - self.qualifier = qualifier - self.value = value diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/callback_url.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/callback_url.py deleted file mode 100644 index 0fe1f3a30647..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/callback_url.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CallbackUrl(Model): - """The callback url. - - :param value: The URL value. - :type value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CallbackUrl, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/callback_url_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/callback_url_py3.py deleted file mode 100644 index fd8271657bef..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/callback_url_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CallbackUrl(Model): - """The callback url. - - :param value: The URL value. - :type value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, value: str=None, **kwargs) -> None: - super(CallbackUrl, self).__init__(**kwargs) - self.value = value diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/content_hash.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/content_hash.py deleted file mode 100644 index a67e06aafa7d..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/content_hash.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContentHash(Model): - """The content hash. - - :param algorithm: The algorithm of the content hash. - :type algorithm: str - :param value: The value of the content hash. - :type value: str - """ - - _attribute_map = { - 'algorithm': {'key': 'algorithm', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContentHash, self).__init__(**kwargs) - self.algorithm = kwargs.get('algorithm', None) - self.value = kwargs.get('value', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/content_hash_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/content_hash_py3.py deleted file mode 100644 index 868bfe2ba5f2..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/content_hash_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContentHash(Model): - """The content hash. - - :param algorithm: The algorithm of the content hash. - :type algorithm: str - :param value: The value of the content hash. - :type value: str - """ - - _attribute_map = { - 'algorithm': {'key': 'algorithm', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, algorithm: str=None, value: str=None, **kwargs) -> None: - super(ContentHash, self).__init__(**kwargs) - self.algorithm = algorithm - self.value = value diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/content_link.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/content_link.py deleted file mode 100644 index cbbdefd771bf..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/content_link.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContentLink(Model): - """The content link. - - :param uri: The content link URI. - :type uri: str - :param content_version: The content version. - :type content_version: str - :param content_size: The content size. - :type content_size: long - :param content_hash: The content hash. - :type content_hash: ~azure.mgmt.logic.models.ContentHash - :param metadata: The metadata. - :type metadata: object - """ - - _attribute_map = { - 'uri': {'key': 'uri', 'type': 'str'}, - 'content_version': {'key': 'contentVersion', 'type': 'str'}, - 'content_size': {'key': 'contentSize', 'type': 'long'}, - 'content_hash': {'key': 'contentHash', 'type': 'ContentHash'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ContentLink, self).__init__(**kwargs) - self.uri = kwargs.get('uri', None) - self.content_version = kwargs.get('content_version', None) - self.content_size = kwargs.get('content_size', None) - self.content_hash = kwargs.get('content_hash', None) - self.metadata = kwargs.get('metadata', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/content_link_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/content_link_py3.py deleted file mode 100644 index 1af59960aad2..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/content_link_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContentLink(Model): - """The content link. - - :param uri: The content link URI. - :type uri: str - :param content_version: The content version. - :type content_version: str - :param content_size: The content size. - :type content_size: long - :param content_hash: The content hash. - :type content_hash: ~azure.mgmt.logic.models.ContentHash - :param metadata: The metadata. - :type metadata: object - """ - - _attribute_map = { - 'uri': {'key': 'uri', 'type': 'str'}, - 'content_version': {'key': 'contentVersion', 'type': 'str'}, - 'content_size': {'key': 'contentSize', 'type': 'long'}, - 'content_hash': {'key': 'contentHash', 'type': 'ContentHash'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - } - - def __init__(self, *, uri: str=None, content_version: str=None, content_size: int=None, content_hash=None, metadata=None, **kwargs) -> None: - super(ContentLink, self).__init__(**kwargs) - self.uri = uri - self.content_version = content_version - self.content_size = content_size - self.content_hash = content_hash - self.metadata = metadata diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/correlation.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/correlation.py deleted file mode 100644 index 6712f294b086..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/correlation.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Correlation(Model): - """The correlation property. - - :param client_tracking_id: The client tracking id. - :type client_tracking_id: str - """ - - _attribute_map = { - 'client_tracking_id': {'key': 'clientTrackingId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Correlation, self).__init__(**kwargs) - self.client_tracking_id = kwargs.get('client_tracking_id', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/correlation_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/correlation_py3.py deleted file mode 100644 index 8f4a03eef0f7..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/correlation_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Correlation(Model): - """The correlation property. - - :param client_tracking_id: The client tracking id. - :type client_tracking_id: str - """ - - _attribute_map = { - 'client_tracking_id': {'key': 'clientTrackingId', 'type': 'str'}, - } - - def __init__(self, *, client_tracking_id: str=None, **kwargs) -> None: - super(Correlation, self).__init__(**kwargs) - self.client_tracking_id = client_tracking_id diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_acknowledgement_settings.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_acknowledgement_settings.py deleted file mode 100644 index bf32720e1ab6..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_acknowledgement_settings.py +++ /dev/null @@ -1,93 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EdifactAcknowledgementSettings(Model): - """The Edifact agreement acknowledgement settings. - - All required parameters must be populated in order to send to Azure. - - :param need_technical_acknowledgement: Required. The value indicating - whether technical acknowledgement is needed. - :type need_technical_acknowledgement: bool - :param batch_technical_acknowledgements: Required. The value indicating - whether to batch the technical acknowledgements. - :type batch_technical_acknowledgements: bool - :param need_functional_acknowledgement: Required. The value indicating - whether functional acknowledgement is needed. - :type need_functional_acknowledgement: bool - :param batch_functional_acknowledgements: Required. The value indicating - whether to batch functional acknowledgements. - :type batch_functional_acknowledgements: bool - :param need_loop_for_valid_messages: Required. The value indicating - whether a loop is needed for valid messages. - :type need_loop_for_valid_messages: bool - :param send_synchronous_acknowledgement: Required. The value indicating - whether to send synchronous acknowledgement. - :type send_synchronous_acknowledgement: bool - :param acknowledgement_control_number_prefix: The acknowledgement control - number prefix. - :type acknowledgement_control_number_prefix: str - :param acknowledgement_control_number_suffix: The acknowledgement control - number suffix. - :type acknowledgement_control_number_suffix: str - :param acknowledgement_control_number_lower_bound: Required. The - acknowledgement control number lower bound. - :type acknowledgement_control_number_lower_bound: int - :param acknowledgement_control_number_upper_bound: Required. The - acknowledgement control number upper bound. - :type acknowledgement_control_number_upper_bound: int - :param rollover_acknowledgement_control_number: Required. The value - indicating whether to rollover acknowledgement control number. - :type rollover_acknowledgement_control_number: bool - """ - - _validation = { - 'need_technical_acknowledgement': {'required': True}, - 'batch_technical_acknowledgements': {'required': True}, - 'need_functional_acknowledgement': {'required': True}, - 'batch_functional_acknowledgements': {'required': True}, - 'need_loop_for_valid_messages': {'required': True}, - 'send_synchronous_acknowledgement': {'required': True}, - 'acknowledgement_control_number_lower_bound': {'required': True}, - 'acknowledgement_control_number_upper_bound': {'required': True}, - 'rollover_acknowledgement_control_number': {'required': True}, - } - - _attribute_map = { - 'need_technical_acknowledgement': {'key': 'needTechnicalAcknowledgement', 'type': 'bool'}, - 'batch_technical_acknowledgements': {'key': 'batchTechnicalAcknowledgements', 'type': 'bool'}, - 'need_functional_acknowledgement': {'key': 'needFunctionalAcknowledgement', 'type': 'bool'}, - 'batch_functional_acknowledgements': {'key': 'batchFunctionalAcknowledgements', 'type': 'bool'}, - 'need_loop_for_valid_messages': {'key': 'needLoopForValidMessages', 'type': 'bool'}, - 'send_synchronous_acknowledgement': {'key': 'sendSynchronousAcknowledgement', 'type': 'bool'}, - 'acknowledgement_control_number_prefix': {'key': 'acknowledgementControlNumberPrefix', 'type': 'str'}, - 'acknowledgement_control_number_suffix': {'key': 'acknowledgementControlNumberSuffix', 'type': 'str'}, - 'acknowledgement_control_number_lower_bound': {'key': 'acknowledgementControlNumberLowerBound', 'type': 'int'}, - 'acknowledgement_control_number_upper_bound': {'key': 'acknowledgementControlNumberUpperBound', 'type': 'int'}, - 'rollover_acknowledgement_control_number': {'key': 'rolloverAcknowledgementControlNumber', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(EdifactAcknowledgementSettings, self).__init__(**kwargs) - self.need_technical_acknowledgement = kwargs.get('need_technical_acknowledgement', None) - self.batch_technical_acknowledgements = kwargs.get('batch_technical_acknowledgements', None) - self.need_functional_acknowledgement = kwargs.get('need_functional_acknowledgement', None) - self.batch_functional_acknowledgements = kwargs.get('batch_functional_acknowledgements', None) - self.need_loop_for_valid_messages = kwargs.get('need_loop_for_valid_messages', None) - self.send_synchronous_acknowledgement = kwargs.get('send_synchronous_acknowledgement', None) - self.acknowledgement_control_number_prefix = kwargs.get('acknowledgement_control_number_prefix', None) - self.acknowledgement_control_number_suffix = kwargs.get('acknowledgement_control_number_suffix', None) - self.acknowledgement_control_number_lower_bound = kwargs.get('acknowledgement_control_number_lower_bound', None) - self.acknowledgement_control_number_upper_bound = kwargs.get('acknowledgement_control_number_upper_bound', None) - self.rollover_acknowledgement_control_number = kwargs.get('rollover_acknowledgement_control_number', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_acknowledgement_settings_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_acknowledgement_settings_py3.py deleted file mode 100644 index 3242b1565b47..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_acknowledgement_settings_py3.py +++ /dev/null @@ -1,93 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EdifactAcknowledgementSettings(Model): - """The Edifact agreement acknowledgement settings. - - All required parameters must be populated in order to send to Azure. - - :param need_technical_acknowledgement: Required. The value indicating - whether technical acknowledgement is needed. - :type need_technical_acknowledgement: bool - :param batch_technical_acknowledgements: Required. The value indicating - whether to batch the technical acknowledgements. - :type batch_technical_acknowledgements: bool - :param need_functional_acknowledgement: Required. The value indicating - whether functional acknowledgement is needed. - :type need_functional_acknowledgement: bool - :param batch_functional_acknowledgements: Required. The value indicating - whether to batch functional acknowledgements. - :type batch_functional_acknowledgements: bool - :param need_loop_for_valid_messages: Required. The value indicating - whether a loop is needed for valid messages. - :type need_loop_for_valid_messages: bool - :param send_synchronous_acknowledgement: Required. The value indicating - whether to send synchronous acknowledgement. - :type send_synchronous_acknowledgement: bool - :param acknowledgement_control_number_prefix: The acknowledgement control - number prefix. - :type acknowledgement_control_number_prefix: str - :param acknowledgement_control_number_suffix: The acknowledgement control - number suffix. - :type acknowledgement_control_number_suffix: str - :param acknowledgement_control_number_lower_bound: Required. The - acknowledgement control number lower bound. - :type acknowledgement_control_number_lower_bound: int - :param acknowledgement_control_number_upper_bound: Required. The - acknowledgement control number upper bound. - :type acknowledgement_control_number_upper_bound: int - :param rollover_acknowledgement_control_number: Required. The value - indicating whether to rollover acknowledgement control number. - :type rollover_acknowledgement_control_number: bool - """ - - _validation = { - 'need_technical_acknowledgement': {'required': True}, - 'batch_technical_acknowledgements': {'required': True}, - 'need_functional_acknowledgement': {'required': True}, - 'batch_functional_acknowledgements': {'required': True}, - 'need_loop_for_valid_messages': {'required': True}, - 'send_synchronous_acknowledgement': {'required': True}, - 'acknowledgement_control_number_lower_bound': {'required': True}, - 'acknowledgement_control_number_upper_bound': {'required': True}, - 'rollover_acknowledgement_control_number': {'required': True}, - } - - _attribute_map = { - 'need_technical_acknowledgement': {'key': 'needTechnicalAcknowledgement', 'type': 'bool'}, - 'batch_technical_acknowledgements': {'key': 'batchTechnicalAcknowledgements', 'type': 'bool'}, - 'need_functional_acknowledgement': {'key': 'needFunctionalAcknowledgement', 'type': 'bool'}, - 'batch_functional_acknowledgements': {'key': 'batchFunctionalAcknowledgements', 'type': 'bool'}, - 'need_loop_for_valid_messages': {'key': 'needLoopForValidMessages', 'type': 'bool'}, - 'send_synchronous_acknowledgement': {'key': 'sendSynchronousAcknowledgement', 'type': 'bool'}, - 'acknowledgement_control_number_prefix': {'key': 'acknowledgementControlNumberPrefix', 'type': 'str'}, - 'acknowledgement_control_number_suffix': {'key': 'acknowledgementControlNumberSuffix', 'type': 'str'}, - 'acknowledgement_control_number_lower_bound': {'key': 'acknowledgementControlNumberLowerBound', 'type': 'int'}, - 'acknowledgement_control_number_upper_bound': {'key': 'acknowledgementControlNumberUpperBound', 'type': 'int'}, - 'rollover_acknowledgement_control_number': {'key': 'rolloverAcknowledgementControlNumber', 'type': 'bool'}, - } - - def __init__(self, *, need_technical_acknowledgement: bool, batch_technical_acknowledgements: bool, need_functional_acknowledgement: bool, batch_functional_acknowledgements: bool, need_loop_for_valid_messages: bool, send_synchronous_acknowledgement: bool, acknowledgement_control_number_lower_bound: int, acknowledgement_control_number_upper_bound: int, rollover_acknowledgement_control_number: bool, acknowledgement_control_number_prefix: str=None, acknowledgement_control_number_suffix: str=None, **kwargs) -> None: - super(EdifactAcknowledgementSettings, self).__init__(**kwargs) - self.need_technical_acknowledgement = need_technical_acknowledgement - self.batch_technical_acknowledgements = batch_technical_acknowledgements - self.need_functional_acknowledgement = need_functional_acknowledgement - self.batch_functional_acknowledgements = batch_functional_acknowledgements - self.need_loop_for_valid_messages = need_loop_for_valid_messages - self.send_synchronous_acknowledgement = send_synchronous_acknowledgement - self.acknowledgement_control_number_prefix = acknowledgement_control_number_prefix - self.acknowledgement_control_number_suffix = acknowledgement_control_number_suffix - self.acknowledgement_control_number_lower_bound = acknowledgement_control_number_lower_bound - self.acknowledgement_control_number_upper_bound = acknowledgement_control_number_upper_bound - self.rollover_acknowledgement_control_number = rollover_acknowledgement_control_number diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_agreement_content.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_agreement_content.py deleted file mode 100644 index e3c0bd495180..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_agreement_content.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EdifactAgreementContent(Model): - """The Edifact agreement content. - - All required parameters must be populated in order to send to Azure. - - :param receive_agreement: Required. The EDIFACT one-way receive agreement. - :type receive_agreement: ~azure.mgmt.logic.models.EdifactOneWayAgreement - :param send_agreement: Required. The EDIFACT one-way send agreement. - :type send_agreement: ~azure.mgmt.logic.models.EdifactOneWayAgreement - """ - - _validation = { - 'receive_agreement': {'required': True}, - 'send_agreement': {'required': True}, - } - - _attribute_map = { - 'receive_agreement': {'key': 'receiveAgreement', 'type': 'EdifactOneWayAgreement'}, - 'send_agreement': {'key': 'sendAgreement', 'type': 'EdifactOneWayAgreement'}, - } - - def __init__(self, **kwargs): - super(EdifactAgreementContent, self).__init__(**kwargs) - self.receive_agreement = kwargs.get('receive_agreement', None) - self.send_agreement = kwargs.get('send_agreement', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_agreement_content_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_agreement_content_py3.py deleted file mode 100644 index 2a19f44a6fa3..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_agreement_content_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EdifactAgreementContent(Model): - """The Edifact agreement content. - - All required parameters must be populated in order to send to Azure. - - :param receive_agreement: Required. The EDIFACT one-way receive agreement. - :type receive_agreement: ~azure.mgmt.logic.models.EdifactOneWayAgreement - :param send_agreement: Required. The EDIFACT one-way send agreement. - :type send_agreement: ~azure.mgmt.logic.models.EdifactOneWayAgreement - """ - - _validation = { - 'receive_agreement': {'required': True}, - 'send_agreement': {'required': True}, - } - - _attribute_map = { - 'receive_agreement': {'key': 'receiveAgreement', 'type': 'EdifactOneWayAgreement'}, - 'send_agreement': {'key': 'sendAgreement', 'type': 'EdifactOneWayAgreement'}, - } - - def __init__(self, *, receive_agreement, send_agreement, **kwargs) -> None: - super(EdifactAgreementContent, self).__init__(**kwargs) - self.receive_agreement = receive_agreement - self.send_agreement = send_agreement diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_delimiter_override.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_delimiter_override.py deleted file mode 100644 index 9cab599afb9a..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_delimiter_override.py +++ /dev/null @@ -1,90 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EdifactDelimiterOverride(Model): - """The Edifact delimiter override settings. - - All required parameters must be populated in order to send to Azure. - - :param message_id: The message id. - :type message_id: str - :param message_version: The message version. - :type message_version: str - :param message_release: The message release. - :type message_release: str - :param data_element_separator: Required. The data element separator. - :type data_element_separator: int - :param component_separator: Required. The component separator. - :type component_separator: int - :param segment_terminator: Required. The segment terminator. - :type segment_terminator: int - :param repetition_separator: Required. The repetition separator. - :type repetition_separator: int - :param segment_terminator_suffix: Required. The segment terminator suffix. - Possible values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' - :type segment_terminator_suffix: str or - ~azure.mgmt.logic.models.SegmentTerminatorSuffix - :param decimal_point_indicator: Required. The decimal point indicator. - Possible values include: 'NotSpecified', 'Comma', 'Decimal' - :type decimal_point_indicator: str or - ~azure.mgmt.logic.models.EdifactDecimalIndicator - :param release_indicator: Required. The release indicator. - :type release_indicator: int - :param message_association_assigned_code: The message association assigned - code. - :type message_association_assigned_code: str - :param target_namespace: The target namespace on which this delimiter - settings has to be applied. - :type target_namespace: str - """ - - _validation = { - 'data_element_separator': {'required': True}, - 'component_separator': {'required': True}, - 'segment_terminator': {'required': True}, - 'repetition_separator': {'required': True}, - 'segment_terminator_suffix': {'required': True}, - 'decimal_point_indicator': {'required': True}, - 'release_indicator': {'required': True}, - } - - _attribute_map = { - 'message_id': {'key': 'messageId', 'type': 'str'}, - 'message_version': {'key': 'messageVersion', 'type': 'str'}, - 'message_release': {'key': 'messageRelease', 'type': 'str'}, - 'data_element_separator': {'key': 'dataElementSeparator', 'type': 'int'}, - 'component_separator': {'key': 'componentSeparator', 'type': 'int'}, - 'segment_terminator': {'key': 'segmentTerminator', 'type': 'int'}, - 'repetition_separator': {'key': 'repetitionSeparator', 'type': 'int'}, - 'segment_terminator_suffix': {'key': 'segmentTerminatorSuffix', 'type': 'SegmentTerminatorSuffix'}, - 'decimal_point_indicator': {'key': 'decimalPointIndicator', 'type': 'EdifactDecimalIndicator'}, - 'release_indicator': {'key': 'releaseIndicator', 'type': 'int'}, - 'message_association_assigned_code': {'key': 'messageAssociationAssignedCode', 'type': 'str'}, - 'target_namespace': {'key': 'targetNamespace', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EdifactDelimiterOverride, self).__init__(**kwargs) - self.message_id = kwargs.get('message_id', None) - self.message_version = kwargs.get('message_version', None) - self.message_release = kwargs.get('message_release', None) - self.data_element_separator = kwargs.get('data_element_separator', None) - self.component_separator = kwargs.get('component_separator', None) - self.segment_terminator = kwargs.get('segment_terminator', None) - self.repetition_separator = kwargs.get('repetition_separator', None) - self.segment_terminator_suffix = kwargs.get('segment_terminator_suffix', None) - self.decimal_point_indicator = kwargs.get('decimal_point_indicator', None) - self.release_indicator = kwargs.get('release_indicator', None) - self.message_association_assigned_code = kwargs.get('message_association_assigned_code', None) - self.target_namespace = kwargs.get('target_namespace', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_delimiter_override_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_delimiter_override_py3.py deleted file mode 100644 index 3d35e5e000a6..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_delimiter_override_py3.py +++ /dev/null @@ -1,90 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EdifactDelimiterOverride(Model): - """The Edifact delimiter override settings. - - All required parameters must be populated in order to send to Azure. - - :param message_id: The message id. - :type message_id: str - :param message_version: The message version. - :type message_version: str - :param message_release: The message release. - :type message_release: str - :param data_element_separator: Required. The data element separator. - :type data_element_separator: int - :param component_separator: Required. The component separator. - :type component_separator: int - :param segment_terminator: Required. The segment terminator. - :type segment_terminator: int - :param repetition_separator: Required. The repetition separator. - :type repetition_separator: int - :param segment_terminator_suffix: Required. The segment terminator suffix. - Possible values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' - :type segment_terminator_suffix: str or - ~azure.mgmt.logic.models.SegmentTerminatorSuffix - :param decimal_point_indicator: Required. The decimal point indicator. - Possible values include: 'NotSpecified', 'Comma', 'Decimal' - :type decimal_point_indicator: str or - ~azure.mgmt.logic.models.EdifactDecimalIndicator - :param release_indicator: Required. The release indicator. - :type release_indicator: int - :param message_association_assigned_code: The message association assigned - code. - :type message_association_assigned_code: str - :param target_namespace: The target namespace on which this delimiter - settings has to be applied. - :type target_namespace: str - """ - - _validation = { - 'data_element_separator': {'required': True}, - 'component_separator': {'required': True}, - 'segment_terminator': {'required': True}, - 'repetition_separator': {'required': True}, - 'segment_terminator_suffix': {'required': True}, - 'decimal_point_indicator': {'required': True}, - 'release_indicator': {'required': True}, - } - - _attribute_map = { - 'message_id': {'key': 'messageId', 'type': 'str'}, - 'message_version': {'key': 'messageVersion', 'type': 'str'}, - 'message_release': {'key': 'messageRelease', 'type': 'str'}, - 'data_element_separator': {'key': 'dataElementSeparator', 'type': 'int'}, - 'component_separator': {'key': 'componentSeparator', 'type': 'int'}, - 'segment_terminator': {'key': 'segmentTerminator', 'type': 'int'}, - 'repetition_separator': {'key': 'repetitionSeparator', 'type': 'int'}, - 'segment_terminator_suffix': {'key': 'segmentTerminatorSuffix', 'type': 'SegmentTerminatorSuffix'}, - 'decimal_point_indicator': {'key': 'decimalPointIndicator', 'type': 'EdifactDecimalIndicator'}, - 'release_indicator': {'key': 'releaseIndicator', 'type': 'int'}, - 'message_association_assigned_code': {'key': 'messageAssociationAssignedCode', 'type': 'str'}, - 'target_namespace': {'key': 'targetNamespace', 'type': 'str'}, - } - - def __init__(self, *, data_element_separator: int, component_separator: int, segment_terminator: int, repetition_separator: int, segment_terminator_suffix, decimal_point_indicator, release_indicator: int, message_id: str=None, message_version: str=None, message_release: str=None, message_association_assigned_code: str=None, target_namespace: str=None, **kwargs) -> None: - super(EdifactDelimiterOverride, self).__init__(**kwargs) - self.message_id = message_id - self.message_version = message_version - self.message_release = message_release - self.data_element_separator = data_element_separator - self.component_separator = component_separator - self.segment_terminator = segment_terminator - self.repetition_separator = repetition_separator - self.segment_terminator_suffix = segment_terminator_suffix - self.decimal_point_indicator = decimal_point_indicator - self.release_indicator = release_indicator - self.message_association_assigned_code = message_association_assigned_code - self.target_namespace = target_namespace diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_override.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_override.py deleted file mode 100644 index 2b82b5560ed7..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_override.py +++ /dev/null @@ -1,89 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EdifactEnvelopeOverride(Model): - """The Edifact envelope override settings. - - :param message_id: The message id on which this envelope settings has to - be applied. - :type message_id: str - :param message_version: The message version on which this envelope - settings has to be applied. - :type message_version: str - :param message_release: The message release version on which this envelope - settings has to be applied. - :type message_release: str - :param message_association_assigned_code: The message association assigned - code. - :type message_association_assigned_code: str - :param target_namespace: The target namespace on which this envelope - settings has to be applied. - :type target_namespace: str - :param functional_group_id: The functional group id. - :type functional_group_id: str - :param sender_application_qualifier: The sender application qualifier. - :type sender_application_qualifier: str - :param sender_application_id: The sender application id. - :type sender_application_id: str - :param receiver_application_qualifier: The receiver application qualifier. - :type receiver_application_qualifier: str - :param receiver_application_id: The receiver application id. - :type receiver_application_id: str - :param controlling_agency_code: The controlling agency code. - :type controlling_agency_code: str - :param group_header_message_version: The group header message version. - :type group_header_message_version: str - :param group_header_message_release: The group header message release. - :type group_header_message_release: str - :param association_assigned_code: The association assigned code. - :type association_assigned_code: str - :param application_password: The application password. - :type application_password: str - """ - - _attribute_map = { - 'message_id': {'key': 'messageId', 'type': 'str'}, - 'message_version': {'key': 'messageVersion', 'type': 'str'}, - 'message_release': {'key': 'messageRelease', 'type': 'str'}, - 'message_association_assigned_code': {'key': 'messageAssociationAssignedCode', 'type': 'str'}, - 'target_namespace': {'key': 'targetNamespace', 'type': 'str'}, - 'functional_group_id': {'key': 'functionalGroupId', 'type': 'str'}, - 'sender_application_qualifier': {'key': 'senderApplicationQualifier', 'type': 'str'}, - 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, - 'receiver_application_qualifier': {'key': 'receiverApplicationQualifier', 'type': 'str'}, - 'receiver_application_id': {'key': 'receiverApplicationId', 'type': 'str'}, - 'controlling_agency_code': {'key': 'controllingAgencyCode', 'type': 'str'}, - 'group_header_message_version': {'key': 'groupHeaderMessageVersion', 'type': 'str'}, - 'group_header_message_release': {'key': 'groupHeaderMessageRelease', 'type': 'str'}, - 'association_assigned_code': {'key': 'associationAssignedCode', 'type': 'str'}, - 'application_password': {'key': 'applicationPassword', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EdifactEnvelopeOverride, self).__init__(**kwargs) - self.message_id = kwargs.get('message_id', None) - self.message_version = kwargs.get('message_version', None) - self.message_release = kwargs.get('message_release', None) - self.message_association_assigned_code = kwargs.get('message_association_assigned_code', None) - self.target_namespace = kwargs.get('target_namespace', None) - self.functional_group_id = kwargs.get('functional_group_id', None) - self.sender_application_qualifier = kwargs.get('sender_application_qualifier', None) - self.sender_application_id = kwargs.get('sender_application_id', None) - self.receiver_application_qualifier = kwargs.get('receiver_application_qualifier', None) - self.receiver_application_id = kwargs.get('receiver_application_id', None) - self.controlling_agency_code = kwargs.get('controlling_agency_code', None) - self.group_header_message_version = kwargs.get('group_header_message_version', None) - self.group_header_message_release = kwargs.get('group_header_message_release', None) - self.association_assigned_code = kwargs.get('association_assigned_code', None) - self.application_password = kwargs.get('application_password', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_override_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_override_py3.py deleted file mode 100644 index 77fed1d1e51e..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_override_py3.py +++ /dev/null @@ -1,89 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EdifactEnvelopeOverride(Model): - """The Edifact envelope override settings. - - :param message_id: The message id on which this envelope settings has to - be applied. - :type message_id: str - :param message_version: The message version on which this envelope - settings has to be applied. - :type message_version: str - :param message_release: The message release version on which this envelope - settings has to be applied. - :type message_release: str - :param message_association_assigned_code: The message association assigned - code. - :type message_association_assigned_code: str - :param target_namespace: The target namespace on which this envelope - settings has to be applied. - :type target_namespace: str - :param functional_group_id: The functional group id. - :type functional_group_id: str - :param sender_application_qualifier: The sender application qualifier. - :type sender_application_qualifier: str - :param sender_application_id: The sender application id. - :type sender_application_id: str - :param receiver_application_qualifier: The receiver application qualifier. - :type receiver_application_qualifier: str - :param receiver_application_id: The receiver application id. - :type receiver_application_id: str - :param controlling_agency_code: The controlling agency code. - :type controlling_agency_code: str - :param group_header_message_version: The group header message version. - :type group_header_message_version: str - :param group_header_message_release: The group header message release. - :type group_header_message_release: str - :param association_assigned_code: The association assigned code. - :type association_assigned_code: str - :param application_password: The application password. - :type application_password: str - """ - - _attribute_map = { - 'message_id': {'key': 'messageId', 'type': 'str'}, - 'message_version': {'key': 'messageVersion', 'type': 'str'}, - 'message_release': {'key': 'messageRelease', 'type': 'str'}, - 'message_association_assigned_code': {'key': 'messageAssociationAssignedCode', 'type': 'str'}, - 'target_namespace': {'key': 'targetNamespace', 'type': 'str'}, - 'functional_group_id': {'key': 'functionalGroupId', 'type': 'str'}, - 'sender_application_qualifier': {'key': 'senderApplicationQualifier', 'type': 'str'}, - 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, - 'receiver_application_qualifier': {'key': 'receiverApplicationQualifier', 'type': 'str'}, - 'receiver_application_id': {'key': 'receiverApplicationId', 'type': 'str'}, - 'controlling_agency_code': {'key': 'controllingAgencyCode', 'type': 'str'}, - 'group_header_message_version': {'key': 'groupHeaderMessageVersion', 'type': 'str'}, - 'group_header_message_release': {'key': 'groupHeaderMessageRelease', 'type': 'str'}, - 'association_assigned_code': {'key': 'associationAssignedCode', 'type': 'str'}, - 'application_password': {'key': 'applicationPassword', 'type': 'str'}, - } - - def __init__(self, *, message_id: str=None, message_version: str=None, message_release: str=None, message_association_assigned_code: str=None, target_namespace: str=None, functional_group_id: str=None, sender_application_qualifier: str=None, sender_application_id: str=None, receiver_application_qualifier: str=None, receiver_application_id: str=None, controlling_agency_code: str=None, group_header_message_version: str=None, group_header_message_release: str=None, association_assigned_code: str=None, application_password: str=None, **kwargs) -> None: - super(EdifactEnvelopeOverride, self).__init__(**kwargs) - self.message_id = message_id - self.message_version = message_version - self.message_release = message_release - self.message_association_assigned_code = message_association_assigned_code - self.target_namespace = target_namespace - self.functional_group_id = functional_group_id - self.sender_application_qualifier = sender_application_qualifier - self.sender_application_id = sender_application_id - self.receiver_application_qualifier = receiver_application_qualifier - self.receiver_application_id = receiver_application_id - self.controlling_agency_code = controlling_agency_code - self.group_header_message_version = group_header_message_version - self.group_header_message_release = group_header_message_release - self.association_assigned_code = association_assigned_code - self.application_password = application_password diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_settings.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_settings.py deleted file mode 100644 index 7ea218a53f18..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_settings.py +++ /dev/null @@ -1,235 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EdifactEnvelopeSettings(Model): - """The Edifact agreement envelope settings. - - All required parameters must be populated in order to send to Azure. - - :param group_association_assigned_code: The group association assigned - code. - :type group_association_assigned_code: str - :param communication_agreement_id: The communication agreement id. - :type communication_agreement_id: str - :param apply_delimiter_string_advice: Required. The value indicating - whether to apply delimiter string advice. - :type apply_delimiter_string_advice: bool - :param create_grouping_segments: Required. The value indicating whether to - create grouping segments. - :type create_grouping_segments: bool - :param enable_default_group_headers: Required. The value indicating - whether to enable default group headers. - :type enable_default_group_headers: bool - :param recipient_reference_password_value: The recipient reference - password value. - :type recipient_reference_password_value: str - :param recipient_reference_password_qualifier: The recipient reference - password qualifier. - :type recipient_reference_password_qualifier: str - :param application_reference_id: The application reference id. - :type application_reference_id: str - :param processing_priority_code: The processing priority code. - :type processing_priority_code: str - :param interchange_control_number_lower_bound: Required. The interchange - control number lower bound. - :type interchange_control_number_lower_bound: long - :param interchange_control_number_upper_bound: Required. The interchange - control number upper bound. - :type interchange_control_number_upper_bound: long - :param rollover_interchange_control_number: Required. The value indicating - whether to rollover interchange control number. - :type rollover_interchange_control_number: bool - :param interchange_control_number_prefix: The interchange control number - prefix. - :type interchange_control_number_prefix: str - :param interchange_control_number_suffix: The interchange control number - suffix. - :type interchange_control_number_suffix: str - :param sender_reverse_routing_address: The sender reverse routing address. - :type sender_reverse_routing_address: str - :param receiver_reverse_routing_address: The receiver reverse routing - address. - :type receiver_reverse_routing_address: str - :param functional_group_id: The functional group id. - :type functional_group_id: str - :param group_controlling_agency_code: The group controlling agency code. - :type group_controlling_agency_code: str - :param group_message_version: The group message version. - :type group_message_version: str - :param group_message_release: The group message release. - :type group_message_release: str - :param group_control_number_lower_bound: Required. The group control - number lower bound. - :type group_control_number_lower_bound: long - :param group_control_number_upper_bound: Required. The group control - number upper bound. - :type group_control_number_upper_bound: long - :param rollover_group_control_number: Required. The value indicating - whether to rollover group control number. - :type rollover_group_control_number: bool - :param group_control_number_prefix: The group control number prefix. - :type group_control_number_prefix: str - :param group_control_number_suffix: The group control number suffix. - :type group_control_number_suffix: str - :param group_application_receiver_qualifier: The group application - receiver qualifier. - :type group_application_receiver_qualifier: str - :param group_application_receiver_id: The group application receiver id. - :type group_application_receiver_id: str - :param group_application_sender_qualifier: The group application sender - qualifier. - :type group_application_sender_qualifier: str - :param group_application_sender_id: The group application sender id. - :type group_application_sender_id: str - :param group_application_password: The group application password. - :type group_application_password: str - :param overwrite_existing_transaction_set_control_number: Required. The - value indicating whether to overwrite existing transaction set control - number. - :type overwrite_existing_transaction_set_control_number: bool - :param transaction_set_control_number_prefix: The transaction set control - number prefix. - :type transaction_set_control_number_prefix: str - :param transaction_set_control_number_suffix: The transaction set control - number suffix. - :type transaction_set_control_number_suffix: str - :param transaction_set_control_number_lower_bound: Required. The - transaction set control number lower bound. - :type transaction_set_control_number_lower_bound: long - :param transaction_set_control_number_upper_bound: Required. The - transaction set control number upper bound. - :type transaction_set_control_number_upper_bound: long - :param rollover_transaction_set_control_number: Required. The value - indicating whether to rollover transaction set control number. - :type rollover_transaction_set_control_number: bool - :param is_test_interchange: Required. The value indicating whether the - message is a test interchange. - :type is_test_interchange: bool - :param sender_internal_identification: The sender internal identification. - :type sender_internal_identification: str - :param sender_internal_sub_identification: The sender internal sub - identification. - :type sender_internal_sub_identification: str - :param receiver_internal_identification: The receiver internal - identification. - :type receiver_internal_identification: str - :param receiver_internal_sub_identification: The receiver internal sub - identification. - :type receiver_internal_sub_identification: str - """ - - _validation = { - 'apply_delimiter_string_advice': {'required': True}, - 'create_grouping_segments': {'required': True}, - 'enable_default_group_headers': {'required': True}, - 'interchange_control_number_lower_bound': {'required': True}, - 'interchange_control_number_upper_bound': {'required': True}, - 'rollover_interchange_control_number': {'required': True}, - 'group_control_number_lower_bound': {'required': True}, - 'group_control_number_upper_bound': {'required': True}, - 'rollover_group_control_number': {'required': True}, - 'overwrite_existing_transaction_set_control_number': {'required': True}, - 'transaction_set_control_number_lower_bound': {'required': True}, - 'transaction_set_control_number_upper_bound': {'required': True}, - 'rollover_transaction_set_control_number': {'required': True}, - 'is_test_interchange': {'required': True}, - } - - _attribute_map = { - 'group_association_assigned_code': {'key': 'groupAssociationAssignedCode', 'type': 'str'}, - 'communication_agreement_id': {'key': 'communicationAgreementId', 'type': 'str'}, - 'apply_delimiter_string_advice': {'key': 'applyDelimiterStringAdvice', 'type': 'bool'}, - 'create_grouping_segments': {'key': 'createGroupingSegments', 'type': 'bool'}, - 'enable_default_group_headers': {'key': 'enableDefaultGroupHeaders', 'type': 'bool'}, - 'recipient_reference_password_value': {'key': 'recipientReferencePasswordValue', 'type': 'str'}, - 'recipient_reference_password_qualifier': {'key': 'recipientReferencePasswordQualifier', 'type': 'str'}, - 'application_reference_id': {'key': 'applicationReferenceId', 'type': 'str'}, - 'processing_priority_code': {'key': 'processingPriorityCode', 'type': 'str'}, - 'interchange_control_number_lower_bound': {'key': 'interchangeControlNumberLowerBound', 'type': 'long'}, - 'interchange_control_number_upper_bound': {'key': 'interchangeControlNumberUpperBound', 'type': 'long'}, - 'rollover_interchange_control_number': {'key': 'rolloverInterchangeControlNumber', 'type': 'bool'}, - 'interchange_control_number_prefix': {'key': 'interchangeControlNumberPrefix', 'type': 'str'}, - 'interchange_control_number_suffix': {'key': 'interchangeControlNumberSuffix', 'type': 'str'}, - 'sender_reverse_routing_address': {'key': 'senderReverseRoutingAddress', 'type': 'str'}, - 'receiver_reverse_routing_address': {'key': 'receiverReverseRoutingAddress', 'type': 'str'}, - 'functional_group_id': {'key': 'functionalGroupId', 'type': 'str'}, - 'group_controlling_agency_code': {'key': 'groupControllingAgencyCode', 'type': 'str'}, - 'group_message_version': {'key': 'groupMessageVersion', 'type': 'str'}, - 'group_message_release': {'key': 'groupMessageRelease', 'type': 'str'}, - 'group_control_number_lower_bound': {'key': 'groupControlNumberLowerBound', 'type': 'long'}, - 'group_control_number_upper_bound': {'key': 'groupControlNumberUpperBound', 'type': 'long'}, - 'rollover_group_control_number': {'key': 'rolloverGroupControlNumber', 'type': 'bool'}, - 'group_control_number_prefix': {'key': 'groupControlNumberPrefix', 'type': 'str'}, - 'group_control_number_suffix': {'key': 'groupControlNumberSuffix', 'type': 'str'}, - 'group_application_receiver_qualifier': {'key': 'groupApplicationReceiverQualifier', 'type': 'str'}, - 'group_application_receiver_id': {'key': 'groupApplicationReceiverId', 'type': 'str'}, - 'group_application_sender_qualifier': {'key': 'groupApplicationSenderQualifier', 'type': 'str'}, - 'group_application_sender_id': {'key': 'groupApplicationSenderId', 'type': 'str'}, - 'group_application_password': {'key': 'groupApplicationPassword', 'type': 'str'}, - 'overwrite_existing_transaction_set_control_number': {'key': 'overwriteExistingTransactionSetControlNumber', 'type': 'bool'}, - 'transaction_set_control_number_prefix': {'key': 'transactionSetControlNumberPrefix', 'type': 'str'}, - 'transaction_set_control_number_suffix': {'key': 'transactionSetControlNumberSuffix', 'type': 'str'}, - 'transaction_set_control_number_lower_bound': {'key': 'transactionSetControlNumberLowerBound', 'type': 'long'}, - 'transaction_set_control_number_upper_bound': {'key': 'transactionSetControlNumberUpperBound', 'type': 'long'}, - 'rollover_transaction_set_control_number': {'key': 'rolloverTransactionSetControlNumber', 'type': 'bool'}, - 'is_test_interchange': {'key': 'isTestInterchange', 'type': 'bool'}, - 'sender_internal_identification': {'key': 'senderInternalIdentification', 'type': 'str'}, - 'sender_internal_sub_identification': {'key': 'senderInternalSubIdentification', 'type': 'str'}, - 'receiver_internal_identification': {'key': 'receiverInternalIdentification', 'type': 'str'}, - 'receiver_internal_sub_identification': {'key': 'receiverInternalSubIdentification', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EdifactEnvelopeSettings, self).__init__(**kwargs) - self.group_association_assigned_code = kwargs.get('group_association_assigned_code', None) - self.communication_agreement_id = kwargs.get('communication_agreement_id', None) - self.apply_delimiter_string_advice = kwargs.get('apply_delimiter_string_advice', None) - self.create_grouping_segments = kwargs.get('create_grouping_segments', None) - self.enable_default_group_headers = kwargs.get('enable_default_group_headers', None) - self.recipient_reference_password_value = kwargs.get('recipient_reference_password_value', None) - self.recipient_reference_password_qualifier = kwargs.get('recipient_reference_password_qualifier', None) - self.application_reference_id = kwargs.get('application_reference_id', None) - self.processing_priority_code = kwargs.get('processing_priority_code', None) - self.interchange_control_number_lower_bound = kwargs.get('interchange_control_number_lower_bound', None) - self.interchange_control_number_upper_bound = kwargs.get('interchange_control_number_upper_bound', None) - self.rollover_interchange_control_number = kwargs.get('rollover_interchange_control_number', None) - self.interchange_control_number_prefix = kwargs.get('interchange_control_number_prefix', None) - self.interchange_control_number_suffix = kwargs.get('interchange_control_number_suffix', None) - self.sender_reverse_routing_address = kwargs.get('sender_reverse_routing_address', None) - self.receiver_reverse_routing_address = kwargs.get('receiver_reverse_routing_address', None) - self.functional_group_id = kwargs.get('functional_group_id', None) - self.group_controlling_agency_code = kwargs.get('group_controlling_agency_code', None) - self.group_message_version = kwargs.get('group_message_version', None) - self.group_message_release = kwargs.get('group_message_release', None) - self.group_control_number_lower_bound = kwargs.get('group_control_number_lower_bound', None) - self.group_control_number_upper_bound = kwargs.get('group_control_number_upper_bound', None) - self.rollover_group_control_number = kwargs.get('rollover_group_control_number', None) - self.group_control_number_prefix = kwargs.get('group_control_number_prefix', None) - self.group_control_number_suffix = kwargs.get('group_control_number_suffix', None) - self.group_application_receiver_qualifier = kwargs.get('group_application_receiver_qualifier', None) - self.group_application_receiver_id = kwargs.get('group_application_receiver_id', None) - self.group_application_sender_qualifier = kwargs.get('group_application_sender_qualifier', None) - self.group_application_sender_id = kwargs.get('group_application_sender_id', None) - self.group_application_password = kwargs.get('group_application_password', None) - self.overwrite_existing_transaction_set_control_number = kwargs.get('overwrite_existing_transaction_set_control_number', None) - self.transaction_set_control_number_prefix = kwargs.get('transaction_set_control_number_prefix', None) - self.transaction_set_control_number_suffix = kwargs.get('transaction_set_control_number_suffix', None) - self.transaction_set_control_number_lower_bound = kwargs.get('transaction_set_control_number_lower_bound', None) - self.transaction_set_control_number_upper_bound = kwargs.get('transaction_set_control_number_upper_bound', None) - self.rollover_transaction_set_control_number = kwargs.get('rollover_transaction_set_control_number', None) - self.is_test_interchange = kwargs.get('is_test_interchange', None) - self.sender_internal_identification = kwargs.get('sender_internal_identification', None) - self.sender_internal_sub_identification = kwargs.get('sender_internal_sub_identification', None) - self.receiver_internal_identification = kwargs.get('receiver_internal_identification', None) - self.receiver_internal_sub_identification = kwargs.get('receiver_internal_sub_identification', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_settings_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_settings_py3.py deleted file mode 100644 index 9c771ca5150f..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_settings_py3.py +++ /dev/null @@ -1,235 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EdifactEnvelopeSettings(Model): - """The Edifact agreement envelope settings. - - All required parameters must be populated in order to send to Azure. - - :param group_association_assigned_code: The group association assigned - code. - :type group_association_assigned_code: str - :param communication_agreement_id: The communication agreement id. - :type communication_agreement_id: str - :param apply_delimiter_string_advice: Required. The value indicating - whether to apply delimiter string advice. - :type apply_delimiter_string_advice: bool - :param create_grouping_segments: Required. The value indicating whether to - create grouping segments. - :type create_grouping_segments: bool - :param enable_default_group_headers: Required. The value indicating - whether to enable default group headers. - :type enable_default_group_headers: bool - :param recipient_reference_password_value: The recipient reference - password value. - :type recipient_reference_password_value: str - :param recipient_reference_password_qualifier: The recipient reference - password qualifier. - :type recipient_reference_password_qualifier: str - :param application_reference_id: The application reference id. - :type application_reference_id: str - :param processing_priority_code: The processing priority code. - :type processing_priority_code: str - :param interchange_control_number_lower_bound: Required. The interchange - control number lower bound. - :type interchange_control_number_lower_bound: long - :param interchange_control_number_upper_bound: Required. The interchange - control number upper bound. - :type interchange_control_number_upper_bound: long - :param rollover_interchange_control_number: Required. The value indicating - whether to rollover interchange control number. - :type rollover_interchange_control_number: bool - :param interchange_control_number_prefix: The interchange control number - prefix. - :type interchange_control_number_prefix: str - :param interchange_control_number_suffix: The interchange control number - suffix. - :type interchange_control_number_suffix: str - :param sender_reverse_routing_address: The sender reverse routing address. - :type sender_reverse_routing_address: str - :param receiver_reverse_routing_address: The receiver reverse routing - address. - :type receiver_reverse_routing_address: str - :param functional_group_id: The functional group id. - :type functional_group_id: str - :param group_controlling_agency_code: The group controlling agency code. - :type group_controlling_agency_code: str - :param group_message_version: The group message version. - :type group_message_version: str - :param group_message_release: The group message release. - :type group_message_release: str - :param group_control_number_lower_bound: Required. The group control - number lower bound. - :type group_control_number_lower_bound: long - :param group_control_number_upper_bound: Required. The group control - number upper bound. - :type group_control_number_upper_bound: long - :param rollover_group_control_number: Required. The value indicating - whether to rollover group control number. - :type rollover_group_control_number: bool - :param group_control_number_prefix: The group control number prefix. - :type group_control_number_prefix: str - :param group_control_number_suffix: The group control number suffix. - :type group_control_number_suffix: str - :param group_application_receiver_qualifier: The group application - receiver qualifier. - :type group_application_receiver_qualifier: str - :param group_application_receiver_id: The group application receiver id. - :type group_application_receiver_id: str - :param group_application_sender_qualifier: The group application sender - qualifier. - :type group_application_sender_qualifier: str - :param group_application_sender_id: The group application sender id. - :type group_application_sender_id: str - :param group_application_password: The group application password. - :type group_application_password: str - :param overwrite_existing_transaction_set_control_number: Required. The - value indicating whether to overwrite existing transaction set control - number. - :type overwrite_existing_transaction_set_control_number: bool - :param transaction_set_control_number_prefix: The transaction set control - number prefix. - :type transaction_set_control_number_prefix: str - :param transaction_set_control_number_suffix: The transaction set control - number suffix. - :type transaction_set_control_number_suffix: str - :param transaction_set_control_number_lower_bound: Required. The - transaction set control number lower bound. - :type transaction_set_control_number_lower_bound: long - :param transaction_set_control_number_upper_bound: Required. The - transaction set control number upper bound. - :type transaction_set_control_number_upper_bound: long - :param rollover_transaction_set_control_number: Required. The value - indicating whether to rollover transaction set control number. - :type rollover_transaction_set_control_number: bool - :param is_test_interchange: Required. The value indicating whether the - message is a test interchange. - :type is_test_interchange: bool - :param sender_internal_identification: The sender internal identification. - :type sender_internal_identification: str - :param sender_internal_sub_identification: The sender internal sub - identification. - :type sender_internal_sub_identification: str - :param receiver_internal_identification: The receiver internal - identification. - :type receiver_internal_identification: str - :param receiver_internal_sub_identification: The receiver internal sub - identification. - :type receiver_internal_sub_identification: str - """ - - _validation = { - 'apply_delimiter_string_advice': {'required': True}, - 'create_grouping_segments': {'required': True}, - 'enable_default_group_headers': {'required': True}, - 'interchange_control_number_lower_bound': {'required': True}, - 'interchange_control_number_upper_bound': {'required': True}, - 'rollover_interchange_control_number': {'required': True}, - 'group_control_number_lower_bound': {'required': True}, - 'group_control_number_upper_bound': {'required': True}, - 'rollover_group_control_number': {'required': True}, - 'overwrite_existing_transaction_set_control_number': {'required': True}, - 'transaction_set_control_number_lower_bound': {'required': True}, - 'transaction_set_control_number_upper_bound': {'required': True}, - 'rollover_transaction_set_control_number': {'required': True}, - 'is_test_interchange': {'required': True}, - } - - _attribute_map = { - 'group_association_assigned_code': {'key': 'groupAssociationAssignedCode', 'type': 'str'}, - 'communication_agreement_id': {'key': 'communicationAgreementId', 'type': 'str'}, - 'apply_delimiter_string_advice': {'key': 'applyDelimiterStringAdvice', 'type': 'bool'}, - 'create_grouping_segments': {'key': 'createGroupingSegments', 'type': 'bool'}, - 'enable_default_group_headers': {'key': 'enableDefaultGroupHeaders', 'type': 'bool'}, - 'recipient_reference_password_value': {'key': 'recipientReferencePasswordValue', 'type': 'str'}, - 'recipient_reference_password_qualifier': {'key': 'recipientReferencePasswordQualifier', 'type': 'str'}, - 'application_reference_id': {'key': 'applicationReferenceId', 'type': 'str'}, - 'processing_priority_code': {'key': 'processingPriorityCode', 'type': 'str'}, - 'interchange_control_number_lower_bound': {'key': 'interchangeControlNumberLowerBound', 'type': 'long'}, - 'interchange_control_number_upper_bound': {'key': 'interchangeControlNumberUpperBound', 'type': 'long'}, - 'rollover_interchange_control_number': {'key': 'rolloverInterchangeControlNumber', 'type': 'bool'}, - 'interchange_control_number_prefix': {'key': 'interchangeControlNumberPrefix', 'type': 'str'}, - 'interchange_control_number_suffix': {'key': 'interchangeControlNumberSuffix', 'type': 'str'}, - 'sender_reverse_routing_address': {'key': 'senderReverseRoutingAddress', 'type': 'str'}, - 'receiver_reverse_routing_address': {'key': 'receiverReverseRoutingAddress', 'type': 'str'}, - 'functional_group_id': {'key': 'functionalGroupId', 'type': 'str'}, - 'group_controlling_agency_code': {'key': 'groupControllingAgencyCode', 'type': 'str'}, - 'group_message_version': {'key': 'groupMessageVersion', 'type': 'str'}, - 'group_message_release': {'key': 'groupMessageRelease', 'type': 'str'}, - 'group_control_number_lower_bound': {'key': 'groupControlNumberLowerBound', 'type': 'long'}, - 'group_control_number_upper_bound': {'key': 'groupControlNumberUpperBound', 'type': 'long'}, - 'rollover_group_control_number': {'key': 'rolloverGroupControlNumber', 'type': 'bool'}, - 'group_control_number_prefix': {'key': 'groupControlNumberPrefix', 'type': 'str'}, - 'group_control_number_suffix': {'key': 'groupControlNumberSuffix', 'type': 'str'}, - 'group_application_receiver_qualifier': {'key': 'groupApplicationReceiverQualifier', 'type': 'str'}, - 'group_application_receiver_id': {'key': 'groupApplicationReceiverId', 'type': 'str'}, - 'group_application_sender_qualifier': {'key': 'groupApplicationSenderQualifier', 'type': 'str'}, - 'group_application_sender_id': {'key': 'groupApplicationSenderId', 'type': 'str'}, - 'group_application_password': {'key': 'groupApplicationPassword', 'type': 'str'}, - 'overwrite_existing_transaction_set_control_number': {'key': 'overwriteExistingTransactionSetControlNumber', 'type': 'bool'}, - 'transaction_set_control_number_prefix': {'key': 'transactionSetControlNumberPrefix', 'type': 'str'}, - 'transaction_set_control_number_suffix': {'key': 'transactionSetControlNumberSuffix', 'type': 'str'}, - 'transaction_set_control_number_lower_bound': {'key': 'transactionSetControlNumberLowerBound', 'type': 'long'}, - 'transaction_set_control_number_upper_bound': {'key': 'transactionSetControlNumberUpperBound', 'type': 'long'}, - 'rollover_transaction_set_control_number': {'key': 'rolloverTransactionSetControlNumber', 'type': 'bool'}, - 'is_test_interchange': {'key': 'isTestInterchange', 'type': 'bool'}, - 'sender_internal_identification': {'key': 'senderInternalIdentification', 'type': 'str'}, - 'sender_internal_sub_identification': {'key': 'senderInternalSubIdentification', 'type': 'str'}, - 'receiver_internal_identification': {'key': 'receiverInternalIdentification', 'type': 'str'}, - 'receiver_internal_sub_identification': {'key': 'receiverInternalSubIdentification', 'type': 'str'}, - } - - def __init__(self, *, apply_delimiter_string_advice: bool, create_grouping_segments: bool, enable_default_group_headers: bool, interchange_control_number_lower_bound: int, interchange_control_number_upper_bound: int, rollover_interchange_control_number: bool, group_control_number_lower_bound: int, group_control_number_upper_bound: int, rollover_group_control_number: bool, overwrite_existing_transaction_set_control_number: bool, transaction_set_control_number_lower_bound: int, transaction_set_control_number_upper_bound: int, rollover_transaction_set_control_number: bool, is_test_interchange: bool, group_association_assigned_code: str=None, communication_agreement_id: str=None, recipient_reference_password_value: str=None, recipient_reference_password_qualifier: str=None, application_reference_id: str=None, processing_priority_code: str=None, interchange_control_number_prefix: str=None, interchange_control_number_suffix: str=None, sender_reverse_routing_address: str=None, receiver_reverse_routing_address: str=None, functional_group_id: str=None, group_controlling_agency_code: str=None, group_message_version: str=None, group_message_release: str=None, group_control_number_prefix: str=None, group_control_number_suffix: str=None, group_application_receiver_qualifier: str=None, group_application_receiver_id: str=None, group_application_sender_qualifier: str=None, group_application_sender_id: str=None, group_application_password: str=None, transaction_set_control_number_prefix: str=None, transaction_set_control_number_suffix: str=None, sender_internal_identification: str=None, sender_internal_sub_identification: str=None, receiver_internal_identification: str=None, receiver_internal_sub_identification: str=None, **kwargs) -> None: - super(EdifactEnvelopeSettings, self).__init__(**kwargs) - self.group_association_assigned_code = group_association_assigned_code - self.communication_agreement_id = communication_agreement_id - self.apply_delimiter_string_advice = apply_delimiter_string_advice - self.create_grouping_segments = create_grouping_segments - self.enable_default_group_headers = enable_default_group_headers - self.recipient_reference_password_value = recipient_reference_password_value - self.recipient_reference_password_qualifier = recipient_reference_password_qualifier - self.application_reference_id = application_reference_id - self.processing_priority_code = processing_priority_code - self.interchange_control_number_lower_bound = interchange_control_number_lower_bound - self.interchange_control_number_upper_bound = interchange_control_number_upper_bound - self.rollover_interchange_control_number = rollover_interchange_control_number - self.interchange_control_number_prefix = interchange_control_number_prefix - self.interchange_control_number_suffix = interchange_control_number_suffix - self.sender_reverse_routing_address = sender_reverse_routing_address - self.receiver_reverse_routing_address = receiver_reverse_routing_address - self.functional_group_id = functional_group_id - self.group_controlling_agency_code = group_controlling_agency_code - self.group_message_version = group_message_version - self.group_message_release = group_message_release - self.group_control_number_lower_bound = group_control_number_lower_bound - self.group_control_number_upper_bound = group_control_number_upper_bound - self.rollover_group_control_number = rollover_group_control_number - self.group_control_number_prefix = group_control_number_prefix - self.group_control_number_suffix = group_control_number_suffix - self.group_application_receiver_qualifier = group_application_receiver_qualifier - self.group_application_receiver_id = group_application_receiver_id - self.group_application_sender_qualifier = group_application_sender_qualifier - self.group_application_sender_id = group_application_sender_id - self.group_application_password = group_application_password - self.overwrite_existing_transaction_set_control_number = overwrite_existing_transaction_set_control_number - self.transaction_set_control_number_prefix = transaction_set_control_number_prefix - self.transaction_set_control_number_suffix = transaction_set_control_number_suffix - self.transaction_set_control_number_lower_bound = transaction_set_control_number_lower_bound - self.transaction_set_control_number_upper_bound = transaction_set_control_number_upper_bound - self.rollover_transaction_set_control_number = rollover_transaction_set_control_number - self.is_test_interchange = is_test_interchange - self.sender_internal_identification = sender_internal_identification - self.sender_internal_sub_identification = sender_internal_sub_identification - self.receiver_internal_identification = receiver_internal_identification - self.receiver_internal_sub_identification = receiver_internal_sub_identification diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_framing_settings.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_framing_settings.py deleted file mode 100644 index 07795e620caf..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_framing_settings.py +++ /dev/null @@ -1,92 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EdifactFramingSettings(Model): - """The Edifact agreement framing settings. - - All required parameters must be populated in order to send to Azure. - - :param service_code_list_directory_version: The service code list - directory version. - :type service_code_list_directory_version: str - :param character_encoding: The character encoding. - :type character_encoding: str - :param protocol_version: Required. The protocol version. - :type protocol_version: int - :param data_element_separator: Required. The data element separator. - :type data_element_separator: int - :param component_separator: Required. The component separator. - :type component_separator: int - :param segment_terminator: Required. The segment terminator. - :type segment_terminator: int - :param release_indicator: Required. The release indicator. - :type release_indicator: int - :param repetition_separator: Required. The repetition separator. - :type repetition_separator: int - :param character_set: Required. The EDIFACT frame setting characterSet. - Possible values include: 'NotSpecified', 'UNOB', 'UNOA', 'UNOC', 'UNOD', - 'UNOE', 'UNOF', 'UNOG', 'UNOH', 'UNOI', 'UNOJ', 'UNOK', 'UNOX', 'UNOY', - 'KECA' - :type character_set: str or ~azure.mgmt.logic.models.EdifactCharacterSet - :param decimal_point_indicator: Required. The EDIFACT frame setting - decimal indicator. Possible values include: 'NotSpecified', 'Comma', - 'Decimal' - :type decimal_point_indicator: str or - ~azure.mgmt.logic.models.EdifactDecimalIndicator - :param segment_terminator_suffix: Required. The EDIFACT frame setting - segment terminator suffix. Possible values include: 'NotSpecified', - 'None', 'CR', 'LF', 'CRLF' - :type segment_terminator_suffix: str or - ~azure.mgmt.logic.models.SegmentTerminatorSuffix - """ - - _validation = { - 'protocol_version': {'required': True}, - 'data_element_separator': {'required': True}, - 'component_separator': {'required': True}, - 'segment_terminator': {'required': True}, - 'release_indicator': {'required': True}, - 'repetition_separator': {'required': True}, - 'character_set': {'required': True}, - 'decimal_point_indicator': {'required': True}, - 'segment_terminator_suffix': {'required': True}, - } - - _attribute_map = { - 'service_code_list_directory_version': {'key': 'serviceCodeListDirectoryVersion', 'type': 'str'}, - 'character_encoding': {'key': 'characterEncoding', 'type': 'str'}, - 'protocol_version': {'key': 'protocolVersion', 'type': 'int'}, - 'data_element_separator': {'key': 'dataElementSeparator', 'type': 'int'}, - 'component_separator': {'key': 'componentSeparator', 'type': 'int'}, - 'segment_terminator': {'key': 'segmentTerminator', 'type': 'int'}, - 'release_indicator': {'key': 'releaseIndicator', 'type': 'int'}, - 'repetition_separator': {'key': 'repetitionSeparator', 'type': 'int'}, - 'character_set': {'key': 'characterSet', 'type': 'str'}, - 'decimal_point_indicator': {'key': 'decimalPointIndicator', 'type': 'EdifactDecimalIndicator'}, - 'segment_terminator_suffix': {'key': 'segmentTerminatorSuffix', 'type': 'SegmentTerminatorSuffix'}, - } - - def __init__(self, **kwargs): - super(EdifactFramingSettings, self).__init__(**kwargs) - self.service_code_list_directory_version = kwargs.get('service_code_list_directory_version', None) - self.character_encoding = kwargs.get('character_encoding', None) - self.protocol_version = kwargs.get('protocol_version', None) - self.data_element_separator = kwargs.get('data_element_separator', None) - self.component_separator = kwargs.get('component_separator', None) - self.segment_terminator = kwargs.get('segment_terminator', None) - self.release_indicator = kwargs.get('release_indicator', None) - self.repetition_separator = kwargs.get('repetition_separator', None) - self.character_set = kwargs.get('character_set', None) - self.decimal_point_indicator = kwargs.get('decimal_point_indicator', None) - self.segment_terminator_suffix = kwargs.get('segment_terminator_suffix', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_framing_settings_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_framing_settings_py3.py deleted file mode 100644 index f7b668535545..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_framing_settings_py3.py +++ /dev/null @@ -1,92 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EdifactFramingSettings(Model): - """The Edifact agreement framing settings. - - All required parameters must be populated in order to send to Azure. - - :param service_code_list_directory_version: The service code list - directory version. - :type service_code_list_directory_version: str - :param character_encoding: The character encoding. - :type character_encoding: str - :param protocol_version: Required. The protocol version. - :type protocol_version: int - :param data_element_separator: Required. The data element separator. - :type data_element_separator: int - :param component_separator: Required. The component separator. - :type component_separator: int - :param segment_terminator: Required. The segment terminator. - :type segment_terminator: int - :param release_indicator: Required. The release indicator. - :type release_indicator: int - :param repetition_separator: Required. The repetition separator. - :type repetition_separator: int - :param character_set: Required. The EDIFACT frame setting characterSet. - Possible values include: 'NotSpecified', 'UNOB', 'UNOA', 'UNOC', 'UNOD', - 'UNOE', 'UNOF', 'UNOG', 'UNOH', 'UNOI', 'UNOJ', 'UNOK', 'UNOX', 'UNOY', - 'KECA' - :type character_set: str or ~azure.mgmt.logic.models.EdifactCharacterSet - :param decimal_point_indicator: Required. The EDIFACT frame setting - decimal indicator. Possible values include: 'NotSpecified', 'Comma', - 'Decimal' - :type decimal_point_indicator: str or - ~azure.mgmt.logic.models.EdifactDecimalIndicator - :param segment_terminator_suffix: Required. The EDIFACT frame setting - segment terminator suffix. Possible values include: 'NotSpecified', - 'None', 'CR', 'LF', 'CRLF' - :type segment_terminator_suffix: str or - ~azure.mgmt.logic.models.SegmentTerminatorSuffix - """ - - _validation = { - 'protocol_version': {'required': True}, - 'data_element_separator': {'required': True}, - 'component_separator': {'required': True}, - 'segment_terminator': {'required': True}, - 'release_indicator': {'required': True}, - 'repetition_separator': {'required': True}, - 'character_set': {'required': True}, - 'decimal_point_indicator': {'required': True}, - 'segment_terminator_suffix': {'required': True}, - } - - _attribute_map = { - 'service_code_list_directory_version': {'key': 'serviceCodeListDirectoryVersion', 'type': 'str'}, - 'character_encoding': {'key': 'characterEncoding', 'type': 'str'}, - 'protocol_version': {'key': 'protocolVersion', 'type': 'int'}, - 'data_element_separator': {'key': 'dataElementSeparator', 'type': 'int'}, - 'component_separator': {'key': 'componentSeparator', 'type': 'int'}, - 'segment_terminator': {'key': 'segmentTerminator', 'type': 'int'}, - 'release_indicator': {'key': 'releaseIndicator', 'type': 'int'}, - 'repetition_separator': {'key': 'repetitionSeparator', 'type': 'int'}, - 'character_set': {'key': 'characterSet', 'type': 'str'}, - 'decimal_point_indicator': {'key': 'decimalPointIndicator', 'type': 'EdifactDecimalIndicator'}, - 'segment_terminator_suffix': {'key': 'segmentTerminatorSuffix', 'type': 'SegmentTerminatorSuffix'}, - } - - def __init__(self, *, protocol_version: int, data_element_separator: int, component_separator: int, segment_terminator: int, release_indicator: int, repetition_separator: int, character_set, decimal_point_indicator, segment_terminator_suffix, service_code_list_directory_version: str=None, character_encoding: str=None, **kwargs) -> None: - super(EdifactFramingSettings, self).__init__(**kwargs) - self.service_code_list_directory_version = service_code_list_directory_version - self.character_encoding = character_encoding - self.protocol_version = protocol_version - self.data_element_separator = data_element_separator - self.component_separator = component_separator - self.segment_terminator = segment_terminator - self.release_indicator = release_indicator - self.repetition_separator = repetition_separator - self.character_set = character_set - self.decimal_point_indicator = decimal_point_indicator - self.segment_terminator_suffix = segment_terminator_suffix diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_filter.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_filter.py deleted file mode 100644 index ba86f0922a69..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_filter.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EdifactMessageFilter(Model): - """The Edifact message filter for odata query. - - All required parameters must be populated in order to send to Azure. - - :param message_filter_type: Required. The message filter type. Possible - values include: 'NotSpecified', 'Include', 'Exclude' - :type message_filter_type: str or - ~azure.mgmt.logic.models.MessageFilterType - """ - - _validation = { - 'message_filter_type': {'required': True}, - } - - _attribute_map = { - 'message_filter_type': {'key': 'messageFilterType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EdifactMessageFilter, self).__init__(**kwargs) - self.message_filter_type = kwargs.get('message_filter_type', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_filter_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_filter_py3.py deleted file mode 100644 index c4fc6fa62117..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_filter_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EdifactMessageFilter(Model): - """The Edifact message filter for odata query. - - All required parameters must be populated in order to send to Azure. - - :param message_filter_type: Required. The message filter type. Possible - values include: 'NotSpecified', 'Include', 'Exclude' - :type message_filter_type: str or - ~azure.mgmt.logic.models.MessageFilterType - """ - - _validation = { - 'message_filter_type': {'required': True}, - } - - _attribute_map = { - 'message_filter_type': {'key': 'messageFilterType', 'type': 'str'}, - } - - def __init__(self, *, message_filter_type, **kwargs) -> None: - super(EdifactMessageFilter, self).__init__(**kwargs) - self.message_filter_type = message_filter_type diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_identifier.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_identifier.py deleted file mode 100644 index 1aac0d7f82cc..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_identifier.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EdifactMessageIdentifier(Model): - """The Edifact message identifier. - - All required parameters must be populated in order to send to Azure. - - :param message_id: Required. The message id on which this envelope - settings has to be applied. - :type message_id: str - """ - - _validation = { - 'message_id': {'required': True}, - } - - _attribute_map = { - 'message_id': {'key': 'messageId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EdifactMessageIdentifier, self).__init__(**kwargs) - self.message_id = kwargs.get('message_id', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_identifier_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_identifier_py3.py deleted file mode 100644 index 022f6017ace9..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_identifier_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EdifactMessageIdentifier(Model): - """The Edifact message identifier. - - All required parameters must be populated in order to send to Azure. - - :param message_id: Required. The message id on which this envelope - settings has to be applied. - :type message_id: str - """ - - _validation = { - 'message_id': {'required': True}, - } - - _attribute_map = { - 'message_id': {'key': 'messageId', 'type': 'str'}, - } - - def __init__(self, *, message_id: str, **kwargs) -> None: - super(EdifactMessageIdentifier, self).__init__(**kwargs) - self.message_id = message_id diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_one_way_agreement.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_one_way_agreement.py deleted file mode 100644 index f5e2e18b2562..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_one_way_agreement.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EdifactOneWayAgreement(Model): - """The Edifact one way agreement. - - All required parameters must be populated in order to send to Azure. - - :param sender_business_identity: Required. The sender business identity - :type sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity - :param receiver_business_identity: Required. The receiver business - identity - :type receiver_business_identity: - ~azure.mgmt.logic.models.BusinessIdentity - :param protocol_settings: Required. The EDIFACT protocol settings. - :type protocol_settings: ~azure.mgmt.logic.models.EdifactProtocolSettings - """ - - _validation = { - 'sender_business_identity': {'required': True}, - 'receiver_business_identity': {'required': True}, - 'protocol_settings': {'required': True}, - } - - _attribute_map = { - 'sender_business_identity': {'key': 'senderBusinessIdentity', 'type': 'BusinessIdentity'}, - 'receiver_business_identity': {'key': 'receiverBusinessIdentity', 'type': 'BusinessIdentity'}, - 'protocol_settings': {'key': 'protocolSettings', 'type': 'EdifactProtocolSettings'}, - } - - def __init__(self, **kwargs): - super(EdifactOneWayAgreement, self).__init__(**kwargs) - self.sender_business_identity = kwargs.get('sender_business_identity', None) - self.receiver_business_identity = kwargs.get('receiver_business_identity', None) - self.protocol_settings = kwargs.get('protocol_settings', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_one_way_agreement_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_one_way_agreement_py3.py deleted file mode 100644 index 81fbd5025ec9..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_one_way_agreement_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EdifactOneWayAgreement(Model): - """The Edifact one way agreement. - - All required parameters must be populated in order to send to Azure. - - :param sender_business_identity: Required. The sender business identity - :type sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity - :param receiver_business_identity: Required. The receiver business - identity - :type receiver_business_identity: - ~azure.mgmt.logic.models.BusinessIdentity - :param protocol_settings: Required. The EDIFACT protocol settings. - :type protocol_settings: ~azure.mgmt.logic.models.EdifactProtocolSettings - """ - - _validation = { - 'sender_business_identity': {'required': True}, - 'receiver_business_identity': {'required': True}, - 'protocol_settings': {'required': True}, - } - - _attribute_map = { - 'sender_business_identity': {'key': 'senderBusinessIdentity', 'type': 'BusinessIdentity'}, - 'receiver_business_identity': {'key': 'receiverBusinessIdentity', 'type': 'BusinessIdentity'}, - 'protocol_settings': {'key': 'protocolSettings', 'type': 'EdifactProtocolSettings'}, - } - - def __init__(self, *, sender_business_identity, receiver_business_identity, protocol_settings, **kwargs) -> None: - super(EdifactOneWayAgreement, self).__init__(**kwargs) - self.sender_business_identity = sender_business_identity - self.receiver_business_identity = receiver_business_identity - self.protocol_settings = protocol_settings diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_processing_settings.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_processing_settings.py deleted file mode 100644 index c1ee11a2f226..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_processing_settings.py +++ /dev/null @@ -1,59 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EdifactProcessingSettings(Model): - """The Edifact agreement protocol settings. - - All required parameters must be populated in order to send to Azure. - - :param mask_security_info: Required. The value indicating whether to mask - security information. - :type mask_security_info: bool - :param preserve_interchange: Required. The value indicating whether to - preserve interchange. - :type preserve_interchange: bool - :param suspend_interchange_on_error: Required. The value indicating - whether to suspend interchange on error. - :type suspend_interchange_on_error: bool - :param create_empty_xml_tags_for_trailing_separators: Required. The value - indicating whether to create empty xml tags for trailing separators. - :type create_empty_xml_tags_for_trailing_separators: bool - :param use_dot_as_decimal_separator: Required. The value indicating - whether to use dot as decimal separator. - :type use_dot_as_decimal_separator: bool - """ - - _validation = { - 'mask_security_info': {'required': True}, - 'preserve_interchange': {'required': True}, - 'suspend_interchange_on_error': {'required': True}, - 'create_empty_xml_tags_for_trailing_separators': {'required': True}, - 'use_dot_as_decimal_separator': {'required': True}, - } - - _attribute_map = { - 'mask_security_info': {'key': 'maskSecurityInfo', 'type': 'bool'}, - 'preserve_interchange': {'key': 'preserveInterchange', 'type': 'bool'}, - 'suspend_interchange_on_error': {'key': 'suspendInterchangeOnError', 'type': 'bool'}, - 'create_empty_xml_tags_for_trailing_separators': {'key': 'createEmptyXmlTagsForTrailingSeparators', 'type': 'bool'}, - 'use_dot_as_decimal_separator': {'key': 'useDotAsDecimalSeparator', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(EdifactProcessingSettings, self).__init__(**kwargs) - self.mask_security_info = kwargs.get('mask_security_info', None) - self.preserve_interchange = kwargs.get('preserve_interchange', None) - self.suspend_interchange_on_error = kwargs.get('suspend_interchange_on_error', None) - self.create_empty_xml_tags_for_trailing_separators = kwargs.get('create_empty_xml_tags_for_trailing_separators', None) - self.use_dot_as_decimal_separator = kwargs.get('use_dot_as_decimal_separator', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_processing_settings_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_processing_settings_py3.py deleted file mode 100644 index 5beb418ea9c9..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_processing_settings_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EdifactProcessingSettings(Model): - """The Edifact agreement protocol settings. - - All required parameters must be populated in order to send to Azure. - - :param mask_security_info: Required. The value indicating whether to mask - security information. - :type mask_security_info: bool - :param preserve_interchange: Required. The value indicating whether to - preserve interchange. - :type preserve_interchange: bool - :param suspend_interchange_on_error: Required. The value indicating - whether to suspend interchange on error. - :type suspend_interchange_on_error: bool - :param create_empty_xml_tags_for_trailing_separators: Required. The value - indicating whether to create empty xml tags for trailing separators. - :type create_empty_xml_tags_for_trailing_separators: bool - :param use_dot_as_decimal_separator: Required. The value indicating - whether to use dot as decimal separator. - :type use_dot_as_decimal_separator: bool - """ - - _validation = { - 'mask_security_info': {'required': True}, - 'preserve_interchange': {'required': True}, - 'suspend_interchange_on_error': {'required': True}, - 'create_empty_xml_tags_for_trailing_separators': {'required': True}, - 'use_dot_as_decimal_separator': {'required': True}, - } - - _attribute_map = { - 'mask_security_info': {'key': 'maskSecurityInfo', 'type': 'bool'}, - 'preserve_interchange': {'key': 'preserveInterchange', 'type': 'bool'}, - 'suspend_interchange_on_error': {'key': 'suspendInterchangeOnError', 'type': 'bool'}, - 'create_empty_xml_tags_for_trailing_separators': {'key': 'createEmptyXmlTagsForTrailingSeparators', 'type': 'bool'}, - 'use_dot_as_decimal_separator': {'key': 'useDotAsDecimalSeparator', 'type': 'bool'}, - } - - def __init__(self, *, mask_security_info: bool, preserve_interchange: bool, suspend_interchange_on_error: bool, create_empty_xml_tags_for_trailing_separators: bool, use_dot_as_decimal_separator: bool, **kwargs) -> None: - super(EdifactProcessingSettings, self).__init__(**kwargs) - self.mask_security_info = mask_security_info - self.preserve_interchange = preserve_interchange - self.suspend_interchange_on_error = suspend_interchange_on_error - self.create_empty_xml_tags_for_trailing_separators = create_empty_xml_tags_for_trailing_separators - self.use_dot_as_decimal_separator = use_dot_as_decimal_separator diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_protocol_settings.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_protocol_settings.py deleted file mode 100644 index e61786f11f26..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_protocol_settings.py +++ /dev/null @@ -1,90 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EdifactProtocolSettings(Model): - """The Edifact agreement protocol settings. - - All required parameters must be populated in order to send to Azure. - - :param validation_settings: Required. The EDIFACT validation settings. - :type validation_settings: - ~azure.mgmt.logic.models.EdifactValidationSettings - :param framing_settings: Required. The EDIFACT framing settings. - :type framing_settings: ~azure.mgmt.logic.models.EdifactFramingSettings - :param envelope_settings: Required. The EDIFACT envelope settings. - :type envelope_settings: ~azure.mgmt.logic.models.EdifactEnvelopeSettings - :param acknowledgement_settings: Required. The EDIFACT acknowledgement - settings. - :type acknowledgement_settings: - ~azure.mgmt.logic.models.EdifactAcknowledgementSettings - :param message_filter: Required. The EDIFACT message filter. - :type message_filter: ~azure.mgmt.logic.models.EdifactMessageFilter - :param processing_settings: Required. The EDIFACT processing Settings. - :type processing_settings: - ~azure.mgmt.logic.models.EdifactProcessingSettings - :param envelope_overrides: The EDIFACT envelope override settings. - :type envelope_overrides: - list[~azure.mgmt.logic.models.EdifactEnvelopeOverride] - :param message_filter_list: The EDIFACT message filter list. - :type message_filter_list: - list[~azure.mgmt.logic.models.EdifactMessageIdentifier] - :param schema_references: Required. The EDIFACT schema references. - :type schema_references: - list[~azure.mgmt.logic.models.EdifactSchemaReference] - :param validation_overrides: The EDIFACT validation override settings. - :type validation_overrides: - list[~azure.mgmt.logic.models.EdifactValidationOverride] - :param edifact_delimiter_overrides: The EDIFACT delimiter override - settings. - :type edifact_delimiter_overrides: - list[~azure.mgmt.logic.models.EdifactDelimiterOverride] - """ - - _validation = { - 'validation_settings': {'required': True}, - 'framing_settings': {'required': True}, - 'envelope_settings': {'required': True}, - 'acknowledgement_settings': {'required': True}, - 'message_filter': {'required': True}, - 'processing_settings': {'required': True}, - 'schema_references': {'required': True}, - } - - _attribute_map = { - 'validation_settings': {'key': 'validationSettings', 'type': 'EdifactValidationSettings'}, - 'framing_settings': {'key': 'framingSettings', 'type': 'EdifactFramingSettings'}, - 'envelope_settings': {'key': 'envelopeSettings', 'type': 'EdifactEnvelopeSettings'}, - 'acknowledgement_settings': {'key': 'acknowledgementSettings', 'type': 'EdifactAcknowledgementSettings'}, - 'message_filter': {'key': 'messageFilter', 'type': 'EdifactMessageFilter'}, - 'processing_settings': {'key': 'processingSettings', 'type': 'EdifactProcessingSettings'}, - 'envelope_overrides': {'key': 'envelopeOverrides', 'type': '[EdifactEnvelopeOverride]'}, - 'message_filter_list': {'key': 'messageFilterList', 'type': '[EdifactMessageIdentifier]'}, - 'schema_references': {'key': 'schemaReferences', 'type': '[EdifactSchemaReference]'}, - 'validation_overrides': {'key': 'validationOverrides', 'type': '[EdifactValidationOverride]'}, - 'edifact_delimiter_overrides': {'key': 'edifactDelimiterOverrides', 'type': '[EdifactDelimiterOverride]'}, - } - - def __init__(self, **kwargs): - super(EdifactProtocolSettings, self).__init__(**kwargs) - self.validation_settings = kwargs.get('validation_settings', None) - self.framing_settings = kwargs.get('framing_settings', None) - self.envelope_settings = kwargs.get('envelope_settings', None) - self.acknowledgement_settings = kwargs.get('acknowledgement_settings', None) - self.message_filter = kwargs.get('message_filter', None) - self.processing_settings = kwargs.get('processing_settings', None) - self.envelope_overrides = kwargs.get('envelope_overrides', None) - self.message_filter_list = kwargs.get('message_filter_list', None) - self.schema_references = kwargs.get('schema_references', None) - self.validation_overrides = kwargs.get('validation_overrides', None) - self.edifact_delimiter_overrides = kwargs.get('edifact_delimiter_overrides', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_protocol_settings_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_protocol_settings_py3.py deleted file mode 100644 index 37e81aeb0f3c..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_protocol_settings_py3.py +++ /dev/null @@ -1,90 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EdifactProtocolSettings(Model): - """The Edifact agreement protocol settings. - - All required parameters must be populated in order to send to Azure. - - :param validation_settings: Required. The EDIFACT validation settings. - :type validation_settings: - ~azure.mgmt.logic.models.EdifactValidationSettings - :param framing_settings: Required. The EDIFACT framing settings. - :type framing_settings: ~azure.mgmt.logic.models.EdifactFramingSettings - :param envelope_settings: Required. The EDIFACT envelope settings. - :type envelope_settings: ~azure.mgmt.logic.models.EdifactEnvelopeSettings - :param acknowledgement_settings: Required. The EDIFACT acknowledgement - settings. - :type acknowledgement_settings: - ~azure.mgmt.logic.models.EdifactAcknowledgementSettings - :param message_filter: Required. The EDIFACT message filter. - :type message_filter: ~azure.mgmt.logic.models.EdifactMessageFilter - :param processing_settings: Required. The EDIFACT processing Settings. - :type processing_settings: - ~azure.mgmt.logic.models.EdifactProcessingSettings - :param envelope_overrides: The EDIFACT envelope override settings. - :type envelope_overrides: - list[~azure.mgmt.logic.models.EdifactEnvelopeOverride] - :param message_filter_list: The EDIFACT message filter list. - :type message_filter_list: - list[~azure.mgmt.logic.models.EdifactMessageIdentifier] - :param schema_references: Required. The EDIFACT schema references. - :type schema_references: - list[~azure.mgmt.logic.models.EdifactSchemaReference] - :param validation_overrides: The EDIFACT validation override settings. - :type validation_overrides: - list[~azure.mgmt.logic.models.EdifactValidationOverride] - :param edifact_delimiter_overrides: The EDIFACT delimiter override - settings. - :type edifact_delimiter_overrides: - list[~azure.mgmt.logic.models.EdifactDelimiterOverride] - """ - - _validation = { - 'validation_settings': {'required': True}, - 'framing_settings': {'required': True}, - 'envelope_settings': {'required': True}, - 'acknowledgement_settings': {'required': True}, - 'message_filter': {'required': True}, - 'processing_settings': {'required': True}, - 'schema_references': {'required': True}, - } - - _attribute_map = { - 'validation_settings': {'key': 'validationSettings', 'type': 'EdifactValidationSettings'}, - 'framing_settings': {'key': 'framingSettings', 'type': 'EdifactFramingSettings'}, - 'envelope_settings': {'key': 'envelopeSettings', 'type': 'EdifactEnvelopeSettings'}, - 'acknowledgement_settings': {'key': 'acknowledgementSettings', 'type': 'EdifactAcknowledgementSettings'}, - 'message_filter': {'key': 'messageFilter', 'type': 'EdifactMessageFilter'}, - 'processing_settings': {'key': 'processingSettings', 'type': 'EdifactProcessingSettings'}, - 'envelope_overrides': {'key': 'envelopeOverrides', 'type': '[EdifactEnvelopeOverride]'}, - 'message_filter_list': {'key': 'messageFilterList', 'type': '[EdifactMessageIdentifier]'}, - 'schema_references': {'key': 'schemaReferences', 'type': '[EdifactSchemaReference]'}, - 'validation_overrides': {'key': 'validationOverrides', 'type': '[EdifactValidationOverride]'}, - 'edifact_delimiter_overrides': {'key': 'edifactDelimiterOverrides', 'type': '[EdifactDelimiterOverride]'}, - } - - def __init__(self, *, validation_settings, framing_settings, envelope_settings, acknowledgement_settings, message_filter, processing_settings, schema_references, envelope_overrides=None, message_filter_list=None, validation_overrides=None, edifact_delimiter_overrides=None, **kwargs) -> None: - super(EdifactProtocolSettings, self).__init__(**kwargs) - self.validation_settings = validation_settings - self.framing_settings = framing_settings - self.envelope_settings = envelope_settings - self.acknowledgement_settings = acknowledgement_settings - self.message_filter = message_filter - self.processing_settings = processing_settings - self.envelope_overrides = envelope_overrides - self.message_filter_list = message_filter_list - self.schema_references = schema_references - self.validation_overrides = validation_overrides - self.edifact_delimiter_overrides = edifact_delimiter_overrides diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_schema_reference.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_schema_reference.py deleted file mode 100644 index 7e994ce7fe52..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_schema_reference.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EdifactSchemaReference(Model): - """The Edifact schema reference. - - All required parameters must be populated in order to send to Azure. - - :param message_id: Required. The message id. - :type message_id: str - :param message_version: Required. The message version. - :type message_version: str - :param message_release: Required. The message release version. - :type message_release: str - :param sender_application_id: The sender application id. - :type sender_application_id: str - :param sender_application_qualifier: The sender application qualifier. - :type sender_application_qualifier: str - :param association_assigned_code: The association assigned code. - :type association_assigned_code: str - :param schema_name: Required. The schema name. - :type schema_name: str - """ - - _validation = { - 'message_id': {'required': True}, - 'message_version': {'required': True}, - 'message_release': {'required': True}, - 'schema_name': {'required': True}, - } - - _attribute_map = { - 'message_id': {'key': 'messageId', 'type': 'str'}, - 'message_version': {'key': 'messageVersion', 'type': 'str'}, - 'message_release': {'key': 'messageRelease', 'type': 'str'}, - 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, - 'sender_application_qualifier': {'key': 'senderApplicationQualifier', 'type': 'str'}, - 'association_assigned_code': {'key': 'associationAssignedCode', 'type': 'str'}, - 'schema_name': {'key': 'schemaName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EdifactSchemaReference, self).__init__(**kwargs) - self.message_id = kwargs.get('message_id', None) - self.message_version = kwargs.get('message_version', None) - self.message_release = kwargs.get('message_release', None) - self.sender_application_id = kwargs.get('sender_application_id', None) - self.sender_application_qualifier = kwargs.get('sender_application_qualifier', None) - self.association_assigned_code = kwargs.get('association_assigned_code', None) - self.schema_name = kwargs.get('schema_name', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_schema_reference_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_schema_reference_py3.py deleted file mode 100644 index 5f282f5e5a7e..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_schema_reference_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EdifactSchemaReference(Model): - """The Edifact schema reference. - - All required parameters must be populated in order to send to Azure. - - :param message_id: Required. The message id. - :type message_id: str - :param message_version: Required. The message version. - :type message_version: str - :param message_release: Required. The message release version. - :type message_release: str - :param sender_application_id: The sender application id. - :type sender_application_id: str - :param sender_application_qualifier: The sender application qualifier. - :type sender_application_qualifier: str - :param association_assigned_code: The association assigned code. - :type association_assigned_code: str - :param schema_name: Required. The schema name. - :type schema_name: str - """ - - _validation = { - 'message_id': {'required': True}, - 'message_version': {'required': True}, - 'message_release': {'required': True}, - 'schema_name': {'required': True}, - } - - _attribute_map = { - 'message_id': {'key': 'messageId', 'type': 'str'}, - 'message_version': {'key': 'messageVersion', 'type': 'str'}, - 'message_release': {'key': 'messageRelease', 'type': 'str'}, - 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, - 'sender_application_qualifier': {'key': 'senderApplicationQualifier', 'type': 'str'}, - 'association_assigned_code': {'key': 'associationAssignedCode', 'type': 'str'}, - 'schema_name': {'key': 'schemaName', 'type': 'str'}, - } - - def __init__(self, *, message_id: str, message_version: str, message_release: str, schema_name: str, sender_application_id: str=None, sender_application_qualifier: str=None, association_assigned_code: str=None, **kwargs) -> None: - super(EdifactSchemaReference, self).__init__(**kwargs) - self.message_id = message_id - self.message_version = message_version - self.message_release = message_release - self.sender_application_id = sender_application_id - self.sender_application_qualifier = sender_application_qualifier - self.association_assigned_code = association_assigned_code - self.schema_name = schema_name diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_override.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_override.py deleted file mode 100644 index 667ed14c90a0..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_override.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EdifactValidationOverride(Model): - """The Edifact validation override settings. - - All required parameters must be populated in order to send to Azure. - - :param message_id: Required. The message id on which the validation - settings has to be applied. - :type message_id: str - :param enforce_character_set: Required. The value indicating whether to - validate character Set. - :type enforce_character_set: bool - :param validate_edi_types: Required. The value indicating whether to - validate EDI types. - :type validate_edi_types: bool - :param validate_xsd_types: Required. The value indicating whether to - validate XSD types. - :type validate_xsd_types: bool - :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value - indicating whether to allow leading and trailing spaces and zeroes. - :type allow_leading_and_trailing_spaces_and_zeroes: bool - :param trailing_separator_policy: Required. The trailing separator policy. - Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', - 'Mandatory' - :type trailing_separator_policy: str or - ~azure.mgmt.logic.models.TrailingSeparatorPolicy - :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value - indicating whether to trim leading and trailing spaces and zeroes. - :type trim_leading_and_trailing_spaces_and_zeroes: bool - """ - - _validation = { - 'message_id': {'required': True}, - 'enforce_character_set': {'required': True}, - 'validate_edi_types': {'required': True}, - 'validate_xsd_types': {'required': True}, - 'allow_leading_and_trailing_spaces_and_zeroes': {'required': True}, - 'trailing_separator_policy': {'required': True}, - 'trim_leading_and_trailing_spaces_and_zeroes': {'required': True}, - } - - _attribute_map = { - 'message_id': {'key': 'messageId', 'type': 'str'}, - 'enforce_character_set': {'key': 'enforceCharacterSet', 'type': 'bool'}, - 'validate_edi_types': {'key': 'validateEDITypes', 'type': 'bool'}, - 'validate_xsd_types': {'key': 'validateXSDTypes', 'type': 'bool'}, - 'allow_leading_and_trailing_spaces_and_zeroes': {'key': 'allowLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, - 'trailing_separator_policy': {'key': 'trailingSeparatorPolicy', 'type': 'str'}, - 'trim_leading_and_trailing_spaces_and_zeroes': {'key': 'trimLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(EdifactValidationOverride, self).__init__(**kwargs) - self.message_id = kwargs.get('message_id', None) - self.enforce_character_set = kwargs.get('enforce_character_set', None) - self.validate_edi_types = kwargs.get('validate_edi_types', None) - self.validate_xsd_types = kwargs.get('validate_xsd_types', None) - self.allow_leading_and_trailing_spaces_and_zeroes = kwargs.get('allow_leading_and_trailing_spaces_and_zeroes', None) - self.trailing_separator_policy = kwargs.get('trailing_separator_policy', None) - self.trim_leading_and_trailing_spaces_and_zeroes = kwargs.get('trim_leading_and_trailing_spaces_and_zeroes', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_override_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_override_py3.py deleted file mode 100644 index a71de0a66f79..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_override_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EdifactValidationOverride(Model): - """The Edifact validation override settings. - - All required parameters must be populated in order to send to Azure. - - :param message_id: Required. The message id on which the validation - settings has to be applied. - :type message_id: str - :param enforce_character_set: Required. The value indicating whether to - validate character Set. - :type enforce_character_set: bool - :param validate_edi_types: Required. The value indicating whether to - validate EDI types. - :type validate_edi_types: bool - :param validate_xsd_types: Required. The value indicating whether to - validate XSD types. - :type validate_xsd_types: bool - :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value - indicating whether to allow leading and trailing spaces and zeroes. - :type allow_leading_and_trailing_spaces_and_zeroes: bool - :param trailing_separator_policy: Required. The trailing separator policy. - Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', - 'Mandatory' - :type trailing_separator_policy: str or - ~azure.mgmt.logic.models.TrailingSeparatorPolicy - :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value - indicating whether to trim leading and trailing spaces and zeroes. - :type trim_leading_and_trailing_spaces_and_zeroes: bool - """ - - _validation = { - 'message_id': {'required': True}, - 'enforce_character_set': {'required': True}, - 'validate_edi_types': {'required': True}, - 'validate_xsd_types': {'required': True}, - 'allow_leading_and_trailing_spaces_and_zeroes': {'required': True}, - 'trailing_separator_policy': {'required': True}, - 'trim_leading_and_trailing_spaces_and_zeroes': {'required': True}, - } - - _attribute_map = { - 'message_id': {'key': 'messageId', 'type': 'str'}, - 'enforce_character_set': {'key': 'enforceCharacterSet', 'type': 'bool'}, - 'validate_edi_types': {'key': 'validateEDITypes', 'type': 'bool'}, - 'validate_xsd_types': {'key': 'validateXSDTypes', 'type': 'bool'}, - 'allow_leading_and_trailing_spaces_and_zeroes': {'key': 'allowLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, - 'trailing_separator_policy': {'key': 'trailingSeparatorPolicy', 'type': 'str'}, - 'trim_leading_and_trailing_spaces_and_zeroes': {'key': 'trimLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, - } - - def __init__(self, *, message_id: str, enforce_character_set: bool, validate_edi_types: bool, validate_xsd_types: bool, allow_leading_and_trailing_spaces_and_zeroes: bool, trailing_separator_policy, trim_leading_and_trailing_spaces_and_zeroes: bool, **kwargs) -> None: - super(EdifactValidationOverride, self).__init__(**kwargs) - self.message_id = message_id - self.enforce_character_set = enforce_character_set - self.validate_edi_types = validate_edi_types - self.validate_xsd_types = validate_xsd_types - self.allow_leading_and_trailing_spaces_and_zeroes = allow_leading_and_trailing_spaces_and_zeroes - self.trailing_separator_policy = trailing_separator_policy - self.trim_leading_and_trailing_spaces_and_zeroes = trim_leading_and_trailing_spaces_and_zeroes diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_settings.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_settings.py deleted file mode 100644 index 9a0c3ba33da2..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_settings.py +++ /dev/null @@ -1,91 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EdifactValidationSettings(Model): - """The Edifact agreement validation settings. - - All required parameters must be populated in order to send to Azure. - - :param validate_character_set: Required. The value indicating whether to - validate character set in the message. - :type validate_character_set: bool - :param check_duplicate_interchange_control_number: Required. The value - indicating whether to check for duplicate interchange control number. - :type check_duplicate_interchange_control_number: bool - :param interchange_control_number_validity_days: Required. The validity - period of interchange control number. - :type interchange_control_number_validity_days: int - :param check_duplicate_group_control_number: Required. The value - indicating whether to check for duplicate group control number. - :type check_duplicate_group_control_number: bool - :param check_duplicate_transaction_set_control_number: Required. The value - indicating whether to check for duplicate transaction set control number. - :type check_duplicate_transaction_set_control_number: bool - :param validate_edi_types: Required. The value indicating whether to - Whether to validate EDI types. - :type validate_edi_types: bool - :param validate_xsd_types: Required. The value indicating whether to - Whether to validate XSD types. - :type validate_xsd_types: bool - :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value - indicating whether to allow leading and trailing spaces and zeroes. - :type allow_leading_and_trailing_spaces_and_zeroes: bool - :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value - indicating whether to trim leading and trailing spaces and zeroes. - :type trim_leading_and_trailing_spaces_and_zeroes: bool - :param trailing_separator_policy: Required. The trailing separator policy. - Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', - 'Mandatory' - :type trailing_separator_policy: str or - ~azure.mgmt.logic.models.TrailingSeparatorPolicy - """ - - _validation = { - 'validate_character_set': {'required': True}, - 'check_duplicate_interchange_control_number': {'required': True}, - 'interchange_control_number_validity_days': {'required': True}, - 'check_duplicate_group_control_number': {'required': True}, - 'check_duplicate_transaction_set_control_number': {'required': True}, - 'validate_edi_types': {'required': True}, - 'validate_xsd_types': {'required': True}, - 'allow_leading_and_trailing_spaces_and_zeroes': {'required': True}, - 'trim_leading_and_trailing_spaces_and_zeroes': {'required': True}, - 'trailing_separator_policy': {'required': True}, - } - - _attribute_map = { - 'validate_character_set': {'key': 'validateCharacterSet', 'type': 'bool'}, - 'check_duplicate_interchange_control_number': {'key': 'checkDuplicateInterchangeControlNumber', 'type': 'bool'}, - 'interchange_control_number_validity_days': {'key': 'interchangeControlNumberValidityDays', 'type': 'int'}, - 'check_duplicate_group_control_number': {'key': 'checkDuplicateGroupControlNumber', 'type': 'bool'}, - 'check_duplicate_transaction_set_control_number': {'key': 'checkDuplicateTransactionSetControlNumber', 'type': 'bool'}, - 'validate_edi_types': {'key': 'validateEDITypes', 'type': 'bool'}, - 'validate_xsd_types': {'key': 'validateXSDTypes', 'type': 'bool'}, - 'allow_leading_and_trailing_spaces_and_zeroes': {'key': 'allowLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, - 'trim_leading_and_trailing_spaces_and_zeroes': {'key': 'trimLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, - 'trailing_separator_policy': {'key': 'trailingSeparatorPolicy', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EdifactValidationSettings, self).__init__(**kwargs) - self.validate_character_set = kwargs.get('validate_character_set', None) - self.check_duplicate_interchange_control_number = kwargs.get('check_duplicate_interchange_control_number', None) - self.interchange_control_number_validity_days = kwargs.get('interchange_control_number_validity_days', None) - self.check_duplicate_group_control_number = kwargs.get('check_duplicate_group_control_number', None) - self.check_duplicate_transaction_set_control_number = kwargs.get('check_duplicate_transaction_set_control_number', None) - self.validate_edi_types = kwargs.get('validate_edi_types', None) - self.validate_xsd_types = kwargs.get('validate_xsd_types', None) - self.allow_leading_and_trailing_spaces_and_zeroes = kwargs.get('allow_leading_and_trailing_spaces_and_zeroes', None) - self.trim_leading_and_trailing_spaces_and_zeroes = kwargs.get('trim_leading_and_trailing_spaces_and_zeroes', None) - self.trailing_separator_policy = kwargs.get('trailing_separator_policy', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_settings_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_settings_py3.py deleted file mode 100644 index 4b3ed23a8abc..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_settings_py3.py +++ /dev/null @@ -1,91 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EdifactValidationSettings(Model): - """The Edifact agreement validation settings. - - All required parameters must be populated in order to send to Azure. - - :param validate_character_set: Required. The value indicating whether to - validate character set in the message. - :type validate_character_set: bool - :param check_duplicate_interchange_control_number: Required. The value - indicating whether to check for duplicate interchange control number. - :type check_duplicate_interchange_control_number: bool - :param interchange_control_number_validity_days: Required. The validity - period of interchange control number. - :type interchange_control_number_validity_days: int - :param check_duplicate_group_control_number: Required. The value - indicating whether to check for duplicate group control number. - :type check_duplicate_group_control_number: bool - :param check_duplicate_transaction_set_control_number: Required. The value - indicating whether to check for duplicate transaction set control number. - :type check_duplicate_transaction_set_control_number: bool - :param validate_edi_types: Required. The value indicating whether to - Whether to validate EDI types. - :type validate_edi_types: bool - :param validate_xsd_types: Required. The value indicating whether to - Whether to validate XSD types. - :type validate_xsd_types: bool - :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value - indicating whether to allow leading and trailing spaces and zeroes. - :type allow_leading_and_trailing_spaces_and_zeroes: bool - :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value - indicating whether to trim leading and trailing spaces and zeroes. - :type trim_leading_and_trailing_spaces_and_zeroes: bool - :param trailing_separator_policy: Required. The trailing separator policy. - Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', - 'Mandatory' - :type trailing_separator_policy: str or - ~azure.mgmt.logic.models.TrailingSeparatorPolicy - """ - - _validation = { - 'validate_character_set': {'required': True}, - 'check_duplicate_interchange_control_number': {'required': True}, - 'interchange_control_number_validity_days': {'required': True}, - 'check_duplicate_group_control_number': {'required': True}, - 'check_duplicate_transaction_set_control_number': {'required': True}, - 'validate_edi_types': {'required': True}, - 'validate_xsd_types': {'required': True}, - 'allow_leading_and_trailing_spaces_and_zeroes': {'required': True}, - 'trim_leading_and_trailing_spaces_and_zeroes': {'required': True}, - 'trailing_separator_policy': {'required': True}, - } - - _attribute_map = { - 'validate_character_set': {'key': 'validateCharacterSet', 'type': 'bool'}, - 'check_duplicate_interchange_control_number': {'key': 'checkDuplicateInterchangeControlNumber', 'type': 'bool'}, - 'interchange_control_number_validity_days': {'key': 'interchangeControlNumberValidityDays', 'type': 'int'}, - 'check_duplicate_group_control_number': {'key': 'checkDuplicateGroupControlNumber', 'type': 'bool'}, - 'check_duplicate_transaction_set_control_number': {'key': 'checkDuplicateTransactionSetControlNumber', 'type': 'bool'}, - 'validate_edi_types': {'key': 'validateEDITypes', 'type': 'bool'}, - 'validate_xsd_types': {'key': 'validateXSDTypes', 'type': 'bool'}, - 'allow_leading_and_trailing_spaces_and_zeroes': {'key': 'allowLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, - 'trim_leading_and_trailing_spaces_and_zeroes': {'key': 'trimLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, - 'trailing_separator_policy': {'key': 'trailingSeparatorPolicy', 'type': 'str'}, - } - - def __init__(self, *, validate_character_set: bool, check_duplicate_interchange_control_number: bool, interchange_control_number_validity_days: int, check_duplicate_group_control_number: bool, check_duplicate_transaction_set_control_number: bool, validate_edi_types: bool, validate_xsd_types: bool, allow_leading_and_trailing_spaces_and_zeroes: bool, trim_leading_and_trailing_spaces_and_zeroes: bool, trailing_separator_policy, **kwargs) -> None: - super(EdifactValidationSettings, self).__init__(**kwargs) - self.validate_character_set = validate_character_set - self.check_duplicate_interchange_control_number = check_duplicate_interchange_control_number - self.interchange_control_number_validity_days = interchange_control_number_validity_days - self.check_duplicate_group_control_number = check_duplicate_group_control_number - self.check_duplicate_transaction_set_control_number = check_duplicate_transaction_set_control_number - self.validate_edi_types = validate_edi_types - self.validate_xsd_types = validate_xsd_types - self.allow_leading_and_trailing_spaces_and_zeroes = allow_leading_and_trailing_spaces_and_zeroes - self.trim_leading_and_trailing_spaces_and_zeroes = trim_leading_and_trailing_spaces_and_zeroes - self.trailing_separator_policy = trailing_separator_policy diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/error_info.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/error_info.py deleted file mode 100644 index 4e9b48e2796c..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/error_info.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ErrorInfo(Model): - """The error info. - - All required parameters must be populated in order to send to Azure. - - :param code: Required. The error code. - :type code: str - """ - - _validation = { - 'code': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ErrorInfo, self).__init__(**kwargs) - self.code = kwargs.get('code', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/error_info_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/error_info_py3.py deleted file mode 100644 index e3c4ec9958ab..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/error_info_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ErrorInfo(Model): - """The error info. - - All required parameters must be populated in order to send to Azure. - - :param code: Required. The error code. - :type code: str - """ - - _validation = { - 'code': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - } - - def __init__(self, *, code: str, **kwargs) -> None: - super(ErrorInfo, self).__init__(**kwargs) - self.code = code diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/error_properties.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/error_properties.py deleted file mode 100644 index f774797075e0..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/error_properties.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ErrorProperties(Model): - """Error properties indicate why the Logic service was not able to process the - incoming request. The reason is provided in the error message. - - :param code: Error code. - :type code: str - :param message: Error message indicating why the operation failed. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ErrorProperties, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/error_properties_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/error_properties_py3.py deleted file mode 100644 index 333f2a770740..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/error_properties_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ErrorProperties(Model): - """Error properties indicate why the Logic service was not able to process the - incoming request. The reason is provided in the error message. - - :param code: Error code. - :type code: str - :param message: Error message indicating why the operation failed. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: - super(ErrorProperties, self).__init__(**kwargs) - self.code = code - self.message = message diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/error_response.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/error_response.py deleted file mode 100644 index 76a7e8315595..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/error_response.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class ErrorResponse(Model): - """Error response indicates Logic service is not able to process the incoming - request. The error property contains the error details. - - :param error: The error properties. - :type error: ~azure.mgmt.logic.models.ErrorProperties - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorProperties'}, - } - - def __init__(self, **kwargs): - super(ErrorResponse, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/error_response_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/error_response_py3.py deleted file mode 100644 index 8e081b09a2b0..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/error_response_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class ErrorResponse(Model): - """Error response indicates Logic service is not able to process the incoming - request. The error property contains the error details. - - :param error: The error properties. - :type error: ~azure.mgmt.logic.models.ErrorProperties - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorProperties'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(ErrorResponse, self).__init__(**kwargs) - self.error = error - - -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/expression.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/expression.py deleted file mode 100644 index a67ba97cfc33..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/expression.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Expression(Model): - """Expression. - - :param text: - :type text: str - :param value: - :type value: object - :param subexpressions: - :type subexpressions: list[~azure.mgmt.logic.models.Expression] - :param error: - :type error: ~azure.mgmt.logic.models.AzureResourceErrorInfo - """ - - _attribute_map = { - 'text': {'key': 'text', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'object'}, - 'subexpressions': {'key': 'subexpressions', 'type': '[Expression]'}, - 'error': {'key': 'error', 'type': 'AzureResourceErrorInfo'}, - } - - def __init__(self, **kwargs): - super(Expression, self).__init__(**kwargs) - self.text = kwargs.get('text', None) - self.value = kwargs.get('value', None) - self.subexpressions = kwargs.get('subexpressions', None) - self.error = kwargs.get('error', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/expression_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/expression_py3.py deleted file mode 100644 index d2e00042a929..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/expression_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Expression(Model): - """Expression. - - :param text: - :type text: str - :param value: - :type value: object - :param subexpressions: - :type subexpressions: list[~azure.mgmt.logic.models.Expression] - :param error: - :type error: ~azure.mgmt.logic.models.AzureResourceErrorInfo - """ - - _attribute_map = { - 'text': {'key': 'text', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'object'}, - 'subexpressions': {'key': 'subexpressions', 'type': '[Expression]'}, - 'error': {'key': 'error', 'type': 'AzureResourceErrorInfo'}, - } - - def __init__(self, *, text: str=None, value=None, subexpressions=None, error=None, **kwargs) -> None: - super(Expression, self).__init__(**kwargs) - self.text = text - self.value = value - self.subexpressions = subexpressions - self.error = error diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/expression_root.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/expression_root.py deleted file mode 100644 index 45a9253fce15..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/expression_root.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .expression import Expression - - -class ExpressionRoot(Expression): - """ExpressionRoot. - - :param text: - :type text: str - :param value: - :type value: object - :param subexpressions: - :type subexpressions: list[~azure.mgmt.logic.models.Expression] - :param error: - :type error: ~azure.mgmt.logic.models.AzureResourceErrorInfo - :param path: The path. - :type path: str - """ - - _attribute_map = { - 'text': {'key': 'text', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'object'}, - 'subexpressions': {'key': 'subexpressions', 'type': '[Expression]'}, - 'error': {'key': 'error', 'type': 'AzureResourceErrorInfo'}, - 'path': {'key': 'path', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ExpressionRoot, self).__init__(**kwargs) - self.path = kwargs.get('path', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/expression_root_paged.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/expression_root_paged.py deleted file mode 100644 index d32646b4a1d8..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/expression_root_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ExpressionRootPaged(Paged): - """ - A paging container for iterating over a list of :class:`ExpressionRoot ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'inputs', 'type': '[ExpressionRoot]'} - } - - def __init__(self, *args, **kwargs): - - super(ExpressionRootPaged, self).__init__(*args, **kwargs) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/expression_root_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/expression_root_py3.py deleted file mode 100644 index 6463b1607310..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/expression_root_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .expression_py3 import Expression - - -class ExpressionRoot(Expression): - """ExpressionRoot. - - :param text: - :type text: str - :param value: - :type value: object - :param subexpressions: - :type subexpressions: list[~azure.mgmt.logic.models.Expression] - :param error: - :type error: ~azure.mgmt.logic.models.AzureResourceErrorInfo - :param path: The path. - :type path: str - """ - - _attribute_map = { - 'text': {'key': 'text', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'object'}, - 'subexpressions': {'key': 'subexpressions', 'type': '[Expression]'}, - 'error': {'key': 'error', 'type': 'AzureResourceErrorInfo'}, - 'path': {'key': 'path', 'type': 'str'}, - } - - def __init__(self, *, text: str=None, value=None, subexpressions=None, error=None, path: str=None, **kwargs) -> None: - super(ExpressionRoot, self).__init__(text=text, value=value, subexpressions=subexpressions, error=error, **kwargs) - self.path = path diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/generate_upgraded_definition_parameters.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/generate_upgraded_definition_parameters.py deleted file mode 100644 index fbab264f0c56..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/generate_upgraded_definition_parameters.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GenerateUpgradedDefinitionParameters(Model): - """The parameters to generate upgraded definition. - - :param target_schema_version: The target schema version. - :type target_schema_version: str - """ - - _attribute_map = { - 'target_schema_version': {'key': 'targetSchemaVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GenerateUpgradedDefinitionParameters, self).__init__(**kwargs) - self.target_schema_version = kwargs.get('target_schema_version', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/generate_upgraded_definition_parameters_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/generate_upgraded_definition_parameters_py3.py deleted file mode 100644 index fe3f6bcf11cb..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/generate_upgraded_definition_parameters_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GenerateUpgradedDefinitionParameters(Model): - """The parameters to generate upgraded definition. - - :param target_schema_version: The target schema version. - :type target_schema_version: str - """ - - _attribute_map = { - 'target_schema_version': {'key': 'targetSchemaVersion', 'type': 'str'}, - } - - def __init__(self, *, target_schema_version: str=None, **kwargs) -> None: - super(GenerateUpgradedDefinitionParameters, self).__init__(**kwargs) - self.target_schema_version = target_schema_version diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/get_callback_url_parameters.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/get_callback_url_parameters.py deleted file mode 100644 index 0f913c0ede41..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/get_callback_url_parameters.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GetCallbackUrlParameters(Model): - """The callback url parameters. - - :param not_after: The expiry time. - :type not_after: datetime - :param key_type: The key type. Possible values include: 'NotSpecified', - 'Primary', 'Secondary' - :type key_type: str or ~azure.mgmt.logic.models.KeyType - """ - - _attribute_map = { - 'not_after': {'key': 'notAfter', 'type': 'iso-8601'}, - 'key_type': {'key': 'keyType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GetCallbackUrlParameters, self).__init__(**kwargs) - self.not_after = kwargs.get('not_after', None) - self.key_type = kwargs.get('key_type', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/get_callback_url_parameters_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/get_callback_url_parameters_py3.py deleted file mode 100644 index 0d9612f0eef0..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/get_callback_url_parameters_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GetCallbackUrlParameters(Model): - """The callback url parameters. - - :param not_after: The expiry time. - :type not_after: datetime - :param key_type: The key type. Possible values include: 'NotSpecified', - 'Primary', 'Secondary' - :type key_type: str or ~azure.mgmt.logic.models.KeyType - """ - - _attribute_map = { - 'not_after': {'key': 'notAfter', 'type': 'iso-8601'}, - 'key_type': {'key': 'keyType', 'type': 'str'}, - } - - def __init__(self, *, not_after=None, key_type=None, **kwargs) -> None: - super(GetCallbackUrlParameters, self).__init__(**kwargs) - self.not_after = not_after - self.key_type = key_type diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account.py deleted file mode 100644 index b29acb017b92..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class IntegrationAccount(Resource): - """The integration account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param properties: The integration account properties. - :type properties: object - :param sku: The sku. - :type sku: ~azure.mgmt.logic.models.IntegrationAccountSku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'object'}, - 'sku': {'key': 'sku', 'type': 'IntegrationAccountSku'}, - } - - def __init__(self, **kwargs): - super(IntegrationAccount, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.sku = kwargs.get('sku', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement.py deleted file mode 100644 index 5fad800c2ade..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement.py +++ /dev/null @@ -1,98 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class IntegrationAccountAgreement(Resource): - """The integration account agreement. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :ivar created_time: The created time. - :vartype created_time: datetime - :ivar changed_time: The changed time. - :vartype changed_time: datetime - :param metadata: The metadata. - :type metadata: object - :param agreement_type: Required. The agreement type. Possible values - include: 'NotSpecified', 'AS2', 'X12', 'Edifact' - :type agreement_type: str or ~azure.mgmt.logic.models.AgreementType - :param host_partner: Required. The integration account partner that is set - as host partner for this agreement. - :type host_partner: str - :param guest_partner: Required. The integration account partner that is - set as guest partner for this agreement. - :type guest_partner: str - :param host_identity: Required. The business identity of the host partner. - :type host_identity: ~azure.mgmt.logic.models.BusinessIdentity - :param guest_identity: Required. The business identity of the guest - partner. - :type guest_identity: ~azure.mgmt.logic.models.BusinessIdentity - :param content: Required. The agreement content. - :type content: ~azure.mgmt.logic.models.AgreementContent - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_time': {'readonly': True}, - 'changed_time': {'readonly': True}, - 'agreement_type': {'required': True}, - 'host_partner': {'required': True}, - 'guest_partner': {'required': True}, - 'host_identity': {'required': True}, - 'guest_identity': {'required': True}, - 'content': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, - 'metadata': {'key': 'properties.metadata', 'type': 'object'}, - 'agreement_type': {'key': 'properties.agreementType', 'type': 'AgreementType'}, - 'host_partner': {'key': 'properties.hostPartner', 'type': 'str'}, - 'guest_partner': {'key': 'properties.guestPartner', 'type': 'str'}, - 'host_identity': {'key': 'properties.hostIdentity', 'type': 'BusinessIdentity'}, - 'guest_identity': {'key': 'properties.guestIdentity', 'type': 'BusinessIdentity'}, - 'content': {'key': 'properties.content', 'type': 'AgreementContent'}, - } - - def __init__(self, **kwargs): - super(IntegrationAccountAgreement, self).__init__(**kwargs) - self.created_time = None - self.changed_time = None - self.metadata = kwargs.get('metadata', None) - self.agreement_type = kwargs.get('agreement_type', None) - self.host_partner = kwargs.get('host_partner', None) - self.guest_partner = kwargs.get('guest_partner', None) - self.host_identity = kwargs.get('host_identity', None) - self.guest_identity = kwargs.get('guest_identity', None) - self.content = kwargs.get('content', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_filter.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_filter.py deleted file mode 100644 index ed00ee6cf955..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_filter.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationAccountAgreementFilter(Model): - """The integration account agreement filter for odata query. - - All required parameters must be populated in order to send to Azure. - - :param agreement_type: Required. The agreement type of integration account - agreement. Possible values include: 'NotSpecified', 'AS2', 'X12', - 'Edifact' - :type agreement_type: str or ~azure.mgmt.logic.models.AgreementType - """ - - _validation = { - 'agreement_type': {'required': True}, - } - - _attribute_map = { - 'agreement_type': {'key': 'agreementType', 'type': 'AgreementType'}, - } - - def __init__(self, **kwargs): - super(IntegrationAccountAgreementFilter, self).__init__(**kwargs) - self.agreement_type = kwargs.get('agreement_type', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_filter_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_filter_py3.py deleted file mode 100644 index aa7b65c825aa..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_filter_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationAccountAgreementFilter(Model): - """The integration account agreement filter for odata query. - - All required parameters must be populated in order to send to Azure. - - :param agreement_type: Required. The agreement type of integration account - agreement. Possible values include: 'NotSpecified', 'AS2', 'X12', - 'Edifact' - :type agreement_type: str or ~azure.mgmt.logic.models.AgreementType - """ - - _validation = { - 'agreement_type': {'required': True}, - } - - _attribute_map = { - 'agreement_type': {'key': 'agreementType', 'type': 'AgreementType'}, - } - - def __init__(self, *, agreement_type, **kwargs) -> None: - super(IntegrationAccountAgreementFilter, self).__init__(**kwargs) - self.agreement_type = agreement_type diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_paged.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_paged.py deleted file mode 100644 index dab33964358e..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class IntegrationAccountAgreementPaged(Paged): - """ - A paging container for iterating over a list of :class:`IntegrationAccountAgreement ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[IntegrationAccountAgreement]'} - } - - def __init__(self, *args, **kwargs): - - super(IntegrationAccountAgreementPaged, self).__init__(*args, **kwargs) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_py3.py deleted file mode 100644 index 4f6d7c00bb25..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_py3.py +++ /dev/null @@ -1,98 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class IntegrationAccountAgreement(Resource): - """The integration account agreement. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :ivar created_time: The created time. - :vartype created_time: datetime - :ivar changed_time: The changed time. - :vartype changed_time: datetime - :param metadata: The metadata. - :type metadata: object - :param agreement_type: Required. The agreement type. Possible values - include: 'NotSpecified', 'AS2', 'X12', 'Edifact' - :type agreement_type: str or ~azure.mgmt.logic.models.AgreementType - :param host_partner: Required. The integration account partner that is set - as host partner for this agreement. - :type host_partner: str - :param guest_partner: Required. The integration account partner that is - set as guest partner for this agreement. - :type guest_partner: str - :param host_identity: Required. The business identity of the host partner. - :type host_identity: ~azure.mgmt.logic.models.BusinessIdentity - :param guest_identity: Required. The business identity of the guest - partner. - :type guest_identity: ~azure.mgmt.logic.models.BusinessIdentity - :param content: Required. The agreement content. - :type content: ~azure.mgmt.logic.models.AgreementContent - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_time': {'readonly': True}, - 'changed_time': {'readonly': True}, - 'agreement_type': {'required': True}, - 'host_partner': {'required': True}, - 'guest_partner': {'required': True}, - 'host_identity': {'required': True}, - 'guest_identity': {'required': True}, - 'content': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, - 'metadata': {'key': 'properties.metadata', 'type': 'object'}, - 'agreement_type': {'key': 'properties.agreementType', 'type': 'AgreementType'}, - 'host_partner': {'key': 'properties.hostPartner', 'type': 'str'}, - 'guest_partner': {'key': 'properties.guestPartner', 'type': 'str'}, - 'host_identity': {'key': 'properties.hostIdentity', 'type': 'BusinessIdentity'}, - 'guest_identity': {'key': 'properties.guestIdentity', 'type': 'BusinessIdentity'}, - 'content': {'key': 'properties.content', 'type': 'AgreementContent'}, - } - - def __init__(self, *, agreement_type, host_partner: str, guest_partner: str, host_identity, guest_identity, content, location: str=None, tags=None, metadata=None, **kwargs) -> None: - super(IntegrationAccountAgreement, self).__init__(location=location, tags=tags, **kwargs) - self.created_time = None - self.changed_time = None - self.metadata = metadata - self.agreement_type = agreement_type - self.host_partner = host_partner - self.guest_partner = guest_partner - self.host_identity = host_identity - self.guest_identity = guest_identity - self.content = content diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_certificate.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_certificate.py deleted file mode 100644 index d6345949d649..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_certificate.py +++ /dev/null @@ -1,70 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class IntegrationAccountCertificate(Resource): - """The integration account certificate. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :ivar created_time: The created time. - :vartype created_time: datetime - :ivar changed_time: The changed time. - :vartype changed_time: datetime - :param metadata: The metadata. - :type metadata: object - :param key: The key details in the key vault. - :type key: ~azure.mgmt.logic.models.KeyVaultKeyReference - :param public_certificate: The public certificate. - :type public_certificate: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_time': {'readonly': True}, - 'changed_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, - 'metadata': {'key': 'properties.metadata', 'type': 'object'}, - 'key': {'key': 'properties.key', 'type': 'KeyVaultKeyReference'}, - 'public_certificate': {'key': 'properties.publicCertificate', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IntegrationAccountCertificate, self).__init__(**kwargs) - self.created_time = None - self.changed_time = None - self.metadata = kwargs.get('metadata', None) - self.key = kwargs.get('key', None) - self.public_certificate = kwargs.get('public_certificate', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_certificate_paged.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_certificate_paged.py deleted file mode 100644 index a428c4a54112..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_certificate_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class IntegrationAccountCertificatePaged(Paged): - """ - A paging container for iterating over a list of :class:`IntegrationAccountCertificate ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[IntegrationAccountCertificate]'} - } - - def __init__(self, *args, **kwargs): - - super(IntegrationAccountCertificatePaged, self).__init__(*args, **kwargs) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_certificate_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_certificate_py3.py deleted file mode 100644 index 84a426fb109e..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_certificate_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class IntegrationAccountCertificate(Resource): - """The integration account certificate. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :ivar created_time: The created time. - :vartype created_time: datetime - :ivar changed_time: The changed time. - :vartype changed_time: datetime - :param metadata: The metadata. - :type metadata: object - :param key: The key details in the key vault. - :type key: ~azure.mgmt.logic.models.KeyVaultKeyReference - :param public_certificate: The public certificate. - :type public_certificate: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_time': {'readonly': True}, - 'changed_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, - 'metadata': {'key': 'properties.metadata', 'type': 'object'}, - 'key': {'key': 'properties.key', 'type': 'KeyVaultKeyReference'}, - 'public_certificate': {'key': 'properties.publicCertificate', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, metadata=None, key=None, public_certificate: str=None, **kwargs) -> None: - super(IntegrationAccountCertificate, self).__init__(location=location, tags=tags, **kwargs) - self.created_time = None - self.changed_time = None - self.metadata = metadata - self.key = key - self.public_certificate = public_certificate diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map.py deleted file mode 100644 index f5c95f26faec..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map.py +++ /dev/null @@ -1,89 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class IntegrationAccountMap(Resource): - """The integration account map. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param map_type: Required. The map type. Possible values include: - 'NotSpecified', 'Xslt', 'Xslt20', 'Xslt30', 'Liquid' - :type map_type: str or ~azure.mgmt.logic.models.MapType - :param parameters_schema: The parameters schema of integration account - map. - :type parameters_schema: - ~azure.mgmt.logic.models.IntegrationAccountMapPropertiesParametersSchema - :ivar created_time: The created time. - :vartype created_time: datetime - :ivar changed_time: The changed time. - :vartype changed_time: datetime - :param content: The content. - :type content: str - :param content_type: The content type. - :type content_type: str - :ivar content_link: The content link. - :vartype content_link: ~azure.mgmt.logic.models.ContentLink - :param metadata: The metadata. - :type metadata: object - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'map_type': {'required': True}, - 'created_time': {'readonly': True}, - 'changed_time': {'readonly': True}, - 'content_link': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'map_type': {'key': 'properties.mapType', 'type': 'str'}, - 'parameters_schema': {'key': 'properties.parametersSchema', 'type': 'IntegrationAccountMapPropertiesParametersSchema'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, - 'content': {'key': 'properties.content', 'type': 'str'}, - 'content_type': {'key': 'properties.contentType', 'type': 'str'}, - 'content_link': {'key': 'properties.contentLink', 'type': 'ContentLink'}, - 'metadata': {'key': 'properties.metadata', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(IntegrationAccountMap, self).__init__(**kwargs) - self.map_type = kwargs.get('map_type', None) - self.parameters_schema = kwargs.get('parameters_schema', None) - self.created_time = None - self.changed_time = None - self.content = kwargs.get('content', None) - self.content_type = kwargs.get('content_type', None) - self.content_link = None - self.metadata = kwargs.get('metadata', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_filter.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_filter.py deleted file mode 100644 index f9f3839b8884..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_filter.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationAccountMapFilter(Model): - """The integration account map filter for odata query. - - All required parameters must be populated in order to send to Azure. - - :param map_type: Required. The map type of integration account map. - Possible values include: 'NotSpecified', 'Xslt', 'Xslt20', 'Xslt30', - 'Liquid' - :type map_type: str or ~azure.mgmt.logic.models.MapType - """ - - _validation = { - 'map_type': {'required': True}, - } - - _attribute_map = { - 'map_type': {'key': 'mapType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IntegrationAccountMapFilter, self).__init__(**kwargs) - self.map_type = kwargs.get('map_type', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_filter_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_filter_py3.py deleted file mode 100644 index b879d2b24b3a..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_filter_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationAccountMapFilter(Model): - """The integration account map filter for odata query. - - All required parameters must be populated in order to send to Azure. - - :param map_type: Required. The map type of integration account map. - Possible values include: 'NotSpecified', 'Xslt', 'Xslt20', 'Xslt30', - 'Liquid' - :type map_type: str or ~azure.mgmt.logic.models.MapType - """ - - _validation = { - 'map_type': {'required': True}, - } - - _attribute_map = { - 'map_type': {'key': 'mapType', 'type': 'str'}, - } - - def __init__(self, *, map_type, **kwargs) -> None: - super(IntegrationAccountMapFilter, self).__init__(**kwargs) - self.map_type = map_type diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_paged.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_paged.py deleted file mode 100644 index 993fc034cef6..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class IntegrationAccountMapPaged(Paged): - """ - A paging container for iterating over a list of :class:`IntegrationAccountMap ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[IntegrationAccountMap]'} - } - - def __init__(self, *args, **kwargs): - - super(IntegrationAccountMapPaged, self).__init__(*args, **kwargs) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_properties_parameters_schema.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_properties_parameters_schema.py deleted file mode 100644 index 4d2b083b084a..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_properties_parameters_schema.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationAccountMapPropertiesParametersSchema(Model): - """The parameters schema of integration account map. - - :param ref: The reference name. - :type ref: str - """ - - _attribute_map = { - 'ref': {'key': 'ref', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IntegrationAccountMapPropertiesParametersSchema, self).__init__(**kwargs) - self.ref = kwargs.get('ref', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_properties_parameters_schema_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_properties_parameters_schema_py3.py deleted file mode 100644 index 35d9a7ce410a..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_properties_parameters_schema_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationAccountMapPropertiesParametersSchema(Model): - """The parameters schema of integration account map. - - :param ref: The reference name. - :type ref: str - """ - - _attribute_map = { - 'ref': {'key': 'ref', 'type': 'str'}, - } - - def __init__(self, *, ref: str=None, **kwargs) -> None: - super(IntegrationAccountMapPropertiesParametersSchema, self).__init__(**kwargs) - self.ref = ref diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_py3.py deleted file mode 100644 index 757a21c66c60..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_py3.py +++ /dev/null @@ -1,89 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class IntegrationAccountMap(Resource): - """The integration account map. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param map_type: Required. The map type. Possible values include: - 'NotSpecified', 'Xslt', 'Xslt20', 'Xslt30', 'Liquid' - :type map_type: str or ~azure.mgmt.logic.models.MapType - :param parameters_schema: The parameters schema of integration account - map. - :type parameters_schema: - ~azure.mgmt.logic.models.IntegrationAccountMapPropertiesParametersSchema - :ivar created_time: The created time. - :vartype created_time: datetime - :ivar changed_time: The changed time. - :vartype changed_time: datetime - :param content: The content. - :type content: str - :param content_type: The content type. - :type content_type: str - :ivar content_link: The content link. - :vartype content_link: ~azure.mgmt.logic.models.ContentLink - :param metadata: The metadata. - :type metadata: object - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'map_type': {'required': True}, - 'created_time': {'readonly': True}, - 'changed_time': {'readonly': True}, - 'content_link': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'map_type': {'key': 'properties.mapType', 'type': 'str'}, - 'parameters_schema': {'key': 'properties.parametersSchema', 'type': 'IntegrationAccountMapPropertiesParametersSchema'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, - 'content': {'key': 'properties.content', 'type': 'str'}, - 'content_type': {'key': 'properties.contentType', 'type': 'str'}, - 'content_link': {'key': 'properties.contentLink', 'type': 'ContentLink'}, - 'metadata': {'key': 'properties.metadata', 'type': 'object'}, - } - - def __init__(self, *, map_type, location: str=None, tags=None, parameters_schema=None, content: str=None, content_type: str=None, metadata=None, **kwargs) -> None: - super(IntegrationAccountMap, self).__init__(location=location, tags=tags, **kwargs) - self.map_type = map_type - self.parameters_schema = parameters_schema - self.created_time = None - self.changed_time = None - self.content = content - self.content_type = content_type - self.content_link = None - self.metadata = metadata diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_paged.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_paged.py deleted file mode 100644 index 33bf18e0fd8d..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class IntegrationAccountPaged(Paged): - """ - A paging container for iterating over a list of :class:`IntegrationAccount ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[IntegrationAccount]'} - } - - def __init__(self, *args, **kwargs): - - super(IntegrationAccountPaged, self).__init__(*args, **kwargs) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner.py deleted file mode 100644 index 5fa492a380a0..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner.py +++ /dev/null @@ -1,75 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class IntegrationAccountPartner(Resource): - """The integration account partner. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param partner_type: Required. The partner type. Possible values include: - 'NotSpecified', 'B2B' - :type partner_type: str or ~azure.mgmt.logic.models.PartnerType - :ivar created_time: The created time. - :vartype created_time: datetime - :ivar changed_time: The changed time. - :vartype changed_time: datetime - :param metadata: The metadata. - :type metadata: object - :param content: Required. The partner content. - :type content: ~azure.mgmt.logic.models.PartnerContent - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'partner_type': {'required': True}, - 'created_time': {'readonly': True}, - 'changed_time': {'readonly': True}, - 'content': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'partner_type': {'key': 'properties.partnerType', 'type': 'str'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, - 'metadata': {'key': 'properties.metadata', 'type': 'object'}, - 'content': {'key': 'properties.content', 'type': 'PartnerContent'}, - } - - def __init__(self, **kwargs): - super(IntegrationAccountPartner, self).__init__(**kwargs) - self.partner_type = kwargs.get('partner_type', None) - self.created_time = None - self.changed_time = None - self.metadata = kwargs.get('metadata', None) - self.content = kwargs.get('content', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_filter.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_filter.py deleted file mode 100644 index 7f20147bc657..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_filter.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationAccountPartnerFilter(Model): - """The integration account partner filter for odata query. - - All required parameters must be populated in order to send to Azure. - - :param partner_type: Required. The partner type of integration account - partner. Possible values include: 'NotSpecified', 'B2B' - :type partner_type: str or ~azure.mgmt.logic.models.PartnerType - """ - - _validation = { - 'partner_type': {'required': True}, - } - - _attribute_map = { - 'partner_type': {'key': 'partnerType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IntegrationAccountPartnerFilter, self).__init__(**kwargs) - self.partner_type = kwargs.get('partner_type', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_filter_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_filter_py3.py deleted file mode 100644 index 52cb68a5c8c4..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_filter_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationAccountPartnerFilter(Model): - """The integration account partner filter for odata query. - - All required parameters must be populated in order to send to Azure. - - :param partner_type: Required. The partner type of integration account - partner. Possible values include: 'NotSpecified', 'B2B' - :type partner_type: str or ~azure.mgmt.logic.models.PartnerType - """ - - _validation = { - 'partner_type': {'required': True}, - } - - _attribute_map = { - 'partner_type': {'key': 'partnerType', 'type': 'str'}, - } - - def __init__(self, *, partner_type, **kwargs) -> None: - super(IntegrationAccountPartnerFilter, self).__init__(**kwargs) - self.partner_type = partner_type diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_paged.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_paged.py deleted file mode 100644 index 36bcc35e62dd..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class IntegrationAccountPartnerPaged(Paged): - """ - A paging container for iterating over a list of :class:`IntegrationAccountPartner ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[IntegrationAccountPartner]'} - } - - def __init__(self, *args, **kwargs): - - super(IntegrationAccountPartnerPaged, self).__init__(*args, **kwargs) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_py3.py deleted file mode 100644 index 358e7d1caed7..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_py3.py +++ /dev/null @@ -1,75 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class IntegrationAccountPartner(Resource): - """The integration account partner. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param partner_type: Required. The partner type. Possible values include: - 'NotSpecified', 'B2B' - :type partner_type: str or ~azure.mgmt.logic.models.PartnerType - :ivar created_time: The created time. - :vartype created_time: datetime - :ivar changed_time: The changed time. - :vartype changed_time: datetime - :param metadata: The metadata. - :type metadata: object - :param content: Required. The partner content. - :type content: ~azure.mgmt.logic.models.PartnerContent - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'partner_type': {'required': True}, - 'created_time': {'readonly': True}, - 'changed_time': {'readonly': True}, - 'content': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'partner_type': {'key': 'properties.partnerType', 'type': 'str'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, - 'metadata': {'key': 'properties.metadata', 'type': 'object'}, - 'content': {'key': 'properties.content', 'type': 'PartnerContent'}, - } - - def __init__(self, *, partner_type, content, location: str=None, tags=None, metadata=None, **kwargs) -> None: - super(IntegrationAccountPartner, self).__init__(location=location, tags=tags, **kwargs) - self.partner_type = partner_type - self.created_time = None - self.changed_time = None - self.metadata = metadata - self.content = content diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_py3.py deleted file mode 100644 index ef2bc107d386..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class IntegrationAccount(Resource): - """The integration account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param properties: The integration account properties. - :type properties: object - :param sku: The sku. - :type sku: ~azure.mgmt.logic.models.IntegrationAccountSku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'object'}, - 'sku': {'key': 'sku', 'type': 'IntegrationAccountSku'}, - } - - def __init__(self, *, location: str=None, tags=None, properties=None, sku=None, **kwargs) -> None: - super(IntegrationAccount, self).__init__(location=location, tags=tags, **kwargs) - self.properties = properties - self.sku = sku diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema.py deleted file mode 100644 index 96d988a5c8b2..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema.py +++ /dev/null @@ -1,95 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class IntegrationAccountSchema(Resource): - """The integration account schema. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param schema_type: Required. The schema type. Possible values include: - 'NotSpecified', 'Xml' - :type schema_type: str or ~azure.mgmt.logic.models.SchemaType - :param target_namespace: The target namespace of the schema. - :type target_namespace: str - :param document_name: The document name. - :type document_name: str - :param file_name: The file name. - :type file_name: str - :ivar created_time: The created time. - :vartype created_time: datetime - :ivar changed_time: The changed time. - :vartype changed_time: datetime - :param metadata: The metadata. - :type metadata: object - :param content: The content. - :type content: str - :param content_type: The content type. - :type content_type: str - :ivar content_link: The content link. - :vartype content_link: ~azure.mgmt.logic.models.ContentLink - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'schema_type': {'required': True}, - 'created_time': {'readonly': True}, - 'changed_time': {'readonly': True}, - 'content_link': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'schema_type': {'key': 'properties.schemaType', 'type': 'str'}, - 'target_namespace': {'key': 'properties.targetNamespace', 'type': 'str'}, - 'document_name': {'key': 'properties.documentName', 'type': 'str'}, - 'file_name': {'key': 'properties.fileName', 'type': 'str'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, - 'metadata': {'key': 'properties.metadata', 'type': 'object'}, - 'content': {'key': 'properties.content', 'type': 'str'}, - 'content_type': {'key': 'properties.contentType', 'type': 'str'}, - 'content_link': {'key': 'properties.contentLink', 'type': 'ContentLink'}, - } - - def __init__(self, **kwargs): - super(IntegrationAccountSchema, self).__init__(**kwargs) - self.schema_type = kwargs.get('schema_type', None) - self.target_namespace = kwargs.get('target_namespace', None) - self.document_name = kwargs.get('document_name', None) - self.file_name = kwargs.get('file_name', None) - self.created_time = None - self.changed_time = None - self.metadata = kwargs.get('metadata', None) - self.content = kwargs.get('content', None) - self.content_type = kwargs.get('content_type', None) - self.content_link = None diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_filter.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_filter.py deleted file mode 100644 index 12ee48fa602b..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_filter.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationAccountSchemaFilter(Model): - """The integration account schema filter for odata query. - - All required parameters must be populated in order to send to Azure. - - :param schema_type: Required. The schema type of integration account - schema. Possible values include: 'NotSpecified', 'Xml' - :type schema_type: str or ~azure.mgmt.logic.models.SchemaType - """ - - _validation = { - 'schema_type': {'required': True}, - } - - _attribute_map = { - 'schema_type': {'key': 'schemaType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IntegrationAccountSchemaFilter, self).__init__(**kwargs) - self.schema_type = kwargs.get('schema_type', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_filter_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_filter_py3.py deleted file mode 100644 index 249f96cb661e..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_filter_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationAccountSchemaFilter(Model): - """The integration account schema filter for odata query. - - All required parameters must be populated in order to send to Azure. - - :param schema_type: Required. The schema type of integration account - schema. Possible values include: 'NotSpecified', 'Xml' - :type schema_type: str or ~azure.mgmt.logic.models.SchemaType - """ - - _validation = { - 'schema_type': {'required': True}, - } - - _attribute_map = { - 'schema_type': {'key': 'schemaType', 'type': 'str'}, - } - - def __init__(self, *, schema_type, **kwargs) -> None: - super(IntegrationAccountSchemaFilter, self).__init__(**kwargs) - self.schema_type = schema_type diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_paged.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_paged.py deleted file mode 100644 index 778d81bab195..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class IntegrationAccountSchemaPaged(Paged): - """ - A paging container for iterating over a list of :class:`IntegrationAccountSchema ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[IntegrationAccountSchema]'} - } - - def __init__(self, *args, **kwargs): - - super(IntegrationAccountSchemaPaged, self).__init__(*args, **kwargs) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_py3.py deleted file mode 100644 index 179271f3c2b3..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_py3.py +++ /dev/null @@ -1,95 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class IntegrationAccountSchema(Resource): - """The integration account schema. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param schema_type: Required. The schema type. Possible values include: - 'NotSpecified', 'Xml' - :type schema_type: str or ~azure.mgmt.logic.models.SchemaType - :param target_namespace: The target namespace of the schema. - :type target_namespace: str - :param document_name: The document name. - :type document_name: str - :param file_name: The file name. - :type file_name: str - :ivar created_time: The created time. - :vartype created_time: datetime - :ivar changed_time: The changed time. - :vartype changed_time: datetime - :param metadata: The metadata. - :type metadata: object - :param content: The content. - :type content: str - :param content_type: The content type. - :type content_type: str - :ivar content_link: The content link. - :vartype content_link: ~azure.mgmt.logic.models.ContentLink - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'schema_type': {'required': True}, - 'created_time': {'readonly': True}, - 'changed_time': {'readonly': True}, - 'content_link': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'schema_type': {'key': 'properties.schemaType', 'type': 'str'}, - 'target_namespace': {'key': 'properties.targetNamespace', 'type': 'str'}, - 'document_name': {'key': 'properties.documentName', 'type': 'str'}, - 'file_name': {'key': 'properties.fileName', 'type': 'str'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, - 'metadata': {'key': 'properties.metadata', 'type': 'object'}, - 'content': {'key': 'properties.content', 'type': 'str'}, - 'content_type': {'key': 'properties.contentType', 'type': 'str'}, - 'content_link': {'key': 'properties.contentLink', 'type': 'ContentLink'}, - } - - def __init__(self, *, schema_type, location: str=None, tags=None, target_namespace: str=None, document_name: str=None, file_name: str=None, metadata=None, content: str=None, content_type: str=None, **kwargs) -> None: - super(IntegrationAccountSchema, self).__init__(location=location, tags=tags, **kwargs) - self.schema_type = schema_type - self.target_namespace = target_namespace - self.document_name = document_name - self.file_name = file_name - self.created_time = None - self.changed_time = None - self.metadata = metadata - self.content = content - self.content_type = content_type - self.content_link = None diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session.py deleted file mode 100644 index e779bc551406..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session.py +++ /dev/null @@ -1,62 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class IntegrationAccountSession(Resource): - """The integration account session. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :ivar created_time: The created time. - :vartype created_time: datetime - :ivar changed_time: The changed time. - :vartype changed_time: datetime - :param content: The session content. - :type content: object - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_time': {'readonly': True}, - 'changed_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, - 'content': {'key': 'properties.content', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(IntegrationAccountSession, self).__init__(**kwargs) - self.created_time = None - self.changed_time = None - self.content = kwargs.get('content', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_filter.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_filter.py deleted file mode 100644 index 5c4b92f81245..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_filter.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationAccountSessionFilter(Model): - """The integration account session filter. - - All required parameters must be populated in order to send to Azure. - - :param changed_time: Required. The changed time of integration account - sessions. - :type changed_time: datetime - """ - - _validation = { - 'changed_time': {'required': True}, - } - - _attribute_map = { - 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(IntegrationAccountSessionFilter, self).__init__(**kwargs) - self.changed_time = kwargs.get('changed_time', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_filter_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_filter_py3.py deleted file mode 100644 index cc860f372c00..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_filter_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationAccountSessionFilter(Model): - """The integration account session filter. - - All required parameters must be populated in order to send to Azure. - - :param changed_time: Required. The changed time of integration account - sessions. - :type changed_time: datetime - """ - - _validation = { - 'changed_time': {'required': True}, - } - - _attribute_map = { - 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, changed_time, **kwargs) -> None: - super(IntegrationAccountSessionFilter, self).__init__(**kwargs) - self.changed_time = changed_time diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_paged.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_paged.py deleted file mode 100644 index 8e29ebfe24cd..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class IntegrationAccountSessionPaged(Paged): - """ - A paging container for iterating over a list of :class:`IntegrationAccountSession ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[IntegrationAccountSession]'} - } - - def __init__(self, *args, **kwargs): - - super(IntegrationAccountSessionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_py3.py deleted file mode 100644 index 91d024d47d75..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class IntegrationAccountSession(Resource): - """The integration account session. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :ivar created_time: The created time. - :vartype created_time: datetime - :ivar changed_time: The changed time. - :vartype changed_time: datetime - :param content: The session content. - :type content: object - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_time': {'readonly': True}, - 'changed_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, - 'content': {'key': 'properties.content', 'type': 'object'}, - } - - def __init__(self, *, location: str=None, tags=None, content=None, **kwargs) -> None: - super(IntegrationAccountSession, self).__init__(location=location, tags=tags, **kwargs) - self.created_time = None - self.changed_time = None - self.content = content diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_sku.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_sku.py deleted file mode 100644 index 7d87a9605159..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_sku.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationAccountSku(Model): - """The integration account sku. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The sku name. Possible values include: - 'NotSpecified', 'Free', 'Basic', 'Standard' - :type name: str or ~azure.mgmt.logic.models.IntegrationAccountSkuName - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IntegrationAccountSku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_sku_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_sku_py3.py deleted file mode 100644 index 9a3d01071902..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_sku_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IntegrationAccountSku(Model): - """The integration account sku. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The sku name. Possible values include: - 'NotSpecified', 'Free', 'Basic', 'Standard' - :type name: str or ~azure.mgmt.logic.models.IntegrationAccountSkuName - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name, **kwargs) -> None: - super(IntegrationAccountSku, self).__init__(**kwargs) - self.name = name diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/json_schema.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/json_schema.py deleted file mode 100644 index 4d9fc567f826..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/json_schema.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JsonSchema(Model): - """The JSON schema. - - :param title: The JSON title. - :type title: str - :param content: The JSON content. - :type content: str - """ - - _attribute_map = { - 'title': {'key': 'title', 'type': 'str'}, - 'content': {'key': 'content', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JsonSchema, self).__init__(**kwargs) - self.title = kwargs.get('title', None) - self.content = kwargs.get('content', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/json_schema_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/json_schema_py3.py deleted file mode 100644 index edaaa76244cc..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/json_schema_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JsonSchema(Model): - """The JSON schema. - - :param title: The JSON title. - :type title: str - :param content: The JSON content. - :type content: str - """ - - _attribute_map = { - 'title': {'key': 'title', 'type': 'str'}, - 'content': {'key': 'content', 'type': 'str'}, - } - - def __init__(self, *, title: str=None, content: str=None, **kwargs) -> None: - super(JsonSchema, self).__init__(**kwargs) - self.title = title - self.content = content diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key.py deleted file mode 100644 index 6e337eda6dcb..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultKey(Model): - """The key vault key. - - :param kid: The key id. - :type kid: str - :param attributes: The key attributes. - :type attributes: ~azure.mgmt.logic.models.KeyVaultKeyAttributes - """ - - _attribute_map = { - 'kid': {'key': 'kid', 'type': 'str'}, - 'attributes': {'key': 'attributes', 'type': 'KeyVaultKeyAttributes'}, - } - - def __init__(self, **kwargs): - super(KeyVaultKey, self).__init__(**kwargs) - self.kid = kwargs.get('kid', None) - self.attributes = kwargs.get('attributes', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_attributes.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_attributes.py deleted file mode 100644 index 715d92ab0af1..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_attributes.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultKeyAttributes(Model): - """The key attributes. - - :param enabled: Whether the key is enabled or not. - :type enabled: bool - :param created: When the key was created. - :type created: long - :param updated: When the key was updated. - :type updated: long - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'created': {'key': 'created', 'type': 'long'}, - 'updated': {'key': 'updated', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(KeyVaultKeyAttributes, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.created = kwargs.get('created', None) - self.updated = kwargs.get('updated', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_attributes_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_attributes_py3.py deleted file mode 100644 index fa14881da122..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_attributes_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultKeyAttributes(Model): - """The key attributes. - - :param enabled: Whether the key is enabled or not. - :type enabled: bool - :param created: When the key was created. - :type created: long - :param updated: When the key was updated. - :type updated: long - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'created': {'key': 'created', 'type': 'long'}, - 'updated': {'key': 'updated', 'type': 'long'}, - } - - def __init__(self, *, enabled: bool=None, created: int=None, updated: int=None, **kwargs) -> None: - super(KeyVaultKeyAttributes, self).__init__(**kwargs) - self.enabled = enabled - self.created = created - self.updated = updated diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_paged.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_paged.py deleted file mode 100644 index 8384bd46af02..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class KeyVaultKeyPaged(Paged): - """ - A paging container for iterating over a list of :class:`KeyVaultKey ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[KeyVaultKey]'} - } - - def __init__(self, *args, **kwargs): - - super(KeyVaultKeyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_py3.py deleted file mode 100644 index 3c55470665a4..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultKey(Model): - """The key vault key. - - :param kid: The key id. - :type kid: str - :param attributes: The key attributes. - :type attributes: ~azure.mgmt.logic.models.KeyVaultKeyAttributes - """ - - _attribute_map = { - 'kid': {'key': 'kid', 'type': 'str'}, - 'attributes': {'key': 'attributes', 'type': 'KeyVaultKeyAttributes'}, - } - - def __init__(self, *, kid: str=None, attributes=None, **kwargs) -> None: - super(KeyVaultKey, self).__init__(**kwargs) - self.kid = kid - self.attributes = attributes diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference.py deleted file mode 100644 index 509822e7a4dc..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultKeyReference(Model): - """The reference to the key vault key. - - All required parameters must be populated in order to send to Azure. - - :param key_vault: Required. The key vault reference. - :type key_vault: ~azure.mgmt.logic.models.KeyVaultKeyReferenceKeyVault - :param key_name: Required. The private key name in key vault. - :type key_name: str - :param key_version: The private key version in key vault. - :type key_version: str - """ - - _validation = { - 'key_vault': {'required': True}, - 'key_name': {'required': True}, - } - - _attribute_map = { - 'key_vault': {'key': 'keyVault', 'type': 'KeyVaultKeyReferenceKeyVault'}, - 'key_name': {'key': 'keyName', 'type': 'str'}, - 'key_version': {'key': 'keyVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(KeyVaultKeyReference, self).__init__(**kwargs) - self.key_vault = kwargs.get('key_vault', None) - self.key_name = kwargs.get('key_name', None) - self.key_version = kwargs.get('key_version', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference_key_vault.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference_key_vault.py deleted file mode 100644 index d1d4bda43dbb..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference_key_vault.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultKeyReferenceKeyVault(Model): - """The key vault reference. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: The resource id. - :type id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(KeyVaultKeyReferenceKeyVault, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = None - self.type = None diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference_key_vault_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference_key_vault_py3.py deleted file mode 100644 index 71b65da492e9..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference_key_vault_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultKeyReferenceKeyVault(Model): - """The key vault reference. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: The resource id. - :type id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(KeyVaultKeyReferenceKeyVault, self).__init__(**kwargs) - self.id = id - self.name = None - self.type = None diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference_py3.py deleted file mode 100644 index c46fba8a4a4b..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class KeyVaultKeyReference(Model): - """The reference to the key vault key. - - All required parameters must be populated in order to send to Azure. - - :param key_vault: Required. The key vault reference. - :type key_vault: ~azure.mgmt.logic.models.KeyVaultKeyReferenceKeyVault - :param key_name: Required. The private key name in key vault. - :type key_name: str - :param key_version: The private key version in key vault. - :type key_version: str - """ - - _validation = { - 'key_vault': {'required': True}, - 'key_name': {'required': True}, - } - - _attribute_map = { - 'key_vault': {'key': 'keyVault', 'type': 'KeyVaultKeyReferenceKeyVault'}, - 'key_name': {'key': 'keyName', 'type': 'str'}, - 'key_version': {'key': 'keyVersion', 'type': 'str'}, - } - - def __init__(self, *, key_vault, key_name: str, key_version: str=None, **kwargs) -> None: - super(KeyVaultKeyReference, self).__init__(**kwargs) - self.key_vault = key_vault - self.key_name = key_name - self.key_version = key_version diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_reference.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_reference.py deleted file mode 100644 index 88d9e767cbbe..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_reference.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_reference import ResourceReference - - -class KeyVaultReference(ResourceReference): - """The key vault reference. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: The resource id. - :type id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(KeyVaultReference, self).__init__(**kwargs) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_reference_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_reference_py3.py deleted file mode 100644 index 1696f9af62d1..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_reference_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_reference_py3 import ResourceReference - - -class KeyVaultReference(ResourceReference): - """The key vault reference. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: The resource id. - :type id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(KeyVaultReference, self).__init__(id=id, **kwargs) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/list_key_vault_keys_definition.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/list_key_vault_keys_definition.py deleted file mode 100644 index 7b989c66c6b5..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/list_key_vault_keys_definition.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ListKeyVaultKeysDefinition(Model): - """The list key vault keys definition. - - All required parameters must be populated in order to send to Azure. - - :param key_vault: Required. The key vault reference. - :type key_vault: ~azure.mgmt.logic.models.KeyVaultReference - :param skip_token: The skip token. - :type skip_token: str - """ - - _validation = { - 'key_vault': {'required': True}, - } - - _attribute_map = { - 'key_vault': {'key': 'keyVault', 'type': 'KeyVaultReference'}, - 'skip_token': {'key': 'skipToken', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ListKeyVaultKeysDefinition, self).__init__(**kwargs) - self.key_vault = kwargs.get('key_vault', None) - self.skip_token = kwargs.get('skip_token', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/list_key_vault_keys_definition_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/list_key_vault_keys_definition_py3.py deleted file mode 100644 index 6e726e777df9..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/list_key_vault_keys_definition_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ListKeyVaultKeysDefinition(Model): - """The list key vault keys definition. - - All required parameters must be populated in order to send to Azure. - - :param key_vault: Required. The key vault reference. - :type key_vault: ~azure.mgmt.logic.models.KeyVaultReference - :param skip_token: The skip token. - :type skip_token: str - """ - - _validation = { - 'key_vault': {'required': True}, - } - - _attribute_map = { - 'key_vault': {'key': 'keyVault', 'type': 'KeyVaultReference'}, - 'skip_token': {'key': 'skipToken', 'type': 'str'}, - } - - def __init__(self, *, key_vault, skip_token: str=None, **kwargs) -> None: - super(ListKeyVaultKeysDefinition, self).__init__(**kwargs) - self.key_vault = key_vault - self.skip_token = skip_token diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/operation.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/operation.py deleted file mode 100644 index 24f4765fbb64..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/operation.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """Logic REST API operation. - - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param display: The object that represents the operation. - :type display: ~azure.mgmt.logic.models.OperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/operation_display.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/operation_display.py deleted file mode 100644 index dde4fd1e3b5b..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/operation_display.py +++ /dev/null @@ -1,37 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """The object that represents the operation. - - :param provider: Service provider: Microsoft.Logic - :type provider: str - :param resource: Resource on which the operation is performed: Profile, - endpoint, etc. - :type resource: str - :param operation: Operation type: Read, write, delete, etc. - :type operation: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.resource = kwargs.get('resource', None) - self.operation = kwargs.get('operation', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/operation_display_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/operation_display_py3.py deleted file mode 100644 index 0b35f13673cb..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/operation_display_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """The object that represents the operation. - - :param provider: Service provider: Microsoft.Logic - :type provider: str - :param resource: Resource on which the operation is performed: Profile, - endpoint, etc. - :type resource: str - :param operation: Operation type: Read, write, delete, etc. - :type operation: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - } - - def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/operation_paged.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/operation_paged.py deleted file mode 100644 index d5a86908d4dc..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/operation_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/operation_py3.py deleted file mode 100644 index c528c6c5a046..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/operation_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """Logic REST API operation. - - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param display: The object that represents the operation. - :type display: ~azure.mgmt.logic.models.OperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, *, name: str=None, display=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = name - self.display = display diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/operation_result.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/operation_result.py deleted file mode 100644 index 9461b110569b..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/operation_result.py +++ /dev/null @@ -1,89 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .operation_result_properties import OperationResultProperties - - -class OperationResult(OperationResultProperties): - """The operation result definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param start_time: The start time of the workflow scope repetition. - :type start_time: datetime - :param end_time: The end time of the workflow scope repetition. - :type end_time: datetime - :param correlation: The correlation properties. - :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation - :param status: The status of the workflow scope repetition. Possible - values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', - 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', - 'TimedOut', 'Aborted', 'Ignored' - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus - :param code: The workflow scope repetition code. - :type code: str - :param error: - :type error: object - :ivar tracking_id: Gets the tracking id. - :vartype tracking_id: str - :ivar inputs: Gets the inputs. - :vartype inputs: object - :ivar inputs_link: Gets the link to inputs. - :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar outputs: Gets the outputs. - :vartype outputs: object - :ivar outputs_link: Gets the link to outputs. - :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar tracked_properties: Gets the tracked properties. - :vartype tracked_properties: object - :param retry_history: Gets the retry histories. - :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] - :param iteration_count: - :type iteration_count: int - """ - - _validation = { - 'tracking_id': {'readonly': True}, - 'inputs': {'readonly': True}, - 'inputs_link': {'readonly': True}, - 'outputs': {'readonly': True}, - 'outputs_link': {'readonly': True}, - 'tracked_properties': {'readonly': True}, - } - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'correlation': {'key': 'correlation', 'type': 'RunActionCorrelation'}, - 'status': {'key': 'status', 'type': 'str'}, - 'code': {'key': 'code', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'object'}, - 'tracking_id': {'key': 'trackingId', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': 'object'}, - 'inputs_link': {'key': 'inputsLink', 'type': 'ContentLink'}, - 'outputs': {'key': 'outputs', 'type': 'object'}, - 'outputs_link': {'key': 'outputsLink', 'type': 'ContentLink'}, - 'tracked_properties': {'key': 'trackedProperties', 'type': 'object'}, - 'retry_history': {'key': 'retryHistory', 'type': '[RetryHistory]'}, - 'iteration_count': {'key': 'iterationCount', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(OperationResult, self).__init__(**kwargs) - self.tracking_id = None - self.inputs = None - self.inputs_link = None - self.outputs = None - self.outputs_link = None - self.tracked_properties = None - self.retry_history = kwargs.get('retry_history', None) - self.iteration_count = kwargs.get('iteration_count', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/operation_result_properties.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/operation_result_properties.py deleted file mode 100644 index 5a61d0c31ce5..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/operation_result_properties.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationResultProperties(Model): - """The run operation result properties. - - :param start_time: The start time of the workflow scope repetition. - :type start_time: datetime - :param end_time: The end time of the workflow scope repetition. - :type end_time: datetime - :param correlation: The correlation properties. - :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation - :param status: The status of the workflow scope repetition. Possible - values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', - 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', - 'TimedOut', 'Aborted', 'Ignored' - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus - :param code: The workflow scope repetition code. - :type code: str - :param error: - :type error: object - """ - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'correlation': {'key': 'correlation', 'type': 'RunActionCorrelation'}, - 'status': {'key': 'status', 'type': 'str'}, - 'code': {'key': 'code', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(OperationResultProperties, self).__init__(**kwargs) - self.start_time = kwargs.get('start_time', None) - self.end_time = kwargs.get('end_time', None) - self.correlation = kwargs.get('correlation', None) - self.status = kwargs.get('status', None) - self.code = kwargs.get('code', None) - self.error = kwargs.get('error', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/operation_result_properties_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/operation_result_properties_py3.py deleted file mode 100644 index 41f30d58eae8..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/operation_result_properties_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationResultProperties(Model): - """The run operation result properties. - - :param start_time: The start time of the workflow scope repetition. - :type start_time: datetime - :param end_time: The end time of the workflow scope repetition. - :type end_time: datetime - :param correlation: The correlation properties. - :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation - :param status: The status of the workflow scope repetition. Possible - values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', - 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', - 'TimedOut', 'Aborted', 'Ignored' - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus - :param code: The workflow scope repetition code. - :type code: str - :param error: - :type error: object - """ - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'correlation': {'key': 'correlation', 'type': 'RunActionCorrelation'}, - 'status': {'key': 'status', 'type': 'str'}, - 'code': {'key': 'code', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'object'}, - } - - def __init__(self, *, start_time=None, end_time=None, correlation=None, status=None, code: str=None, error=None, **kwargs) -> None: - super(OperationResultProperties, self).__init__(**kwargs) - self.start_time = start_time - self.end_time = end_time - self.correlation = correlation - self.status = status - self.code = code - self.error = error diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/operation_result_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/operation_result_py3.py deleted file mode 100644 index ef58ac973b49..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/operation_result_py3.py +++ /dev/null @@ -1,89 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .operation_result_properties_py3 import OperationResultProperties - - -class OperationResult(OperationResultProperties): - """The operation result definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param start_time: The start time of the workflow scope repetition. - :type start_time: datetime - :param end_time: The end time of the workflow scope repetition. - :type end_time: datetime - :param correlation: The correlation properties. - :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation - :param status: The status of the workflow scope repetition. Possible - values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', - 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', - 'TimedOut', 'Aborted', 'Ignored' - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus - :param code: The workflow scope repetition code. - :type code: str - :param error: - :type error: object - :ivar tracking_id: Gets the tracking id. - :vartype tracking_id: str - :ivar inputs: Gets the inputs. - :vartype inputs: object - :ivar inputs_link: Gets the link to inputs. - :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar outputs: Gets the outputs. - :vartype outputs: object - :ivar outputs_link: Gets the link to outputs. - :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar tracked_properties: Gets the tracked properties. - :vartype tracked_properties: object - :param retry_history: Gets the retry histories. - :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] - :param iteration_count: - :type iteration_count: int - """ - - _validation = { - 'tracking_id': {'readonly': True}, - 'inputs': {'readonly': True}, - 'inputs_link': {'readonly': True}, - 'outputs': {'readonly': True}, - 'outputs_link': {'readonly': True}, - 'tracked_properties': {'readonly': True}, - } - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'correlation': {'key': 'correlation', 'type': 'RunActionCorrelation'}, - 'status': {'key': 'status', 'type': 'str'}, - 'code': {'key': 'code', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'object'}, - 'tracking_id': {'key': 'trackingId', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': 'object'}, - 'inputs_link': {'key': 'inputsLink', 'type': 'ContentLink'}, - 'outputs': {'key': 'outputs', 'type': 'object'}, - 'outputs_link': {'key': 'outputsLink', 'type': 'ContentLink'}, - 'tracked_properties': {'key': 'trackedProperties', 'type': 'object'}, - 'retry_history': {'key': 'retryHistory', 'type': '[RetryHistory]'}, - 'iteration_count': {'key': 'iterationCount', 'type': 'int'}, - } - - def __init__(self, *, start_time=None, end_time=None, correlation=None, status=None, code: str=None, error=None, retry_history=None, iteration_count: int=None, **kwargs) -> None: - super(OperationResult, self).__init__(start_time=start_time, end_time=end_time, correlation=correlation, status=status, code=code, error=error, **kwargs) - self.tracking_id = None - self.inputs = None - self.inputs_link = None - self.outputs = None - self.outputs_link = None - self.tracked_properties = None - self.retry_history = retry_history - self.iteration_count = iteration_count diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/partner_content.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/partner_content.py deleted file mode 100644 index 8e6050a643d9..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/partner_content.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartnerContent(Model): - """The integration account partner content. - - :param b2b: The B2B partner content. - :type b2b: ~azure.mgmt.logic.models.B2BPartnerContent - """ - - _attribute_map = { - 'b2b': {'key': 'b2b', 'type': 'B2BPartnerContent'}, - } - - def __init__(self, **kwargs): - super(PartnerContent, self).__init__(**kwargs) - self.b2b = kwargs.get('b2b', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/partner_content_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/partner_content_py3.py deleted file mode 100644 index 16398395e0b4..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/partner_content_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartnerContent(Model): - """The integration account partner content. - - :param b2b: The B2B partner content. - :type b2b: ~azure.mgmt.logic.models.B2BPartnerContent - """ - - _attribute_map = { - 'b2b': {'key': 'b2b', 'type': 'B2BPartnerContent'}, - } - - def __init__(self, *, b2b=None, **kwargs) -> None: - super(PartnerContent, self).__init__(**kwargs) - self.b2b = b2b diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule.py deleted file mode 100644 index 7fdfd3fb5d71..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RecurrenceSchedule(Model): - """The recurrence schedule. - - :param minutes: The minutes. - :type minutes: list[int] - :param hours: The hours. - :type hours: list[int] - :param week_days: The days of the week. - :type week_days: list[str or ~azure.mgmt.logic.models.DaysOfWeek] - :param month_days: The month days. - :type month_days: list[int] - :param monthly_occurrences: The monthly occurrences. - :type monthly_occurrences: - list[~azure.mgmt.logic.models.RecurrenceScheduleOccurrence] - """ - - _attribute_map = { - 'minutes': {'key': 'minutes', 'type': '[int]'}, - 'hours': {'key': 'hours', 'type': '[int]'}, - 'week_days': {'key': 'weekDays', 'type': '[DaysOfWeek]'}, - 'month_days': {'key': 'monthDays', 'type': '[int]'}, - 'monthly_occurrences': {'key': 'monthlyOccurrences', 'type': '[RecurrenceScheduleOccurrence]'}, - } - - def __init__(self, **kwargs): - super(RecurrenceSchedule, self).__init__(**kwargs) - self.minutes = kwargs.get('minutes', None) - self.hours = kwargs.get('hours', None) - self.week_days = kwargs.get('week_days', None) - self.month_days = kwargs.get('month_days', None) - self.monthly_occurrences = kwargs.get('monthly_occurrences', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule_occurrence.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule_occurrence.py deleted file mode 100644 index b32dbc67e712..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule_occurrence.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RecurrenceScheduleOccurrence(Model): - """The recurrence schedule occurrence. - - :param day: The day of the week. Possible values include: 'Sunday', - 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' - :type day: str or ~azure.mgmt.logic.models.DayOfWeek - :param occurrence: The occurrence. - :type occurrence: int - """ - - _attribute_map = { - 'day': {'key': 'day', 'type': 'DayOfWeek'}, - 'occurrence': {'key': 'occurrence', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(RecurrenceScheduleOccurrence, self).__init__(**kwargs) - self.day = kwargs.get('day', None) - self.occurrence = kwargs.get('occurrence', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule_occurrence_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule_occurrence_py3.py deleted file mode 100644 index 1bdaee939cc9..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule_occurrence_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RecurrenceScheduleOccurrence(Model): - """The recurrence schedule occurrence. - - :param day: The day of the week. Possible values include: 'Sunday', - 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' - :type day: str or ~azure.mgmt.logic.models.DayOfWeek - :param occurrence: The occurrence. - :type occurrence: int - """ - - _attribute_map = { - 'day': {'key': 'day', 'type': 'DayOfWeek'}, - 'occurrence': {'key': 'occurrence', 'type': 'int'}, - } - - def __init__(self, *, day=None, occurrence: int=None, **kwargs) -> None: - super(RecurrenceScheduleOccurrence, self).__init__(**kwargs) - self.day = day - self.occurrence = occurrence diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule_py3.py deleted file mode 100644 index 68c42503da65..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RecurrenceSchedule(Model): - """The recurrence schedule. - - :param minutes: The minutes. - :type minutes: list[int] - :param hours: The hours. - :type hours: list[int] - :param week_days: The days of the week. - :type week_days: list[str or ~azure.mgmt.logic.models.DaysOfWeek] - :param month_days: The month days. - :type month_days: list[int] - :param monthly_occurrences: The monthly occurrences. - :type monthly_occurrences: - list[~azure.mgmt.logic.models.RecurrenceScheduleOccurrence] - """ - - _attribute_map = { - 'minutes': {'key': 'minutes', 'type': '[int]'}, - 'hours': {'key': 'hours', 'type': '[int]'}, - 'week_days': {'key': 'weekDays', 'type': '[DaysOfWeek]'}, - 'month_days': {'key': 'monthDays', 'type': '[int]'}, - 'monthly_occurrences': {'key': 'monthlyOccurrences', 'type': '[RecurrenceScheduleOccurrence]'}, - } - - def __init__(self, *, minutes=None, hours=None, week_days=None, month_days=None, monthly_occurrences=None, **kwargs) -> None: - super(RecurrenceSchedule, self).__init__(**kwargs) - self.minutes = minutes - self.hours = hours - self.week_days = week_days - self.month_days = month_days - self.monthly_occurrences = monthly_occurrences diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/regenerate_action_parameter.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/regenerate_action_parameter.py deleted file mode 100644 index 8eeb3ee018fe..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/regenerate_action_parameter.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RegenerateActionParameter(Model): - """The access key regenerate action content. - - :param key_type: The key type. Possible values include: 'NotSpecified', - 'Primary', 'Secondary' - :type key_type: str or ~azure.mgmt.logic.models.KeyType - """ - - _attribute_map = { - 'key_type': {'key': 'keyType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RegenerateActionParameter, self).__init__(**kwargs) - self.key_type = kwargs.get('key_type', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/regenerate_action_parameter_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/regenerate_action_parameter_py3.py deleted file mode 100644 index 5539f5f516f2..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/regenerate_action_parameter_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RegenerateActionParameter(Model): - """The access key regenerate action content. - - :param key_type: The key type. Possible values include: 'NotSpecified', - 'Primary', 'Secondary' - :type key_type: str or ~azure.mgmt.logic.models.KeyType - """ - - _attribute_map = { - 'key_type': {'key': 'keyType', 'type': 'str'}, - } - - def __init__(self, *, key_type=None, **kwargs) -> None: - super(RegenerateActionParameter, self).__init__(**kwargs) - self.key_type = key_type diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/repetition_index.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/repetition_index.py deleted file mode 100644 index d929e8f1fd2e..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/repetition_index.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RepetitionIndex(Model): - """The workflow run action repetition index. - - All required parameters must be populated in order to send to Azure. - - :param scope_name: The scope. - :type scope_name: str - :param item_index: Required. The index. - :type item_index: int - """ - - _validation = { - 'item_index': {'required': True}, - } - - _attribute_map = { - 'scope_name': {'key': 'scopeName', 'type': 'str'}, - 'item_index': {'key': 'itemIndex', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(RepetitionIndex, self).__init__(**kwargs) - self.scope_name = kwargs.get('scope_name', None) - self.item_index = kwargs.get('item_index', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/repetition_index_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/repetition_index_py3.py deleted file mode 100644 index 8672b59d3c20..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/repetition_index_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RepetitionIndex(Model): - """The workflow run action repetition index. - - All required parameters must be populated in order to send to Azure. - - :param scope_name: The scope. - :type scope_name: str - :param item_index: Required. The index. - :type item_index: int - """ - - _validation = { - 'item_index': {'required': True}, - } - - _attribute_map = { - 'scope_name': {'key': 'scopeName', 'type': 'str'}, - 'item_index': {'key': 'itemIndex', 'type': 'int'}, - } - - def __init__(self, *, item_index: int, scope_name: str=None, **kwargs) -> None: - super(RepetitionIndex, self).__init__(**kwargs) - self.scope_name = scope_name - self.item_index = item_index diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/request.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/request.py deleted file mode 100644 index 061c655df42c..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/request.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Request(Model): - """A request. - - :param headers: A list of all the headers attached to the request. - :type headers: object - :param uri: The destination for the request. - :type uri: str - :param method: The HTTP method used for the request. - :type method: str - """ - - _attribute_map = { - 'headers': {'key': 'headers', 'type': 'object'}, - 'uri': {'key': 'uri', 'type': 'str'}, - 'method': {'key': 'method', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Request, self).__init__(**kwargs) - self.headers = kwargs.get('headers', None) - self.uri = kwargs.get('uri', None) - self.method = kwargs.get('method', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/request_history.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/request_history.py deleted file mode 100644 index 564959f187e8..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/request_history.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class RequestHistory(Resource): - """The request history. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param properties: The request history properties. - :type properties: ~azure.mgmt.logic.models.RequestHistoryProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'RequestHistoryProperties'}, - } - - def __init__(self, **kwargs): - super(RequestHistory, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/request_history_paged.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/request_history_paged.py deleted file mode 100644 index 01d899c9e674..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/request_history_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RequestHistoryPaged(Paged): - """ - A paging container for iterating over a list of :class:`RequestHistory ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RequestHistory]'} - } - - def __init__(self, *args, **kwargs): - - super(RequestHistoryPaged, self).__init__(*args, **kwargs) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/request_history_properties.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/request_history_properties.py deleted file mode 100644 index 241a1212a41d..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/request_history_properties.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RequestHistoryProperties(Model): - """The request history. - - :param start_time: The time the request started. - :type start_time: datetime - :param end_time: The time the request ended. - :type end_time: datetime - :param request: The request. - :type request: ~azure.mgmt.logic.models.Request - :param response: The response. - :type response: ~azure.mgmt.logic.models.Response - """ - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'request': {'key': 'request', 'type': 'Request'}, - 'response': {'key': 'response', 'type': 'Response'}, - } - - def __init__(self, **kwargs): - super(RequestHistoryProperties, self).__init__(**kwargs) - self.start_time = kwargs.get('start_time', None) - self.end_time = kwargs.get('end_time', None) - self.request = kwargs.get('request', None) - self.response = kwargs.get('response', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/request_history_properties_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/request_history_properties_py3.py deleted file mode 100644 index 5bb2653331e9..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/request_history_properties_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RequestHistoryProperties(Model): - """The request history. - - :param start_time: The time the request started. - :type start_time: datetime - :param end_time: The time the request ended. - :type end_time: datetime - :param request: The request. - :type request: ~azure.mgmt.logic.models.Request - :param response: The response. - :type response: ~azure.mgmt.logic.models.Response - """ - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'request': {'key': 'request', 'type': 'Request'}, - 'response': {'key': 'response', 'type': 'Response'}, - } - - def __init__(self, *, start_time=None, end_time=None, request=None, response=None, **kwargs) -> None: - super(RequestHistoryProperties, self).__init__(**kwargs) - self.start_time = start_time - self.end_time = end_time - self.request = request - self.response = response diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/request_history_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/request_history_py3.py deleted file mode 100644 index 855a717a27d2..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/request_history_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class RequestHistory(Resource): - """The request history. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param properties: The request history properties. - :type properties: ~azure.mgmt.logic.models.RequestHistoryProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'RequestHistoryProperties'}, - } - - def __init__(self, *, location: str=None, tags=None, properties=None, **kwargs) -> None: - super(RequestHistory, self).__init__(location=location, tags=tags, **kwargs) - self.properties = properties diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/request_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/request_py3.py deleted file mode 100644 index e72ac2ab288c..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/request_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Request(Model): - """A request. - - :param headers: A list of all the headers attached to the request. - :type headers: object - :param uri: The destination for the request. - :type uri: str - :param method: The HTTP method used for the request. - :type method: str - """ - - _attribute_map = { - 'headers': {'key': 'headers', 'type': 'object'}, - 'uri': {'key': 'uri', 'type': 'str'}, - 'method': {'key': 'method', 'type': 'str'}, - } - - def __init__(self, *, headers=None, uri: str=None, method: str=None, **kwargs) -> None: - super(Request, self).__init__(**kwargs) - self.headers = headers - self.uri = uri - self.method = method diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/resource.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/resource.py deleted file mode 100644 index dc4a59ade8fd..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/resource.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The base resource type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/resource_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/resource_py3.py deleted file mode 100644 index f081ebac6ded..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/resource_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The base resource type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/resource_reference.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/resource_reference.py deleted file mode 100644 index 728deff2c46b..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/resource_reference.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceReference(Model): - """The resource reference. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: The resource id. - :type id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceReference, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = None - self.type = None diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/resource_reference_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/resource_reference_py3.py deleted file mode 100644 index 2ec7f04aab56..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/resource_reference_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceReference(Model): - """The resource reference. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param id: The resource id. - :type id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(ResourceReference, self).__init__(**kwargs) - self.id = id - self.name = None - self.type = None diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/response.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/response.py deleted file mode 100644 index f3b4a4a29e53..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/response.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Response(Model): - """A response. - - :param headers: A list of all the headers attached to the response. - :type headers: object - :param status_code: The status code of the response. - :type status_code: int - :param body_link: Details on the location of the body content. - :type body_link: ~azure.mgmt.logic.models.ContentLink - """ - - _attribute_map = { - 'headers': {'key': 'headers', 'type': 'object'}, - 'status_code': {'key': 'statusCode', 'type': 'int'}, - 'body_link': {'key': 'bodyLink', 'type': 'ContentLink'}, - } - - def __init__(self, **kwargs): - super(Response, self).__init__(**kwargs) - self.headers = kwargs.get('headers', None) - self.status_code = kwargs.get('status_code', None) - self.body_link = kwargs.get('body_link', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/response_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/response_py3.py deleted file mode 100644 index 7213223e63c4..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/response_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Response(Model): - """A response. - - :param headers: A list of all the headers attached to the response. - :type headers: object - :param status_code: The status code of the response. - :type status_code: int - :param body_link: Details on the location of the body content. - :type body_link: ~azure.mgmt.logic.models.ContentLink - """ - - _attribute_map = { - 'headers': {'key': 'headers', 'type': 'object'}, - 'status_code': {'key': 'statusCode', 'type': 'int'}, - 'body_link': {'key': 'bodyLink', 'type': 'ContentLink'}, - } - - def __init__(self, *, headers=None, status_code: int=None, body_link=None, **kwargs) -> None: - super(Response, self).__init__(**kwargs) - self.headers = headers - self.status_code = status_code - self.body_link = body_link diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/retry_history.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/retry_history.py deleted file mode 100644 index 462db65034cb..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/retry_history.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RetryHistory(Model): - """The retry history. - - :param start_time: Gets the start time. - :type start_time: datetime - :param end_time: Gets the end time. - :type end_time: datetime - :param code: Gets the status code. - :type code: str - :param client_request_id: Gets the client request Id. - :type client_request_id: str - :param service_request_id: Gets the service request Id. - :type service_request_id: str - :param error: Gets the error response. - :type error: ~azure.mgmt.logic.models.ErrorResponse - """ - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'code': {'key': 'code', 'type': 'str'}, - 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, - 'service_request_id': {'key': 'serviceRequestId', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'ErrorResponse'}, - } - - def __init__(self, **kwargs): - super(RetryHistory, self).__init__(**kwargs) - self.start_time = kwargs.get('start_time', None) - self.end_time = kwargs.get('end_time', None) - self.code = kwargs.get('code', None) - self.client_request_id = kwargs.get('client_request_id', None) - self.service_request_id = kwargs.get('service_request_id', None) - self.error = kwargs.get('error', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/retry_history_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/retry_history_py3.py deleted file mode 100644 index 543926ea2398..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/retry_history_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RetryHistory(Model): - """The retry history. - - :param start_time: Gets the start time. - :type start_time: datetime - :param end_time: Gets the end time. - :type end_time: datetime - :param code: Gets the status code. - :type code: str - :param client_request_id: Gets the client request Id. - :type client_request_id: str - :param service_request_id: Gets the service request Id. - :type service_request_id: str - :param error: Gets the error response. - :type error: ~azure.mgmt.logic.models.ErrorResponse - """ - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'code': {'key': 'code', 'type': 'str'}, - 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, - 'service_request_id': {'key': 'serviceRequestId', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'ErrorResponse'}, - } - - def __init__(self, *, start_time=None, end_time=None, code: str=None, client_request_id: str=None, service_request_id: str=None, error=None, **kwargs) -> None: - super(RetryHistory, self).__init__(**kwargs) - self.start_time = start_time - self.end_time = end_time - self.code = code - self.client_request_id = client_request_id - self.service_request_id = service_request_id - self.error = error diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/run_action_correlation.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/run_action_correlation.py deleted file mode 100644 index 0eefdd86e0a1..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/run_action_correlation.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .run_correlation import RunCorrelation - - -class RunActionCorrelation(RunCorrelation): - """The workflow run action correlation properties. - - :param client_tracking_id: The client tracking identifier. - :type client_tracking_id: str - :param client_keywords: The client keywords. - :type client_keywords: list[str] - :param action_tracking_id: The action tracking identifier. - :type action_tracking_id: str - """ - - _attribute_map = { - 'client_tracking_id': {'key': 'clientTrackingId', 'type': 'str'}, - 'client_keywords': {'key': 'clientKeywords', 'type': '[str]'}, - 'action_tracking_id': {'key': 'actionTrackingId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RunActionCorrelation, self).__init__(**kwargs) - self.action_tracking_id = kwargs.get('action_tracking_id', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/run_action_correlation_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/run_action_correlation_py3.py deleted file mode 100644 index cd46a9dc3d81..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/run_action_correlation_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .run_correlation_py3 import RunCorrelation - - -class RunActionCorrelation(RunCorrelation): - """The workflow run action correlation properties. - - :param client_tracking_id: The client tracking identifier. - :type client_tracking_id: str - :param client_keywords: The client keywords. - :type client_keywords: list[str] - :param action_tracking_id: The action tracking identifier. - :type action_tracking_id: str - """ - - _attribute_map = { - 'client_tracking_id': {'key': 'clientTrackingId', 'type': 'str'}, - 'client_keywords': {'key': 'clientKeywords', 'type': '[str]'}, - 'action_tracking_id': {'key': 'actionTrackingId', 'type': 'str'}, - } - - def __init__(self, *, client_tracking_id: str=None, client_keywords=None, action_tracking_id: str=None, **kwargs) -> None: - super(RunActionCorrelation, self).__init__(client_tracking_id=client_tracking_id, client_keywords=client_keywords, **kwargs) - self.action_tracking_id = action_tracking_id diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/run_correlation.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/run_correlation.py deleted file mode 100644 index 20463c7ae904..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/run_correlation.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCorrelation(Model): - """The correlation properties. - - :param client_tracking_id: The client tracking identifier. - :type client_tracking_id: str - :param client_keywords: The client keywords. - :type client_keywords: list[str] - """ - - _attribute_map = { - 'client_tracking_id': {'key': 'clientTrackingId', 'type': 'str'}, - 'client_keywords': {'key': 'clientKeywords', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(RunCorrelation, self).__init__(**kwargs) - self.client_tracking_id = kwargs.get('client_tracking_id', None) - self.client_keywords = kwargs.get('client_keywords', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/run_correlation_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/run_correlation_py3.py deleted file mode 100644 index f4c5a7e9f2fa..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/run_correlation_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RunCorrelation(Model): - """The correlation properties. - - :param client_tracking_id: The client tracking identifier. - :type client_tracking_id: str - :param client_keywords: The client keywords. - :type client_keywords: list[str] - """ - - _attribute_map = { - 'client_tracking_id': {'key': 'clientTrackingId', 'type': 'str'}, - 'client_keywords': {'key': 'clientKeywords', 'type': '[str]'}, - } - - def __init__(self, *, client_tracking_id: str=None, client_keywords=None, **kwargs) -> None: - super(RunCorrelation, self).__init__(**kwargs) - self.client_tracking_id = client_tracking_id - self.client_keywords = client_keywords diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/set_trigger_state_action_definition.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/set_trigger_state_action_definition.py deleted file mode 100644 index 526aa19de353..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/set_trigger_state_action_definition.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SetTriggerStateActionDefinition(Model): - """SetTriggerStateActionDefinition. - - All required parameters must be populated in order to send to Azure. - - :param source: Required. - :type source: ~azure.mgmt.logic.models.WorkflowTrigger - """ - - _validation = { - 'source': {'required': True}, - } - - _attribute_map = { - 'source': {'key': 'source', 'type': 'WorkflowTrigger'}, - } - - def __init__(self, **kwargs): - super(SetTriggerStateActionDefinition, self).__init__(**kwargs) - self.source = kwargs.get('source', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/set_trigger_state_action_definition_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/set_trigger_state_action_definition_py3.py deleted file mode 100644 index 7a1cea7f3c86..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/set_trigger_state_action_definition_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SetTriggerStateActionDefinition(Model): - """SetTriggerStateActionDefinition. - - All required parameters must be populated in order to send to Azure. - - :param source: Required. - :type source: ~azure.mgmt.logic.models.WorkflowTrigger - """ - - _validation = { - 'source': {'required': True}, - } - - _attribute_map = { - 'source': {'key': 'source', 'type': 'WorkflowTrigger'}, - } - - def __init__(self, *, source, **kwargs) -> None: - super(SetTriggerStateActionDefinition, self).__init__(**kwargs) - self.source = source diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/sku.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/sku.py deleted file mode 100644 index 6fb044da22b3..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/sku.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Sku(Model): - """The sku type. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name. Possible values include: 'NotSpecified', - 'Free', 'Shared', 'Basic', 'Standard', 'Premium' - :type name: str or ~azure.mgmt.logic.models.SkuName - :param plan: The reference to plan. - :type plan: ~azure.mgmt.logic.models.ResourceReference - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'plan': {'key': 'plan', 'type': 'ResourceReference'}, - } - - def __init__(self, **kwargs): - super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.plan = kwargs.get('plan', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/sku_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/sku_py3.py deleted file mode 100644 index f8dfc5c7f277..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/sku_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Sku(Model): - """The sku type. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name. Possible values include: 'NotSpecified', - 'Free', 'Shared', 'Basic', 'Standard', 'Premium' - :type name: str or ~azure.mgmt.logic.models.SkuName - :param plan: The reference to plan. - :type plan: ~azure.mgmt.logic.models.ResourceReference - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'plan': {'key': 'plan', 'type': 'ResourceReference'}, - } - - def __init__(self, *, name, plan=None, **kwargs) -> None: - super(Sku, self).__init__(**kwargs) - self.name = name - self.plan = plan diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/sub_resource.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/sub_resource.py deleted file mode 100644 index 1e47e072835d..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/sub_resource.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResource(Model): - """The sub resource type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource id. - :vartype id: str - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = None diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/sub_resource_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/sub_resource_py3.py deleted file mode 100644 index 5654b9bf9a14..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/sub_resource_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubResource(Model): - """The sub resource type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource id. - :vartype id: str - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = None diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/tracking_event.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/tracking_event.py deleted file mode 100644 index 505ce146ce76..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/tracking_event.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TrackingEvent(Model): - """TrackingEvent. - - All required parameters must be populated in order to send to Azure. - - :param event_level: Required. Possible values include: 'LogAlways', - 'Critical', 'Error', 'Warning', 'Informational', 'Verbose' - :type event_level: str or ~azure.mgmt.logic.models.EventLevel - :param event_time: Required. - :type event_time: datetime - :param record_type: Required. Possible values include: 'NotSpecified', - 'Custom', 'AS2Message', 'AS2MDN', 'X12Interchange', 'X12FunctionalGroup', - 'X12TransactionSet', 'X12InterchangeAcknowledgment', - 'X12FunctionalGroupAcknowledgment', 'X12TransactionSetAcknowledgment', - 'EdifactInterchange', 'EdifactFunctionalGroup', 'EdifactTransactionSet', - 'EdifactInterchangeAcknowledgment', - 'EdifactFunctionalGroupAcknowledgment', - 'EdifactTransactionSetAcknowledgment' - :type record_type: str or ~azure.mgmt.logic.models.TrackingRecordType - :param error: - :type error: ~azure.mgmt.logic.models.TrackingEventErrorInfo - """ - - _validation = { - 'event_level': {'required': True}, - 'event_time': {'required': True}, - 'record_type': {'required': True}, - } - - _attribute_map = { - 'event_level': {'key': 'eventLevel', 'type': 'EventLevel'}, - 'event_time': {'key': 'eventTime', 'type': 'iso-8601'}, - 'record_type': {'key': 'recordType', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'TrackingEventErrorInfo'}, - } - - def __init__(self, **kwargs): - super(TrackingEvent, self).__init__(**kwargs) - self.event_level = kwargs.get('event_level', None) - self.event_time = kwargs.get('event_time', None) - self.record_type = kwargs.get('record_type', None) - self.error = kwargs.get('error', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/tracking_event_error_info.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/tracking_event_error_info.py deleted file mode 100644 index c48b9766013d..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/tracking_event_error_info.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TrackingEventErrorInfo(Model): - """TrackingEventErrorInfo. - - :param message: - :type message: str - :param code: - :type code: str - """ - - _attribute_map = { - 'message': {'key': 'message', 'type': 'str'}, - 'code': {'key': 'code', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TrackingEventErrorInfo, self).__init__(**kwargs) - self.message = kwargs.get('message', None) - self.code = kwargs.get('code', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/tracking_event_error_info_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/tracking_event_error_info_py3.py deleted file mode 100644 index 1f32ee71cf18..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/tracking_event_error_info_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TrackingEventErrorInfo(Model): - """TrackingEventErrorInfo. - - :param message: - :type message: str - :param code: - :type code: str - """ - - _attribute_map = { - 'message': {'key': 'message', 'type': 'str'}, - 'code': {'key': 'code', 'type': 'str'}, - } - - def __init__(self, *, message: str=None, code: str=None, **kwargs) -> None: - super(TrackingEventErrorInfo, self).__init__(**kwargs) - self.message = message - self.code = code diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/tracking_event_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/tracking_event_py3.py deleted file mode 100644 index cd6606b4095e..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/tracking_event_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TrackingEvent(Model): - """TrackingEvent. - - All required parameters must be populated in order to send to Azure. - - :param event_level: Required. Possible values include: 'LogAlways', - 'Critical', 'Error', 'Warning', 'Informational', 'Verbose' - :type event_level: str or ~azure.mgmt.logic.models.EventLevel - :param event_time: Required. - :type event_time: datetime - :param record_type: Required. Possible values include: 'NotSpecified', - 'Custom', 'AS2Message', 'AS2MDN', 'X12Interchange', 'X12FunctionalGroup', - 'X12TransactionSet', 'X12InterchangeAcknowledgment', - 'X12FunctionalGroupAcknowledgment', 'X12TransactionSetAcknowledgment', - 'EdifactInterchange', 'EdifactFunctionalGroup', 'EdifactTransactionSet', - 'EdifactInterchangeAcknowledgment', - 'EdifactFunctionalGroupAcknowledgment', - 'EdifactTransactionSetAcknowledgment' - :type record_type: str or ~azure.mgmt.logic.models.TrackingRecordType - :param error: - :type error: ~azure.mgmt.logic.models.TrackingEventErrorInfo - """ - - _validation = { - 'event_level': {'required': True}, - 'event_time': {'required': True}, - 'record_type': {'required': True}, - } - - _attribute_map = { - 'event_level': {'key': 'eventLevel', 'type': 'EventLevel'}, - 'event_time': {'key': 'eventTime', 'type': 'iso-8601'}, - 'record_type': {'key': 'recordType', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'TrackingEventErrorInfo'}, - } - - def __init__(self, *, event_level, event_time, record_type, error=None, **kwargs) -> None: - super(TrackingEvent, self).__init__(**kwargs) - self.event_level = event_level - self.event_time = event_time - self.record_type = record_type - self.error = error diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/tracking_events_definition.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/tracking_events_definition.py deleted file mode 100644 index 5a6dbfdc7261..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/tracking_events_definition.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TrackingEventsDefinition(Model): - """TrackingEventsDefinition. - - All required parameters must be populated in order to send to Azure. - - :param source_type: Required. - :type source_type: str - :param track_events_options: Possible values include: 'None', - 'DisableSourceInfoEnrich' - :type track_events_options: str or - ~azure.mgmt.logic.models.TrackEventsOperationOptions - :param events: Required. - :type events: list[~azure.mgmt.logic.models.TrackingEvent] - """ - - _validation = { - 'source_type': {'required': True}, - 'events': {'required': True}, - } - - _attribute_map = { - 'source_type': {'key': 'sourceType', 'type': 'str'}, - 'track_events_options': {'key': 'trackEventsOptions', 'type': 'str'}, - 'events': {'key': 'events', 'type': '[TrackingEvent]'}, - } - - def __init__(self, **kwargs): - super(TrackingEventsDefinition, self).__init__(**kwargs) - self.source_type = kwargs.get('source_type', None) - self.track_events_options = kwargs.get('track_events_options', None) - self.events = kwargs.get('events', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/tracking_events_definition_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/tracking_events_definition_py3.py deleted file mode 100644 index daa5205fdcab..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/tracking_events_definition_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TrackingEventsDefinition(Model): - """TrackingEventsDefinition. - - All required parameters must be populated in order to send to Azure. - - :param source_type: Required. - :type source_type: str - :param track_events_options: Possible values include: 'None', - 'DisableSourceInfoEnrich' - :type track_events_options: str or - ~azure.mgmt.logic.models.TrackEventsOperationOptions - :param events: Required. - :type events: list[~azure.mgmt.logic.models.TrackingEvent] - """ - - _validation = { - 'source_type': {'required': True}, - 'events': {'required': True}, - } - - _attribute_map = { - 'source_type': {'key': 'sourceType', 'type': 'str'}, - 'track_events_options': {'key': 'trackEventsOptions', 'type': 'str'}, - 'events': {'key': 'events', 'type': '[TrackingEvent]'}, - } - - def __init__(self, *, source_type: str, events, track_events_options=None, **kwargs) -> None: - super(TrackingEventsDefinition, self).__init__(**kwargs) - self.source_type = source_type - self.track_events_options = track_events_options - self.events = events diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow.py deleted file mode 100644 index 3eb751a61197..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow.py +++ /dev/null @@ -1,99 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Workflow(Resource): - """The workflow type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :ivar provisioning_state: Gets the provisioning state. Possible values - include: 'NotSpecified', 'Accepted', 'Running', 'Ready', 'Creating', - 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', - 'Moving', 'Updating', 'Registering', 'Registered', 'Unregistering', - 'Unregistered', 'Completed' - :vartype provisioning_state: str or - ~azure.mgmt.logic.models.WorkflowProvisioningState - :ivar created_time: Gets the created time. - :vartype created_time: datetime - :ivar changed_time: Gets the changed time. - :vartype changed_time: datetime - :param state: The state. Possible values include: 'NotSpecified', - 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' - :type state: str or ~azure.mgmt.logic.models.WorkflowState - :ivar version: Gets the version. - :vartype version: str - :ivar access_endpoint: Gets the access endpoint. - :vartype access_endpoint: str - :param sku: The sku. - :type sku: ~azure.mgmt.logic.models.Sku - :param integration_account: The integration account. - :type integration_account: ~azure.mgmt.logic.models.ResourceReference - :param definition: The definition. - :type definition: object - :param parameters: The parameters. - :type parameters: dict[str, ~azure.mgmt.logic.models.WorkflowParameter] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'created_time': {'readonly': True}, - 'changed_time': {'readonly': True}, - 'version': {'readonly': True}, - 'access_endpoint': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'access_endpoint': {'key': 'properties.accessEndpoint', 'type': 'str'}, - 'sku': {'key': 'properties.sku', 'type': 'Sku'}, - 'integration_account': {'key': 'properties.integrationAccount', 'type': 'ResourceReference'}, - 'definition': {'key': 'properties.definition', 'type': 'object'}, - 'parameters': {'key': 'properties.parameters', 'type': '{WorkflowParameter}'}, - } - - def __init__(self, **kwargs): - super(Workflow, self).__init__(**kwargs) - self.provisioning_state = None - self.created_time = None - self.changed_time = None - self.state = kwargs.get('state', None) - self.version = None - self.access_endpoint = None - self.sku = kwargs.get('sku', None) - self.integration_account = kwargs.get('integration_account', None) - self.definition = kwargs.get('definition', None) - self.parameters = kwargs.get('parameters', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_filter.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_filter.py deleted file mode 100644 index 549db586e998..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_filter.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WorkflowFilter(Model): - """The workflow filter. - - :param state: The state of workflows. Possible values include: - 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' - :type state: str or ~azure.mgmt.logic.models.WorkflowState - """ - - _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WorkflowFilter, self).__init__(**kwargs) - self.state = kwargs.get('state', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_filter_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_filter_py3.py deleted file mode 100644 index d6198d9cebd5..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_filter_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WorkflowFilter(Model): - """The workflow filter. - - :param state: The state of workflows. Possible values include: - 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' - :type state: str or ~azure.mgmt.logic.models.WorkflowState - """ - - _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, - } - - def __init__(self, *, state=None, **kwargs) -> None: - super(WorkflowFilter, self).__init__(**kwargs) - self.state = state diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_output_parameter.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_output_parameter.py deleted file mode 100644 index e2fb9dd653f9..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_output_parameter.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .workflow_parameter import WorkflowParameter - - -class WorkflowOutputParameter(WorkflowParameter): - """The workflow output parameter. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param type: The type. Possible values include: 'NotSpecified', 'String', - 'SecureString', 'Int', 'Float', 'Bool', 'Array', 'Object', 'SecureObject' - :type type: str or ~azure.mgmt.logic.models.ParameterType - :param value: The value. - :type value: object - :param metadata: The metadata. - :type metadata: object - :param description: The description. - :type description: str - :ivar error: Gets the error. - :vartype error: object - """ - - _validation = { - 'error': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'object'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - 'description': {'key': 'description', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(WorkflowOutputParameter, self).__init__(**kwargs) - self.error = None diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_output_parameter_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_output_parameter_py3.py deleted file mode 100644 index 3888935a41b6..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_output_parameter_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .workflow_parameter_py3 import WorkflowParameter - - -class WorkflowOutputParameter(WorkflowParameter): - """The workflow output parameter. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param type: The type. Possible values include: 'NotSpecified', 'String', - 'SecureString', 'Int', 'Float', 'Bool', 'Array', 'Object', 'SecureObject' - :type type: str or ~azure.mgmt.logic.models.ParameterType - :param value: The value. - :type value: object - :param metadata: The metadata. - :type metadata: object - :param description: The description. - :type description: str - :ivar error: Gets the error. - :vartype error: object - """ - - _validation = { - 'error': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'object'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - 'description': {'key': 'description', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'object'}, - } - - def __init__(self, *, type=None, value=None, metadata=None, description: str=None, **kwargs) -> None: - super(WorkflowOutputParameter, self).__init__(type=type, value=value, metadata=metadata, description=description, **kwargs) - self.error = None diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_paged.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_paged.py deleted file mode 100644 index 8b19166fae8b..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class WorkflowPaged(Paged): - """ - A paging container for iterating over a list of :class:`Workflow ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Workflow]'} - } - - def __init__(self, *args, **kwargs): - - super(WorkflowPaged, self).__init__(*args, **kwargs) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_parameter.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_parameter.py deleted file mode 100644 index a8324aa0e4cf..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_parameter.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WorkflowParameter(Model): - """The workflow parameters. - - :param type: The type. Possible values include: 'NotSpecified', 'String', - 'SecureString', 'Int', 'Float', 'Bool', 'Array', 'Object', 'SecureObject' - :type type: str or ~azure.mgmt.logic.models.ParameterType - :param value: The value. - :type value: object - :param metadata: The metadata. - :type metadata: object - :param description: The description. - :type description: str - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'object'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WorkflowParameter, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.value = kwargs.get('value', None) - self.metadata = kwargs.get('metadata', None) - self.description = kwargs.get('description', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_parameter_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_parameter_py3.py deleted file mode 100644 index 3520713bd806..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_parameter_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WorkflowParameter(Model): - """The workflow parameters. - - :param type: The type. Possible values include: 'NotSpecified', 'String', - 'SecureString', 'Int', 'Float', 'Bool', 'Array', 'Object', 'SecureObject' - :type type: str or ~azure.mgmt.logic.models.ParameterType - :param value: The value. - :type value: object - :param metadata: The metadata. - :type metadata: object - :param description: The description. - :type description: str - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'object'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, type=None, value=None, metadata=None, description: str=None, **kwargs) -> None: - super(WorkflowParameter, self).__init__(**kwargs) - self.type = type - self.value = value - self.metadata = metadata - self.description = description diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_py3.py deleted file mode 100644 index 426874912e25..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_py3.py +++ /dev/null @@ -1,99 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Workflow(Resource): - """The workflow type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :ivar provisioning_state: Gets the provisioning state. Possible values - include: 'NotSpecified', 'Accepted', 'Running', 'Ready', 'Creating', - 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', - 'Moving', 'Updating', 'Registering', 'Registered', 'Unregistering', - 'Unregistered', 'Completed' - :vartype provisioning_state: str or - ~azure.mgmt.logic.models.WorkflowProvisioningState - :ivar created_time: Gets the created time. - :vartype created_time: datetime - :ivar changed_time: Gets the changed time. - :vartype changed_time: datetime - :param state: The state. Possible values include: 'NotSpecified', - 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' - :type state: str or ~azure.mgmt.logic.models.WorkflowState - :ivar version: Gets the version. - :vartype version: str - :ivar access_endpoint: Gets the access endpoint. - :vartype access_endpoint: str - :param sku: The sku. - :type sku: ~azure.mgmt.logic.models.Sku - :param integration_account: The integration account. - :type integration_account: ~azure.mgmt.logic.models.ResourceReference - :param definition: The definition. - :type definition: object - :param parameters: The parameters. - :type parameters: dict[str, ~azure.mgmt.logic.models.WorkflowParameter] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'created_time': {'readonly': True}, - 'changed_time': {'readonly': True}, - 'version': {'readonly': True}, - 'access_endpoint': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'access_endpoint': {'key': 'properties.accessEndpoint', 'type': 'str'}, - 'sku': {'key': 'properties.sku', 'type': 'Sku'}, - 'integration_account': {'key': 'properties.integrationAccount', 'type': 'ResourceReference'}, - 'definition': {'key': 'properties.definition', 'type': 'object'}, - 'parameters': {'key': 'properties.parameters', 'type': '{WorkflowParameter}'}, - } - - def __init__(self, *, location: str=None, tags=None, state=None, sku=None, integration_account=None, definition=None, parameters=None, **kwargs) -> None: - super(Workflow, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = None - self.created_time = None - self.changed_time = None - self.state = state - self.version = None - self.access_endpoint = None - self.sku = sku - self.integration_account = integration_account - self.definition = definition - self.parameters = parameters diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run.py deleted file mode 100644 index b50625d98578..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run.py +++ /dev/null @@ -1,106 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class WorkflowRun(SubResource): - """The workflow run. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar wait_end_time: Gets the wait end time. - :vartype wait_end_time: datetime - :ivar start_time: Gets the start time. - :vartype start_time: datetime - :ivar end_time: Gets the end time. - :vartype end_time: datetime - :ivar status: Gets the status. Possible values include: 'NotSpecified', - 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', - 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' - :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus - :ivar code: Gets the code. - :vartype code: str - :ivar error: Gets the error. - :vartype error: object - :ivar correlation_id: Gets the correlation id. - :vartype correlation_id: str - :param correlation: The run correlation. - :type correlation: ~azure.mgmt.logic.models.Correlation - :ivar workflow: Gets the reference to workflow version. - :vartype workflow: ~azure.mgmt.logic.models.ResourceReference - :ivar trigger: Gets the fired trigger. - :vartype trigger: ~azure.mgmt.logic.models.WorkflowRunTrigger - :ivar outputs: Gets the outputs. - :vartype outputs: dict[str, - ~azure.mgmt.logic.models.WorkflowOutputParameter] - :ivar response: Gets the response of the flow run. - :vartype response: ~azure.mgmt.logic.models.WorkflowRunTrigger - :ivar name: Gets the workflow run name. - :vartype name: str - :ivar type: Gets the workflow run type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'wait_end_time': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'status': {'readonly': True}, - 'code': {'readonly': True}, - 'error': {'readonly': True}, - 'correlation_id': {'readonly': True}, - 'workflow': {'readonly': True}, - 'trigger': {'readonly': True}, - 'outputs': {'readonly': True}, - 'response': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'wait_end_time': {'key': 'properties.waitEndTime', 'type': 'iso-8601'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'code': {'key': 'properties.code', 'type': 'str'}, - 'error': {'key': 'properties.error', 'type': 'object'}, - 'correlation_id': {'key': 'properties.correlationId', 'type': 'str'}, - 'correlation': {'key': 'properties.correlation', 'type': 'Correlation'}, - 'workflow': {'key': 'properties.workflow', 'type': 'ResourceReference'}, - 'trigger': {'key': 'properties.trigger', 'type': 'WorkflowRunTrigger'}, - 'outputs': {'key': 'properties.outputs', 'type': '{WorkflowOutputParameter}'}, - 'response': {'key': 'properties.response', 'type': 'WorkflowRunTrigger'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WorkflowRun, self).__init__(**kwargs) - self.wait_end_time = None - self.start_time = None - self.end_time = None - self.status = None - self.code = None - self.error = None - self.correlation_id = None - self.correlation = kwargs.get('correlation', None) - self.workflow = None - self.trigger = None - self.outputs = None - self.response = None - self.name = None - self.type = None diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action.py deleted file mode 100644 index da538a7febbc..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action.py +++ /dev/null @@ -1,99 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class WorkflowRunAction(SubResource): - """The workflow run action. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar start_time: Gets the start time. - :vartype start_time: datetime - :ivar end_time: Gets the end time. - :vartype end_time: datetime - :ivar status: Gets the status. Possible values include: 'NotSpecified', - 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', - 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' - :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus - :ivar code: Gets the code. - :vartype code: str - :ivar error: Gets the error. - :vartype error: object - :ivar tracking_id: Gets the tracking id. - :vartype tracking_id: str - :param correlation: The correlation properties. - :type correlation: ~azure.mgmt.logic.models.Correlation - :ivar inputs_link: Gets the link to inputs. - :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar outputs_link: Gets the link to outputs. - :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar tracked_properties: Gets the tracked properties. - :vartype tracked_properties: object - :param retry_history: Gets the retry histories. - :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] - :ivar name: Gets the workflow run action name. - :vartype name: str - :ivar type: Gets the workflow run action type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'status': {'readonly': True}, - 'code': {'readonly': True}, - 'error': {'readonly': True}, - 'tracking_id': {'readonly': True}, - 'inputs_link': {'readonly': True}, - 'outputs_link': {'readonly': True}, - 'tracked_properties': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'code': {'key': 'properties.code', 'type': 'str'}, - 'error': {'key': 'properties.error', 'type': 'object'}, - 'tracking_id': {'key': 'properties.trackingId', 'type': 'str'}, - 'correlation': {'key': 'properties.correlation', 'type': 'Correlation'}, - 'inputs_link': {'key': 'properties.inputsLink', 'type': 'ContentLink'}, - 'outputs_link': {'key': 'properties.outputsLink', 'type': 'ContentLink'}, - 'tracked_properties': {'key': 'properties.trackedProperties', 'type': 'object'}, - 'retry_history': {'key': 'properties.retryHistory', 'type': '[RetryHistory]'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WorkflowRunAction, self).__init__(**kwargs) - self.start_time = None - self.end_time = None - self.status = None - self.code = None - self.error = None - self.tracking_id = None - self.correlation = kwargs.get('correlation', None) - self.inputs_link = None - self.outputs_link = None - self.tracked_properties = None - self.retry_history = kwargs.get('retry_history', None) - self.name = None - self.type = None diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_filter.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_filter.py deleted file mode 100644 index a8f4cb3b42a2..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_filter.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WorkflowRunActionFilter(Model): - """The workflow run action filter. - - :param status: The status of workflow run action. Possible values include: - 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', - 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', - 'Ignored' - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WorkflowRunActionFilter, self).__init__(**kwargs) - self.status = kwargs.get('status', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_filter_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_filter_py3.py deleted file mode 100644 index 4be8cc72a7ae..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_filter_py3.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WorkflowRunActionFilter(Model): - """The workflow run action filter. - - :param status: The status of workflow run action. Possible values include: - 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', - 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', - 'Ignored' - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__(self, *, status=None, **kwargs) -> None: - super(WorkflowRunActionFilter, self).__init__(**kwargs) - self.status = status diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_paged.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_paged.py deleted file mode 100644 index 4f541f4f2d8e..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class WorkflowRunActionPaged(Paged): - """ - A paging container for iterating over a list of :class:`WorkflowRunAction ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[WorkflowRunAction]'} - } - - def __init__(self, *args, **kwargs): - - super(WorkflowRunActionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_py3.py deleted file mode 100644 index 55f6f04efd36..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_py3.py +++ /dev/null @@ -1,99 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class WorkflowRunAction(SubResource): - """The workflow run action. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar start_time: Gets the start time. - :vartype start_time: datetime - :ivar end_time: Gets the end time. - :vartype end_time: datetime - :ivar status: Gets the status. Possible values include: 'NotSpecified', - 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', - 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' - :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus - :ivar code: Gets the code. - :vartype code: str - :ivar error: Gets the error. - :vartype error: object - :ivar tracking_id: Gets the tracking id. - :vartype tracking_id: str - :param correlation: The correlation properties. - :type correlation: ~azure.mgmt.logic.models.Correlation - :ivar inputs_link: Gets the link to inputs. - :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar outputs_link: Gets the link to outputs. - :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar tracked_properties: Gets the tracked properties. - :vartype tracked_properties: object - :param retry_history: Gets the retry histories. - :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] - :ivar name: Gets the workflow run action name. - :vartype name: str - :ivar type: Gets the workflow run action type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'status': {'readonly': True}, - 'code': {'readonly': True}, - 'error': {'readonly': True}, - 'tracking_id': {'readonly': True}, - 'inputs_link': {'readonly': True}, - 'outputs_link': {'readonly': True}, - 'tracked_properties': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'code': {'key': 'properties.code', 'type': 'str'}, - 'error': {'key': 'properties.error', 'type': 'object'}, - 'tracking_id': {'key': 'properties.trackingId', 'type': 'str'}, - 'correlation': {'key': 'properties.correlation', 'type': 'Correlation'}, - 'inputs_link': {'key': 'properties.inputsLink', 'type': 'ContentLink'}, - 'outputs_link': {'key': 'properties.outputsLink', 'type': 'ContentLink'}, - 'tracked_properties': {'key': 'properties.trackedProperties', 'type': 'object'}, - 'retry_history': {'key': 'properties.retryHistory', 'type': '[RetryHistory]'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, correlation=None, retry_history=None, **kwargs) -> None: - super(WorkflowRunAction, self).__init__(**kwargs) - self.start_time = None - self.end_time = None - self.status = None - self.code = None - self.error = None - self.tracking_id = None - self.correlation = correlation - self.inputs_link = None - self.outputs_link = None - self.tracked_properties = None - self.retry_history = retry_history - self.name = None - self.type = None diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition.py deleted file mode 100644 index 9641f4bf5efd..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition.py +++ /dev/null @@ -1,117 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class WorkflowRunActionRepetitionDefinition(Resource): - """The workflow run action repetition definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param start_time: The start time of the workflow scope repetition. - :type start_time: datetime - :param end_time: The end time of the workflow scope repetition. - :type end_time: datetime - :param correlation: The correlation properties. - :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation - :param status: The status of the workflow scope repetition. Possible - values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', - 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', - 'TimedOut', 'Aborted', 'Ignored' - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus - :param code: The workflow scope repetition code. - :type code: str - :param error: - :type error: object - :ivar tracking_id: Gets the tracking id. - :vartype tracking_id: str - :ivar inputs: Gets the inputs. - :vartype inputs: object - :ivar inputs_link: Gets the link to inputs. - :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar outputs: Gets the outputs. - :vartype outputs: object - :ivar outputs_link: Gets the link to outputs. - :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar tracked_properties: Gets the tracked properties. - :vartype tracked_properties: object - :param retry_history: Gets the retry histories. - :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] - :param iteration_count: - :type iteration_count: int - :param repetition_indexes: The repetition indexes. - :type repetition_indexes: list[~azure.mgmt.logic.models.RepetitionIndex] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tracking_id': {'readonly': True}, - 'inputs': {'readonly': True}, - 'inputs_link': {'readonly': True}, - 'outputs': {'readonly': True}, - 'outputs_link': {'readonly': True}, - 'tracked_properties': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'correlation': {'key': 'properties.correlation', 'type': 'RunActionCorrelation'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'code': {'key': 'properties.code', 'type': 'str'}, - 'error': {'key': 'properties.error', 'type': 'object'}, - 'tracking_id': {'key': 'properties.trackingId', 'type': 'str'}, - 'inputs': {'key': 'properties.inputs', 'type': 'object'}, - 'inputs_link': {'key': 'properties.inputsLink', 'type': 'ContentLink'}, - 'outputs': {'key': 'properties.outputs', 'type': 'object'}, - 'outputs_link': {'key': 'properties.outputsLink', 'type': 'ContentLink'}, - 'tracked_properties': {'key': 'properties.trackedProperties', 'type': 'object'}, - 'retry_history': {'key': 'properties.retryHistory', 'type': '[RetryHistory]'}, - 'iteration_count': {'key': 'properties.iterationCount', 'type': 'int'}, - 'repetition_indexes': {'key': 'properties.repetitionIndexes', 'type': '[RepetitionIndex]'}, - } - - def __init__(self, **kwargs): - super(WorkflowRunActionRepetitionDefinition, self).__init__(**kwargs) - self.start_time = kwargs.get('start_time', None) - self.end_time = kwargs.get('end_time', None) - self.correlation = kwargs.get('correlation', None) - self.status = kwargs.get('status', None) - self.code = kwargs.get('code', None) - self.error = kwargs.get('error', None) - self.tracking_id = None - self.inputs = None - self.inputs_link = None - self.outputs = None - self.outputs_link = None - self.tracked_properties = None - self.retry_history = kwargs.get('retry_history', None) - self.iteration_count = kwargs.get('iteration_count', None) - self.repetition_indexes = kwargs.get('repetition_indexes', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition_collection.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition_collection.py deleted file mode 100644 index 2579dd8d91d5..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition_collection.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WorkflowRunActionRepetitionDefinitionCollection(Model): - """A collection of workflow run action repetitions. - - :param value: - :type value: - list[~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinition] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[WorkflowRunActionRepetitionDefinition]'}, - } - - def __init__(self, **kwargs): - super(WorkflowRunActionRepetitionDefinitionCollection, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition_collection_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition_collection_py3.py deleted file mode 100644 index 8e91a4d9e493..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition_collection_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WorkflowRunActionRepetitionDefinitionCollection(Model): - """A collection of workflow run action repetitions. - - :param value: - :type value: - list[~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinition] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[WorkflowRunActionRepetitionDefinition]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(WorkflowRunActionRepetitionDefinitionCollection, self).__init__(**kwargs) - self.value = value diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition_paged.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition_paged.py deleted file mode 100644 index edb3bdb62a07..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class WorkflowRunActionRepetitionDefinitionPaged(Paged): - """ - A paging container for iterating over a list of :class:`WorkflowRunActionRepetitionDefinition ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[WorkflowRunActionRepetitionDefinition]'} - } - - def __init__(self, *args, **kwargs): - - super(WorkflowRunActionRepetitionDefinitionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition_py3.py deleted file mode 100644 index 292223cb763a..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition_py3.py +++ /dev/null @@ -1,117 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class WorkflowRunActionRepetitionDefinition(Resource): - """The workflow run action repetition definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param start_time: The start time of the workflow scope repetition. - :type start_time: datetime - :param end_time: The end time of the workflow scope repetition. - :type end_time: datetime - :param correlation: The correlation properties. - :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation - :param status: The status of the workflow scope repetition. Possible - values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', - 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', - 'TimedOut', 'Aborted', 'Ignored' - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus - :param code: The workflow scope repetition code. - :type code: str - :param error: - :type error: object - :ivar tracking_id: Gets the tracking id. - :vartype tracking_id: str - :ivar inputs: Gets the inputs. - :vartype inputs: object - :ivar inputs_link: Gets the link to inputs. - :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar outputs: Gets the outputs. - :vartype outputs: object - :ivar outputs_link: Gets the link to outputs. - :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar tracked_properties: Gets the tracked properties. - :vartype tracked_properties: object - :param retry_history: Gets the retry histories. - :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] - :param iteration_count: - :type iteration_count: int - :param repetition_indexes: The repetition indexes. - :type repetition_indexes: list[~azure.mgmt.logic.models.RepetitionIndex] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tracking_id': {'readonly': True}, - 'inputs': {'readonly': True}, - 'inputs_link': {'readonly': True}, - 'outputs': {'readonly': True}, - 'outputs_link': {'readonly': True}, - 'tracked_properties': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'correlation': {'key': 'properties.correlation', 'type': 'RunActionCorrelation'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'code': {'key': 'properties.code', 'type': 'str'}, - 'error': {'key': 'properties.error', 'type': 'object'}, - 'tracking_id': {'key': 'properties.trackingId', 'type': 'str'}, - 'inputs': {'key': 'properties.inputs', 'type': 'object'}, - 'inputs_link': {'key': 'properties.inputsLink', 'type': 'ContentLink'}, - 'outputs': {'key': 'properties.outputs', 'type': 'object'}, - 'outputs_link': {'key': 'properties.outputsLink', 'type': 'ContentLink'}, - 'tracked_properties': {'key': 'properties.trackedProperties', 'type': 'object'}, - 'retry_history': {'key': 'properties.retryHistory', 'type': '[RetryHistory]'}, - 'iteration_count': {'key': 'properties.iterationCount', 'type': 'int'}, - 'repetition_indexes': {'key': 'properties.repetitionIndexes', 'type': '[RepetitionIndex]'}, - } - - def __init__(self, *, location: str=None, tags=None, start_time=None, end_time=None, correlation=None, status=None, code: str=None, error=None, retry_history=None, iteration_count: int=None, repetition_indexes=None, **kwargs) -> None: - super(WorkflowRunActionRepetitionDefinition, self).__init__(location=location, tags=tags, **kwargs) - self.start_time = start_time - self.end_time = end_time - self.correlation = correlation - self.status = status - self.code = code - self.error = error - self.tracking_id = None - self.inputs = None - self.inputs_link = None - self.outputs = None - self.outputs_link = None - self.tracked_properties = None - self.retry_history = retry_history - self.iteration_count = iteration_count - self.repetition_indexes = repetition_indexes diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_filter.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_filter.py deleted file mode 100644 index 0aef8eda5ff0..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_filter.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WorkflowRunFilter(Model): - """The workflow run filter. - - :param status: The status of workflow run. Possible values include: - 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', - 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', - 'Ignored' - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WorkflowRunFilter, self).__init__(**kwargs) - self.status = kwargs.get('status', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_filter_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_filter_py3.py deleted file mode 100644 index b79a254ff7a8..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_filter_py3.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WorkflowRunFilter(Model): - """The workflow run filter. - - :param status: The status of workflow run. Possible values include: - 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', - 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', - 'Ignored' - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__(self, *, status=None, **kwargs) -> None: - super(WorkflowRunFilter, self).__init__(**kwargs) - self.status = status diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_paged.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_paged.py deleted file mode 100644 index 877053124bea..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class WorkflowRunPaged(Paged): - """ - A paging container for iterating over a list of :class:`WorkflowRun ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[WorkflowRun]'} - } - - def __init__(self, *args, **kwargs): - - super(WorkflowRunPaged, self).__init__(*args, **kwargs) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_py3.py deleted file mode 100644 index 25325bb406a0..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_py3.py +++ /dev/null @@ -1,106 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class WorkflowRun(SubResource): - """The workflow run. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar wait_end_time: Gets the wait end time. - :vartype wait_end_time: datetime - :ivar start_time: Gets the start time. - :vartype start_time: datetime - :ivar end_time: Gets the end time. - :vartype end_time: datetime - :ivar status: Gets the status. Possible values include: 'NotSpecified', - 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', - 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' - :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus - :ivar code: Gets the code. - :vartype code: str - :ivar error: Gets the error. - :vartype error: object - :ivar correlation_id: Gets the correlation id. - :vartype correlation_id: str - :param correlation: The run correlation. - :type correlation: ~azure.mgmt.logic.models.Correlation - :ivar workflow: Gets the reference to workflow version. - :vartype workflow: ~azure.mgmt.logic.models.ResourceReference - :ivar trigger: Gets the fired trigger. - :vartype trigger: ~azure.mgmt.logic.models.WorkflowRunTrigger - :ivar outputs: Gets the outputs. - :vartype outputs: dict[str, - ~azure.mgmt.logic.models.WorkflowOutputParameter] - :ivar response: Gets the response of the flow run. - :vartype response: ~azure.mgmt.logic.models.WorkflowRunTrigger - :ivar name: Gets the workflow run name. - :vartype name: str - :ivar type: Gets the workflow run type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'wait_end_time': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'status': {'readonly': True}, - 'code': {'readonly': True}, - 'error': {'readonly': True}, - 'correlation_id': {'readonly': True}, - 'workflow': {'readonly': True}, - 'trigger': {'readonly': True}, - 'outputs': {'readonly': True}, - 'response': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'wait_end_time': {'key': 'properties.waitEndTime', 'type': 'iso-8601'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'code': {'key': 'properties.code', 'type': 'str'}, - 'error': {'key': 'properties.error', 'type': 'object'}, - 'correlation_id': {'key': 'properties.correlationId', 'type': 'str'}, - 'correlation': {'key': 'properties.correlation', 'type': 'Correlation'}, - 'workflow': {'key': 'properties.workflow', 'type': 'ResourceReference'}, - 'trigger': {'key': 'properties.trigger', 'type': 'WorkflowRunTrigger'}, - 'outputs': {'key': 'properties.outputs', 'type': '{WorkflowOutputParameter}'}, - 'response': {'key': 'properties.response', 'type': 'WorkflowRunTrigger'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, correlation=None, **kwargs) -> None: - super(WorkflowRun, self).__init__(**kwargs) - self.wait_end_time = None - self.start_time = None - self.end_time = None - self.status = None - self.code = None - self.error = None - self.correlation_id = None - self.correlation = correlation - self.workflow = None - self.trigger = None - self.outputs = None - self.response = None - self.name = None - self.type = None diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_trigger.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_trigger.py deleted file mode 100644 index 5d72f0d0377c..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_trigger.py +++ /dev/null @@ -1,101 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WorkflowRunTrigger(Model): - """The workflow run trigger. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Gets the name. - :vartype name: str - :ivar inputs: Gets the inputs. - :vartype inputs: object - :ivar inputs_link: Gets the link to inputs. - :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar outputs: Gets the outputs. - :vartype outputs: object - :ivar outputs_link: Gets the link to outputs. - :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar scheduled_time: Gets the scheduled time. - :vartype scheduled_time: datetime - :ivar start_time: Gets the start time. - :vartype start_time: datetime - :ivar end_time: Gets the end time. - :vartype end_time: datetime - :ivar tracking_id: Gets the tracking id. - :vartype tracking_id: str - :param correlation: The run correlation. - :type correlation: ~azure.mgmt.logic.models.Correlation - :ivar code: Gets the code. - :vartype code: str - :ivar status: Gets the status. Possible values include: 'NotSpecified', - 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', - 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' - :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus - :ivar error: Gets the error. - :vartype error: object - :ivar tracked_properties: Gets the tracked properties. - :vartype tracked_properties: object - """ - - _validation = { - 'name': {'readonly': True}, - 'inputs': {'readonly': True}, - 'inputs_link': {'readonly': True}, - 'outputs': {'readonly': True}, - 'outputs_link': {'readonly': True}, - 'scheduled_time': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'tracking_id': {'readonly': True}, - 'code': {'readonly': True}, - 'status': {'readonly': True}, - 'error': {'readonly': True}, - 'tracked_properties': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': 'object'}, - 'inputs_link': {'key': 'inputsLink', 'type': 'ContentLink'}, - 'outputs': {'key': 'outputs', 'type': 'object'}, - 'outputs_link': {'key': 'outputsLink', 'type': 'ContentLink'}, - 'scheduled_time': {'key': 'scheduledTime', 'type': 'iso-8601'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'tracking_id': {'key': 'trackingId', 'type': 'str'}, - 'correlation': {'key': 'correlation', 'type': 'Correlation'}, - 'code': {'key': 'code', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'object'}, - 'tracked_properties': {'key': 'trackedProperties', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(WorkflowRunTrigger, self).__init__(**kwargs) - self.name = None - self.inputs = None - self.inputs_link = None - self.outputs = None - self.outputs_link = None - self.scheduled_time = None - self.start_time = None - self.end_time = None - self.tracking_id = None - self.correlation = kwargs.get('correlation', None) - self.code = None - self.status = None - self.error = None - self.tracked_properties = None diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_trigger_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_trigger_py3.py deleted file mode 100644 index 2e6c960a2317..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_trigger_py3.py +++ /dev/null @@ -1,101 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WorkflowRunTrigger(Model): - """The workflow run trigger. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Gets the name. - :vartype name: str - :ivar inputs: Gets the inputs. - :vartype inputs: object - :ivar inputs_link: Gets the link to inputs. - :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar outputs: Gets the outputs. - :vartype outputs: object - :ivar outputs_link: Gets the link to outputs. - :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar scheduled_time: Gets the scheduled time. - :vartype scheduled_time: datetime - :ivar start_time: Gets the start time. - :vartype start_time: datetime - :ivar end_time: Gets the end time. - :vartype end_time: datetime - :ivar tracking_id: Gets the tracking id. - :vartype tracking_id: str - :param correlation: The run correlation. - :type correlation: ~azure.mgmt.logic.models.Correlation - :ivar code: Gets the code. - :vartype code: str - :ivar status: Gets the status. Possible values include: 'NotSpecified', - 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', - 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' - :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus - :ivar error: Gets the error. - :vartype error: object - :ivar tracked_properties: Gets the tracked properties. - :vartype tracked_properties: object - """ - - _validation = { - 'name': {'readonly': True}, - 'inputs': {'readonly': True}, - 'inputs_link': {'readonly': True}, - 'outputs': {'readonly': True}, - 'outputs_link': {'readonly': True}, - 'scheduled_time': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'tracking_id': {'readonly': True}, - 'code': {'readonly': True}, - 'status': {'readonly': True}, - 'error': {'readonly': True}, - 'tracked_properties': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': 'object'}, - 'inputs_link': {'key': 'inputsLink', 'type': 'ContentLink'}, - 'outputs': {'key': 'outputs', 'type': 'object'}, - 'outputs_link': {'key': 'outputsLink', 'type': 'ContentLink'}, - 'scheduled_time': {'key': 'scheduledTime', 'type': 'iso-8601'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'tracking_id': {'key': 'trackingId', 'type': 'str'}, - 'correlation': {'key': 'correlation', 'type': 'Correlation'}, - 'code': {'key': 'code', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'object'}, - 'tracked_properties': {'key': 'trackedProperties', 'type': 'object'}, - } - - def __init__(self, *, correlation=None, **kwargs) -> None: - super(WorkflowRunTrigger, self).__init__(**kwargs) - self.name = None - self.inputs = None - self.inputs_link = None - self.outputs = None - self.outputs_link = None - self.scheduled_time = None - self.start_time = None - self.end_time = None - self.tracking_id = None - self.correlation = correlation - self.code = None - self.status = None - self.error = None - self.tracked_properties = None diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger.py deleted file mode 100644 index 830aac41563e..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger.py +++ /dev/null @@ -1,97 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class WorkflowTrigger(SubResource): - """The workflow trigger. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar provisioning_state: Gets the provisioning state. Possible values - include: 'NotSpecified', 'Accepted', 'Running', 'Ready', 'Creating', - 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', - 'Moving', 'Updating', 'Registering', 'Registered', 'Unregistering', - 'Unregistered', 'Completed' - :vartype provisioning_state: str or - ~azure.mgmt.logic.models.WorkflowTriggerProvisioningState - :ivar created_time: Gets the created time. - :vartype created_time: datetime - :ivar changed_time: Gets the changed time. - :vartype changed_time: datetime - :ivar state: Gets the state. Possible values include: 'NotSpecified', - 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' - :vartype state: str or ~azure.mgmt.logic.models.WorkflowState - :ivar status: Gets the status. Possible values include: 'NotSpecified', - 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', - 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' - :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus - :ivar last_execution_time: Gets the last execution time. - :vartype last_execution_time: datetime - :ivar next_execution_time: Gets the next execution time. - :vartype next_execution_time: datetime - :ivar recurrence: Gets the workflow trigger recurrence. - :vartype recurrence: ~azure.mgmt.logic.models.WorkflowTriggerRecurrence - :ivar workflow: Gets the reference to workflow. - :vartype workflow: ~azure.mgmt.logic.models.ResourceReference - :ivar name: Gets the workflow trigger name. - :vartype name: str - :ivar type: Gets the workflow trigger type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'created_time': {'readonly': True}, - 'changed_time': {'readonly': True}, - 'state': {'readonly': True}, - 'status': {'readonly': True}, - 'last_execution_time': {'readonly': True}, - 'next_execution_time': {'readonly': True}, - 'recurrence': {'readonly': True}, - 'workflow': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'last_execution_time': {'key': 'properties.lastExecutionTime', 'type': 'iso-8601'}, - 'next_execution_time': {'key': 'properties.nextExecutionTime', 'type': 'iso-8601'}, - 'recurrence': {'key': 'properties.recurrence', 'type': 'WorkflowTriggerRecurrence'}, - 'workflow': {'key': 'properties.workflow', 'type': 'ResourceReference'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WorkflowTrigger, self).__init__(**kwargs) - self.provisioning_state = None - self.created_time = None - self.changed_time = None - self.state = None - self.status = None - self.last_execution_time = None - self.next_execution_time = None - self.recurrence = None - self.workflow = None - self.name = None - self.type = None diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_callback_url.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_callback_url.py deleted file mode 100644 index 77e7b4cdc13e..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_callback_url.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WorkflowTriggerCallbackUrl(Model): - """The workflow trigger callback URL. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: Gets the workflow trigger callback URL. - :vartype value: str - :ivar method: Gets the workflow trigger callback URL HTTP method. - :vartype method: str - :ivar base_path: Gets the workflow trigger callback URL base path. - :vartype base_path: str - :ivar relative_path: Gets the workflow trigger callback URL relative path. - :vartype relative_path: str - :param relative_path_parameters: Gets the workflow trigger callback URL - relative path parameters. - :type relative_path_parameters: list[str] - :param queries: Gets the workflow trigger callback URL query parameters. - :type queries: - ~azure.mgmt.logic.models.WorkflowTriggerListCallbackUrlQueries - """ - - _validation = { - 'value': {'readonly': True}, - 'method': {'readonly': True}, - 'base_path': {'readonly': True}, - 'relative_path': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'method': {'key': 'method', 'type': 'str'}, - 'base_path': {'key': 'basePath', 'type': 'str'}, - 'relative_path': {'key': 'relativePath', 'type': 'str'}, - 'relative_path_parameters': {'key': 'relativePathParameters', 'type': '[str]'}, - 'queries': {'key': 'queries', 'type': 'WorkflowTriggerListCallbackUrlQueries'}, - } - - def __init__(self, **kwargs): - super(WorkflowTriggerCallbackUrl, self).__init__(**kwargs) - self.value = None - self.method = None - self.base_path = None - self.relative_path = None - self.relative_path_parameters = kwargs.get('relative_path_parameters', None) - self.queries = kwargs.get('queries', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_callback_url_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_callback_url_py3.py deleted file mode 100644 index 99f6c9c7f080..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_callback_url_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WorkflowTriggerCallbackUrl(Model): - """The workflow trigger callback URL. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: Gets the workflow trigger callback URL. - :vartype value: str - :ivar method: Gets the workflow trigger callback URL HTTP method. - :vartype method: str - :ivar base_path: Gets the workflow trigger callback URL base path. - :vartype base_path: str - :ivar relative_path: Gets the workflow trigger callback URL relative path. - :vartype relative_path: str - :param relative_path_parameters: Gets the workflow trigger callback URL - relative path parameters. - :type relative_path_parameters: list[str] - :param queries: Gets the workflow trigger callback URL query parameters. - :type queries: - ~azure.mgmt.logic.models.WorkflowTriggerListCallbackUrlQueries - """ - - _validation = { - 'value': {'readonly': True}, - 'method': {'readonly': True}, - 'base_path': {'readonly': True}, - 'relative_path': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'method': {'key': 'method', 'type': 'str'}, - 'base_path': {'key': 'basePath', 'type': 'str'}, - 'relative_path': {'key': 'relativePath', 'type': 'str'}, - 'relative_path_parameters': {'key': 'relativePathParameters', 'type': '[str]'}, - 'queries': {'key': 'queries', 'type': 'WorkflowTriggerListCallbackUrlQueries'}, - } - - def __init__(self, *, relative_path_parameters=None, queries=None, **kwargs) -> None: - super(WorkflowTriggerCallbackUrl, self).__init__(**kwargs) - self.value = None - self.method = None - self.base_path = None - self.relative_path = None - self.relative_path_parameters = relative_path_parameters - self.queries = queries diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_filter.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_filter.py deleted file mode 100644 index b0236b37e19b..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_filter.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WorkflowTriggerFilter(Model): - """The workflow trigger filter. - - :param state: The state of workflow trigger. Possible values include: - 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' - :type state: str or ~azure.mgmt.logic.models.WorkflowState - """ - - _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WorkflowTriggerFilter, self).__init__(**kwargs) - self.state = kwargs.get('state', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_filter_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_filter_py3.py deleted file mode 100644 index 9948517c3183..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_filter_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WorkflowTriggerFilter(Model): - """The workflow trigger filter. - - :param state: The state of workflow trigger. Possible values include: - 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' - :type state: str or ~azure.mgmt.logic.models.WorkflowState - """ - - _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, - } - - def __init__(self, *, state=None, **kwargs) -> None: - super(WorkflowTriggerFilter, self).__init__(**kwargs) - self.state = state diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history.py deleted file mode 100644 index 5e69498a6711..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history.py +++ /dev/null @@ -1,100 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource import SubResource - - -class WorkflowTriggerHistory(SubResource): - """The workflow trigger history. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar start_time: Gets the start time. - :vartype start_time: datetime - :ivar end_time: Gets the end time. - :vartype end_time: datetime - :ivar status: Gets the status. Possible values include: 'NotSpecified', - 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', - 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' - :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus - :ivar code: Gets the code. - :vartype code: str - :ivar error: Gets the error. - :vartype error: object - :ivar tracking_id: Gets the tracking id. - :vartype tracking_id: str - :param correlation: The run correlation. - :type correlation: ~azure.mgmt.logic.models.Correlation - :ivar inputs_link: Gets the link to input parameters. - :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar outputs_link: Gets the link to output parameters. - :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar fired: Gets a value indicating whether trigger was fired. - :vartype fired: bool - :ivar run: Gets the reference to workflow run. - :vartype run: ~azure.mgmt.logic.models.ResourceReference - :ivar name: Gets the workflow trigger history name. - :vartype name: str - :ivar type: Gets the workflow trigger history type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'status': {'readonly': True}, - 'code': {'readonly': True}, - 'error': {'readonly': True}, - 'tracking_id': {'readonly': True}, - 'inputs_link': {'readonly': True}, - 'outputs_link': {'readonly': True}, - 'fired': {'readonly': True}, - 'run': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'code': {'key': 'properties.code', 'type': 'str'}, - 'error': {'key': 'properties.error', 'type': 'object'}, - 'tracking_id': {'key': 'properties.trackingId', 'type': 'str'}, - 'correlation': {'key': 'properties.correlation', 'type': 'Correlation'}, - 'inputs_link': {'key': 'properties.inputsLink', 'type': 'ContentLink'}, - 'outputs_link': {'key': 'properties.outputsLink', 'type': 'ContentLink'}, - 'fired': {'key': 'properties.fired', 'type': 'bool'}, - 'run': {'key': 'properties.run', 'type': 'ResourceReference'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WorkflowTriggerHistory, self).__init__(**kwargs) - self.start_time = None - self.end_time = None - self.status = None - self.code = None - self.error = None - self.tracking_id = None - self.correlation = kwargs.get('correlation', None) - self.inputs_link = None - self.outputs_link = None - self.fired = None - self.run = None - self.name = None - self.type = None diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_filter.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_filter.py deleted file mode 100644 index 0445f68dd948..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_filter.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WorkflowTriggerHistoryFilter(Model): - """The workflow trigger history filter. - - :param status: The status of workflow trigger history. Possible values - include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', - 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', - 'Aborted', 'Ignored' - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WorkflowTriggerHistoryFilter, self).__init__(**kwargs) - self.status = kwargs.get('status', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_filter_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_filter_py3.py deleted file mode 100644 index 1159f3f1d618..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_filter_py3.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WorkflowTriggerHistoryFilter(Model): - """The workflow trigger history filter. - - :param status: The status of workflow trigger history. Possible values - include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', - 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', - 'Aborted', 'Ignored' - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__(self, *, status=None, **kwargs) -> None: - super(WorkflowTriggerHistoryFilter, self).__init__(**kwargs) - self.status = status diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_paged.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_paged.py deleted file mode 100644 index 87124d3bd7f6..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class WorkflowTriggerHistoryPaged(Paged): - """ - A paging container for iterating over a list of :class:`WorkflowTriggerHistory ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[WorkflowTriggerHistory]'} - } - - def __init__(self, *args, **kwargs): - - super(WorkflowTriggerHistoryPaged, self).__init__(*args, **kwargs) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_py3.py deleted file mode 100644 index 60b7bc386d0a..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_py3.py +++ /dev/null @@ -1,100 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class WorkflowTriggerHistory(SubResource): - """The workflow trigger history. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar start_time: Gets the start time. - :vartype start_time: datetime - :ivar end_time: Gets the end time. - :vartype end_time: datetime - :ivar status: Gets the status. Possible values include: 'NotSpecified', - 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', - 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' - :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus - :ivar code: Gets the code. - :vartype code: str - :ivar error: Gets the error. - :vartype error: object - :ivar tracking_id: Gets the tracking id. - :vartype tracking_id: str - :param correlation: The run correlation. - :type correlation: ~azure.mgmt.logic.models.Correlation - :ivar inputs_link: Gets the link to input parameters. - :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar outputs_link: Gets the link to output parameters. - :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar fired: Gets a value indicating whether trigger was fired. - :vartype fired: bool - :ivar run: Gets the reference to workflow run. - :vartype run: ~azure.mgmt.logic.models.ResourceReference - :ivar name: Gets the workflow trigger history name. - :vartype name: str - :ivar type: Gets the workflow trigger history type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'status': {'readonly': True}, - 'code': {'readonly': True}, - 'error': {'readonly': True}, - 'tracking_id': {'readonly': True}, - 'inputs_link': {'readonly': True}, - 'outputs_link': {'readonly': True}, - 'fired': {'readonly': True}, - 'run': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'code': {'key': 'properties.code', 'type': 'str'}, - 'error': {'key': 'properties.error', 'type': 'object'}, - 'tracking_id': {'key': 'properties.trackingId', 'type': 'str'}, - 'correlation': {'key': 'properties.correlation', 'type': 'Correlation'}, - 'inputs_link': {'key': 'properties.inputsLink', 'type': 'ContentLink'}, - 'outputs_link': {'key': 'properties.outputsLink', 'type': 'ContentLink'}, - 'fired': {'key': 'properties.fired', 'type': 'bool'}, - 'run': {'key': 'properties.run', 'type': 'ResourceReference'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, correlation=None, **kwargs) -> None: - super(WorkflowTriggerHistory, self).__init__(**kwargs) - self.start_time = None - self.end_time = None - self.status = None - self.code = None - self.error = None - self.tracking_id = None - self.correlation = correlation - self.inputs_link = None - self.outputs_link = None - self.fired = None - self.run = None - self.name = None - self.type = None diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_list_callback_url_queries.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_list_callback_url_queries.py deleted file mode 100644 index 99ed8eac51b9..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_list_callback_url_queries.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WorkflowTriggerListCallbackUrlQueries(Model): - """Gets the workflow trigger callback URL query parameters. - - :param api_version: The api version. - :type api_version: str - :param sp: The SAS permissions. - :type sp: str - :param sv: The SAS version. - :type sv: str - :param sig: The SAS signature. - :type sig: str - :param se: The SAS timestamp. - :type se: str - """ - - _attribute_map = { - 'api_version': {'key': 'api-version', 'type': 'str'}, - 'sp': {'key': 'sp', 'type': 'str'}, - 'sv': {'key': 'sv', 'type': 'str'}, - 'sig': {'key': 'sig', 'type': 'str'}, - 'se': {'key': 'se', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WorkflowTriggerListCallbackUrlQueries, self).__init__(**kwargs) - self.api_version = kwargs.get('api_version', None) - self.sp = kwargs.get('sp', None) - self.sv = kwargs.get('sv', None) - self.sig = kwargs.get('sig', None) - self.se = kwargs.get('se', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_list_callback_url_queries_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_list_callback_url_queries_py3.py deleted file mode 100644 index e87101e2da19..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_list_callback_url_queries_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WorkflowTriggerListCallbackUrlQueries(Model): - """Gets the workflow trigger callback URL query parameters. - - :param api_version: The api version. - :type api_version: str - :param sp: The SAS permissions. - :type sp: str - :param sv: The SAS version. - :type sv: str - :param sig: The SAS signature. - :type sig: str - :param se: The SAS timestamp. - :type se: str - """ - - _attribute_map = { - 'api_version': {'key': 'api-version', 'type': 'str'}, - 'sp': {'key': 'sp', 'type': 'str'}, - 'sv': {'key': 'sv', 'type': 'str'}, - 'sig': {'key': 'sig', 'type': 'str'}, - 'se': {'key': 'se', 'type': 'str'}, - } - - def __init__(self, *, api_version: str=None, sp: str=None, sv: str=None, sig: str=None, se: str=None, **kwargs) -> None: - super(WorkflowTriggerListCallbackUrlQueries, self).__init__(**kwargs) - self.api_version = api_version - self.sp = sp - self.sv = sv - self.sig = sig - self.se = se diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_paged.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_paged.py deleted file mode 100644 index b433baa67e6e..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class WorkflowTriggerPaged(Paged): - """ - A paging container for iterating over a list of :class:`WorkflowTrigger ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[WorkflowTrigger]'} - } - - def __init__(self, *args, **kwargs): - - super(WorkflowTriggerPaged, self).__init__(*args, **kwargs) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_py3.py deleted file mode 100644 index ee0caecb66a2..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .sub_resource_py3 import SubResource - - -class WorkflowTrigger(SubResource): - """The workflow trigger. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar provisioning_state: Gets the provisioning state. Possible values - include: 'NotSpecified', 'Accepted', 'Running', 'Ready', 'Creating', - 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', - 'Moving', 'Updating', 'Registering', 'Registered', 'Unregistering', - 'Unregistered', 'Completed' - :vartype provisioning_state: str or - ~azure.mgmt.logic.models.WorkflowTriggerProvisioningState - :ivar created_time: Gets the created time. - :vartype created_time: datetime - :ivar changed_time: Gets the changed time. - :vartype changed_time: datetime - :ivar state: Gets the state. Possible values include: 'NotSpecified', - 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' - :vartype state: str or ~azure.mgmt.logic.models.WorkflowState - :ivar status: Gets the status. Possible values include: 'NotSpecified', - 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', - 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' - :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus - :ivar last_execution_time: Gets the last execution time. - :vartype last_execution_time: datetime - :ivar next_execution_time: Gets the next execution time. - :vartype next_execution_time: datetime - :ivar recurrence: Gets the workflow trigger recurrence. - :vartype recurrence: ~azure.mgmt.logic.models.WorkflowTriggerRecurrence - :ivar workflow: Gets the reference to workflow. - :vartype workflow: ~azure.mgmt.logic.models.ResourceReference - :ivar name: Gets the workflow trigger name. - :vartype name: str - :ivar type: Gets the workflow trigger type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'created_time': {'readonly': True}, - 'changed_time': {'readonly': True}, - 'state': {'readonly': True}, - 'status': {'readonly': True}, - 'last_execution_time': {'readonly': True}, - 'next_execution_time': {'readonly': True}, - 'recurrence': {'readonly': True}, - 'workflow': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'last_execution_time': {'key': 'properties.lastExecutionTime', 'type': 'iso-8601'}, - 'next_execution_time': {'key': 'properties.nextExecutionTime', 'type': 'iso-8601'}, - 'recurrence': {'key': 'properties.recurrence', 'type': 'WorkflowTriggerRecurrence'}, - 'workflow': {'key': 'properties.workflow', 'type': 'ResourceReference'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(WorkflowTrigger, self).__init__(**kwargs) - self.provisioning_state = None - self.created_time = None - self.changed_time = None - self.state = None - self.status = None - self.last_execution_time = None - self.next_execution_time = None - self.recurrence = None - self.workflow = None - self.name = None - self.type = None diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_recurrence.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_recurrence.py deleted file mode 100644 index cb1b56e5f228..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_recurrence.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WorkflowTriggerRecurrence(Model): - """The workflow trigger recurrence. - - :param frequency: The frequency. Possible values include: 'NotSpecified', - 'Second', 'Minute', 'Hour', 'Day', 'Week', 'Month', 'Year' - :type frequency: str or ~azure.mgmt.logic.models.RecurrenceFrequency - :param interval: The interval. - :type interval: int - :param start_time: The start time. - :type start_time: str - :param end_time: The end time. - :type end_time: str - :param time_zone: The time zone. - :type time_zone: str - :param schedule: The recurrence schedule. - :type schedule: ~azure.mgmt.logic.models.RecurrenceSchedule - """ - - _attribute_map = { - 'frequency': {'key': 'frequency', 'type': 'str'}, - 'interval': {'key': 'interval', 'type': 'int'}, - 'start_time': {'key': 'startTime', 'type': 'str'}, - 'end_time': {'key': 'endTime', 'type': 'str'}, - 'time_zone': {'key': 'timeZone', 'type': 'str'}, - 'schedule': {'key': 'schedule', 'type': 'RecurrenceSchedule'}, - } - - def __init__(self, **kwargs): - super(WorkflowTriggerRecurrence, self).__init__(**kwargs) - self.frequency = kwargs.get('frequency', None) - self.interval = kwargs.get('interval', None) - self.start_time = kwargs.get('start_time', None) - self.end_time = kwargs.get('end_time', None) - self.time_zone = kwargs.get('time_zone', None) - self.schedule = kwargs.get('schedule', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_recurrence_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_recurrence_py3.py deleted file mode 100644 index e50675b5db36..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_recurrence_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class WorkflowTriggerRecurrence(Model): - """The workflow trigger recurrence. - - :param frequency: The frequency. Possible values include: 'NotSpecified', - 'Second', 'Minute', 'Hour', 'Day', 'Week', 'Month', 'Year' - :type frequency: str or ~azure.mgmt.logic.models.RecurrenceFrequency - :param interval: The interval. - :type interval: int - :param start_time: The start time. - :type start_time: str - :param end_time: The end time. - :type end_time: str - :param time_zone: The time zone. - :type time_zone: str - :param schedule: The recurrence schedule. - :type schedule: ~azure.mgmt.logic.models.RecurrenceSchedule - """ - - _attribute_map = { - 'frequency': {'key': 'frequency', 'type': 'str'}, - 'interval': {'key': 'interval', 'type': 'int'}, - 'start_time': {'key': 'startTime', 'type': 'str'}, - 'end_time': {'key': 'endTime', 'type': 'str'}, - 'time_zone': {'key': 'timeZone', 'type': 'str'}, - 'schedule': {'key': 'schedule', 'type': 'RecurrenceSchedule'}, - } - - def __init__(self, *, frequency=None, interval: int=None, start_time: str=None, end_time: str=None, time_zone: str=None, schedule=None, **kwargs) -> None: - super(WorkflowTriggerRecurrence, self).__init__(**kwargs) - self.frequency = frequency - self.interval = interval - self.start_time = start_time - self.end_time = end_time - self.time_zone = time_zone - self.schedule = schedule diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_version.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_version.py deleted file mode 100644 index ada5d76501f0..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_version.py +++ /dev/null @@ -1,89 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class WorkflowVersion(Resource): - """The workflow version. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :ivar created_time: Gets the created time. - :vartype created_time: datetime - :ivar changed_time: Gets the changed time. - :vartype changed_time: datetime - :param state: The state. Possible values include: 'NotSpecified', - 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' - :type state: str or ~azure.mgmt.logic.models.WorkflowState - :ivar version: Gets the version. - :vartype version: str - :ivar access_endpoint: Gets the access endpoint. - :vartype access_endpoint: str - :param sku: The sku. - :type sku: ~azure.mgmt.logic.models.Sku - :param integration_account: The integration account. - :type integration_account: ~azure.mgmt.logic.models.ResourceReference - :param definition: The definition. - :type definition: object - :param parameters: The parameters. - :type parameters: dict[str, ~azure.mgmt.logic.models.WorkflowParameter] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_time': {'readonly': True}, - 'changed_time': {'readonly': True}, - 'version': {'readonly': True}, - 'access_endpoint': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'access_endpoint': {'key': 'properties.accessEndpoint', 'type': 'str'}, - 'sku': {'key': 'properties.sku', 'type': 'Sku'}, - 'integration_account': {'key': 'properties.integrationAccount', 'type': 'ResourceReference'}, - 'definition': {'key': 'properties.definition', 'type': 'object'}, - 'parameters': {'key': 'properties.parameters', 'type': '{WorkflowParameter}'}, - } - - def __init__(self, **kwargs): - super(WorkflowVersion, self).__init__(**kwargs) - self.created_time = None - self.changed_time = None - self.state = kwargs.get('state', None) - self.version = None - self.access_endpoint = None - self.sku = kwargs.get('sku', None) - self.integration_account = kwargs.get('integration_account', None) - self.definition = kwargs.get('definition', None) - self.parameters = kwargs.get('parameters', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_version_paged.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_version_paged.py deleted file mode 100644 index 10cc6a74589d..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_version_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class WorkflowVersionPaged(Paged): - """ - A paging container for iterating over a list of :class:`WorkflowVersion ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[WorkflowVersion]'} - } - - def __init__(self, *args, **kwargs): - - super(WorkflowVersionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_version_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_version_py3.py deleted file mode 100644 index 26bf2042e5b8..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/workflow_version_py3.py +++ /dev/null @@ -1,89 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class WorkflowVersion(Resource): - """The workflow version. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :ivar created_time: Gets the created time. - :vartype created_time: datetime - :ivar changed_time: Gets the changed time. - :vartype changed_time: datetime - :param state: The state. Possible values include: 'NotSpecified', - 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' - :type state: str or ~azure.mgmt.logic.models.WorkflowState - :ivar version: Gets the version. - :vartype version: str - :ivar access_endpoint: Gets the access endpoint. - :vartype access_endpoint: str - :param sku: The sku. - :type sku: ~azure.mgmt.logic.models.Sku - :param integration_account: The integration account. - :type integration_account: ~azure.mgmt.logic.models.ResourceReference - :param definition: The definition. - :type definition: object - :param parameters: The parameters. - :type parameters: dict[str, ~azure.mgmt.logic.models.WorkflowParameter] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_time': {'readonly': True}, - 'changed_time': {'readonly': True}, - 'version': {'readonly': True}, - 'access_endpoint': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'access_endpoint': {'key': 'properties.accessEndpoint', 'type': 'str'}, - 'sku': {'key': 'properties.sku', 'type': 'Sku'}, - 'integration_account': {'key': 'properties.integrationAccount', 'type': 'ResourceReference'}, - 'definition': {'key': 'properties.definition', 'type': 'object'}, - 'parameters': {'key': 'properties.parameters', 'type': '{WorkflowParameter}'}, - } - - def __init__(self, *, location: str=None, tags=None, state=None, sku=None, integration_account=None, definition=None, parameters=None, **kwargs) -> None: - super(WorkflowVersion, self).__init__(location=location, tags=tags, **kwargs) - self.created_time = None - self.changed_time = None - self.state = state - self.version = None - self.access_endpoint = None - self.sku = sku - self.integration_account = integration_account - self.definition = definition - self.parameters = parameters diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_acknowledgement_settings.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_acknowledgement_settings.py deleted file mode 100644 index f3dd83d1ac68..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_acknowledgement_settings.py +++ /dev/null @@ -1,115 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class X12AcknowledgementSettings(Model): - """The X12 agreement acknowledgement settings. - - All required parameters must be populated in order to send to Azure. - - :param need_technical_acknowledgement: Required. The value indicating - whether technical acknowledgement is needed. - :type need_technical_acknowledgement: bool - :param batch_technical_acknowledgements: Required. The value indicating - whether to batch the technical acknowledgements. - :type batch_technical_acknowledgements: bool - :param need_functional_acknowledgement: Required. The value indicating - whether functional acknowledgement is needed. - :type need_functional_acknowledgement: bool - :param functional_acknowledgement_version: The functional acknowledgement - version. - :type functional_acknowledgement_version: str - :param batch_functional_acknowledgements: Required. The value indicating - whether to batch functional acknowledgements. - :type batch_functional_acknowledgements: bool - :param need_implementation_acknowledgement: Required. The value indicating - whether implementation acknowledgement is needed. - :type need_implementation_acknowledgement: bool - :param implementation_acknowledgement_version: The implementation - acknowledgement version. - :type implementation_acknowledgement_version: str - :param batch_implementation_acknowledgements: Required. The value - indicating whether to batch implementation acknowledgements. - :type batch_implementation_acknowledgements: bool - :param need_loop_for_valid_messages: Required. The value indicating - whether a loop is needed for valid messages. - :type need_loop_for_valid_messages: bool - :param send_synchronous_acknowledgement: Required. The value indicating - whether to send synchronous acknowledgement. - :type send_synchronous_acknowledgement: bool - :param acknowledgement_control_number_prefix: The acknowledgement control - number prefix. - :type acknowledgement_control_number_prefix: str - :param acknowledgement_control_number_suffix: The acknowledgement control - number suffix. - :type acknowledgement_control_number_suffix: str - :param acknowledgement_control_number_lower_bound: Required. The - acknowledgement control number lower bound. - :type acknowledgement_control_number_lower_bound: int - :param acknowledgement_control_number_upper_bound: Required. The - acknowledgement control number upper bound. - :type acknowledgement_control_number_upper_bound: int - :param rollover_acknowledgement_control_number: Required. The value - indicating whether to rollover acknowledgement control number. - :type rollover_acknowledgement_control_number: bool - """ - - _validation = { - 'need_technical_acknowledgement': {'required': True}, - 'batch_technical_acknowledgements': {'required': True}, - 'need_functional_acknowledgement': {'required': True}, - 'batch_functional_acknowledgements': {'required': True}, - 'need_implementation_acknowledgement': {'required': True}, - 'batch_implementation_acknowledgements': {'required': True}, - 'need_loop_for_valid_messages': {'required': True}, - 'send_synchronous_acknowledgement': {'required': True}, - 'acknowledgement_control_number_lower_bound': {'required': True}, - 'acknowledgement_control_number_upper_bound': {'required': True}, - 'rollover_acknowledgement_control_number': {'required': True}, - } - - _attribute_map = { - 'need_technical_acknowledgement': {'key': 'needTechnicalAcknowledgement', 'type': 'bool'}, - 'batch_technical_acknowledgements': {'key': 'batchTechnicalAcknowledgements', 'type': 'bool'}, - 'need_functional_acknowledgement': {'key': 'needFunctionalAcknowledgement', 'type': 'bool'}, - 'functional_acknowledgement_version': {'key': 'functionalAcknowledgementVersion', 'type': 'str'}, - 'batch_functional_acknowledgements': {'key': 'batchFunctionalAcknowledgements', 'type': 'bool'}, - 'need_implementation_acknowledgement': {'key': 'needImplementationAcknowledgement', 'type': 'bool'}, - 'implementation_acknowledgement_version': {'key': 'implementationAcknowledgementVersion', 'type': 'str'}, - 'batch_implementation_acknowledgements': {'key': 'batchImplementationAcknowledgements', 'type': 'bool'}, - 'need_loop_for_valid_messages': {'key': 'needLoopForValidMessages', 'type': 'bool'}, - 'send_synchronous_acknowledgement': {'key': 'sendSynchronousAcknowledgement', 'type': 'bool'}, - 'acknowledgement_control_number_prefix': {'key': 'acknowledgementControlNumberPrefix', 'type': 'str'}, - 'acknowledgement_control_number_suffix': {'key': 'acknowledgementControlNumberSuffix', 'type': 'str'}, - 'acknowledgement_control_number_lower_bound': {'key': 'acknowledgementControlNumberLowerBound', 'type': 'int'}, - 'acknowledgement_control_number_upper_bound': {'key': 'acknowledgementControlNumberUpperBound', 'type': 'int'}, - 'rollover_acknowledgement_control_number': {'key': 'rolloverAcknowledgementControlNumber', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(X12AcknowledgementSettings, self).__init__(**kwargs) - self.need_technical_acknowledgement = kwargs.get('need_technical_acknowledgement', None) - self.batch_technical_acknowledgements = kwargs.get('batch_technical_acknowledgements', None) - self.need_functional_acknowledgement = kwargs.get('need_functional_acknowledgement', None) - self.functional_acknowledgement_version = kwargs.get('functional_acknowledgement_version', None) - self.batch_functional_acknowledgements = kwargs.get('batch_functional_acknowledgements', None) - self.need_implementation_acknowledgement = kwargs.get('need_implementation_acknowledgement', None) - self.implementation_acknowledgement_version = kwargs.get('implementation_acknowledgement_version', None) - self.batch_implementation_acknowledgements = kwargs.get('batch_implementation_acknowledgements', None) - self.need_loop_for_valid_messages = kwargs.get('need_loop_for_valid_messages', None) - self.send_synchronous_acknowledgement = kwargs.get('send_synchronous_acknowledgement', None) - self.acknowledgement_control_number_prefix = kwargs.get('acknowledgement_control_number_prefix', None) - self.acknowledgement_control_number_suffix = kwargs.get('acknowledgement_control_number_suffix', None) - self.acknowledgement_control_number_lower_bound = kwargs.get('acknowledgement_control_number_lower_bound', None) - self.acknowledgement_control_number_upper_bound = kwargs.get('acknowledgement_control_number_upper_bound', None) - self.rollover_acknowledgement_control_number = kwargs.get('rollover_acknowledgement_control_number', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_acknowledgement_settings_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_acknowledgement_settings_py3.py deleted file mode 100644 index 6e81eb7728e1..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_acknowledgement_settings_py3.py +++ /dev/null @@ -1,115 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class X12AcknowledgementSettings(Model): - """The X12 agreement acknowledgement settings. - - All required parameters must be populated in order to send to Azure. - - :param need_technical_acknowledgement: Required. The value indicating - whether technical acknowledgement is needed. - :type need_technical_acknowledgement: bool - :param batch_technical_acknowledgements: Required. The value indicating - whether to batch the technical acknowledgements. - :type batch_technical_acknowledgements: bool - :param need_functional_acknowledgement: Required. The value indicating - whether functional acknowledgement is needed. - :type need_functional_acknowledgement: bool - :param functional_acknowledgement_version: The functional acknowledgement - version. - :type functional_acknowledgement_version: str - :param batch_functional_acknowledgements: Required. The value indicating - whether to batch functional acknowledgements. - :type batch_functional_acknowledgements: bool - :param need_implementation_acknowledgement: Required. The value indicating - whether implementation acknowledgement is needed. - :type need_implementation_acknowledgement: bool - :param implementation_acknowledgement_version: The implementation - acknowledgement version. - :type implementation_acknowledgement_version: str - :param batch_implementation_acknowledgements: Required. The value - indicating whether to batch implementation acknowledgements. - :type batch_implementation_acknowledgements: bool - :param need_loop_for_valid_messages: Required. The value indicating - whether a loop is needed for valid messages. - :type need_loop_for_valid_messages: bool - :param send_synchronous_acknowledgement: Required. The value indicating - whether to send synchronous acknowledgement. - :type send_synchronous_acknowledgement: bool - :param acknowledgement_control_number_prefix: The acknowledgement control - number prefix. - :type acknowledgement_control_number_prefix: str - :param acknowledgement_control_number_suffix: The acknowledgement control - number suffix. - :type acknowledgement_control_number_suffix: str - :param acknowledgement_control_number_lower_bound: Required. The - acknowledgement control number lower bound. - :type acknowledgement_control_number_lower_bound: int - :param acknowledgement_control_number_upper_bound: Required. The - acknowledgement control number upper bound. - :type acknowledgement_control_number_upper_bound: int - :param rollover_acknowledgement_control_number: Required. The value - indicating whether to rollover acknowledgement control number. - :type rollover_acknowledgement_control_number: bool - """ - - _validation = { - 'need_technical_acknowledgement': {'required': True}, - 'batch_technical_acknowledgements': {'required': True}, - 'need_functional_acknowledgement': {'required': True}, - 'batch_functional_acknowledgements': {'required': True}, - 'need_implementation_acknowledgement': {'required': True}, - 'batch_implementation_acknowledgements': {'required': True}, - 'need_loop_for_valid_messages': {'required': True}, - 'send_synchronous_acknowledgement': {'required': True}, - 'acknowledgement_control_number_lower_bound': {'required': True}, - 'acknowledgement_control_number_upper_bound': {'required': True}, - 'rollover_acknowledgement_control_number': {'required': True}, - } - - _attribute_map = { - 'need_technical_acknowledgement': {'key': 'needTechnicalAcknowledgement', 'type': 'bool'}, - 'batch_technical_acknowledgements': {'key': 'batchTechnicalAcknowledgements', 'type': 'bool'}, - 'need_functional_acknowledgement': {'key': 'needFunctionalAcknowledgement', 'type': 'bool'}, - 'functional_acknowledgement_version': {'key': 'functionalAcknowledgementVersion', 'type': 'str'}, - 'batch_functional_acknowledgements': {'key': 'batchFunctionalAcknowledgements', 'type': 'bool'}, - 'need_implementation_acknowledgement': {'key': 'needImplementationAcknowledgement', 'type': 'bool'}, - 'implementation_acknowledgement_version': {'key': 'implementationAcknowledgementVersion', 'type': 'str'}, - 'batch_implementation_acknowledgements': {'key': 'batchImplementationAcknowledgements', 'type': 'bool'}, - 'need_loop_for_valid_messages': {'key': 'needLoopForValidMessages', 'type': 'bool'}, - 'send_synchronous_acknowledgement': {'key': 'sendSynchronousAcknowledgement', 'type': 'bool'}, - 'acknowledgement_control_number_prefix': {'key': 'acknowledgementControlNumberPrefix', 'type': 'str'}, - 'acknowledgement_control_number_suffix': {'key': 'acknowledgementControlNumberSuffix', 'type': 'str'}, - 'acknowledgement_control_number_lower_bound': {'key': 'acknowledgementControlNumberLowerBound', 'type': 'int'}, - 'acknowledgement_control_number_upper_bound': {'key': 'acknowledgementControlNumberUpperBound', 'type': 'int'}, - 'rollover_acknowledgement_control_number': {'key': 'rolloverAcknowledgementControlNumber', 'type': 'bool'}, - } - - def __init__(self, *, need_technical_acknowledgement: bool, batch_technical_acknowledgements: bool, need_functional_acknowledgement: bool, batch_functional_acknowledgements: bool, need_implementation_acknowledgement: bool, batch_implementation_acknowledgements: bool, need_loop_for_valid_messages: bool, send_synchronous_acknowledgement: bool, acknowledgement_control_number_lower_bound: int, acknowledgement_control_number_upper_bound: int, rollover_acknowledgement_control_number: bool, functional_acknowledgement_version: str=None, implementation_acknowledgement_version: str=None, acknowledgement_control_number_prefix: str=None, acknowledgement_control_number_suffix: str=None, **kwargs) -> None: - super(X12AcknowledgementSettings, self).__init__(**kwargs) - self.need_technical_acknowledgement = need_technical_acknowledgement - self.batch_technical_acknowledgements = batch_technical_acknowledgements - self.need_functional_acknowledgement = need_functional_acknowledgement - self.functional_acknowledgement_version = functional_acknowledgement_version - self.batch_functional_acknowledgements = batch_functional_acknowledgements - self.need_implementation_acknowledgement = need_implementation_acknowledgement - self.implementation_acknowledgement_version = implementation_acknowledgement_version - self.batch_implementation_acknowledgements = batch_implementation_acknowledgements - self.need_loop_for_valid_messages = need_loop_for_valid_messages - self.send_synchronous_acknowledgement = send_synchronous_acknowledgement - self.acknowledgement_control_number_prefix = acknowledgement_control_number_prefix - self.acknowledgement_control_number_suffix = acknowledgement_control_number_suffix - self.acknowledgement_control_number_lower_bound = acknowledgement_control_number_lower_bound - self.acknowledgement_control_number_upper_bound = acknowledgement_control_number_upper_bound - self.rollover_acknowledgement_control_number = rollover_acknowledgement_control_number diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_agreement_content.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_agreement_content.py deleted file mode 100644 index 0daa2f398e66..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_agreement_content.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class X12AgreementContent(Model): - """The X12 agreement content. - - All required parameters must be populated in order to send to Azure. - - :param receive_agreement: Required. The X12 one-way receive agreement. - :type receive_agreement: ~azure.mgmt.logic.models.X12OneWayAgreement - :param send_agreement: Required. The X12 one-way send agreement. - :type send_agreement: ~azure.mgmt.logic.models.X12OneWayAgreement - """ - - _validation = { - 'receive_agreement': {'required': True}, - 'send_agreement': {'required': True}, - } - - _attribute_map = { - 'receive_agreement': {'key': 'receiveAgreement', 'type': 'X12OneWayAgreement'}, - 'send_agreement': {'key': 'sendAgreement', 'type': 'X12OneWayAgreement'}, - } - - def __init__(self, **kwargs): - super(X12AgreementContent, self).__init__(**kwargs) - self.receive_agreement = kwargs.get('receive_agreement', None) - self.send_agreement = kwargs.get('send_agreement', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_agreement_content_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_agreement_content_py3.py deleted file mode 100644 index 7ddf670913ea..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_agreement_content_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class X12AgreementContent(Model): - """The X12 agreement content. - - All required parameters must be populated in order to send to Azure. - - :param receive_agreement: Required. The X12 one-way receive agreement. - :type receive_agreement: ~azure.mgmt.logic.models.X12OneWayAgreement - :param send_agreement: Required. The X12 one-way send agreement. - :type send_agreement: ~azure.mgmt.logic.models.X12OneWayAgreement - """ - - _validation = { - 'receive_agreement': {'required': True}, - 'send_agreement': {'required': True}, - } - - _attribute_map = { - 'receive_agreement': {'key': 'receiveAgreement', 'type': 'X12OneWayAgreement'}, - 'send_agreement': {'key': 'sendAgreement', 'type': 'X12OneWayAgreement'}, - } - - def __init__(self, *, receive_agreement, send_agreement, **kwargs) -> None: - super(X12AgreementContent, self).__init__(**kwargs) - self.receive_agreement = receive_agreement - self.send_agreement = send_agreement diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_delimiter_overrides.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_delimiter_overrides.py deleted file mode 100644 index ee545215c677..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_delimiter_overrides.py +++ /dev/null @@ -1,75 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class X12DelimiterOverrides(Model): - """The X12 delimiter override settings. - - All required parameters must be populated in order to send to Azure. - - :param protocol_version: The protocol version. - :type protocol_version: str - :param message_id: The message id. - :type message_id: str - :param data_element_separator: Required. The data element separator. - :type data_element_separator: int - :param component_separator: Required. The component separator. - :type component_separator: int - :param segment_terminator: Required. The segment terminator. - :type segment_terminator: int - :param segment_terminator_suffix: Required. The segment terminator suffix. - Possible values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' - :type segment_terminator_suffix: str or - ~azure.mgmt.logic.models.SegmentTerminatorSuffix - :param replace_character: Required. The replacement character. - :type replace_character: int - :param replace_separators_in_payload: Required. The value indicating - whether to replace separators in payload. - :type replace_separators_in_payload: bool - :param target_namespace: The target namespace on which this delimiter - settings has to be applied. - :type target_namespace: str - """ - - _validation = { - 'data_element_separator': {'required': True}, - 'component_separator': {'required': True}, - 'segment_terminator': {'required': True}, - 'segment_terminator_suffix': {'required': True}, - 'replace_character': {'required': True}, - 'replace_separators_in_payload': {'required': True}, - } - - _attribute_map = { - 'protocol_version': {'key': 'protocolVersion', 'type': 'str'}, - 'message_id': {'key': 'messageId', 'type': 'str'}, - 'data_element_separator': {'key': 'dataElementSeparator', 'type': 'int'}, - 'component_separator': {'key': 'componentSeparator', 'type': 'int'}, - 'segment_terminator': {'key': 'segmentTerminator', 'type': 'int'}, - 'segment_terminator_suffix': {'key': 'segmentTerminatorSuffix', 'type': 'SegmentTerminatorSuffix'}, - 'replace_character': {'key': 'replaceCharacter', 'type': 'int'}, - 'replace_separators_in_payload': {'key': 'replaceSeparatorsInPayload', 'type': 'bool'}, - 'target_namespace': {'key': 'targetNamespace', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(X12DelimiterOverrides, self).__init__(**kwargs) - self.protocol_version = kwargs.get('protocol_version', None) - self.message_id = kwargs.get('message_id', None) - self.data_element_separator = kwargs.get('data_element_separator', None) - self.component_separator = kwargs.get('component_separator', None) - self.segment_terminator = kwargs.get('segment_terminator', None) - self.segment_terminator_suffix = kwargs.get('segment_terminator_suffix', None) - self.replace_character = kwargs.get('replace_character', None) - self.replace_separators_in_payload = kwargs.get('replace_separators_in_payload', None) - self.target_namespace = kwargs.get('target_namespace', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_delimiter_overrides_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_delimiter_overrides_py3.py deleted file mode 100644 index c2333de8a794..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_delimiter_overrides_py3.py +++ /dev/null @@ -1,75 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class X12DelimiterOverrides(Model): - """The X12 delimiter override settings. - - All required parameters must be populated in order to send to Azure. - - :param protocol_version: The protocol version. - :type protocol_version: str - :param message_id: The message id. - :type message_id: str - :param data_element_separator: Required. The data element separator. - :type data_element_separator: int - :param component_separator: Required. The component separator. - :type component_separator: int - :param segment_terminator: Required. The segment terminator. - :type segment_terminator: int - :param segment_terminator_suffix: Required. The segment terminator suffix. - Possible values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' - :type segment_terminator_suffix: str or - ~azure.mgmt.logic.models.SegmentTerminatorSuffix - :param replace_character: Required. The replacement character. - :type replace_character: int - :param replace_separators_in_payload: Required. The value indicating - whether to replace separators in payload. - :type replace_separators_in_payload: bool - :param target_namespace: The target namespace on which this delimiter - settings has to be applied. - :type target_namespace: str - """ - - _validation = { - 'data_element_separator': {'required': True}, - 'component_separator': {'required': True}, - 'segment_terminator': {'required': True}, - 'segment_terminator_suffix': {'required': True}, - 'replace_character': {'required': True}, - 'replace_separators_in_payload': {'required': True}, - } - - _attribute_map = { - 'protocol_version': {'key': 'protocolVersion', 'type': 'str'}, - 'message_id': {'key': 'messageId', 'type': 'str'}, - 'data_element_separator': {'key': 'dataElementSeparator', 'type': 'int'}, - 'component_separator': {'key': 'componentSeparator', 'type': 'int'}, - 'segment_terminator': {'key': 'segmentTerminator', 'type': 'int'}, - 'segment_terminator_suffix': {'key': 'segmentTerminatorSuffix', 'type': 'SegmentTerminatorSuffix'}, - 'replace_character': {'key': 'replaceCharacter', 'type': 'int'}, - 'replace_separators_in_payload': {'key': 'replaceSeparatorsInPayload', 'type': 'bool'}, - 'target_namespace': {'key': 'targetNamespace', 'type': 'str'}, - } - - def __init__(self, *, data_element_separator: int, component_separator: int, segment_terminator: int, segment_terminator_suffix, replace_character: int, replace_separators_in_payload: bool, protocol_version: str=None, message_id: str=None, target_namespace: str=None, **kwargs) -> None: - super(X12DelimiterOverrides, self).__init__(**kwargs) - self.protocol_version = protocol_version - self.message_id = message_id - self.data_element_separator = data_element_separator - self.component_separator = component_separator - self.segment_terminator = segment_terminator - self.segment_terminator_suffix = segment_terminator_suffix - self.replace_character = replace_character - self.replace_separators_in_payload = replace_separators_in_payload - self.target_namespace = target_namespace diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_override.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_override.py deleted file mode 100644 index 93f12406b522..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_override.py +++ /dev/null @@ -1,83 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class X12EnvelopeOverride(Model): - """The X12 envelope override settings. - - All required parameters must be populated in order to send to Azure. - - :param target_namespace: Required. The target namespace on which this - envelope settings has to be applied. - :type target_namespace: str - :param protocol_version: Required. The protocol version on which this - envelope settings has to be applied. - :type protocol_version: str - :param message_id: Required. The message id on which this envelope - settings has to be applied. - :type message_id: str - :param responsible_agency_code: Required. The responsible agency code. - :type responsible_agency_code: str - :param header_version: Required. The header version. - :type header_version: str - :param sender_application_id: Required. The sender application id. - :type sender_application_id: str - :param receiver_application_id: Required. The receiver application id. - :type receiver_application_id: str - :param functional_identifier_code: The functional identifier code. - :type functional_identifier_code: str - :param date_format: Required. The date format. Possible values include: - 'NotSpecified', 'CCYYMMDD', 'YYMMDD' - :type date_format: str or ~azure.mgmt.logic.models.X12DateFormat - :param time_format: Required. The time format. Possible values include: - 'NotSpecified', 'HHMM', 'HHMMSS', 'HHMMSSdd', 'HHMMSSd' - :type time_format: str or ~azure.mgmt.logic.models.X12TimeFormat - """ - - _validation = { - 'target_namespace': {'required': True}, - 'protocol_version': {'required': True}, - 'message_id': {'required': True}, - 'responsible_agency_code': {'required': True}, - 'header_version': {'required': True}, - 'sender_application_id': {'required': True}, - 'receiver_application_id': {'required': True}, - 'date_format': {'required': True}, - 'time_format': {'required': True}, - } - - _attribute_map = { - 'target_namespace': {'key': 'targetNamespace', 'type': 'str'}, - 'protocol_version': {'key': 'protocolVersion', 'type': 'str'}, - 'message_id': {'key': 'messageId', 'type': 'str'}, - 'responsible_agency_code': {'key': 'responsibleAgencyCode', 'type': 'str'}, - 'header_version': {'key': 'headerVersion', 'type': 'str'}, - 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, - 'receiver_application_id': {'key': 'receiverApplicationId', 'type': 'str'}, - 'functional_identifier_code': {'key': 'functionalIdentifierCode', 'type': 'str'}, - 'date_format': {'key': 'dateFormat', 'type': 'str'}, - 'time_format': {'key': 'timeFormat', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(X12EnvelopeOverride, self).__init__(**kwargs) - self.target_namespace = kwargs.get('target_namespace', None) - self.protocol_version = kwargs.get('protocol_version', None) - self.message_id = kwargs.get('message_id', None) - self.responsible_agency_code = kwargs.get('responsible_agency_code', None) - self.header_version = kwargs.get('header_version', None) - self.sender_application_id = kwargs.get('sender_application_id', None) - self.receiver_application_id = kwargs.get('receiver_application_id', None) - self.functional_identifier_code = kwargs.get('functional_identifier_code', None) - self.date_format = kwargs.get('date_format', None) - self.time_format = kwargs.get('time_format', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_override_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_override_py3.py deleted file mode 100644 index a948c9bdc3cf..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_override_py3.py +++ /dev/null @@ -1,83 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class X12EnvelopeOverride(Model): - """The X12 envelope override settings. - - All required parameters must be populated in order to send to Azure. - - :param target_namespace: Required. The target namespace on which this - envelope settings has to be applied. - :type target_namespace: str - :param protocol_version: Required. The protocol version on which this - envelope settings has to be applied. - :type protocol_version: str - :param message_id: Required. The message id on which this envelope - settings has to be applied. - :type message_id: str - :param responsible_agency_code: Required. The responsible agency code. - :type responsible_agency_code: str - :param header_version: Required. The header version. - :type header_version: str - :param sender_application_id: Required. The sender application id. - :type sender_application_id: str - :param receiver_application_id: Required. The receiver application id. - :type receiver_application_id: str - :param functional_identifier_code: The functional identifier code. - :type functional_identifier_code: str - :param date_format: Required. The date format. Possible values include: - 'NotSpecified', 'CCYYMMDD', 'YYMMDD' - :type date_format: str or ~azure.mgmt.logic.models.X12DateFormat - :param time_format: Required. The time format. Possible values include: - 'NotSpecified', 'HHMM', 'HHMMSS', 'HHMMSSdd', 'HHMMSSd' - :type time_format: str or ~azure.mgmt.logic.models.X12TimeFormat - """ - - _validation = { - 'target_namespace': {'required': True}, - 'protocol_version': {'required': True}, - 'message_id': {'required': True}, - 'responsible_agency_code': {'required': True}, - 'header_version': {'required': True}, - 'sender_application_id': {'required': True}, - 'receiver_application_id': {'required': True}, - 'date_format': {'required': True}, - 'time_format': {'required': True}, - } - - _attribute_map = { - 'target_namespace': {'key': 'targetNamespace', 'type': 'str'}, - 'protocol_version': {'key': 'protocolVersion', 'type': 'str'}, - 'message_id': {'key': 'messageId', 'type': 'str'}, - 'responsible_agency_code': {'key': 'responsibleAgencyCode', 'type': 'str'}, - 'header_version': {'key': 'headerVersion', 'type': 'str'}, - 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, - 'receiver_application_id': {'key': 'receiverApplicationId', 'type': 'str'}, - 'functional_identifier_code': {'key': 'functionalIdentifierCode', 'type': 'str'}, - 'date_format': {'key': 'dateFormat', 'type': 'str'}, - 'time_format': {'key': 'timeFormat', 'type': 'str'}, - } - - def __init__(self, *, target_namespace: str, protocol_version: str, message_id: str, responsible_agency_code: str, header_version: str, sender_application_id: str, receiver_application_id: str, date_format, time_format, functional_identifier_code: str=None, **kwargs) -> None: - super(X12EnvelopeOverride, self).__init__(**kwargs) - self.target_namespace = target_namespace - self.protocol_version = protocol_version - self.message_id = message_id - self.responsible_agency_code = responsible_agency_code - self.header_version = header_version - self.sender_application_id = sender_application_id - self.receiver_application_id = receiver_application_id - self.functional_identifier_code = functional_identifier_code - self.date_format = date_format - self.time_format = time_format diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_settings.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_settings.py deleted file mode 100644 index 65c4418b9822..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_settings.py +++ /dev/null @@ -1,168 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class X12EnvelopeSettings(Model): - """The X12 agreement envelope settings. - - All required parameters must be populated in order to send to Azure. - - :param control_standards_id: Required. The controls standards id. - :type control_standards_id: int - :param use_control_standards_id_as_repetition_character: Required. The - value indicating whether to use control standards id as repetition - character. - :type use_control_standards_id_as_repetition_character: bool - :param sender_application_id: Required. The sender application id. - :type sender_application_id: str - :param receiver_application_id: Required. The receiver application id. - :type receiver_application_id: str - :param control_version_number: Required. The control version number. - :type control_version_number: str - :param interchange_control_number_lower_bound: Required. The interchange - control number lower bound. - :type interchange_control_number_lower_bound: int - :param interchange_control_number_upper_bound: Required. The interchange - control number upper bound. - :type interchange_control_number_upper_bound: int - :param rollover_interchange_control_number: Required. The value indicating - whether to rollover interchange control number. - :type rollover_interchange_control_number: bool - :param enable_default_group_headers: Required. The value indicating - whether to enable default group headers. - :type enable_default_group_headers: bool - :param functional_group_id: The functional group id. - :type functional_group_id: str - :param group_control_number_lower_bound: Required. The group control - number lower bound. - :type group_control_number_lower_bound: int - :param group_control_number_upper_bound: Required. The group control - number upper bound. - :type group_control_number_upper_bound: int - :param rollover_group_control_number: Required. The value indicating - whether to rollover group control number. - :type rollover_group_control_number: bool - :param group_header_agency_code: Required. The group header agency code. - :type group_header_agency_code: str - :param group_header_version: Required. The group header version. - :type group_header_version: str - :param transaction_set_control_number_lower_bound: Required. The - transaction set control number lower bound. - :type transaction_set_control_number_lower_bound: int - :param transaction_set_control_number_upper_bound: Required. The - transaction set control number upper bound. - :type transaction_set_control_number_upper_bound: int - :param rollover_transaction_set_control_number: Required. The value - indicating whether to rollover transaction set control number. - :type rollover_transaction_set_control_number: bool - :param transaction_set_control_number_prefix: The transaction set control - number prefix. - :type transaction_set_control_number_prefix: str - :param transaction_set_control_number_suffix: The transaction set control - number suffix. - :type transaction_set_control_number_suffix: str - :param overwrite_existing_transaction_set_control_number: Required. The - value indicating whether to overwrite existing transaction set control - number. - :type overwrite_existing_transaction_set_control_number: bool - :param group_header_date_format: Required. The group header date format. - Possible values include: 'NotSpecified', 'CCYYMMDD', 'YYMMDD' - :type group_header_date_format: str or - ~azure.mgmt.logic.models.X12DateFormat - :param group_header_time_format: Required. The group header time format. - Possible values include: 'NotSpecified', 'HHMM', 'HHMMSS', 'HHMMSSdd', - 'HHMMSSd' - :type group_header_time_format: str or - ~azure.mgmt.logic.models.X12TimeFormat - :param usage_indicator: Required. The usage indicator. Possible values - include: 'NotSpecified', 'Test', 'Information', 'Production' - :type usage_indicator: str or ~azure.mgmt.logic.models.UsageIndicator - """ - - _validation = { - 'control_standards_id': {'required': True}, - 'use_control_standards_id_as_repetition_character': {'required': True}, - 'sender_application_id': {'required': True}, - 'receiver_application_id': {'required': True}, - 'control_version_number': {'required': True}, - 'interchange_control_number_lower_bound': {'required': True}, - 'interchange_control_number_upper_bound': {'required': True}, - 'rollover_interchange_control_number': {'required': True}, - 'enable_default_group_headers': {'required': True}, - 'group_control_number_lower_bound': {'required': True}, - 'group_control_number_upper_bound': {'required': True}, - 'rollover_group_control_number': {'required': True}, - 'group_header_agency_code': {'required': True}, - 'group_header_version': {'required': True}, - 'transaction_set_control_number_lower_bound': {'required': True}, - 'transaction_set_control_number_upper_bound': {'required': True}, - 'rollover_transaction_set_control_number': {'required': True}, - 'overwrite_existing_transaction_set_control_number': {'required': True}, - 'group_header_date_format': {'required': True}, - 'group_header_time_format': {'required': True}, - 'usage_indicator': {'required': True}, - } - - _attribute_map = { - 'control_standards_id': {'key': 'controlStandardsId', 'type': 'int'}, - 'use_control_standards_id_as_repetition_character': {'key': 'useControlStandardsIdAsRepetitionCharacter', 'type': 'bool'}, - 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, - 'receiver_application_id': {'key': 'receiverApplicationId', 'type': 'str'}, - 'control_version_number': {'key': 'controlVersionNumber', 'type': 'str'}, - 'interchange_control_number_lower_bound': {'key': 'interchangeControlNumberLowerBound', 'type': 'int'}, - 'interchange_control_number_upper_bound': {'key': 'interchangeControlNumberUpperBound', 'type': 'int'}, - 'rollover_interchange_control_number': {'key': 'rolloverInterchangeControlNumber', 'type': 'bool'}, - 'enable_default_group_headers': {'key': 'enableDefaultGroupHeaders', 'type': 'bool'}, - 'functional_group_id': {'key': 'functionalGroupId', 'type': 'str'}, - 'group_control_number_lower_bound': {'key': 'groupControlNumberLowerBound', 'type': 'int'}, - 'group_control_number_upper_bound': {'key': 'groupControlNumberUpperBound', 'type': 'int'}, - 'rollover_group_control_number': {'key': 'rolloverGroupControlNumber', 'type': 'bool'}, - 'group_header_agency_code': {'key': 'groupHeaderAgencyCode', 'type': 'str'}, - 'group_header_version': {'key': 'groupHeaderVersion', 'type': 'str'}, - 'transaction_set_control_number_lower_bound': {'key': 'transactionSetControlNumberLowerBound', 'type': 'int'}, - 'transaction_set_control_number_upper_bound': {'key': 'transactionSetControlNumberUpperBound', 'type': 'int'}, - 'rollover_transaction_set_control_number': {'key': 'rolloverTransactionSetControlNumber', 'type': 'bool'}, - 'transaction_set_control_number_prefix': {'key': 'transactionSetControlNumberPrefix', 'type': 'str'}, - 'transaction_set_control_number_suffix': {'key': 'transactionSetControlNumberSuffix', 'type': 'str'}, - 'overwrite_existing_transaction_set_control_number': {'key': 'overwriteExistingTransactionSetControlNumber', 'type': 'bool'}, - 'group_header_date_format': {'key': 'groupHeaderDateFormat', 'type': 'str'}, - 'group_header_time_format': {'key': 'groupHeaderTimeFormat', 'type': 'str'}, - 'usage_indicator': {'key': 'usageIndicator', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(X12EnvelopeSettings, self).__init__(**kwargs) - self.control_standards_id = kwargs.get('control_standards_id', None) - self.use_control_standards_id_as_repetition_character = kwargs.get('use_control_standards_id_as_repetition_character', None) - self.sender_application_id = kwargs.get('sender_application_id', None) - self.receiver_application_id = kwargs.get('receiver_application_id', None) - self.control_version_number = kwargs.get('control_version_number', None) - self.interchange_control_number_lower_bound = kwargs.get('interchange_control_number_lower_bound', None) - self.interchange_control_number_upper_bound = kwargs.get('interchange_control_number_upper_bound', None) - self.rollover_interchange_control_number = kwargs.get('rollover_interchange_control_number', None) - self.enable_default_group_headers = kwargs.get('enable_default_group_headers', None) - self.functional_group_id = kwargs.get('functional_group_id', None) - self.group_control_number_lower_bound = kwargs.get('group_control_number_lower_bound', None) - self.group_control_number_upper_bound = kwargs.get('group_control_number_upper_bound', None) - self.rollover_group_control_number = kwargs.get('rollover_group_control_number', None) - self.group_header_agency_code = kwargs.get('group_header_agency_code', None) - self.group_header_version = kwargs.get('group_header_version', None) - self.transaction_set_control_number_lower_bound = kwargs.get('transaction_set_control_number_lower_bound', None) - self.transaction_set_control_number_upper_bound = kwargs.get('transaction_set_control_number_upper_bound', None) - self.rollover_transaction_set_control_number = kwargs.get('rollover_transaction_set_control_number', None) - self.transaction_set_control_number_prefix = kwargs.get('transaction_set_control_number_prefix', None) - self.transaction_set_control_number_suffix = kwargs.get('transaction_set_control_number_suffix', None) - self.overwrite_existing_transaction_set_control_number = kwargs.get('overwrite_existing_transaction_set_control_number', None) - self.group_header_date_format = kwargs.get('group_header_date_format', None) - self.group_header_time_format = kwargs.get('group_header_time_format', None) - self.usage_indicator = kwargs.get('usage_indicator', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_settings_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_settings_py3.py deleted file mode 100644 index a46cc19a7b48..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_settings_py3.py +++ /dev/null @@ -1,168 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class X12EnvelopeSettings(Model): - """The X12 agreement envelope settings. - - All required parameters must be populated in order to send to Azure. - - :param control_standards_id: Required. The controls standards id. - :type control_standards_id: int - :param use_control_standards_id_as_repetition_character: Required. The - value indicating whether to use control standards id as repetition - character. - :type use_control_standards_id_as_repetition_character: bool - :param sender_application_id: Required. The sender application id. - :type sender_application_id: str - :param receiver_application_id: Required. The receiver application id. - :type receiver_application_id: str - :param control_version_number: Required. The control version number. - :type control_version_number: str - :param interchange_control_number_lower_bound: Required. The interchange - control number lower bound. - :type interchange_control_number_lower_bound: int - :param interchange_control_number_upper_bound: Required. The interchange - control number upper bound. - :type interchange_control_number_upper_bound: int - :param rollover_interchange_control_number: Required. The value indicating - whether to rollover interchange control number. - :type rollover_interchange_control_number: bool - :param enable_default_group_headers: Required. The value indicating - whether to enable default group headers. - :type enable_default_group_headers: bool - :param functional_group_id: The functional group id. - :type functional_group_id: str - :param group_control_number_lower_bound: Required. The group control - number lower bound. - :type group_control_number_lower_bound: int - :param group_control_number_upper_bound: Required. The group control - number upper bound. - :type group_control_number_upper_bound: int - :param rollover_group_control_number: Required. The value indicating - whether to rollover group control number. - :type rollover_group_control_number: bool - :param group_header_agency_code: Required. The group header agency code. - :type group_header_agency_code: str - :param group_header_version: Required. The group header version. - :type group_header_version: str - :param transaction_set_control_number_lower_bound: Required. The - transaction set control number lower bound. - :type transaction_set_control_number_lower_bound: int - :param transaction_set_control_number_upper_bound: Required. The - transaction set control number upper bound. - :type transaction_set_control_number_upper_bound: int - :param rollover_transaction_set_control_number: Required. The value - indicating whether to rollover transaction set control number. - :type rollover_transaction_set_control_number: bool - :param transaction_set_control_number_prefix: The transaction set control - number prefix. - :type transaction_set_control_number_prefix: str - :param transaction_set_control_number_suffix: The transaction set control - number suffix. - :type transaction_set_control_number_suffix: str - :param overwrite_existing_transaction_set_control_number: Required. The - value indicating whether to overwrite existing transaction set control - number. - :type overwrite_existing_transaction_set_control_number: bool - :param group_header_date_format: Required. The group header date format. - Possible values include: 'NotSpecified', 'CCYYMMDD', 'YYMMDD' - :type group_header_date_format: str or - ~azure.mgmt.logic.models.X12DateFormat - :param group_header_time_format: Required. The group header time format. - Possible values include: 'NotSpecified', 'HHMM', 'HHMMSS', 'HHMMSSdd', - 'HHMMSSd' - :type group_header_time_format: str or - ~azure.mgmt.logic.models.X12TimeFormat - :param usage_indicator: Required. The usage indicator. Possible values - include: 'NotSpecified', 'Test', 'Information', 'Production' - :type usage_indicator: str or ~azure.mgmt.logic.models.UsageIndicator - """ - - _validation = { - 'control_standards_id': {'required': True}, - 'use_control_standards_id_as_repetition_character': {'required': True}, - 'sender_application_id': {'required': True}, - 'receiver_application_id': {'required': True}, - 'control_version_number': {'required': True}, - 'interchange_control_number_lower_bound': {'required': True}, - 'interchange_control_number_upper_bound': {'required': True}, - 'rollover_interchange_control_number': {'required': True}, - 'enable_default_group_headers': {'required': True}, - 'group_control_number_lower_bound': {'required': True}, - 'group_control_number_upper_bound': {'required': True}, - 'rollover_group_control_number': {'required': True}, - 'group_header_agency_code': {'required': True}, - 'group_header_version': {'required': True}, - 'transaction_set_control_number_lower_bound': {'required': True}, - 'transaction_set_control_number_upper_bound': {'required': True}, - 'rollover_transaction_set_control_number': {'required': True}, - 'overwrite_existing_transaction_set_control_number': {'required': True}, - 'group_header_date_format': {'required': True}, - 'group_header_time_format': {'required': True}, - 'usage_indicator': {'required': True}, - } - - _attribute_map = { - 'control_standards_id': {'key': 'controlStandardsId', 'type': 'int'}, - 'use_control_standards_id_as_repetition_character': {'key': 'useControlStandardsIdAsRepetitionCharacter', 'type': 'bool'}, - 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, - 'receiver_application_id': {'key': 'receiverApplicationId', 'type': 'str'}, - 'control_version_number': {'key': 'controlVersionNumber', 'type': 'str'}, - 'interchange_control_number_lower_bound': {'key': 'interchangeControlNumberLowerBound', 'type': 'int'}, - 'interchange_control_number_upper_bound': {'key': 'interchangeControlNumberUpperBound', 'type': 'int'}, - 'rollover_interchange_control_number': {'key': 'rolloverInterchangeControlNumber', 'type': 'bool'}, - 'enable_default_group_headers': {'key': 'enableDefaultGroupHeaders', 'type': 'bool'}, - 'functional_group_id': {'key': 'functionalGroupId', 'type': 'str'}, - 'group_control_number_lower_bound': {'key': 'groupControlNumberLowerBound', 'type': 'int'}, - 'group_control_number_upper_bound': {'key': 'groupControlNumberUpperBound', 'type': 'int'}, - 'rollover_group_control_number': {'key': 'rolloverGroupControlNumber', 'type': 'bool'}, - 'group_header_agency_code': {'key': 'groupHeaderAgencyCode', 'type': 'str'}, - 'group_header_version': {'key': 'groupHeaderVersion', 'type': 'str'}, - 'transaction_set_control_number_lower_bound': {'key': 'transactionSetControlNumberLowerBound', 'type': 'int'}, - 'transaction_set_control_number_upper_bound': {'key': 'transactionSetControlNumberUpperBound', 'type': 'int'}, - 'rollover_transaction_set_control_number': {'key': 'rolloverTransactionSetControlNumber', 'type': 'bool'}, - 'transaction_set_control_number_prefix': {'key': 'transactionSetControlNumberPrefix', 'type': 'str'}, - 'transaction_set_control_number_suffix': {'key': 'transactionSetControlNumberSuffix', 'type': 'str'}, - 'overwrite_existing_transaction_set_control_number': {'key': 'overwriteExistingTransactionSetControlNumber', 'type': 'bool'}, - 'group_header_date_format': {'key': 'groupHeaderDateFormat', 'type': 'str'}, - 'group_header_time_format': {'key': 'groupHeaderTimeFormat', 'type': 'str'}, - 'usage_indicator': {'key': 'usageIndicator', 'type': 'str'}, - } - - def __init__(self, *, control_standards_id: int, use_control_standards_id_as_repetition_character: bool, sender_application_id: str, receiver_application_id: str, control_version_number: str, interchange_control_number_lower_bound: int, interchange_control_number_upper_bound: int, rollover_interchange_control_number: bool, enable_default_group_headers: bool, group_control_number_lower_bound: int, group_control_number_upper_bound: int, rollover_group_control_number: bool, group_header_agency_code: str, group_header_version: str, transaction_set_control_number_lower_bound: int, transaction_set_control_number_upper_bound: int, rollover_transaction_set_control_number: bool, overwrite_existing_transaction_set_control_number: bool, group_header_date_format, group_header_time_format, usage_indicator, functional_group_id: str=None, transaction_set_control_number_prefix: str=None, transaction_set_control_number_suffix: str=None, **kwargs) -> None: - super(X12EnvelopeSettings, self).__init__(**kwargs) - self.control_standards_id = control_standards_id - self.use_control_standards_id_as_repetition_character = use_control_standards_id_as_repetition_character - self.sender_application_id = sender_application_id - self.receiver_application_id = receiver_application_id - self.control_version_number = control_version_number - self.interchange_control_number_lower_bound = interchange_control_number_lower_bound - self.interchange_control_number_upper_bound = interchange_control_number_upper_bound - self.rollover_interchange_control_number = rollover_interchange_control_number - self.enable_default_group_headers = enable_default_group_headers - self.functional_group_id = functional_group_id - self.group_control_number_lower_bound = group_control_number_lower_bound - self.group_control_number_upper_bound = group_control_number_upper_bound - self.rollover_group_control_number = rollover_group_control_number - self.group_header_agency_code = group_header_agency_code - self.group_header_version = group_header_version - self.transaction_set_control_number_lower_bound = transaction_set_control_number_lower_bound - self.transaction_set_control_number_upper_bound = transaction_set_control_number_upper_bound - self.rollover_transaction_set_control_number = rollover_transaction_set_control_number - self.transaction_set_control_number_prefix = transaction_set_control_number_prefix - self.transaction_set_control_number_suffix = transaction_set_control_number_suffix - self.overwrite_existing_transaction_set_control_number = overwrite_existing_transaction_set_control_number - self.group_header_date_format = group_header_date_format - self.group_header_time_format = group_header_time_format - self.usage_indicator = usage_indicator diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_framing_settings.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_framing_settings.py deleted file mode 100644 index c28e541459b2..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_framing_settings.py +++ /dev/null @@ -1,68 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class X12FramingSettings(Model): - """The X12 agreement framing settings. - - All required parameters must be populated in order to send to Azure. - - :param data_element_separator: Required. The data element separator. - :type data_element_separator: int - :param component_separator: Required. The component separator. - :type component_separator: int - :param replace_separators_in_payload: Required. The value indicating - whether to replace separators in payload. - :type replace_separators_in_payload: bool - :param replace_character: Required. The replacement character. - :type replace_character: int - :param segment_terminator: Required. The segment terminator. - :type segment_terminator: int - :param character_set: Required. The X12 character set. Possible values - include: 'NotSpecified', 'Basic', 'Extended', 'UTF8' - :type character_set: str or ~azure.mgmt.logic.models.X12CharacterSet - :param segment_terminator_suffix: Required. The segment terminator suffix. - Possible values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' - :type segment_terminator_suffix: str or - ~azure.mgmt.logic.models.SegmentTerminatorSuffix - """ - - _validation = { - 'data_element_separator': {'required': True}, - 'component_separator': {'required': True}, - 'replace_separators_in_payload': {'required': True}, - 'replace_character': {'required': True}, - 'segment_terminator': {'required': True}, - 'character_set': {'required': True}, - 'segment_terminator_suffix': {'required': True}, - } - - _attribute_map = { - 'data_element_separator': {'key': 'dataElementSeparator', 'type': 'int'}, - 'component_separator': {'key': 'componentSeparator', 'type': 'int'}, - 'replace_separators_in_payload': {'key': 'replaceSeparatorsInPayload', 'type': 'bool'}, - 'replace_character': {'key': 'replaceCharacter', 'type': 'int'}, - 'segment_terminator': {'key': 'segmentTerminator', 'type': 'int'}, - 'character_set': {'key': 'characterSet', 'type': 'str'}, - 'segment_terminator_suffix': {'key': 'segmentTerminatorSuffix', 'type': 'SegmentTerminatorSuffix'}, - } - - def __init__(self, **kwargs): - super(X12FramingSettings, self).__init__(**kwargs) - self.data_element_separator = kwargs.get('data_element_separator', None) - self.component_separator = kwargs.get('component_separator', None) - self.replace_separators_in_payload = kwargs.get('replace_separators_in_payload', None) - self.replace_character = kwargs.get('replace_character', None) - self.segment_terminator = kwargs.get('segment_terminator', None) - self.character_set = kwargs.get('character_set', None) - self.segment_terminator_suffix = kwargs.get('segment_terminator_suffix', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_framing_settings_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_framing_settings_py3.py deleted file mode 100644 index ffd8f09a407d..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_framing_settings_py3.py +++ /dev/null @@ -1,68 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class X12FramingSettings(Model): - """The X12 agreement framing settings. - - All required parameters must be populated in order to send to Azure. - - :param data_element_separator: Required. The data element separator. - :type data_element_separator: int - :param component_separator: Required. The component separator. - :type component_separator: int - :param replace_separators_in_payload: Required. The value indicating - whether to replace separators in payload. - :type replace_separators_in_payload: bool - :param replace_character: Required. The replacement character. - :type replace_character: int - :param segment_terminator: Required. The segment terminator. - :type segment_terminator: int - :param character_set: Required. The X12 character set. Possible values - include: 'NotSpecified', 'Basic', 'Extended', 'UTF8' - :type character_set: str or ~azure.mgmt.logic.models.X12CharacterSet - :param segment_terminator_suffix: Required. The segment terminator suffix. - Possible values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' - :type segment_terminator_suffix: str or - ~azure.mgmt.logic.models.SegmentTerminatorSuffix - """ - - _validation = { - 'data_element_separator': {'required': True}, - 'component_separator': {'required': True}, - 'replace_separators_in_payload': {'required': True}, - 'replace_character': {'required': True}, - 'segment_terminator': {'required': True}, - 'character_set': {'required': True}, - 'segment_terminator_suffix': {'required': True}, - } - - _attribute_map = { - 'data_element_separator': {'key': 'dataElementSeparator', 'type': 'int'}, - 'component_separator': {'key': 'componentSeparator', 'type': 'int'}, - 'replace_separators_in_payload': {'key': 'replaceSeparatorsInPayload', 'type': 'bool'}, - 'replace_character': {'key': 'replaceCharacter', 'type': 'int'}, - 'segment_terminator': {'key': 'segmentTerminator', 'type': 'int'}, - 'character_set': {'key': 'characterSet', 'type': 'str'}, - 'segment_terminator_suffix': {'key': 'segmentTerminatorSuffix', 'type': 'SegmentTerminatorSuffix'}, - } - - def __init__(self, *, data_element_separator: int, component_separator: int, replace_separators_in_payload: bool, replace_character: int, segment_terminator: int, character_set, segment_terminator_suffix, **kwargs) -> None: - super(X12FramingSettings, self).__init__(**kwargs) - self.data_element_separator = data_element_separator - self.component_separator = component_separator - self.replace_separators_in_payload = replace_separators_in_payload - self.replace_character = replace_character - self.segment_terminator = segment_terminator - self.character_set = character_set - self.segment_terminator_suffix = segment_terminator_suffix diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_filter.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_filter.py deleted file mode 100644 index cfcbb4579685..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_filter.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class X12MessageFilter(Model): - """The X12 message filter for odata query. - - All required parameters must be populated in order to send to Azure. - - :param message_filter_type: Required. The message filter type. Possible - values include: 'NotSpecified', 'Include', 'Exclude' - :type message_filter_type: str or - ~azure.mgmt.logic.models.MessageFilterType - """ - - _validation = { - 'message_filter_type': {'required': True}, - } - - _attribute_map = { - 'message_filter_type': {'key': 'messageFilterType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(X12MessageFilter, self).__init__(**kwargs) - self.message_filter_type = kwargs.get('message_filter_type', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_filter_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_filter_py3.py deleted file mode 100644 index 052e4feeb2d3..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_filter_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class X12MessageFilter(Model): - """The X12 message filter for odata query. - - All required parameters must be populated in order to send to Azure. - - :param message_filter_type: Required. The message filter type. Possible - values include: 'NotSpecified', 'Include', 'Exclude' - :type message_filter_type: str or - ~azure.mgmt.logic.models.MessageFilterType - """ - - _validation = { - 'message_filter_type': {'required': True}, - } - - _attribute_map = { - 'message_filter_type': {'key': 'messageFilterType', 'type': 'str'}, - } - - def __init__(self, *, message_filter_type, **kwargs) -> None: - super(X12MessageFilter, self).__init__(**kwargs) - self.message_filter_type = message_filter_type diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_identifier.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_identifier.py deleted file mode 100644 index 97cd0c89c7c3..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_identifier.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class X12MessageIdentifier(Model): - """The X12 message identifier. - - All required parameters must be populated in order to send to Azure. - - :param message_id: Required. The message id. - :type message_id: str - """ - - _validation = { - 'message_id': {'required': True}, - } - - _attribute_map = { - 'message_id': {'key': 'messageId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(X12MessageIdentifier, self).__init__(**kwargs) - self.message_id = kwargs.get('message_id', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_identifier_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_identifier_py3.py deleted file mode 100644 index 1d7fcee46c94..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_identifier_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class X12MessageIdentifier(Model): - """The X12 message identifier. - - All required parameters must be populated in order to send to Azure. - - :param message_id: Required. The message id. - :type message_id: str - """ - - _validation = { - 'message_id': {'required': True}, - } - - _attribute_map = { - 'message_id': {'key': 'messageId', 'type': 'str'}, - } - - def __init__(self, *, message_id: str, **kwargs) -> None: - super(X12MessageIdentifier, self).__init__(**kwargs) - self.message_id = message_id diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_one_way_agreement.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_one_way_agreement.py deleted file mode 100644 index 7d5038dceef5..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_one_way_agreement.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class X12OneWayAgreement(Model): - """The X12 one-way agreement. - - All required parameters must be populated in order to send to Azure. - - :param sender_business_identity: Required. The sender business identity - :type sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity - :param receiver_business_identity: Required. The receiver business - identity - :type receiver_business_identity: - ~azure.mgmt.logic.models.BusinessIdentity - :param protocol_settings: Required. The X12 protocol settings. - :type protocol_settings: ~azure.mgmt.logic.models.X12ProtocolSettings - """ - - _validation = { - 'sender_business_identity': {'required': True}, - 'receiver_business_identity': {'required': True}, - 'protocol_settings': {'required': True}, - } - - _attribute_map = { - 'sender_business_identity': {'key': 'senderBusinessIdentity', 'type': 'BusinessIdentity'}, - 'receiver_business_identity': {'key': 'receiverBusinessIdentity', 'type': 'BusinessIdentity'}, - 'protocol_settings': {'key': 'protocolSettings', 'type': 'X12ProtocolSettings'}, - } - - def __init__(self, **kwargs): - super(X12OneWayAgreement, self).__init__(**kwargs) - self.sender_business_identity = kwargs.get('sender_business_identity', None) - self.receiver_business_identity = kwargs.get('receiver_business_identity', None) - self.protocol_settings = kwargs.get('protocol_settings', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_one_way_agreement_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_one_way_agreement_py3.py deleted file mode 100644 index 3caddb04ea2c..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_one_way_agreement_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class X12OneWayAgreement(Model): - """The X12 one-way agreement. - - All required parameters must be populated in order to send to Azure. - - :param sender_business_identity: Required. The sender business identity - :type sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity - :param receiver_business_identity: Required. The receiver business - identity - :type receiver_business_identity: - ~azure.mgmt.logic.models.BusinessIdentity - :param protocol_settings: Required. The X12 protocol settings. - :type protocol_settings: ~azure.mgmt.logic.models.X12ProtocolSettings - """ - - _validation = { - 'sender_business_identity': {'required': True}, - 'receiver_business_identity': {'required': True}, - 'protocol_settings': {'required': True}, - } - - _attribute_map = { - 'sender_business_identity': {'key': 'senderBusinessIdentity', 'type': 'BusinessIdentity'}, - 'receiver_business_identity': {'key': 'receiverBusinessIdentity', 'type': 'BusinessIdentity'}, - 'protocol_settings': {'key': 'protocolSettings', 'type': 'X12ProtocolSettings'}, - } - - def __init__(self, *, sender_business_identity, receiver_business_identity, protocol_settings, **kwargs) -> None: - super(X12OneWayAgreement, self).__init__(**kwargs) - self.sender_business_identity = sender_business_identity - self.receiver_business_identity = receiver_business_identity - self.protocol_settings = protocol_settings diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_processing_settings.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_processing_settings.py deleted file mode 100644 index cf116affd990..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_processing_settings.py +++ /dev/null @@ -1,65 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class X12ProcessingSettings(Model): - """The X12 processing settings. - - All required parameters must be populated in order to send to Azure. - - :param mask_security_info: Required. The value indicating whether to mask - security information. - :type mask_security_info: bool - :param convert_implied_decimal: Required. The value indicating whether to - convert numerical type to implied decimal. - :type convert_implied_decimal: bool - :param preserve_interchange: Required. The value indicating whether to - preserve interchange. - :type preserve_interchange: bool - :param suspend_interchange_on_error: Required. The value indicating - whether to suspend interchange on error. - :type suspend_interchange_on_error: bool - :param create_empty_xml_tags_for_trailing_separators: Required. The value - indicating whether to create empty xml tags for trailing separators. - :type create_empty_xml_tags_for_trailing_separators: bool - :param use_dot_as_decimal_separator: Required. The value indicating - whether to use dot as decimal separator. - :type use_dot_as_decimal_separator: bool - """ - - _validation = { - 'mask_security_info': {'required': True}, - 'convert_implied_decimal': {'required': True}, - 'preserve_interchange': {'required': True}, - 'suspend_interchange_on_error': {'required': True}, - 'create_empty_xml_tags_for_trailing_separators': {'required': True}, - 'use_dot_as_decimal_separator': {'required': True}, - } - - _attribute_map = { - 'mask_security_info': {'key': 'maskSecurityInfo', 'type': 'bool'}, - 'convert_implied_decimal': {'key': 'convertImpliedDecimal', 'type': 'bool'}, - 'preserve_interchange': {'key': 'preserveInterchange', 'type': 'bool'}, - 'suspend_interchange_on_error': {'key': 'suspendInterchangeOnError', 'type': 'bool'}, - 'create_empty_xml_tags_for_trailing_separators': {'key': 'createEmptyXmlTagsForTrailingSeparators', 'type': 'bool'}, - 'use_dot_as_decimal_separator': {'key': 'useDotAsDecimalSeparator', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(X12ProcessingSettings, self).__init__(**kwargs) - self.mask_security_info = kwargs.get('mask_security_info', None) - self.convert_implied_decimal = kwargs.get('convert_implied_decimal', None) - self.preserve_interchange = kwargs.get('preserve_interchange', None) - self.suspend_interchange_on_error = kwargs.get('suspend_interchange_on_error', None) - self.create_empty_xml_tags_for_trailing_separators = kwargs.get('create_empty_xml_tags_for_trailing_separators', None) - self.use_dot_as_decimal_separator = kwargs.get('use_dot_as_decimal_separator', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_processing_settings_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_processing_settings_py3.py deleted file mode 100644 index 915cf16ee01c..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_processing_settings_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class X12ProcessingSettings(Model): - """The X12 processing settings. - - All required parameters must be populated in order to send to Azure. - - :param mask_security_info: Required. The value indicating whether to mask - security information. - :type mask_security_info: bool - :param convert_implied_decimal: Required. The value indicating whether to - convert numerical type to implied decimal. - :type convert_implied_decimal: bool - :param preserve_interchange: Required. The value indicating whether to - preserve interchange. - :type preserve_interchange: bool - :param suspend_interchange_on_error: Required. The value indicating - whether to suspend interchange on error. - :type suspend_interchange_on_error: bool - :param create_empty_xml_tags_for_trailing_separators: Required. The value - indicating whether to create empty xml tags for trailing separators. - :type create_empty_xml_tags_for_trailing_separators: bool - :param use_dot_as_decimal_separator: Required. The value indicating - whether to use dot as decimal separator. - :type use_dot_as_decimal_separator: bool - """ - - _validation = { - 'mask_security_info': {'required': True}, - 'convert_implied_decimal': {'required': True}, - 'preserve_interchange': {'required': True}, - 'suspend_interchange_on_error': {'required': True}, - 'create_empty_xml_tags_for_trailing_separators': {'required': True}, - 'use_dot_as_decimal_separator': {'required': True}, - } - - _attribute_map = { - 'mask_security_info': {'key': 'maskSecurityInfo', 'type': 'bool'}, - 'convert_implied_decimal': {'key': 'convertImpliedDecimal', 'type': 'bool'}, - 'preserve_interchange': {'key': 'preserveInterchange', 'type': 'bool'}, - 'suspend_interchange_on_error': {'key': 'suspendInterchangeOnError', 'type': 'bool'}, - 'create_empty_xml_tags_for_trailing_separators': {'key': 'createEmptyXmlTagsForTrailingSeparators', 'type': 'bool'}, - 'use_dot_as_decimal_separator': {'key': 'useDotAsDecimalSeparator', 'type': 'bool'}, - } - - def __init__(self, *, mask_security_info: bool, convert_implied_decimal: bool, preserve_interchange: bool, suspend_interchange_on_error: bool, create_empty_xml_tags_for_trailing_separators: bool, use_dot_as_decimal_separator: bool, **kwargs) -> None: - super(X12ProcessingSettings, self).__init__(**kwargs) - self.mask_security_info = mask_security_info - self.convert_implied_decimal = convert_implied_decimal - self.preserve_interchange = preserve_interchange - self.suspend_interchange_on_error = suspend_interchange_on_error - self.create_empty_xml_tags_for_trailing_separators = create_empty_xml_tags_for_trailing_separators - self.use_dot_as_decimal_separator = use_dot_as_decimal_separator diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_protocol_settings.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_protocol_settings.py deleted file mode 100644 index ab1d7ac4d471..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_protocol_settings.py +++ /dev/null @@ -1,91 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class X12ProtocolSettings(Model): - """The X12 agreement protocol settings. - - All required parameters must be populated in order to send to Azure. - - :param validation_settings: Required. The X12 validation settings. - :type validation_settings: ~azure.mgmt.logic.models.X12ValidationSettings - :param framing_settings: Required. The X12 framing settings. - :type framing_settings: ~azure.mgmt.logic.models.X12FramingSettings - :param envelope_settings: Required. The X12 envelope settings. - :type envelope_settings: ~azure.mgmt.logic.models.X12EnvelopeSettings - :param acknowledgement_settings: Required. The X12 acknowledgment - settings. - :type acknowledgement_settings: - ~azure.mgmt.logic.models.X12AcknowledgementSettings - :param message_filter: Required. The X12 message filter. - :type message_filter: ~azure.mgmt.logic.models.X12MessageFilter - :param security_settings: Required. The X12 security settings. - :type security_settings: ~azure.mgmt.logic.models.X12SecuritySettings - :param processing_settings: Required. The X12 processing settings. - :type processing_settings: ~azure.mgmt.logic.models.X12ProcessingSettings - :param envelope_overrides: The X12 envelope override settings. - :type envelope_overrides: - list[~azure.mgmt.logic.models.X12EnvelopeOverride] - :param validation_overrides: The X12 validation override settings. - :type validation_overrides: - list[~azure.mgmt.logic.models.X12ValidationOverride] - :param message_filter_list: The X12 message filter list. - :type message_filter_list: - list[~azure.mgmt.logic.models.X12MessageIdentifier] - :param schema_references: Required. The X12 schema references. - :type schema_references: list[~azure.mgmt.logic.models.X12SchemaReference] - :param x12_delimiter_overrides: The X12 delimiter override settings. - :type x12_delimiter_overrides: - list[~azure.mgmt.logic.models.X12DelimiterOverrides] - """ - - _validation = { - 'validation_settings': {'required': True}, - 'framing_settings': {'required': True}, - 'envelope_settings': {'required': True}, - 'acknowledgement_settings': {'required': True}, - 'message_filter': {'required': True}, - 'security_settings': {'required': True}, - 'processing_settings': {'required': True}, - 'schema_references': {'required': True}, - } - - _attribute_map = { - 'validation_settings': {'key': 'validationSettings', 'type': 'X12ValidationSettings'}, - 'framing_settings': {'key': 'framingSettings', 'type': 'X12FramingSettings'}, - 'envelope_settings': {'key': 'envelopeSettings', 'type': 'X12EnvelopeSettings'}, - 'acknowledgement_settings': {'key': 'acknowledgementSettings', 'type': 'X12AcknowledgementSettings'}, - 'message_filter': {'key': 'messageFilter', 'type': 'X12MessageFilter'}, - 'security_settings': {'key': 'securitySettings', 'type': 'X12SecuritySettings'}, - 'processing_settings': {'key': 'processingSettings', 'type': 'X12ProcessingSettings'}, - 'envelope_overrides': {'key': 'envelopeOverrides', 'type': '[X12EnvelopeOverride]'}, - 'validation_overrides': {'key': 'validationOverrides', 'type': '[X12ValidationOverride]'}, - 'message_filter_list': {'key': 'messageFilterList', 'type': '[X12MessageIdentifier]'}, - 'schema_references': {'key': 'schemaReferences', 'type': '[X12SchemaReference]'}, - 'x12_delimiter_overrides': {'key': 'x12DelimiterOverrides', 'type': '[X12DelimiterOverrides]'}, - } - - def __init__(self, **kwargs): - super(X12ProtocolSettings, self).__init__(**kwargs) - self.validation_settings = kwargs.get('validation_settings', None) - self.framing_settings = kwargs.get('framing_settings', None) - self.envelope_settings = kwargs.get('envelope_settings', None) - self.acknowledgement_settings = kwargs.get('acknowledgement_settings', None) - self.message_filter = kwargs.get('message_filter', None) - self.security_settings = kwargs.get('security_settings', None) - self.processing_settings = kwargs.get('processing_settings', None) - self.envelope_overrides = kwargs.get('envelope_overrides', None) - self.validation_overrides = kwargs.get('validation_overrides', None) - self.message_filter_list = kwargs.get('message_filter_list', None) - self.schema_references = kwargs.get('schema_references', None) - self.x12_delimiter_overrides = kwargs.get('x12_delimiter_overrides', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_protocol_settings_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_protocol_settings_py3.py deleted file mode 100644 index 3f328db1133e..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_protocol_settings_py3.py +++ /dev/null @@ -1,91 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class X12ProtocolSettings(Model): - """The X12 agreement protocol settings. - - All required parameters must be populated in order to send to Azure. - - :param validation_settings: Required. The X12 validation settings. - :type validation_settings: ~azure.mgmt.logic.models.X12ValidationSettings - :param framing_settings: Required. The X12 framing settings. - :type framing_settings: ~azure.mgmt.logic.models.X12FramingSettings - :param envelope_settings: Required. The X12 envelope settings. - :type envelope_settings: ~azure.mgmt.logic.models.X12EnvelopeSettings - :param acknowledgement_settings: Required. The X12 acknowledgment - settings. - :type acknowledgement_settings: - ~azure.mgmt.logic.models.X12AcknowledgementSettings - :param message_filter: Required. The X12 message filter. - :type message_filter: ~azure.mgmt.logic.models.X12MessageFilter - :param security_settings: Required. The X12 security settings. - :type security_settings: ~azure.mgmt.logic.models.X12SecuritySettings - :param processing_settings: Required. The X12 processing settings. - :type processing_settings: ~azure.mgmt.logic.models.X12ProcessingSettings - :param envelope_overrides: The X12 envelope override settings. - :type envelope_overrides: - list[~azure.mgmt.logic.models.X12EnvelopeOverride] - :param validation_overrides: The X12 validation override settings. - :type validation_overrides: - list[~azure.mgmt.logic.models.X12ValidationOverride] - :param message_filter_list: The X12 message filter list. - :type message_filter_list: - list[~azure.mgmt.logic.models.X12MessageIdentifier] - :param schema_references: Required. The X12 schema references. - :type schema_references: list[~azure.mgmt.logic.models.X12SchemaReference] - :param x12_delimiter_overrides: The X12 delimiter override settings. - :type x12_delimiter_overrides: - list[~azure.mgmt.logic.models.X12DelimiterOverrides] - """ - - _validation = { - 'validation_settings': {'required': True}, - 'framing_settings': {'required': True}, - 'envelope_settings': {'required': True}, - 'acknowledgement_settings': {'required': True}, - 'message_filter': {'required': True}, - 'security_settings': {'required': True}, - 'processing_settings': {'required': True}, - 'schema_references': {'required': True}, - } - - _attribute_map = { - 'validation_settings': {'key': 'validationSettings', 'type': 'X12ValidationSettings'}, - 'framing_settings': {'key': 'framingSettings', 'type': 'X12FramingSettings'}, - 'envelope_settings': {'key': 'envelopeSettings', 'type': 'X12EnvelopeSettings'}, - 'acknowledgement_settings': {'key': 'acknowledgementSettings', 'type': 'X12AcknowledgementSettings'}, - 'message_filter': {'key': 'messageFilter', 'type': 'X12MessageFilter'}, - 'security_settings': {'key': 'securitySettings', 'type': 'X12SecuritySettings'}, - 'processing_settings': {'key': 'processingSettings', 'type': 'X12ProcessingSettings'}, - 'envelope_overrides': {'key': 'envelopeOverrides', 'type': '[X12EnvelopeOverride]'}, - 'validation_overrides': {'key': 'validationOverrides', 'type': '[X12ValidationOverride]'}, - 'message_filter_list': {'key': 'messageFilterList', 'type': '[X12MessageIdentifier]'}, - 'schema_references': {'key': 'schemaReferences', 'type': '[X12SchemaReference]'}, - 'x12_delimiter_overrides': {'key': 'x12DelimiterOverrides', 'type': '[X12DelimiterOverrides]'}, - } - - def __init__(self, *, validation_settings, framing_settings, envelope_settings, acknowledgement_settings, message_filter, security_settings, processing_settings, schema_references, envelope_overrides=None, validation_overrides=None, message_filter_list=None, x12_delimiter_overrides=None, **kwargs) -> None: - super(X12ProtocolSettings, self).__init__(**kwargs) - self.validation_settings = validation_settings - self.framing_settings = framing_settings - self.envelope_settings = envelope_settings - self.acknowledgement_settings = acknowledgement_settings - self.message_filter = message_filter - self.security_settings = security_settings - self.processing_settings = processing_settings - self.envelope_overrides = envelope_overrides - self.validation_overrides = validation_overrides - self.message_filter_list = message_filter_list - self.schema_references = schema_references - self.x12_delimiter_overrides = x12_delimiter_overrides diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_schema_reference.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_schema_reference.py deleted file mode 100644 index dc8519933d95..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_schema_reference.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class X12SchemaReference(Model): - """The X12 schema reference. - - All required parameters must be populated in order to send to Azure. - - :param message_id: Required. The message id. - :type message_id: str - :param sender_application_id: The sender application id. - :type sender_application_id: str - :param schema_version: Required. The schema version. - :type schema_version: str - :param schema_name: Required. The schema name. - :type schema_name: str - """ - - _validation = { - 'message_id': {'required': True}, - 'schema_version': {'required': True}, - 'schema_name': {'required': True}, - } - - _attribute_map = { - 'message_id': {'key': 'messageId', 'type': 'str'}, - 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, - 'schema_version': {'key': 'schemaVersion', 'type': 'str'}, - 'schema_name': {'key': 'schemaName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(X12SchemaReference, self).__init__(**kwargs) - self.message_id = kwargs.get('message_id', None) - self.sender_application_id = kwargs.get('sender_application_id', None) - self.schema_version = kwargs.get('schema_version', None) - self.schema_name = kwargs.get('schema_name', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_schema_reference_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_schema_reference_py3.py deleted file mode 100644 index e57f4d8806d4..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_schema_reference_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class X12SchemaReference(Model): - """The X12 schema reference. - - All required parameters must be populated in order to send to Azure. - - :param message_id: Required. The message id. - :type message_id: str - :param sender_application_id: The sender application id. - :type sender_application_id: str - :param schema_version: Required. The schema version. - :type schema_version: str - :param schema_name: Required. The schema name. - :type schema_name: str - """ - - _validation = { - 'message_id': {'required': True}, - 'schema_version': {'required': True}, - 'schema_name': {'required': True}, - } - - _attribute_map = { - 'message_id': {'key': 'messageId', 'type': 'str'}, - 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, - 'schema_version': {'key': 'schemaVersion', 'type': 'str'}, - 'schema_name': {'key': 'schemaName', 'type': 'str'}, - } - - def __init__(self, *, message_id: str, schema_version: str, schema_name: str, sender_application_id: str=None, **kwargs) -> None: - super(X12SchemaReference, self).__init__(**kwargs) - self.message_id = message_id - self.sender_application_id = sender_application_id - self.schema_version = schema_version - self.schema_name = schema_name diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_security_settings.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_security_settings.py deleted file mode 100644 index 96f57189b72e..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_security_settings.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class X12SecuritySettings(Model): - """The X12 agreement security settings. - - All required parameters must be populated in order to send to Azure. - - :param authorization_qualifier: Required. The authorization qualifier. - :type authorization_qualifier: str - :param authorization_value: The authorization value. - :type authorization_value: str - :param security_qualifier: Required. The security qualifier. - :type security_qualifier: str - :param password_value: The password value. - :type password_value: str - """ - - _validation = { - 'authorization_qualifier': {'required': True}, - 'security_qualifier': {'required': True}, - } - - _attribute_map = { - 'authorization_qualifier': {'key': 'authorizationQualifier', 'type': 'str'}, - 'authorization_value': {'key': 'authorizationValue', 'type': 'str'}, - 'security_qualifier': {'key': 'securityQualifier', 'type': 'str'}, - 'password_value': {'key': 'passwordValue', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(X12SecuritySettings, self).__init__(**kwargs) - self.authorization_qualifier = kwargs.get('authorization_qualifier', None) - self.authorization_value = kwargs.get('authorization_value', None) - self.security_qualifier = kwargs.get('security_qualifier', None) - self.password_value = kwargs.get('password_value', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_security_settings_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_security_settings_py3.py deleted file mode 100644 index fd3591dffd2a..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_security_settings_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class X12SecuritySettings(Model): - """The X12 agreement security settings. - - All required parameters must be populated in order to send to Azure. - - :param authorization_qualifier: Required. The authorization qualifier. - :type authorization_qualifier: str - :param authorization_value: The authorization value. - :type authorization_value: str - :param security_qualifier: Required. The security qualifier. - :type security_qualifier: str - :param password_value: The password value. - :type password_value: str - """ - - _validation = { - 'authorization_qualifier': {'required': True}, - 'security_qualifier': {'required': True}, - } - - _attribute_map = { - 'authorization_qualifier': {'key': 'authorizationQualifier', 'type': 'str'}, - 'authorization_value': {'key': 'authorizationValue', 'type': 'str'}, - 'security_qualifier': {'key': 'securityQualifier', 'type': 'str'}, - 'password_value': {'key': 'passwordValue', 'type': 'str'}, - } - - def __init__(self, *, authorization_qualifier: str, security_qualifier: str, authorization_value: str=None, password_value: str=None, **kwargs) -> None: - super(X12SecuritySettings, self).__init__(**kwargs) - self.authorization_qualifier = authorization_qualifier - self.authorization_value = authorization_value - self.security_qualifier = security_qualifier - self.password_value = password_value diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_override.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_override.py deleted file mode 100644 index 35beb6787a74..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_override.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class X12ValidationOverride(Model): - """The X12 validation override settings. - - All required parameters must be populated in order to send to Azure. - - :param message_id: Required. The message id on which the validation - settings has to be applied. - :type message_id: str - :param validate_edi_types: Required. The value indicating whether to - validate EDI types. - :type validate_edi_types: bool - :param validate_xsd_types: Required. The value indicating whether to - validate XSD types. - :type validate_xsd_types: bool - :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value - indicating whether to allow leading and trailing spaces and zeroes. - :type allow_leading_and_trailing_spaces_and_zeroes: bool - :param validate_character_set: Required. The value indicating whether to - validate character Set. - :type validate_character_set: bool - :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value - indicating whether to trim leading and trailing spaces and zeroes. - :type trim_leading_and_trailing_spaces_and_zeroes: bool - :param trailing_separator_policy: Required. The trailing separator policy. - Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', - 'Mandatory' - :type trailing_separator_policy: str or - ~azure.mgmt.logic.models.TrailingSeparatorPolicy - """ - - _validation = { - 'message_id': {'required': True}, - 'validate_edi_types': {'required': True}, - 'validate_xsd_types': {'required': True}, - 'allow_leading_and_trailing_spaces_and_zeroes': {'required': True}, - 'validate_character_set': {'required': True}, - 'trim_leading_and_trailing_spaces_and_zeroes': {'required': True}, - 'trailing_separator_policy': {'required': True}, - } - - _attribute_map = { - 'message_id': {'key': 'messageId', 'type': 'str'}, - 'validate_edi_types': {'key': 'validateEDITypes', 'type': 'bool'}, - 'validate_xsd_types': {'key': 'validateXSDTypes', 'type': 'bool'}, - 'allow_leading_and_trailing_spaces_and_zeroes': {'key': 'allowLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, - 'validate_character_set': {'key': 'validateCharacterSet', 'type': 'bool'}, - 'trim_leading_and_trailing_spaces_and_zeroes': {'key': 'trimLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, - 'trailing_separator_policy': {'key': 'trailingSeparatorPolicy', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(X12ValidationOverride, self).__init__(**kwargs) - self.message_id = kwargs.get('message_id', None) - self.validate_edi_types = kwargs.get('validate_edi_types', None) - self.validate_xsd_types = kwargs.get('validate_xsd_types', None) - self.allow_leading_and_trailing_spaces_and_zeroes = kwargs.get('allow_leading_and_trailing_spaces_and_zeroes', None) - self.validate_character_set = kwargs.get('validate_character_set', None) - self.trim_leading_and_trailing_spaces_and_zeroes = kwargs.get('trim_leading_and_trailing_spaces_and_zeroes', None) - self.trailing_separator_policy = kwargs.get('trailing_separator_policy', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_override_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_override_py3.py deleted file mode 100644 index 4b27fb024434..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_override_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class X12ValidationOverride(Model): - """The X12 validation override settings. - - All required parameters must be populated in order to send to Azure. - - :param message_id: Required. The message id on which the validation - settings has to be applied. - :type message_id: str - :param validate_edi_types: Required. The value indicating whether to - validate EDI types. - :type validate_edi_types: bool - :param validate_xsd_types: Required. The value indicating whether to - validate XSD types. - :type validate_xsd_types: bool - :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value - indicating whether to allow leading and trailing spaces and zeroes. - :type allow_leading_and_trailing_spaces_and_zeroes: bool - :param validate_character_set: Required. The value indicating whether to - validate character Set. - :type validate_character_set: bool - :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value - indicating whether to trim leading and trailing spaces and zeroes. - :type trim_leading_and_trailing_spaces_and_zeroes: bool - :param trailing_separator_policy: Required. The trailing separator policy. - Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', - 'Mandatory' - :type trailing_separator_policy: str or - ~azure.mgmt.logic.models.TrailingSeparatorPolicy - """ - - _validation = { - 'message_id': {'required': True}, - 'validate_edi_types': {'required': True}, - 'validate_xsd_types': {'required': True}, - 'allow_leading_and_trailing_spaces_and_zeroes': {'required': True}, - 'validate_character_set': {'required': True}, - 'trim_leading_and_trailing_spaces_and_zeroes': {'required': True}, - 'trailing_separator_policy': {'required': True}, - } - - _attribute_map = { - 'message_id': {'key': 'messageId', 'type': 'str'}, - 'validate_edi_types': {'key': 'validateEDITypes', 'type': 'bool'}, - 'validate_xsd_types': {'key': 'validateXSDTypes', 'type': 'bool'}, - 'allow_leading_and_trailing_spaces_and_zeroes': {'key': 'allowLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, - 'validate_character_set': {'key': 'validateCharacterSet', 'type': 'bool'}, - 'trim_leading_and_trailing_spaces_and_zeroes': {'key': 'trimLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, - 'trailing_separator_policy': {'key': 'trailingSeparatorPolicy', 'type': 'str'}, - } - - def __init__(self, *, message_id: str, validate_edi_types: bool, validate_xsd_types: bool, allow_leading_and_trailing_spaces_and_zeroes: bool, validate_character_set: bool, trim_leading_and_trailing_spaces_and_zeroes: bool, trailing_separator_policy, **kwargs) -> None: - super(X12ValidationOverride, self).__init__(**kwargs) - self.message_id = message_id - self.validate_edi_types = validate_edi_types - self.validate_xsd_types = validate_xsd_types - self.allow_leading_and_trailing_spaces_and_zeroes = allow_leading_and_trailing_spaces_and_zeroes - self.validate_character_set = validate_character_set - self.trim_leading_and_trailing_spaces_and_zeroes = trim_leading_and_trailing_spaces_and_zeroes - self.trailing_separator_policy = trailing_separator_policy diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_settings.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_settings.py deleted file mode 100644 index 3fcbee7a88a4..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_settings.py +++ /dev/null @@ -1,91 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class X12ValidationSettings(Model): - """The X12 agreement validation settings. - - All required parameters must be populated in order to send to Azure. - - :param validate_character_set: Required. The value indicating whether to - validate character set in the message. - :type validate_character_set: bool - :param check_duplicate_interchange_control_number: Required. The value - indicating whether to check for duplicate interchange control number. - :type check_duplicate_interchange_control_number: bool - :param interchange_control_number_validity_days: Required. The validity - period of interchange control number. - :type interchange_control_number_validity_days: int - :param check_duplicate_group_control_number: Required. The value - indicating whether to check for duplicate group control number. - :type check_duplicate_group_control_number: bool - :param check_duplicate_transaction_set_control_number: Required. The value - indicating whether to check for duplicate transaction set control number. - :type check_duplicate_transaction_set_control_number: bool - :param validate_edi_types: Required. The value indicating whether to - Whether to validate EDI types. - :type validate_edi_types: bool - :param validate_xsd_types: Required. The value indicating whether to - Whether to validate XSD types. - :type validate_xsd_types: bool - :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value - indicating whether to allow leading and trailing spaces and zeroes. - :type allow_leading_and_trailing_spaces_and_zeroes: bool - :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value - indicating whether to trim leading and trailing spaces and zeroes. - :type trim_leading_and_trailing_spaces_and_zeroes: bool - :param trailing_separator_policy: Required. The trailing separator policy. - Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', - 'Mandatory' - :type trailing_separator_policy: str or - ~azure.mgmt.logic.models.TrailingSeparatorPolicy - """ - - _validation = { - 'validate_character_set': {'required': True}, - 'check_duplicate_interchange_control_number': {'required': True}, - 'interchange_control_number_validity_days': {'required': True}, - 'check_duplicate_group_control_number': {'required': True}, - 'check_duplicate_transaction_set_control_number': {'required': True}, - 'validate_edi_types': {'required': True}, - 'validate_xsd_types': {'required': True}, - 'allow_leading_and_trailing_spaces_and_zeroes': {'required': True}, - 'trim_leading_and_trailing_spaces_and_zeroes': {'required': True}, - 'trailing_separator_policy': {'required': True}, - } - - _attribute_map = { - 'validate_character_set': {'key': 'validateCharacterSet', 'type': 'bool'}, - 'check_duplicate_interchange_control_number': {'key': 'checkDuplicateInterchangeControlNumber', 'type': 'bool'}, - 'interchange_control_number_validity_days': {'key': 'interchangeControlNumberValidityDays', 'type': 'int'}, - 'check_duplicate_group_control_number': {'key': 'checkDuplicateGroupControlNumber', 'type': 'bool'}, - 'check_duplicate_transaction_set_control_number': {'key': 'checkDuplicateTransactionSetControlNumber', 'type': 'bool'}, - 'validate_edi_types': {'key': 'validateEDITypes', 'type': 'bool'}, - 'validate_xsd_types': {'key': 'validateXSDTypes', 'type': 'bool'}, - 'allow_leading_and_trailing_spaces_and_zeroes': {'key': 'allowLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, - 'trim_leading_and_trailing_spaces_and_zeroes': {'key': 'trimLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, - 'trailing_separator_policy': {'key': 'trailingSeparatorPolicy', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(X12ValidationSettings, self).__init__(**kwargs) - self.validate_character_set = kwargs.get('validate_character_set', None) - self.check_duplicate_interchange_control_number = kwargs.get('check_duplicate_interchange_control_number', None) - self.interchange_control_number_validity_days = kwargs.get('interchange_control_number_validity_days', None) - self.check_duplicate_group_control_number = kwargs.get('check_duplicate_group_control_number', None) - self.check_duplicate_transaction_set_control_number = kwargs.get('check_duplicate_transaction_set_control_number', None) - self.validate_edi_types = kwargs.get('validate_edi_types', None) - self.validate_xsd_types = kwargs.get('validate_xsd_types', None) - self.allow_leading_and_trailing_spaces_and_zeroes = kwargs.get('allow_leading_and_trailing_spaces_and_zeroes', None) - self.trim_leading_and_trailing_spaces_and_zeroes = kwargs.get('trim_leading_and_trailing_spaces_and_zeroes', None) - self.trailing_separator_policy = kwargs.get('trailing_separator_policy', None) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_settings_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_settings_py3.py deleted file mode 100644 index 176e112201f9..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_settings_py3.py +++ /dev/null @@ -1,91 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class X12ValidationSettings(Model): - """The X12 agreement validation settings. - - All required parameters must be populated in order to send to Azure. - - :param validate_character_set: Required. The value indicating whether to - validate character set in the message. - :type validate_character_set: bool - :param check_duplicate_interchange_control_number: Required. The value - indicating whether to check for duplicate interchange control number. - :type check_duplicate_interchange_control_number: bool - :param interchange_control_number_validity_days: Required. The validity - period of interchange control number. - :type interchange_control_number_validity_days: int - :param check_duplicate_group_control_number: Required. The value - indicating whether to check for duplicate group control number. - :type check_duplicate_group_control_number: bool - :param check_duplicate_transaction_set_control_number: Required. The value - indicating whether to check for duplicate transaction set control number. - :type check_duplicate_transaction_set_control_number: bool - :param validate_edi_types: Required. The value indicating whether to - Whether to validate EDI types. - :type validate_edi_types: bool - :param validate_xsd_types: Required. The value indicating whether to - Whether to validate XSD types. - :type validate_xsd_types: bool - :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value - indicating whether to allow leading and trailing spaces and zeroes. - :type allow_leading_and_trailing_spaces_and_zeroes: bool - :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value - indicating whether to trim leading and trailing spaces and zeroes. - :type trim_leading_and_trailing_spaces_and_zeroes: bool - :param trailing_separator_policy: Required. The trailing separator policy. - Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', - 'Mandatory' - :type trailing_separator_policy: str or - ~azure.mgmt.logic.models.TrailingSeparatorPolicy - """ - - _validation = { - 'validate_character_set': {'required': True}, - 'check_duplicate_interchange_control_number': {'required': True}, - 'interchange_control_number_validity_days': {'required': True}, - 'check_duplicate_group_control_number': {'required': True}, - 'check_duplicate_transaction_set_control_number': {'required': True}, - 'validate_edi_types': {'required': True}, - 'validate_xsd_types': {'required': True}, - 'allow_leading_and_trailing_spaces_and_zeroes': {'required': True}, - 'trim_leading_and_trailing_spaces_and_zeroes': {'required': True}, - 'trailing_separator_policy': {'required': True}, - } - - _attribute_map = { - 'validate_character_set': {'key': 'validateCharacterSet', 'type': 'bool'}, - 'check_duplicate_interchange_control_number': {'key': 'checkDuplicateInterchangeControlNumber', 'type': 'bool'}, - 'interchange_control_number_validity_days': {'key': 'interchangeControlNumberValidityDays', 'type': 'int'}, - 'check_duplicate_group_control_number': {'key': 'checkDuplicateGroupControlNumber', 'type': 'bool'}, - 'check_duplicate_transaction_set_control_number': {'key': 'checkDuplicateTransactionSetControlNumber', 'type': 'bool'}, - 'validate_edi_types': {'key': 'validateEDITypes', 'type': 'bool'}, - 'validate_xsd_types': {'key': 'validateXSDTypes', 'type': 'bool'}, - 'allow_leading_and_trailing_spaces_and_zeroes': {'key': 'allowLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, - 'trim_leading_and_trailing_spaces_and_zeroes': {'key': 'trimLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, - 'trailing_separator_policy': {'key': 'trailingSeparatorPolicy', 'type': 'str'}, - } - - def __init__(self, *, validate_character_set: bool, check_duplicate_interchange_control_number: bool, interchange_control_number_validity_days: int, check_duplicate_group_control_number: bool, check_duplicate_transaction_set_control_number: bool, validate_edi_types: bool, validate_xsd_types: bool, allow_leading_and_trailing_spaces_and_zeroes: bool, trim_leading_and_trailing_spaces_and_zeroes: bool, trailing_separator_policy, **kwargs) -> None: - super(X12ValidationSettings, self).__init__(**kwargs) - self.validate_character_set = validate_character_set - self.check_duplicate_interchange_control_number = check_duplicate_interchange_control_number - self.interchange_control_number_validity_days = interchange_control_number_validity_days - self.check_duplicate_group_control_number = check_duplicate_group_control_number - self.check_duplicate_transaction_set_control_number = check_duplicate_transaction_set_control_number - self.validate_edi_types = validate_edi_types - self.validate_xsd_types = validate_xsd_types - self.allow_leading_and_trailing_spaces_and_zeroes = allow_leading_and_trailing_spaces_and_zeroes - self.trim_leading_and_trailing_spaces_and_zeroes = trim_leading_and_trailing_spaces_and_zeroes - self.trailing_separator_policy = trailing_separator_policy diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/__init__.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/__init__.py index 71ca7f9ddd5e..ec6c6fd63fa4 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/__init__.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/__init__.py @@ -9,28 +9,28 @@ # regenerated. # -------------------------------------------------------------------------- -from .workflows_operations import WorkflowsOperations -from .workflow_versions_operations import WorkflowVersionsOperations -from .workflow_triggers_operations import WorkflowTriggersOperations -from .workflow_version_triggers_operations import WorkflowVersionTriggersOperations -from .workflow_trigger_histories_operations import WorkflowTriggerHistoriesOperations -from .workflow_runs_operations import WorkflowRunsOperations -from .workflow_run_actions_operations import WorkflowRunActionsOperations -from .workflow_run_action_repetitions_operations import WorkflowRunActionRepetitionsOperations -from .workflow_run_action_repetitions_request_histories_operations import WorkflowRunActionRepetitionsRequestHistoriesOperations -from .workflow_run_action_request_histories_operations import WorkflowRunActionRequestHistoriesOperations -from .workflow_run_action_scope_repetitions_operations import WorkflowRunActionScopeRepetitionsOperations -from .workflow_run_operations import WorkflowRunOperations -from .integration_accounts_operations import IntegrationAccountsOperations -from .integration_account_assemblies_operations import IntegrationAccountAssembliesOperations -from .integration_account_batch_configurations_operations import IntegrationAccountBatchConfigurationsOperations -from .integration_account_schemas_operations import IntegrationAccountSchemasOperations -from .integration_account_maps_operations import IntegrationAccountMapsOperations -from .integration_account_partners_operations import IntegrationAccountPartnersOperations -from .integration_account_agreements_operations import IntegrationAccountAgreementsOperations -from .integration_account_certificates_operations import IntegrationAccountCertificatesOperations -from .integration_account_sessions_operations import IntegrationAccountSessionsOperations -from .operations import Operations +from ._workflows_operations import WorkflowsOperations +from ._workflow_versions_operations import WorkflowVersionsOperations +from ._workflow_triggers_operations import WorkflowTriggersOperations +from ._workflow_version_triggers_operations import WorkflowVersionTriggersOperations +from ._workflow_trigger_histories_operations import WorkflowTriggerHistoriesOperations +from ._workflow_runs_operations import WorkflowRunsOperations +from ._workflow_run_actions_operations import WorkflowRunActionsOperations +from ._workflow_run_action_repetitions_operations import WorkflowRunActionRepetitionsOperations +from ._workflow_run_action_repetitions_request_histories_operations import WorkflowRunActionRepetitionsRequestHistoriesOperations +from ._workflow_run_action_request_histories_operations import WorkflowRunActionRequestHistoriesOperations +from ._workflow_run_action_scope_repetitions_operations import WorkflowRunActionScopeRepetitionsOperations +from ._workflow_run_operations import WorkflowRunOperations +from ._integration_accounts_operations import IntegrationAccountsOperations +from ._integration_account_assemblies_operations import IntegrationAccountAssembliesOperations +from ._integration_account_batch_configurations_operations import IntegrationAccountBatchConfigurationsOperations +from ._integration_account_schemas_operations import IntegrationAccountSchemasOperations +from ._integration_account_maps_operations import IntegrationAccountMapsOperations +from ._integration_account_partners_operations import IntegrationAccountPartnersOperations +from ._integration_account_agreements_operations import IntegrationAccountAgreementsOperations +from ._integration_account_certificates_operations import IntegrationAccountCertificatesOperations +from ._integration_account_sessions_operations import IntegrationAccountSessionsOperations +from ._operations import Operations __all__ = [ 'WorkflowsOperations', diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_agreements_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_agreements_operations.py new file mode 100644 index 000000000000..4e1d2d56570b --- /dev/null +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_agreements_operations.py @@ -0,0 +1,388 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IntegrationAccountAgreementsOperations(object): + """IntegrationAccountAgreementsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2018-07-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-07-01-preview" + + self.config = config + + def list( + self, resource_group_name, integration_account_name, top=None, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of integration account agreements. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param top: The number of items to be included in the result. + :type top: int + :param filter: The filter to apply on the operation. Options for + filters include: AgreementType. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of IntegrationAccountAgreement + :rtype: + ~azure.mgmt.logic.models.IntegrationAccountAgreementPaged[~azure.mgmt.logic.models.IntegrationAccountAgreement] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IntegrationAccountAgreementPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements'} + + def get( + self, resource_group_name, integration_account_name, agreement_name, custom_headers=None, raw=False, **operation_config): + """Gets an integration account agreement. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param agreement_name: The integration account agreement name. + :type agreement_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IntegrationAccountAgreement or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccountAgreement or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'agreementName': self._serialize.url("agreement_name", agreement_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IntegrationAccountAgreement', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}'} + + def create_or_update( + self, resource_group_name, integration_account_name, agreement_name, agreement, custom_headers=None, raw=False, **operation_config): + """Creates or updates an integration account agreement. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param agreement_name: The integration account agreement name. + :type agreement_name: str + :param agreement: The integration account agreement. + :type agreement: ~azure.mgmt.logic.models.IntegrationAccountAgreement + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IntegrationAccountAgreement or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccountAgreement or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'agreementName': self._serialize.url("agreement_name", agreement_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(agreement, 'IntegrationAccountAgreement') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IntegrationAccountAgreement', response) + if response.status_code == 201: + deserialized = self._deserialize('IntegrationAccountAgreement', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}'} + + def delete( + self, resource_group_name, integration_account_name, agreement_name, custom_headers=None, raw=False, **operation_config): + """Deletes an integration account agreement. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param agreement_name: The integration account agreement name. + :type agreement_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'agreementName': self._serialize.url("agreement_name", agreement_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}'} + + def list_content_callback_url( + self, resource_group_name, integration_account_name, agreement_name, not_after=None, key_type=None, custom_headers=None, raw=False, **operation_config): + """Get the content callback url. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param agreement_name: The integration account agreement name. + :type agreement_name: str + :param not_after: The expiry time. + :type not_after: datetime + :param key_type: The key type. Possible values include: + 'NotSpecified', 'Primary', 'Secondary' + :type key_type: str or ~azure.mgmt.logic.models.KeyType + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkflowTriggerCallbackUrl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + list_content_callback_url1 = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + + # Construct URL + url = self.list_content_callback_url.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'agreementName': self._serialize.url("agreement_name", agreement_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(list_content_callback_url1, 'GetCallbackUrlParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkflowTriggerCallbackUrl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}/listContentCallbackUrl'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_assemblies_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_assemblies_operations.py new file mode 100644 index 000000000000..d8e56a24d14e --- /dev/null +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_assemblies_operations.py @@ -0,0 +1,368 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IntegrationAccountAssembliesOperations(object): + """IntegrationAccountAssembliesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2018-07-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-07-01-preview" + + self.config = config + + def list( + self, resource_group_name, integration_account_name, custom_headers=None, raw=False, **operation_config): + """List the assemblies for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AssemblyDefinition + :rtype: + ~azure.mgmt.logic.models.AssemblyDefinitionPaged[~azure.mgmt.logic.models.AssemblyDefinition] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AssemblyDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies'} + + def get( + self, resource_group_name, integration_account_name, assembly_artifact_name, custom_headers=None, raw=False, **operation_config): + """Get an assembly for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param assembly_artifact_name: The assembly artifact name. + :type assembly_artifact_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AssemblyDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.AssemblyDefinition or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'assemblyArtifactName': self._serialize.url("assembly_artifact_name", assembly_artifact_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AssemblyDefinition', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}'} + + def create_or_update( + self, resource_group_name, integration_account_name, assembly_artifact_name, assembly_artifact, custom_headers=None, raw=False, **operation_config): + """Create or update an assembly for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param assembly_artifact_name: The assembly artifact name. + :type assembly_artifact_name: str + :param assembly_artifact: The assembly artifact. + :type assembly_artifact: ~azure.mgmt.logic.models.AssemblyDefinition + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AssemblyDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.AssemblyDefinition or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'assemblyArtifactName': self._serialize.url("assembly_artifact_name", assembly_artifact_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(assembly_artifact, 'AssemblyDefinition') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AssemblyDefinition', response) + if response.status_code == 201: + deserialized = self._deserialize('AssemblyDefinition', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}'} + + def delete( + self, resource_group_name, integration_account_name, assembly_artifact_name, custom_headers=None, raw=False, **operation_config): + """Delete an assembly for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param assembly_artifact_name: The assembly artifact name. + :type assembly_artifact_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'assemblyArtifactName': self._serialize.url("assembly_artifact_name", assembly_artifact_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}'} + + def list_content_callback_url( + self, resource_group_name, integration_account_name, assembly_artifact_name, custom_headers=None, raw=False, **operation_config): + """Get the content callback url for an integration account assembly. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param assembly_artifact_name: The assembly artifact name. + :type assembly_artifact_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkflowTriggerCallbackUrl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_content_callback_url.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'assemblyArtifactName': self._serialize.url("assembly_artifact_name", assembly_artifact_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkflowTriggerCallbackUrl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}/listContentCallbackUrl'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_batch_configurations_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_batch_configurations_operations.py new file mode 100644 index 000000000000..2ff1e0e41971 --- /dev/null +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_batch_configurations_operations.py @@ -0,0 +1,304 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IntegrationAccountBatchConfigurationsOperations(object): + """IntegrationAccountBatchConfigurationsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2018-07-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-07-01-preview" + + self.config = config + + def list( + self, resource_group_name, integration_account_name, custom_headers=None, raw=False, **operation_config): + """List the batch configurations for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of BatchConfiguration + :rtype: + ~azure.mgmt.logic.models.BatchConfigurationPaged[~azure.mgmt.logic.models.BatchConfiguration] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.BatchConfigurationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations'} + + def get( + self, resource_group_name, integration_account_name, batch_configuration_name, custom_headers=None, raw=False, **operation_config): + """Get a batch configuration for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param batch_configuration_name: The batch configuration name. + :type batch_configuration_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BatchConfiguration or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.BatchConfiguration or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'batchConfigurationName': self._serialize.url("batch_configuration_name", batch_configuration_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BatchConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}'} + + def create_or_update( + self, resource_group_name, integration_account_name, batch_configuration_name, batch_configuration, custom_headers=None, raw=False, **operation_config): + """Create or update a batch configuration for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param batch_configuration_name: The batch configuration name. + :type batch_configuration_name: str + :param batch_configuration: The batch configuration. + :type batch_configuration: ~azure.mgmt.logic.models.BatchConfiguration + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BatchConfiguration or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.BatchConfiguration or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'batchConfigurationName': self._serialize.url("batch_configuration_name", batch_configuration_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(batch_configuration, 'BatchConfiguration') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BatchConfiguration', response) + if response.status_code == 201: + deserialized = self._deserialize('BatchConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}'} + + def delete( + self, resource_group_name, integration_account_name, batch_configuration_name, custom_headers=None, raw=False, **operation_config): + """Delete a batch configuration for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param batch_configuration_name: The batch configuration name. + :type batch_configuration_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'batchConfigurationName': self._serialize.url("batch_configuration_name", batch_configuration_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_certificates_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_certificates_operations.py new file mode 100644 index 000000000000..379bb3cb2c68 --- /dev/null +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_certificates_operations.py @@ -0,0 +1,311 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IntegrationAccountCertificatesOperations(object): + """IntegrationAccountCertificatesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2018-07-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-07-01-preview" + + self.config = config + + def list( + self, resource_group_name, integration_account_name, top=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of integration account certificates. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param top: The number of items to be included in the result. + :type top: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of IntegrationAccountCertificate + :rtype: + ~azure.mgmt.logic.models.IntegrationAccountCertificatePaged[~azure.mgmt.logic.models.IntegrationAccountCertificate] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IntegrationAccountCertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates'} + + def get( + self, resource_group_name, integration_account_name, certificate_name, custom_headers=None, raw=False, **operation_config): + """Gets an integration account certificate. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param certificate_name: The integration account certificate name. + :type certificate_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IntegrationAccountCertificate or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccountCertificate or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IntegrationAccountCertificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}'} + + def create_or_update( + self, resource_group_name, integration_account_name, certificate_name, certificate, custom_headers=None, raw=False, **operation_config): + """Creates or updates an integration account certificate. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param certificate_name: The integration account certificate name. + :type certificate_name: str + :param certificate: The integration account certificate. + :type certificate: + ~azure.mgmt.logic.models.IntegrationAccountCertificate + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IntegrationAccountCertificate or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccountCertificate or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(certificate, 'IntegrationAccountCertificate') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IntegrationAccountCertificate', response) + if response.status_code == 201: + deserialized = self._deserialize('IntegrationAccountCertificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}'} + + def delete( + self, resource_group_name, integration_account_name, certificate_name, custom_headers=None, raw=False, **operation_config): + """Deletes an integration account certificate. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param certificate_name: The integration account certificate name. + :type certificate_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_maps_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_maps_operations.py new file mode 100644 index 000000000000..f561141ba12b --- /dev/null +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_maps_operations.py @@ -0,0 +1,388 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IntegrationAccountMapsOperations(object): + """IntegrationAccountMapsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2018-07-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-07-01-preview" + + self.config = config + + def list( + self, resource_group_name, integration_account_name, top=None, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of integration account maps. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param top: The number of items to be included in the result. + :type top: int + :param filter: The filter to apply on the operation. Options for + filters include: MapType. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of IntegrationAccountMap + :rtype: + ~azure.mgmt.logic.models.IntegrationAccountMapPaged[~azure.mgmt.logic.models.IntegrationAccountMap] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IntegrationAccountMapPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps'} + + def get( + self, resource_group_name, integration_account_name, map_name, custom_headers=None, raw=False, **operation_config): + """Gets an integration account map. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param map_name: The integration account map name. + :type map_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IntegrationAccountMap or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccountMap or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'mapName': self._serialize.url("map_name", map_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IntegrationAccountMap', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}'} + + def create_or_update( + self, resource_group_name, integration_account_name, map_name, map, custom_headers=None, raw=False, **operation_config): + """Creates or updates an integration account map. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param map_name: The integration account map name. + :type map_name: str + :param map: The integration account map. + :type map: ~azure.mgmt.logic.models.IntegrationAccountMap + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IntegrationAccountMap or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccountMap or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'mapName': self._serialize.url("map_name", map_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(map, 'IntegrationAccountMap') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IntegrationAccountMap', response) + if response.status_code == 201: + deserialized = self._deserialize('IntegrationAccountMap', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}'} + + def delete( + self, resource_group_name, integration_account_name, map_name, custom_headers=None, raw=False, **operation_config): + """Deletes an integration account map. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param map_name: The integration account map name. + :type map_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'mapName': self._serialize.url("map_name", map_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}'} + + def list_content_callback_url( + self, resource_group_name, integration_account_name, map_name, not_after=None, key_type=None, custom_headers=None, raw=False, **operation_config): + """Get the content callback url. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param map_name: The integration account map name. + :type map_name: str + :param not_after: The expiry time. + :type not_after: datetime + :param key_type: The key type. Possible values include: + 'NotSpecified', 'Primary', 'Secondary' + :type key_type: str or ~azure.mgmt.logic.models.KeyType + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkflowTriggerCallbackUrl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + list_content_callback_url1 = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + + # Construct URL + url = self.list_content_callback_url.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'mapName': self._serialize.url("map_name", map_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(list_content_callback_url1, 'GetCallbackUrlParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkflowTriggerCallbackUrl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}/listContentCallbackUrl'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_partners_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_partners_operations.py new file mode 100644 index 000000000000..9375da75be8f --- /dev/null +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_partners_operations.py @@ -0,0 +1,388 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IntegrationAccountPartnersOperations(object): + """IntegrationAccountPartnersOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2018-07-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-07-01-preview" + + self.config = config + + def list( + self, resource_group_name, integration_account_name, top=None, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of integration account partners. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param top: The number of items to be included in the result. + :type top: int + :param filter: The filter to apply on the operation. Options for + filters include: PartnerType. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of IntegrationAccountPartner + :rtype: + ~azure.mgmt.logic.models.IntegrationAccountPartnerPaged[~azure.mgmt.logic.models.IntegrationAccountPartner] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IntegrationAccountPartnerPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners'} + + def get( + self, resource_group_name, integration_account_name, partner_name, custom_headers=None, raw=False, **operation_config): + """Gets an integration account partner. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param partner_name: The integration account partner name. + :type partner_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IntegrationAccountPartner or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccountPartner or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'partnerName': self._serialize.url("partner_name", partner_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IntegrationAccountPartner', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}'} + + def create_or_update( + self, resource_group_name, integration_account_name, partner_name, partner, custom_headers=None, raw=False, **operation_config): + """Creates or updates an integration account partner. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param partner_name: The integration account partner name. + :type partner_name: str + :param partner: The integration account partner. + :type partner: ~azure.mgmt.logic.models.IntegrationAccountPartner + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IntegrationAccountPartner or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccountPartner or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'partnerName': self._serialize.url("partner_name", partner_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(partner, 'IntegrationAccountPartner') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IntegrationAccountPartner', response) + if response.status_code == 201: + deserialized = self._deserialize('IntegrationAccountPartner', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}'} + + def delete( + self, resource_group_name, integration_account_name, partner_name, custom_headers=None, raw=False, **operation_config): + """Deletes an integration account partner. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param partner_name: The integration account partner name. + :type partner_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'partnerName': self._serialize.url("partner_name", partner_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}'} + + def list_content_callback_url( + self, resource_group_name, integration_account_name, partner_name, not_after=None, key_type=None, custom_headers=None, raw=False, **operation_config): + """Get the content callback url. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param partner_name: The integration account partner name. + :type partner_name: str + :param not_after: The expiry time. + :type not_after: datetime + :param key_type: The key type. Possible values include: + 'NotSpecified', 'Primary', 'Secondary' + :type key_type: str or ~azure.mgmt.logic.models.KeyType + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkflowTriggerCallbackUrl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + list_content_callback_url1 = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + + # Construct URL + url = self.list_content_callback_url.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'partnerName': self._serialize.url("partner_name", partner_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(list_content_callback_url1, 'GetCallbackUrlParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkflowTriggerCallbackUrl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}/listContentCallbackUrl'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_schemas_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_schemas_operations.py new file mode 100644 index 000000000000..15b80d4820fa --- /dev/null +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_schemas_operations.py @@ -0,0 +1,388 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IntegrationAccountSchemasOperations(object): + """IntegrationAccountSchemasOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2018-07-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-07-01-preview" + + self.config = config + + def list( + self, resource_group_name, integration_account_name, top=None, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of integration account schemas. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param top: The number of items to be included in the result. + :type top: int + :param filter: The filter to apply on the operation. Options for + filters include: SchemaType. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of IntegrationAccountSchema + :rtype: + ~azure.mgmt.logic.models.IntegrationAccountSchemaPaged[~azure.mgmt.logic.models.IntegrationAccountSchema] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IntegrationAccountSchemaPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas'} + + def get( + self, resource_group_name, integration_account_name, schema_name, custom_headers=None, raw=False, **operation_config): + """Gets an integration account schema. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param schema_name: The integration account schema name. + :type schema_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IntegrationAccountSchema or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccountSchema or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'schemaName': self._serialize.url("schema_name", schema_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IntegrationAccountSchema', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}'} + + def create_or_update( + self, resource_group_name, integration_account_name, schema_name, schema, custom_headers=None, raw=False, **operation_config): + """Creates or updates an integration account schema. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param schema_name: The integration account schema name. + :type schema_name: str + :param schema: The integration account schema. + :type schema: ~azure.mgmt.logic.models.IntegrationAccountSchema + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IntegrationAccountSchema or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccountSchema or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'schemaName': self._serialize.url("schema_name", schema_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(schema, 'IntegrationAccountSchema') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IntegrationAccountSchema', response) + if response.status_code == 201: + deserialized = self._deserialize('IntegrationAccountSchema', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}'} + + def delete( + self, resource_group_name, integration_account_name, schema_name, custom_headers=None, raw=False, **operation_config): + """Deletes an integration account schema. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param schema_name: The integration account schema name. + :type schema_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'schemaName': self._serialize.url("schema_name", schema_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}'} + + def list_content_callback_url( + self, resource_group_name, integration_account_name, schema_name, not_after=None, key_type=None, custom_headers=None, raw=False, **operation_config): + """Get the content callback url. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param schema_name: The integration account schema name. + :type schema_name: str + :param not_after: The expiry time. + :type not_after: datetime + :param key_type: The key type. Possible values include: + 'NotSpecified', 'Primary', 'Secondary' + :type key_type: str or ~azure.mgmt.logic.models.KeyType + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkflowTriggerCallbackUrl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + list_content_callback_url1 = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + + # Construct URL + url = self.list_content_callback_url.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'schemaName': self._serialize.url("schema_name", schema_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(list_content_callback_url1, 'GetCallbackUrlParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkflowTriggerCallbackUrl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}/listContentCallbackUrl'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_sessions_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_sessions_operations.py new file mode 100644 index 000000000000..16d2bb0c135b --- /dev/null +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_sessions_operations.py @@ -0,0 +1,313 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IntegrationAccountSessionsOperations(object): + """IntegrationAccountSessionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2018-07-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-07-01-preview" + + self.config = config + + def list( + self, resource_group_name, integration_account_name, top=None, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of integration account sessions. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param top: The number of items to be included in the result. + :type top: int + :param filter: The filter to apply on the operation. Options for + filters include: ChangedTime. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of IntegrationAccountSession + :rtype: + ~azure.mgmt.logic.models.IntegrationAccountSessionPaged[~azure.mgmt.logic.models.IntegrationAccountSession] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IntegrationAccountSessionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions'} + + def get( + self, resource_group_name, integration_account_name, session_name, custom_headers=None, raw=False, **operation_config): + """Gets an integration account session. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param session_name: The integration account session name. + :type session_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IntegrationAccountSession or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccountSession or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'sessionName': self._serialize.url("session_name", session_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IntegrationAccountSession', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}'} + + def create_or_update( + self, resource_group_name, integration_account_name, session_name, session, custom_headers=None, raw=False, **operation_config): + """Creates or updates an integration account session. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param session_name: The integration account session name. + :type session_name: str + :param session: The integration account session. + :type session: ~azure.mgmt.logic.models.IntegrationAccountSession + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IntegrationAccountSession or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccountSession or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'sessionName': self._serialize.url("session_name", session_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(session, 'IntegrationAccountSession') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IntegrationAccountSession', response) + if response.status_code == 201: + deserialized = self._deserialize('IntegrationAccountSession', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}'} + + def delete( + self, resource_group_name, integration_account_name, session_name, custom_headers=None, raw=False, **operation_config): + """Deletes an integration account session. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param session_name: The integration account session name. + :type session_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'sessionName': self._serialize.url("session_name", session_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_accounts_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_accounts_operations.py new file mode 100644 index 000000000000..9a1dc5ba20c4 --- /dev/null +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_accounts_operations.py @@ -0,0 +1,717 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IntegrationAccountsOperations(object): + """IntegrationAccountsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2018-07-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-07-01-preview" + + self.config = config + + def list_by_subscription( + self, top=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of integration accounts by subscription. + + :param top: The number of items to be included in the result. + :type top: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of IntegrationAccount + :rtype: + ~azure.mgmt.logic.models.IntegrationAccountPaged[~azure.mgmt.logic.models.IntegrationAccount] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IntegrationAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Logic/integrationAccounts'} + + def list_by_resource_group( + self, resource_group_name, top=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of integration accounts by resource group. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param top: The number of items to be included in the result. + :type top: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of IntegrationAccount + :rtype: + ~azure.mgmt.logic.models.IntegrationAccountPaged[~azure.mgmt.logic.models.IntegrationAccount] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IntegrationAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts'} + + def get( + self, resource_group_name, integration_account_name, custom_headers=None, raw=False, **operation_config): + """Gets an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IntegrationAccount or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccount or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IntegrationAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} + + def create_or_update( + self, resource_group_name, integration_account_name, integration_account, custom_headers=None, raw=False, **operation_config): + """Creates or updates an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param integration_account: The integration account. + :type integration_account: ~azure.mgmt.logic.models.IntegrationAccount + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IntegrationAccount or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccount or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(integration_account, 'IntegrationAccount') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IntegrationAccount', response) + if response.status_code == 201: + deserialized = self._deserialize('IntegrationAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} + + def update( + self, resource_group_name, integration_account_name, integration_account, custom_headers=None, raw=False, **operation_config): + """Updates an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param integration_account: The integration account. + :type integration_account: ~azure.mgmt.logic.models.IntegrationAccount + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IntegrationAccount or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccount or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(integration_account, 'IntegrationAccount') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IntegrationAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} + + def delete( + self, resource_group_name, integration_account_name, custom_headers=None, raw=False, **operation_config): + """Deletes an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} + + def list_callback_url( + self, resource_group_name, integration_account_name, not_after=None, key_type=None, custom_headers=None, raw=False, **operation_config): + """Gets the integration account callback URL. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param not_after: The expiry time. + :type not_after: datetime + :param key_type: The key type. Possible values include: + 'NotSpecified', 'Primary', 'Secondary' + :type key_type: str or ~azure.mgmt.logic.models.KeyType + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CallbackUrl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.CallbackUrl or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + + # Construct URL + url = self.list_callback_url.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'GetCallbackUrlParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CallbackUrl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listCallbackUrl'} + + def list_key_vault_keys( + self, resource_group_name, integration_account_name, key_vault, skip_token=None, custom_headers=None, raw=False, **operation_config): + """Gets the integration account's Key Vault keys. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param key_vault: The key vault reference. + :type key_vault: ~azure.mgmt.logic.models.KeyVaultReference + :param skip_token: The skip token. + :type skip_token: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of KeyVaultKey + :rtype: + ~azure.mgmt.logic.models.KeyVaultKeyPaged[~azure.mgmt.logic.models.KeyVaultKey] + :raises: :class:`CloudError` + """ + list_key_vault_keys1 = models.ListKeyVaultKeysDefinition(key_vault=key_vault, skip_token=skip_token) + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_key_vault_keys.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(list_key_vault_keys1, 'ListKeyVaultKeysDefinition') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.KeyVaultKeyPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_key_vault_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listKeyVaultKeys'} + + def log_tracking_events( + self, resource_group_name, integration_account_name, log_tracking_events, custom_headers=None, raw=False, **operation_config): + """Logs the integration account's tracking events. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param log_tracking_events: The callback URL parameters. + :type log_tracking_events: + ~azure.mgmt.logic.models.TrackingEventsDefinition + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.log_tracking_events.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(log_tracking_events, 'TrackingEventsDefinition') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + log_tracking_events.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/logTrackingEvents'} + + def regenerate_access_key( + self, resource_group_name, integration_account_name, key_type=None, custom_headers=None, raw=False, **operation_config): + """Regenerates the integration account access key. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param key_type: The key type. Possible values include: + 'NotSpecified', 'Primary', 'Secondary' + :type key_type: str or ~azure.mgmt.logic.models.KeyType + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IntegrationAccount or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccount or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + regenerate_access_key1 = models.RegenerateActionParameter(key_type=key_type) + + # Construct URL + url = self.regenerate_access_key.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(regenerate_access_key1, 'RegenerateActionParameter') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IntegrationAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + regenerate_access_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/regenerateAccessKey'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_operations.py new file mode 100644 index 000000000000..522c6096aa05 --- /dev/null +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_operations.py @@ -0,0 +1,100 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class Operations(object): + """Operations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2018-07-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-07-01-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the available Logic REST API operations. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Operation + :rtype: + ~azure.mgmt.logic.models.OperationPaged[~azure.mgmt.logic.models.Operation] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Logic/operations'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_action_repetitions_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_action_repetitions_operations.py new file mode 100644 index 000000000000..31997a445e3f --- /dev/null +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_action_repetitions_operations.py @@ -0,0 +1,271 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class WorkflowRunActionRepetitionsOperations(object): + """WorkflowRunActionRepetitionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2018-07-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-07-01-preview" + + self.config = config + + def list( + self, resource_group_name, workflow_name, run_name, action_name, custom_headers=None, raw=False, **operation_config): + """Get all of a workflow run action repetitions. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of + WorkflowRunActionRepetitionDefinition + :rtype: + ~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinitionPaged[~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinition] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + 'actionName': self._serialize.url("action_name", action_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WorkflowRunActionRepetitionDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions'} + + def get( + self, resource_group_name, workflow_name, run_name, action_name, repetition_name, custom_headers=None, raw=False, **operation_config): + """Get a workflow run action repetition. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :param repetition_name: The workflow repetition. + :type repetition_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkflowRunActionRepetitionDefinition or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinition + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + 'actionName': self._serialize.url("action_name", action_name, 'str'), + 'repetitionName': self._serialize.url("repetition_name", repetition_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkflowRunActionRepetitionDefinition', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}'} + + def list_expression_traces( + self, resource_group_name, workflow_name, run_name, action_name, repetition_name, custom_headers=None, raw=False, **operation_config): + """Lists a workflow run expression trace. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :param repetition_name: The workflow repetition. + :type repetition_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ExpressionRoot + :rtype: + ~azure.mgmt.logic.models.ExpressionRootPaged[~azure.mgmt.logic.models.ExpressionRoot] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_expression_traces.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + 'actionName': self._serialize.url("action_name", action_name, 'str'), + 'repetitionName': self._serialize.url("repetition_name", repetition_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ExpressionRootPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_expression_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/listExpressionTraces'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_action_repetitions_request_histories_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_action_repetitions_request_histories_operations.py new file mode 100644 index 000000000000..bc9bd4658aac --- /dev/null +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_action_repetitions_request_histories_operations.py @@ -0,0 +1,191 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class WorkflowRunActionRepetitionsRequestHistoriesOperations(object): + """WorkflowRunActionRepetitionsRequestHistoriesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2018-07-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-07-01-preview" + + self.config = config + + def list( + self, resource_group_name, workflow_name, run_name, action_name, repetition_name, custom_headers=None, raw=False, **operation_config): + """List a workflow run repetition request history. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :param repetition_name: The workflow repetition. + :type repetition_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of RequestHistory + :rtype: + ~azure.mgmt.logic.models.RequestHistoryPaged[~azure.mgmt.logic.models.RequestHistory] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + 'actionName': self._serialize.url("action_name", action_name, 'str'), + 'repetitionName': self._serialize.url("repetition_name", repetition_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RequestHistoryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories'} + + def get( + self, resource_group_name, workflow_name, run_name, action_name, repetition_name, request_history_name, custom_headers=None, raw=False, **operation_config): + """Gets a workflow run repetition request history. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :param repetition_name: The workflow repetition. + :type repetition_name: str + :param request_history_name: The request history name. + :type request_history_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RequestHistory or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.RequestHistory or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + 'actionName': self._serialize.url("action_name", action_name, 'str'), + 'repetitionName': self._serialize.url("repetition_name", repetition_name, 'str'), + 'requestHistoryName': self._serialize.url("request_history_name", request_history_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RequestHistory', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName}'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_action_request_histories_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_action_request_histories_operations.py new file mode 100644 index 000000000000..27369739571c --- /dev/null +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_action_request_histories_operations.py @@ -0,0 +1,185 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class WorkflowRunActionRequestHistoriesOperations(object): + """WorkflowRunActionRequestHistoriesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2018-07-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-07-01-preview" + + self.config = config + + def list( + self, resource_group_name, workflow_name, run_name, action_name, custom_headers=None, raw=False, **operation_config): + """List a workflow run request history. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of RequestHistory + :rtype: + ~azure.mgmt.logic.models.RequestHistoryPaged[~azure.mgmt.logic.models.RequestHistory] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + 'actionName': self._serialize.url("action_name", action_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RequestHistoryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories'} + + def get( + self, resource_group_name, workflow_name, run_name, action_name, request_history_name, custom_headers=None, raw=False, **operation_config): + """Gets a workflow run request history. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :param request_history_name: The request history name. + :type request_history_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RequestHistory or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.RequestHistory or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + 'actionName': self._serialize.url("action_name", action_name, 'str'), + 'requestHistoryName': self._serialize.url("request_history_name", request_history_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RequestHistory', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories/{requestHistoryName}'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_action_scope_repetitions_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_action_scope_repetitions_operations.py new file mode 100644 index 000000000000..5927b009d495 --- /dev/null +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_action_scope_repetitions_operations.py @@ -0,0 +1,180 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class WorkflowRunActionScopeRepetitionsOperations(object): + """WorkflowRunActionScopeRepetitionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2018-07-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-07-01-preview" + + self.config = config + + def list( + self, resource_group_name, workflow_name, run_name, action_name, custom_headers=None, raw=False, **operation_config): + """List the workflow run action scoped repetitions. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkflowRunActionRepetitionDefinitionCollection or + ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinitionCollection + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + 'actionName': self._serialize.url("action_name", action_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkflowRunActionRepetitionDefinitionCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions'} + + def get( + self, resource_group_name, workflow_name, run_name, action_name, repetition_name, custom_headers=None, raw=False, **operation_config): + """Get a workflow run action scoped repetition. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :param repetition_name: The workflow repetition. + :type repetition_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkflowRunActionRepetitionDefinition or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinition + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + 'actionName': self._serialize.url("action_name", action_name, 'str'), + 'repetitionName': self._serialize.url("repetition_name", repetition_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkflowRunActionRepetitionDefinition', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName}'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_actions_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_actions_operations.py new file mode 100644 index 000000000000..570088bfd0df --- /dev/null +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_actions_operations.py @@ -0,0 +1,269 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class WorkflowRunActionsOperations(object): + """WorkflowRunActionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2018-07-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-07-01-preview" + + self.config = config + + def list( + self, resource_group_name, workflow_name, run_name, top=None, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of workflow run actions. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param top: The number of items to be included in the result. + :type top: int + :param filter: The filter to apply on the operation. Options for + filters include: Status. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WorkflowRunAction + :rtype: + ~azure.mgmt.logic.models.WorkflowRunActionPaged[~azure.mgmt.logic.models.WorkflowRunAction] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'runName': self._serialize.url("run_name", run_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WorkflowRunActionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions'} + + def get( + self, resource_group_name, workflow_name, run_name, action_name, custom_headers=None, raw=False, **operation_config): + """Gets a workflow run action. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkflowRunAction or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowRunAction or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + 'actionName': self._serialize.url("action_name", action_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkflowRunAction', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}'} + + def list_expression_traces( + self, resource_group_name, workflow_name, run_name, action_name, custom_headers=None, raw=False, **operation_config): + """Lists a workflow run expression trace. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ExpressionRoot + :rtype: + ~azure.mgmt.logic.models.ExpressionRootPaged[~azure.mgmt.logic.models.ExpressionRoot] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_expression_traces.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + 'actionName': self._serialize.url("action_name", action_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ExpressionRootPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_expression_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/listExpressionTraces'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_operations.py new file mode 100644 index 000000000000..cf090865157a --- /dev/null +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_operations.py @@ -0,0 +1,107 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class WorkflowRunOperations(object): + """WorkflowRunOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2018-07-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-07-01-preview" + + self.config = config + + def get( + self, resource_group_name, workflow_name, run_name, operation_id, custom_headers=None, raw=False, **operation_config): + """Gets an operation for a run. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param operation_id: The workflow operation id. + :type operation_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkflowRun or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowRun or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkflowRun', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/operations/{operationId}'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_runs_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_runs_operations.py new file mode 100644 index 000000000000..33cf5693837b --- /dev/null +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_runs_operations.py @@ -0,0 +1,241 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class WorkflowRunsOperations(object): + """WorkflowRunsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2018-07-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-07-01-preview" + + self.config = config + + def list( + self, resource_group_name, workflow_name, top=None, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of workflow runs. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param top: The number of items to be included in the result. + :type top: int + :param filter: The filter to apply on the operation. Options for + filters include: Status, StartTime, and ClientTrackingId. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WorkflowRun + :rtype: + ~azure.mgmt.logic.models.WorkflowRunPaged[~azure.mgmt.logic.models.WorkflowRun] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WorkflowRunPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs'} + + def get( + self, resource_group_name, workflow_name, run_name, custom_headers=None, raw=False, **operation_config): + """Gets a workflow run. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkflowRun or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowRun or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'runName': self._serialize.url("run_name", run_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkflowRun', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}'} + + def cancel( + self, resource_group_name, workflow_name, run_name, custom_headers=None, raw=False, **operation_config): + """Cancels a workflow run. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.cancel.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'runName': self._serialize.url("run_name", run_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/cancel'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_trigger_histories_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_trigger_histories_operations.py new file mode 100644 index 000000000000..20dcd5985395 --- /dev/null +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_trigger_histories_operations.py @@ -0,0 +1,252 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class WorkflowTriggerHistoriesOperations(object): + """WorkflowTriggerHistoriesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2018-07-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-07-01-preview" + + self.config = config + + def list( + self, resource_group_name, workflow_name, trigger_name, top=None, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of workflow trigger histories. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param trigger_name: The workflow trigger name. + :type trigger_name: str + :param top: The number of items to be included in the result. + :type top: int + :param filter: The filter to apply on the operation. Options for + filters include: Status, StartTime, and ClientTrackingId. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WorkflowTriggerHistory + :rtype: + ~azure.mgmt.logic.models.WorkflowTriggerHistoryPaged[~azure.mgmt.logic.models.WorkflowTriggerHistory] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WorkflowTriggerHistoryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories'} + + def get( + self, resource_group_name, workflow_name, trigger_name, history_name, custom_headers=None, raw=False, **operation_config): + """Gets a workflow trigger history. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param trigger_name: The workflow trigger name. + :type trigger_name: str + :param history_name: The workflow trigger history name. Corresponds to + the run name for triggers that resulted in a run. + :type history_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkflowTriggerHistory or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerHistory or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str'), + 'historyName': self._serialize.url("history_name", history_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkflowTriggerHistory', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}'} + + def resubmit( + self, resource_group_name, workflow_name, trigger_name, history_name, custom_headers=None, raw=False, **operation_config): + """Resubmits a workflow run based on the trigger history. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param trigger_name: The workflow trigger name. + :type trigger_name: str + :param history_name: The workflow trigger history name. Corresponds to + the run name for triggers that resulted in a run. + :type history_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.resubmit.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str'), + 'historyName': self._serialize.url("history_name", history_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + resubmit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}/resubmit'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_triggers_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_triggers_operations.py new file mode 100644 index 000000000000..d90c967d337c --- /dev/null +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_triggers_operations.py @@ -0,0 +1,487 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class WorkflowTriggersOperations(object): + """WorkflowTriggersOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2018-07-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-07-01-preview" + + self.config = config + + def list( + self, resource_group_name, workflow_name, top=None, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of workflow triggers. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param top: The number of items to be included in the result. + :type top: int + :param filter: The filter to apply on the operation. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WorkflowTrigger + :rtype: + ~azure.mgmt.logic.models.WorkflowTriggerPaged[~azure.mgmt.logic.models.WorkflowTrigger] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WorkflowTriggerPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers'} + + def get( + self, resource_group_name, workflow_name, trigger_name, custom_headers=None, raw=False, **operation_config): + """Gets a workflow trigger. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param trigger_name: The workflow trigger name. + :type trigger_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkflowTrigger or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowTrigger or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkflowTrigger', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}'} + + def reset( + self, resource_group_name, workflow_name, trigger_name, custom_headers=None, raw=False, **operation_config): + """Resets a workflow trigger. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param trigger_name: The workflow trigger name. + :type trigger_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.reset.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reset.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/reset'} + + def run( + self, resource_group_name, workflow_name, trigger_name, custom_headers=None, raw=False, **operation_config): + """Runs a workflow trigger. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param trigger_name: The workflow trigger name. + :type trigger_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: object or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`HttpOperationError` + """ + # Construct URL + url = self.run.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code < 200 or response.status_code >= 300: + raise HttpOperationError(self._deserialize, response, 'object') + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + run.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/run'} + + def get_schema_json( + self, resource_group_name, workflow_name, trigger_name, custom_headers=None, raw=False, **operation_config): + """Get the trigger schema as JSON. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param trigger_name: The workflow trigger name. + :type trigger_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: JsonSchema or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.JsonSchema or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_schema_json.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('JsonSchema', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_schema_json.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/schemas/json'} + + def set_state( + self, resource_group_name, workflow_name, trigger_name, source, custom_headers=None, raw=False, **operation_config): + """Sets the state of a workflow trigger. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param trigger_name: The workflow trigger name. + :type trigger_name: str + :param source: + :type source: ~azure.mgmt.logic.models.WorkflowTrigger + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + set_state1 = models.SetTriggerStateActionDefinition(source=source) + + # Construct URL + url = self.set_state.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(set_state1, 'SetTriggerStateActionDefinition') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + set_state.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/setState'} + + def list_callback_url( + self, resource_group_name, workflow_name, trigger_name, custom_headers=None, raw=False, **operation_config): + """Get the callback URL for a workflow trigger. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param trigger_name: The workflow trigger name. + :type trigger_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkflowTriggerCallbackUrl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_callback_url.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkflowTriggerCallbackUrl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/listCallbackUrl'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_version_triggers_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_version_triggers_operations.py new file mode 100644 index 000000000000..3d0d1fb52122 --- /dev/null +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_version_triggers_operations.py @@ -0,0 +1,123 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class WorkflowVersionTriggersOperations(object): + """WorkflowVersionTriggersOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2018-07-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-07-01-preview" + + self.config = config + + def list_callback_url( + self, resource_group_name, workflow_name, version_id, trigger_name, not_after=None, key_type=None, custom_headers=None, raw=False, **operation_config): + """Get the callback url for a trigger of a workflow version. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param version_id: The workflow versionId. + :type version_id: str + :param trigger_name: The workflow trigger name. + :type trigger_name: str + :param not_after: The expiry time. + :type not_after: datetime + :param key_type: The key type. Possible values include: + 'NotSpecified', 'Primary', 'Secondary' + :type key_type: str or ~azure.mgmt.logic.models.KeyType + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkflowTriggerCallbackUrl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = None + if not_after is not None or key_type is not None: + parameters = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + + # Construct URL + url = self.list_callback_url.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str'), + 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if parameters is not None: + body_content = self._serialize.body(parameters, 'GetCallbackUrlParameters') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkflowTriggerCallbackUrl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}/triggers/{triggerName}/listCallbackUrl'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_versions_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_versions_operations.py new file mode 100644 index 000000000000..d2d62de2fba9 --- /dev/null +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_versions_operations.py @@ -0,0 +1,180 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class WorkflowVersionsOperations(object): + """WorkflowVersionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2018-07-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-07-01-preview" + + self.config = config + + def list( + self, resource_group_name, workflow_name, top=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of workflow versions. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param top: The number of items to be included in the result. + :type top: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WorkflowVersion + :rtype: + ~azure.mgmt.logic.models.WorkflowVersionPaged[~azure.mgmt.logic.models.WorkflowVersion] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WorkflowVersionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions'} + + def get( + self, resource_group_name, workflow_name, version_id, custom_headers=None, raw=False, **operation_config): + """Gets a workflow version. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param version_id: The workflow versionId. + :type version_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkflowVersion or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowVersion or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'versionId': self._serialize.url("version_id", version_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkflowVersion', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflows_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflows_operations.py new file mode 100644 index 000000000000..deccce5bdf50 --- /dev/null +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflows_operations.py @@ -0,0 +1,991 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class WorkflowsOperations(object): + """WorkflowsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2018-07-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-07-01-preview" + + self.config = config + + def list_by_subscription( + self, top=None, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of workflows by subscription. + + :param top: The number of items to be included in the result. + :type top: int + :param filter: The filter to apply on the operation. Options for + filters include: State, Trigger, and ReferencedResourceId. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Workflow + :rtype: + ~azure.mgmt.logic.models.WorkflowPaged[~azure.mgmt.logic.models.Workflow] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WorkflowPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Logic/workflows'} + + def list_by_resource_group( + self, resource_group_name, top=None, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of workflows by resource group. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param top: The number of items to be included in the result. + :type top: int + :param filter: The filter to apply on the operation. Options for + filters include: State, Trigger, and ReferencedResourceId. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Workflow + :rtype: + ~azure.mgmt.logic.models.WorkflowPaged[~azure.mgmt.logic.models.Workflow] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WorkflowPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows'} + + def get( + self, resource_group_name, workflow_name, custom_headers=None, raw=False, **operation_config): + """Gets a workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Workflow or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.Workflow or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Workflow', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} + + def create_or_update( + self, resource_group_name, workflow_name, workflow, custom_headers=None, raw=False, **operation_config): + """Creates or updates a workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param workflow: The workflow. + :type workflow: ~azure.mgmt.logic.models.Workflow + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Workflow or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.Workflow or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(workflow, 'Workflow') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Workflow', response) + if response.status_code == 201: + deserialized = self._deserialize('Workflow', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} + + def update( + self, resource_group_name, workflow_name, workflow, custom_headers=None, raw=False, **operation_config): + """Updates a workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param workflow: The workflow. + :type workflow: ~azure.mgmt.logic.models.Workflow + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Workflow or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.Workflow or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(workflow, 'Workflow') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Workflow', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} + + def delete( + self, resource_group_name, workflow_name, custom_headers=None, raw=False, **operation_config): + """Deletes a workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} + + def disable( + self, resource_group_name, workflow_name, custom_headers=None, raw=False, **operation_config): + """Disables a workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.disable.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/disable'} + + def enable( + self, resource_group_name, workflow_name, custom_headers=None, raw=False, **operation_config): + """Enables a workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.enable.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + enable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/enable'} + + def generate_upgraded_definition( + self, resource_group_name, workflow_name, target_schema_version=None, custom_headers=None, raw=False, **operation_config): + """Generates the upgraded definition for a workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param target_schema_version: The target schema version. + :type target_schema_version: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: object or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.GenerateUpgradedDefinitionParameters(target_schema_version=target_schema_version) + + # Construct URL + url = self.generate_upgraded_definition.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'GenerateUpgradedDefinitionParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('object', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + generate_upgraded_definition.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/generateUpgradedDefinition'} + + def list_callback_url( + self, resource_group_name, workflow_name, not_after=None, key_type=None, custom_headers=None, raw=False, **operation_config): + """Get the workflow callback Url. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param not_after: The expiry time. + :type not_after: datetime + :param key_type: The key type. Possible values include: + 'NotSpecified', 'Primary', 'Secondary' + :type key_type: str or ~azure.mgmt.logic.models.KeyType + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkflowTriggerCallbackUrl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + list_callback_url1 = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + + # Construct URL + url = self.list_callback_url.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(list_callback_url1, 'GetCallbackUrlParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkflowTriggerCallbackUrl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listCallbackUrl'} + + def list_swagger( + self, resource_group_name, workflow_name, custom_headers=None, raw=False, **operation_config): + """Gets an OpenAPI definition for the workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: object or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_swagger.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('object', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_swagger.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listSwagger'} + + def move( + self, resource_group_name, workflow_name, move, custom_headers=None, raw=False, **operation_config): + """Moves an existing workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param move: The workflow to move. + :type move: ~azure.mgmt.logic.models.Workflow + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.move.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(move, 'Workflow') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/move'} + + def regenerate_access_key( + self, resource_group_name, workflow_name, key_type=None, custom_headers=None, raw=False, **operation_config): + """Regenerates the callback URL access key for request triggers. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param key_type: The key type. Possible values include: + 'NotSpecified', 'Primary', 'Secondary' + :type key_type: str or ~azure.mgmt.logic.models.KeyType + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + key_type1 = models.RegenerateActionParameter(key_type=key_type) + + # Construct URL + url = self.regenerate_access_key.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(key_type1, 'RegenerateActionParameter') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + regenerate_access_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/regenerateAccessKey'} + + def validate_by_resource_group( + self, resource_group_name, workflow_name, validate, custom_headers=None, raw=False, **operation_config): + """Validates the workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param validate: The workflow. + :type validate: ~azure.mgmt.logic.models.Workflow + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.validate_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(validate, 'Workflow') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + validate_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/validate'} + + def validate_by_location( + self, resource_group_name, location, workflow_name, workflow, custom_headers=None, raw=False, **operation_config): + """Validates the workflow definition. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param location: The workflow location. + :type location: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param workflow: The workflow definition. + :type workflow: ~azure.mgmt.logic.models.Workflow + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.validate_by_location.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(workflow, 'Workflow') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + validate_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/locations/{location}/workflows/{workflowName}/validate'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/integration_account_agreements_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/integration_account_agreements_operations.py deleted file mode 100644 index 89b061117b82..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/integration_account_agreements_operations.py +++ /dev/null @@ -1,387 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class IntegrationAccountAgreementsOperations(object): - """IntegrationAccountAgreementsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version. Constant value: "2018-07-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-07-01-preview" - - self.config = config - - def list( - self, resource_group_name, integration_account_name, top=None, filter=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of integration account agreements. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param top: The number of items to be included in the result. - :type top: int - :param filter: The filter to apply on the operation. Options for - filters include: AgreementType. - :type filter: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of IntegrationAccountAgreement - :rtype: - ~azure.mgmt.logic.models.IntegrationAccountAgreementPaged[~azure.mgmt.logic.models.IntegrationAccountAgreement] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.IntegrationAccountAgreementPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.IntegrationAccountAgreementPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements'} - - def get( - self, resource_group_name, integration_account_name, agreement_name, custom_headers=None, raw=False, **operation_config): - """Gets an integration account agreement. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param agreement_name: The integration account agreement name. - :type agreement_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IntegrationAccountAgreement or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.logic.models.IntegrationAccountAgreement or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'agreementName': self._serialize.url("agreement_name", agreement_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('IntegrationAccountAgreement', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}'} - - def create_or_update( - self, resource_group_name, integration_account_name, agreement_name, agreement, custom_headers=None, raw=False, **operation_config): - """Creates or updates an integration account agreement. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param agreement_name: The integration account agreement name. - :type agreement_name: str - :param agreement: The integration account agreement. - :type agreement: ~azure.mgmt.logic.models.IntegrationAccountAgreement - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IntegrationAccountAgreement or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.logic.models.IntegrationAccountAgreement or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'agreementName': self._serialize.url("agreement_name", agreement_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(agreement, 'IntegrationAccountAgreement') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('IntegrationAccountAgreement', response) - if response.status_code == 201: - deserialized = self._deserialize('IntegrationAccountAgreement', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}'} - - def delete( - self, resource_group_name, integration_account_name, agreement_name, custom_headers=None, raw=False, **operation_config): - """Deletes an integration account agreement. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param agreement_name: The integration account agreement name. - :type agreement_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'agreementName': self._serialize.url("agreement_name", agreement_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}'} - - def list_content_callback_url( - self, resource_group_name, integration_account_name, agreement_name, not_after=None, key_type=None, custom_headers=None, raw=False, **operation_config): - """Get the content callback url. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param agreement_name: The integration account agreement name. - :type agreement_name: str - :param not_after: The expiry time. - :type not_after: datetime - :param key_type: The key type. Possible values include: - 'NotSpecified', 'Primary', 'Secondary' - :type key_type: str or ~azure.mgmt.logic.models.KeyType - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkflowTriggerCallbackUrl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - list_content_callback_url1 = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) - - # Construct URL - url = self.list_content_callback_url.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'agreementName': self._serialize.url("agreement_name", agreement_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(list_content_callback_url1, 'GetCallbackUrlParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkflowTriggerCallbackUrl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}/listContentCallbackUrl'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/integration_account_assemblies_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/integration_account_assemblies_operations.py deleted file mode 100644 index b939a935148a..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/integration_account_assemblies_operations.py +++ /dev/null @@ -1,367 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class IntegrationAccountAssembliesOperations(object): - """IntegrationAccountAssembliesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version. Constant value: "2018-07-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-07-01-preview" - - self.config = config - - def list( - self, resource_group_name, integration_account_name, custom_headers=None, raw=False, **operation_config): - """List the assemblies for an integration account. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AssemblyDefinition - :rtype: - ~azure.mgmt.logic.models.AssemblyDefinitionPaged[~azure.mgmt.logic.models.AssemblyDefinition] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.AssemblyDefinitionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.AssemblyDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies'} - - def get( - self, resource_group_name, integration_account_name, assembly_artifact_name, custom_headers=None, raw=False, **operation_config): - """Get an assembly for an integration account. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param assembly_artifact_name: The assembly artifact name. - :type assembly_artifact_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AssemblyDefinition or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.logic.models.AssemblyDefinition or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'assemblyArtifactName': self._serialize.url("assembly_artifact_name", assembly_artifact_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AssemblyDefinition', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}'} - - def create_or_update( - self, resource_group_name, integration_account_name, assembly_artifact_name, assembly_artifact, custom_headers=None, raw=False, **operation_config): - """Create or update an assembly for an integration account. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param assembly_artifact_name: The assembly artifact name. - :type assembly_artifact_name: str - :param assembly_artifact: The assembly artifact. - :type assembly_artifact: ~azure.mgmt.logic.models.AssemblyDefinition - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AssemblyDefinition or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.logic.models.AssemblyDefinition or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'assemblyArtifactName': self._serialize.url("assembly_artifact_name", assembly_artifact_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(assembly_artifact, 'AssemblyDefinition') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AssemblyDefinition', response) - if response.status_code == 201: - deserialized = self._deserialize('AssemblyDefinition', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}'} - - def delete( - self, resource_group_name, integration_account_name, assembly_artifact_name, custom_headers=None, raw=False, **operation_config): - """Delete an assembly for an integration account. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param assembly_artifact_name: The assembly artifact name. - :type assembly_artifact_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'assemblyArtifactName': self._serialize.url("assembly_artifact_name", assembly_artifact_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}'} - - def list_content_callback_url( - self, resource_group_name, integration_account_name, assembly_artifact_name, custom_headers=None, raw=False, **operation_config): - """Get the content callback url for an integration account assembly. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param assembly_artifact_name: The assembly artifact name. - :type assembly_artifact_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkflowTriggerCallbackUrl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_content_callback_url.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'assemblyArtifactName': self._serialize.url("assembly_artifact_name", assembly_artifact_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkflowTriggerCallbackUrl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}/listContentCallbackUrl'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/integration_account_batch_configurations_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/integration_account_batch_configurations_operations.py deleted file mode 100644 index 5784a64384d4..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/integration_account_batch_configurations_operations.py +++ /dev/null @@ -1,302 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class IntegrationAccountBatchConfigurationsOperations(object): - """IntegrationAccountBatchConfigurationsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version. Constant value: "2018-07-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-07-01-preview" - - self.config = config - - def list( - self, resource_group_name, integration_account_name, custom_headers=None, raw=False, **operation_config): - """List the batch configurations for an integration account. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of BatchConfiguration - :rtype: - ~azure.mgmt.logic.models.BatchConfigurationPaged[~azure.mgmt.logic.models.BatchConfiguration] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.BatchConfigurationPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.BatchConfigurationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations'} - - def get( - self, resource_group_name, integration_account_name, batch_configuration_name, custom_headers=None, raw=False, **operation_config): - """Get a batch configuration for an integration account. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param batch_configuration_name: The batch configuration name. - :type batch_configuration_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BatchConfiguration or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.logic.models.BatchConfiguration or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'batchConfigurationName': self._serialize.url("batch_configuration_name", batch_configuration_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('BatchConfiguration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}'} - - def create_or_update( - self, resource_group_name, integration_account_name, batch_configuration_name, batch_configuration, custom_headers=None, raw=False, **operation_config): - """Create or update a batch configuration for an integration account. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param batch_configuration_name: The batch configuration name. - :type batch_configuration_name: str - :param batch_configuration: The batch configuration. - :type batch_configuration: ~azure.mgmt.logic.models.BatchConfiguration - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BatchConfiguration or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.logic.models.BatchConfiguration or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'batchConfigurationName': self._serialize.url("batch_configuration_name", batch_configuration_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(batch_configuration, 'BatchConfiguration') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('BatchConfiguration', response) - if response.status_code == 201: - deserialized = self._deserialize('BatchConfiguration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}'} - - def delete( - self, resource_group_name, integration_account_name, batch_configuration_name, custom_headers=None, raw=False, **operation_config): - """Delete a batch configuration for an integration account. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param batch_configuration_name: The batch configuration name. - :type batch_configuration_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'batchConfigurationName': self._serialize.url("batch_configuration_name", batch_configuration_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/integration_account_certificates_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/integration_account_certificates_operations.py deleted file mode 100644 index f8662c321efb..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/integration_account_certificates_operations.py +++ /dev/null @@ -1,309 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class IntegrationAccountCertificatesOperations(object): - """IntegrationAccountCertificatesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version. Constant value: "2018-07-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-07-01-preview" - - self.config = config - - def list( - self, resource_group_name, integration_account_name, top=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of integration account certificates. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param top: The number of items to be included in the result. - :type top: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of IntegrationAccountCertificate - :rtype: - ~azure.mgmt.logic.models.IntegrationAccountCertificatePaged[~azure.mgmt.logic.models.IntegrationAccountCertificate] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.IntegrationAccountCertificatePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.IntegrationAccountCertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates'} - - def get( - self, resource_group_name, integration_account_name, certificate_name, custom_headers=None, raw=False, **operation_config): - """Gets an integration account certificate. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param certificate_name: The integration account certificate name. - :type certificate_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IntegrationAccountCertificate or ClientRawResponse if - raw=true - :rtype: ~azure.mgmt.logic.models.IntegrationAccountCertificate or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('IntegrationAccountCertificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}'} - - def create_or_update( - self, resource_group_name, integration_account_name, certificate_name, certificate, custom_headers=None, raw=False, **operation_config): - """Creates or updates an integration account certificate. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param certificate_name: The integration account certificate name. - :type certificate_name: str - :param certificate: The integration account certificate. - :type certificate: - ~azure.mgmt.logic.models.IntegrationAccountCertificate - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IntegrationAccountCertificate or ClientRawResponse if - raw=true - :rtype: ~azure.mgmt.logic.models.IntegrationAccountCertificate or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(certificate, 'IntegrationAccountCertificate') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('IntegrationAccountCertificate', response) - if response.status_code == 201: - deserialized = self._deserialize('IntegrationAccountCertificate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}'} - - def delete( - self, resource_group_name, integration_account_name, certificate_name, custom_headers=None, raw=False, **operation_config): - """Deletes an integration account certificate. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param certificate_name: The integration account certificate name. - :type certificate_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/integration_account_maps_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/integration_account_maps_operations.py deleted file mode 100644 index d48be0f43a1b..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/integration_account_maps_operations.py +++ /dev/null @@ -1,387 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class IntegrationAccountMapsOperations(object): - """IntegrationAccountMapsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version. Constant value: "2018-07-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-07-01-preview" - - self.config = config - - def list( - self, resource_group_name, integration_account_name, top=None, filter=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of integration account maps. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param top: The number of items to be included in the result. - :type top: int - :param filter: The filter to apply on the operation. Options for - filters include: MapType. - :type filter: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of IntegrationAccountMap - :rtype: - ~azure.mgmt.logic.models.IntegrationAccountMapPaged[~azure.mgmt.logic.models.IntegrationAccountMap] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.IntegrationAccountMapPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.IntegrationAccountMapPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps'} - - def get( - self, resource_group_name, integration_account_name, map_name, custom_headers=None, raw=False, **operation_config): - """Gets an integration account map. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param map_name: The integration account map name. - :type map_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IntegrationAccountMap or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.logic.models.IntegrationAccountMap or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'mapName': self._serialize.url("map_name", map_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('IntegrationAccountMap', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}'} - - def create_or_update( - self, resource_group_name, integration_account_name, map_name, map, custom_headers=None, raw=False, **operation_config): - """Creates or updates an integration account map. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param map_name: The integration account map name. - :type map_name: str - :param map: The integration account map. - :type map: ~azure.mgmt.logic.models.IntegrationAccountMap - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IntegrationAccountMap or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.logic.models.IntegrationAccountMap or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'mapName': self._serialize.url("map_name", map_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(map, 'IntegrationAccountMap') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('IntegrationAccountMap', response) - if response.status_code == 201: - deserialized = self._deserialize('IntegrationAccountMap', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}'} - - def delete( - self, resource_group_name, integration_account_name, map_name, custom_headers=None, raw=False, **operation_config): - """Deletes an integration account map. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param map_name: The integration account map name. - :type map_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'mapName': self._serialize.url("map_name", map_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}'} - - def list_content_callback_url( - self, resource_group_name, integration_account_name, map_name, not_after=None, key_type=None, custom_headers=None, raw=False, **operation_config): - """Get the content callback url. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param map_name: The integration account map name. - :type map_name: str - :param not_after: The expiry time. - :type not_after: datetime - :param key_type: The key type. Possible values include: - 'NotSpecified', 'Primary', 'Secondary' - :type key_type: str or ~azure.mgmt.logic.models.KeyType - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkflowTriggerCallbackUrl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - list_content_callback_url1 = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) - - # Construct URL - url = self.list_content_callback_url.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'mapName': self._serialize.url("map_name", map_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(list_content_callback_url1, 'GetCallbackUrlParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkflowTriggerCallbackUrl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}/listContentCallbackUrl'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/integration_account_partners_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/integration_account_partners_operations.py deleted file mode 100644 index b77b6b9f72b8..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/integration_account_partners_operations.py +++ /dev/null @@ -1,387 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class IntegrationAccountPartnersOperations(object): - """IntegrationAccountPartnersOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version. Constant value: "2018-07-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-07-01-preview" - - self.config = config - - def list( - self, resource_group_name, integration_account_name, top=None, filter=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of integration account partners. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param top: The number of items to be included in the result. - :type top: int - :param filter: The filter to apply on the operation. Options for - filters include: PartnerType. - :type filter: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of IntegrationAccountPartner - :rtype: - ~azure.mgmt.logic.models.IntegrationAccountPartnerPaged[~azure.mgmt.logic.models.IntegrationAccountPartner] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.IntegrationAccountPartnerPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.IntegrationAccountPartnerPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners'} - - def get( - self, resource_group_name, integration_account_name, partner_name, custom_headers=None, raw=False, **operation_config): - """Gets an integration account partner. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param partner_name: The integration account partner name. - :type partner_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IntegrationAccountPartner or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.logic.models.IntegrationAccountPartner or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'partnerName': self._serialize.url("partner_name", partner_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('IntegrationAccountPartner', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}'} - - def create_or_update( - self, resource_group_name, integration_account_name, partner_name, partner, custom_headers=None, raw=False, **operation_config): - """Creates or updates an integration account partner. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param partner_name: The integration account partner name. - :type partner_name: str - :param partner: The integration account partner. - :type partner: ~azure.mgmt.logic.models.IntegrationAccountPartner - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IntegrationAccountPartner or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.logic.models.IntegrationAccountPartner or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'partnerName': self._serialize.url("partner_name", partner_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(partner, 'IntegrationAccountPartner') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('IntegrationAccountPartner', response) - if response.status_code == 201: - deserialized = self._deserialize('IntegrationAccountPartner', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}'} - - def delete( - self, resource_group_name, integration_account_name, partner_name, custom_headers=None, raw=False, **operation_config): - """Deletes an integration account partner. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param partner_name: The integration account partner name. - :type partner_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'partnerName': self._serialize.url("partner_name", partner_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}'} - - def list_content_callback_url( - self, resource_group_name, integration_account_name, partner_name, not_after=None, key_type=None, custom_headers=None, raw=False, **operation_config): - """Get the content callback url. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param partner_name: The integration account partner name. - :type partner_name: str - :param not_after: The expiry time. - :type not_after: datetime - :param key_type: The key type. Possible values include: - 'NotSpecified', 'Primary', 'Secondary' - :type key_type: str or ~azure.mgmt.logic.models.KeyType - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkflowTriggerCallbackUrl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - list_content_callback_url1 = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) - - # Construct URL - url = self.list_content_callback_url.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'partnerName': self._serialize.url("partner_name", partner_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(list_content_callback_url1, 'GetCallbackUrlParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkflowTriggerCallbackUrl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}/listContentCallbackUrl'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/integration_account_schemas_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/integration_account_schemas_operations.py deleted file mode 100644 index 321e154853d7..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/integration_account_schemas_operations.py +++ /dev/null @@ -1,387 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class IntegrationAccountSchemasOperations(object): - """IntegrationAccountSchemasOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version. Constant value: "2018-07-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-07-01-preview" - - self.config = config - - def list( - self, resource_group_name, integration_account_name, top=None, filter=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of integration account schemas. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param top: The number of items to be included in the result. - :type top: int - :param filter: The filter to apply on the operation. Options for - filters include: SchemaType. - :type filter: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of IntegrationAccountSchema - :rtype: - ~azure.mgmt.logic.models.IntegrationAccountSchemaPaged[~azure.mgmt.logic.models.IntegrationAccountSchema] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.IntegrationAccountSchemaPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.IntegrationAccountSchemaPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas'} - - def get( - self, resource_group_name, integration_account_name, schema_name, custom_headers=None, raw=False, **operation_config): - """Gets an integration account schema. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param schema_name: The integration account schema name. - :type schema_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IntegrationAccountSchema or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.logic.models.IntegrationAccountSchema or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'schemaName': self._serialize.url("schema_name", schema_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('IntegrationAccountSchema', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}'} - - def create_or_update( - self, resource_group_name, integration_account_name, schema_name, schema, custom_headers=None, raw=False, **operation_config): - """Creates or updates an integration account schema. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param schema_name: The integration account schema name. - :type schema_name: str - :param schema: The integration account schema. - :type schema: ~azure.mgmt.logic.models.IntegrationAccountSchema - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IntegrationAccountSchema or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.logic.models.IntegrationAccountSchema or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'schemaName': self._serialize.url("schema_name", schema_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(schema, 'IntegrationAccountSchema') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('IntegrationAccountSchema', response) - if response.status_code == 201: - deserialized = self._deserialize('IntegrationAccountSchema', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}'} - - def delete( - self, resource_group_name, integration_account_name, schema_name, custom_headers=None, raw=False, **operation_config): - """Deletes an integration account schema. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param schema_name: The integration account schema name. - :type schema_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'schemaName': self._serialize.url("schema_name", schema_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}'} - - def list_content_callback_url( - self, resource_group_name, integration_account_name, schema_name, not_after=None, key_type=None, custom_headers=None, raw=False, **operation_config): - """Get the content callback url. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param schema_name: The integration account schema name. - :type schema_name: str - :param not_after: The expiry time. - :type not_after: datetime - :param key_type: The key type. Possible values include: - 'NotSpecified', 'Primary', 'Secondary' - :type key_type: str or ~azure.mgmt.logic.models.KeyType - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkflowTriggerCallbackUrl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - list_content_callback_url1 = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) - - # Construct URL - url = self.list_content_callback_url.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'schemaName': self._serialize.url("schema_name", schema_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(list_content_callback_url1, 'GetCallbackUrlParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkflowTriggerCallbackUrl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}/listContentCallbackUrl'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/integration_account_sessions_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/integration_account_sessions_operations.py deleted file mode 100644 index 1d3ac1334b33..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/integration_account_sessions_operations.py +++ /dev/null @@ -1,311 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class IntegrationAccountSessionsOperations(object): - """IntegrationAccountSessionsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version. Constant value: "2018-07-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-07-01-preview" - - self.config = config - - def list( - self, resource_group_name, integration_account_name, top=None, filter=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of integration account sessions. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param top: The number of items to be included in the result. - :type top: int - :param filter: The filter to apply on the operation. Options for - filters include: ChangedTime. - :type filter: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of IntegrationAccountSession - :rtype: - ~azure.mgmt.logic.models.IntegrationAccountSessionPaged[~azure.mgmt.logic.models.IntegrationAccountSession] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.IntegrationAccountSessionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.IntegrationAccountSessionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions'} - - def get( - self, resource_group_name, integration_account_name, session_name, custom_headers=None, raw=False, **operation_config): - """Gets an integration account session. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param session_name: The integration account session name. - :type session_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IntegrationAccountSession or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.logic.models.IntegrationAccountSession or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'sessionName': self._serialize.url("session_name", session_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('IntegrationAccountSession', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}'} - - def create_or_update( - self, resource_group_name, integration_account_name, session_name, session, custom_headers=None, raw=False, **operation_config): - """Creates or updates an integration account session. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param session_name: The integration account session name. - :type session_name: str - :param session: The integration account session. - :type session: ~azure.mgmt.logic.models.IntegrationAccountSession - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IntegrationAccountSession or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.logic.models.IntegrationAccountSession or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'sessionName': self._serialize.url("session_name", session_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(session, 'IntegrationAccountSession') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('IntegrationAccountSession', response) - if response.status_code == 201: - deserialized = self._deserialize('IntegrationAccountSession', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}'} - - def delete( - self, resource_group_name, integration_account_name, session_name, custom_headers=None, raw=False, **operation_config): - """Deletes an integration account session. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param session_name: The integration account session name. - :type session_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'sessionName': self._serialize.url("session_name", session_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/integration_accounts_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/integration_accounts_operations.py deleted file mode 100644 index 324850d2661f..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/integration_accounts_operations.py +++ /dev/null @@ -1,714 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class IntegrationAccountsOperations(object): - """IntegrationAccountsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version. Constant value: "2018-07-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-07-01-preview" - - self.config = config - - def list_by_subscription( - self, top=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of integration accounts by subscription. - - :param top: The number of items to be included in the result. - :type top: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of IntegrationAccount - :rtype: - ~azure.mgmt.logic.models.IntegrationAccountPaged[~azure.mgmt.logic.models.IntegrationAccount] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.IntegrationAccountPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.IntegrationAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Logic/integrationAccounts'} - - def list_by_resource_group( - self, resource_group_name, top=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of integration accounts by resource group. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param top: The number of items to be included in the result. - :type top: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of IntegrationAccount - :rtype: - ~azure.mgmt.logic.models.IntegrationAccountPaged[~azure.mgmt.logic.models.IntegrationAccount] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.IntegrationAccountPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.IntegrationAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts'} - - def get( - self, resource_group_name, integration_account_name, custom_headers=None, raw=False, **operation_config): - """Gets an integration account. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IntegrationAccount or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.logic.models.IntegrationAccount or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('IntegrationAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} - - def create_or_update( - self, resource_group_name, integration_account_name, integration_account, custom_headers=None, raw=False, **operation_config): - """Creates or updates an integration account. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param integration_account: The integration account. - :type integration_account: ~azure.mgmt.logic.models.IntegrationAccount - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IntegrationAccount or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.logic.models.IntegrationAccount or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(integration_account, 'IntegrationAccount') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('IntegrationAccount', response) - if response.status_code == 201: - deserialized = self._deserialize('IntegrationAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} - - def update( - self, resource_group_name, integration_account_name, integration_account, custom_headers=None, raw=False, **operation_config): - """Updates an integration account. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param integration_account: The integration account. - :type integration_account: ~azure.mgmt.logic.models.IntegrationAccount - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IntegrationAccount or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.logic.models.IntegrationAccount or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(integration_account, 'IntegrationAccount') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('IntegrationAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} - - def delete( - self, resource_group_name, integration_account_name, custom_headers=None, raw=False, **operation_config): - """Deletes an integration account. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} - - def list_callback_url( - self, resource_group_name, integration_account_name, not_after=None, key_type=None, custom_headers=None, raw=False, **operation_config): - """Gets the integration account callback URL. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param not_after: The expiry time. - :type not_after: datetime - :param key_type: The key type. Possible values include: - 'NotSpecified', 'Primary', 'Secondary' - :type key_type: str or ~azure.mgmt.logic.models.KeyType - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CallbackUrl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.logic.models.CallbackUrl or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) - - # Construct URL - url = self.list_callback_url.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'GetCallbackUrlParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('CallbackUrl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listCallbackUrl'} - - def list_key_vault_keys( - self, resource_group_name, integration_account_name, key_vault, skip_token=None, custom_headers=None, raw=False, **operation_config): - """Gets the integration account's Key Vault keys. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param key_vault: The key vault reference. - :type key_vault: ~azure.mgmt.logic.models.KeyVaultReference - :param skip_token: The skip token. - :type skip_token: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of KeyVaultKey - :rtype: - ~azure.mgmt.logic.models.KeyVaultKeyPaged[~azure.mgmt.logic.models.KeyVaultKey] - :raises: :class:`CloudError` - """ - list_key_vault_keys1 = models.ListKeyVaultKeysDefinition(key_vault=key_vault, skip_token=skip_token) - - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_key_vault_keys.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(list_key_vault_keys1, 'ListKeyVaultKeysDefinition') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.KeyVaultKeyPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.KeyVaultKeyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_key_vault_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listKeyVaultKeys'} - - def log_tracking_events( - self, resource_group_name, integration_account_name, log_tracking_events, custom_headers=None, raw=False, **operation_config): - """Logs the integration account's tracking events. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param log_tracking_events: The callback URL parameters. - :type log_tracking_events: - ~azure.mgmt.logic.models.TrackingEventsDefinition - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.log_tracking_events.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(log_tracking_events, 'TrackingEventsDefinition') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - log_tracking_events.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/logTrackingEvents'} - - def regenerate_access_key( - self, resource_group_name, integration_account_name, key_type=None, custom_headers=None, raw=False, **operation_config): - """Regenerates the integration account access key. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param key_type: The key type. Possible values include: - 'NotSpecified', 'Primary', 'Secondary' - :type key_type: str or ~azure.mgmt.logic.models.KeyType - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IntegrationAccount or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.logic.models.IntegrationAccount or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - regenerate_access_key1 = models.RegenerateActionParameter(key_type=key_type) - - # Construct URL - url = self.regenerate_access_key.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(regenerate_access_key1, 'RegenerateActionParameter') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('IntegrationAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - regenerate_access_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/regenerateAccessKey'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/operations.py deleted file mode 100644 index 28249a6929d3..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/operations.py +++ /dev/null @@ -1,96 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class Operations(object): - """Operations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version. Constant value: "2018-07-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-07-01-preview" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all of the available Logic REST API operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Operation - :rtype: - ~azure.mgmt.logic.models.OperationPaged[~azure.mgmt.logic.models.Operation] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/providers/Microsoft.Logic/operations'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_action_repetitions_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_action_repetitions_operations.py deleted file mode 100644 index 6af8ea488463..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_action_repetitions_operations.py +++ /dev/null @@ -1,266 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class WorkflowRunActionRepetitionsOperations(object): - """WorkflowRunActionRepetitionsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version. Constant value: "2018-07-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-07-01-preview" - - self.config = config - - def list( - self, resource_group_name, workflow_name, run_name, action_name, custom_headers=None, raw=False, **operation_config): - """Get all of a workflow run action repetitions. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param action_name: The workflow action name. - :type action_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of - WorkflowRunActionRepetitionDefinition - :rtype: - ~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinitionPaged[~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinition] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - 'actionName': self._serialize.url("action_name", action_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.WorkflowRunActionRepetitionDefinitionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.WorkflowRunActionRepetitionDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions'} - - def get( - self, resource_group_name, workflow_name, run_name, action_name, repetition_name, custom_headers=None, raw=False, **operation_config): - """Get a workflow run action repetition. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param action_name: The workflow action name. - :type action_name: str - :param repetition_name: The workflow repetition. - :type repetition_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkflowRunActionRepetitionDefinition or ClientRawResponse if - raw=true - :rtype: ~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinition - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - 'actionName': self._serialize.url("action_name", action_name, 'str'), - 'repetitionName': self._serialize.url("repetition_name", repetition_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkflowRunActionRepetitionDefinition', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}'} - - def list_expression_traces( - self, resource_group_name, workflow_name, run_name, action_name, repetition_name, custom_headers=None, raw=False, **operation_config): - """Lists a workflow run expression trace. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param action_name: The workflow action name. - :type action_name: str - :param repetition_name: The workflow repetition. - :type repetition_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ExpressionRoot - :rtype: - ~azure.mgmt.logic.models.ExpressionRootPaged[~azure.mgmt.logic.models.ExpressionRoot] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_expression_traces.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - 'actionName': self._serialize.url("action_name", action_name, 'str'), - 'repetitionName': self._serialize.url("repetition_name", repetition_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ExpressionRootPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ExpressionRootPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_expression_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/listExpressionTraces'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_action_repetitions_request_histories_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_action_repetitions_request_histories_operations.py deleted file mode 100644 index d39359102427..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_action_repetitions_request_histories_operations.py +++ /dev/null @@ -1,188 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class WorkflowRunActionRepetitionsRequestHistoriesOperations(object): - """WorkflowRunActionRepetitionsRequestHistoriesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version. Constant value: "2018-07-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-07-01-preview" - - self.config = config - - def list( - self, resource_group_name, workflow_name, run_name, action_name, repetition_name, custom_headers=None, raw=False, **operation_config): - """List a workflow run repetition request history. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param action_name: The workflow action name. - :type action_name: str - :param repetition_name: The workflow repetition. - :type repetition_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of RequestHistory - :rtype: - ~azure.mgmt.logic.models.RequestHistoryPaged[~azure.mgmt.logic.models.RequestHistory] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - 'actionName': self._serialize.url("action_name", action_name, 'str'), - 'repetitionName': self._serialize.url("repetition_name", repetition_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.RequestHistoryPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.RequestHistoryPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories'} - - def get( - self, resource_group_name, workflow_name, run_name, action_name, repetition_name, request_history_name, custom_headers=None, raw=False, **operation_config): - """Gets a workflow run repetition request history. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param action_name: The workflow action name. - :type action_name: str - :param repetition_name: The workflow repetition. - :type repetition_name: str - :param request_history_name: The request history name. - :type request_history_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RequestHistory or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.logic.models.RequestHistory or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - 'actionName': self._serialize.url("action_name", action_name, 'str'), - 'repetitionName': self._serialize.url("repetition_name", repetition_name, 'str'), - 'requestHistoryName': self._serialize.url("request_history_name", request_history_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RequestHistory', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName}'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_action_request_histories_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_action_request_histories_operations.py deleted file mode 100644 index d6801a082c65..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_action_request_histories_operations.py +++ /dev/null @@ -1,182 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class WorkflowRunActionRequestHistoriesOperations(object): - """WorkflowRunActionRequestHistoriesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version. Constant value: "2018-07-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-07-01-preview" - - self.config = config - - def list( - self, resource_group_name, workflow_name, run_name, action_name, custom_headers=None, raw=False, **operation_config): - """List a workflow run request history. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param action_name: The workflow action name. - :type action_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of RequestHistory - :rtype: - ~azure.mgmt.logic.models.RequestHistoryPaged[~azure.mgmt.logic.models.RequestHistory] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - 'actionName': self._serialize.url("action_name", action_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.RequestHistoryPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.RequestHistoryPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories'} - - def get( - self, resource_group_name, workflow_name, run_name, action_name, request_history_name, custom_headers=None, raw=False, **operation_config): - """Gets a workflow run request history. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param action_name: The workflow action name. - :type action_name: str - :param request_history_name: The request history name. - :type request_history_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RequestHistory or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.logic.models.RequestHistory or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - 'actionName': self._serialize.url("action_name", action_name, 'str'), - 'requestHistoryName': self._serialize.url("request_history_name", request_history_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RequestHistory', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories/{requestHistoryName}'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_action_scope_repetitions_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_action_scope_repetitions_operations.py deleted file mode 100644 index 327074bbd910..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_action_scope_repetitions_operations.py +++ /dev/null @@ -1,180 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class WorkflowRunActionScopeRepetitionsOperations(object): - """WorkflowRunActionScopeRepetitionsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version. Constant value: "2018-07-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-07-01-preview" - - self.config = config - - def list( - self, resource_group_name, workflow_name, run_name, action_name, custom_headers=None, raw=False, **operation_config): - """List the workflow run action scoped repetitions. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param action_name: The workflow action name. - :type action_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkflowRunActionRepetitionDefinitionCollection or - ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinitionCollection - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - 'actionName': self._serialize.url("action_name", action_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkflowRunActionRepetitionDefinitionCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions'} - - def get( - self, resource_group_name, workflow_name, run_name, action_name, repetition_name, custom_headers=None, raw=False, **operation_config): - """Get a workflow run action scoped repetition. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param action_name: The workflow action name. - :type action_name: str - :param repetition_name: The workflow repetition. - :type repetition_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkflowRunActionRepetitionDefinition or ClientRawResponse if - raw=true - :rtype: ~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinition - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - 'actionName': self._serialize.url("action_name", action_name, 'str'), - 'repetitionName': self._serialize.url("repetition_name", repetition_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkflowRunActionRepetitionDefinition', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName}'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_actions_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_actions_operations.py deleted file mode 100644 index 01709a977e74..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_actions_operations.py +++ /dev/null @@ -1,264 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class WorkflowRunActionsOperations(object): - """WorkflowRunActionsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version. Constant value: "2018-07-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-07-01-preview" - - self.config = config - - def list( - self, resource_group_name, workflow_name, run_name, top=None, filter=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of workflow run actions. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param top: The number of items to be included in the result. - :type top: int - :param filter: The filter to apply on the operation. Options for - filters include: Status. - :type filter: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WorkflowRunAction - :rtype: - ~azure.mgmt.logic.models.WorkflowRunActionPaged[~azure.mgmt.logic.models.WorkflowRunAction] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.WorkflowRunActionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.WorkflowRunActionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions'} - - def get( - self, resource_group_name, workflow_name, run_name, action_name, custom_headers=None, raw=False, **operation_config): - """Gets a workflow run action. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param action_name: The workflow action name. - :type action_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkflowRunAction or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.logic.models.WorkflowRunAction or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - 'actionName': self._serialize.url("action_name", action_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkflowRunAction', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}'} - - def list_expression_traces( - self, resource_group_name, workflow_name, run_name, action_name, custom_headers=None, raw=False, **operation_config): - """Lists a workflow run expression trace. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param action_name: The workflow action name. - :type action_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ExpressionRoot - :rtype: - ~azure.mgmt.logic.models.ExpressionRootPaged[~azure.mgmt.logic.models.ExpressionRoot] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_expression_traces.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - 'actionName': self._serialize.url("action_name", action_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ExpressionRootPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ExpressionRootPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_expression_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/listExpressionTraces'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_operations.py deleted file mode 100644 index c128f429d4b1..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_operations.py +++ /dev/null @@ -1,106 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class WorkflowRunOperations(object): - """WorkflowRunOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version. Constant value: "2018-07-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-07-01-preview" - - self.config = config - - def get( - self, resource_group_name, workflow_name, run_name, operation_id, custom_headers=None, raw=False, **operation_config): - """Gets an operation for a run. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param operation_id: The workflow operation id. - :type operation_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkflowRun or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.logic.models.WorkflowRun or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkflowRun', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/operations/{operationId}'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_runs_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_runs_operations.py deleted file mode 100644 index fe28c04d10df..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_runs_operations.py +++ /dev/null @@ -1,238 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class WorkflowRunsOperations(object): - """WorkflowRunsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version. Constant value: "2018-07-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-07-01-preview" - - self.config = config - - def list( - self, resource_group_name, workflow_name, top=None, filter=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of workflow runs. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param top: The number of items to be included in the result. - :type top: int - :param filter: The filter to apply on the operation. Options for - filters include: Status, StartTime, and ClientTrackingId. - :type filter: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WorkflowRun - :rtype: - ~azure.mgmt.logic.models.WorkflowRunPaged[~azure.mgmt.logic.models.WorkflowRun] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.WorkflowRunPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.WorkflowRunPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs'} - - def get( - self, resource_group_name, workflow_name, run_name, custom_headers=None, raw=False, **operation_config): - """Gets a workflow run. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkflowRun or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.logic.models.WorkflowRun or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkflowRun', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}'} - - def cancel( - self, resource_group_name, workflow_name, run_name, custom_headers=None, raw=False, **operation_config): - """Cancels a workflow run. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.cancel.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/cancel'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_trigger_histories_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_trigger_histories_operations.py deleted file mode 100644 index cf4a5de23438..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_trigger_histories_operations.py +++ /dev/null @@ -1,249 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class WorkflowTriggerHistoriesOperations(object): - """WorkflowTriggerHistoriesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version. Constant value: "2018-07-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-07-01-preview" - - self.config = config - - def list( - self, resource_group_name, workflow_name, trigger_name, top=None, filter=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of workflow trigger histories. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param trigger_name: The workflow trigger name. - :type trigger_name: str - :param top: The number of items to be included in the result. - :type top: int - :param filter: The filter to apply on the operation. Options for - filters include: Status, StartTime, and ClientTrackingId. - :type filter: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WorkflowTriggerHistory - :rtype: - ~azure.mgmt.logic.models.WorkflowTriggerHistoryPaged[~azure.mgmt.logic.models.WorkflowTriggerHistory] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.WorkflowTriggerHistoryPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.WorkflowTriggerHistoryPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories'} - - def get( - self, resource_group_name, workflow_name, trigger_name, history_name, custom_headers=None, raw=False, **operation_config): - """Gets a workflow trigger history. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param trigger_name: The workflow trigger name. - :type trigger_name: str - :param history_name: The workflow trigger history name. Corresponds to - the run name for triggers that resulted in a run. - :type history_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkflowTriggerHistory or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.logic.models.WorkflowTriggerHistory or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str'), - 'historyName': self._serialize.url("history_name", history_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkflowTriggerHistory', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}'} - - def resubmit( - self, resource_group_name, workflow_name, trigger_name, history_name, custom_headers=None, raw=False, **operation_config): - """Resubmits a workflow run based on the trigger history. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param trigger_name: The workflow trigger name. - :type trigger_name: str - :param history_name: The workflow trigger history name. Corresponds to - the run name for triggers that resulted in a run. - :type history_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.resubmit.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str'), - 'historyName': self._serialize.url("history_name", history_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - resubmit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}/resubmit'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_triggers_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_triggers_operations.py deleted file mode 100644 index af6cc9132dcd..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_triggers_operations.py +++ /dev/null @@ -1,486 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class WorkflowTriggersOperations(object): - """WorkflowTriggersOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version. Constant value: "2018-07-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-07-01-preview" - - self.config = config - - def list( - self, resource_group_name, workflow_name, top=None, filter=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of workflow triggers. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param top: The number of items to be included in the result. - :type top: int - :param filter: The filter to apply on the operation. - :type filter: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WorkflowTrigger - :rtype: - ~azure.mgmt.logic.models.WorkflowTriggerPaged[~azure.mgmt.logic.models.WorkflowTrigger] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.WorkflowTriggerPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.WorkflowTriggerPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers'} - - def get( - self, resource_group_name, workflow_name, trigger_name, custom_headers=None, raw=False, **operation_config): - """Gets a workflow trigger. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param trigger_name: The workflow trigger name. - :type trigger_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkflowTrigger or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.logic.models.WorkflowTrigger or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkflowTrigger', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}'} - - def reset( - self, resource_group_name, workflow_name, trigger_name, custom_headers=None, raw=False, **operation_config): - """Resets a workflow trigger. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param trigger_name: The workflow trigger name. - :type trigger_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.reset.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reset.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/reset'} - - def run( - self, resource_group_name, workflow_name, trigger_name, custom_headers=None, raw=False, **operation_config): - """Runs a workflow trigger. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param trigger_name: The workflow trigger name. - :type trigger_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: object or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`HttpOperationError` - """ - # Construct URL - url = self.run.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code < 200 or response.status_code >= 300: - raise HttpOperationError(self._deserialize, response, 'object') - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - run.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/run'} - - def get_schema_json( - self, resource_group_name, workflow_name, trigger_name, custom_headers=None, raw=False, **operation_config): - """Get the trigger schema as JSON. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param trigger_name: The workflow trigger name. - :type trigger_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: JsonSchema or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.logic.models.JsonSchema or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_schema_json.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('JsonSchema', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_schema_json.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/schemas/json'} - - def set_state( - self, resource_group_name, workflow_name, trigger_name, source, custom_headers=None, raw=False, **operation_config): - """Sets the state of a workflow trigger. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param trigger_name: The workflow trigger name. - :type trigger_name: str - :param source: - :type source: ~azure.mgmt.logic.models.WorkflowTrigger - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - set_state1 = models.SetTriggerStateActionDefinition(source=source) - - # Construct URL - url = self.set_state.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(set_state1, 'SetTriggerStateActionDefinition') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - set_state.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/setState'} - - def list_callback_url( - self, resource_group_name, workflow_name, trigger_name, custom_headers=None, raw=False, **operation_config): - """Get the callback URL for a workflow trigger. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param trigger_name: The workflow trigger name. - :type trigger_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkflowTriggerCallbackUrl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_callback_url.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkflowTriggerCallbackUrl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/listCallbackUrl'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_version_triggers_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_version_triggers_operations.py deleted file mode 100644 index 0d7c07542b20..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_version_triggers_operations.py +++ /dev/null @@ -1,122 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class WorkflowVersionTriggersOperations(object): - """WorkflowVersionTriggersOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version. Constant value: "2018-07-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-07-01-preview" - - self.config = config - - def list_callback_url( - self, resource_group_name, workflow_name, version_id, trigger_name, not_after=None, key_type=None, custom_headers=None, raw=False, **operation_config): - """Get the callback url for a trigger of a workflow version. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param version_id: The workflow versionId. - :type version_id: str - :param trigger_name: The workflow trigger name. - :type trigger_name: str - :param not_after: The expiry time. - :type not_after: datetime - :param key_type: The key type. Possible values include: - 'NotSpecified', 'Primary', 'Secondary' - :type key_type: str or ~azure.mgmt.logic.models.KeyType - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkflowTriggerCallbackUrl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = None - if not_after is not None or key_type is not None: - parameters = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) - - # Construct URL - url = self.list_callback_url.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'versionId': self._serialize.url("version_id", version_id, 'str'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if parameters is not None: - body_content = self._serialize.body(parameters, 'GetCallbackUrlParameters') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkflowTriggerCallbackUrl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}/triggers/{triggerName}/listCallbackUrl'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_versions_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_versions_operations.py deleted file mode 100644 index b2559032df76..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_versions_operations.py +++ /dev/null @@ -1,177 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class WorkflowVersionsOperations(object): - """WorkflowVersionsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version. Constant value: "2018-07-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-07-01-preview" - - self.config = config - - def list( - self, resource_group_name, workflow_name, top=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of workflow versions. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param top: The number of items to be included in the result. - :type top: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WorkflowVersion - :rtype: - ~azure.mgmt.logic.models.WorkflowVersionPaged[~azure.mgmt.logic.models.WorkflowVersion] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.WorkflowVersionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.WorkflowVersionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions'} - - def get( - self, resource_group_name, workflow_name, version_id, custom_headers=None, raw=False, **operation_config): - """Gets a workflow version. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param version_id: The workflow versionId. - :type version_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkflowVersion or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.logic.models.WorkflowVersion or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'versionId': self._serialize.url("version_id", version_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkflowVersion', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}'} diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/workflows_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/workflows_operations.py deleted file mode 100644 index 76b9133b8263..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/workflows_operations.py +++ /dev/null @@ -1,991 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class WorkflowsOperations(object): - """WorkflowsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version. Constant value: "2018-07-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-07-01-preview" - - self.config = config - - def list_by_subscription( - self, top=None, filter=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of workflows by subscription. - - :param top: The number of items to be included in the result. - :type top: int - :param filter: The filter to apply on the operation. Options for - filters include: State, Trigger, and ReferencedResourceId. - :type filter: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Workflow - :rtype: - ~azure.mgmt.logic.models.WorkflowPaged[~azure.mgmt.logic.models.Workflow] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.WorkflowPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.WorkflowPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Logic/workflows'} - - def list_by_resource_group( - self, resource_group_name, top=None, filter=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of workflows by resource group. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param top: The number of items to be included in the result. - :type top: int - :param filter: The filter to apply on the operation. Options for - filters include: State, Trigger, and ReferencedResourceId. - :type filter: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Workflow - :rtype: - ~azure.mgmt.logic.models.WorkflowPaged[~azure.mgmt.logic.models.Workflow] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.WorkflowPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.WorkflowPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows'} - - def get( - self, resource_group_name, workflow_name, custom_headers=None, raw=False, **operation_config): - """Gets a workflow. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Workflow or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.logic.models.Workflow or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Workflow', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} - - def create_or_update( - self, resource_group_name, workflow_name, workflow, custom_headers=None, raw=False, **operation_config): - """Creates or updates a workflow. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param workflow: The workflow. - :type workflow: ~azure.mgmt.logic.models.Workflow - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Workflow or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.logic.models.Workflow or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(workflow, 'Workflow') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Workflow', response) - if response.status_code == 201: - deserialized = self._deserialize('Workflow', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} - - def update( - self, resource_group_name, workflow_name, workflow, custom_headers=None, raw=False, **operation_config): - """Updates a workflow. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param workflow: The workflow. - :type workflow: ~azure.mgmt.logic.models.Workflow - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Workflow or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.logic.models.Workflow or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(workflow, 'Workflow') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Workflow', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} - - def delete( - self, resource_group_name, workflow_name, custom_headers=None, raw=False, **operation_config): - """Deletes a workflow. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} - - def disable( - self, resource_group_name, workflow_name, custom_headers=None, raw=False, **operation_config): - """Disables a workflow. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.disable.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - disable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/disable'} - - def enable( - self, resource_group_name, workflow_name, custom_headers=None, raw=False, **operation_config): - """Enables a workflow. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.enable.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - enable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/enable'} - - def generate_upgraded_definition( - self, resource_group_name, workflow_name, target_schema_version=None, custom_headers=None, raw=False, **operation_config): - """Generates the upgraded definition for a workflow. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param target_schema_version: The target schema version. - :type target_schema_version: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: object or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = models.GenerateUpgradedDefinitionParameters(target_schema_version=target_schema_version) - - # Construct URL - url = self.generate_upgraded_definition.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'GenerateUpgradedDefinitionParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('object', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - generate_upgraded_definition.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/generateUpgradedDefinition'} - - def list_callback_url( - self, resource_group_name, workflow_name, not_after=None, key_type=None, custom_headers=None, raw=False, **operation_config): - """Get the workflow callback Url. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param not_after: The expiry time. - :type not_after: datetime - :param key_type: The key type. Possible values include: - 'NotSpecified', 'Primary', 'Secondary' - :type key_type: str or ~azure.mgmt.logic.models.KeyType - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkflowTriggerCallbackUrl or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - list_callback_url1 = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) - - # Construct URL - url = self.list_callback_url.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(list_callback_url1, 'GetCallbackUrlParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkflowTriggerCallbackUrl', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listCallbackUrl'} - - def list_swagger( - self, resource_group_name, workflow_name, custom_headers=None, raw=False, **operation_config): - """Gets an OpenAPI definition for the workflow. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: object or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_swagger.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('object', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_swagger.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listSwagger'} - - def move( - self, resource_group_name, workflow_name, move, custom_headers=None, raw=False, **operation_config): - """Moves an existing workflow. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param move: The workflow to move. - :type move: ~azure.mgmt.logic.models.Workflow - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.move.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(move, 'Workflow') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/move'} - - def regenerate_access_key( - self, resource_group_name, workflow_name, key_type=None, custom_headers=None, raw=False, **operation_config): - """Regenerates the callback URL access key for request triggers. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param key_type: The key type. Possible values include: - 'NotSpecified', 'Primary', 'Secondary' - :type key_type: str or ~azure.mgmt.logic.models.KeyType - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - key_type1 = models.RegenerateActionParameter(key_type=key_type) - - # Construct URL - url = self.regenerate_access_key.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(key_type1, 'RegenerateActionParameter') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - regenerate_access_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/regenerateAccessKey'} - - def validate_by_resource_group( - self, resource_group_name, workflow_name, validate, custom_headers=None, raw=False, **operation_config): - """Validates the workflow. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param validate: The workflow. - :type validate: ~azure.mgmt.logic.models.Workflow - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.validate_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(validate, 'Workflow') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - validate_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/validate'} - - def validate_by_location( - self, resource_group_name, location, workflow_name, workflow, custom_headers=None, raw=False, **operation_config): - """Validates the workflow definition. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param location: The workflow location. - :type location: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param workflow: The workflow definition. - :type workflow: ~azure.mgmt.logic.models.Workflow - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.validate_by_location.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'location': self._serialize.url("location", location, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(workflow, 'Workflow') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - validate_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/locations/{location}/workflows/{workflowName}/validate'} diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_activity_logs_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_activity_logs_operations.py index 70e9f879d39f..16004d4d9b34 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_activity_logs_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_activity_logs_operations.py @@ -39,11 +39,12 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def list( - self, filter=None, select=None, custom_headers=None, raw=False, **operation_config): + self, filter, select=None, custom_headers=None, raw=False, **operation_config): """Provides the list of records from the activity logs. - :param filter: Reduces the set of data collected.
The **$filter** - argument is very restricted and allows only the following + :param filter: Reduces the set of data collected.
This argument is + required and it also requires at least the start date/time.
The + **$filter** argument is very restricted and allows only the following patterns.
- *List events for a resource group*: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and resourceGroupName @@ -93,8 +94,7 @@ def prepare_request(next_link=None): # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') if select is not None: query_parameters['$select'] = self._serialize.query("select", select, 'str') diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/_models.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/_models.py index 1f45012628e6..ec08c11a750e 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/_models.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/_models.py @@ -131,17 +131,22 @@ class DiagnosticSettingsResource(ProxyOnlyResource): :param event_hub_name: The name of the event hub. If none is specified, the default event hub will be selected. :type event_hub_name: str - :param metrics: the list of metric settings. + :param metrics: The list of metric settings. :type metrics: list[~azure.mgmt.monitor.v2017_05_01_preview.models.MetricSettings] - :param logs: the list of logs settings. + :param logs: The list of logs settings. :type logs: list[~azure.mgmt.monitor.v2017_05_01_preview.models.LogSettings] - :param workspace_id: The workspace ID (resource ID of a Log Analytics - workspace) for a Log Analytics workspace to which you would like to send - Diagnostic Logs. Example: + :param workspace_id: The full ARM resource ID of the Log Analytics + workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2 :type workspace_id: str + :param log_analytics_destination_type: A string indicating whether the + export to Log Analytics should use the default destination type, i.e. + AzureDiagnostics, or use a destination type constructed as follows: + _. Possible values + are: Dedicated and null (null is default.) + :type log_analytics_destination_type: str """ _validation = { @@ -161,6 +166,7 @@ class DiagnosticSettingsResource(ProxyOnlyResource): 'metrics': {'key': 'properties.metrics', 'type': '[MetricSettings]'}, 'logs': {'key': 'properties.logs', 'type': '[LogSettings]'}, 'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'}, + 'log_analytics_destination_type': {'key': 'properties.logAnalyticsDestinationType', 'type': 'str'}, } def __init__(self, **kwargs): @@ -172,6 +178,7 @@ def __init__(self, **kwargs): self.metrics = kwargs.get('metrics', None) self.logs = kwargs.get('logs', None) self.workspace_id = kwargs.get('workspace_id', None) + self.log_analytics_destination_type = kwargs.get('log_analytics_destination_type', None) class DiagnosticSettingsResourceCollection(Model): diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/_models_py3.py index 62b3b6b184d8..f1fbd5d163f1 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/_models_py3.py @@ -131,17 +131,22 @@ class DiagnosticSettingsResource(ProxyOnlyResource): :param event_hub_name: The name of the event hub. If none is specified, the default event hub will be selected. :type event_hub_name: str - :param metrics: the list of metric settings. + :param metrics: The list of metric settings. :type metrics: list[~azure.mgmt.monitor.v2017_05_01_preview.models.MetricSettings] - :param logs: the list of logs settings. + :param logs: The list of logs settings. :type logs: list[~azure.mgmt.monitor.v2017_05_01_preview.models.LogSettings] - :param workspace_id: The workspace ID (resource ID of a Log Analytics - workspace) for a Log Analytics workspace to which you would like to send - Diagnostic Logs. Example: + :param workspace_id: The full ARM resource ID of the Log Analytics + workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2 :type workspace_id: str + :param log_analytics_destination_type: A string indicating whether the + export to Log Analytics should use the default destination type, i.e. + AzureDiagnostics, or use a destination type constructed as follows: + _. Possible values + are: Dedicated and null (null is default.) + :type log_analytics_destination_type: str """ _validation = { @@ -161,9 +166,10 @@ class DiagnosticSettingsResource(ProxyOnlyResource): 'metrics': {'key': 'properties.metrics', 'type': '[MetricSettings]'}, 'logs': {'key': 'properties.logs', 'type': '[LogSettings]'}, 'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'}, + 'log_analytics_destination_type': {'key': 'properties.logAnalyticsDestinationType', 'type': 'str'}, } - def __init__(self, *, storage_account_id: str=None, service_bus_rule_id: str=None, event_hub_authorization_rule_id: str=None, event_hub_name: str=None, metrics=None, logs=None, workspace_id: str=None, **kwargs) -> None: + def __init__(self, *, storage_account_id: str=None, service_bus_rule_id: str=None, event_hub_authorization_rule_id: str=None, event_hub_name: str=None, metrics=None, logs=None, workspace_id: str=None, log_analytics_destination_type: str=None, **kwargs) -> None: super(DiagnosticSettingsResource, self).__init__(**kwargs) self.storage_account_id = storage_account_id self.service_bus_rule_id = service_bus_rule_id @@ -172,6 +178,7 @@ def __init__(self, *, storage_account_id: str=None, service_bus_rule_id: str=Non self.metrics = metrics self.logs = logs self.workspace_id = workspace_id + self.log_analytics_destination_type = log_analytics_destination_type class DiagnosticSettingsResourceCollection(Model): diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_models.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_models.py index 645a3895d476..7f6c659c93a4 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_models.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_models.py @@ -113,7 +113,8 @@ class Metric(Model): :type name: ~azure.mgmt.monitor.v2018_01_01.models.LocalizableString :param unit: Required. the unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'CountPerSecond', 'BytesPerSecond', - 'Percent', 'MilliSeconds', 'ByteSeconds', 'Unspecified' + 'Percent', 'MilliSeconds', 'ByteSeconds', 'Unspecified', 'Cores', + 'MilliCores', 'NanoCores', 'BitsPerSecond' :type unit: str or ~azure.mgmt.monitor.v2018_01_01.models.Unit :param timeseries: Required. the time series returned when a data query is performed. @@ -185,7 +186,8 @@ class MetricDefinition(Model): :type name: ~azure.mgmt.monitor.v2018_01_01.models.LocalizableString :param unit: the unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'CountPerSecond', 'BytesPerSecond', 'Percent', - 'MilliSeconds', 'ByteSeconds', 'Unspecified' + 'MilliSeconds', 'ByteSeconds', 'Unspecified', 'Cores', 'MilliCores', + 'NanoCores', 'BitsPerSecond' :type unit: str or ~azure.mgmt.monitor.v2018_01_01.models.Unit :param primary_aggregation_type: the primary aggregation type value defining how to use the values for display. Possible values include: @@ -253,7 +255,7 @@ class MetricValue(Model): :type total: float :param count: the number of samples in the time range. Can be used to determine the number of values that contributed to the average value. - :type count: long + :type count: float """ _validation = { @@ -266,7 +268,7 @@ class MetricValue(Model): 'minimum': {'key': 'minimum', 'type': 'float'}, 'maximum': {'key': 'maximum', 'type': 'float'}, 'total': {'key': 'total', 'type': 'float'}, - 'count': {'key': 'count', 'type': 'long'}, + 'count': {'key': 'count', 'type': 'float'}, } def __init__(self, **kwargs): diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_models_py3.py index 972b2120cfb0..946d425e0f4b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_models_py3.py @@ -113,7 +113,8 @@ class Metric(Model): :type name: ~azure.mgmt.monitor.v2018_01_01.models.LocalizableString :param unit: Required. the unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'CountPerSecond', 'BytesPerSecond', - 'Percent', 'MilliSeconds', 'ByteSeconds', 'Unspecified' + 'Percent', 'MilliSeconds', 'ByteSeconds', 'Unspecified', 'Cores', + 'MilliCores', 'NanoCores', 'BitsPerSecond' :type unit: str or ~azure.mgmt.monitor.v2018_01_01.models.Unit :param timeseries: Required. the time series returned when a data query is performed. @@ -185,7 +186,8 @@ class MetricDefinition(Model): :type name: ~azure.mgmt.monitor.v2018_01_01.models.LocalizableString :param unit: the unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'CountPerSecond', 'BytesPerSecond', 'Percent', - 'MilliSeconds', 'ByteSeconds', 'Unspecified' + 'MilliSeconds', 'ByteSeconds', 'Unspecified', 'Cores', 'MilliCores', + 'NanoCores', 'BitsPerSecond' :type unit: str or ~azure.mgmt.monitor.v2018_01_01.models.Unit :param primary_aggregation_type: the primary aggregation type value defining how to use the values for display. Possible values include: @@ -253,7 +255,7 @@ class MetricValue(Model): :type total: float :param count: the number of samples in the time range. Can be used to determine the number of values that contributed to the average value. - :type count: long + :type count: float """ _validation = { @@ -266,10 +268,10 @@ class MetricValue(Model): 'minimum': {'key': 'minimum', 'type': 'float'}, 'maximum': {'key': 'maximum', 'type': 'float'}, 'total': {'key': 'total', 'type': 'float'}, - 'count': {'key': 'count', 'type': 'long'}, + 'count': {'key': 'count', 'type': 'float'}, } - def __init__(self, *, time_stamp, average: float=None, minimum: float=None, maximum: float=None, total: float=None, count: int=None, **kwargs) -> None: + def __init__(self, *, time_stamp, average: float=None, minimum: float=None, maximum: float=None, total: float=None, count: float=None, **kwargs) -> None: super(MetricValue, self).__init__(**kwargs) self.time_stamp = time_stamp self.average = average diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_monitor_management_client_enums.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_monitor_management_client_enums.py index 61455e4c0c37..b8c55a6ea3b6 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_monitor_management_client_enums.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_monitor_management_client_enums.py @@ -23,6 +23,10 @@ class Unit(str, Enum): milli_seconds = "MilliSeconds" byte_seconds = "ByteSeconds" unspecified = "Unspecified" + cores = "Cores" + milli_cores = "MilliCores" + nano_cores = "NanoCores" + bits_per_second = "BitsPerSecond" class AggregationType(str, Enum): diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/operations/_providers_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/operations/_providers_operations.py index f16a9f43f378..a6dc8fde1b2c 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/operations/_providers_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/operations/_providers_operations.py @@ -235,6 +235,80 @@ def internal_paging(next_link=None): return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers'} + def list_at_tenant_scope( + self, top=None, expand=None, custom_headers=None, raw=False, **operation_config): + """Gets all resource providers for the tenant. + + :param top: The number of results to return. If null is passed returns + all providers. + :type top: int + :param expand: The properties to include in the results. For example, + use &$expand=metadata in the query string to retrieve resource + provider metadata. To include property aliases in response, use + $expand=resourceTypes/aliases. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Provider + :rtype: + ~azure.mgmt.resource.resources.v2019_05_10.models.ProviderPaged[~azure.mgmt.resource.resources.v2019_05_10.models.Provider] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_at_tenant_scope.metadata['url'] + + # Construct parameters + query_parameters = {} + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProviderPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_at_tenant_scope.metadata = {'url': '/providers'} + def get( self, resource_provider_namespace, expand=None, custom_headers=None, raw=False, **operation_config): """Gets the specified resource provider. @@ -298,3 +372,66 @@ def get( return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}'} + + def get_at_tenant_scope( + self, resource_provider_namespace, expand=None, custom_headers=None, raw=False, **operation_config): + """Gets the specified resource provider at the tenant level. + + :param resource_provider_namespace: The namespace of the resource + provider. + :type resource_provider_namespace: str + :param expand: The $expand query parameter. For example, to include + property aliases in response, use $expand=resourceTypes/aliases. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Provider or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.resource.resources.v2019_05_10.models.Provider or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_at_tenant_scope.metadata['url'] + path_format_arguments = { + 'resourceProviderNamespace': self._serialize.url("resource_provider_namespace", resource_provider_namespace, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Provider', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_at_tenant_scope.metadata = {'url': '/providers/{resourceProviderNamespace}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/__init__.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/__init__.py index 4a59cad125c7..905fe754f6b2 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/__init__.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .security_center import SecurityCenter -from .version import VERSION +from ._configuration import SecurityCenterConfiguration +from ._security_center import SecurityCenter +__all__ = ['SecurityCenter', 'SecurityCenterConfiguration'] -__all__ = ['SecurityCenter'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/_configuration.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/_configuration.py new file mode 100644 index 000000000000..9aa2b7aa11ce --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/_configuration.py @@ -0,0 +1,54 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class SecurityCenterConfiguration(AzureConfiguration): + """Configuration for SecurityCenter + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID + :type subscription_id: str + :param asc_location: The location where ASC stores the data of the + subscription. can be retrieved from Get locations + :type asc_location: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, asc_location, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if asc_location is None: + raise ValueError("Parameter 'asc_location' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(SecurityCenterConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-security/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + self.asc_location = asc_location diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/_security_center.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/_security_center.py new file mode 100644 index 000000000000..e8bda0d29801 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/_security_center.py @@ -0,0 +1,201 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import SecurityCenterConfiguration +from .operations import ComplianceResultsOperations +from .operations import PricingsOperations +from .operations import AlertsOperations +from .operations import SettingsOperations +from .operations import AllowedConnectionsOperations +from .operations import DiscoveredSecuritySolutionsOperations +from .operations import ExternalSecuritySolutionsOperations +from .operations import JitNetworkAccessPoliciesOperations +from .operations import AdaptiveApplicationControlsOperations +from .operations import LocationsOperations +from .operations import Operations +from .operations import TasksOperations +from .operations import TopologyOperations +from .operations import AdvancedThreatProtectionOperations +from .operations import AutoProvisioningSettingsOperations +from .operations import CompliancesOperations +from .operations import InformationProtectionPoliciesOperations +from .operations import SecurityContactsOperations +from .operations import WorkspaceSettingsOperations +from .operations import IoTSecuritySolutionsOperations +from .operations import IoTSecuritySolutionsResourceGroupOperations +from .operations import IotSecuritySolutionOperations +from .operations import IoTSecuritySolutionsAnalyticsOperations +from .operations import IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations +from .operations import IoTSecuritySolutionsAnalyticsAggregatedAlertOperations +from .operations import IoTSecuritySolutionsAnalyticsRecommendationOperations +from .operations import IoTSecuritySolutionsAnalyticsRecommendationsOperations +from .operations import RegulatoryComplianceStandardsOperations +from .operations import RegulatoryComplianceControlsOperations +from .operations import RegulatoryComplianceAssessmentsOperations +from .operations import ServerVulnerabilityAssessmentOperations +from . import models + + +class SecurityCenter(SDKClient): + """API spec for Microsoft.Security (Azure Security Center) resource provider + + :ivar config: Configuration for client. + :vartype config: SecurityCenterConfiguration + + :ivar compliance_results: ComplianceResults operations + :vartype compliance_results: azure.mgmt.security.operations.ComplianceResultsOperations + :ivar pricings: Pricings operations + :vartype pricings: azure.mgmt.security.operations.PricingsOperations + :ivar alerts: Alerts operations + :vartype alerts: azure.mgmt.security.operations.AlertsOperations + :ivar settings: Settings operations + :vartype settings: azure.mgmt.security.operations.SettingsOperations + :ivar allowed_connections: AllowedConnections operations + :vartype allowed_connections: azure.mgmt.security.operations.AllowedConnectionsOperations + :ivar discovered_security_solutions: DiscoveredSecuritySolutions operations + :vartype discovered_security_solutions: azure.mgmt.security.operations.DiscoveredSecuritySolutionsOperations + :ivar external_security_solutions: ExternalSecuritySolutions operations + :vartype external_security_solutions: azure.mgmt.security.operations.ExternalSecuritySolutionsOperations + :ivar jit_network_access_policies: JitNetworkAccessPolicies operations + :vartype jit_network_access_policies: azure.mgmt.security.operations.JitNetworkAccessPoliciesOperations + :ivar adaptive_application_controls: AdaptiveApplicationControls operations + :vartype adaptive_application_controls: azure.mgmt.security.operations.AdaptiveApplicationControlsOperations + :ivar locations: Locations operations + :vartype locations: azure.mgmt.security.operations.LocationsOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.security.operations.Operations + :ivar tasks: Tasks operations + :vartype tasks: azure.mgmt.security.operations.TasksOperations + :ivar topology: Topology operations + :vartype topology: azure.mgmt.security.operations.TopologyOperations + :ivar advanced_threat_protection: AdvancedThreatProtection operations + :vartype advanced_threat_protection: azure.mgmt.security.operations.AdvancedThreatProtectionOperations + :ivar auto_provisioning_settings: AutoProvisioningSettings operations + :vartype auto_provisioning_settings: azure.mgmt.security.operations.AutoProvisioningSettingsOperations + :ivar compliances: Compliances operations + :vartype compliances: azure.mgmt.security.operations.CompliancesOperations + :ivar information_protection_policies: InformationProtectionPolicies operations + :vartype information_protection_policies: azure.mgmt.security.operations.InformationProtectionPoliciesOperations + :ivar security_contacts: SecurityContacts operations + :vartype security_contacts: azure.mgmt.security.operations.SecurityContactsOperations + :ivar workspace_settings: WorkspaceSettings operations + :vartype workspace_settings: azure.mgmt.security.operations.WorkspaceSettingsOperations + :ivar io_tsecurity_solutions: IoTSecuritySolutions operations + :vartype io_tsecurity_solutions: azure.mgmt.security.operations.IoTSecuritySolutionsOperations + :ivar io_tsecurity_solutions_resource_group: IoTSecuritySolutionsResourceGroup operations + :vartype io_tsecurity_solutions_resource_group: azure.mgmt.security.operations.IoTSecuritySolutionsResourceGroupOperations + :ivar iot_security_solution: IotSecuritySolution operations + :vartype iot_security_solution: azure.mgmt.security.operations.IotSecuritySolutionOperations + :ivar io_tsecurity_solutions_analytics: IoTSecuritySolutionsAnalytics operations + :vartype io_tsecurity_solutions_analytics: azure.mgmt.security.operations.IoTSecuritySolutionsAnalyticsOperations + :ivar io_tsecurity_solutions_analytics_aggregated_alerts: IoTSecuritySolutionsAnalyticsAggregatedAlerts operations + :vartype io_tsecurity_solutions_analytics_aggregated_alerts: azure.mgmt.security.operations.IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations + :ivar io_tsecurity_solutions_analytics_aggregated_alert: IoTSecuritySolutionsAnalyticsAggregatedAlert operations + :vartype io_tsecurity_solutions_analytics_aggregated_alert: azure.mgmt.security.operations.IoTSecuritySolutionsAnalyticsAggregatedAlertOperations + :ivar io_tsecurity_solutions_analytics_recommendation: IoTSecuritySolutionsAnalyticsRecommendation operations + :vartype io_tsecurity_solutions_analytics_recommendation: azure.mgmt.security.operations.IoTSecuritySolutionsAnalyticsRecommendationOperations + :ivar io_tsecurity_solutions_analytics_recommendations: IoTSecuritySolutionsAnalyticsRecommendations operations + :vartype io_tsecurity_solutions_analytics_recommendations: azure.mgmt.security.operations.IoTSecuritySolutionsAnalyticsRecommendationsOperations + :ivar regulatory_compliance_standards: RegulatoryComplianceStandards operations + :vartype regulatory_compliance_standards: azure.mgmt.security.operations.RegulatoryComplianceStandardsOperations + :ivar regulatory_compliance_controls: RegulatoryComplianceControls operations + :vartype regulatory_compliance_controls: azure.mgmt.security.operations.RegulatoryComplianceControlsOperations + :ivar regulatory_compliance_assessments: RegulatoryComplianceAssessments operations + :vartype regulatory_compliance_assessments: azure.mgmt.security.operations.RegulatoryComplianceAssessmentsOperations + :ivar server_vulnerability_assessment: ServerVulnerabilityAssessment operations + :vartype server_vulnerability_assessment: azure.mgmt.security.operations.ServerVulnerabilityAssessmentOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID + :type subscription_id: str + :param asc_location: The location where ASC stores the data of the + subscription. can be retrieved from Get locations + :type asc_location: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, asc_location, base_url=None): + + self.config = SecurityCenterConfiguration(credentials, subscription_id, asc_location, base_url) + super(SecurityCenter, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.compliance_results = ComplianceResultsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.pricings = PricingsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.alerts = AlertsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.settings = SettingsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.allowed_connections = AllowedConnectionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.discovered_security_solutions = DiscoveredSecuritySolutionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.external_security_solutions = ExternalSecuritySolutionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.jit_network_access_policies = JitNetworkAccessPoliciesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.adaptive_application_controls = AdaptiveApplicationControlsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.locations = LocationsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.tasks = TasksOperations( + self._client, self.config, self._serialize, self._deserialize) + self.topology = TopologyOperations( + self._client, self.config, self._serialize, self._deserialize) + self.advanced_threat_protection = AdvancedThreatProtectionOperations( + self._client, self.config, self._serialize, self._deserialize) + self.auto_provisioning_settings = AutoProvisioningSettingsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.compliances = CompliancesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.information_protection_policies = InformationProtectionPoliciesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.security_contacts = SecurityContactsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.workspace_settings = WorkspaceSettingsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.io_tsecurity_solutions = IoTSecuritySolutionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.io_tsecurity_solutions_resource_group = IoTSecuritySolutionsResourceGroupOperations( + self._client, self.config, self._serialize, self._deserialize) + self.iot_security_solution = IotSecuritySolutionOperations( + self._client, self.config, self._serialize, self._deserialize) + self.io_tsecurity_solutions_analytics = IoTSecuritySolutionsAnalyticsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.io_tsecurity_solutions_analytics_aggregated_alerts = IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.io_tsecurity_solutions_analytics_aggregated_alert = IoTSecuritySolutionsAnalyticsAggregatedAlertOperations( + self._client, self.config, self._serialize, self._deserialize) + self.io_tsecurity_solutions_analytics_recommendation = IoTSecuritySolutionsAnalyticsRecommendationOperations( + self._client, self.config, self._serialize, self._deserialize) + self.io_tsecurity_solutions_analytics_recommendations = IoTSecuritySolutionsAnalyticsRecommendationsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.regulatory_compliance_standards = RegulatoryComplianceStandardsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.regulatory_compliance_controls = RegulatoryComplianceControlsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.regulatory_compliance_assessments = RegulatoryComplianceAssessmentsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.server_vulnerability_assessment = ServerVulnerabilityAssessmentOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/__init__.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/__init__.py index 791f6ade36e2..453c2f5e2da7 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/__init__.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/__init__.py @@ -10,131 +10,201 @@ # -------------------------------------------------------------------------- try: - from .pricing_py3 import Pricing - from .pricing_list_py3 import PricingList - from .asc_location_py3 import AscLocation - from .resource_py3 import Resource - from .alert_entity_py3 import AlertEntity - from .alert_confidence_reason_py3 import AlertConfidenceReason - from .alert_py3 import Alert - from .setting_py3 import Setting - from .data_export_setting_py3 import DataExportSetting - from .setting_resource_py3 import SettingResource - from .connected_resource_py3 import ConnectedResource - from .connectable_resource_py3 import ConnectableResource - from .allowed_connections_resource_py3 import AllowedConnectionsResource - from .location_py3 import Location - from .discovered_security_solution_py3 import DiscoveredSecuritySolution - from .external_security_solution_py3 import ExternalSecuritySolution - from .cef_solution_properties_py3 import CefSolutionProperties - from .cef_external_security_solution_py3 import CefExternalSecuritySolution - from .ata_solution_properties_py3 import AtaSolutionProperties - from .ata_external_security_solution_py3 import AtaExternalSecuritySolution - from .connected_workspace_py3 import ConnectedWorkspace - from .aad_solution_properties_py3 import AadSolutionProperties - from .aad_external_security_solution_py3 import AadExternalSecuritySolution - from .external_security_solution_kind1_py3 import ExternalSecuritySolutionKind1 - from .external_security_solution_properties_py3 import ExternalSecuritySolutionProperties - from .aad_connectivity_state1_py3 import AadConnectivityState1 - from .jit_network_access_port_rule_py3 import JitNetworkAccessPortRule - from .jit_network_access_policy_virtual_machine_py3 import JitNetworkAccessPolicyVirtualMachine - from .jit_network_access_request_port_py3 import JitNetworkAccessRequestPort - from .jit_network_access_request_virtual_machine_py3 import JitNetworkAccessRequestVirtualMachine - from .jit_network_access_request_py3 import JitNetworkAccessRequest - from .jit_network_access_policy_py3 import JitNetworkAccessPolicy - from .jit_network_access_policy_initiate_port_py3 import JitNetworkAccessPolicyInitiatePort - from .jit_network_access_policy_initiate_virtual_machine_py3 import JitNetworkAccessPolicyInitiateVirtualMachine - from .jit_network_access_policy_initiate_request_py3 import JitNetworkAccessPolicyInitiateRequest - from .kind_py3 import Kind - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .security_task_parameters_py3 import SecurityTaskParameters - from .security_task_py3 import SecurityTask - from .topology_single_resource_parent_py3 import TopologySingleResourceParent - from .topology_single_resource_child_py3 import TopologySingleResourceChild - from .topology_single_resource_py3 import TopologySingleResource - from .topology_resource_py3 import TopologyResource - from .advanced_threat_protection_setting_py3 import AdvancedThreatProtectionSetting - from .auto_provisioning_setting_py3 import AutoProvisioningSetting - from .compliance_segment_py3 import ComplianceSegment - from .compliance_py3 import Compliance - from .sensitivity_label_py3 import SensitivityLabel - from .information_protection_keyword_py3 import InformationProtectionKeyword - from .information_type_py3 import InformationType - from .information_protection_policy_py3 import InformationProtectionPolicy - from .security_contact_py3 import SecurityContact - from .workspace_setting_py3 import WorkspaceSetting + from ._models_py3 import AadConnectivityState1 + from ._models_py3 import AadExternalSecuritySolution + from ._models_py3 import AadSolutionProperties + from ._models_py3 import AdvancedThreatProtectionSetting + from ._models_py3 import Alert + from ._models_py3 import AlertConfidenceReason + from ._models_py3 import AlertEntity + from ._models_py3 import AllowedConnectionsResource + from ._models_py3 import AppWhitelistingGroup + from ._models_py3 import AppWhitelistingGroups + from ._models_py3 import AppWhitelistingIssueSummary + from ._models_py3 import AppWhitelistingPutGroupData + from ._models_py3 import AscLocation + from ._models_py3 import AtaExternalSecuritySolution + from ._models_py3 import AtaSolutionProperties + from ._models_py3 import AutoProvisioningSetting + from ._models_py3 import CefExternalSecuritySolution + from ._models_py3 import CefSolutionProperties + from ._models_py3 import Compliance + from ._models_py3 import ComplianceResult + from ._models_py3 import ComplianceSegment + from ._models_py3 import ConnectableResource + from ._models_py3 import ConnectedResource + from ._models_py3 import ConnectedWorkspace + from ._models_py3 import DataExportSetting + from ._models_py3 import DiscoveredSecuritySolution + from ._models_py3 import ExternalSecuritySolution + from ._models_py3 import ExternalSecuritySolutionKind1 + from ._models_py3 import ExternalSecuritySolutionProperties + from ._models_py3 import InformationProtectionKeyword + from ._models_py3 import InformationProtectionPolicy + from ._models_py3 import InformationType + from ._models_py3 import IoTSecurityAggregatedAlert + from ._models_py3 import IoTSecurityAggregatedRecommendation + from ._models_py3 import IoTSecurityAlertedDevice + from ._models_py3 import IoTSecurityAlertedDevicesList + from ._models_py3 import IoTSecurityDeviceAlert + from ._models_py3 import IoTSecurityDeviceAlertsList + from ._models_py3 import IoTSecurityDeviceRecommendation + from ._models_py3 import IoTSecurityDeviceRecommendationsList + from ._models_py3 import IoTSecuritySolutionAnalyticsModel + from ._models_py3 import IoTSecuritySolutionAnalyticsModelList + from ._models_py3 import IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem + from ._models_py3 import IoTSecuritySolutionModel + from ._models_py3 import IoTSeverityMetrics + from ._models_py3 import JitNetworkAccessPolicy + from ._models_py3 import JitNetworkAccessPolicyInitiatePort + from ._models_py3 import JitNetworkAccessPolicyInitiateRequest + from ._models_py3 import JitNetworkAccessPolicyInitiateVirtualMachine + from ._models_py3 import JitNetworkAccessPolicyVirtualMachine + from ._models_py3 import JitNetworkAccessPortRule + from ._models_py3 import JitNetworkAccessRequest + from ._models_py3 import JitNetworkAccessRequestPort + from ._models_py3 import JitNetworkAccessRequestVirtualMachine + from ._models_py3 import Kind + from ._models_py3 import Location + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import PathRecommendation + from ._models_py3 import Pricing + from ._models_py3 import PricingList + from ._models_py3 import PublisherInfo + from ._models_py3 import RecommendationConfigurationProperties + from ._models_py3 import RegulatoryComplianceAssessment + from ._models_py3 import RegulatoryComplianceControl + from ._models_py3 import RegulatoryComplianceStandard + from ._models_py3 import Resource + from ._models_py3 import SecurityContact + from ._models_py3 import SecurityTask + from ._models_py3 import SecurityTaskParameters + from ._models_py3 import SensitivityLabel + from ._models_py3 import ServerVulnerabilityAssessment + from ._models_py3 import ServerVulnerabilityAssessmentsList + from ._models_py3 import Setting + from ._models_py3 import SettingResource + from ._models_py3 import TagsResource + from ._models_py3 import TopologyResource + from ._models_py3 import TopologySingleResource + from ._models_py3 import TopologySingleResourceChild + from ._models_py3 import TopologySingleResourceParent + from ._models_py3 import UpdateIotSecuritySolutionData + from ._models_py3 import UserDefinedResourcesProperties + from ._models_py3 import UserRecommendation + from ._models_py3 import VmRecommendation + from ._models_py3 import WorkspaceSetting except (SyntaxError, ImportError): - from .pricing import Pricing - from .pricing_list import PricingList - from .asc_location import AscLocation - from .resource import Resource - from .alert_entity import AlertEntity - from .alert_confidence_reason import AlertConfidenceReason - from .alert import Alert - from .setting import Setting - from .data_export_setting import DataExportSetting - from .setting_resource import SettingResource - from .connected_resource import ConnectedResource - from .connectable_resource import ConnectableResource - from .allowed_connections_resource import AllowedConnectionsResource - from .location import Location - from .discovered_security_solution import DiscoveredSecuritySolution - from .external_security_solution import ExternalSecuritySolution - from .cef_solution_properties import CefSolutionProperties - from .cef_external_security_solution import CefExternalSecuritySolution - from .ata_solution_properties import AtaSolutionProperties - from .ata_external_security_solution import AtaExternalSecuritySolution - from .connected_workspace import ConnectedWorkspace - from .aad_solution_properties import AadSolutionProperties - from .aad_external_security_solution import AadExternalSecuritySolution - from .external_security_solution_kind1 import ExternalSecuritySolutionKind1 - from .external_security_solution_properties import ExternalSecuritySolutionProperties - from .aad_connectivity_state1 import AadConnectivityState1 - from .jit_network_access_port_rule import JitNetworkAccessPortRule - from .jit_network_access_policy_virtual_machine import JitNetworkAccessPolicyVirtualMachine - from .jit_network_access_request_port import JitNetworkAccessRequestPort - from .jit_network_access_request_virtual_machine import JitNetworkAccessRequestVirtualMachine - from .jit_network_access_request import JitNetworkAccessRequest - from .jit_network_access_policy import JitNetworkAccessPolicy - from .jit_network_access_policy_initiate_port import JitNetworkAccessPolicyInitiatePort - from .jit_network_access_policy_initiate_virtual_machine import JitNetworkAccessPolicyInitiateVirtualMachine - from .jit_network_access_policy_initiate_request import JitNetworkAccessPolicyInitiateRequest - from .kind import Kind - from .operation_display import OperationDisplay - from .operation import Operation - from .security_task_parameters import SecurityTaskParameters - from .security_task import SecurityTask - from .topology_single_resource_parent import TopologySingleResourceParent - from .topology_single_resource_child import TopologySingleResourceChild - from .topology_single_resource import TopologySingleResource - from .topology_resource import TopologyResource - from .advanced_threat_protection_setting import AdvancedThreatProtectionSetting - from .auto_provisioning_setting import AutoProvisioningSetting - from .compliance_segment import ComplianceSegment - from .compliance import Compliance - from .sensitivity_label import SensitivityLabel - from .information_protection_keyword import InformationProtectionKeyword - from .information_type import InformationType - from .information_protection_policy import InformationProtectionPolicy - from .security_contact import SecurityContact - from .workspace_setting import WorkspaceSetting -from .alert_paged import AlertPaged -from .setting_paged import SettingPaged -from .allowed_connections_resource_paged import AllowedConnectionsResourcePaged -from .discovered_security_solution_paged import DiscoveredSecuritySolutionPaged -from .external_security_solution_paged import ExternalSecuritySolutionPaged -from .jit_network_access_policy_paged import JitNetworkAccessPolicyPaged -from .asc_location_paged import AscLocationPaged -from .operation_paged import OperationPaged -from .security_task_paged import SecurityTaskPaged -from .topology_resource_paged import TopologyResourcePaged -from .auto_provisioning_setting_paged import AutoProvisioningSettingPaged -from .compliance_paged import CompliancePaged -from .information_protection_policy_paged import InformationProtectionPolicyPaged -from .security_contact_paged import SecurityContactPaged -from .workspace_setting_paged import WorkspaceSettingPaged -from .security_center_enums import ( + from ._models import AadConnectivityState1 + from ._models import AadExternalSecuritySolution + from ._models import AadSolutionProperties + from ._models import AdvancedThreatProtectionSetting + from ._models import Alert + from ._models import AlertConfidenceReason + from ._models import AlertEntity + from ._models import AllowedConnectionsResource + from ._models import AppWhitelistingGroup + from ._models import AppWhitelistingGroups + from ._models import AppWhitelistingIssueSummary + from ._models import AppWhitelistingPutGroupData + from ._models import AscLocation + from ._models import AtaExternalSecuritySolution + from ._models import AtaSolutionProperties + from ._models import AutoProvisioningSetting + from ._models import CefExternalSecuritySolution + from ._models import CefSolutionProperties + from ._models import Compliance + from ._models import ComplianceResult + from ._models import ComplianceSegment + from ._models import ConnectableResource + from ._models import ConnectedResource + from ._models import ConnectedWorkspace + from ._models import DataExportSetting + from ._models import DiscoveredSecuritySolution + from ._models import ExternalSecuritySolution + from ._models import ExternalSecuritySolutionKind1 + from ._models import ExternalSecuritySolutionProperties + from ._models import InformationProtectionKeyword + from ._models import InformationProtectionPolicy + from ._models import InformationType + from ._models import IoTSecurityAggregatedAlert + from ._models import IoTSecurityAggregatedRecommendation + from ._models import IoTSecurityAlertedDevice + from ._models import IoTSecurityAlertedDevicesList + from ._models import IoTSecurityDeviceAlert + from ._models import IoTSecurityDeviceAlertsList + from ._models import IoTSecurityDeviceRecommendation + from ._models import IoTSecurityDeviceRecommendationsList + from ._models import IoTSecuritySolutionAnalyticsModel + from ._models import IoTSecuritySolutionAnalyticsModelList + from ._models import IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem + from ._models import IoTSecuritySolutionModel + from ._models import IoTSeverityMetrics + from ._models import JitNetworkAccessPolicy + from ._models import JitNetworkAccessPolicyInitiatePort + from ._models import JitNetworkAccessPolicyInitiateRequest + from ._models import JitNetworkAccessPolicyInitiateVirtualMachine + from ._models import JitNetworkAccessPolicyVirtualMachine + from ._models import JitNetworkAccessPortRule + from ._models import JitNetworkAccessRequest + from ._models import JitNetworkAccessRequestPort + from ._models import JitNetworkAccessRequestVirtualMachine + from ._models import Kind + from ._models import Location + from ._models import Operation + from ._models import OperationDisplay + from ._models import PathRecommendation + from ._models import Pricing + from ._models import PricingList + from ._models import PublisherInfo + from ._models import RecommendationConfigurationProperties + from ._models import RegulatoryComplianceAssessment + from ._models import RegulatoryComplianceControl + from ._models import RegulatoryComplianceStandard + from ._models import Resource + from ._models import SecurityContact + from ._models import SecurityTask + from ._models import SecurityTaskParameters + from ._models import SensitivityLabel + from ._models import ServerVulnerabilityAssessment + from ._models import ServerVulnerabilityAssessmentsList + from ._models import Setting + from ._models import SettingResource + from ._models import TagsResource + from ._models import TopologyResource + from ._models import TopologySingleResource + from ._models import TopologySingleResourceChild + from ._models import TopologySingleResourceParent + from ._models import UpdateIotSecuritySolutionData + from ._models import UserDefinedResourcesProperties + from ._models import UserRecommendation + from ._models import VmRecommendation + from ._models import WorkspaceSetting +from ._paged_models import AlertPaged +from ._paged_models import AllowedConnectionsResourcePaged +from ._paged_models import AscLocationPaged +from ._paged_models import AutoProvisioningSettingPaged +from ._paged_models import CompliancePaged +from ._paged_models import ComplianceResultPaged +from ._paged_models import DiscoveredSecuritySolutionPaged +from ._paged_models import ExternalSecuritySolutionPaged +from ._paged_models import InformationProtectionPolicyPaged +from ._paged_models import IoTSecurityAggregatedAlertPaged +from ._paged_models import IoTSecurityAggregatedRecommendationPaged +from ._paged_models import IoTSecuritySolutionModelPaged +from ._paged_models import JitNetworkAccessPolicyPaged +from ._paged_models import OperationPaged +from ._paged_models import RegulatoryComplianceAssessmentPaged +from ._paged_models import RegulatoryComplianceControlPaged +from ._paged_models import RegulatoryComplianceStandardPaged +from ._paged_models import SecurityContactPaged +from ._paged_models import SecurityTaskPaged +from ._paged_models import SettingPaged +from ._paged_models import TopologyResourcePaged +from ._paged_models import WorkspaceSettingPaged +from ._security_center_enums import ( + ResourceStatus, PricingTier, ReportedSeverity, SettingKind, @@ -147,64 +217,102 @@ AutoProvision, AlertNotifications, AlertsToAdmins, + SecuritySolutionStatus, + ExportData, + DataSource, + RecommendationType, + RecommendationConfigStatus, + State, ConnectionType, ) __all__ = [ - 'Pricing', - 'PricingList', - 'AscLocation', - 'Resource', - 'AlertEntity', - 'AlertConfidenceReason', + 'AadConnectivityState1', + 'AadExternalSecuritySolution', + 'AadSolutionProperties', + 'AdvancedThreatProtectionSetting', 'Alert', - 'Setting', - 'DataExportSetting', - 'SettingResource', - 'ConnectedResource', - 'ConnectableResource', + 'AlertConfidenceReason', + 'AlertEntity', 'AllowedConnectionsResource', - 'Location', - 'DiscoveredSecuritySolution', - 'ExternalSecuritySolution', - 'CefSolutionProperties', - 'CefExternalSecuritySolution', - 'AtaSolutionProperties', + 'AppWhitelistingGroup', + 'AppWhitelistingGroups', + 'AppWhitelistingIssueSummary', + 'AppWhitelistingPutGroupData', + 'AscLocation', 'AtaExternalSecuritySolution', + 'AtaSolutionProperties', + 'AutoProvisioningSetting', + 'CefExternalSecuritySolution', + 'CefSolutionProperties', + 'Compliance', + 'ComplianceResult', + 'ComplianceSegment', + 'ConnectableResource', + 'ConnectedResource', 'ConnectedWorkspace', - 'AadSolutionProperties', - 'AadExternalSecuritySolution', + 'DataExportSetting', + 'DiscoveredSecuritySolution', + 'ExternalSecuritySolution', 'ExternalSecuritySolutionKind1', 'ExternalSecuritySolutionProperties', - 'AadConnectivityState1', - 'JitNetworkAccessPortRule', - 'JitNetworkAccessPolicyVirtualMachine', - 'JitNetworkAccessRequestPort', - 'JitNetworkAccessRequestVirtualMachine', - 'JitNetworkAccessRequest', + 'InformationProtectionKeyword', + 'InformationProtectionPolicy', + 'InformationType', + 'IoTSecurityAggregatedAlert', + 'IoTSecurityAggregatedRecommendation', + 'IoTSecurityAlertedDevice', + 'IoTSecurityAlertedDevicesList', + 'IoTSecurityDeviceAlert', + 'IoTSecurityDeviceAlertsList', + 'IoTSecurityDeviceRecommendation', + 'IoTSecurityDeviceRecommendationsList', + 'IoTSecuritySolutionAnalyticsModel', + 'IoTSecuritySolutionAnalyticsModelList', + 'IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem', + 'IoTSecuritySolutionModel', + 'IoTSeverityMetrics', 'JitNetworkAccessPolicy', 'JitNetworkAccessPolicyInitiatePort', - 'JitNetworkAccessPolicyInitiateVirtualMachine', 'JitNetworkAccessPolicyInitiateRequest', + 'JitNetworkAccessPolicyInitiateVirtualMachine', + 'JitNetworkAccessPolicyVirtualMachine', + 'JitNetworkAccessPortRule', + 'JitNetworkAccessRequest', + 'JitNetworkAccessRequestPort', + 'JitNetworkAccessRequestVirtualMachine', 'Kind', - 'OperationDisplay', + 'Location', 'Operation', - 'SecurityTaskParameters', + 'OperationDisplay', + 'PathRecommendation', + 'Pricing', + 'PricingList', + 'PublisherInfo', + 'RecommendationConfigurationProperties', + 'RegulatoryComplianceAssessment', + 'RegulatoryComplianceControl', + 'RegulatoryComplianceStandard', + 'Resource', + 'SecurityContact', 'SecurityTask', - 'TopologySingleResourceParent', - 'TopologySingleResourceChild', - 'TopologySingleResource', - 'TopologyResource', - 'AdvancedThreatProtectionSetting', - 'AutoProvisioningSetting', - 'ComplianceSegment', - 'Compliance', + 'SecurityTaskParameters', 'SensitivityLabel', - 'InformationProtectionKeyword', - 'InformationType', - 'InformationProtectionPolicy', - 'SecurityContact', + 'ServerVulnerabilityAssessment', + 'ServerVulnerabilityAssessmentsList', + 'Setting', + 'SettingResource', + 'TagsResource', + 'TopologyResource', + 'TopologySingleResource', + 'TopologySingleResourceChild', + 'TopologySingleResourceParent', + 'UpdateIotSecuritySolutionData', + 'UserDefinedResourcesProperties', + 'UserRecommendation', + 'VmRecommendation', 'WorkspaceSetting', + 'ComplianceResultPaged', 'AlertPaged', 'SettingPaged', 'AllowedConnectionsResourcePaged', @@ -220,6 +328,13 @@ 'InformationProtectionPolicyPaged', 'SecurityContactPaged', 'WorkspaceSettingPaged', + 'IoTSecuritySolutionModelPaged', + 'IoTSecurityAggregatedAlertPaged', + 'IoTSecurityAggregatedRecommendationPaged', + 'RegulatoryComplianceStandardPaged', + 'RegulatoryComplianceControlPaged', + 'RegulatoryComplianceAssessmentPaged', + 'ResourceStatus', 'PricingTier', 'ReportedSeverity', 'SettingKind', @@ -232,5 +347,11 @@ 'AutoProvision', 'AlertNotifications', 'AlertsToAdmins', + 'SecuritySolutionStatus', + 'ExportData', + 'DataSource', + 'RecommendationType', + 'RecommendationConfigStatus', + 'State', 'ConnectionType', ] diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models.py new file mode 100644 index 000000000000..8f17ea7ac15a --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models.py @@ -0,0 +1,3455 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AadConnectivityState1(Model): + """Describes an Azure resource with kind. + + :param connectivity_state: The connectivity state of the external AAD + solution . Possible values include: 'Discovered', 'NotLicensed', + 'Connected' + :type connectivity_state: str or + ~azure.mgmt.security.models.AadConnectivityState + """ + + _attribute_map = { + 'connectivity_state': {'key': 'connectivityState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AadConnectivityState1, self).__init__(**kwargs) + self.connectivity_state = kwargs.get('connectivity_state', None) + + +class ExternalSecuritySolution(Model): + """Represents a security solution external to Azure Security Center which + sends information to an OMS workspace and whose data is displayed by Azure + Security Center. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CefExternalSecuritySolution, AtaExternalSecuritySolution, + AadExternalSecuritySolution + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar location: Location where the resource is stored + :vartype location: str + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'CEF': 'CefExternalSecuritySolution', 'ATA': 'AtaExternalSecuritySolution', 'AAD': 'AadExternalSecuritySolution'} + } + + def __init__(self, **kwargs): + super(ExternalSecuritySolution, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.kind = None + + +class AadExternalSecuritySolution(ExternalSecuritySolution): + """Represents an AAD identity protection solution which sends logs to an OMS + workspace. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar location: Location where the resource is stored + :vartype location: str + :param kind: Required. Constant filled by server. + :type kind: str + :param properties: + :type properties: ~azure.mgmt.security.models.AadSolutionProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AadSolutionProperties'}, + } + + def __init__(self, **kwargs): + super(AadExternalSecuritySolution, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.kind = 'AAD' + + +class AadSolutionProperties(Model): + """The external security solution properties for AAD solutions. + + :param device_vendor: + :type device_vendor: str + :param device_type: + :type device_type: str + :param workspace: + :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace + :param connectivity_state: The connectivity state of the external AAD + solution . Possible values include: 'Discovered', 'NotLicensed', + 'Connected' + :type connectivity_state: str or + ~azure.mgmt.security.models.AadConnectivityState + """ + + _attribute_map = { + 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, + 'connectivity_state': {'key': 'connectivityState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AadSolutionProperties, self).__init__(**kwargs) + self.device_vendor = kwargs.get('device_vendor', None) + self.device_type = kwargs.get('device_type', None) + self.workspace = kwargs.get('workspace', None) + self.connectivity_state = kwargs.get('connectivity_state', None) + + +class Resource(Model): + """Describes an Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class AdvancedThreatProtectionSetting(Resource): + """The Advanced Threat Protection resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param is_enabled: Indicates whether Advanced Threat Protection is + enabled. + :type is_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(AdvancedThreatProtectionSetting, self).__init__(**kwargs) + self.is_enabled = kwargs.get('is_enabled', None) + + +class Alert(Resource): + """Security alert. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar state: State of the alert (Active, Dismissed etc.) + :vartype state: str + :ivar reported_time_utc: The time the incident was reported to + Microsoft.Security in UTC + :vartype reported_time_utc: datetime + :ivar vendor_name: Name of the vendor that discovered the incident + :vartype vendor_name: str + :ivar alert_name: Name of the alert type + :vartype alert_name: str + :ivar alert_display_name: Display name of the alert type + :vartype alert_display_name: str + :ivar detected_time_utc: The time the incident was detected by the vendor + :vartype detected_time_utc: datetime + :ivar description: Description of the incident and what it means + :vartype description: str + :ivar remediation_steps: Recommended steps to reradiate the incident + :vartype remediation_steps: str + :ivar action_taken: The action that was taken as a response to the alert + (Active, Blocked etc.) + :vartype action_taken: str + :ivar reported_severity: Estimated severity of this alert. Possible values + include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar compromised_entity: The entity that the incident happened on + :vartype compromised_entity: str + :ivar associated_resource: Azure resource ID of the associated resource + :vartype associated_resource: str + :param extended_properties: + :type extended_properties: dict[str, object] + :ivar system_source: The type of the alerted resource (Azure, Non-Azure) + :vartype system_source: str + :ivar can_be_investigated: Whether this alert can be investigated with + Azure Security Center + :vartype can_be_investigated: bool + :ivar is_incident: Whether this alert is for incident type or not + (otherwise - single alert) + :vartype is_incident: bool + :param entities: objects that are related to this alerts + :type entities: list[~azure.mgmt.security.models.AlertEntity] + :ivar confidence_score: level of confidence we have on the alert + :vartype confidence_score: float + :param confidence_reasons: reasons the alert got the confidenceScore value + :type confidence_reasons: + list[~azure.mgmt.security.models.AlertConfidenceReason] + :ivar subscription_id: Azure subscription ID of the resource that had the + security alert or the subscription ID of the workspace that this resource + reports to + :vartype subscription_id: str + :ivar instance_id: Instance ID of the alert. + :vartype instance_id: str + :ivar workspace_arm_id: Azure resource ID of the workspace that the alert + was reported to. + :vartype workspace_arm_id: str + :ivar correlation_key: Alerts with the same CorrelationKey will be grouped + together in Ibiza. + :vartype correlation_key: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'readonly': True}, + 'reported_time_utc': {'readonly': True}, + 'vendor_name': {'readonly': True}, + 'alert_name': {'readonly': True}, + 'alert_display_name': {'readonly': True}, + 'detected_time_utc': {'readonly': True}, + 'description': {'readonly': True}, + 'remediation_steps': {'readonly': True}, + 'action_taken': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'compromised_entity': {'readonly': True}, + 'associated_resource': {'readonly': True}, + 'system_source': {'readonly': True}, + 'can_be_investigated': {'readonly': True}, + 'is_incident': {'readonly': True}, + 'confidence_score': {'readonly': True, 'maximum': 1, 'minimum': 0}, + 'subscription_id': {'readonly': True}, + 'instance_id': {'readonly': True}, + 'workspace_arm_id': {'readonly': True}, + 'correlation_key': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'reported_time_utc': {'key': 'properties.reportedTimeUtc', 'type': 'iso-8601'}, + 'vendor_name': {'key': 'properties.vendorName', 'type': 'str'}, + 'alert_name': {'key': 'properties.alertName', 'type': 'str'}, + 'alert_display_name': {'key': 'properties.alertDisplayName', 'type': 'str'}, + 'detected_time_utc': {'key': 'properties.detectedTimeUtc', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, + 'action_taken': {'key': 'properties.actionTaken', 'type': 'str'}, + 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, + 'compromised_entity': {'key': 'properties.compromisedEntity', 'type': 'str'}, + 'associated_resource': {'key': 'properties.associatedResource', 'type': 'str'}, + 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{object}'}, + 'system_source': {'key': 'properties.systemSource', 'type': 'str'}, + 'can_be_investigated': {'key': 'properties.canBeInvestigated', 'type': 'bool'}, + 'is_incident': {'key': 'properties.isIncident', 'type': 'bool'}, + 'entities': {'key': 'properties.entities', 'type': '[AlertEntity]'}, + 'confidence_score': {'key': 'properties.confidenceScore', 'type': 'float'}, + 'confidence_reasons': {'key': 'properties.confidenceReasons', 'type': '[AlertConfidenceReason]'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, + 'workspace_arm_id': {'key': 'properties.workspaceArmId', 'type': 'str'}, + 'correlation_key': {'key': 'properties.correlationKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Alert, self).__init__(**kwargs) + self.state = None + self.reported_time_utc = None + self.vendor_name = None + self.alert_name = None + self.alert_display_name = None + self.detected_time_utc = None + self.description = None + self.remediation_steps = None + self.action_taken = None + self.reported_severity = None + self.compromised_entity = None + self.associated_resource = None + self.extended_properties = kwargs.get('extended_properties', None) + self.system_source = None + self.can_be_investigated = None + self.is_incident = None + self.entities = kwargs.get('entities', None) + self.confidence_score = None + self.confidence_reasons = kwargs.get('confidence_reasons', None) + self.subscription_id = None + self.instance_id = None + self.workspace_arm_id = None + self.correlation_key = None + + +class AlertConfidenceReason(Model): + """Factors that increase our confidence that the alert is a true positive. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: Type of confidence factor + :vartype type: str + :ivar reason: description of the confidence reason + :vartype reason: str + """ + + _validation = { + 'type': {'readonly': True}, + 'reason': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AlertConfidenceReason, self).__init__(**kwargs) + self.type = None + self.reason = None + + +class AlertEntity(Model): + """Changing set of properties depending on the entity type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar type: Type of entity + :vartype type: str + """ + + _validation = { + 'type': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AlertEntity, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.type = None + + +class AllowedConnectionsResource(Model): + """The resource whose properties describes the allowed traffic between Azure + resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar location: Location where the resource is stored + :vartype location: str + :ivar calculated_date_time: The UTC time on which the allowed connections + resource was calculated + :vartype calculated_date_time: datetime + :ivar connectable_resources: List of connectable resources + :vartype connectable_resources: + list[~azure.mgmt.security.models.ConnectableResource] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'calculated_date_time': {'readonly': True}, + 'connectable_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'calculated_date_time': {'key': 'properties.calculatedDateTime', 'type': 'iso-8601'}, + 'connectable_resources': {'key': 'properties.connectableResources', 'type': '[ConnectableResource]'}, + } + + def __init__(self, **kwargs): + super(AllowedConnectionsResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.calculated_date_time = None + self.connectable_resources = None + + +class AppWhitelistingGroup(Model): + """AppWhitelistingGroup. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar location: Location where the resource is stored + :vartype location: str + :param enforcement_mode: Possible values include: 'Audit', 'Enforce' + :type enforcement_mode: str or ~azure.mgmt.security.models.enum + :param configuration_status: Possible values include: 'Configured', + 'NotConfigured', 'InProgress', 'Failed', 'NoStatus' + :type configuration_status: str or ~azure.mgmt.security.models.enum + :param recommendation_status: Possible values include: 'Recommended', + 'NotRecommended', 'NotAvailable', 'NoStatus' + :type recommendation_status: str or ~azure.mgmt.security.models.enum + :param issues: + :type issues: + list[~azure.mgmt.security.models.AppWhitelistingIssueSummary] + :param source_system: Possible values include: 'Azure_AppLocker', + 'Azure_AuditD', 'NonAzure_AppLocker', 'NonAzure_AuditD', 'None' + :type source_system: str or ~azure.mgmt.security.models.enum + :param vm_recommendations: + :type vm_recommendations: + list[~azure.mgmt.security.models.VmRecommendation] + :param path_recommendations: + :type path_recommendations: + list[~azure.mgmt.security.models.PathRecommendation] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'enforcement_mode': {'key': 'properties.enforcementMode', 'type': 'str'}, + 'configuration_status': {'key': 'properties.configurationStatus', 'type': 'str'}, + 'recommendation_status': {'key': 'properties.recommendationStatus', 'type': 'str'}, + 'issues': {'key': 'properties.issues', 'type': '[AppWhitelistingIssueSummary]'}, + 'source_system': {'key': 'properties.sourceSystem', 'type': 'str'}, + 'vm_recommendations': {'key': 'properties.vmRecommendations', 'type': '[VmRecommendation]'}, + 'path_recommendations': {'key': 'properties.pathRecommendations', 'type': '[PathRecommendation]'}, + } + + def __init__(self, **kwargs): + super(AppWhitelistingGroup, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.enforcement_mode = kwargs.get('enforcement_mode', None) + self.configuration_status = kwargs.get('configuration_status', None) + self.recommendation_status = kwargs.get('recommendation_status', None) + self.issues = kwargs.get('issues', None) + self.source_system = kwargs.get('source_system', None) + self.vm_recommendations = kwargs.get('vm_recommendations', None) + self.path_recommendations = kwargs.get('path_recommendations', None) + + +class AppWhitelistingGroups(Model): + """Represents a list of VM/server groups and set of rules that are Recommended + by Azure Security Center to be allowed. + + :param value: + :type value: list[~azure.mgmt.security.models.AppWhitelistingGroup] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AppWhitelistingGroup]'}, + } + + def __init__(self, **kwargs): + super(AppWhitelistingGroups, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class AppWhitelistingIssueSummary(Model): + """Represents a summary of the alerts of the VM/server group. + + :param issue: Possible values include: 'ViolationsAudited', + 'ViolationsBlocked', 'MsiAndScriptViolationsAudited', + 'MsiAndScriptViolationsBlocked', 'ExecutableViolationsAudited', + 'RulesViolatedManually' + :type issue: str or ~azure.mgmt.security.models.enum + :param number_of_vms: The number of machines in the VM/server group that + have this alert + :type number_of_vms: float + """ + + _attribute_map = { + 'issue': {'key': 'issue', 'type': 'str'}, + 'number_of_vms': {'key': 'numberOfVms', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(AppWhitelistingIssueSummary, self).__init__(**kwargs) + self.issue = kwargs.get('issue', None) + self.number_of_vms = kwargs.get('number_of_vms', None) + + +class AppWhitelistingPutGroupData(Model): + """The altered data of the recommended VM/server group policy. + + :param enforcement_mode: Possible values include: 'Audit', 'Enforce' + :type enforcement_mode: str or ~azure.mgmt.security.models.enum + :param vm_recommendations: + :type vm_recommendations: + list[~azure.mgmt.security.models.VmRecommendation] + :param path_recommendations: + :type path_recommendations: + list[~azure.mgmt.security.models.PathRecommendation] + """ + + _attribute_map = { + 'enforcement_mode': {'key': 'enforcementMode', 'type': 'str'}, + 'vm_recommendations': {'key': 'vmRecommendations', 'type': '[VmRecommendation]'}, + 'path_recommendations': {'key': 'pathRecommendations', 'type': '[PathRecommendation]'}, + } + + def __init__(self, **kwargs): + super(AppWhitelistingPutGroupData, self).__init__(**kwargs) + self.enforcement_mode = kwargs.get('enforcement_mode', None) + self.vm_recommendations = kwargs.get('vm_recommendations', None) + self.path_recommendations = kwargs.get('path_recommendations', None) + + +class AscLocation(Resource): + """The ASC location of the subscription is in the "name" field. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param properties: + :type properties: object + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AscLocation, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class AtaExternalSecuritySolution(ExternalSecuritySolution): + """Represents an ATA security solution which sends logs to an OMS workspace. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar location: Location where the resource is stored + :vartype location: str + :param kind: Required. Constant filled by server. + :type kind: str + :param properties: + :type properties: ~azure.mgmt.security.models.AtaSolutionProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AtaSolutionProperties'}, + } + + def __init__(self, **kwargs): + super(AtaExternalSecuritySolution, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.kind = 'ATA' + + +class ExternalSecuritySolutionProperties(Model): + """The solution properties (correspond to the solution kind). + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param device_vendor: + :type device_vendor: str + :param device_type: + :type device_type: str + :param workspace: + :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, + } + + def __init__(self, **kwargs): + super(ExternalSecuritySolutionProperties, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.device_vendor = kwargs.get('device_vendor', None) + self.device_type = kwargs.get('device_type', None) + self.workspace = kwargs.get('workspace', None) + + +class AtaSolutionProperties(ExternalSecuritySolutionProperties): + """The external security solution properties for ATA solutions. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param device_vendor: + :type device_vendor: str + :param device_type: + :type device_type: str + :param workspace: + :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace + :param last_event_received: + :type last_event_received: str + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, + 'last_event_received': {'key': 'lastEventReceived', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AtaSolutionProperties, self).__init__(**kwargs) + self.last_event_received = kwargs.get('last_event_received', None) + + +class AutoProvisioningSetting(Resource): + """Auto provisioning setting. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param auto_provision: Required. Describes what kind of security agent + provisioning action to take. Possible values include: 'On', 'Off' + :type auto_provision: str or ~azure.mgmt.security.models.AutoProvision + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'auto_provision': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'auto_provision': {'key': 'properties.autoProvision', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AutoProvisioningSetting, self).__init__(**kwargs) + self.auto_provision = kwargs.get('auto_provision', None) + + +class CefExternalSecuritySolution(ExternalSecuritySolution): + """Represents a security solution which sends CEF logs to an OMS workspace. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar location: Location where the resource is stored + :vartype location: str + :param kind: Required. Constant filled by server. + :type kind: str + :param properties: + :type properties: ~azure.mgmt.security.models.CefSolutionProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'CefSolutionProperties'}, + } + + def __init__(self, **kwargs): + super(CefExternalSecuritySolution, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.kind = 'CEF' + + +class CefSolutionProperties(ExternalSecuritySolutionProperties): + """The external security solution properties for CEF solutions. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param device_vendor: + :type device_vendor: str + :param device_type: + :type device_type: str + :param workspace: + :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace + :param hostname: + :type hostname: str + :param agent: + :type agent: str + :param last_event_received: + :type last_event_received: str + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, + 'hostname': {'key': 'hostname', 'type': 'str'}, + 'agent': {'key': 'agent', 'type': 'str'}, + 'last_event_received': {'key': 'lastEventReceived', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CefSolutionProperties, self).__init__(**kwargs) + self.hostname = kwargs.get('hostname', None) + self.agent = kwargs.get('agent', None) + self.last_event_received = kwargs.get('last_event_received', None) + + +class CloudError(Model): + """Error response structure. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: An identifier for the error. Codes are invariant and are + intended to be consumed programmatically. + :vartype code: str + :ivar message: A message describing the error, intended to be suitable for + display in a user interface. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'error.code', 'type': 'str'}, + 'message': {'key': 'error.message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CloudError, self).__init__(**kwargs) + self.code = None + self.message = None + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class Compliance(Resource): + """Compliance of a scope. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar assessment_timestamp_utc_date: The timestamp when the Compliance + calculation was conducted. + :vartype assessment_timestamp_utc_date: datetime + :ivar resource_count: The resource count of the given subscription for + which the Compliance calculation was conducted (needed for Management + Group Compliance calculation). + :vartype resource_count: int + :ivar assessment_result: An array of segment, which is the actually the + compliance assessment. + :vartype assessment_result: + list[~azure.mgmt.security.models.ComplianceSegment] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'assessment_timestamp_utc_date': {'readonly': True}, + 'resource_count': {'readonly': True}, + 'assessment_result': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'assessment_timestamp_utc_date': {'key': 'properties.assessmentTimestampUtcDate', 'type': 'iso-8601'}, + 'resource_count': {'key': 'properties.resourceCount', 'type': 'int'}, + 'assessment_result': {'key': 'properties.assessmentResult', 'type': '[ComplianceSegment]'}, + } + + def __init__(self, **kwargs): + super(Compliance, self).__init__(**kwargs) + self.assessment_timestamp_utc_date = None + self.resource_count = None + self.assessment_result = None + + +class ComplianceResult(Resource): + """a compliance result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar resource_status: The status of the resource regarding a single + assessment. Possible values include: 'Healthy', 'NotApplicable', + 'OffByPolicy', 'NotHealthy' + :vartype resource_status: str or + ~azure.mgmt.security.models.ResourceStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'resource_status': {'key': 'properties.resourceStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ComplianceResult, self).__init__(**kwargs) + self.resource_status = None + + +class ComplianceSegment(Model): + """A segment of a compliance assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar segment_type: The segment type, e.g. compliant, non-compliance, + insufficient coverage, N/A, etc. + :vartype segment_type: str + :ivar percentage: The size (%) of the segment. + :vartype percentage: float + """ + + _validation = { + 'segment_type': {'readonly': True}, + 'percentage': {'readonly': True}, + } + + _attribute_map = { + 'segment_type': {'key': 'segmentType', 'type': 'str'}, + 'percentage': {'key': 'percentage', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(ComplianceSegment, self).__init__(**kwargs) + self.segment_type = None + self.percentage = None + + +class ConnectableResource(Model): + """Describes the allowed inbound and outbound traffic of an Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The Azure resource id + :vartype id: str + :ivar inbound_connected_resources: The list of Azure resources that the + resource has inbound allowed connection from + :vartype inbound_connected_resources: + list[~azure.mgmt.security.models.ConnectedResource] + :ivar outbound_connected_resources: The list of Azure resources that the + resource has outbound allowed connection to + :vartype outbound_connected_resources: + list[~azure.mgmt.security.models.ConnectedResource] + """ + + _validation = { + 'id': {'readonly': True}, + 'inbound_connected_resources': {'readonly': True}, + 'outbound_connected_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'inbound_connected_resources': {'key': 'inboundConnectedResources', 'type': '[ConnectedResource]'}, + 'outbound_connected_resources': {'key': 'outboundConnectedResources', 'type': '[ConnectedResource]'}, + } + + def __init__(self, **kwargs): + super(ConnectableResource, self).__init__(**kwargs) + self.id = None + self.inbound_connected_resources = None + self.outbound_connected_resources = None + + +class ConnectedResource(Model): + """Describes properties of a connected resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar connected_resource_id: The Azure resource id of the connected + resource + :vartype connected_resource_id: str + :ivar tcp_ports: The allowed tcp ports + :vartype tcp_ports: str + :ivar udp_ports: The allowed udp ports + :vartype udp_ports: str + """ + + _validation = { + 'connected_resource_id': {'readonly': True}, + 'tcp_ports': {'readonly': True}, + 'udp_ports': {'readonly': True}, + } + + _attribute_map = { + 'connected_resource_id': {'key': 'connectedResourceId', 'type': 'str'}, + 'tcp_ports': {'key': 'tcpPorts', 'type': 'str'}, + 'udp_ports': {'key': 'udpPorts', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ConnectedResource, self).__init__(**kwargs) + self.connected_resource_id = None + self.tcp_ports = None + self.udp_ports = None + + +class ConnectedWorkspace(Model): + """Represents an OMS workspace to which the solution is connected. + + :param id: Azure resource ID of the connected OMS workspace + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ConnectedWorkspace, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class SettingResource(Resource): + """The kind of the security setting. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param kind: Required. the kind of the settings string + (DataExportSetting). Possible values include: 'DataExportSetting', + 'AlertSuppressionSetting' + :type kind: str or ~azure.mgmt.security.models.SettingKind + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SettingResource, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) + + +class Setting(SettingResource): + """Represents a security setting in Azure Security Center. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param kind: Required. the kind of the settings string + (DataExportSetting). Possible values include: 'DataExportSetting', + 'AlertSuppressionSetting' + :type kind: str or ~azure.mgmt.security.models.SettingKind + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Setting, self).__init__(**kwargs) + + +class DataExportSetting(Setting): + """Represents a data export setting. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param kind: Required. the kind of the settings string + (DataExportSetting). Possible values include: 'DataExportSetting', + 'AlertSuppressionSetting' + :type kind: str or ~azure.mgmt.security.models.SettingKind + :param enabled: Required. Is the data export setting is enabled + :type enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'enabled': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(DataExportSetting, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + + +class DiscoveredSecuritySolution(Model): + """DiscoveredSecuritySolution. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar location: Location where the resource is stored + :vartype location: str + :param security_family: Required. The security family of the discovered + solution. Possible values include: 'Waf', 'Ngfw', 'SaasWaf', 'Va' + :type security_family: str or ~azure.mgmt.security.models.SecurityFamily + :param offer: Required. The security solutions' image offer + :type offer: str + :param publisher: Required. The security solutions' image publisher + :type publisher: str + :param sku: Required. The security solutions' image sku + :type sku: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'security_family': {'required': True}, + 'offer': {'required': True}, + 'publisher': {'required': True}, + 'sku': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'security_family': {'key': 'properties.securityFamily', 'type': 'str'}, + 'offer': {'key': 'properties.offer', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'sku': {'key': 'properties.sku', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DiscoveredSecuritySolution, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.security_family = kwargs.get('security_family', None) + self.offer = kwargs.get('offer', None) + self.publisher = kwargs.get('publisher', None) + self.sku = kwargs.get('sku', None) + + +class ExternalSecuritySolutionKind1(Model): + """Describes an Azure resource with kind. + + :param kind: The kind of the external solution. Possible values include: + 'CEF', 'ATA', 'AAD' + :type kind: str or + ~azure.mgmt.security.models.ExternalSecuritySolutionKind + """ + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExternalSecuritySolutionKind1, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) + + +class InformationProtectionKeyword(Model): + """The information type keyword. + + :param pattern: The keyword pattern. + :type pattern: str + :param custom: Indicates whether the keyword is custom or not. + :type custom: bool + :param can_be_numeric: Indicates whether the keyword can be applied on + numeric types or not. + :type can_be_numeric: bool + :param excluded: Indicates whether the keyword is excluded or not. + :type excluded: bool + """ + + _attribute_map = { + 'pattern': {'key': 'pattern', 'type': 'str'}, + 'custom': {'key': 'custom', 'type': 'bool'}, + 'can_be_numeric': {'key': 'canBeNumeric', 'type': 'bool'}, + 'excluded': {'key': 'excluded', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(InformationProtectionKeyword, self).__init__(**kwargs) + self.pattern = kwargs.get('pattern', None) + self.custom = kwargs.get('custom', None) + self.can_be_numeric = kwargs.get('can_be_numeric', None) + self.excluded = kwargs.get('excluded', None) + + +class InformationProtectionPolicy(Resource): + """Information protection policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar last_modified_utc: Describes the last UTC time the policy was + modified. + :vartype last_modified_utc: datetime + :param labels: Dictionary of sensitivity labels. + :type labels: dict[str, ~azure.mgmt.security.models.SensitivityLabel] + :param information_types: The sensitivity information types. + :type information_types: dict[str, + ~azure.mgmt.security.models.InformationType] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_modified_utc': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'last_modified_utc': {'key': 'properties.lastModifiedUtc', 'type': 'iso-8601'}, + 'labels': {'key': 'properties.labels', 'type': '{SensitivityLabel}'}, + 'information_types': {'key': 'properties.informationTypes', 'type': '{InformationType}'}, + } + + def __init__(self, **kwargs): + super(InformationProtectionPolicy, self).__init__(**kwargs) + self.last_modified_utc = None + self.labels = kwargs.get('labels', None) + self.information_types = kwargs.get('information_types', None) + + +class InformationType(Model): + """The information type. + + :param display_name: The name of the information type. + :type display_name: str + :param order: The order of the information type. + :type order: float + :param recommended_label_id: The recommended label id to be associated + with this information type. + :type recommended_label_id: str + :param enabled: Indicates whether the information type is enabled or not. + :type enabled: bool + :param custom: Indicates whether the information type is custom or not. + :type custom: bool + :param keywords: The information type keywords. + :type keywords: + list[~azure.mgmt.security.models.InformationProtectionKeyword] + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'float'}, + 'recommended_label_id': {'key': 'recommendedLabelId', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'custom': {'key': 'custom', 'type': 'bool'}, + 'keywords': {'key': 'keywords', 'type': '[InformationProtectionKeyword]'}, + } + + def __init__(self, **kwargs): + super(InformationType, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.order = kwargs.get('order', None) + self.recommended_label_id = kwargs.get('recommended_label_id', None) + self.enabled = kwargs.get('enabled', None) + self.custom = kwargs.get('custom', None) + self.keywords = kwargs.get('keywords', None) + + +class IoTSecurityAggregatedAlert(Model): + """Security Solution Aggregated Alert information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar alert_type: Name of the alert type + :vartype alert_type: str + :ivar alert_display_name: Display name of the alert type + :vartype alert_display_name: str + :ivar aggregated_date_utc: The date the incidents were detected by the + vendor + :vartype aggregated_date_utc: date + :ivar vendor_name: Name of the vendor that discovered the incident + :vartype vendor_name: str + :ivar reported_severity: Estimated severity of this alert. Possible values + include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar remediation_steps: Recommended steps for remediation + :vartype remediation_steps: str + :ivar description: Description of the incident and what it means + :vartype description: str + :ivar count: Occurrence number of the alert within the aggregated date + :vartype count: int + :ivar effected_resource_type: Azure resource ID of the resource that got + the alerts + :vartype effected_resource_type: str + :ivar system_source: The type of the alerted resource (Azure, Non-Azure) + :vartype system_source: str + :ivar action_taken: The action that was taken as a response to the alert + (Active, Blocked etc.) + :vartype action_taken: str + :ivar log_analytics_query: query in log analytics to get the list of + affected devices/alerts + :vartype log_analytics_query: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'alert_type': {'readonly': True}, + 'alert_display_name': {'readonly': True}, + 'aggregated_date_utc': {'readonly': True}, + 'vendor_name': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'remediation_steps': {'readonly': True}, + 'description': {'readonly': True}, + 'count': {'readonly': True}, + 'effected_resource_type': {'readonly': True}, + 'system_source': {'readonly': True}, + 'action_taken': {'readonly': True}, + 'log_analytics_query': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'alert_type': {'key': 'properties.alertType', 'type': 'str'}, + 'alert_display_name': {'key': 'properties.alertDisplayName', 'type': 'str'}, + 'aggregated_date_utc': {'key': 'properties.aggregatedDateUtc', 'type': 'date'}, + 'vendor_name': {'key': 'properties.vendorName', 'type': 'str'}, + 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, + 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'count': {'key': 'properties.count', 'type': 'int'}, + 'effected_resource_type': {'key': 'properties.effectedResourceType', 'type': 'str'}, + 'system_source': {'key': 'properties.systemSource', 'type': 'str'}, + 'action_taken': {'key': 'properties.actionTaken', 'type': 'str'}, + 'log_analytics_query': {'key': 'properties.logAnalyticsQuery', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityAggregatedAlert, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = kwargs.get('tags', None) + self.alert_type = None + self.alert_display_name = None + self.aggregated_date_utc = None + self.vendor_name = None + self.reported_severity = None + self.remediation_steps = None + self.description = None + self.count = None + self.effected_resource_type = None + self.system_source = None + self.action_taken = None + self.log_analytics_query = None + + +class IoTSecurityAggregatedRecommendation(Model): + """Security Solution Recommendation Information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :param recommendation_name: Name of the recommendation + :type recommendation_name: str + :ivar recommendation_display_name: Display name of the recommendation + type. + :vartype recommendation_display_name: str + :ivar description: Description of the incident and what it means + :vartype description: str + :ivar recommendation_type_id: The recommendation-type GUID. + :vartype recommendation_type_id: str + :ivar detected_by: Name of the vendor that discovered the issue + :vartype detected_by: str + :ivar remediation_steps: Recommended steps for remediation + :vartype remediation_steps: str + :ivar reported_severity: Estimated severity of this recommendation. + Possible values include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar healthy_devices: the number of the healthy devices within the + solution + :vartype healthy_devices: int + :ivar unhealthy_device_count: the number of the unhealthy devices within + the solution + :vartype unhealthy_device_count: int + :ivar log_analytics_query: query in log analytics to get the list of + affected devices/alerts + :vartype log_analytics_query: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'recommendation_display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'recommendation_type_id': {'readonly': True}, + 'detected_by': {'readonly': True}, + 'remediation_steps': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'healthy_devices': {'readonly': True}, + 'unhealthy_device_count': {'readonly': True}, + 'log_analytics_query': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'recommendation_name': {'key': 'properties.recommendationName', 'type': 'str'}, + 'recommendation_display_name': {'key': 'properties.recommendationDisplayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'recommendation_type_id': {'key': 'properties.recommendationTypeId', 'type': 'str'}, + 'detected_by': {'key': 'properties.detectedBy', 'type': 'str'}, + 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, + 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, + 'healthy_devices': {'key': 'properties.healthyDevices', 'type': 'int'}, + 'unhealthy_device_count': {'key': 'properties.unhealthyDeviceCount', 'type': 'int'}, + 'log_analytics_query': {'key': 'properties.logAnalyticsQuery', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityAggregatedRecommendation, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = kwargs.get('tags', None) + self.recommendation_name = kwargs.get('recommendation_name', None) + self.recommendation_display_name = None + self.description = None + self.recommendation_type_id = None + self.detected_by = None + self.remediation_steps = None + self.reported_severity = None + self.healthy_devices = None + self.unhealthy_device_count = None + self.log_analytics_query = None + + +class IoTSecurityAlertedDevice(Model): + """Statistic information about the number of alerts per device during the last + period. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar device_id: Name of the alert type + :vartype device_id: str + :ivar alerts_count: the number of alerts raised for this device + :vartype alerts_count: int + """ + + _validation = { + 'device_id': {'readonly': True}, + 'alerts_count': {'readonly': True}, + } + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'alerts_count': {'key': 'alertsCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityAlertedDevice, self).__init__(**kwargs) + self.device_id = None + self.alerts_count = None + + +class IoTSecurityAlertedDevicesList(Model): + """List of devices with the count of raised alerts. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of aggregated alerts data + :type value: list[~azure.mgmt.security.models.IoTSecurityAlertedDevice] + :ivar next_link: The URI to fetch the next page. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecurityAlertedDevice]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityAlertedDevicesList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class IoTSecurityDeviceAlert(Model): + """Statistic information about the number of alerts per alert type during the + last period. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar alert_display_name: Display name of the alert + :vartype alert_display_name: str + :ivar reported_severity: Estimated severity of this alert. Possible values + include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar alerts_count: the number of alerts raised for this alert type + :vartype alerts_count: int + """ + + _validation = { + 'alert_display_name': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'alerts_count': {'readonly': True}, + } + + _attribute_map = { + 'alert_display_name': {'key': 'alertDisplayName', 'type': 'str'}, + 'reported_severity': {'key': 'reportedSeverity', 'type': 'str'}, + 'alerts_count': {'key': 'alertsCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityDeviceAlert, self).__init__(**kwargs) + self.alert_display_name = None + self.reported_severity = None + self.alerts_count = None + + +class IoTSecurityDeviceAlertsList(Model): + """List of alerts with the count of raised alerts. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of top alerts data + :type value: list[~azure.mgmt.security.models.IoTSecurityDeviceAlert] + :ivar next_link: The URI to fetch the next page. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecurityDeviceAlert]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityDeviceAlertsList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class IoTSecurityDeviceRecommendation(Model): + """Statistic information about the number of recommendations per + recommendation type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar recommendation_display_name: Display name of the recommendation + :vartype recommendation_display_name: str + :ivar reported_severity: Estimated severity of this recommendation. + Possible values include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar devices_count: the number of device with this recommendation + :vartype devices_count: int + """ + + _validation = { + 'recommendation_display_name': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'devices_count': {'readonly': True}, + } + + _attribute_map = { + 'recommendation_display_name': {'key': 'recommendationDisplayName', 'type': 'str'}, + 'reported_severity': {'key': 'reportedSeverity', 'type': 'str'}, + 'devices_count': {'key': 'devicesCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityDeviceRecommendation, self).__init__(**kwargs) + self.recommendation_display_name = None + self.reported_severity = None + self.devices_count = None + + +class IoTSecurityDeviceRecommendationsList(Model): + """List of recommendations with the count of devices. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of aggregated recommendation data + :type value: + list[~azure.mgmt.security.models.IoTSecurityDeviceRecommendation] + :ivar next_link: The URI to fetch the next page. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecurityDeviceRecommendation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTSecurityDeviceRecommendationsList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class IoTSecuritySolutionAnalyticsModel(Resource): + """Security Analytics of a security solution. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar metrics: Security Analytics of a security solution + :vartype metrics: ~azure.mgmt.security.models.IoTSeverityMetrics + :ivar unhealthy_device_count: number of unhealthy devices + :vartype unhealthy_device_count: int + :ivar devices_metrics: The list of devices metrics by the aggregated date. + :vartype devices_metrics: + list[~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem] + :param top_alerted_devices: The list of top 3 devices with the most + attacked. + :type top_alerted_devices: + ~azure.mgmt.security.models.IoTSecurityAlertedDevicesList + :param most_prevalent_device_alerts: The list of most prevalent 3 alerts. + :type most_prevalent_device_alerts: + ~azure.mgmt.security.models.IoTSecurityDeviceAlertsList + :param most_prevalent_device_recommendations: The list of most prevalent 3 + recommendations. + :type most_prevalent_device_recommendations: + ~azure.mgmt.security.models.IoTSecurityDeviceRecommendationsList + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'metrics': {'readonly': True}, + 'unhealthy_device_count': {'readonly': True}, + 'devices_metrics': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'metrics': {'key': 'properties.metrics', 'type': 'IoTSeverityMetrics'}, + 'unhealthy_device_count': {'key': 'properties.unhealthyDeviceCount', 'type': 'int'}, + 'devices_metrics': {'key': 'properties.devicesMetrics', 'type': '[IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem]'}, + 'top_alerted_devices': {'key': 'properties.topAlertedDevices', 'type': 'IoTSecurityAlertedDevicesList'}, + 'most_prevalent_device_alerts': {'key': 'properties.mostPrevalentDeviceAlerts', 'type': 'IoTSecurityDeviceAlertsList'}, + 'most_prevalent_device_recommendations': {'key': 'properties.mostPrevalentDeviceRecommendations', 'type': 'IoTSecurityDeviceRecommendationsList'}, + } + + def __init__(self, **kwargs): + super(IoTSecuritySolutionAnalyticsModel, self).__init__(**kwargs) + self.metrics = None + self.unhealthy_device_count = None + self.devices_metrics = None + self.top_alerted_devices = kwargs.get('top_alerted_devices', None) + self.most_prevalent_device_alerts = kwargs.get('most_prevalent_device_alerts', None) + self.most_prevalent_device_recommendations = kwargs.get('most_prevalent_device_recommendations', None) + + +class IoTSecuritySolutionAnalyticsModelList(Model): + """List of Security Analytics of a security solution. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of Security Analytics of a security solution + :type value: + list[~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModel] + :ivar next_link: The URI to fetch the next page. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecuritySolutionAnalyticsModel]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IoTSecuritySolutionAnalyticsModelList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem(Model): + """IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem. + + :param date_property: the date of the metrics + :type date_property: datetime + :param devices_metrics: devices alerts count by severity. + :type devices_metrics: ~azure.mgmt.security.models.IoTSeverityMetrics + """ + + _attribute_map = { + 'date_property': {'key': 'date', 'type': 'iso-8601'}, + 'devices_metrics': {'key': 'devicesMetrics', 'type': 'IoTSeverityMetrics'}, + } + + def __init__(self, **kwargs): + super(IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, self).__init__(**kwargs) + self.date_property = kwargs.get('date_property', None) + self.devices_metrics = kwargs.get('devices_metrics', None) + + +class IoTSecuritySolutionModel(Model): + """Security Solution. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :param location: The resource location. + :type location: str + :param workspace: Required. Workspace resource ID + :type workspace: str + :param display_name: Required. Resource display name. + :type display_name: str + :param status: Security solution status. Possible values include: + 'Enabled', 'Disabled'. Default value: "Enabled" . + :type status: str or ~azure.mgmt.security.models.SecuritySolutionStatus + :param export: List of additional export to workspace data options + :type export: list[str or ~azure.mgmt.security.models.ExportData] + :param disabled_data_sources: Disabled data sources. Disabling these data + sources compromises the system. + :type disabled_data_sources: list[str or + ~azure.mgmt.security.models.DataSource] + :param iot_hubs: Required. IoT Hub resource IDs + :type iot_hubs: list[str] + :param user_defined_resources: + :type user_defined_resources: + ~azure.mgmt.security.models.UserDefinedResourcesProperties + :ivar auto_discovered_resources: List of resources that were automatically + discovered as relevant to the security solution. + :vartype auto_discovered_resources: list[str] + :param recommendations_configuration: + :type recommendations_configuration: + list[~azure.mgmt.security.models.RecommendationConfigurationProperties] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'workspace': {'required': True}, + 'display_name': {'required': True}, + 'iot_hubs': {'required': True}, + 'auto_discovered_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'workspace': {'key': 'properties.workspace', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'export': {'key': 'properties.export', 'type': '[str]'}, + 'disabled_data_sources': {'key': 'properties.disabledDataSources', 'type': '[str]'}, + 'iot_hubs': {'key': 'properties.iotHubs', 'type': '[str]'}, + 'user_defined_resources': {'key': 'properties.userDefinedResources', 'type': 'UserDefinedResourcesProperties'}, + 'auto_discovered_resources': {'key': 'properties.autoDiscoveredResources', 'type': '[str]'}, + 'recommendations_configuration': {'key': 'properties.recommendationsConfiguration', 'type': '[RecommendationConfigurationProperties]'}, + } + + def __init__(self, **kwargs): + super(IoTSecuritySolutionModel, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = kwargs.get('tags', None) + self.location = kwargs.get('location', None) + self.workspace = kwargs.get('workspace', None) + self.display_name = kwargs.get('display_name', None) + self.status = kwargs.get('status', "Enabled") + self.export = kwargs.get('export', None) + self.disabled_data_sources = kwargs.get('disabled_data_sources', None) + self.iot_hubs = kwargs.get('iot_hubs', None) + self.user_defined_resources = kwargs.get('user_defined_resources', None) + self.auto_discovered_resources = None + self.recommendations_configuration = kwargs.get('recommendations_configuration', None) + + +class IoTSeverityMetrics(Model): + """Severity metrics. + + :param high: count of high severity items + :type high: int + :param medium: count of medium severity items + :type medium: int + :param low: count of low severity items + :type low: int + """ + + _attribute_map = { + 'high': {'key': 'high', 'type': 'int'}, + 'medium': {'key': 'medium', 'type': 'int'}, + 'low': {'key': 'low', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(IoTSeverityMetrics, self).__init__(**kwargs) + self.high = kwargs.get('high', None) + self.medium = kwargs.get('medium', None) + self.low = kwargs.get('low', None) + + +class JitNetworkAccessPolicy(Model): + """JitNetworkAccessPolicy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param kind: Kind of the resource + :type kind: str + :ivar location: Location where the resource is stored + :vartype location: str + :param virtual_machines: Required. Configurations for + Microsoft.Compute/virtualMachines resource type. + :type virtual_machines: + list[~azure.mgmt.security.models.JitNetworkAccessPolicyVirtualMachine] + :param requests: + :type requests: list[~azure.mgmt.security.models.JitNetworkAccessRequest] + :ivar provisioning_state: Gets the provisioning state of the Just-in-Time + policy. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'virtual_machines': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[JitNetworkAccessPolicyVirtualMachine]'}, + 'requests': {'key': 'properties.requests', 'type': '[JitNetworkAccessRequest]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JitNetworkAccessPolicy, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.kind = kwargs.get('kind', None) + self.location = None + self.virtual_machines = kwargs.get('virtual_machines', None) + self.requests = kwargs.get('requests', None) + self.provisioning_state = None + + +class JitNetworkAccessPolicyInitiatePort(Model): + """JitNetworkAccessPolicyInitiatePort. + + All required parameters must be populated in order to send to Azure. + + :param number: Required. + :type number: int + :param allowed_source_address_prefix: Source of the allowed traffic. If + omitted, the request will be for the source IP address of the initiate + request. + :type allowed_source_address_prefix: str + :param end_time_utc: Required. The time to close the request in UTC + :type end_time_utc: datetime + """ + + _validation = { + 'number': {'required': True}, + 'end_time_utc': {'required': True}, + } + + _attribute_map = { + 'number': {'key': 'number', 'type': 'int'}, + 'allowed_source_address_prefix': {'key': 'allowedSourceAddressPrefix', 'type': 'str'}, + 'end_time_utc': {'key': 'endTimeUtc', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(JitNetworkAccessPolicyInitiatePort, self).__init__(**kwargs) + self.number = kwargs.get('number', None) + self.allowed_source_address_prefix = kwargs.get('allowed_source_address_prefix', None) + self.end_time_utc = kwargs.get('end_time_utc', None) + + +class JitNetworkAccessPolicyInitiateRequest(Model): + """JitNetworkAccessPolicyInitiateRequest. + + All required parameters must be populated in order to send to Azure. + + :param virtual_machines: Required. A list of virtual machines & ports to + open access for + :type virtual_machines: + list[~azure.mgmt.security.models.JitNetworkAccessPolicyInitiateVirtualMachine] + """ + + _validation = { + 'virtual_machines': {'required': True}, + } + + _attribute_map = { + 'virtual_machines': {'key': 'virtualMachines', 'type': '[JitNetworkAccessPolicyInitiateVirtualMachine]'}, + } + + def __init__(self, **kwargs): + super(JitNetworkAccessPolicyInitiateRequest, self).__init__(**kwargs) + self.virtual_machines = kwargs.get('virtual_machines', None) + + +class JitNetworkAccessPolicyInitiateVirtualMachine(Model): + """JitNetworkAccessPolicyInitiateVirtualMachine. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource ID of the virtual machine that is linked to + this policy + :type id: str + :param ports: Required. The ports to open for the resource with the `id` + :type ports: + list[~azure.mgmt.security.models.JitNetworkAccessPolicyInitiatePort] + """ + + _validation = { + 'id': {'required': True}, + 'ports': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'ports': {'key': 'ports', 'type': '[JitNetworkAccessPolicyInitiatePort]'}, + } + + def __init__(self, **kwargs): + super(JitNetworkAccessPolicyInitiateVirtualMachine, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.ports = kwargs.get('ports', None) + + +class JitNetworkAccessPolicyVirtualMachine(Model): + """JitNetworkAccessPolicyVirtualMachine. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource ID of the virtual machine that is linked to + this policy + :type id: str + :param ports: Required. Port configurations for the virtual machine + :type ports: list[~azure.mgmt.security.models.JitNetworkAccessPortRule] + :param public_ip_address: Public IP address of the Azure Firewall that is + linked to this policy, if applicable + :type public_ip_address: str + """ + + _validation = { + 'id': {'required': True}, + 'ports': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'ports': {'key': 'ports', 'type': '[JitNetworkAccessPortRule]'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JitNetworkAccessPolicyVirtualMachine, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.ports = kwargs.get('ports', None) + self.public_ip_address = kwargs.get('public_ip_address', None) + + +class JitNetworkAccessPortRule(Model): + """JitNetworkAccessPortRule. + + All required parameters must be populated in order to send to Azure. + + :param number: Required. + :type number: int + :param protocol: Required. Possible values include: 'TCP', 'UDP', 'All' + :type protocol: str or ~azure.mgmt.security.models.Protocol + :param allowed_source_address_prefix: Mutually exclusive with the + "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR, + for example "192.168.0.3" or "192.168.0.0/16". + :type allowed_source_address_prefix: str + :param allowed_source_address_prefixes: Mutually exclusive with the + "allowedSourceAddressPrefix" parameter. + :type allowed_source_address_prefixes: list[str] + :param max_request_access_duration: Required. Maximum duration requests + can be made for. In ISO 8601 duration format. Minimum 5 minutes, maximum 1 + day + :type max_request_access_duration: str + """ + + _validation = { + 'number': {'required': True}, + 'protocol': {'required': True}, + 'max_request_access_duration': {'required': True}, + } + + _attribute_map = { + 'number': {'key': 'number', 'type': 'int'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'allowed_source_address_prefix': {'key': 'allowedSourceAddressPrefix', 'type': 'str'}, + 'allowed_source_address_prefixes': {'key': 'allowedSourceAddressPrefixes', 'type': '[str]'}, + 'max_request_access_duration': {'key': 'maxRequestAccessDuration', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JitNetworkAccessPortRule, self).__init__(**kwargs) + self.number = kwargs.get('number', None) + self.protocol = kwargs.get('protocol', None) + self.allowed_source_address_prefix = kwargs.get('allowed_source_address_prefix', None) + self.allowed_source_address_prefixes = kwargs.get('allowed_source_address_prefixes', None) + self.max_request_access_duration = kwargs.get('max_request_access_duration', None) + + +class JitNetworkAccessRequest(Model): + """JitNetworkAccessRequest. + + All required parameters must be populated in order to send to Azure. + + :param virtual_machines: Required. + :type virtual_machines: + list[~azure.mgmt.security.models.JitNetworkAccessRequestVirtualMachine] + :param start_time_utc: Required. The start time of the request in UTC + :type start_time_utc: datetime + :param requestor: Required. The identity of the person who made the + request + :type requestor: str + """ + + _validation = { + 'virtual_machines': {'required': True}, + 'start_time_utc': {'required': True}, + 'requestor': {'required': True}, + } + + _attribute_map = { + 'virtual_machines': {'key': 'virtualMachines', 'type': '[JitNetworkAccessRequestVirtualMachine]'}, + 'start_time_utc': {'key': 'startTimeUtc', 'type': 'iso-8601'}, + 'requestor': {'key': 'requestor', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JitNetworkAccessRequest, self).__init__(**kwargs) + self.virtual_machines = kwargs.get('virtual_machines', None) + self.start_time_utc = kwargs.get('start_time_utc', None) + self.requestor = kwargs.get('requestor', None) + + +class JitNetworkAccessRequestPort(Model): + """JitNetworkAccessRequestPort. + + All required parameters must be populated in order to send to Azure. + + :param number: Required. + :type number: int + :param allowed_source_address_prefix: Mutually exclusive with the + "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR, + for example "192.168.0.3" or "192.168.0.0/16". + :type allowed_source_address_prefix: str + :param allowed_source_address_prefixes: Mutually exclusive with the + "allowedSourceAddressPrefix" parameter. + :type allowed_source_address_prefixes: list[str] + :param end_time_utc: Required. The date & time at which the request ends + in UTC + :type end_time_utc: datetime + :param status: Required. The status of the port. Possible values include: + 'Revoked', 'Initiated' + :type status: str or ~azure.mgmt.security.models.Status + :param status_reason: Required. A description of why the `status` has its + value. Possible values include: 'Expired', 'UserRequested', + 'NewerRequestInitiated' + :type status_reason: str or ~azure.mgmt.security.models.StatusReason + :param mapped_port: The port which is mapped to this port's `number` in + the Azure Firewall, if applicable + :type mapped_port: int + """ + + _validation = { + 'number': {'required': True}, + 'end_time_utc': {'required': True}, + 'status': {'required': True}, + 'status_reason': {'required': True}, + } + + _attribute_map = { + 'number': {'key': 'number', 'type': 'int'}, + 'allowed_source_address_prefix': {'key': 'allowedSourceAddressPrefix', 'type': 'str'}, + 'allowed_source_address_prefixes': {'key': 'allowedSourceAddressPrefixes', 'type': '[str]'}, + 'end_time_utc': {'key': 'endTimeUtc', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_reason': {'key': 'statusReason', 'type': 'str'}, + 'mapped_port': {'key': 'mappedPort', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(JitNetworkAccessRequestPort, self).__init__(**kwargs) + self.number = kwargs.get('number', None) + self.allowed_source_address_prefix = kwargs.get('allowed_source_address_prefix', None) + self.allowed_source_address_prefixes = kwargs.get('allowed_source_address_prefixes', None) + self.end_time_utc = kwargs.get('end_time_utc', None) + self.status = kwargs.get('status', None) + self.status_reason = kwargs.get('status_reason', None) + self.mapped_port = kwargs.get('mapped_port', None) + + +class JitNetworkAccessRequestVirtualMachine(Model): + """JitNetworkAccessRequestVirtualMachine. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource ID of the virtual machine that is linked to + this policy + :type id: str + :param ports: Required. The ports that were opened for the virtual machine + :type ports: list[~azure.mgmt.security.models.JitNetworkAccessRequestPort] + """ + + _validation = { + 'id': {'required': True}, + 'ports': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'ports': {'key': 'ports', 'type': '[JitNetworkAccessRequestPort]'}, + } + + def __init__(self, **kwargs): + super(JitNetworkAccessRequestVirtualMachine, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.ports = kwargs.get('ports', None) + + +class Kind(Model): + """Describes an Azure resource with kind. + + :param kind: Kind of the resource + :type kind: str + """ + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Kind, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) + + +class Location(Model): + """Describes an Azure resource with location. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar location: Location where the resource is stored + :vartype location: str + """ + + _validation = { + 'location': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Location, self).__init__(**kwargs) + self.location = None + + +class Operation(Model): + """Possible operation in the REST API of Microsoft.Security. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of the operation + :vartype name: str + :ivar origin: Where the operation is originated + :vartype origin: str + :param display: + :type display: ~azure.mgmt.security.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + 'origin': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = None + self.origin = None + self.display = kwargs.get('display', None) + + +class OperationDisplay(Model): + """Security operation display. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: The resource provider for the operation. + :vartype provider: str + :ivar resource: The display name of the resource the operation applies to. + :vartype resource: str + :ivar operation: The display name of the security operation. + :vartype operation: str + :ivar description: The description of the operation. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class PathRecommendation(Model): + """Represents a path that is recommended to be allowed and its properties. + + :param path: The full path to whitelist + :type path: str + :param action: Possible values include: 'Recommended', 'Add', 'Remove' + :type action: str or ~azure.mgmt.security.models.enum + :param type: Possible values include: 'File', 'FileHash', + 'PublisherSignature', 'ProductSignature', 'BinarySignature', + 'VersionAndAboveSignature' + :type type: str or ~azure.mgmt.security.models.enum + :param publisher_info: + :type publisher_info: ~azure.mgmt.security.models.PublisherInfo + :param common: Whether the path is commonly run on the machine + :type common: bool + :param user_sids: + :type user_sids: list[str] + :param usernames: + :type usernames: list[~azure.mgmt.security.models.UserRecommendation] + :param file_type: Possible values include: 'Exe', 'Dll', 'Msi', 'Script', + 'Executable', 'Unknown' + :type file_type: str or ~azure.mgmt.security.models.enum + :param configuration_status: Possible values include: 'Configured', + 'NotConfigured', 'InProgress', 'Failed', 'NoStatus' + :type configuration_status: str or ~azure.mgmt.security.models.enum + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'publisher_info': {'key': 'publisherInfo', 'type': 'PublisherInfo'}, + 'common': {'key': 'common', 'type': 'bool'}, + 'user_sids': {'key': 'userSids', 'type': '[str]'}, + 'usernames': {'key': 'usernames', 'type': '[UserRecommendation]'}, + 'file_type': {'key': 'fileType', 'type': 'str'}, + 'configuration_status': {'key': 'configurationStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PathRecommendation, self).__init__(**kwargs) + self.path = kwargs.get('path', None) + self.action = kwargs.get('action', None) + self.type = kwargs.get('type', None) + self.publisher_info = kwargs.get('publisher_info', None) + self.common = kwargs.get('common', None) + self.user_sids = kwargs.get('user_sids', None) + self.usernames = kwargs.get('usernames', None) + self.file_type = kwargs.get('file_type', None) + self.configuration_status = kwargs.get('configuration_status', None) + + +class Pricing(Resource): + """Pricing tier will be applied for the scope based on the resource ID. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param pricing_tier: Required. The pricing tier value. Azure Security + Center is provided in two pricing tiers: free and standard, with the + standard tier available with a trial period. The standard tier offers + advanced security capabilities, while the free tier offers basic security + features. Possible values include: 'Free', 'Standard' + :type pricing_tier: str or ~azure.mgmt.security.models.PricingTier + :ivar free_trial_remaining_time: The duration left for the subscriptions + free trial period - in ISO 8601 format (e.g. P3Y6M4DT12H30M5S). + :vartype free_trial_remaining_time: timedelta + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'pricing_tier': {'required': True}, + 'free_trial_remaining_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'pricing_tier': {'key': 'properties.pricingTier', 'type': 'str'}, + 'free_trial_remaining_time': {'key': 'properties.freeTrialRemainingTime', 'type': 'duration'}, + } + + def __init__(self, **kwargs): + super(Pricing, self).__init__(**kwargs) + self.pricing_tier = kwargs.get('pricing_tier', None) + self.free_trial_remaining_time = None + + +class PricingList(Model): + """List of pricing configurations response. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of pricing configurations + :type value: list[~azure.mgmt.security.models.Pricing] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Pricing]'}, + } + + def __init__(self, **kwargs): + super(PricingList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class PublisherInfo(Model): + """Represents the publisher information of a process/rule. + + :param publisher_name: The Subject field of the x.509 certificate used to + sign the code, using the following fields - O = Organization, L = + Locality, S = State or Province, and C = Country + :type publisher_name: str + :param product_name: The product name taken from the file's version + resource + :type product_name: str + :param binary_name: The "OriginalName" field taken from the file's version + resource + :type binary_name: str + :param version: The binary file version taken from the file's version + resource + :type version: str + """ + + _attribute_map = { + 'publisher_name': {'key': 'publisherName', 'type': 'str'}, + 'product_name': {'key': 'productName', 'type': 'str'}, + 'binary_name': {'key': 'binaryName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PublisherInfo, self).__init__(**kwargs) + self.publisher_name = kwargs.get('publisher_name', None) + self.product_name = kwargs.get('product_name', None) + self.binary_name = kwargs.get('binary_name', None) + self.version = kwargs.get('version', None) + + +class RecommendationConfigurationProperties(Model): + """Recommendation configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param recommendation_type: Required. The recommendation type. Possible + values include: 'IoT_ACRAuthentication', + 'IoT_AgentSendsUnutilizedMessages', 'IoT_Baseline', + 'IoT_EdgeHubMemOptimize', 'IoT_EdgeLoggingOptions', + 'IoT_InconsistentModuleSettings', 'IoT_InstallAgent', + 'IoT_IPFilter_DenyAll', 'IoT_IPFilter_PermissiveRule', 'IoT_OpenPorts', + 'IoT_PermissiveFirewallPolicy', 'IoT_PermissiveInputFirewallRules', + 'IoT_PermissiveOutputFirewallRules', 'IoT_PrivilegedDockerOptions', + 'IoT_SharedCredentials', 'IoT_VulnerableTLSCipherSuite' + :type recommendation_type: str or + ~azure.mgmt.security.models.RecommendationType + :ivar name: + :vartype name: str + :param status: Required. Recommendation status. The recommendation is not + generated when the status is disabled. Possible values include: + 'Disabled', 'Enabled'. Default value: "Enabled" . + :type status: str or + ~azure.mgmt.security.models.RecommendationConfigStatus + """ + + _validation = { + 'recommendation_type': {'required': True}, + 'name': {'readonly': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'recommendation_type': {'key': 'recommendationType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RecommendationConfigurationProperties, self).__init__(**kwargs) + self.recommendation_type = kwargs.get('recommendation_type', None) + self.name = None + self.status = kwargs.get('status', "Enabled") + + +class RegulatoryComplianceAssessment(Resource): + """Regulatory compliance assessment details and state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar description: The description of the regulatory compliance assessment + :vartype description: str + :ivar assessment_type: The expected type of assessment contained in the + AssessmentDetailsLink + :vartype assessment_type: str + :ivar assessment_details_link: Link to more detailed assessment results + data. The response type will be according to the assessmentType field + :vartype assessment_details_link: str + :param state: Aggregative state based on the assessment's scanned + resources states. Possible values include: 'Passed', 'Failed', 'Skipped', + 'Unsupported' + :type state: str or ~azure.mgmt.security.models.State + :ivar passed_resources: The given assessment's related resources count + with passed state. + :vartype passed_resources: int + :ivar failed_resources: The given assessment's related resources count + with failed state. + :vartype failed_resources: int + :ivar skipped_resources: The given assessment's related resources count + with skipped state. + :vartype skipped_resources: int + :ivar unsupported_resources: The given assessment's related resources + count with unsupported state. + :vartype unsupported_resources: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'readonly': True}, + 'assessment_type': {'readonly': True}, + 'assessment_details_link': {'readonly': True}, + 'passed_resources': {'readonly': True}, + 'failed_resources': {'readonly': True}, + 'skipped_resources': {'readonly': True}, + 'unsupported_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'assessment_type': {'key': 'properties.assessmentType', 'type': 'str'}, + 'assessment_details_link': {'key': 'properties.assessmentDetailsLink', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'passed_resources': {'key': 'properties.passedResources', 'type': 'int'}, + 'failed_resources': {'key': 'properties.failedResources', 'type': 'int'}, + 'skipped_resources': {'key': 'properties.skippedResources', 'type': 'int'}, + 'unsupported_resources': {'key': 'properties.unsupportedResources', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RegulatoryComplianceAssessment, self).__init__(**kwargs) + self.description = None + self.assessment_type = None + self.assessment_details_link = None + self.state = kwargs.get('state', None) + self.passed_resources = None + self.failed_resources = None + self.skipped_resources = None + self.unsupported_resources = None + + +class RegulatoryComplianceControl(Resource): + """Regulatory compliance control details and state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar description: The description of the regulatory compliance control + :vartype description: str + :param state: Aggregative state based on the control's supported + assessments states. Possible values include: 'Passed', 'Failed', + 'Skipped', 'Unsupported' + :type state: str or ~azure.mgmt.security.models.State + :ivar passed_assessments: The number of supported regulatory compliance + assessments of the given control with a passed state + :vartype passed_assessments: int + :ivar failed_assessments: The number of supported regulatory compliance + assessments of the given control with a failed state + :vartype failed_assessments: int + :ivar skipped_assessments: The number of supported regulatory compliance + assessments of the given control with a skipped state + :vartype skipped_assessments: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'readonly': True}, + 'passed_assessments': {'readonly': True}, + 'failed_assessments': {'readonly': True}, + 'skipped_assessments': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'passed_assessments': {'key': 'properties.passedAssessments', 'type': 'int'}, + 'failed_assessments': {'key': 'properties.failedAssessments', 'type': 'int'}, + 'skipped_assessments': {'key': 'properties.skippedAssessments', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RegulatoryComplianceControl, self).__init__(**kwargs) + self.description = None + self.state = kwargs.get('state', None) + self.passed_assessments = None + self.failed_assessments = None + self.skipped_assessments = None + + +class RegulatoryComplianceStandard(Resource): + """Regulatory compliance standard details and state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param state: Aggregative state based on the standard's supported controls + states. Possible values include: 'Passed', 'Failed', 'Skipped', + 'Unsupported' + :type state: str or ~azure.mgmt.security.models.State + :ivar passed_controls: The number of supported regulatory compliance + controls of the given standard with a passed state + :vartype passed_controls: int + :ivar failed_controls: The number of supported regulatory compliance + controls of the given standard with a failed state + :vartype failed_controls: int + :ivar skipped_controls: The number of supported regulatory compliance + controls of the given standard with a skipped state + :vartype skipped_controls: int + :ivar unsupported_controls: The number of regulatory compliance controls + of the given standard which are unsupported by automated assessments + :vartype unsupported_controls: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'passed_controls': {'readonly': True}, + 'failed_controls': {'readonly': True}, + 'skipped_controls': {'readonly': True}, + 'unsupported_controls': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'passed_controls': {'key': 'properties.passedControls', 'type': 'int'}, + 'failed_controls': {'key': 'properties.failedControls', 'type': 'int'}, + 'skipped_controls': {'key': 'properties.skippedControls', 'type': 'int'}, + 'unsupported_controls': {'key': 'properties.unsupportedControls', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RegulatoryComplianceStandard, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.passed_controls = None + self.failed_controls = None + self.skipped_controls = None + self.unsupported_controls = None + + +class SecurityContact(Resource): + """Contact details for security issues. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param email: Required. The email of this security contact + :type email: str + :param phone: The phone number of this security contact + :type phone: str + :param alert_notifications: Required. Whether to send security alerts + notifications to the security contact. Possible values include: 'On', + 'Off' + :type alert_notifications: str or + ~azure.mgmt.security.models.AlertNotifications + :param alerts_to_admins: Required. Whether to send security alerts + notifications to subscription admins. Possible values include: 'On', 'Off' + :type alerts_to_admins: str or ~azure.mgmt.security.models.AlertsToAdmins + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'email': {'required': True}, + 'alert_notifications': {'required': True}, + 'alerts_to_admins': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'email': {'key': 'properties.email', 'type': 'str'}, + 'phone': {'key': 'properties.phone', 'type': 'str'}, + 'alert_notifications': {'key': 'properties.alertNotifications', 'type': 'str'}, + 'alerts_to_admins': {'key': 'properties.alertsToAdmins', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecurityContact, self).__init__(**kwargs) + self.email = kwargs.get('email', None) + self.phone = kwargs.get('phone', None) + self.alert_notifications = kwargs.get('alert_notifications', None) + self.alerts_to_admins = kwargs.get('alerts_to_admins', None) + + +class SecurityTask(Resource): + """Security task that we recommend to do in order to strengthen security. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar state: State of the task (Active, Resolved etc.) + :vartype state: str + :ivar creation_time_utc: The time this task was discovered in UTC + :vartype creation_time_utc: datetime + :param security_task_parameters: + :type security_task_parameters: + ~azure.mgmt.security.models.SecurityTaskParameters + :ivar last_state_change_time_utc: The time this task's details were last + changed in UTC + :vartype last_state_change_time_utc: datetime + :ivar sub_state: Additional data on the state of the task + :vartype sub_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'readonly': True}, + 'creation_time_utc': {'readonly': True}, + 'last_state_change_time_utc': {'readonly': True}, + 'sub_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'creation_time_utc': {'key': 'properties.creationTimeUtc', 'type': 'iso-8601'}, + 'security_task_parameters': {'key': 'properties.securityTaskParameters', 'type': 'SecurityTaskParameters'}, + 'last_state_change_time_utc': {'key': 'properties.lastStateChangeTimeUtc', 'type': 'iso-8601'}, + 'sub_state': {'key': 'properties.subState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecurityTask, self).__init__(**kwargs) + self.state = None + self.creation_time_utc = None + self.security_task_parameters = kwargs.get('security_task_parameters', None) + self.last_state_change_time_utc = None + self.sub_state = None + + +class SecurityTaskParameters(Model): + """Changing set of properties, depending on the task type that is derived from + the name field. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar name: Name of the task type + :vartype name: str + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecurityTaskParameters, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.name = None + + +class SensitivityLabel(Model): + """The sensitivity label. + + :param display_name: The name of the sensitivity label. + :type display_name: str + :param order: The order of the sensitivity label. + :type order: float + :param enabled: Indicates whether the label is enabled or not. + :type enabled: bool + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'float'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(SensitivityLabel, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.order = kwargs.get('order', None) + self.enabled = kwargs.get('enabled', None) + + +class ServerVulnerabilityAssessment(Resource): + """Describes the server vulnerability assessment details on a resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar provisioning_state: The provisioningState of the vulnerability + assessment capability on the VM. Possible values include: 'Succeeded', + 'Failed', 'Canceled', 'Provisioning', 'Deprovisioning' + :vartype provisioning_state: str or ~azure.mgmt.security.models.enum + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServerVulnerabilityAssessment, self).__init__(**kwargs) + self.provisioning_state = None + + +class ServerVulnerabilityAssessmentsList(Model): + """List of server vulnerability assessments. + + :param value: + :type value: + list[~azure.mgmt.security.models.ServerVulnerabilityAssessment] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ServerVulnerabilityAssessment]'}, + } + + def __init__(self, **kwargs): + super(ServerVulnerabilityAssessmentsList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class TagsResource(Model): + """A container holding only the Tags for a resource, allowing the user to + update the tags. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(TagsResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class TopologyResource(Model): + """TopologyResource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar location: Location where the resource is stored + :vartype location: str + :ivar calculated_date_time: The UTC time on which the topology was + calculated + :vartype calculated_date_time: datetime + :ivar topology_resources: Azure resources which are part of this topology + resource + :vartype topology_resources: + list[~azure.mgmt.security.models.TopologySingleResource] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'calculated_date_time': {'readonly': True}, + 'topology_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'calculated_date_time': {'key': 'properties.calculatedDateTime', 'type': 'iso-8601'}, + 'topology_resources': {'key': 'properties.topologyResources', 'type': '[TopologySingleResource]'}, + } + + def __init__(self, **kwargs): + super(TopologyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.calculated_date_time = None + self.topology_resources = None + + +class TopologySingleResource(Model): + """TopologySingleResource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_id: Azure resource id + :vartype resource_id: str + :ivar severity: The security severity of the resource + :vartype severity: str + :ivar recommendations_exist: Indicates if the resource has security + recommendations + :vartype recommendations_exist: bool + :ivar network_zones: Indicates the resource connectivity level to the + Internet (InternetFacing, Internal ,etc.) + :vartype network_zones: str + :ivar topology_score: Score of the resource based on its security severity + :vartype topology_score: int + :ivar location: The location of this resource + :vartype location: str + :ivar parents: Azure resources connected to this resource which are in + higher level in the topology view + :vartype parents: + list[~azure.mgmt.security.models.TopologySingleResourceParent] + :ivar children: Azure resources connected to this resource which are in + lower level in the topology view + :vartype children: + list[~azure.mgmt.security.models.TopologySingleResourceChild] + """ + + _validation = { + 'resource_id': {'readonly': True}, + 'severity': {'readonly': True}, + 'recommendations_exist': {'readonly': True}, + 'network_zones': {'readonly': True}, + 'topology_score': {'readonly': True}, + 'location': {'readonly': True}, + 'parents': {'readonly': True}, + 'children': {'readonly': True}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'severity': {'key': 'severity', 'type': 'str'}, + 'recommendations_exist': {'key': 'recommendationsExist', 'type': 'bool'}, + 'network_zones': {'key': 'networkZones', 'type': 'str'}, + 'topology_score': {'key': 'topologyScore', 'type': 'int'}, + 'location': {'key': 'location', 'type': 'str'}, + 'parents': {'key': 'parents', 'type': '[TopologySingleResourceParent]'}, + 'children': {'key': 'children', 'type': '[TopologySingleResourceChild]'}, + } + + def __init__(self, **kwargs): + super(TopologySingleResource, self).__init__(**kwargs) + self.resource_id = None + self.severity = None + self.recommendations_exist = None + self.network_zones = None + self.topology_score = None + self.location = None + self.parents = None + self.children = None + + +class TopologySingleResourceChild(Model): + """TopologySingleResourceChild. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_id: Azure resource id which serves as child resource in + topology view + :vartype resource_id: str + """ + + _validation = { + 'resource_id': {'readonly': True}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TopologySingleResourceChild, self).__init__(**kwargs) + self.resource_id = None + + +class TopologySingleResourceParent(Model): + """TopologySingleResourceParent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_id: Azure resource id which serves as parent resource in + topology view + :vartype resource_id: str + """ + + _validation = { + 'resource_id': {'readonly': True}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TopologySingleResourceParent, self).__init__(**kwargs) + self.resource_id = None + + +class UpdateIotSecuritySolutionData(TagsResource): + """UpdateIotSecuritySolutionData. + + :param tags: Resource tags + :type tags: dict[str, str] + :param user_defined_resources: + :type user_defined_resources: + ~azure.mgmt.security.models.UserDefinedResourcesProperties + :param recommendations_configuration: + :type recommendations_configuration: + list[~azure.mgmt.security.models.RecommendationConfigurationProperties] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'user_defined_resources': {'key': 'userDefinedResources', 'type': 'UserDefinedResourcesProperties'}, + 'recommendations_configuration': {'key': 'recommendationsConfiguration', 'type': '[RecommendationConfigurationProperties]'}, + } + + def __init__(self, **kwargs): + super(UpdateIotSecuritySolutionData, self).__init__(**kwargs) + self.user_defined_resources = kwargs.get('user_defined_resources', None) + self.recommendations_configuration = kwargs.get('recommendations_configuration', None) + + +class UserDefinedResourcesProperties(Model): + """Properties of the solution's user defined resources. + + All required parameters must be populated in order to send to Azure. + + :param query: Required. Azure Resource Graph query which represents the + security solution's user defined resources. Required to start with "where + type != "Microsoft.Devices/IotHubs"" + :type query: str + :param query_subscriptions: Required. List of Azure subscription ids on + which the user defined resources query should be executed. + :type query_subscriptions: list[str] + """ + + _validation = { + 'query': {'required': True}, + 'query_subscriptions': {'required': True}, + } + + _attribute_map = { + 'query': {'key': 'query', 'type': 'str'}, + 'query_subscriptions': {'key': 'querySubscriptions', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(UserDefinedResourcesProperties, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.query_subscriptions = kwargs.get('query_subscriptions', None) + + +class UserRecommendation(Model): + """Represents a user that is recommended to be allowed for a certain rule. + + :param username: Represents a user that is recommended to be allowed for a + certain rule + :type username: str + :param recommendation_action: Possible values include: 'Recommended', + 'Add', 'Remove' + :type recommendation_action: str or ~azure.mgmt.security.models.enum + """ + + _attribute_map = { + 'username': {'key': 'username', 'type': 'str'}, + 'recommendation_action': {'key': 'recommendationAction', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserRecommendation, self).__init__(**kwargs) + self.username = kwargs.get('username', None) + self.recommendation_action = kwargs.get('recommendation_action', None) + + +class VmRecommendation(Model): + """Represents a machine that is part of a VM/server group. + + :param configuration_status: Possible values include: 'Configured', + 'NotConfigured', 'InProgress', 'Failed', 'NoStatus' + :type configuration_status: str or ~azure.mgmt.security.models.enum + :param recommendation_action: Possible values include: 'Recommended', + 'Add', 'Remove' + :type recommendation_action: str or ~azure.mgmt.security.models.enum + :param resource_id: + :type resource_id: str + """ + + _attribute_map = { + 'configuration_status': {'key': 'configurationStatus', 'type': 'str'}, + 'recommendation_action': {'key': 'recommendationAction', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VmRecommendation, self).__init__(**kwargs) + self.configuration_status = kwargs.get('configuration_status', None) + self.recommendation_action = kwargs.get('recommendation_action', None) + self.resource_id = kwargs.get('resource_id', None) + + +class WorkspaceSetting(Resource): + """Configures where to store the OMS agent data for workspaces under a scope. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param workspace_id: Required. The full Azure ID of the workspace to save + the data in + :type workspace_id: str + :param scope: Required. All the VMs in this scope will send their security + data to the mentioned workspace unless overridden by a setting with more + specific scope + :type scope: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'workspace_id': {'required': True}, + 'scope': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WorkspaceSetting, self).__init__(**kwargs) + self.workspace_id = kwargs.get('workspace_id', None) + self.scope = kwargs.get('scope', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models_py3.py new file mode 100644 index 000000000000..8dc96cc2d6be --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_models_py3.py @@ -0,0 +1,3455 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AadConnectivityState1(Model): + """Describes an Azure resource with kind. + + :param connectivity_state: The connectivity state of the external AAD + solution . Possible values include: 'Discovered', 'NotLicensed', + 'Connected' + :type connectivity_state: str or + ~azure.mgmt.security.models.AadConnectivityState + """ + + _attribute_map = { + 'connectivity_state': {'key': 'connectivityState', 'type': 'str'}, + } + + def __init__(self, *, connectivity_state=None, **kwargs) -> None: + super(AadConnectivityState1, self).__init__(**kwargs) + self.connectivity_state = connectivity_state + + +class ExternalSecuritySolution(Model): + """Represents a security solution external to Azure Security Center which + sends information to an OMS workspace and whose data is displayed by Azure + Security Center. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CefExternalSecuritySolution, AtaExternalSecuritySolution, + AadExternalSecuritySolution + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar location: Location where the resource is stored + :vartype location: str + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'CEF': 'CefExternalSecuritySolution', 'ATA': 'AtaExternalSecuritySolution', 'AAD': 'AadExternalSecuritySolution'} + } + + def __init__(self, **kwargs) -> None: + super(ExternalSecuritySolution, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.kind = None + + +class AadExternalSecuritySolution(ExternalSecuritySolution): + """Represents an AAD identity protection solution which sends logs to an OMS + workspace. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar location: Location where the resource is stored + :vartype location: str + :param kind: Required. Constant filled by server. + :type kind: str + :param properties: + :type properties: ~azure.mgmt.security.models.AadSolutionProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AadSolutionProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(AadExternalSecuritySolution, self).__init__(**kwargs) + self.properties = properties + self.kind = 'AAD' + + +class AadSolutionProperties(Model): + """The external security solution properties for AAD solutions. + + :param device_vendor: + :type device_vendor: str + :param device_type: + :type device_type: str + :param workspace: + :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace + :param connectivity_state: The connectivity state of the external AAD + solution . Possible values include: 'Discovered', 'NotLicensed', + 'Connected' + :type connectivity_state: str or + ~azure.mgmt.security.models.AadConnectivityState + """ + + _attribute_map = { + 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, + 'connectivity_state': {'key': 'connectivityState', 'type': 'str'}, + } + + def __init__(self, *, device_vendor: str=None, device_type: str=None, workspace=None, connectivity_state=None, **kwargs) -> None: + super(AadSolutionProperties, self).__init__(**kwargs) + self.device_vendor = device_vendor + self.device_type = device_type + self.workspace = workspace + self.connectivity_state = connectivity_state + + +class Resource(Model): + """Describes an Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class AdvancedThreatProtectionSetting(Resource): + """The Advanced Threat Protection resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param is_enabled: Indicates whether Advanced Threat Protection is + enabled. + :type is_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + } + + def __init__(self, *, is_enabled: bool=None, **kwargs) -> None: + super(AdvancedThreatProtectionSetting, self).__init__(**kwargs) + self.is_enabled = is_enabled + + +class Alert(Resource): + """Security alert. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar state: State of the alert (Active, Dismissed etc.) + :vartype state: str + :ivar reported_time_utc: The time the incident was reported to + Microsoft.Security in UTC + :vartype reported_time_utc: datetime + :ivar vendor_name: Name of the vendor that discovered the incident + :vartype vendor_name: str + :ivar alert_name: Name of the alert type + :vartype alert_name: str + :ivar alert_display_name: Display name of the alert type + :vartype alert_display_name: str + :ivar detected_time_utc: The time the incident was detected by the vendor + :vartype detected_time_utc: datetime + :ivar description: Description of the incident and what it means + :vartype description: str + :ivar remediation_steps: Recommended steps to reradiate the incident + :vartype remediation_steps: str + :ivar action_taken: The action that was taken as a response to the alert + (Active, Blocked etc.) + :vartype action_taken: str + :ivar reported_severity: Estimated severity of this alert. Possible values + include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar compromised_entity: The entity that the incident happened on + :vartype compromised_entity: str + :ivar associated_resource: Azure resource ID of the associated resource + :vartype associated_resource: str + :param extended_properties: + :type extended_properties: dict[str, object] + :ivar system_source: The type of the alerted resource (Azure, Non-Azure) + :vartype system_source: str + :ivar can_be_investigated: Whether this alert can be investigated with + Azure Security Center + :vartype can_be_investigated: bool + :ivar is_incident: Whether this alert is for incident type or not + (otherwise - single alert) + :vartype is_incident: bool + :param entities: objects that are related to this alerts + :type entities: list[~azure.mgmt.security.models.AlertEntity] + :ivar confidence_score: level of confidence we have on the alert + :vartype confidence_score: float + :param confidence_reasons: reasons the alert got the confidenceScore value + :type confidence_reasons: + list[~azure.mgmt.security.models.AlertConfidenceReason] + :ivar subscription_id: Azure subscription ID of the resource that had the + security alert or the subscription ID of the workspace that this resource + reports to + :vartype subscription_id: str + :ivar instance_id: Instance ID of the alert. + :vartype instance_id: str + :ivar workspace_arm_id: Azure resource ID of the workspace that the alert + was reported to. + :vartype workspace_arm_id: str + :ivar correlation_key: Alerts with the same CorrelationKey will be grouped + together in Ibiza. + :vartype correlation_key: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'readonly': True}, + 'reported_time_utc': {'readonly': True}, + 'vendor_name': {'readonly': True}, + 'alert_name': {'readonly': True}, + 'alert_display_name': {'readonly': True}, + 'detected_time_utc': {'readonly': True}, + 'description': {'readonly': True}, + 'remediation_steps': {'readonly': True}, + 'action_taken': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'compromised_entity': {'readonly': True}, + 'associated_resource': {'readonly': True}, + 'system_source': {'readonly': True}, + 'can_be_investigated': {'readonly': True}, + 'is_incident': {'readonly': True}, + 'confidence_score': {'readonly': True, 'maximum': 1, 'minimum': 0}, + 'subscription_id': {'readonly': True}, + 'instance_id': {'readonly': True}, + 'workspace_arm_id': {'readonly': True}, + 'correlation_key': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'reported_time_utc': {'key': 'properties.reportedTimeUtc', 'type': 'iso-8601'}, + 'vendor_name': {'key': 'properties.vendorName', 'type': 'str'}, + 'alert_name': {'key': 'properties.alertName', 'type': 'str'}, + 'alert_display_name': {'key': 'properties.alertDisplayName', 'type': 'str'}, + 'detected_time_utc': {'key': 'properties.detectedTimeUtc', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, + 'action_taken': {'key': 'properties.actionTaken', 'type': 'str'}, + 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, + 'compromised_entity': {'key': 'properties.compromisedEntity', 'type': 'str'}, + 'associated_resource': {'key': 'properties.associatedResource', 'type': 'str'}, + 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{object}'}, + 'system_source': {'key': 'properties.systemSource', 'type': 'str'}, + 'can_be_investigated': {'key': 'properties.canBeInvestigated', 'type': 'bool'}, + 'is_incident': {'key': 'properties.isIncident', 'type': 'bool'}, + 'entities': {'key': 'properties.entities', 'type': '[AlertEntity]'}, + 'confidence_score': {'key': 'properties.confidenceScore', 'type': 'float'}, + 'confidence_reasons': {'key': 'properties.confidenceReasons', 'type': '[AlertConfidenceReason]'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, + 'workspace_arm_id': {'key': 'properties.workspaceArmId', 'type': 'str'}, + 'correlation_key': {'key': 'properties.correlationKey', 'type': 'str'}, + } + + def __init__(self, *, extended_properties=None, entities=None, confidence_reasons=None, **kwargs) -> None: + super(Alert, self).__init__(**kwargs) + self.state = None + self.reported_time_utc = None + self.vendor_name = None + self.alert_name = None + self.alert_display_name = None + self.detected_time_utc = None + self.description = None + self.remediation_steps = None + self.action_taken = None + self.reported_severity = None + self.compromised_entity = None + self.associated_resource = None + self.extended_properties = extended_properties + self.system_source = None + self.can_be_investigated = None + self.is_incident = None + self.entities = entities + self.confidence_score = None + self.confidence_reasons = confidence_reasons + self.subscription_id = None + self.instance_id = None + self.workspace_arm_id = None + self.correlation_key = None + + +class AlertConfidenceReason(Model): + """Factors that increase our confidence that the alert is a true positive. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: Type of confidence factor + :vartype type: str + :ivar reason: description of the confidence reason + :vartype reason: str + """ + + _validation = { + 'type': {'readonly': True}, + 'reason': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(AlertConfidenceReason, self).__init__(**kwargs) + self.type = None + self.reason = None + + +class AlertEntity(Model): + """Changing set of properties depending on the entity type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar type: Type of entity + :vartype type: str + """ + + _validation = { + 'type': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, additional_properties=None, **kwargs) -> None: + super(AlertEntity, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.type = None + + +class AllowedConnectionsResource(Model): + """The resource whose properties describes the allowed traffic between Azure + resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar location: Location where the resource is stored + :vartype location: str + :ivar calculated_date_time: The UTC time on which the allowed connections + resource was calculated + :vartype calculated_date_time: datetime + :ivar connectable_resources: List of connectable resources + :vartype connectable_resources: + list[~azure.mgmt.security.models.ConnectableResource] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'calculated_date_time': {'readonly': True}, + 'connectable_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'calculated_date_time': {'key': 'properties.calculatedDateTime', 'type': 'iso-8601'}, + 'connectable_resources': {'key': 'properties.connectableResources', 'type': '[ConnectableResource]'}, + } + + def __init__(self, **kwargs) -> None: + super(AllowedConnectionsResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.calculated_date_time = None + self.connectable_resources = None + + +class AppWhitelistingGroup(Model): + """AppWhitelistingGroup. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar location: Location where the resource is stored + :vartype location: str + :param enforcement_mode: Possible values include: 'Audit', 'Enforce' + :type enforcement_mode: str or ~azure.mgmt.security.models.enum + :param configuration_status: Possible values include: 'Configured', + 'NotConfigured', 'InProgress', 'Failed', 'NoStatus' + :type configuration_status: str or ~azure.mgmt.security.models.enum + :param recommendation_status: Possible values include: 'Recommended', + 'NotRecommended', 'NotAvailable', 'NoStatus' + :type recommendation_status: str or ~azure.mgmt.security.models.enum + :param issues: + :type issues: + list[~azure.mgmt.security.models.AppWhitelistingIssueSummary] + :param source_system: Possible values include: 'Azure_AppLocker', + 'Azure_AuditD', 'NonAzure_AppLocker', 'NonAzure_AuditD', 'None' + :type source_system: str or ~azure.mgmt.security.models.enum + :param vm_recommendations: + :type vm_recommendations: + list[~azure.mgmt.security.models.VmRecommendation] + :param path_recommendations: + :type path_recommendations: + list[~azure.mgmt.security.models.PathRecommendation] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'enforcement_mode': {'key': 'properties.enforcementMode', 'type': 'str'}, + 'configuration_status': {'key': 'properties.configurationStatus', 'type': 'str'}, + 'recommendation_status': {'key': 'properties.recommendationStatus', 'type': 'str'}, + 'issues': {'key': 'properties.issues', 'type': '[AppWhitelistingIssueSummary]'}, + 'source_system': {'key': 'properties.sourceSystem', 'type': 'str'}, + 'vm_recommendations': {'key': 'properties.vmRecommendations', 'type': '[VmRecommendation]'}, + 'path_recommendations': {'key': 'properties.pathRecommendations', 'type': '[PathRecommendation]'}, + } + + def __init__(self, *, enforcement_mode=None, configuration_status=None, recommendation_status=None, issues=None, source_system=None, vm_recommendations=None, path_recommendations=None, **kwargs) -> None: + super(AppWhitelistingGroup, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.enforcement_mode = enforcement_mode + self.configuration_status = configuration_status + self.recommendation_status = recommendation_status + self.issues = issues + self.source_system = source_system + self.vm_recommendations = vm_recommendations + self.path_recommendations = path_recommendations + + +class AppWhitelistingGroups(Model): + """Represents a list of VM/server groups and set of rules that are Recommended + by Azure Security Center to be allowed. + + :param value: + :type value: list[~azure.mgmt.security.models.AppWhitelistingGroup] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AppWhitelistingGroup]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(AppWhitelistingGroups, self).__init__(**kwargs) + self.value = value + + +class AppWhitelistingIssueSummary(Model): + """Represents a summary of the alerts of the VM/server group. + + :param issue: Possible values include: 'ViolationsAudited', + 'ViolationsBlocked', 'MsiAndScriptViolationsAudited', + 'MsiAndScriptViolationsBlocked', 'ExecutableViolationsAudited', + 'RulesViolatedManually' + :type issue: str or ~azure.mgmt.security.models.enum + :param number_of_vms: The number of machines in the VM/server group that + have this alert + :type number_of_vms: float + """ + + _attribute_map = { + 'issue': {'key': 'issue', 'type': 'str'}, + 'number_of_vms': {'key': 'numberOfVms', 'type': 'float'}, + } + + def __init__(self, *, issue=None, number_of_vms: float=None, **kwargs) -> None: + super(AppWhitelistingIssueSummary, self).__init__(**kwargs) + self.issue = issue + self.number_of_vms = number_of_vms + + +class AppWhitelistingPutGroupData(Model): + """The altered data of the recommended VM/server group policy. + + :param enforcement_mode: Possible values include: 'Audit', 'Enforce' + :type enforcement_mode: str or ~azure.mgmt.security.models.enum + :param vm_recommendations: + :type vm_recommendations: + list[~azure.mgmt.security.models.VmRecommendation] + :param path_recommendations: + :type path_recommendations: + list[~azure.mgmt.security.models.PathRecommendation] + """ + + _attribute_map = { + 'enforcement_mode': {'key': 'enforcementMode', 'type': 'str'}, + 'vm_recommendations': {'key': 'vmRecommendations', 'type': '[VmRecommendation]'}, + 'path_recommendations': {'key': 'pathRecommendations', 'type': '[PathRecommendation]'}, + } + + def __init__(self, *, enforcement_mode=None, vm_recommendations=None, path_recommendations=None, **kwargs) -> None: + super(AppWhitelistingPutGroupData, self).__init__(**kwargs) + self.enforcement_mode = enforcement_mode + self.vm_recommendations = vm_recommendations + self.path_recommendations = path_recommendations + + +class AscLocation(Resource): + """The ASC location of the subscription is in the "name" field. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param properties: + :type properties: object + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(AscLocation, self).__init__(**kwargs) + self.properties = properties + + +class AtaExternalSecuritySolution(ExternalSecuritySolution): + """Represents an ATA security solution which sends logs to an OMS workspace. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar location: Location where the resource is stored + :vartype location: str + :param kind: Required. Constant filled by server. + :type kind: str + :param properties: + :type properties: ~azure.mgmt.security.models.AtaSolutionProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AtaSolutionProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(AtaExternalSecuritySolution, self).__init__(**kwargs) + self.properties = properties + self.kind = 'ATA' + + +class ExternalSecuritySolutionProperties(Model): + """The solution properties (correspond to the solution kind). + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param device_vendor: + :type device_vendor: str + :param device_type: + :type device_type: str + :param workspace: + :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, + } + + def __init__(self, *, additional_properties=None, device_vendor: str=None, device_type: str=None, workspace=None, **kwargs) -> None: + super(ExternalSecuritySolutionProperties, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.device_vendor = device_vendor + self.device_type = device_type + self.workspace = workspace + + +class AtaSolutionProperties(ExternalSecuritySolutionProperties): + """The external security solution properties for ATA solutions. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param device_vendor: + :type device_vendor: str + :param device_type: + :type device_type: str + :param workspace: + :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace + :param last_event_received: + :type last_event_received: str + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, + 'last_event_received': {'key': 'lastEventReceived', 'type': 'str'}, + } + + def __init__(self, *, additional_properties=None, device_vendor: str=None, device_type: str=None, workspace=None, last_event_received: str=None, **kwargs) -> None: + super(AtaSolutionProperties, self).__init__(additional_properties=additional_properties, device_vendor=device_vendor, device_type=device_type, workspace=workspace, **kwargs) + self.last_event_received = last_event_received + + +class AutoProvisioningSetting(Resource): + """Auto provisioning setting. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param auto_provision: Required. Describes what kind of security agent + provisioning action to take. Possible values include: 'On', 'Off' + :type auto_provision: str or ~azure.mgmt.security.models.AutoProvision + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'auto_provision': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'auto_provision': {'key': 'properties.autoProvision', 'type': 'str'}, + } + + def __init__(self, *, auto_provision, **kwargs) -> None: + super(AutoProvisioningSetting, self).__init__(**kwargs) + self.auto_provision = auto_provision + + +class CefExternalSecuritySolution(ExternalSecuritySolution): + """Represents a security solution which sends CEF logs to an OMS workspace. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar location: Location where the resource is stored + :vartype location: str + :param kind: Required. Constant filled by server. + :type kind: str + :param properties: + :type properties: ~azure.mgmt.security.models.CefSolutionProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'CefSolutionProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(CefExternalSecuritySolution, self).__init__(**kwargs) + self.properties = properties + self.kind = 'CEF' + + +class CefSolutionProperties(ExternalSecuritySolutionProperties): + """The external security solution properties for CEF solutions. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param device_vendor: + :type device_vendor: str + :param device_type: + :type device_type: str + :param workspace: + :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace + :param hostname: + :type hostname: str + :param agent: + :type agent: str + :param last_event_received: + :type last_event_received: str + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, + 'device_type': {'key': 'deviceType', 'type': 'str'}, + 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, + 'hostname': {'key': 'hostname', 'type': 'str'}, + 'agent': {'key': 'agent', 'type': 'str'}, + 'last_event_received': {'key': 'lastEventReceived', 'type': 'str'}, + } + + def __init__(self, *, additional_properties=None, device_vendor: str=None, device_type: str=None, workspace=None, hostname: str=None, agent: str=None, last_event_received: str=None, **kwargs) -> None: + super(CefSolutionProperties, self).__init__(additional_properties=additional_properties, device_vendor=device_vendor, device_type=device_type, workspace=workspace, **kwargs) + self.hostname = hostname + self.agent = agent + self.last_event_received = last_event_received + + +class CloudError(Model): + """Error response structure. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: An identifier for the error. Codes are invariant and are + intended to be consumed programmatically. + :vartype code: str + :ivar message: A message describing the error, intended to be suitable for + display in a user interface. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'error.code', 'type': 'str'}, + 'message': {'key': 'error.message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CloudError, self).__init__(**kwargs) + self.code = None + self.message = None + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class Compliance(Resource): + """Compliance of a scope. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar assessment_timestamp_utc_date: The timestamp when the Compliance + calculation was conducted. + :vartype assessment_timestamp_utc_date: datetime + :ivar resource_count: The resource count of the given subscription for + which the Compliance calculation was conducted (needed for Management + Group Compliance calculation). + :vartype resource_count: int + :ivar assessment_result: An array of segment, which is the actually the + compliance assessment. + :vartype assessment_result: + list[~azure.mgmt.security.models.ComplianceSegment] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'assessment_timestamp_utc_date': {'readonly': True}, + 'resource_count': {'readonly': True}, + 'assessment_result': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'assessment_timestamp_utc_date': {'key': 'properties.assessmentTimestampUtcDate', 'type': 'iso-8601'}, + 'resource_count': {'key': 'properties.resourceCount', 'type': 'int'}, + 'assessment_result': {'key': 'properties.assessmentResult', 'type': '[ComplianceSegment]'}, + } + + def __init__(self, **kwargs) -> None: + super(Compliance, self).__init__(**kwargs) + self.assessment_timestamp_utc_date = None + self.resource_count = None + self.assessment_result = None + + +class ComplianceResult(Resource): + """a compliance result. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar resource_status: The status of the resource regarding a single + assessment. Possible values include: 'Healthy', 'NotApplicable', + 'OffByPolicy', 'NotHealthy' + :vartype resource_status: str or + ~azure.mgmt.security.models.ResourceStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'resource_status': {'key': 'properties.resourceStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ComplianceResult, self).__init__(**kwargs) + self.resource_status = None + + +class ComplianceSegment(Model): + """A segment of a compliance assessment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar segment_type: The segment type, e.g. compliant, non-compliance, + insufficient coverage, N/A, etc. + :vartype segment_type: str + :ivar percentage: The size (%) of the segment. + :vartype percentage: float + """ + + _validation = { + 'segment_type': {'readonly': True}, + 'percentage': {'readonly': True}, + } + + _attribute_map = { + 'segment_type': {'key': 'segmentType', 'type': 'str'}, + 'percentage': {'key': 'percentage', 'type': 'float'}, + } + + def __init__(self, **kwargs) -> None: + super(ComplianceSegment, self).__init__(**kwargs) + self.segment_type = None + self.percentage = None + + +class ConnectableResource(Model): + """Describes the allowed inbound and outbound traffic of an Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The Azure resource id + :vartype id: str + :ivar inbound_connected_resources: The list of Azure resources that the + resource has inbound allowed connection from + :vartype inbound_connected_resources: + list[~azure.mgmt.security.models.ConnectedResource] + :ivar outbound_connected_resources: The list of Azure resources that the + resource has outbound allowed connection to + :vartype outbound_connected_resources: + list[~azure.mgmt.security.models.ConnectedResource] + """ + + _validation = { + 'id': {'readonly': True}, + 'inbound_connected_resources': {'readonly': True}, + 'outbound_connected_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'inbound_connected_resources': {'key': 'inboundConnectedResources', 'type': '[ConnectedResource]'}, + 'outbound_connected_resources': {'key': 'outboundConnectedResources', 'type': '[ConnectedResource]'}, + } + + def __init__(self, **kwargs) -> None: + super(ConnectableResource, self).__init__(**kwargs) + self.id = None + self.inbound_connected_resources = None + self.outbound_connected_resources = None + + +class ConnectedResource(Model): + """Describes properties of a connected resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar connected_resource_id: The Azure resource id of the connected + resource + :vartype connected_resource_id: str + :ivar tcp_ports: The allowed tcp ports + :vartype tcp_ports: str + :ivar udp_ports: The allowed udp ports + :vartype udp_ports: str + """ + + _validation = { + 'connected_resource_id': {'readonly': True}, + 'tcp_ports': {'readonly': True}, + 'udp_ports': {'readonly': True}, + } + + _attribute_map = { + 'connected_resource_id': {'key': 'connectedResourceId', 'type': 'str'}, + 'tcp_ports': {'key': 'tcpPorts', 'type': 'str'}, + 'udp_ports': {'key': 'udpPorts', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ConnectedResource, self).__init__(**kwargs) + self.connected_resource_id = None + self.tcp_ports = None + self.udp_ports = None + + +class ConnectedWorkspace(Model): + """Represents an OMS workspace to which the solution is connected. + + :param id: Azure resource ID of the connected OMS workspace + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(ConnectedWorkspace, self).__init__(**kwargs) + self.id = id + + +class SettingResource(Resource): + """The kind of the security setting. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param kind: Required. the kind of the settings string + (DataExportSetting). Possible values include: 'DataExportSetting', + 'AlertSuppressionSetting' + :type kind: str or ~azure.mgmt.security.models.SettingKind + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, kind, **kwargs) -> None: + super(SettingResource, self).__init__(**kwargs) + self.kind = kind + + +class Setting(SettingResource): + """Represents a security setting in Azure Security Center. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param kind: Required. the kind of the settings string + (DataExportSetting). Possible values include: 'DataExportSetting', + 'AlertSuppressionSetting' + :type kind: str or ~azure.mgmt.security.models.SettingKind + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, kind, **kwargs) -> None: + super(Setting, self).__init__(kind=kind, **kwargs) + + +class DataExportSetting(Setting): + """Represents a data export setting. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param kind: Required. the kind of the settings string + (DataExportSetting). Possible values include: 'DataExportSetting', + 'AlertSuppressionSetting' + :type kind: str or ~azure.mgmt.security.models.SettingKind + :param enabled: Required. Is the data export setting is enabled + :type enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'enabled': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__(self, *, kind, enabled: bool, **kwargs) -> None: + super(DataExportSetting, self).__init__(kind=kind, **kwargs) + self.enabled = enabled + + +class DiscoveredSecuritySolution(Model): + """DiscoveredSecuritySolution. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar location: Location where the resource is stored + :vartype location: str + :param security_family: Required. The security family of the discovered + solution. Possible values include: 'Waf', 'Ngfw', 'SaasWaf', 'Va' + :type security_family: str or ~azure.mgmt.security.models.SecurityFamily + :param offer: Required. The security solutions' image offer + :type offer: str + :param publisher: Required. The security solutions' image publisher + :type publisher: str + :param sku: Required. The security solutions' image sku + :type sku: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'security_family': {'required': True}, + 'offer': {'required': True}, + 'publisher': {'required': True}, + 'sku': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'security_family': {'key': 'properties.securityFamily', 'type': 'str'}, + 'offer': {'key': 'properties.offer', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'sku': {'key': 'properties.sku', 'type': 'str'}, + } + + def __init__(self, *, security_family, offer: str, publisher: str, sku: str, **kwargs) -> None: + super(DiscoveredSecuritySolution, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.security_family = security_family + self.offer = offer + self.publisher = publisher + self.sku = sku + + +class ExternalSecuritySolutionKind1(Model): + """Describes an Azure resource with kind. + + :param kind: The kind of the external solution. Possible values include: + 'CEF', 'ATA', 'AAD' + :type kind: str or + ~azure.mgmt.security.models.ExternalSecuritySolutionKind + """ + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, kind=None, **kwargs) -> None: + super(ExternalSecuritySolutionKind1, self).__init__(**kwargs) + self.kind = kind + + +class InformationProtectionKeyword(Model): + """The information type keyword. + + :param pattern: The keyword pattern. + :type pattern: str + :param custom: Indicates whether the keyword is custom or not. + :type custom: bool + :param can_be_numeric: Indicates whether the keyword can be applied on + numeric types or not. + :type can_be_numeric: bool + :param excluded: Indicates whether the keyword is excluded or not. + :type excluded: bool + """ + + _attribute_map = { + 'pattern': {'key': 'pattern', 'type': 'str'}, + 'custom': {'key': 'custom', 'type': 'bool'}, + 'can_be_numeric': {'key': 'canBeNumeric', 'type': 'bool'}, + 'excluded': {'key': 'excluded', 'type': 'bool'}, + } + + def __init__(self, *, pattern: str=None, custom: bool=None, can_be_numeric: bool=None, excluded: bool=None, **kwargs) -> None: + super(InformationProtectionKeyword, self).__init__(**kwargs) + self.pattern = pattern + self.custom = custom + self.can_be_numeric = can_be_numeric + self.excluded = excluded + + +class InformationProtectionPolicy(Resource): + """Information protection policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar last_modified_utc: Describes the last UTC time the policy was + modified. + :vartype last_modified_utc: datetime + :param labels: Dictionary of sensitivity labels. + :type labels: dict[str, ~azure.mgmt.security.models.SensitivityLabel] + :param information_types: The sensitivity information types. + :type information_types: dict[str, + ~azure.mgmt.security.models.InformationType] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_modified_utc': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'last_modified_utc': {'key': 'properties.lastModifiedUtc', 'type': 'iso-8601'}, + 'labels': {'key': 'properties.labels', 'type': '{SensitivityLabel}'}, + 'information_types': {'key': 'properties.informationTypes', 'type': '{InformationType}'}, + } + + def __init__(self, *, labels=None, information_types=None, **kwargs) -> None: + super(InformationProtectionPolicy, self).__init__(**kwargs) + self.last_modified_utc = None + self.labels = labels + self.information_types = information_types + + +class InformationType(Model): + """The information type. + + :param display_name: The name of the information type. + :type display_name: str + :param order: The order of the information type. + :type order: float + :param recommended_label_id: The recommended label id to be associated + with this information type. + :type recommended_label_id: str + :param enabled: Indicates whether the information type is enabled or not. + :type enabled: bool + :param custom: Indicates whether the information type is custom or not. + :type custom: bool + :param keywords: The information type keywords. + :type keywords: + list[~azure.mgmt.security.models.InformationProtectionKeyword] + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'float'}, + 'recommended_label_id': {'key': 'recommendedLabelId', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'custom': {'key': 'custom', 'type': 'bool'}, + 'keywords': {'key': 'keywords', 'type': '[InformationProtectionKeyword]'}, + } + + def __init__(self, *, display_name: str=None, order: float=None, recommended_label_id: str=None, enabled: bool=None, custom: bool=None, keywords=None, **kwargs) -> None: + super(InformationType, self).__init__(**kwargs) + self.display_name = display_name + self.order = order + self.recommended_label_id = recommended_label_id + self.enabled = enabled + self.custom = custom + self.keywords = keywords + + +class IoTSecurityAggregatedAlert(Model): + """Security Solution Aggregated Alert information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar alert_type: Name of the alert type + :vartype alert_type: str + :ivar alert_display_name: Display name of the alert type + :vartype alert_display_name: str + :ivar aggregated_date_utc: The date the incidents were detected by the + vendor + :vartype aggregated_date_utc: date + :ivar vendor_name: Name of the vendor that discovered the incident + :vartype vendor_name: str + :ivar reported_severity: Estimated severity of this alert. Possible values + include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar remediation_steps: Recommended steps for remediation + :vartype remediation_steps: str + :ivar description: Description of the incident and what it means + :vartype description: str + :ivar count: Occurrence number of the alert within the aggregated date + :vartype count: int + :ivar effected_resource_type: Azure resource ID of the resource that got + the alerts + :vartype effected_resource_type: str + :ivar system_source: The type of the alerted resource (Azure, Non-Azure) + :vartype system_source: str + :ivar action_taken: The action that was taken as a response to the alert + (Active, Blocked etc.) + :vartype action_taken: str + :ivar log_analytics_query: query in log analytics to get the list of + affected devices/alerts + :vartype log_analytics_query: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'alert_type': {'readonly': True}, + 'alert_display_name': {'readonly': True}, + 'aggregated_date_utc': {'readonly': True}, + 'vendor_name': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'remediation_steps': {'readonly': True}, + 'description': {'readonly': True}, + 'count': {'readonly': True}, + 'effected_resource_type': {'readonly': True}, + 'system_source': {'readonly': True}, + 'action_taken': {'readonly': True}, + 'log_analytics_query': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'alert_type': {'key': 'properties.alertType', 'type': 'str'}, + 'alert_display_name': {'key': 'properties.alertDisplayName', 'type': 'str'}, + 'aggregated_date_utc': {'key': 'properties.aggregatedDateUtc', 'type': 'date'}, + 'vendor_name': {'key': 'properties.vendorName', 'type': 'str'}, + 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, + 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'count': {'key': 'properties.count', 'type': 'int'}, + 'effected_resource_type': {'key': 'properties.effectedResourceType', 'type': 'str'}, + 'system_source': {'key': 'properties.systemSource', 'type': 'str'}, + 'action_taken': {'key': 'properties.actionTaken', 'type': 'str'}, + 'log_analytics_query': {'key': 'properties.logAnalyticsQuery', 'type': 'str'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(IoTSecurityAggregatedAlert, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = tags + self.alert_type = None + self.alert_display_name = None + self.aggregated_date_utc = None + self.vendor_name = None + self.reported_severity = None + self.remediation_steps = None + self.description = None + self.count = None + self.effected_resource_type = None + self.system_source = None + self.action_taken = None + self.log_analytics_query = None + + +class IoTSecurityAggregatedRecommendation(Model): + """Security Solution Recommendation Information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :param recommendation_name: Name of the recommendation + :type recommendation_name: str + :ivar recommendation_display_name: Display name of the recommendation + type. + :vartype recommendation_display_name: str + :ivar description: Description of the incident and what it means + :vartype description: str + :ivar recommendation_type_id: The recommendation-type GUID. + :vartype recommendation_type_id: str + :ivar detected_by: Name of the vendor that discovered the issue + :vartype detected_by: str + :ivar remediation_steps: Recommended steps for remediation + :vartype remediation_steps: str + :ivar reported_severity: Estimated severity of this recommendation. + Possible values include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar healthy_devices: the number of the healthy devices within the + solution + :vartype healthy_devices: int + :ivar unhealthy_device_count: the number of the unhealthy devices within + the solution + :vartype unhealthy_device_count: int + :ivar log_analytics_query: query in log analytics to get the list of + affected devices/alerts + :vartype log_analytics_query: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'recommendation_display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'recommendation_type_id': {'readonly': True}, + 'detected_by': {'readonly': True}, + 'remediation_steps': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'healthy_devices': {'readonly': True}, + 'unhealthy_device_count': {'readonly': True}, + 'log_analytics_query': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'recommendation_name': {'key': 'properties.recommendationName', 'type': 'str'}, + 'recommendation_display_name': {'key': 'properties.recommendationDisplayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'recommendation_type_id': {'key': 'properties.recommendationTypeId', 'type': 'str'}, + 'detected_by': {'key': 'properties.detectedBy', 'type': 'str'}, + 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, + 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, + 'healthy_devices': {'key': 'properties.healthyDevices', 'type': 'int'}, + 'unhealthy_device_count': {'key': 'properties.unhealthyDeviceCount', 'type': 'int'}, + 'log_analytics_query': {'key': 'properties.logAnalyticsQuery', 'type': 'str'}, + } + + def __init__(self, *, tags=None, recommendation_name: str=None, **kwargs) -> None: + super(IoTSecurityAggregatedRecommendation, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = tags + self.recommendation_name = recommendation_name + self.recommendation_display_name = None + self.description = None + self.recommendation_type_id = None + self.detected_by = None + self.remediation_steps = None + self.reported_severity = None + self.healthy_devices = None + self.unhealthy_device_count = None + self.log_analytics_query = None + + +class IoTSecurityAlertedDevice(Model): + """Statistic information about the number of alerts per device during the last + period. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar device_id: Name of the alert type + :vartype device_id: str + :ivar alerts_count: the number of alerts raised for this device + :vartype alerts_count: int + """ + + _validation = { + 'device_id': {'readonly': True}, + 'alerts_count': {'readonly': True}, + } + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'alerts_count': {'key': 'alertsCount', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(IoTSecurityAlertedDevice, self).__init__(**kwargs) + self.device_id = None + self.alerts_count = None + + +class IoTSecurityAlertedDevicesList(Model): + """List of devices with the count of raised alerts. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of aggregated alerts data + :type value: list[~azure.mgmt.security.models.IoTSecurityAlertedDevice] + :ivar next_link: The URI to fetch the next page. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecurityAlertedDevice]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value, **kwargs) -> None: + super(IoTSecurityAlertedDevicesList, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class IoTSecurityDeviceAlert(Model): + """Statistic information about the number of alerts per alert type during the + last period. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar alert_display_name: Display name of the alert + :vartype alert_display_name: str + :ivar reported_severity: Estimated severity of this alert. Possible values + include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar alerts_count: the number of alerts raised for this alert type + :vartype alerts_count: int + """ + + _validation = { + 'alert_display_name': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'alerts_count': {'readonly': True}, + } + + _attribute_map = { + 'alert_display_name': {'key': 'alertDisplayName', 'type': 'str'}, + 'reported_severity': {'key': 'reportedSeverity', 'type': 'str'}, + 'alerts_count': {'key': 'alertsCount', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(IoTSecurityDeviceAlert, self).__init__(**kwargs) + self.alert_display_name = None + self.reported_severity = None + self.alerts_count = None + + +class IoTSecurityDeviceAlertsList(Model): + """List of alerts with the count of raised alerts. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of top alerts data + :type value: list[~azure.mgmt.security.models.IoTSecurityDeviceAlert] + :ivar next_link: The URI to fetch the next page. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecurityDeviceAlert]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value, **kwargs) -> None: + super(IoTSecurityDeviceAlertsList, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class IoTSecurityDeviceRecommendation(Model): + """Statistic information about the number of recommendations per + recommendation type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar recommendation_display_name: Display name of the recommendation + :vartype recommendation_display_name: str + :ivar reported_severity: Estimated severity of this recommendation. + Possible values include: 'Informational', 'Low', 'Medium', 'High' + :vartype reported_severity: str or + ~azure.mgmt.security.models.ReportedSeverity + :ivar devices_count: the number of device with this recommendation + :vartype devices_count: int + """ + + _validation = { + 'recommendation_display_name': {'readonly': True}, + 'reported_severity': {'readonly': True}, + 'devices_count': {'readonly': True}, + } + + _attribute_map = { + 'recommendation_display_name': {'key': 'recommendationDisplayName', 'type': 'str'}, + 'reported_severity': {'key': 'reportedSeverity', 'type': 'str'}, + 'devices_count': {'key': 'devicesCount', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(IoTSecurityDeviceRecommendation, self).__init__(**kwargs) + self.recommendation_display_name = None + self.reported_severity = None + self.devices_count = None + + +class IoTSecurityDeviceRecommendationsList(Model): + """List of recommendations with the count of devices. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of aggregated recommendation data + :type value: + list[~azure.mgmt.security.models.IoTSecurityDeviceRecommendation] + :ivar next_link: The URI to fetch the next page. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecurityDeviceRecommendation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value, **kwargs) -> None: + super(IoTSecurityDeviceRecommendationsList, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class IoTSecuritySolutionAnalyticsModel(Resource): + """Security Analytics of a security solution. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar metrics: Security Analytics of a security solution + :vartype metrics: ~azure.mgmt.security.models.IoTSeverityMetrics + :ivar unhealthy_device_count: number of unhealthy devices + :vartype unhealthy_device_count: int + :ivar devices_metrics: The list of devices metrics by the aggregated date. + :vartype devices_metrics: + list[~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem] + :param top_alerted_devices: The list of top 3 devices with the most + attacked. + :type top_alerted_devices: + ~azure.mgmt.security.models.IoTSecurityAlertedDevicesList + :param most_prevalent_device_alerts: The list of most prevalent 3 alerts. + :type most_prevalent_device_alerts: + ~azure.mgmt.security.models.IoTSecurityDeviceAlertsList + :param most_prevalent_device_recommendations: The list of most prevalent 3 + recommendations. + :type most_prevalent_device_recommendations: + ~azure.mgmt.security.models.IoTSecurityDeviceRecommendationsList + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'metrics': {'readonly': True}, + 'unhealthy_device_count': {'readonly': True}, + 'devices_metrics': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'metrics': {'key': 'properties.metrics', 'type': 'IoTSeverityMetrics'}, + 'unhealthy_device_count': {'key': 'properties.unhealthyDeviceCount', 'type': 'int'}, + 'devices_metrics': {'key': 'properties.devicesMetrics', 'type': '[IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem]'}, + 'top_alerted_devices': {'key': 'properties.topAlertedDevices', 'type': 'IoTSecurityAlertedDevicesList'}, + 'most_prevalent_device_alerts': {'key': 'properties.mostPrevalentDeviceAlerts', 'type': 'IoTSecurityDeviceAlertsList'}, + 'most_prevalent_device_recommendations': {'key': 'properties.mostPrevalentDeviceRecommendations', 'type': 'IoTSecurityDeviceRecommendationsList'}, + } + + def __init__(self, *, top_alerted_devices=None, most_prevalent_device_alerts=None, most_prevalent_device_recommendations=None, **kwargs) -> None: + super(IoTSecuritySolutionAnalyticsModel, self).__init__(**kwargs) + self.metrics = None + self.unhealthy_device_count = None + self.devices_metrics = None + self.top_alerted_devices = top_alerted_devices + self.most_prevalent_device_alerts = most_prevalent_device_alerts + self.most_prevalent_device_recommendations = most_prevalent_device_recommendations + + +class IoTSecuritySolutionAnalyticsModelList(Model): + """List of Security Analytics of a security solution. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of Security Analytics of a security solution + :type value: + list[~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModel] + :ivar next_link: The URI to fetch the next page. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IoTSecuritySolutionAnalyticsModel]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value, **kwargs) -> None: + super(IoTSecuritySolutionAnalyticsModelList, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem(Model): + """IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem. + + :param date_property: the date of the metrics + :type date_property: datetime + :param devices_metrics: devices alerts count by severity. + :type devices_metrics: ~azure.mgmt.security.models.IoTSeverityMetrics + """ + + _attribute_map = { + 'date_property': {'key': 'date', 'type': 'iso-8601'}, + 'devices_metrics': {'key': 'devicesMetrics', 'type': 'IoTSeverityMetrics'}, + } + + def __init__(self, *, date_property=None, devices_metrics=None, **kwargs) -> None: + super(IoTSecuritySolutionAnalyticsModelPropertiesDevicesMetricsItem, self).__init__(**kwargs) + self.date_property = date_property + self.devices_metrics = devices_metrics + + +class IoTSecuritySolutionModel(Model): + """Security Solution. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :param location: The resource location. + :type location: str + :param workspace: Required. Workspace resource ID + :type workspace: str + :param display_name: Required. Resource display name. + :type display_name: str + :param status: Security solution status. Possible values include: + 'Enabled', 'Disabled'. Default value: "Enabled" . + :type status: str or ~azure.mgmt.security.models.SecuritySolutionStatus + :param export: List of additional export to workspace data options + :type export: list[str or ~azure.mgmt.security.models.ExportData] + :param disabled_data_sources: Disabled data sources. Disabling these data + sources compromises the system. + :type disabled_data_sources: list[str or + ~azure.mgmt.security.models.DataSource] + :param iot_hubs: Required. IoT Hub resource IDs + :type iot_hubs: list[str] + :param user_defined_resources: + :type user_defined_resources: + ~azure.mgmt.security.models.UserDefinedResourcesProperties + :ivar auto_discovered_resources: List of resources that were automatically + discovered as relevant to the security solution. + :vartype auto_discovered_resources: list[str] + :param recommendations_configuration: + :type recommendations_configuration: + list[~azure.mgmt.security.models.RecommendationConfigurationProperties] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'workspace': {'required': True}, + 'display_name': {'required': True}, + 'iot_hubs': {'required': True}, + 'auto_discovered_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'workspace': {'key': 'properties.workspace', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'export': {'key': 'properties.export', 'type': '[str]'}, + 'disabled_data_sources': {'key': 'properties.disabledDataSources', 'type': '[str]'}, + 'iot_hubs': {'key': 'properties.iotHubs', 'type': '[str]'}, + 'user_defined_resources': {'key': 'properties.userDefinedResources', 'type': 'UserDefinedResourcesProperties'}, + 'auto_discovered_resources': {'key': 'properties.autoDiscoveredResources', 'type': '[str]'}, + 'recommendations_configuration': {'key': 'properties.recommendationsConfiguration', 'type': '[RecommendationConfigurationProperties]'}, + } + + def __init__(self, *, workspace: str, display_name: str, iot_hubs, tags=None, location: str=None, status="Enabled", export=None, disabled_data_sources=None, user_defined_resources=None, recommendations_configuration=None, **kwargs) -> None: + super(IoTSecuritySolutionModel, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = tags + self.location = location + self.workspace = workspace + self.display_name = display_name + self.status = status + self.export = export + self.disabled_data_sources = disabled_data_sources + self.iot_hubs = iot_hubs + self.user_defined_resources = user_defined_resources + self.auto_discovered_resources = None + self.recommendations_configuration = recommendations_configuration + + +class IoTSeverityMetrics(Model): + """Severity metrics. + + :param high: count of high severity items + :type high: int + :param medium: count of medium severity items + :type medium: int + :param low: count of low severity items + :type low: int + """ + + _attribute_map = { + 'high': {'key': 'high', 'type': 'int'}, + 'medium': {'key': 'medium', 'type': 'int'}, + 'low': {'key': 'low', 'type': 'int'}, + } + + def __init__(self, *, high: int=None, medium: int=None, low: int=None, **kwargs) -> None: + super(IoTSeverityMetrics, self).__init__(**kwargs) + self.high = high + self.medium = medium + self.low = low + + +class JitNetworkAccessPolicy(Model): + """JitNetworkAccessPolicy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param kind: Kind of the resource + :type kind: str + :ivar location: Location where the resource is stored + :vartype location: str + :param virtual_machines: Required. Configurations for + Microsoft.Compute/virtualMachines resource type. + :type virtual_machines: + list[~azure.mgmt.security.models.JitNetworkAccessPolicyVirtualMachine] + :param requests: + :type requests: list[~azure.mgmt.security.models.JitNetworkAccessRequest] + :ivar provisioning_state: Gets the provisioning state of the Just-in-Time + policy. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'virtual_machines': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[JitNetworkAccessPolicyVirtualMachine]'}, + 'requests': {'key': 'properties.requests', 'type': '[JitNetworkAccessRequest]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, virtual_machines, kind: str=None, requests=None, **kwargs) -> None: + super(JitNetworkAccessPolicy, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.kind = kind + self.location = None + self.virtual_machines = virtual_machines + self.requests = requests + self.provisioning_state = None + + +class JitNetworkAccessPolicyInitiatePort(Model): + """JitNetworkAccessPolicyInitiatePort. + + All required parameters must be populated in order to send to Azure. + + :param number: Required. + :type number: int + :param allowed_source_address_prefix: Source of the allowed traffic. If + omitted, the request will be for the source IP address of the initiate + request. + :type allowed_source_address_prefix: str + :param end_time_utc: Required. The time to close the request in UTC + :type end_time_utc: datetime + """ + + _validation = { + 'number': {'required': True}, + 'end_time_utc': {'required': True}, + } + + _attribute_map = { + 'number': {'key': 'number', 'type': 'int'}, + 'allowed_source_address_prefix': {'key': 'allowedSourceAddressPrefix', 'type': 'str'}, + 'end_time_utc': {'key': 'endTimeUtc', 'type': 'iso-8601'}, + } + + def __init__(self, *, number: int, end_time_utc, allowed_source_address_prefix: str=None, **kwargs) -> None: + super(JitNetworkAccessPolicyInitiatePort, self).__init__(**kwargs) + self.number = number + self.allowed_source_address_prefix = allowed_source_address_prefix + self.end_time_utc = end_time_utc + + +class JitNetworkAccessPolicyInitiateRequest(Model): + """JitNetworkAccessPolicyInitiateRequest. + + All required parameters must be populated in order to send to Azure. + + :param virtual_machines: Required. A list of virtual machines & ports to + open access for + :type virtual_machines: + list[~azure.mgmt.security.models.JitNetworkAccessPolicyInitiateVirtualMachine] + """ + + _validation = { + 'virtual_machines': {'required': True}, + } + + _attribute_map = { + 'virtual_machines': {'key': 'virtualMachines', 'type': '[JitNetworkAccessPolicyInitiateVirtualMachine]'}, + } + + def __init__(self, *, virtual_machines, **kwargs) -> None: + super(JitNetworkAccessPolicyInitiateRequest, self).__init__(**kwargs) + self.virtual_machines = virtual_machines + + +class JitNetworkAccessPolicyInitiateVirtualMachine(Model): + """JitNetworkAccessPolicyInitiateVirtualMachine. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource ID of the virtual machine that is linked to + this policy + :type id: str + :param ports: Required. The ports to open for the resource with the `id` + :type ports: + list[~azure.mgmt.security.models.JitNetworkAccessPolicyInitiatePort] + """ + + _validation = { + 'id': {'required': True}, + 'ports': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'ports': {'key': 'ports', 'type': '[JitNetworkAccessPolicyInitiatePort]'}, + } + + def __init__(self, *, id: str, ports, **kwargs) -> None: + super(JitNetworkAccessPolicyInitiateVirtualMachine, self).__init__(**kwargs) + self.id = id + self.ports = ports + + +class JitNetworkAccessPolicyVirtualMachine(Model): + """JitNetworkAccessPolicyVirtualMachine. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource ID of the virtual machine that is linked to + this policy + :type id: str + :param ports: Required. Port configurations for the virtual machine + :type ports: list[~azure.mgmt.security.models.JitNetworkAccessPortRule] + :param public_ip_address: Public IP address of the Azure Firewall that is + linked to this policy, if applicable + :type public_ip_address: str + """ + + _validation = { + 'id': {'required': True}, + 'ports': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'ports': {'key': 'ports', 'type': '[JitNetworkAccessPortRule]'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + } + + def __init__(self, *, id: str, ports, public_ip_address: str=None, **kwargs) -> None: + super(JitNetworkAccessPolicyVirtualMachine, self).__init__(**kwargs) + self.id = id + self.ports = ports + self.public_ip_address = public_ip_address + + +class JitNetworkAccessPortRule(Model): + """JitNetworkAccessPortRule. + + All required parameters must be populated in order to send to Azure. + + :param number: Required. + :type number: int + :param protocol: Required. Possible values include: 'TCP', 'UDP', 'All' + :type protocol: str or ~azure.mgmt.security.models.Protocol + :param allowed_source_address_prefix: Mutually exclusive with the + "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR, + for example "192.168.0.3" or "192.168.0.0/16". + :type allowed_source_address_prefix: str + :param allowed_source_address_prefixes: Mutually exclusive with the + "allowedSourceAddressPrefix" parameter. + :type allowed_source_address_prefixes: list[str] + :param max_request_access_duration: Required. Maximum duration requests + can be made for. In ISO 8601 duration format. Minimum 5 minutes, maximum 1 + day + :type max_request_access_duration: str + """ + + _validation = { + 'number': {'required': True}, + 'protocol': {'required': True}, + 'max_request_access_duration': {'required': True}, + } + + _attribute_map = { + 'number': {'key': 'number', 'type': 'int'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'allowed_source_address_prefix': {'key': 'allowedSourceAddressPrefix', 'type': 'str'}, + 'allowed_source_address_prefixes': {'key': 'allowedSourceAddressPrefixes', 'type': '[str]'}, + 'max_request_access_duration': {'key': 'maxRequestAccessDuration', 'type': 'str'}, + } + + def __init__(self, *, number: int, protocol, max_request_access_duration: str, allowed_source_address_prefix: str=None, allowed_source_address_prefixes=None, **kwargs) -> None: + super(JitNetworkAccessPortRule, self).__init__(**kwargs) + self.number = number + self.protocol = protocol + self.allowed_source_address_prefix = allowed_source_address_prefix + self.allowed_source_address_prefixes = allowed_source_address_prefixes + self.max_request_access_duration = max_request_access_duration + + +class JitNetworkAccessRequest(Model): + """JitNetworkAccessRequest. + + All required parameters must be populated in order to send to Azure. + + :param virtual_machines: Required. + :type virtual_machines: + list[~azure.mgmt.security.models.JitNetworkAccessRequestVirtualMachine] + :param start_time_utc: Required. The start time of the request in UTC + :type start_time_utc: datetime + :param requestor: Required. The identity of the person who made the + request + :type requestor: str + """ + + _validation = { + 'virtual_machines': {'required': True}, + 'start_time_utc': {'required': True}, + 'requestor': {'required': True}, + } + + _attribute_map = { + 'virtual_machines': {'key': 'virtualMachines', 'type': '[JitNetworkAccessRequestVirtualMachine]'}, + 'start_time_utc': {'key': 'startTimeUtc', 'type': 'iso-8601'}, + 'requestor': {'key': 'requestor', 'type': 'str'}, + } + + def __init__(self, *, virtual_machines, start_time_utc, requestor: str, **kwargs) -> None: + super(JitNetworkAccessRequest, self).__init__(**kwargs) + self.virtual_machines = virtual_machines + self.start_time_utc = start_time_utc + self.requestor = requestor + + +class JitNetworkAccessRequestPort(Model): + """JitNetworkAccessRequestPort. + + All required parameters must be populated in order to send to Azure. + + :param number: Required. + :type number: int + :param allowed_source_address_prefix: Mutually exclusive with the + "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR, + for example "192.168.0.3" or "192.168.0.0/16". + :type allowed_source_address_prefix: str + :param allowed_source_address_prefixes: Mutually exclusive with the + "allowedSourceAddressPrefix" parameter. + :type allowed_source_address_prefixes: list[str] + :param end_time_utc: Required. The date & time at which the request ends + in UTC + :type end_time_utc: datetime + :param status: Required. The status of the port. Possible values include: + 'Revoked', 'Initiated' + :type status: str or ~azure.mgmt.security.models.Status + :param status_reason: Required. A description of why the `status` has its + value. Possible values include: 'Expired', 'UserRequested', + 'NewerRequestInitiated' + :type status_reason: str or ~azure.mgmt.security.models.StatusReason + :param mapped_port: The port which is mapped to this port's `number` in + the Azure Firewall, if applicable + :type mapped_port: int + """ + + _validation = { + 'number': {'required': True}, + 'end_time_utc': {'required': True}, + 'status': {'required': True}, + 'status_reason': {'required': True}, + } + + _attribute_map = { + 'number': {'key': 'number', 'type': 'int'}, + 'allowed_source_address_prefix': {'key': 'allowedSourceAddressPrefix', 'type': 'str'}, + 'allowed_source_address_prefixes': {'key': 'allowedSourceAddressPrefixes', 'type': '[str]'}, + 'end_time_utc': {'key': 'endTimeUtc', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_reason': {'key': 'statusReason', 'type': 'str'}, + 'mapped_port': {'key': 'mappedPort', 'type': 'int'}, + } + + def __init__(self, *, number: int, end_time_utc, status, status_reason, allowed_source_address_prefix: str=None, allowed_source_address_prefixes=None, mapped_port: int=None, **kwargs) -> None: + super(JitNetworkAccessRequestPort, self).__init__(**kwargs) + self.number = number + self.allowed_source_address_prefix = allowed_source_address_prefix + self.allowed_source_address_prefixes = allowed_source_address_prefixes + self.end_time_utc = end_time_utc + self.status = status + self.status_reason = status_reason + self.mapped_port = mapped_port + + +class JitNetworkAccessRequestVirtualMachine(Model): + """JitNetworkAccessRequestVirtualMachine. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource ID of the virtual machine that is linked to + this policy + :type id: str + :param ports: Required. The ports that were opened for the virtual machine + :type ports: list[~azure.mgmt.security.models.JitNetworkAccessRequestPort] + """ + + _validation = { + 'id': {'required': True}, + 'ports': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'ports': {'key': 'ports', 'type': '[JitNetworkAccessRequestPort]'}, + } + + def __init__(self, *, id: str, ports, **kwargs) -> None: + super(JitNetworkAccessRequestVirtualMachine, self).__init__(**kwargs) + self.id = id + self.ports = ports + + +class Kind(Model): + """Describes an Azure resource with kind. + + :param kind: Kind of the resource + :type kind: str + """ + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, **kwargs) -> None: + super(Kind, self).__init__(**kwargs) + self.kind = kind + + +class Location(Model): + """Describes an Azure resource with location. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar location: Location where the resource is stored + :vartype location: str + """ + + _validation = { + 'location': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Location, self).__init__(**kwargs) + self.location = None + + +class Operation(Model): + """Possible operation in the REST API of Microsoft.Security. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of the operation + :vartype name: str + :ivar origin: Where the operation is originated + :vartype origin: str + :param display: + :type display: ~azure.mgmt.security.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + 'origin': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.origin = None + self.display = display + + +class OperationDisplay(Model): + """Security operation display. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: The resource provider for the operation. + :vartype provider: str + :ivar resource: The display name of the resource the operation applies to. + :vartype resource: str + :ivar operation: The display name of the security operation. + :vartype operation: str + :ivar description: The description of the operation. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class PathRecommendation(Model): + """Represents a path that is recommended to be allowed and its properties. + + :param path: The full path to whitelist + :type path: str + :param action: Possible values include: 'Recommended', 'Add', 'Remove' + :type action: str or ~azure.mgmt.security.models.enum + :param type: Possible values include: 'File', 'FileHash', + 'PublisherSignature', 'ProductSignature', 'BinarySignature', + 'VersionAndAboveSignature' + :type type: str or ~azure.mgmt.security.models.enum + :param publisher_info: + :type publisher_info: ~azure.mgmt.security.models.PublisherInfo + :param common: Whether the path is commonly run on the machine + :type common: bool + :param user_sids: + :type user_sids: list[str] + :param usernames: + :type usernames: list[~azure.mgmt.security.models.UserRecommendation] + :param file_type: Possible values include: 'Exe', 'Dll', 'Msi', 'Script', + 'Executable', 'Unknown' + :type file_type: str or ~azure.mgmt.security.models.enum + :param configuration_status: Possible values include: 'Configured', + 'NotConfigured', 'InProgress', 'Failed', 'NoStatus' + :type configuration_status: str or ~azure.mgmt.security.models.enum + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'publisher_info': {'key': 'publisherInfo', 'type': 'PublisherInfo'}, + 'common': {'key': 'common', 'type': 'bool'}, + 'user_sids': {'key': 'userSids', 'type': '[str]'}, + 'usernames': {'key': 'usernames', 'type': '[UserRecommendation]'}, + 'file_type': {'key': 'fileType', 'type': 'str'}, + 'configuration_status': {'key': 'configurationStatus', 'type': 'str'}, + } + + def __init__(self, *, path: str=None, action=None, type=None, publisher_info=None, common: bool=None, user_sids=None, usernames=None, file_type=None, configuration_status=None, **kwargs) -> None: + super(PathRecommendation, self).__init__(**kwargs) + self.path = path + self.action = action + self.type = type + self.publisher_info = publisher_info + self.common = common + self.user_sids = user_sids + self.usernames = usernames + self.file_type = file_type + self.configuration_status = configuration_status + + +class Pricing(Resource): + """Pricing tier will be applied for the scope based on the resource ID. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param pricing_tier: Required. The pricing tier value. Azure Security + Center is provided in two pricing tiers: free and standard, with the + standard tier available with a trial period. The standard tier offers + advanced security capabilities, while the free tier offers basic security + features. Possible values include: 'Free', 'Standard' + :type pricing_tier: str or ~azure.mgmt.security.models.PricingTier + :ivar free_trial_remaining_time: The duration left for the subscriptions + free trial period - in ISO 8601 format (e.g. P3Y6M4DT12H30M5S). + :vartype free_trial_remaining_time: timedelta + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'pricing_tier': {'required': True}, + 'free_trial_remaining_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'pricing_tier': {'key': 'properties.pricingTier', 'type': 'str'}, + 'free_trial_remaining_time': {'key': 'properties.freeTrialRemainingTime', 'type': 'duration'}, + } + + def __init__(self, *, pricing_tier, **kwargs) -> None: + super(Pricing, self).__init__(**kwargs) + self.pricing_tier = pricing_tier + self.free_trial_remaining_time = None + + +class PricingList(Model): + """List of pricing configurations response. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. List of pricing configurations + :type value: list[~azure.mgmt.security.models.Pricing] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Pricing]'}, + } + + def __init__(self, *, value, **kwargs) -> None: + super(PricingList, self).__init__(**kwargs) + self.value = value + + +class PublisherInfo(Model): + """Represents the publisher information of a process/rule. + + :param publisher_name: The Subject field of the x.509 certificate used to + sign the code, using the following fields - O = Organization, L = + Locality, S = State or Province, and C = Country + :type publisher_name: str + :param product_name: The product name taken from the file's version + resource + :type product_name: str + :param binary_name: The "OriginalName" field taken from the file's version + resource + :type binary_name: str + :param version: The binary file version taken from the file's version + resource + :type version: str + """ + + _attribute_map = { + 'publisher_name': {'key': 'publisherName', 'type': 'str'}, + 'product_name': {'key': 'productName', 'type': 'str'}, + 'binary_name': {'key': 'binaryName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, publisher_name: str=None, product_name: str=None, binary_name: str=None, version: str=None, **kwargs) -> None: + super(PublisherInfo, self).__init__(**kwargs) + self.publisher_name = publisher_name + self.product_name = product_name + self.binary_name = binary_name + self.version = version + + +class RecommendationConfigurationProperties(Model): + """Recommendation configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param recommendation_type: Required. The recommendation type. Possible + values include: 'IoT_ACRAuthentication', + 'IoT_AgentSendsUnutilizedMessages', 'IoT_Baseline', + 'IoT_EdgeHubMemOptimize', 'IoT_EdgeLoggingOptions', + 'IoT_InconsistentModuleSettings', 'IoT_InstallAgent', + 'IoT_IPFilter_DenyAll', 'IoT_IPFilter_PermissiveRule', 'IoT_OpenPorts', + 'IoT_PermissiveFirewallPolicy', 'IoT_PermissiveInputFirewallRules', + 'IoT_PermissiveOutputFirewallRules', 'IoT_PrivilegedDockerOptions', + 'IoT_SharedCredentials', 'IoT_VulnerableTLSCipherSuite' + :type recommendation_type: str or + ~azure.mgmt.security.models.RecommendationType + :ivar name: + :vartype name: str + :param status: Required. Recommendation status. The recommendation is not + generated when the status is disabled. Possible values include: + 'Disabled', 'Enabled'. Default value: "Enabled" . + :type status: str or + ~azure.mgmt.security.models.RecommendationConfigStatus + """ + + _validation = { + 'recommendation_type': {'required': True}, + 'name': {'readonly': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'recommendation_type': {'key': 'recommendationType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, *, recommendation_type, status="Enabled", **kwargs) -> None: + super(RecommendationConfigurationProperties, self).__init__(**kwargs) + self.recommendation_type = recommendation_type + self.name = None + self.status = status + + +class RegulatoryComplianceAssessment(Resource): + """Regulatory compliance assessment details and state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar description: The description of the regulatory compliance assessment + :vartype description: str + :ivar assessment_type: The expected type of assessment contained in the + AssessmentDetailsLink + :vartype assessment_type: str + :ivar assessment_details_link: Link to more detailed assessment results + data. The response type will be according to the assessmentType field + :vartype assessment_details_link: str + :param state: Aggregative state based on the assessment's scanned + resources states. Possible values include: 'Passed', 'Failed', 'Skipped', + 'Unsupported' + :type state: str or ~azure.mgmt.security.models.State + :ivar passed_resources: The given assessment's related resources count + with passed state. + :vartype passed_resources: int + :ivar failed_resources: The given assessment's related resources count + with failed state. + :vartype failed_resources: int + :ivar skipped_resources: The given assessment's related resources count + with skipped state. + :vartype skipped_resources: int + :ivar unsupported_resources: The given assessment's related resources + count with unsupported state. + :vartype unsupported_resources: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'readonly': True}, + 'assessment_type': {'readonly': True}, + 'assessment_details_link': {'readonly': True}, + 'passed_resources': {'readonly': True}, + 'failed_resources': {'readonly': True}, + 'skipped_resources': {'readonly': True}, + 'unsupported_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'assessment_type': {'key': 'properties.assessmentType', 'type': 'str'}, + 'assessment_details_link': {'key': 'properties.assessmentDetailsLink', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'passed_resources': {'key': 'properties.passedResources', 'type': 'int'}, + 'failed_resources': {'key': 'properties.failedResources', 'type': 'int'}, + 'skipped_resources': {'key': 'properties.skippedResources', 'type': 'int'}, + 'unsupported_resources': {'key': 'properties.unsupportedResources', 'type': 'int'}, + } + + def __init__(self, *, state=None, **kwargs) -> None: + super(RegulatoryComplianceAssessment, self).__init__(**kwargs) + self.description = None + self.assessment_type = None + self.assessment_details_link = None + self.state = state + self.passed_resources = None + self.failed_resources = None + self.skipped_resources = None + self.unsupported_resources = None + + +class RegulatoryComplianceControl(Resource): + """Regulatory compliance control details and state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar description: The description of the regulatory compliance control + :vartype description: str + :param state: Aggregative state based on the control's supported + assessments states. Possible values include: 'Passed', 'Failed', + 'Skipped', 'Unsupported' + :type state: str or ~azure.mgmt.security.models.State + :ivar passed_assessments: The number of supported regulatory compliance + assessments of the given control with a passed state + :vartype passed_assessments: int + :ivar failed_assessments: The number of supported regulatory compliance + assessments of the given control with a failed state + :vartype failed_assessments: int + :ivar skipped_assessments: The number of supported regulatory compliance + assessments of the given control with a skipped state + :vartype skipped_assessments: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'readonly': True}, + 'passed_assessments': {'readonly': True}, + 'failed_assessments': {'readonly': True}, + 'skipped_assessments': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'passed_assessments': {'key': 'properties.passedAssessments', 'type': 'int'}, + 'failed_assessments': {'key': 'properties.failedAssessments', 'type': 'int'}, + 'skipped_assessments': {'key': 'properties.skippedAssessments', 'type': 'int'}, + } + + def __init__(self, *, state=None, **kwargs) -> None: + super(RegulatoryComplianceControl, self).__init__(**kwargs) + self.description = None + self.state = state + self.passed_assessments = None + self.failed_assessments = None + self.skipped_assessments = None + + +class RegulatoryComplianceStandard(Resource): + """Regulatory compliance standard details and state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param state: Aggregative state based on the standard's supported controls + states. Possible values include: 'Passed', 'Failed', 'Skipped', + 'Unsupported' + :type state: str or ~azure.mgmt.security.models.State + :ivar passed_controls: The number of supported regulatory compliance + controls of the given standard with a passed state + :vartype passed_controls: int + :ivar failed_controls: The number of supported regulatory compliance + controls of the given standard with a failed state + :vartype failed_controls: int + :ivar skipped_controls: The number of supported regulatory compliance + controls of the given standard with a skipped state + :vartype skipped_controls: int + :ivar unsupported_controls: The number of regulatory compliance controls + of the given standard which are unsupported by automated assessments + :vartype unsupported_controls: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'passed_controls': {'readonly': True}, + 'failed_controls': {'readonly': True}, + 'skipped_controls': {'readonly': True}, + 'unsupported_controls': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'passed_controls': {'key': 'properties.passedControls', 'type': 'int'}, + 'failed_controls': {'key': 'properties.failedControls', 'type': 'int'}, + 'skipped_controls': {'key': 'properties.skippedControls', 'type': 'int'}, + 'unsupported_controls': {'key': 'properties.unsupportedControls', 'type': 'int'}, + } + + def __init__(self, *, state=None, **kwargs) -> None: + super(RegulatoryComplianceStandard, self).__init__(**kwargs) + self.state = state + self.passed_controls = None + self.failed_controls = None + self.skipped_controls = None + self.unsupported_controls = None + + +class SecurityContact(Resource): + """Contact details for security issues. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param email: Required. The email of this security contact + :type email: str + :param phone: The phone number of this security contact + :type phone: str + :param alert_notifications: Required. Whether to send security alerts + notifications to the security contact. Possible values include: 'On', + 'Off' + :type alert_notifications: str or + ~azure.mgmt.security.models.AlertNotifications + :param alerts_to_admins: Required. Whether to send security alerts + notifications to subscription admins. Possible values include: 'On', 'Off' + :type alerts_to_admins: str or ~azure.mgmt.security.models.AlertsToAdmins + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'email': {'required': True}, + 'alert_notifications': {'required': True}, + 'alerts_to_admins': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'email': {'key': 'properties.email', 'type': 'str'}, + 'phone': {'key': 'properties.phone', 'type': 'str'}, + 'alert_notifications': {'key': 'properties.alertNotifications', 'type': 'str'}, + 'alerts_to_admins': {'key': 'properties.alertsToAdmins', 'type': 'str'}, + } + + def __init__(self, *, email: str, alert_notifications, alerts_to_admins, phone: str=None, **kwargs) -> None: + super(SecurityContact, self).__init__(**kwargs) + self.email = email + self.phone = phone + self.alert_notifications = alert_notifications + self.alerts_to_admins = alerts_to_admins + + +class SecurityTask(Resource): + """Security task that we recommend to do in order to strengthen security. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar state: State of the task (Active, Resolved etc.) + :vartype state: str + :ivar creation_time_utc: The time this task was discovered in UTC + :vartype creation_time_utc: datetime + :param security_task_parameters: + :type security_task_parameters: + ~azure.mgmt.security.models.SecurityTaskParameters + :ivar last_state_change_time_utc: The time this task's details were last + changed in UTC + :vartype last_state_change_time_utc: datetime + :ivar sub_state: Additional data on the state of the task + :vartype sub_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'readonly': True}, + 'creation_time_utc': {'readonly': True}, + 'last_state_change_time_utc': {'readonly': True}, + 'sub_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'creation_time_utc': {'key': 'properties.creationTimeUtc', 'type': 'iso-8601'}, + 'security_task_parameters': {'key': 'properties.securityTaskParameters', 'type': 'SecurityTaskParameters'}, + 'last_state_change_time_utc': {'key': 'properties.lastStateChangeTimeUtc', 'type': 'iso-8601'}, + 'sub_state': {'key': 'properties.subState', 'type': 'str'}, + } + + def __init__(self, *, security_task_parameters=None, **kwargs) -> None: + super(SecurityTask, self).__init__(**kwargs) + self.state = None + self.creation_time_utc = None + self.security_task_parameters = security_task_parameters + self.last_state_change_time_utc = None + self.sub_state = None + + +class SecurityTaskParameters(Model): + """Changing set of properties, depending on the task type that is derived from + the name field. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar name: Name of the task type + :vartype name: str + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, additional_properties=None, **kwargs) -> None: + super(SecurityTaskParameters, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.name = None + + +class SensitivityLabel(Model): + """The sensitivity label. + + :param display_name: The name of the sensitivity label. + :type display_name: str + :param order: The order of the sensitivity label. + :type order: float + :param enabled: Indicates whether the label is enabled or not. + :type enabled: bool + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'float'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, *, display_name: str=None, order: float=None, enabled: bool=None, **kwargs) -> None: + super(SensitivityLabel, self).__init__(**kwargs) + self.display_name = display_name + self.order = order + self.enabled = enabled + + +class ServerVulnerabilityAssessment(Resource): + """Describes the server vulnerability assessment details on a resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar provisioning_state: The provisioningState of the vulnerability + assessment capability on the VM. Possible values include: 'Succeeded', + 'Failed', 'Canceled', 'Provisioning', 'Deprovisioning' + :vartype provisioning_state: str or ~azure.mgmt.security.models.enum + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ServerVulnerabilityAssessment, self).__init__(**kwargs) + self.provisioning_state = None + + +class ServerVulnerabilityAssessmentsList(Model): + """List of server vulnerability assessments. + + :param value: + :type value: + list[~azure.mgmt.security.models.ServerVulnerabilityAssessment] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ServerVulnerabilityAssessment]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(ServerVulnerabilityAssessmentsList, self).__init__(**kwargs) + self.value = value + + +class TagsResource(Model): + """A container holding only the Tags for a resource, allowing the user to + update the tags. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(TagsResource, self).__init__(**kwargs) + self.tags = tags + + +class TopologyResource(Model): + """TopologyResource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar location: Location where the resource is stored + :vartype location: str + :ivar calculated_date_time: The UTC time on which the topology was + calculated + :vartype calculated_date_time: datetime + :ivar topology_resources: Azure resources which are part of this topology + resource + :vartype topology_resources: + list[~azure.mgmt.security.models.TopologySingleResource] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'calculated_date_time': {'readonly': True}, + 'topology_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'calculated_date_time': {'key': 'properties.calculatedDateTime', 'type': 'iso-8601'}, + 'topology_resources': {'key': 'properties.topologyResources', 'type': '[TopologySingleResource]'}, + } + + def __init__(self, **kwargs) -> None: + super(TopologyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.calculated_date_time = None + self.topology_resources = None + + +class TopologySingleResource(Model): + """TopologySingleResource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_id: Azure resource id + :vartype resource_id: str + :ivar severity: The security severity of the resource + :vartype severity: str + :ivar recommendations_exist: Indicates if the resource has security + recommendations + :vartype recommendations_exist: bool + :ivar network_zones: Indicates the resource connectivity level to the + Internet (InternetFacing, Internal ,etc.) + :vartype network_zones: str + :ivar topology_score: Score of the resource based on its security severity + :vartype topology_score: int + :ivar location: The location of this resource + :vartype location: str + :ivar parents: Azure resources connected to this resource which are in + higher level in the topology view + :vartype parents: + list[~azure.mgmt.security.models.TopologySingleResourceParent] + :ivar children: Azure resources connected to this resource which are in + lower level in the topology view + :vartype children: + list[~azure.mgmt.security.models.TopologySingleResourceChild] + """ + + _validation = { + 'resource_id': {'readonly': True}, + 'severity': {'readonly': True}, + 'recommendations_exist': {'readonly': True}, + 'network_zones': {'readonly': True}, + 'topology_score': {'readonly': True}, + 'location': {'readonly': True}, + 'parents': {'readonly': True}, + 'children': {'readonly': True}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'severity': {'key': 'severity', 'type': 'str'}, + 'recommendations_exist': {'key': 'recommendationsExist', 'type': 'bool'}, + 'network_zones': {'key': 'networkZones', 'type': 'str'}, + 'topology_score': {'key': 'topologyScore', 'type': 'int'}, + 'location': {'key': 'location', 'type': 'str'}, + 'parents': {'key': 'parents', 'type': '[TopologySingleResourceParent]'}, + 'children': {'key': 'children', 'type': '[TopologySingleResourceChild]'}, + } + + def __init__(self, **kwargs) -> None: + super(TopologySingleResource, self).__init__(**kwargs) + self.resource_id = None + self.severity = None + self.recommendations_exist = None + self.network_zones = None + self.topology_score = None + self.location = None + self.parents = None + self.children = None + + +class TopologySingleResourceChild(Model): + """TopologySingleResourceChild. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_id: Azure resource id which serves as child resource in + topology view + :vartype resource_id: str + """ + + _validation = { + 'resource_id': {'readonly': True}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(TopologySingleResourceChild, self).__init__(**kwargs) + self.resource_id = None + + +class TopologySingleResourceParent(Model): + """TopologySingleResourceParent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_id: Azure resource id which serves as parent resource in + topology view + :vartype resource_id: str + """ + + _validation = { + 'resource_id': {'readonly': True}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(TopologySingleResourceParent, self).__init__(**kwargs) + self.resource_id = None + + +class UpdateIotSecuritySolutionData(TagsResource): + """UpdateIotSecuritySolutionData. + + :param tags: Resource tags + :type tags: dict[str, str] + :param user_defined_resources: + :type user_defined_resources: + ~azure.mgmt.security.models.UserDefinedResourcesProperties + :param recommendations_configuration: + :type recommendations_configuration: + list[~azure.mgmt.security.models.RecommendationConfigurationProperties] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'user_defined_resources': {'key': 'userDefinedResources', 'type': 'UserDefinedResourcesProperties'}, + 'recommendations_configuration': {'key': 'recommendationsConfiguration', 'type': '[RecommendationConfigurationProperties]'}, + } + + def __init__(self, *, tags=None, user_defined_resources=None, recommendations_configuration=None, **kwargs) -> None: + super(UpdateIotSecuritySolutionData, self).__init__(tags=tags, **kwargs) + self.user_defined_resources = user_defined_resources + self.recommendations_configuration = recommendations_configuration + + +class UserDefinedResourcesProperties(Model): + """Properties of the solution's user defined resources. + + All required parameters must be populated in order to send to Azure. + + :param query: Required. Azure Resource Graph query which represents the + security solution's user defined resources. Required to start with "where + type != "Microsoft.Devices/IotHubs"" + :type query: str + :param query_subscriptions: Required. List of Azure subscription ids on + which the user defined resources query should be executed. + :type query_subscriptions: list[str] + """ + + _validation = { + 'query': {'required': True}, + 'query_subscriptions': {'required': True}, + } + + _attribute_map = { + 'query': {'key': 'query', 'type': 'str'}, + 'query_subscriptions': {'key': 'querySubscriptions', 'type': '[str]'}, + } + + def __init__(self, *, query: str, query_subscriptions, **kwargs) -> None: + super(UserDefinedResourcesProperties, self).__init__(**kwargs) + self.query = query + self.query_subscriptions = query_subscriptions + + +class UserRecommendation(Model): + """Represents a user that is recommended to be allowed for a certain rule. + + :param username: Represents a user that is recommended to be allowed for a + certain rule + :type username: str + :param recommendation_action: Possible values include: 'Recommended', + 'Add', 'Remove' + :type recommendation_action: str or ~azure.mgmt.security.models.enum + """ + + _attribute_map = { + 'username': {'key': 'username', 'type': 'str'}, + 'recommendation_action': {'key': 'recommendationAction', 'type': 'str'}, + } + + def __init__(self, *, username: str=None, recommendation_action=None, **kwargs) -> None: + super(UserRecommendation, self).__init__(**kwargs) + self.username = username + self.recommendation_action = recommendation_action + + +class VmRecommendation(Model): + """Represents a machine that is part of a VM/server group. + + :param configuration_status: Possible values include: 'Configured', + 'NotConfigured', 'InProgress', 'Failed', 'NoStatus' + :type configuration_status: str or ~azure.mgmt.security.models.enum + :param recommendation_action: Possible values include: 'Recommended', + 'Add', 'Remove' + :type recommendation_action: str or ~azure.mgmt.security.models.enum + :param resource_id: + :type resource_id: str + """ + + _attribute_map = { + 'configuration_status': {'key': 'configurationStatus', 'type': 'str'}, + 'recommendation_action': {'key': 'recommendationAction', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + } + + def __init__(self, *, configuration_status=None, recommendation_action=None, resource_id: str=None, **kwargs) -> None: + super(VmRecommendation, self).__init__(**kwargs) + self.configuration_status = configuration_status + self.recommendation_action = recommendation_action + self.resource_id = resource_id + + +class WorkspaceSetting(Resource): + """Configures where to store the OMS agent data for workspaces under a scope. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param workspace_id: Required. The full Azure ID of the workspace to save + the data in + :type workspace_id: str + :param scope: Required. All the VMs in this scope will send their security + data to the mentioned workspace unless overridden by a setting with more + specific scope + :type scope: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'workspace_id': {'required': True}, + 'scope': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, + } + + def __init__(self, *, workspace_id: str, scope: str, **kwargs) -> None: + super(WorkspaceSetting, self).__init__(**kwargs) + self.workspace_id = workspace_id + self.scope = scope diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_paged_models.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_paged_models.py new file mode 100644 index 000000000000..83b9a26baf73 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_paged_models.py @@ -0,0 +1,300 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class ComplianceResultPaged(Paged): + """ + A paging container for iterating over a list of :class:`ComplianceResult ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ComplianceResult]'} + } + + def __init__(self, *args, **kwargs): + + super(ComplianceResultPaged, self).__init__(*args, **kwargs) +class AlertPaged(Paged): + """ + A paging container for iterating over a list of :class:`Alert ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Alert]'} + } + + def __init__(self, *args, **kwargs): + + super(AlertPaged, self).__init__(*args, **kwargs) +class SettingPaged(Paged): + """ + A paging container for iterating over a list of :class:`Setting ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Setting]'} + } + + def __init__(self, *args, **kwargs): + + super(SettingPaged, self).__init__(*args, **kwargs) +class AllowedConnectionsResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`AllowedConnectionsResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AllowedConnectionsResource]'} + } + + def __init__(self, *args, **kwargs): + + super(AllowedConnectionsResourcePaged, self).__init__(*args, **kwargs) +class DiscoveredSecuritySolutionPaged(Paged): + """ + A paging container for iterating over a list of :class:`DiscoveredSecuritySolution ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DiscoveredSecuritySolution]'} + } + + def __init__(self, *args, **kwargs): + + super(DiscoveredSecuritySolutionPaged, self).__init__(*args, **kwargs) +class ExternalSecuritySolutionPaged(Paged): + """ + A paging container for iterating over a list of :class:`ExternalSecuritySolution ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ExternalSecuritySolution]'} + } + + def __init__(self, *args, **kwargs): + + super(ExternalSecuritySolutionPaged, self).__init__(*args, **kwargs) +class JitNetworkAccessPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`JitNetworkAccessPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JitNetworkAccessPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(JitNetworkAccessPolicyPaged, self).__init__(*args, **kwargs) +class AscLocationPaged(Paged): + """ + A paging container for iterating over a list of :class:`AscLocation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AscLocation]'} + } + + def __init__(self, *args, **kwargs): + + super(AscLocationPaged, self).__init__(*args, **kwargs) +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class SecurityTaskPaged(Paged): + """ + A paging container for iterating over a list of :class:`SecurityTask ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SecurityTask]'} + } + + def __init__(self, *args, **kwargs): + + super(SecurityTaskPaged, self).__init__(*args, **kwargs) +class TopologyResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`TopologyResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TopologyResource]'} + } + + def __init__(self, *args, **kwargs): + + super(TopologyResourcePaged, self).__init__(*args, **kwargs) +class AutoProvisioningSettingPaged(Paged): + """ + A paging container for iterating over a list of :class:`AutoProvisioningSetting ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AutoProvisioningSetting]'} + } + + def __init__(self, *args, **kwargs): + + super(AutoProvisioningSettingPaged, self).__init__(*args, **kwargs) +class CompliancePaged(Paged): + """ + A paging container for iterating over a list of :class:`Compliance ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Compliance]'} + } + + def __init__(self, *args, **kwargs): + + super(CompliancePaged, self).__init__(*args, **kwargs) +class InformationProtectionPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`InformationProtectionPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[InformationProtectionPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(InformationProtectionPolicyPaged, self).__init__(*args, **kwargs) +class SecurityContactPaged(Paged): + """ + A paging container for iterating over a list of :class:`SecurityContact ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SecurityContact]'} + } + + def __init__(self, *args, **kwargs): + + super(SecurityContactPaged, self).__init__(*args, **kwargs) +class WorkspaceSettingPaged(Paged): + """ + A paging container for iterating over a list of :class:`WorkspaceSetting ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[WorkspaceSetting]'} + } + + def __init__(self, *args, **kwargs): + + super(WorkspaceSettingPaged, self).__init__(*args, **kwargs) +class IoTSecuritySolutionModelPaged(Paged): + """ + A paging container for iterating over a list of :class:`IoTSecuritySolutionModel ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[IoTSecuritySolutionModel]'} + } + + def __init__(self, *args, **kwargs): + + super(IoTSecuritySolutionModelPaged, self).__init__(*args, **kwargs) +class IoTSecurityAggregatedAlertPaged(Paged): + """ + A paging container for iterating over a list of :class:`IoTSecurityAggregatedAlert ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[IoTSecurityAggregatedAlert]'} + } + + def __init__(self, *args, **kwargs): + + super(IoTSecurityAggregatedAlertPaged, self).__init__(*args, **kwargs) +class IoTSecurityAggregatedRecommendationPaged(Paged): + """ + A paging container for iterating over a list of :class:`IoTSecurityAggregatedRecommendation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[IoTSecurityAggregatedRecommendation]'} + } + + def __init__(self, *args, **kwargs): + + super(IoTSecurityAggregatedRecommendationPaged, self).__init__(*args, **kwargs) +class RegulatoryComplianceStandardPaged(Paged): + """ + A paging container for iterating over a list of :class:`RegulatoryComplianceStandard ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RegulatoryComplianceStandard]'} + } + + def __init__(self, *args, **kwargs): + + super(RegulatoryComplianceStandardPaged, self).__init__(*args, **kwargs) +class RegulatoryComplianceControlPaged(Paged): + """ + A paging container for iterating over a list of :class:`RegulatoryComplianceControl ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RegulatoryComplianceControl]'} + } + + def __init__(self, *args, **kwargs): + + super(RegulatoryComplianceControlPaged, self).__init__(*args, **kwargs) +class RegulatoryComplianceAssessmentPaged(Paged): + """ + A paging container for iterating over a list of :class:`RegulatoryComplianceAssessment ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RegulatoryComplianceAssessment]'} + } + + def __init__(self, *args, **kwargs): + + super(RegulatoryComplianceAssessmentPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_security_center_enums.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_security_center_enums.py new file mode 100644 index 000000000000..553b23186654 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/_security_center_enums.py @@ -0,0 +1,156 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class ResourceStatus(str, Enum): + + healthy = "Healthy" #: This assessment on the resource is healthy + not_applicable = "NotApplicable" #: This assessment is not applicable to this resource + off_by_policy = "OffByPolicy" #: This assessment is turned off by policy on this subscription + not_healthy = "NotHealthy" #: This assessment on the resource is not healthy + + +class PricingTier(str, Enum): + + free = "Free" #: Get free Azure security center experience with basic security features + standard = "Standard" #: Get the standard Azure security center experience with advanced security features + + +class ReportedSeverity(str, Enum): + + informational = "Informational" + low = "Low" + medium = "Medium" + high = "High" + + +class SettingKind(str, Enum): + + data_export_setting = "DataExportSetting" + alert_suppression_setting = "AlertSuppressionSetting" + + +class SecurityFamily(str, Enum): + + waf = "Waf" + ngfw = "Ngfw" + saas_waf = "SaasWaf" + va = "Va" + + +class AadConnectivityState(str, Enum): + + discovered = "Discovered" + not_licensed = "NotLicensed" + connected = "Connected" + + +class ExternalSecuritySolutionKind(str, Enum): + + cef = "CEF" + ata = "ATA" + aad = "AAD" + + +class Protocol(str, Enum): + + tcp = "TCP" + udp = "UDP" + all = "*" + + +class Status(str, Enum): + + revoked = "Revoked" + initiated = "Initiated" + + +class StatusReason(str, Enum): + + expired = "Expired" + user_requested = "UserRequested" + newer_request_initiated = "NewerRequestInitiated" + + +class AutoProvision(str, Enum): + + on = "On" #: Install missing security agent on VMs automatically + off = "Off" #: Do not install security agent on the VMs automatically + + +class AlertNotifications(str, Enum): + + on = "On" #: Get notifications on new alerts + off = "Off" #: Don't get notifications on new alerts + + +class AlertsToAdmins(str, Enum): + + on = "On" #: Send notification on new alerts to the subscription's admins + off = "Off" #: Don't send notification on new alerts to the subscription's admins + + +class SecuritySolutionStatus(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + +class ExportData(str, Enum): + + raw_events = "RawEvents" #: Agent raw events + + +class DataSource(str, Enum): + + twin_data = "TwinData" #: Devices twin data + + +class RecommendationType(str, Enum): + + io_t_acrauthentication = "IoT_ACRAuthentication" #: Authentication schema used for pull an edge module from an ACR repository does not use Service Principal Authentication. + io_t_agent_sends_unutilized_messages = "IoT_AgentSendsUnutilizedMessages" #: IoT agent message size capacity is currently underutilized, causing an increase in the number of sent messages. Adjust message intervals for better utilization. + io_t_baseline = "IoT_Baseline" #: Identified security related system configuration issues. + io_t_edge_hub_mem_optimize = "IoT_EdgeHubMemOptimize" #: You can optimize Edge Hub memory usage by turning off protocol heads for any protocols not used by Edge modules in your solution. + io_t_edge_logging_options = "IoT_EdgeLoggingOptions" #: Logging is disabled for this edge module. + io_t_inconsistent_module_settings = "IoT_InconsistentModuleSettings" #: A minority within a device security group has inconsistent Edge Module settings with the rest of their group. + io_t_install_agent = "IoT_InstallAgent" #: Install the Azure Security of Things Agent. + io_t_ipfilter_deny_all = "IoT_IPFilter_DenyAll" #: IP Filter Configuration should have rules defined for allowed traffic and should deny all other traffic by default. + io_t_ipfilter_permissive_rule = "IoT_IPFilter_PermissiveRule" #: An Allow IP Filter rules source IP range is too large. Overly permissive rules might expose your IoT hub to malicious intenders. + io_t_open_ports = "IoT_OpenPorts" #: A listening endpoint was found on the device. + io_t_permissive_firewall_policy = "IoT_PermissiveFirewallPolicy" #: An Allowed firewall policy was found (INPUT/OUTPUT). The policy should Deny all traffic by default and define rules to allow necessary communication to/from the device. + io_t_permissive_input_firewall_rules = "IoT_PermissiveInputFirewallRules" #: A rule in the firewall has been found that contains a permissive pattern for a wide range of IP addresses or Ports. + io_t_permissive_output_firewall_rules = "IoT_PermissiveOutputFirewallRules" #: A rule in the firewall has been found that contains a permissive pattern for a wide range of IP addresses or Ports. + io_t_privileged_docker_options = "IoT_PrivilegedDockerOptions" #: Edge module is configured to run in privileged mode, with extensive Linux capabilities or with host-level network access (send/receive data to host machine). + io_t_shared_credentials = "IoT_SharedCredentials" #: Same authentication credentials to the IoT Hub used by multiple devices. This could indicate an illegitimate device impersonating a legitimate device. It also exposes the risk of device impersonation by an attacker. + io_t_vulnerable_tls_cipher_suite = "IoT_VulnerableTLSCipherSuite" #: Insecure TLS configurations detected. Immediate upgrade recommended. + + +class RecommendationConfigStatus(str, Enum): + + disabled = "Disabled" + enabled = "Enabled" + + +class State(str, Enum): + + passed = "Passed" #: All supported regulatory compliance controls in the given standard have a passed state + failed = "Failed" #: At least one supported regulatory compliance control in the given standard has a state of failed + skipped = "Skipped" #: All supported regulatory compliance controls in the given standard have a state of skipped + unsupported = "Unsupported" #: No supported regulatory compliance data for the given standard + + +class ConnectionType(str, Enum): + + internal = "Internal" + external = "External" diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_connectivity_state1.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_connectivity_state1.py deleted file mode 100644 index 7feb6e549272..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_connectivity_state1.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AadConnectivityState1(Model): - """Describes an Azure resource with kind. - - :param connectivity_state: The connectivity state of the external AAD - solution . Possible values include: 'Discovered', 'NotLicensed', - 'Connected' - :type connectivity_state: str or - ~azure.mgmt.security.models.AadConnectivityState - """ - - _attribute_map = { - 'connectivity_state': {'key': 'connectivityState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AadConnectivityState1, self).__init__(**kwargs) - self.connectivity_state = kwargs.get('connectivity_state', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_connectivity_state1_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_connectivity_state1_py3.py deleted file mode 100644 index 7c699ec9d77e..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_connectivity_state1_py3.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AadConnectivityState1(Model): - """Describes an Azure resource with kind. - - :param connectivity_state: The connectivity state of the external AAD - solution . Possible values include: 'Discovered', 'NotLicensed', - 'Connected' - :type connectivity_state: str or - ~azure.mgmt.security.models.AadConnectivityState - """ - - _attribute_map = { - 'connectivity_state': {'key': 'connectivityState', 'type': 'str'}, - } - - def __init__(self, *, connectivity_state=None, **kwargs) -> None: - super(AadConnectivityState1, self).__init__(**kwargs) - self.connectivity_state = connectivity_state diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_external_security_solution.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_external_security_solution.py deleted file mode 100644 index da55d84dfdad..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_external_security_solution.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .external_security_solution import ExternalSecuritySolution - - -class AadExternalSecuritySolution(ExternalSecuritySolution): - """Represents an AAD identity protection solution which sends logs to an OMS - workspace. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar location: Location where the resource is stored - :vartype location: str - :param kind: Required. Constant filled by server. - :type kind: str - :param properties: - :type properties: ~azure.mgmt.security.models.AadSolutionProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AadSolutionProperties'}, - } - - def __init__(self, **kwargs): - super(AadExternalSecuritySolution, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.kind = 'AAD' diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_external_security_solution_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_external_security_solution_py3.py deleted file mode 100644 index 893a2efac215..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_external_security_solution_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .external_security_solution_py3 import ExternalSecuritySolution - - -class AadExternalSecuritySolution(ExternalSecuritySolution): - """Represents an AAD identity protection solution which sends logs to an OMS - workspace. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar location: Location where the resource is stored - :vartype location: str - :param kind: Required. Constant filled by server. - :type kind: str - :param properties: - :type properties: ~azure.mgmt.security.models.AadSolutionProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AadSolutionProperties'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(AadExternalSecuritySolution, self).__init__(**kwargs) - self.properties = properties - self.kind = 'AAD' diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_solution_properties.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_solution_properties.py deleted file mode 100644 index 44c62d15869c..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_solution_properties.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AadSolutionProperties(Model): - """The external security solution properties for AAD solutions. - - :param device_vendor: - :type device_vendor: str - :param device_type: - :type device_type: str - :param workspace: - :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace - :param connectivity_state: The connectivity state of the external AAD - solution . Possible values include: 'Discovered', 'NotLicensed', - 'Connected' - :type connectivity_state: str or - ~azure.mgmt.security.models.AadConnectivityState - """ - - _attribute_map = { - 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, - 'device_type': {'key': 'deviceType', 'type': 'str'}, - 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, - 'connectivity_state': {'key': 'connectivityState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AadSolutionProperties, self).__init__(**kwargs) - self.device_vendor = kwargs.get('device_vendor', None) - self.device_type = kwargs.get('device_type', None) - self.workspace = kwargs.get('workspace', None) - self.connectivity_state = kwargs.get('connectivity_state', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_solution_properties_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_solution_properties_py3.py deleted file mode 100644 index 4acc4804aa08..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/aad_solution_properties_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AadSolutionProperties(Model): - """The external security solution properties for AAD solutions. - - :param device_vendor: - :type device_vendor: str - :param device_type: - :type device_type: str - :param workspace: - :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace - :param connectivity_state: The connectivity state of the external AAD - solution . Possible values include: 'Discovered', 'NotLicensed', - 'Connected' - :type connectivity_state: str or - ~azure.mgmt.security.models.AadConnectivityState - """ - - _attribute_map = { - 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, - 'device_type': {'key': 'deviceType', 'type': 'str'}, - 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, - 'connectivity_state': {'key': 'connectivityState', 'type': 'str'}, - } - - def __init__(self, *, device_vendor: str=None, device_type: str=None, workspace=None, connectivity_state=None, **kwargs) -> None: - super(AadSolutionProperties, self).__init__(**kwargs) - self.device_vendor = device_vendor - self.device_type = device_type - self.workspace = workspace - self.connectivity_state = connectivity_state diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/advanced_threat_protection_setting.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/advanced_threat_protection_setting.py deleted file mode 100644 index 722352481320..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/advanced_threat_protection_setting.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class AdvancedThreatProtectionSetting(Resource): - """The Advanced Threat Protection resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param is_enabled: Indicates whether Advanced Threat Protection is - enabled. - :type is_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AdvancedThreatProtectionSetting, self).__init__(**kwargs) - self.is_enabled = kwargs.get('is_enabled', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/advanced_threat_protection_setting_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/advanced_threat_protection_setting_py3.py deleted file mode 100644 index 66ed9c5fe2ec..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/advanced_threat_protection_setting_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class AdvancedThreatProtectionSetting(Resource): - """The Advanced Threat Protection resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param is_enabled: Indicates whether Advanced Threat Protection is - enabled. - :type is_enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, - } - - def __init__(self, *, is_enabled: bool=None, **kwargs) -> None: - super(AdvancedThreatProtectionSetting, self).__init__(**kwargs) - self.is_enabled = is_enabled diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert.py deleted file mode 100644 index a467fe8ffcbb..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert.py +++ /dev/null @@ -1,165 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Alert(Resource): - """Security alert. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar state: State of the alert (Active, Dismissed etc.) - :vartype state: str - :ivar reported_time_utc: The time the incident was reported to - Microsoft.Security in UTC - :vartype reported_time_utc: datetime - :ivar vendor_name: Name of the vendor that discovered the incident - :vartype vendor_name: str - :ivar alert_name: Name of the alert type - :vartype alert_name: str - :ivar alert_display_name: Display name of the alert type - :vartype alert_display_name: str - :ivar detected_time_utc: The time the incident was detected by the vendor - :vartype detected_time_utc: datetime - :ivar description: Description of the incident and what it means - :vartype description: str - :ivar remediation_steps: Recommended steps to reradiate the incident - :vartype remediation_steps: str - :ivar action_taken: The action that was taken as a response to the alert - (Active, Blocked etc.) - :vartype action_taken: str - :ivar reported_severity: Estimated severity of this alert. Possible values - include: 'Informational', 'Low', 'Medium', 'High' - :vartype reported_severity: str or - ~azure.mgmt.security.models.ReportedSeverity - :ivar compromised_entity: The entity that the incident happened on - :vartype compromised_entity: str - :ivar associated_resource: Azure resource ID of the associated resource - :vartype associated_resource: str - :param extended_properties: - :type extended_properties: dict[str, object] - :ivar system_source: The type of the alerted resource (Azure, Non-Azure) - :vartype system_source: str - :ivar can_be_investigated: Whether this alert can be investigated with - Azure Security Center - :vartype can_be_investigated: bool - :ivar is_incident: Whether this alert is for incident type or not - (otherwise - single alert) - :vartype is_incident: bool - :param entities: objects that are related to this alerts - :type entities: list[~azure.mgmt.security.models.AlertEntity] - :ivar confidence_score: level of confidence we have on the alert - :vartype confidence_score: float - :param confidence_reasons: reasons the alert got the confidenceScore value - :type confidence_reasons: - list[~azure.mgmt.security.models.AlertConfidenceReason] - :ivar subscription_id: Azure subscription ID of the resource that had the - security alert or the subscription ID of the workspace that this resource - reports to - :vartype subscription_id: str - :ivar instance_id: Instance ID of the alert. - :vartype instance_id: str - :ivar workspace_arm_id: Azure resource ID of the workspace that the alert - was reported to. - :vartype workspace_arm_id: str - :ivar correlation_key: Alerts with the same CorrelationKey will be grouped - together in Ibiza. - :vartype correlation_key: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'readonly': True}, - 'reported_time_utc': {'readonly': True}, - 'vendor_name': {'readonly': True}, - 'alert_name': {'readonly': True}, - 'alert_display_name': {'readonly': True}, - 'detected_time_utc': {'readonly': True}, - 'description': {'readonly': True}, - 'remediation_steps': {'readonly': True}, - 'action_taken': {'readonly': True}, - 'reported_severity': {'readonly': True}, - 'compromised_entity': {'readonly': True}, - 'associated_resource': {'readonly': True}, - 'system_source': {'readonly': True}, - 'can_be_investigated': {'readonly': True}, - 'is_incident': {'readonly': True}, - 'confidence_score': {'readonly': True, 'maximum': 1, 'minimum': 0}, - 'subscription_id': {'readonly': True}, - 'instance_id': {'readonly': True}, - 'workspace_arm_id': {'readonly': True}, - 'correlation_key': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'reported_time_utc': {'key': 'properties.reportedTimeUtc', 'type': 'iso-8601'}, - 'vendor_name': {'key': 'properties.vendorName', 'type': 'str'}, - 'alert_name': {'key': 'properties.alertName', 'type': 'str'}, - 'alert_display_name': {'key': 'properties.alertDisplayName', 'type': 'str'}, - 'detected_time_utc': {'key': 'properties.detectedTimeUtc', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, - 'action_taken': {'key': 'properties.actionTaken', 'type': 'str'}, - 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, - 'compromised_entity': {'key': 'properties.compromisedEntity', 'type': 'str'}, - 'associated_resource': {'key': 'properties.associatedResource', 'type': 'str'}, - 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{object}'}, - 'system_source': {'key': 'properties.systemSource', 'type': 'str'}, - 'can_be_investigated': {'key': 'properties.canBeInvestigated', 'type': 'bool'}, - 'is_incident': {'key': 'properties.isIncident', 'type': 'bool'}, - 'entities': {'key': 'properties.entities', 'type': '[AlertEntity]'}, - 'confidence_score': {'key': 'properties.confidenceScore', 'type': 'float'}, - 'confidence_reasons': {'key': 'properties.confidenceReasons', 'type': '[AlertConfidenceReason]'}, - 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, - 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, - 'workspace_arm_id': {'key': 'properties.workspaceArmId', 'type': 'str'}, - 'correlation_key': {'key': 'properties.correlationKey', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Alert, self).__init__(**kwargs) - self.state = None - self.reported_time_utc = None - self.vendor_name = None - self.alert_name = None - self.alert_display_name = None - self.detected_time_utc = None - self.description = None - self.remediation_steps = None - self.action_taken = None - self.reported_severity = None - self.compromised_entity = None - self.associated_resource = None - self.extended_properties = kwargs.get('extended_properties', None) - self.system_source = None - self.can_be_investigated = None - self.is_incident = None - self.entities = kwargs.get('entities', None) - self.confidence_score = None - self.confidence_reasons = kwargs.get('confidence_reasons', None) - self.subscription_id = None - self.instance_id = None - self.workspace_arm_id = None - self.correlation_key = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_confidence_reason.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_confidence_reason.py deleted file mode 100644 index ddbfc3dae2ec..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_confidence_reason.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertConfidenceReason(Model): - """Factors that increase our confidence that the alert is a true positive. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar type: Type of confidence factor - :vartype type: str - :ivar reason: description of the confidence reason - :vartype reason: str - """ - - _validation = { - 'type': {'readonly': True}, - 'reason': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AlertConfidenceReason, self).__init__(**kwargs) - self.type = None - self.reason = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_confidence_reason_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_confidence_reason_py3.py deleted file mode 100644 index ff57f840a16d..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_confidence_reason_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertConfidenceReason(Model): - """Factors that increase our confidence that the alert is a true positive. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar type: Type of confidence factor - :vartype type: str - :ivar reason: description of the confidence reason - :vartype reason: str - """ - - _validation = { - 'type': {'readonly': True}, - 'reason': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(AlertConfidenceReason, self).__init__(**kwargs) - self.type = None - self.reason = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_entity.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_entity.py deleted file mode 100644 index 1dd8ca41529a..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_entity.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertEntity(Model): - """Changing set of properties depending on the entity type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar type: Type of entity - :vartype type: str - """ - - _validation = { - 'type': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AlertEntity, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.type = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_entity_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_entity_py3.py deleted file mode 100644 index 1f8de5415ff7..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_entity_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AlertEntity(Model): - """Changing set of properties depending on the entity type. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar type: Type of entity - :vartype type: str - """ - - _validation = { - 'type': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, **kwargs) -> None: - super(AlertEntity, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.type = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_paged.py deleted file mode 100644 index 8fd844916438..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class AlertPaged(Paged): - """ - A paging container for iterating over a list of :class:`Alert ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Alert]'} - } - - def __init__(self, *args, **kwargs): - - super(AlertPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_py3.py deleted file mode 100644 index 95007f9bb77a..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/alert_py3.py +++ /dev/null @@ -1,165 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Alert(Resource): - """Security alert. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar state: State of the alert (Active, Dismissed etc.) - :vartype state: str - :ivar reported_time_utc: The time the incident was reported to - Microsoft.Security in UTC - :vartype reported_time_utc: datetime - :ivar vendor_name: Name of the vendor that discovered the incident - :vartype vendor_name: str - :ivar alert_name: Name of the alert type - :vartype alert_name: str - :ivar alert_display_name: Display name of the alert type - :vartype alert_display_name: str - :ivar detected_time_utc: The time the incident was detected by the vendor - :vartype detected_time_utc: datetime - :ivar description: Description of the incident and what it means - :vartype description: str - :ivar remediation_steps: Recommended steps to reradiate the incident - :vartype remediation_steps: str - :ivar action_taken: The action that was taken as a response to the alert - (Active, Blocked etc.) - :vartype action_taken: str - :ivar reported_severity: Estimated severity of this alert. Possible values - include: 'Informational', 'Low', 'Medium', 'High' - :vartype reported_severity: str or - ~azure.mgmt.security.models.ReportedSeverity - :ivar compromised_entity: The entity that the incident happened on - :vartype compromised_entity: str - :ivar associated_resource: Azure resource ID of the associated resource - :vartype associated_resource: str - :param extended_properties: - :type extended_properties: dict[str, object] - :ivar system_source: The type of the alerted resource (Azure, Non-Azure) - :vartype system_source: str - :ivar can_be_investigated: Whether this alert can be investigated with - Azure Security Center - :vartype can_be_investigated: bool - :ivar is_incident: Whether this alert is for incident type or not - (otherwise - single alert) - :vartype is_incident: bool - :param entities: objects that are related to this alerts - :type entities: list[~azure.mgmt.security.models.AlertEntity] - :ivar confidence_score: level of confidence we have on the alert - :vartype confidence_score: float - :param confidence_reasons: reasons the alert got the confidenceScore value - :type confidence_reasons: - list[~azure.mgmt.security.models.AlertConfidenceReason] - :ivar subscription_id: Azure subscription ID of the resource that had the - security alert or the subscription ID of the workspace that this resource - reports to - :vartype subscription_id: str - :ivar instance_id: Instance ID of the alert. - :vartype instance_id: str - :ivar workspace_arm_id: Azure resource ID of the workspace that the alert - was reported to. - :vartype workspace_arm_id: str - :ivar correlation_key: Alerts with the same CorrelationKey will be grouped - together in Ibiza. - :vartype correlation_key: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'readonly': True}, - 'reported_time_utc': {'readonly': True}, - 'vendor_name': {'readonly': True}, - 'alert_name': {'readonly': True}, - 'alert_display_name': {'readonly': True}, - 'detected_time_utc': {'readonly': True}, - 'description': {'readonly': True}, - 'remediation_steps': {'readonly': True}, - 'action_taken': {'readonly': True}, - 'reported_severity': {'readonly': True}, - 'compromised_entity': {'readonly': True}, - 'associated_resource': {'readonly': True}, - 'system_source': {'readonly': True}, - 'can_be_investigated': {'readonly': True}, - 'is_incident': {'readonly': True}, - 'confidence_score': {'readonly': True, 'maximum': 1, 'minimum': 0}, - 'subscription_id': {'readonly': True}, - 'instance_id': {'readonly': True}, - 'workspace_arm_id': {'readonly': True}, - 'correlation_key': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'reported_time_utc': {'key': 'properties.reportedTimeUtc', 'type': 'iso-8601'}, - 'vendor_name': {'key': 'properties.vendorName', 'type': 'str'}, - 'alert_name': {'key': 'properties.alertName', 'type': 'str'}, - 'alert_display_name': {'key': 'properties.alertDisplayName', 'type': 'str'}, - 'detected_time_utc': {'key': 'properties.detectedTimeUtc', 'type': 'iso-8601'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'remediation_steps': {'key': 'properties.remediationSteps', 'type': 'str'}, - 'action_taken': {'key': 'properties.actionTaken', 'type': 'str'}, - 'reported_severity': {'key': 'properties.reportedSeverity', 'type': 'str'}, - 'compromised_entity': {'key': 'properties.compromisedEntity', 'type': 'str'}, - 'associated_resource': {'key': 'properties.associatedResource', 'type': 'str'}, - 'extended_properties': {'key': 'properties.extendedProperties', 'type': '{object}'}, - 'system_source': {'key': 'properties.systemSource', 'type': 'str'}, - 'can_be_investigated': {'key': 'properties.canBeInvestigated', 'type': 'bool'}, - 'is_incident': {'key': 'properties.isIncident', 'type': 'bool'}, - 'entities': {'key': 'properties.entities', 'type': '[AlertEntity]'}, - 'confidence_score': {'key': 'properties.confidenceScore', 'type': 'float'}, - 'confidence_reasons': {'key': 'properties.confidenceReasons', 'type': '[AlertConfidenceReason]'}, - 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, - 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, - 'workspace_arm_id': {'key': 'properties.workspaceArmId', 'type': 'str'}, - 'correlation_key': {'key': 'properties.correlationKey', 'type': 'str'}, - } - - def __init__(self, *, extended_properties=None, entities=None, confidence_reasons=None, **kwargs) -> None: - super(Alert, self).__init__(**kwargs) - self.state = None - self.reported_time_utc = None - self.vendor_name = None - self.alert_name = None - self.alert_display_name = None - self.detected_time_utc = None - self.description = None - self.remediation_steps = None - self.action_taken = None - self.reported_severity = None - self.compromised_entity = None - self.associated_resource = None - self.extended_properties = extended_properties - self.system_source = None - self.can_be_investigated = None - self.is_incident = None - self.entities = entities - self.confidence_score = None - self.confidence_reasons = confidence_reasons - self.subscription_id = None - self.instance_id = None - self.workspace_arm_id = None - self.correlation_key = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource.py deleted file mode 100644 index a33332d21a3a..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource.py +++ /dev/null @@ -1,63 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AllowedConnectionsResource(Model): - """The resource whose properties describes the allowed traffic between Azure - resources. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar location: Location where the resource is stored - :vartype location: str - :ivar calculated_date_time: The UTC time on which the allowed connections - resource was calculated - :vartype calculated_date_time: datetime - :ivar connectable_resources: List of connectable resources - :vartype connectable_resources: - list[~azure.mgmt.security.models.ConnectableResource] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'calculated_date_time': {'readonly': True}, - 'connectable_resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'calculated_date_time': {'key': 'properties.calculatedDateTime', 'type': 'iso-8601'}, - 'connectable_resources': {'key': 'properties.connectableResources', 'type': '[ConnectableResource]'}, - } - - def __init__(self, **kwargs): - super(AllowedConnectionsResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = None - self.calculated_date_time = None - self.connectable_resources = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource_paged.py deleted file mode 100644 index 6a1696891e15..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class AllowedConnectionsResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`AllowedConnectionsResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AllowedConnectionsResource]'} - } - - def __init__(self, *args, **kwargs): - - super(AllowedConnectionsResourcePaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource_py3.py deleted file mode 100644 index c6cc09b53298..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/allowed_connections_resource_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AllowedConnectionsResource(Model): - """The resource whose properties describes the allowed traffic between Azure - resources. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar location: Location where the resource is stored - :vartype location: str - :ivar calculated_date_time: The UTC time on which the allowed connections - resource was calculated - :vartype calculated_date_time: datetime - :ivar connectable_resources: List of connectable resources - :vartype connectable_resources: - list[~azure.mgmt.security.models.ConnectableResource] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'calculated_date_time': {'readonly': True}, - 'connectable_resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'calculated_date_time': {'key': 'properties.calculatedDateTime', 'type': 'iso-8601'}, - 'connectable_resources': {'key': 'properties.connectableResources', 'type': '[ConnectableResource]'}, - } - - def __init__(self, **kwargs) -> None: - super(AllowedConnectionsResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = None - self.calculated_date_time = None - self.connectable_resources = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/asc_location.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/asc_location.py deleted file mode 100644 index c665bef0469a..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/asc_location.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class AscLocation(Resource): - """The ASC location of the subscription is in the "name" field. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param properties: - :type properties: object - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(AscLocation, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/asc_location_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/asc_location_paged.py deleted file mode 100644 index 85394884079a..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/asc_location_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class AscLocationPaged(Paged): - """ - A paging container for iterating over a list of :class:`AscLocation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AscLocation]'} - } - - def __init__(self, *args, **kwargs): - - super(AscLocationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/asc_location_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/asc_location_py3.py deleted file mode 100644 index 8ee3de84094f..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/asc_location_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class AscLocation(Resource): - """The ASC location of the subscription is in the "name" field. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param properties: - :type properties: object - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'object'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(AscLocation, self).__init__(**kwargs) - self.properties = properties diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_external_security_solution.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_external_security_solution.py deleted file mode 100644 index 813dae68b0e1..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_external_security_solution.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .external_security_solution import ExternalSecuritySolution - - -class AtaExternalSecuritySolution(ExternalSecuritySolution): - """Represents an ATA security solution which sends logs to an OMS workspace. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar location: Location where the resource is stored - :vartype location: str - :param kind: Required. Constant filled by server. - :type kind: str - :param properties: - :type properties: ~azure.mgmt.security.models.AtaSolutionProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AtaSolutionProperties'}, - } - - def __init__(self, **kwargs): - super(AtaExternalSecuritySolution, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.kind = 'ATA' diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_external_security_solution_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_external_security_solution_py3.py deleted file mode 100644 index 52b5e8b579a7..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_external_security_solution_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .external_security_solution_py3 import ExternalSecuritySolution - - -class AtaExternalSecuritySolution(ExternalSecuritySolution): - """Represents an ATA security solution which sends logs to an OMS workspace. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar location: Location where the resource is stored - :vartype location: str - :param kind: Required. Constant filled by server. - :type kind: str - :param properties: - :type properties: ~azure.mgmt.security.models.AtaSolutionProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'AtaSolutionProperties'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(AtaExternalSecuritySolution, self).__init__(**kwargs) - self.properties = properties - self.kind = 'ATA' diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_solution_properties.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_solution_properties.py deleted file mode 100644 index 8067254e71fa..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_solution_properties.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .external_security_solution_properties import ExternalSecuritySolutionProperties - - -class AtaSolutionProperties(ExternalSecuritySolutionProperties): - """The external security solution properties for ATA solutions. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param device_vendor: - :type device_vendor: str - :param device_type: - :type device_type: str - :param workspace: - :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace - :param last_event_received: - :type last_event_received: str - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, - 'device_type': {'key': 'deviceType', 'type': 'str'}, - 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, - 'last_event_received': {'key': 'lastEventReceived', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AtaSolutionProperties, self).__init__(**kwargs) - self.last_event_received = kwargs.get('last_event_received', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_solution_properties_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_solution_properties_py3.py deleted file mode 100644 index 7314df45108c..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/ata_solution_properties_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .external_security_solution_properties_py3 import ExternalSecuritySolutionProperties - - -class AtaSolutionProperties(ExternalSecuritySolutionProperties): - """The external security solution properties for ATA solutions. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param device_vendor: - :type device_vendor: str - :param device_type: - :type device_type: str - :param workspace: - :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace - :param last_event_received: - :type last_event_received: str - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, - 'device_type': {'key': 'deviceType', 'type': 'str'}, - 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, - 'last_event_received': {'key': 'lastEventReceived', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, device_vendor: str=None, device_type: str=None, workspace=None, last_event_received: str=None, **kwargs) -> None: - super(AtaSolutionProperties, self).__init__(additional_properties=additional_properties, device_vendor=device_vendor, device_type=device_type, workspace=workspace, **kwargs) - self.last_event_received = last_event_received diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/auto_provisioning_setting.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/auto_provisioning_setting.py deleted file mode 100644 index 907869accb3d..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/auto_provisioning_setting.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class AutoProvisioningSetting(Resource): - """Auto provisioning setting. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param auto_provision: Required. Describes what kind of security agent - provisioning action to take. Possible values include: 'On', 'Off' - :type auto_provision: str or ~azure.mgmt.security.models.AutoProvision - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'auto_provision': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'auto_provision': {'key': 'properties.autoProvision', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AutoProvisioningSetting, self).__init__(**kwargs) - self.auto_provision = kwargs.get('auto_provision', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/auto_provisioning_setting_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/auto_provisioning_setting_paged.py deleted file mode 100644 index a618c42c075c..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/auto_provisioning_setting_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class AutoProvisioningSettingPaged(Paged): - """ - A paging container for iterating over a list of :class:`AutoProvisioningSetting ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[AutoProvisioningSetting]'} - } - - def __init__(self, *args, **kwargs): - - super(AutoProvisioningSettingPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/auto_provisioning_setting_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/auto_provisioning_setting_py3.py deleted file mode 100644 index 7c86b8da5c01..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/auto_provisioning_setting_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class AutoProvisioningSetting(Resource): - """Auto provisioning setting. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param auto_provision: Required. Describes what kind of security agent - provisioning action to take. Possible values include: 'On', 'Off' - :type auto_provision: str or ~azure.mgmt.security.models.AutoProvision - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'auto_provision': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'auto_provision': {'key': 'properties.autoProvision', 'type': 'str'}, - } - - def __init__(self, *, auto_provision, **kwargs) -> None: - super(AutoProvisioningSetting, self).__init__(**kwargs) - self.auto_provision = auto_provision diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_external_security_solution.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_external_security_solution.py deleted file mode 100644 index 513fb6de5940..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_external_security_solution.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .external_security_solution import ExternalSecuritySolution - - -class CefExternalSecuritySolution(ExternalSecuritySolution): - """Represents a security solution which sends CEF logs to an OMS workspace. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar location: Location where the resource is stored - :vartype location: str - :param kind: Required. Constant filled by server. - :type kind: str - :param properties: - :type properties: ~azure.mgmt.security.models.CefSolutionProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'CefSolutionProperties'}, - } - - def __init__(self, **kwargs): - super(CefExternalSecuritySolution, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.kind = 'CEF' diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_external_security_solution_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_external_security_solution_py3.py deleted file mode 100644 index 930b453b72d8..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_external_security_solution_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .external_security_solution_py3 import ExternalSecuritySolution - - -class CefExternalSecuritySolution(ExternalSecuritySolution): - """Represents a security solution which sends CEF logs to an OMS workspace. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar location: Location where the resource is stored - :vartype location: str - :param kind: Required. Constant filled by server. - :type kind: str - :param properties: - :type properties: ~azure.mgmt.security.models.CefSolutionProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'CefSolutionProperties'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(CefExternalSecuritySolution, self).__init__(**kwargs) - self.properties = properties - self.kind = 'CEF' diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_solution_properties.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_solution_properties.py deleted file mode 100644 index b49610a04bb0..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_solution_properties.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .external_security_solution_properties import ExternalSecuritySolutionProperties - - -class CefSolutionProperties(ExternalSecuritySolutionProperties): - """The external security solution properties for CEF solutions. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param device_vendor: - :type device_vendor: str - :param device_type: - :type device_type: str - :param workspace: - :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace - :param hostname: - :type hostname: str - :param agent: - :type agent: str - :param last_event_received: - :type last_event_received: str - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, - 'device_type': {'key': 'deviceType', 'type': 'str'}, - 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, - 'hostname': {'key': 'hostname', 'type': 'str'}, - 'agent': {'key': 'agent', 'type': 'str'}, - 'last_event_received': {'key': 'lastEventReceived', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CefSolutionProperties, self).__init__(**kwargs) - self.hostname = kwargs.get('hostname', None) - self.agent = kwargs.get('agent', None) - self.last_event_received = kwargs.get('last_event_received', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_solution_properties_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_solution_properties_py3.py deleted file mode 100644 index 390c6acba5fb..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/cef_solution_properties_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .external_security_solution_properties_py3 import ExternalSecuritySolutionProperties - - -class CefSolutionProperties(ExternalSecuritySolutionProperties): - """The external security solution properties for CEF solutions. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param device_vendor: - :type device_vendor: str - :param device_type: - :type device_type: str - :param workspace: - :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace - :param hostname: - :type hostname: str - :param agent: - :type agent: str - :param last_event_received: - :type last_event_received: str - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, - 'device_type': {'key': 'deviceType', 'type': 'str'}, - 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, - 'hostname': {'key': 'hostname', 'type': 'str'}, - 'agent': {'key': 'agent', 'type': 'str'}, - 'last_event_received': {'key': 'lastEventReceived', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, device_vendor: str=None, device_type: str=None, workspace=None, hostname: str=None, agent: str=None, last_event_received: str=None, **kwargs) -> None: - super(CefSolutionProperties, self).__init__(additional_properties=additional_properties, device_vendor=device_vendor, device_type=device_type, workspace=workspace, **kwargs) - self.hostname = hostname - self.agent = agent - self.last_event_received = last_event_received diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance.py deleted file mode 100644 index f515b35211bd..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance.py +++ /dev/null @@ -1,62 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Compliance(Resource): - """Compliance of a scope. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar assessment_timestamp_utc_date: The timestamp when the Compliance - calculation was conducted. - :vartype assessment_timestamp_utc_date: datetime - :ivar resource_count: The resource count of the given subscription for - which the Compliance calculation was conducted (needed for Management - Group Compliance calculation). - :vartype resource_count: int - :ivar assessment_result: An array of segment, which is the actually the - compliance assessment. - :vartype assessment_result: - list[~azure.mgmt.security.models.ComplianceSegment] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'assessment_timestamp_utc_date': {'readonly': True}, - 'resource_count': {'readonly': True}, - 'assessment_result': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'assessment_timestamp_utc_date': {'key': 'properties.assessmentTimestampUtcDate', 'type': 'iso-8601'}, - 'resource_count': {'key': 'properties.resourceCount', 'type': 'int'}, - 'assessment_result': {'key': 'properties.assessmentResult', 'type': '[ComplianceSegment]'}, - } - - def __init__(self, **kwargs): - super(Compliance, self).__init__(**kwargs) - self.assessment_timestamp_utc_date = None - self.resource_count = None - self.assessment_result = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_paged.py deleted file mode 100644 index 4e2030375270..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class CompliancePaged(Paged): - """ - A paging container for iterating over a list of :class:`Compliance ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Compliance]'} - } - - def __init__(self, *args, **kwargs): - - super(CompliancePaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_py3.py deleted file mode 100644 index 0e271a1351b4..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Compliance(Resource): - """Compliance of a scope. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar assessment_timestamp_utc_date: The timestamp when the Compliance - calculation was conducted. - :vartype assessment_timestamp_utc_date: datetime - :ivar resource_count: The resource count of the given subscription for - which the Compliance calculation was conducted (needed for Management - Group Compliance calculation). - :vartype resource_count: int - :ivar assessment_result: An array of segment, which is the actually the - compliance assessment. - :vartype assessment_result: - list[~azure.mgmt.security.models.ComplianceSegment] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'assessment_timestamp_utc_date': {'readonly': True}, - 'resource_count': {'readonly': True}, - 'assessment_result': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'assessment_timestamp_utc_date': {'key': 'properties.assessmentTimestampUtcDate', 'type': 'iso-8601'}, - 'resource_count': {'key': 'properties.resourceCount', 'type': 'int'}, - 'assessment_result': {'key': 'properties.assessmentResult', 'type': '[ComplianceSegment]'}, - } - - def __init__(self, **kwargs) -> None: - super(Compliance, self).__init__(**kwargs) - self.assessment_timestamp_utc_date = None - self.resource_count = None - self.assessment_result = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_segment.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_segment.py deleted file mode 100644 index ea23dc49c079..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_segment.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComplianceSegment(Model): - """A segment of a compliance assessment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar segment_type: The segment type, e.g. compliant, non-compliance, - insufficient coverage, N/A, etc. - :vartype segment_type: str - :ivar percentage: The size (%) of the segment. - :vartype percentage: float - """ - - _validation = { - 'segment_type': {'readonly': True}, - 'percentage': {'readonly': True}, - } - - _attribute_map = { - 'segment_type': {'key': 'segmentType', 'type': 'str'}, - 'percentage': {'key': 'percentage', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(ComplianceSegment, self).__init__(**kwargs) - self.segment_type = None - self.percentage = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_segment_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_segment_py3.py deleted file mode 100644 index a819e7cde997..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/compliance_segment_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComplianceSegment(Model): - """A segment of a compliance assessment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar segment_type: The segment type, e.g. compliant, non-compliance, - insufficient coverage, N/A, etc. - :vartype segment_type: str - :ivar percentage: The size (%) of the segment. - :vartype percentage: float - """ - - _validation = { - 'segment_type': {'readonly': True}, - 'percentage': {'readonly': True}, - } - - _attribute_map = { - 'segment_type': {'key': 'segmentType', 'type': 'str'}, - 'percentage': {'key': 'percentage', 'type': 'float'}, - } - - def __init__(self, **kwargs) -> None: - super(ComplianceSegment, self).__init__(**kwargs) - self.segment_type = None - self.percentage = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connectable_resource.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connectable_resource.py deleted file mode 100644 index 617931b620d2..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connectable_resource.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ConnectableResource(Model): - """Describes the allowed inbound and outbound traffic of an Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The Azure resource id - :vartype id: str - :ivar inbound_connected_resources: The list of Azure resources that the - resource has inbound allowed connection from - :vartype inbound_connected_resources: - list[~azure.mgmt.security.models.ConnectedResource] - :ivar outbound_connected_resources: The list of Azure resources that the - resource has outbound allowed connection to - :vartype outbound_connected_resources: - list[~azure.mgmt.security.models.ConnectedResource] - """ - - _validation = { - 'id': {'readonly': True}, - 'inbound_connected_resources': {'readonly': True}, - 'outbound_connected_resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'inbound_connected_resources': {'key': 'inboundConnectedResources', 'type': '[ConnectedResource]'}, - 'outbound_connected_resources': {'key': 'outboundConnectedResources', 'type': '[ConnectedResource]'}, - } - - def __init__(self, **kwargs): - super(ConnectableResource, self).__init__(**kwargs) - self.id = None - self.inbound_connected_resources = None - self.outbound_connected_resources = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connectable_resource_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connectable_resource_py3.py deleted file mode 100644 index 405942f2b228..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connectable_resource_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ConnectableResource(Model): - """Describes the allowed inbound and outbound traffic of an Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The Azure resource id - :vartype id: str - :ivar inbound_connected_resources: The list of Azure resources that the - resource has inbound allowed connection from - :vartype inbound_connected_resources: - list[~azure.mgmt.security.models.ConnectedResource] - :ivar outbound_connected_resources: The list of Azure resources that the - resource has outbound allowed connection to - :vartype outbound_connected_resources: - list[~azure.mgmt.security.models.ConnectedResource] - """ - - _validation = { - 'id': {'readonly': True}, - 'inbound_connected_resources': {'readonly': True}, - 'outbound_connected_resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'inbound_connected_resources': {'key': 'inboundConnectedResources', 'type': '[ConnectedResource]'}, - 'outbound_connected_resources': {'key': 'outboundConnectedResources', 'type': '[ConnectedResource]'}, - } - - def __init__(self, **kwargs) -> None: - super(ConnectableResource, self).__init__(**kwargs) - self.id = None - self.inbound_connected_resources = None - self.outbound_connected_resources = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_resource.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_resource.py deleted file mode 100644 index cb4e417044cd..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_resource.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ConnectedResource(Model): - """Describes properties of a connected resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar connected_resource_id: The Azure resource id of the connected - resource - :vartype connected_resource_id: str - :ivar tcp_ports: The allowed tcp ports - :vartype tcp_ports: str - :ivar udp_ports: The allowed udp ports - :vartype udp_ports: str - """ - - _validation = { - 'connected_resource_id': {'readonly': True}, - 'tcp_ports': {'readonly': True}, - 'udp_ports': {'readonly': True}, - } - - _attribute_map = { - 'connected_resource_id': {'key': 'connectedResourceId', 'type': 'str'}, - 'tcp_ports': {'key': 'tcpPorts', 'type': 'str'}, - 'udp_ports': {'key': 'udpPorts', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ConnectedResource, self).__init__(**kwargs) - self.connected_resource_id = None - self.tcp_ports = None - self.udp_ports = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_resource_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_resource_py3.py deleted file mode 100644 index 509629455e1c..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_resource_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ConnectedResource(Model): - """Describes properties of a connected resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar connected_resource_id: The Azure resource id of the connected - resource - :vartype connected_resource_id: str - :ivar tcp_ports: The allowed tcp ports - :vartype tcp_ports: str - :ivar udp_ports: The allowed udp ports - :vartype udp_ports: str - """ - - _validation = { - 'connected_resource_id': {'readonly': True}, - 'tcp_ports': {'readonly': True}, - 'udp_ports': {'readonly': True}, - } - - _attribute_map = { - 'connected_resource_id': {'key': 'connectedResourceId', 'type': 'str'}, - 'tcp_ports': {'key': 'tcpPorts', 'type': 'str'}, - 'udp_ports': {'key': 'udpPorts', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ConnectedResource, self).__init__(**kwargs) - self.connected_resource_id = None - self.tcp_ports = None - self.udp_ports = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_workspace.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_workspace.py deleted file mode 100644 index 6ac3212eabd9..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_workspace.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ConnectedWorkspace(Model): - """Represents an OMS workspace to which the solution is connected. - - :param id: Azure resource ID of the connected OMS workspace - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ConnectedWorkspace, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_workspace_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_workspace_py3.py deleted file mode 100644 index 5bc6960972d2..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/connected_workspace_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ConnectedWorkspace(Model): - """Represents an OMS workspace to which the solution is connected. - - :param id: Azure resource ID of the connected OMS workspace - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(ConnectedWorkspace, self).__init__(**kwargs) - self.id = id diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/data_export_setting.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/data_export_setting.py deleted file mode 100644 index 8c355e50e6ff..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/data_export_setting.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .setting import Setting - - -class DataExportSetting(Setting): - """Represents a data export setting. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param kind: Required. the kind of the settings string - (DataExportSetting). Possible values include: 'DataExportSetting', - 'AlertSuppressionSetting' - :type kind: str or ~azure.mgmt.security.models.SettingKind - :param enabled: Required. Is the data export setting is enabled - :type enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'required': True}, - 'enabled': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(DataExportSetting, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/data_export_setting_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/data_export_setting_py3.py deleted file mode 100644 index 05d8e11208fc..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/data_export_setting_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .setting_py3 import Setting - - -class DataExportSetting(Setting): - """Represents a data export setting. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param kind: Required. the kind of the settings string - (DataExportSetting). Possible values include: 'DataExportSetting', - 'AlertSuppressionSetting' - :type kind: str or ~azure.mgmt.security.models.SettingKind - :param enabled: Required. Is the data export setting is enabled - :type enabled: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'required': True}, - 'enabled': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - } - - def __init__(self, *, kind, enabled: bool, **kwargs) -> None: - super(DataExportSetting, self).__init__(kind=kind, **kwargs) - self.enabled = enabled diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/discovered_security_solution.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/discovered_security_solution.py deleted file mode 100644 index fabb09226953..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/discovered_security_solution.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiscoveredSecuritySolution(Model): - """DiscoveredSecuritySolution. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar location: Location where the resource is stored - :vartype location: str - :param security_family: Required. The security family of the discovered - solution. Possible values include: 'Waf', 'Ngfw', 'SaasWaf', 'Va' - :type security_family: str or ~azure.mgmt.security.models.SecurityFamily - :param offer: Required. The security solutions' image offer - :type offer: str - :param publisher: Required. The security solutions' image publisher - :type publisher: str - :param sku: Required. The security solutions' image sku - :type sku: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'security_family': {'required': True}, - 'offer': {'required': True}, - 'publisher': {'required': True}, - 'sku': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'security_family': {'key': 'properties.securityFamily', 'type': 'str'}, - 'offer': {'key': 'properties.offer', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'sku': {'key': 'properties.sku', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DiscoveredSecuritySolution, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = None - self.security_family = kwargs.get('security_family', None) - self.offer = kwargs.get('offer', None) - self.publisher = kwargs.get('publisher', None) - self.sku = kwargs.get('sku', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/discovered_security_solution_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/discovered_security_solution_paged.py deleted file mode 100644 index 9bfbb03c5409..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/discovered_security_solution_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class DiscoveredSecuritySolutionPaged(Paged): - """ - A paging container for iterating over a list of :class:`DiscoveredSecuritySolution ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DiscoveredSecuritySolution]'} - } - - def __init__(self, *args, **kwargs): - - super(DiscoveredSecuritySolutionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/discovered_security_solution_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/discovered_security_solution_py3.py deleted file mode 100644 index 33934cab24d5..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/discovered_security_solution_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiscoveredSecuritySolution(Model): - """DiscoveredSecuritySolution. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar location: Location where the resource is stored - :vartype location: str - :param security_family: Required. The security family of the discovered - solution. Possible values include: 'Waf', 'Ngfw', 'SaasWaf', 'Va' - :type security_family: str or ~azure.mgmt.security.models.SecurityFamily - :param offer: Required. The security solutions' image offer - :type offer: str - :param publisher: Required. The security solutions' image publisher - :type publisher: str - :param sku: Required. The security solutions' image sku - :type sku: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'security_family': {'required': True}, - 'offer': {'required': True}, - 'publisher': {'required': True}, - 'sku': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'security_family': {'key': 'properties.securityFamily', 'type': 'str'}, - 'offer': {'key': 'properties.offer', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'sku': {'key': 'properties.sku', 'type': 'str'}, - } - - def __init__(self, *, security_family, offer: str, publisher: str, sku: str, **kwargs) -> None: - super(DiscoveredSecuritySolution, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = None - self.security_family = security_family - self.offer = offer - self.publisher = publisher - self.sku = sku diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution.py deleted file mode 100644 index 0eb60137c0c0..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution.py +++ /dev/null @@ -1,67 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExternalSecuritySolution(Model): - """Represents a security solution external to Azure Security Center which - sends information to an OMS workspace and whose data is displayed by Azure - Security Center. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: CefExternalSecuritySolution, AtaExternalSecuritySolution, - AadExternalSecuritySolution - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar location: Location where the resource is stored - :vartype location: str - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'CEF': 'CefExternalSecuritySolution', 'ATA': 'AtaExternalSecuritySolution', 'AAD': 'AadExternalSecuritySolution'} - } - - def __init__(self, **kwargs): - super(ExternalSecuritySolution, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = None - self.kind = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_kind1.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_kind1.py deleted file mode 100644 index 7f736fcfc1ba..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_kind1.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExternalSecuritySolutionKind1(Model): - """Describes an Azure resource with kind. - - :param kind: The kind of the external solution. Possible values include: - 'CEF', 'ATA', 'AAD' - :type kind: str or - ~azure.mgmt.security.models.ExternalSecuritySolutionKind - """ - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ExternalSecuritySolutionKind1, self).__init__(**kwargs) - self.kind = kwargs.get('kind', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_kind1_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_kind1_py3.py deleted file mode 100644 index 0d1ef240b557..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_kind1_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExternalSecuritySolutionKind1(Model): - """Describes an Azure resource with kind. - - :param kind: The kind of the external solution. Possible values include: - 'CEF', 'ATA', 'AAD' - :type kind: str or - ~azure.mgmt.security.models.ExternalSecuritySolutionKind - """ - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, *, kind=None, **kwargs) -> None: - super(ExternalSecuritySolutionKind1, self).__init__(**kwargs) - self.kind = kind diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_paged.py deleted file mode 100644 index a67047ce19c0..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ExternalSecuritySolutionPaged(Paged): - """ - A paging container for iterating over a list of :class:`ExternalSecuritySolution ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ExternalSecuritySolution]'} - } - - def __init__(self, *args, **kwargs): - - super(ExternalSecuritySolutionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_properties.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_properties.py deleted file mode 100644 index 9ccbb179d3e4..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_properties.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExternalSecuritySolutionProperties(Model): - """The solution properties (correspond to the solution kind). - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param device_vendor: - :type device_vendor: str - :param device_type: - :type device_type: str - :param workspace: - :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, - 'device_type': {'key': 'deviceType', 'type': 'str'}, - 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, - } - - def __init__(self, **kwargs): - super(ExternalSecuritySolutionProperties, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.device_vendor = kwargs.get('device_vendor', None) - self.device_type = kwargs.get('device_type', None) - self.workspace = kwargs.get('workspace', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_properties_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_properties_py3.py deleted file mode 100644 index de53f50ae553..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_properties_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExternalSecuritySolutionProperties(Model): - """The solution properties (correspond to the solution kind). - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param device_vendor: - :type device_vendor: str - :param device_type: - :type device_type: str - :param workspace: - :type workspace: ~azure.mgmt.security.models.ConnectedWorkspace - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, - 'device_type': {'key': 'deviceType', 'type': 'str'}, - 'workspace': {'key': 'workspace', 'type': 'ConnectedWorkspace'}, - } - - def __init__(self, *, additional_properties=None, device_vendor: str=None, device_type: str=None, workspace=None, **kwargs) -> None: - super(ExternalSecuritySolutionProperties, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.device_vendor = device_vendor - self.device_type = device_type - self.workspace = workspace diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_py3.py deleted file mode 100644 index 798e808ddfab..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/external_security_solution_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExternalSecuritySolution(Model): - """Represents a security solution external to Azure Security Center which - sends information to an OMS workspace and whose data is displayed by Azure - Security Center. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: CefExternalSecuritySolution, AtaExternalSecuritySolution, - AadExternalSecuritySolution - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar location: Location where the resource is stored - :vartype location: str - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'CEF': 'CefExternalSecuritySolution', 'ATA': 'AtaExternalSecuritySolution', 'AAD': 'AadExternalSecuritySolution'} - } - - def __init__(self, **kwargs) -> None: - super(ExternalSecuritySolution, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = None - self.kind = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_keyword.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_keyword.py deleted file mode 100644 index b67a1d4cfbd1..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_keyword.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InformationProtectionKeyword(Model): - """The information type keyword. - - :param pattern: The keyword pattern. - :type pattern: str - :param custom: Indicates whether the keyword is custom or not. - :type custom: bool - :param can_be_numeric: Indicates whether the keyword can be applied on - numeric types or not. - :type can_be_numeric: bool - :param excluded: Indicates whether the keyword is excluded or not. - :type excluded: bool - """ - - _attribute_map = { - 'pattern': {'key': 'pattern', 'type': 'str'}, - 'custom': {'key': 'custom', 'type': 'bool'}, - 'can_be_numeric': {'key': 'canBeNumeric', 'type': 'bool'}, - 'excluded': {'key': 'excluded', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(InformationProtectionKeyword, self).__init__(**kwargs) - self.pattern = kwargs.get('pattern', None) - self.custom = kwargs.get('custom', None) - self.can_be_numeric = kwargs.get('can_be_numeric', None) - self.excluded = kwargs.get('excluded', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_keyword_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_keyword_py3.py deleted file mode 100644 index 52c424cd4452..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_keyword_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InformationProtectionKeyword(Model): - """The information type keyword. - - :param pattern: The keyword pattern. - :type pattern: str - :param custom: Indicates whether the keyword is custom or not. - :type custom: bool - :param can_be_numeric: Indicates whether the keyword can be applied on - numeric types or not. - :type can_be_numeric: bool - :param excluded: Indicates whether the keyword is excluded or not. - :type excluded: bool - """ - - _attribute_map = { - 'pattern': {'key': 'pattern', 'type': 'str'}, - 'custom': {'key': 'custom', 'type': 'bool'}, - 'can_be_numeric': {'key': 'canBeNumeric', 'type': 'bool'}, - 'excluded': {'key': 'excluded', 'type': 'bool'}, - } - - def __init__(self, *, pattern: str=None, custom: bool=None, can_be_numeric: bool=None, excluded: bool=None, **kwargs) -> None: - super(InformationProtectionKeyword, self).__init__(**kwargs) - self.pattern = pattern - self.custom = custom - self.can_be_numeric = can_be_numeric - self.excluded = excluded diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_policy.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_policy.py deleted file mode 100644 index c430a8605127..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_policy.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class InformationProtectionPolicy(Resource): - """Information protection policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar last_modified_utc: Describes the last UTC time the policy was - modified. - :vartype last_modified_utc: datetime - :param labels: Dictionary of sensitivity labels. - :type labels: dict[str, ~azure.mgmt.security.models.SensitivityLabel] - :param information_types: The sensitivity information types. - :type information_types: dict[str, - ~azure.mgmt.security.models.InformationType] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'last_modified_utc': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'last_modified_utc': {'key': 'properties.lastModifiedUtc', 'type': 'iso-8601'}, - 'labels': {'key': 'properties.labels', 'type': '{SensitivityLabel}'}, - 'information_types': {'key': 'properties.informationTypes', 'type': '{InformationType}'}, - } - - def __init__(self, **kwargs): - super(InformationProtectionPolicy, self).__init__(**kwargs) - self.last_modified_utc = None - self.labels = kwargs.get('labels', None) - self.information_types = kwargs.get('information_types', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_policy_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_policy_paged.py deleted file mode 100644 index 807d040d4f4b..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class InformationProtectionPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`InformationProtectionPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[InformationProtectionPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(InformationProtectionPolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_policy_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_policy_py3.py deleted file mode 100644 index e07676bb0d27..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_protection_policy_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class InformationProtectionPolicy(Resource): - """Information protection policy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar last_modified_utc: Describes the last UTC time the policy was - modified. - :vartype last_modified_utc: datetime - :param labels: Dictionary of sensitivity labels. - :type labels: dict[str, ~azure.mgmt.security.models.SensitivityLabel] - :param information_types: The sensitivity information types. - :type information_types: dict[str, - ~azure.mgmt.security.models.InformationType] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'last_modified_utc': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'last_modified_utc': {'key': 'properties.lastModifiedUtc', 'type': 'iso-8601'}, - 'labels': {'key': 'properties.labels', 'type': '{SensitivityLabel}'}, - 'information_types': {'key': 'properties.informationTypes', 'type': '{InformationType}'}, - } - - def __init__(self, *, labels=None, information_types=None, **kwargs) -> None: - super(InformationProtectionPolicy, self).__init__(**kwargs) - self.last_modified_utc = None - self.labels = labels - self.information_types = information_types diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_type.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_type.py deleted file mode 100644 index df77e7c1ff65..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_type.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InformationType(Model): - """The information type. - - :param display_name: The name of the information type. - :type display_name: str - :param order: The order of the information type. - :type order: float - :param recommended_label_id: The recommended label id to be associated - with this information type. - :type recommended_label_id: str - :param enabled: Indicates whether the information type is enabled or not. - :type enabled: bool - :param custom: Indicates whether the information type is custom or not. - :type custom: bool - :param keywords: The information type keywords. - :type keywords: - list[~azure.mgmt.security.models.InformationProtectionKeyword] - """ - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'order': {'key': 'order', 'type': 'float'}, - 'recommended_label_id': {'key': 'recommendedLabelId', 'type': 'str'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'custom': {'key': 'custom', 'type': 'bool'}, - 'keywords': {'key': 'keywords', 'type': '[InformationProtectionKeyword]'}, - } - - def __init__(self, **kwargs): - super(InformationType, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - self.order = kwargs.get('order', None) - self.recommended_label_id = kwargs.get('recommended_label_id', None) - self.enabled = kwargs.get('enabled', None) - self.custom = kwargs.get('custom', None) - self.keywords = kwargs.get('keywords', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_type_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_type_py3.py deleted file mode 100644 index b8b1ab434c82..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/information_type_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InformationType(Model): - """The information type. - - :param display_name: The name of the information type. - :type display_name: str - :param order: The order of the information type. - :type order: float - :param recommended_label_id: The recommended label id to be associated - with this information type. - :type recommended_label_id: str - :param enabled: Indicates whether the information type is enabled or not. - :type enabled: bool - :param custom: Indicates whether the information type is custom or not. - :type custom: bool - :param keywords: The information type keywords. - :type keywords: - list[~azure.mgmt.security.models.InformationProtectionKeyword] - """ - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'order': {'key': 'order', 'type': 'float'}, - 'recommended_label_id': {'key': 'recommendedLabelId', 'type': 'str'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'custom': {'key': 'custom', 'type': 'bool'}, - 'keywords': {'key': 'keywords', 'type': '[InformationProtectionKeyword]'}, - } - - def __init__(self, *, display_name: str=None, order: float=None, recommended_label_id: str=None, enabled: bool=None, custom: bool=None, keywords=None, **kwargs) -> None: - super(InformationType, self).__init__(**kwargs) - self.display_name = display_name - self.order = order - self.recommended_label_id = recommended_label_id - self.enabled = enabled - self.custom = custom - self.keywords = keywords diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy.py deleted file mode 100644 index 281b6e07c25d..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JitNetworkAccessPolicy(Model): - """JitNetworkAccessPolicy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param kind: Kind of the resource - :type kind: str - :ivar location: Location where the resource is stored - :vartype location: str - :param virtual_machines: Required. Configurations for - Microsoft.Compute/virtualMachines resource type. - :type virtual_machines: - list[~azure.mgmt.security.models.JitNetworkAccessPolicyVirtualMachine] - :param requests: - :type requests: list[~azure.mgmt.security.models.JitNetworkAccessRequest] - :ivar provisioning_state: Gets the provisioning state of the Just-in-Time - policy. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'virtual_machines': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[JitNetworkAccessPolicyVirtualMachine]'}, - 'requests': {'key': 'properties.requests', 'type': '[JitNetworkAccessRequest]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JitNetworkAccessPolicy, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kind = kwargs.get('kind', None) - self.location = None - self.virtual_machines = kwargs.get('virtual_machines', None) - self.requests = kwargs.get('requests', None) - self.provisioning_state = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_port.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_port.py deleted file mode 100644 index b0829c87c01b..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_port.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JitNetworkAccessPolicyInitiatePort(Model): - """JitNetworkAccessPolicyInitiatePort. - - All required parameters must be populated in order to send to Azure. - - :param number: Required. - :type number: int - :param allowed_source_address_prefix: Source of the allowed traffic. If - omitted, the request will be for the source IP address of the initiate - request. - :type allowed_source_address_prefix: str - :param end_time_utc: Required. The time to close the request in UTC - :type end_time_utc: datetime - """ - - _validation = { - 'number': {'required': True}, - 'end_time_utc': {'required': True}, - } - - _attribute_map = { - 'number': {'key': 'number', 'type': 'int'}, - 'allowed_source_address_prefix': {'key': 'allowedSourceAddressPrefix', 'type': 'str'}, - 'end_time_utc': {'key': 'endTimeUtc', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(JitNetworkAccessPolicyInitiatePort, self).__init__(**kwargs) - self.number = kwargs.get('number', None) - self.allowed_source_address_prefix = kwargs.get('allowed_source_address_prefix', None) - self.end_time_utc = kwargs.get('end_time_utc', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_port_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_port_py3.py deleted file mode 100644 index 65ae97d30788..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_port_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JitNetworkAccessPolicyInitiatePort(Model): - """JitNetworkAccessPolicyInitiatePort. - - All required parameters must be populated in order to send to Azure. - - :param number: Required. - :type number: int - :param allowed_source_address_prefix: Source of the allowed traffic. If - omitted, the request will be for the source IP address of the initiate - request. - :type allowed_source_address_prefix: str - :param end_time_utc: Required. The time to close the request in UTC - :type end_time_utc: datetime - """ - - _validation = { - 'number': {'required': True}, - 'end_time_utc': {'required': True}, - } - - _attribute_map = { - 'number': {'key': 'number', 'type': 'int'}, - 'allowed_source_address_prefix': {'key': 'allowedSourceAddressPrefix', 'type': 'str'}, - 'end_time_utc': {'key': 'endTimeUtc', 'type': 'iso-8601'}, - } - - def __init__(self, *, number: int, end_time_utc, allowed_source_address_prefix: str=None, **kwargs) -> None: - super(JitNetworkAccessPolicyInitiatePort, self).__init__(**kwargs) - self.number = number - self.allowed_source_address_prefix = allowed_source_address_prefix - self.end_time_utc = end_time_utc diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_request.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_request.py deleted file mode 100644 index 6d567c7aee30..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_request.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JitNetworkAccessPolicyInitiateRequest(Model): - """JitNetworkAccessPolicyInitiateRequest. - - All required parameters must be populated in order to send to Azure. - - :param virtual_machines: Required. A list of virtual machines & ports to - open access for - :type virtual_machines: - list[~azure.mgmt.security.models.JitNetworkAccessPolicyInitiateVirtualMachine] - """ - - _validation = { - 'virtual_machines': {'required': True}, - } - - _attribute_map = { - 'virtual_machines': {'key': 'virtualMachines', 'type': '[JitNetworkAccessPolicyInitiateVirtualMachine]'}, - } - - def __init__(self, **kwargs): - super(JitNetworkAccessPolicyInitiateRequest, self).__init__(**kwargs) - self.virtual_machines = kwargs.get('virtual_machines', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_request_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_request_py3.py deleted file mode 100644 index ba6c6cbf2f93..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_request_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JitNetworkAccessPolicyInitiateRequest(Model): - """JitNetworkAccessPolicyInitiateRequest. - - All required parameters must be populated in order to send to Azure. - - :param virtual_machines: Required. A list of virtual machines & ports to - open access for - :type virtual_machines: - list[~azure.mgmt.security.models.JitNetworkAccessPolicyInitiateVirtualMachine] - """ - - _validation = { - 'virtual_machines': {'required': True}, - } - - _attribute_map = { - 'virtual_machines': {'key': 'virtualMachines', 'type': '[JitNetworkAccessPolicyInitiateVirtualMachine]'}, - } - - def __init__(self, *, virtual_machines, **kwargs) -> None: - super(JitNetworkAccessPolicyInitiateRequest, self).__init__(**kwargs) - self.virtual_machines = virtual_machines diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_virtual_machine.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_virtual_machine.py deleted file mode 100644 index e8581019f64d..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_virtual_machine.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JitNetworkAccessPolicyInitiateVirtualMachine(Model): - """JitNetworkAccessPolicyInitiateVirtualMachine. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Resource ID of the virtual machine that is linked to - this policy - :type id: str - :param ports: Required. The ports to open for the resource with the `id` - :type ports: - list[~azure.mgmt.security.models.JitNetworkAccessPolicyInitiatePort] - """ - - _validation = { - 'id': {'required': True}, - 'ports': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'ports': {'key': 'ports', 'type': '[JitNetworkAccessPolicyInitiatePort]'}, - } - - def __init__(self, **kwargs): - super(JitNetworkAccessPolicyInitiateVirtualMachine, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.ports = kwargs.get('ports', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_virtual_machine_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_virtual_machine_py3.py deleted file mode 100644 index bdae532a9308..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_initiate_virtual_machine_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JitNetworkAccessPolicyInitiateVirtualMachine(Model): - """JitNetworkAccessPolicyInitiateVirtualMachine. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Resource ID of the virtual machine that is linked to - this policy - :type id: str - :param ports: Required. The ports to open for the resource with the `id` - :type ports: - list[~azure.mgmt.security.models.JitNetworkAccessPolicyInitiatePort] - """ - - _validation = { - 'id': {'required': True}, - 'ports': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'ports': {'key': 'ports', 'type': '[JitNetworkAccessPolicyInitiatePort]'}, - } - - def __init__(self, *, id: str, ports, **kwargs) -> None: - super(JitNetworkAccessPolicyInitiateVirtualMachine, self).__init__(**kwargs) - self.id = id - self.ports = ports diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_paged.py deleted file mode 100644 index 87c684afb92e..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JitNetworkAccessPolicyPaged(Paged): - """ - A paging container for iterating over a list of :class:`JitNetworkAccessPolicy ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JitNetworkAccessPolicy]'} - } - - def __init__(self, *args, **kwargs): - - super(JitNetworkAccessPolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_py3.py deleted file mode 100644 index 4e719184b290..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JitNetworkAccessPolicy(Model): - """JitNetworkAccessPolicy. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param kind: Kind of the resource - :type kind: str - :ivar location: Location where the resource is stored - :vartype location: str - :param virtual_machines: Required. Configurations for - Microsoft.Compute/virtualMachines resource type. - :type virtual_machines: - list[~azure.mgmt.security.models.JitNetworkAccessPolicyVirtualMachine] - :param requests: - :type requests: list[~azure.mgmt.security.models.JitNetworkAccessRequest] - :ivar provisioning_state: Gets the provisioning state of the Just-in-Time - policy. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'virtual_machines': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'virtual_machines': {'key': 'properties.virtualMachines', 'type': '[JitNetworkAccessPolicyVirtualMachine]'}, - 'requests': {'key': 'properties.requests', 'type': '[JitNetworkAccessRequest]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, virtual_machines, kind: str=None, requests=None, **kwargs) -> None: - super(JitNetworkAccessPolicy, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kind = kind - self.location = None - self.virtual_machines = virtual_machines - self.requests = requests - self.provisioning_state = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_virtual_machine.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_virtual_machine.py deleted file mode 100644 index 49ce31c7f04e..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_virtual_machine.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JitNetworkAccessPolicyVirtualMachine(Model): - """JitNetworkAccessPolicyVirtualMachine. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Resource ID of the virtual machine that is linked to - this policy - :type id: str - :param ports: Required. Port configurations for the virtual machine - :type ports: list[~azure.mgmt.security.models.JitNetworkAccessPortRule] - """ - - _validation = { - 'id': {'required': True}, - 'ports': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'ports': {'key': 'ports', 'type': '[JitNetworkAccessPortRule]'}, - } - - def __init__(self, **kwargs): - super(JitNetworkAccessPolicyVirtualMachine, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.ports = kwargs.get('ports', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_virtual_machine_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_virtual_machine_py3.py deleted file mode 100644 index f315044fbc70..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_policy_virtual_machine_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JitNetworkAccessPolicyVirtualMachine(Model): - """JitNetworkAccessPolicyVirtualMachine. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Resource ID of the virtual machine that is linked to - this policy - :type id: str - :param ports: Required. Port configurations for the virtual machine - :type ports: list[~azure.mgmt.security.models.JitNetworkAccessPortRule] - """ - - _validation = { - 'id': {'required': True}, - 'ports': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'ports': {'key': 'ports', 'type': '[JitNetworkAccessPortRule]'}, - } - - def __init__(self, *, id: str, ports, **kwargs) -> None: - super(JitNetworkAccessPolicyVirtualMachine, self).__init__(**kwargs) - self.id = id - self.ports = ports diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_port_rule.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_port_rule.py deleted file mode 100644 index 4be40bf43b69..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_port_rule.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JitNetworkAccessPortRule(Model): - """JitNetworkAccessPortRule. - - All required parameters must be populated in order to send to Azure. - - :param number: Required. - :type number: int - :param protocol: Required. Possible values include: 'TCP', 'UDP', 'All' - :type protocol: str or ~azure.mgmt.security.models.Protocol - :param allowed_source_address_prefix: Mutually exclusive with the - "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR, - for example "192.168.0.3" or "192.168.0.0/16". - :type allowed_source_address_prefix: str - :param allowed_source_address_prefixes: Mutually exclusive with the - "allowedSourceAddressPrefix" parameter. - :type allowed_source_address_prefixes: list[str] - :param max_request_access_duration: Required. Maximum duration requests - can be made for. In ISO 8601 duration format. Minimum 5 minutes, maximum 1 - day - :type max_request_access_duration: str - """ - - _validation = { - 'number': {'required': True}, - 'protocol': {'required': True}, - 'max_request_access_duration': {'required': True}, - } - - _attribute_map = { - 'number': {'key': 'number', 'type': 'int'}, - 'protocol': {'key': 'protocol', 'type': 'str'}, - 'allowed_source_address_prefix': {'key': 'allowedSourceAddressPrefix', 'type': 'str'}, - 'allowed_source_address_prefixes': {'key': 'allowedSourceAddressPrefixes', 'type': '[str]'}, - 'max_request_access_duration': {'key': 'maxRequestAccessDuration', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JitNetworkAccessPortRule, self).__init__(**kwargs) - self.number = kwargs.get('number', None) - self.protocol = kwargs.get('protocol', None) - self.allowed_source_address_prefix = kwargs.get('allowed_source_address_prefix', None) - self.allowed_source_address_prefixes = kwargs.get('allowed_source_address_prefixes', None) - self.max_request_access_duration = kwargs.get('max_request_access_duration', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_port_rule_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_port_rule_py3.py deleted file mode 100644 index 2d6c223bea49..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_port_rule_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JitNetworkAccessPortRule(Model): - """JitNetworkAccessPortRule. - - All required parameters must be populated in order to send to Azure. - - :param number: Required. - :type number: int - :param protocol: Required. Possible values include: 'TCP', 'UDP', 'All' - :type protocol: str or ~azure.mgmt.security.models.Protocol - :param allowed_source_address_prefix: Mutually exclusive with the - "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR, - for example "192.168.0.3" or "192.168.0.0/16". - :type allowed_source_address_prefix: str - :param allowed_source_address_prefixes: Mutually exclusive with the - "allowedSourceAddressPrefix" parameter. - :type allowed_source_address_prefixes: list[str] - :param max_request_access_duration: Required. Maximum duration requests - can be made for. In ISO 8601 duration format. Minimum 5 minutes, maximum 1 - day - :type max_request_access_duration: str - """ - - _validation = { - 'number': {'required': True}, - 'protocol': {'required': True}, - 'max_request_access_duration': {'required': True}, - } - - _attribute_map = { - 'number': {'key': 'number', 'type': 'int'}, - 'protocol': {'key': 'protocol', 'type': 'str'}, - 'allowed_source_address_prefix': {'key': 'allowedSourceAddressPrefix', 'type': 'str'}, - 'allowed_source_address_prefixes': {'key': 'allowedSourceAddressPrefixes', 'type': '[str]'}, - 'max_request_access_duration': {'key': 'maxRequestAccessDuration', 'type': 'str'}, - } - - def __init__(self, *, number: int, protocol, max_request_access_duration: str, allowed_source_address_prefix: str=None, allowed_source_address_prefixes=None, **kwargs) -> None: - super(JitNetworkAccessPortRule, self).__init__(**kwargs) - self.number = number - self.protocol = protocol - self.allowed_source_address_prefix = allowed_source_address_prefix - self.allowed_source_address_prefixes = allowed_source_address_prefixes - self.max_request_access_duration = max_request_access_duration diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request.py deleted file mode 100644 index 4e3d22353b07..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JitNetworkAccessRequest(Model): - """JitNetworkAccessRequest. - - All required parameters must be populated in order to send to Azure. - - :param virtual_machines: Required. - :type virtual_machines: - list[~azure.mgmt.security.models.JitNetworkAccessRequestVirtualMachine] - :param start_time_utc: Required. The start time of the request in UTC - :type start_time_utc: datetime - :param requestor: Required. The identity of the person who made the - request - :type requestor: str - """ - - _validation = { - 'virtual_machines': {'required': True}, - 'start_time_utc': {'required': True}, - 'requestor': {'required': True}, - } - - _attribute_map = { - 'virtual_machines': {'key': 'virtualMachines', 'type': '[JitNetworkAccessRequestVirtualMachine]'}, - 'start_time_utc': {'key': 'startTimeUtc', 'type': 'iso-8601'}, - 'requestor': {'key': 'requestor', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JitNetworkAccessRequest, self).__init__(**kwargs) - self.virtual_machines = kwargs.get('virtual_machines', None) - self.start_time_utc = kwargs.get('start_time_utc', None) - self.requestor = kwargs.get('requestor', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_port.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_port.py deleted file mode 100644 index 63212f65aae1..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_port.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JitNetworkAccessRequestPort(Model): - """JitNetworkAccessRequestPort. - - All required parameters must be populated in order to send to Azure. - - :param number: Required. - :type number: int - :param allowed_source_address_prefix: Mutually exclusive with the - "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR, - for example "192.168.0.3" or "192.168.0.0/16". - :type allowed_source_address_prefix: str - :param allowed_source_address_prefixes: Mutually exclusive with the - "allowedSourceAddressPrefix" parameter. - :type allowed_source_address_prefixes: list[str] - :param end_time_utc: Required. The date & time at which the request ends - in UTC - :type end_time_utc: datetime - :param status: Required. The status of the port. Possible values include: - 'Revoked', 'Initiated' - :type status: str or ~azure.mgmt.security.models.Status - :param status_reason: Required. A description of why the `status` has its - value. Possible values include: 'Expired', 'UserRequested', - 'NewerRequestInitiated' - :type status_reason: str or ~azure.mgmt.security.models.StatusReason - """ - - _validation = { - 'number': {'required': True}, - 'end_time_utc': {'required': True}, - 'status': {'required': True}, - 'status_reason': {'required': True}, - } - - _attribute_map = { - 'number': {'key': 'number', 'type': 'int'}, - 'allowed_source_address_prefix': {'key': 'allowedSourceAddressPrefix', 'type': 'str'}, - 'allowed_source_address_prefixes': {'key': 'allowedSourceAddressPrefixes', 'type': '[str]'}, - 'end_time_utc': {'key': 'endTimeUtc', 'type': 'iso-8601'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_reason': {'key': 'statusReason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JitNetworkAccessRequestPort, self).__init__(**kwargs) - self.number = kwargs.get('number', None) - self.allowed_source_address_prefix = kwargs.get('allowed_source_address_prefix', None) - self.allowed_source_address_prefixes = kwargs.get('allowed_source_address_prefixes', None) - self.end_time_utc = kwargs.get('end_time_utc', None) - self.status = kwargs.get('status', None) - self.status_reason = kwargs.get('status_reason', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_port_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_port_py3.py deleted file mode 100644 index 957d7b08bb7a..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_port_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JitNetworkAccessRequestPort(Model): - """JitNetworkAccessRequestPort. - - All required parameters must be populated in order to send to Azure. - - :param number: Required. - :type number: int - :param allowed_source_address_prefix: Mutually exclusive with the - "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR, - for example "192.168.0.3" or "192.168.0.0/16". - :type allowed_source_address_prefix: str - :param allowed_source_address_prefixes: Mutually exclusive with the - "allowedSourceAddressPrefix" parameter. - :type allowed_source_address_prefixes: list[str] - :param end_time_utc: Required. The date & time at which the request ends - in UTC - :type end_time_utc: datetime - :param status: Required. The status of the port. Possible values include: - 'Revoked', 'Initiated' - :type status: str or ~azure.mgmt.security.models.Status - :param status_reason: Required. A description of why the `status` has its - value. Possible values include: 'Expired', 'UserRequested', - 'NewerRequestInitiated' - :type status_reason: str or ~azure.mgmt.security.models.StatusReason - """ - - _validation = { - 'number': {'required': True}, - 'end_time_utc': {'required': True}, - 'status': {'required': True}, - 'status_reason': {'required': True}, - } - - _attribute_map = { - 'number': {'key': 'number', 'type': 'int'}, - 'allowed_source_address_prefix': {'key': 'allowedSourceAddressPrefix', 'type': 'str'}, - 'allowed_source_address_prefixes': {'key': 'allowedSourceAddressPrefixes', 'type': '[str]'}, - 'end_time_utc': {'key': 'endTimeUtc', 'type': 'iso-8601'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_reason': {'key': 'statusReason', 'type': 'str'}, - } - - def __init__(self, *, number: int, end_time_utc, status, status_reason, allowed_source_address_prefix: str=None, allowed_source_address_prefixes=None, **kwargs) -> None: - super(JitNetworkAccessRequestPort, self).__init__(**kwargs) - self.number = number - self.allowed_source_address_prefix = allowed_source_address_prefix - self.allowed_source_address_prefixes = allowed_source_address_prefixes - self.end_time_utc = end_time_utc - self.status = status - self.status_reason = status_reason diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_py3.py deleted file mode 100644 index 4945c427dd93..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JitNetworkAccessRequest(Model): - """JitNetworkAccessRequest. - - All required parameters must be populated in order to send to Azure. - - :param virtual_machines: Required. - :type virtual_machines: - list[~azure.mgmt.security.models.JitNetworkAccessRequestVirtualMachine] - :param start_time_utc: Required. The start time of the request in UTC - :type start_time_utc: datetime - :param requestor: Required. The identity of the person who made the - request - :type requestor: str - """ - - _validation = { - 'virtual_machines': {'required': True}, - 'start_time_utc': {'required': True}, - 'requestor': {'required': True}, - } - - _attribute_map = { - 'virtual_machines': {'key': 'virtualMachines', 'type': '[JitNetworkAccessRequestVirtualMachine]'}, - 'start_time_utc': {'key': 'startTimeUtc', 'type': 'iso-8601'}, - 'requestor': {'key': 'requestor', 'type': 'str'}, - } - - def __init__(self, *, virtual_machines, start_time_utc, requestor: str, **kwargs) -> None: - super(JitNetworkAccessRequest, self).__init__(**kwargs) - self.virtual_machines = virtual_machines - self.start_time_utc = start_time_utc - self.requestor = requestor diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_virtual_machine.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_virtual_machine.py deleted file mode 100644 index 7c5ba66b2385..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_virtual_machine.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JitNetworkAccessRequestVirtualMachine(Model): - """JitNetworkAccessRequestVirtualMachine. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Resource ID of the virtual machine that is linked to - this policy - :type id: str - :param ports: Required. The ports that were opened for the virtual machine - :type ports: list[~azure.mgmt.security.models.JitNetworkAccessRequestPort] - """ - - _validation = { - 'id': {'required': True}, - 'ports': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'ports': {'key': 'ports', 'type': '[JitNetworkAccessRequestPort]'}, - } - - def __init__(self, **kwargs): - super(JitNetworkAccessRequestVirtualMachine, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.ports = kwargs.get('ports', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_virtual_machine_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_virtual_machine_py3.py deleted file mode 100644 index 7c9ddaa5a4a2..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/jit_network_access_request_virtual_machine_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JitNetworkAccessRequestVirtualMachine(Model): - """JitNetworkAccessRequestVirtualMachine. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Resource ID of the virtual machine that is linked to - this policy - :type id: str - :param ports: Required. The ports that were opened for the virtual machine - :type ports: list[~azure.mgmt.security.models.JitNetworkAccessRequestPort] - """ - - _validation = { - 'id': {'required': True}, - 'ports': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'ports': {'key': 'ports', 'type': '[JitNetworkAccessRequestPort]'}, - } - - def __init__(self, *, id: str, ports, **kwargs) -> None: - super(JitNetworkAccessRequestVirtualMachine, self).__init__(**kwargs) - self.id = id - self.ports = ports diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/kind.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/kind.py deleted file mode 100644 index dafce6cdd7cb..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/kind.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Kind(Model): - """Describes an Azure resource with kind. - - :param kind: Kind of the resource - :type kind: str - """ - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Kind, self).__init__(**kwargs) - self.kind = kwargs.get('kind', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/kind_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/kind_py3.py deleted file mode 100644 index d77a28e0c975..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/kind_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Kind(Model): - """Describes an Azure resource with kind. - - :param kind: Kind of the resource - :type kind: str - """ - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, *, kind: str=None, **kwargs) -> None: - super(Kind, self).__init__(**kwargs) - self.kind = kind diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/location.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/location.py deleted file mode 100644 index 852cd020018d..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/location.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Location(Model): - """Describes an Azure resource with location. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar location: Location where the resource is stored - :vartype location: str - """ - - _validation = { - 'location': {'readonly': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Location, self).__init__(**kwargs) - self.location = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/location_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/location_py3.py deleted file mode 100644 index 8203f9cdf30d..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/location_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Location(Model): - """Describes an Azure resource with location. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar location: Location where the resource is stored - :vartype location: str - """ - - _validation = { - 'location': {'readonly': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(Location, self).__init__(**kwargs) - self.location = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation.py deleted file mode 100644 index 5b91bf6bccf4..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """Possible operation in the REST API of Microsoft.Security. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Name of the operation - :vartype name: str - :ivar origin: Where the operation is originated - :vartype origin: str - :param display: - :type display: ~azure.mgmt.security.models.OperationDisplay - """ - - _validation = { - 'name': {'readonly': True}, - 'origin': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = None - self.origin = None - self.display = kwargs.get('display', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_display.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_display.py deleted file mode 100644 index 624f831a4bfe..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_display.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """Security operation display. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: The resource provider for the operation. - :vartype provider: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar operation: The display name of the security operation. - :vartype operation: str - :ivar description: The description of the operation. - :vartype description: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_display_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_display_py3.py deleted file mode 100644 index 4403ea324a9f..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_display_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """Security operation display. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: The resource provider for the operation. - :vartype provider: str - :ivar resource: The display name of the resource the operation applies to. - :vartype resource: str - :ivar operation: The display name of the security operation. - :vartype operation: str - :ivar description: The description of the operation. - :vartype description: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_paged.py deleted file mode 100644 index c9fc34cc5505..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_py3.py deleted file mode 100644 index 927bf356676d..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/operation_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """Possible operation in the REST API of Microsoft.Security. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Name of the operation - :vartype name: str - :ivar origin: Where the operation is originated - :vartype origin: str - :param display: - :type display: ~azure.mgmt.security.models.OperationDisplay - """ - - _validation = { - 'name': {'readonly': True}, - 'origin': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, *, display=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = None - self.origin = None - self.display = display diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing.py deleted file mode 100644 index 8201c965f0a5..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Pricing(Resource): - """Pricing tier will be applied for the scope based on the resource ID. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param pricing_tier: Required. The pricing tier value. Possible values - include: 'Free', 'Standard' - :type pricing_tier: str or ~azure.mgmt.security.models.PricingTier - :ivar free_trial_remaining_time: The duration left for the subscriptions - free trial period - in ISO 8601 format (e.g. P3Y6M4DT12H30M5S). - :vartype free_trial_remaining_time: timedelta - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'pricing_tier': {'required': True}, - 'free_trial_remaining_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'pricing_tier': {'key': 'properties.pricingTier', 'type': 'str'}, - 'free_trial_remaining_time': {'key': 'properties.freeTrialRemainingTime', 'type': 'duration'}, - } - - def __init__(self, **kwargs): - super(Pricing, self).__init__(**kwargs) - self.pricing_tier = kwargs.get('pricing_tier', None) - self.free_trial_remaining_time = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_list.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_list.py deleted file mode 100644 index 5c461c74609d..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_list.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PricingList(Model): - """List of pricing configurations response. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. List of pricing configurations - :type value: list[~azure.mgmt.security.models.Pricing] - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Pricing]'}, - } - - def __init__(self, **kwargs): - super(PricingList, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_list_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_list_py3.py deleted file mode 100644 index 564f6bab68b9..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_list_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PricingList(Model): - """List of pricing configurations response. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. List of pricing configurations - :type value: list[~azure.mgmt.security.models.Pricing] - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Pricing]'}, - } - - def __init__(self, *, value, **kwargs) -> None: - super(PricingList, self).__init__(**kwargs) - self.value = value diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_py3.py deleted file mode 100644 index cab29e683d39..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/pricing_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Pricing(Resource): - """Pricing tier will be applied for the scope based on the resource ID. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param pricing_tier: Required. The pricing tier value. Possible values - include: 'Free', 'Standard' - :type pricing_tier: str or ~azure.mgmt.security.models.PricingTier - :ivar free_trial_remaining_time: The duration left for the subscriptions - free trial period - in ISO 8601 format (e.g. P3Y6M4DT12H30M5S). - :vartype free_trial_remaining_time: timedelta - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'pricing_tier': {'required': True}, - 'free_trial_remaining_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'pricing_tier': {'key': 'properties.pricingTier', 'type': 'str'}, - 'free_trial_remaining_time': {'key': 'properties.freeTrialRemainingTime', 'type': 'duration'}, - } - - def __init__(self, *, pricing_tier, **kwargs) -> None: - super(Pricing, self).__init__(**kwargs) - self.pricing_tier = pricing_tier - self.free_trial_remaining_time = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/resource.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/resource.py deleted file mode 100644 index 9c6150ed498e..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/resource.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """Describes an Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/resource_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/resource_py3.py deleted file mode 100644 index d19d439b8bc0..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/resource_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """Describes an Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py deleted file mode 100644 index d075c87db018..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_center_enums.py +++ /dev/null @@ -1,98 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class PricingTier(str, Enum): - - free = "Free" #: Get free Azure security center experience with basic security features - standard = "Standard" #: Get the standard Azure security center experience with advanced security features - - -class ReportedSeverity(str, Enum): - - informational = "Informational" - low = "Low" - medium = "Medium" - high = "High" - - -class SettingKind(str, Enum): - - data_export_setting = "DataExportSetting" - alert_suppression_setting = "AlertSuppressionSetting" - - -class SecurityFamily(str, Enum): - - waf = "Waf" - ngfw = "Ngfw" - saas_waf = "SaasWaf" - va = "Va" - - -class AadConnectivityState(str, Enum): - - discovered = "Discovered" - not_licensed = "NotLicensed" - connected = "Connected" - - -class ExternalSecuritySolutionKind(str, Enum): - - cef = "CEF" - ata = "ATA" - aad = "AAD" - - -class Protocol(str, Enum): - - tcp = "TCP" - udp = "UDP" - all = "*" - - -class Status(str, Enum): - - revoked = "Revoked" - initiated = "Initiated" - - -class StatusReason(str, Enum): - - expired = "Expired" - user_requested = "UserRequested" - newer_request_initiated = "NewerRequestInitiated" - - -class AutoProvision(str, Enum): - - on = "On" #: Install missing security agent on VMs automatically - off = "Off" #: Do not install security agent on the VMs automatically - - -class AlertNotifications(str, Enum): - - on = "On" #: Get notifications on new alerts - off = "Off" #: Don't get notifications on new alerts - - -class AlertsToAdmins(str, Enum): - - on = "On" #: Send notification on new alerts to the subscription's admins - off = "Off" #: Don't send notification on new alerts to the subscription's admins - - -class ConnectionType(str, Enum): - - internal = "Internal" - external = "External" diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_contact.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_contact.py deleted file mode 100644 index 43926670b0ec..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_contact.py +++ /dev/null @@ -1,67 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class SecurityContact(Resource): - """Contact details for security issues. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param email: Required. The email of this security contact - :type email: str - :param phone: The phone number of this security contact - :type phone: str - :param alert_notifications: Required. Whether to send security alerts - notifications to the security contact. Possible values include: 'On', - 'Off' - :type alert_notifications: str or - ~azure.mgmt.security.models.AlertNotifications - :param alerts_to_admins: Required. Whether to send security alerts - notifications to subscription admins. Possible values include: 'On', 'Off' - :type alerts_to_admins: str or ~azure.mgmt.security.models.AlertsToAdmins - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'email': {'required': True}, - 'alert_notifications': {'required': True}, - 'alerts_to_admins': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'email': {'key': 'properties.email', 'type': 'str'}, - 'phone': {'key': 'properties.phone', 'type': 'str'}, - 'alert_notifications': {'key': 'properties.alertNotifications', 'type': 'str'}, - 'alerts_to_admins': {'key': 'properties.alertsToAdmins', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SecurityContact, self).__init__(**kwargs) - self.email = kwargs.get('email', None) - self.phone = kwargs.get('phone', None) - self.alert_notifications = kwargs.get('alert_notifications', None) - self.alerts_to_admins = kwargs.get('alerts_to_admins', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_contact_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_contact_paged.py deleted file mode 100644 index a422f9bd58b7..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_contact_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SecurityContactPaged(Paged): - """ - A paging container for iterating over a list of :class:`SecurityContact ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SecurityContact]'} - } - - def __init__(self, *args, **kwargs): - - super(SecurityContactPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_contact_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_contact_py3.py deleted file mode 100644 index 6a78f995545a..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_contact_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class SecurityContact(Resource): - """Contact details for security issues. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param email: Required. The email of this security contact - :type email: str - :param phone: The phone number of this security contact - :type phone: str - :param alert_notifications: Required. Whether to send security alerts - notifications to the security contact. Possible values include: 'On', - 'Off' - :type alert_notifications: str or - ~azure.mgmt.security.models.AlertNotifications - :param alerts_to_admins: Required. Whether to send security alerts - notifications to subscription admins. Possible values include: 'On', 'Off' - :type alerts_to_admins: str or ~azure.mgmt.security.models.AlertsToAdmins - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'email': {'required': True}, - 'alert_notifications': {'required': True}, - 'alerts_to_admins': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'email': {'key': 'properties.email', 'type': 'str'}, - 'phone': {'key': 'properties.phone', 'type': 'str'}, - 'alert_notifications': {'key': 'properties.alertNotifications', 'type': 'str'}, - 'alerts_to_admins': {'key': 'properties.alertsToAdmins', 'type': 'str'}, - } - - def __init__(self, *, email: str, alert_notifications, alerts_to_admins, phone: str=None, **kwargs) -> None: - super(SecurityContact, self).__init__(**kwargs) - self.email = email - self.phone = phone - self.alert_notifications = alert_notifications - self.alerts_to_admins = alerts_to_admins diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task.py deleted file mode 100644 index 239a28c5e53e..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task.py +++ /dev/null @@ -1,68 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class SecurityTask(Resource): - """Security task that we recommend to do in order to strengthen security. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar state: State of the task (Active, Resolved etc.) - :vartype state: str - :ivar creation_time_utc: The time this task was discovered in UTC - :vartype creation_time_utc: datetime - :param security_task_parameters: - :type security_task_parameters: - ~azure.mgmt.security.models.SecurityTaskParameters - :ivar last_state_change_time_utc: The time this task's details were last - changed in UTC - :vartype last_state_change_time_utc: datetime - :ivar sub_state: Additional data on the state of the task - :vartype sub_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'readonly': True}, - 'creation_time_utc': {'readonly': True}, - 'last_state_change_time_utc': {'readonly': True}, - 'sub_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'creation_time_utc': {'key': 'properties.creationTimeUtc', 'type': 'iso-8601'}, - 'security_task_parameters': {'key': 'properties.securityTaskParameters', 'type': 'SecurityTaskParameters'}, - 'last_state_change_time_utc': {'key': 'properties.lastStateChangeTimeUtc', 'type': 'iso-8601'}, - 'sub_state': {'key': 'properties.subState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SecurityTask, self).__init__(**kwargs) - self.state = None - self.creation_time_utc = None - self.security_task_parameters = kwargs.get('security_task_parameters', None) - self.last_state_change_time_utc = None - self.sub_state = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_paged.py deleted file mode 100644 index 99856db41035..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SecurityTaskPaged(Paged): - """ - A paging container for iterating over a list of :class:`SecurityTask ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SecurityTask]'} - } - - def __init__(self, *args, **kwargs): - - super(SecurityTaskPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_parameters.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_parameters.py deleted file mode 100644 index 43150ace1c41..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_parameters.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SecurityTaskParameters(Model): - """Changing set of properties, depending on the task type that is derived from - the name field. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar name: Name of the task type - :vartype name: str - """ - - _validation = { - 'name': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SecurityTaskParameters, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.name = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_parameters_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_parameters_py3.py deleted file mode 100644 index e7bbe4d7bbea..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_parameters_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SecurityTaskParameters(Model): - """Changing set of properties, depending on the task type that is derived from - the name field. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar name: Name of the task type - :vartype name: str - """ - - _validation = { - 'name': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, **kwargs) -> None: - super(SecurityTaskParameters, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.name = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_py3.py deleted file mode 100644 index d29d10479772..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/security_task_py3.py +++ /dev/null @@ -1,68 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class SecurityTask(Resource): - """Security task that we recommend to do in order to strengthen security. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar state: State of the task (Active, Resolved etc.) - :vartype state: str - :ivar creation_time_utc: The time this task was discovered in UTC - :vartype creation_time_utc: datetime - :param security_task_parameters: - :type security_task_parameters: - ~azure.mgmt.security.models.SecurityTaskParameters - :ivar last_state_change_time_utc: The time this task's details were last - changed in UTC - :vartype last_state_change_time_utc: datetime - :ivar sub_state: Additional data on the state of the task - :vartype sub_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'readonly': True}, - 'creation_time_utc': {'readonly': True}, - 'last_state_change_time_utc': {'readonly': True}, - 'sub_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'creation_time_utc': {'key': 'properties.creationTimeUtc', 'type': 'iso-8601'}, - 'security_task_parameters': {'key': 'properties.securityTaskParameters', 'type': 'SecurityTaskParameters'}, - 'last_state_change_time_utc': {'key': 'properties.lastStateChangeTimeUtc', 'type': 'iso-8601'}, - 'sub_state': {'key': 'properties.subState', 'type': 'str'}, - } - - def __init__(self, *, security_task_parameters=None, **kwargs) -> None: - super(SecurityTask, self).__init__(**kwargs) - self.state = None - self.creation_time_utc = None - self.security_task_parameters = security_task_parameters - self.last_state_change_time_utc = None - self.sub_state = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/sensitivity_label.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/sensitivity_label.py deleted file mode 100644 index 09fd4a0bee30..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/sensitivity_label.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SensitivityLabel(Model): - """The sensitivity label. - - :param display_name: The name of the sensitivity label. - :type display_name: str - :param order: The order of the sensitivity label. - :type order: float - :param enabled: Indicates whether the label is enabled or not. - :type enabled: bool - """ - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'order': {'key': 'order', 'type': 'float'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(SensitivityLabel, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - self.order = kwargs.get('order', None) - self.enabled = kwargs.get('enabled', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/sensitivity_label_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/sensitivity_label_py3.py deleted file mode 100644 index 79b0766f48c8..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/sensitivity_label_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SensitivityLabel(Model): - """The sensitivity label. - - :param display_name: The name of the sensitivity label. - :type display_name: str - :param order: The order of the sensitivity label. - :type order: float - :param enabled: Indicates whether the label is enabled or not. - :type enabled: bool - """ - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'order': {'key': 'order', 'type': 'float'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - } - - def __init__(self, *, display_name: str=None, order: float=None, enabled: bool=None, **kwargs) -> None: - super(SensitivityLabel, self).__init__(**kwargs) - self.display_name = display_name - self.order = order - self.enabled = enabled diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting.py deleted file mode 100644 index 9dd2c8f9944c..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .setting_resource import SettingResource - - -class Setting(SettingResource): - """Represents a security setting in Azure Security Center. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param kind: Required. the kind of the settings string - (DataExportSetting). Possible values include: 'DataExportSetting', - 'AlertSuppressionSetting' - :type kind: str or ~azure.mgmt.security.models.SettingKind - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Setting, self).__init__(**kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_paged.py deleted file mode 100644 index 5ab8b2585b4a..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SettingPaged(Paged): - """ - A paging container for iterating over a list of :class:`Setting ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Setting]'} - } - - def __init__(self, *args, **kwargs): - - super(SettingPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_py3.py deleted file mode 100644 index 0611d4ebdd49..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .setting_resource_py3 import SettingResource - - -class Setting(SettingResource): - """Represents a security setting in Azure Security Center. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param kind: Required. the kind of the settings string - (DataExportSetting). Possible values include: 'DataExportSetting', - 'AlertSuppressionSetting' - :type kind: str or ~azure.mgmt.security.models.SettingKind - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, *, kind, **kwargs) -> None: - super(Setting, self).__init__(kind=kind, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_resource.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_resource.py deleted file mode 100644 index d20bda7cab66..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_resource.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class SettingResource(Resource): - """The kind of the security setting. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param kind: Required. the kind of the settings string - (DataExportSetting). Possible values include: 'DataExportSetting', - 'AlertSuppressionSetting' - :type kind: str or ~azure.mgmt.security.models.SettingKind - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SettingResource, self).__init__(**kwargs) - self.kind = kwargs.get('kind', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_resource_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_resource_py3.py deleted file mode 100644 index 4feeff7166c5..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/setting_resource_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class SettingResource(Resource): - """The kind of the security setting. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param kind: Required. the kind of the settings string - (DataExportSetting). Possible values include: 'DataExportSetting', - 'AlertSuppressionSetting' - :type kind: str or ~azure.mgmt.security.models.SettingKind - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, *, kind, **kwargs) -> None: - super(SettingResource, self).__init__(**kwargs) - self.kind = kind diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_resource.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_resource.py deleted file mode 100644 index 6bf07b3d3164..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_resource.py +++ /dev/null @@ -1,63 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TopologyResource(Model): - """TopologyResource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar location: Location where the resource is stored - :vartype location: str - :ivar calculated_date_time: The UTC time on which the topology was - calculated - :vartype calculated_date_time: datetime - :ivar topology_resources: Azure resources which are part of this topology - resource - :vartype topology_resources: - list[~azure.mgmt.security.models.TopologySingleResource] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'calculated_date_time': {'readonly': True}, - 'topology_resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'calculated_date_time': {'key': 'properties.calculatedDateTime', 'type': 'iso-8601'}, - 'topology_resources': {'key': 'properties.topologyResources', 'type': '[TopologySingleResource]'}, - } - - def __init__(self, **kwargs): - super(TopologyResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = None - self.calculated_date_time = None - self.topology_resources = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_resource_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_resource_paged.py deleted file mode 100644 index 8c104aa5970a..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_resource_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class TopologyResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`TopologyResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[TopologyResource]'} - } - - def __init__(self, *args, **kwargs): - - super(TopologyResourcePaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_resource_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_resource_py3.py deleted file mode 100644 index 00cca774a552..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_resource_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TopologyResource(Model): - """TopologyResource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar location: Location where the resource is stored - :vartype location: str - :ivar calculated_date_time: The UTC time on which the topology was - calculated - :vartype calculated_date_time: datetime - :ivar topology_resources: Azure resources which are part of this topology - resource - :vartype topology_resources: - list[~azure.mgmt.security.models.TopologySingleResource] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'calculated_date_time': {'readonly': True}, - 'topology_resources': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'calculated_date_time': {'key': 'properties.calculatedDateTime', 'type': 'iso-8601'}, - 'topology_resources': {'key': 'properties.topologyResources', 'type': '[TopologySingleResource]'}, - } - - def __init__(self, **kwargs) -> None: - super(TopologyResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = None - self.calculated_date_time = None - self.topology_resources = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource.py deleted file mode 100644 index f79f4c0f1a73..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource.py +++ /dev/null @@ -1,76 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TopologySingleResource(Model): - """TopologySingleResource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_id: Azure resource id - :vartype resource_id: str - :ivar severity: The security severity of the resource - :vartype severity: str - :ivar recommendations_exist: Indicates if the resource has security - recommendations - :vartype recommendations_exist: bool - :ivar network_zones: Indicates the resource connectivity level to the - Internet (InternetFacing, Internal ,etc.) - :vartype network_zones: str - :ivar topology_score: Score of the resource based on its security severity - :vartype topology_score: int - :ivar location: The location of this resource - :vartype location: str - :ivar parents: Azure resources connected to this resource which are in - higher level in the topology view - :vartype parents: - list[~azure.mgmt.security.models.TopologySingleResourceParent] - :ivar children: Azure resources connected to this resource which are in - lower level in the topology view - :vartype children: - list[~azure.mgmt.security.models.TopologySingleResourceChild] - """ - - _validation = { - 'resource_id': {'readonly': True}, - 'severity': {'readonly': True}, - 'recommendations_exist': {'readonly': True}, - 'network_zones': {'readonly': True}, - 'topology_score': {'readonly': True}, - 'location': {'readonly': True}, - 'parents': {'readonly': True}, - 'children': {'readonly': True}, - } - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'severity': {'key': 'severity', 'type': 'str'}, - 'recommendations_exist': {'key': 'recommendationsExist', 'type': 'bool'}, - 'network_zones': {'key': 'networkZones', 'type': 'str'}, - 'topology_score': {'key': 'topologyScore', 'type': 'int'}, - 'location': {'key': 'location', 'type': 'str'}, - 'parents': {'key': 'parents', 'type': '[TopologySingleResourceParent]'}, - 'children': {'key': 'children', 'type': '[TopologySingleResourceChild]'}, - } - - def __init__(self, **kwargs): - super(TopologySingleResource, self).__init__(**kwargs) - self.resource_id = None - self.severity = None - self.recommendations_exist = None - self.network_zones = None - self.topology_score = None - self.location = None - self.parents = None - self.children = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_child.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_child.py deleted file mode 100644 index 257d81aab76d..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_child.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TopologySingleResourceChild(Model): - """TopologySingleResourceChild. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_id: Azure resource id which serves as child resource in - topology view - :vartype resource_id: str - """ - - _validation = { - 'resource_id': {'readonly': True}, - } - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TopologySingleResourceChild, self).__init__(**kwargs) - self.resource_id = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_child_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_child_py3.py deleted file mode 100644 index a4e41c33fe64..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_child_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TopologySingleResourceChild(Model): - """TopologySingleResourceChild. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_id: Azure resource id which serves as child resource in - topology view - :vartype resource_id: str - """ - - _validation = { - 'resource_id': {'readonly': True}, - } - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(TopologySingleResourceChild, self).__init__(**kwargs) - self.resource_id = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_parent.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_parent.py deleted file mode 100644 index c79aba299feb..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_parent.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TopologySingleResourceParent(Model): - """TopologySingleResourceParent. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_id: Azure resource id which serves as parent resource in - topology view - :vartype resource_id: str - """ - - _validation = { - 'resource_id': {'readonly': True}, - } - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TopologySingleResourceParent, self).__init__(**kwargs) - self.resource_id = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_parent_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_parent_py3.py deleted file mode 100644 index 6249dcea8849..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_parent_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TopologySingleResourceParent(Model): - """TopologySingleResourceParent. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_id: Azure resource id which serves as parent resource in - topology view - :vartype resource_id: str - """ - - _validation = { - 'resource_id': {'readonly': True}, - } - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(TopologySingleResourceParent, self).__init__(**kwargs) - self.resource_id = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_py3.py deleted file mode 100644 index 529974e5619a..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/topology_single_resource_py3.py +++ /dev/null @@ -1,76 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TopologySingleResource(Model): - """TopologySingleResource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar resource_id: Azure resource id - :vartype resource_id: str - :ivar severity: The security severity of the resource - :vartype severity: str - :ivar recommendations_exist: Indicates if the resource has security - recommendations - :vartype recommendations_exist: bool - :ivar network_zones: Indicates the resource connectivity level to the - Internet (InternetFacing, Internal ,etc.) - :vartype network_zones: str - :ivar topology_score: Score of the resource based on its security severity - :vartype topology_score: int - :ivar location: The location of this resource - :vartype location: str - :ivar parents: Azure resources connected to this resource which are in - higher level in the topology view - :vartype parents: - list[~azure.mgmt.security.models.TopologySingleResourceParent] - :ivar children: Azure resources connected to this resource which are in - lower level in the topology view - :vartype children: - list[~azure.mgmt.security.models.TopologySingleResourceChild] - """ - - _validation = { - 'resource_id': {'readonly': True}, - 'severity': {'readonly': True}, - 'recommendations_exist': {'readonly': True}, - 'network_zones': {'readonly': True}, - 'topology_score': {'readonly': True}, - 'location': {'readonly': True}, - 'parents': {'readonly': True}, - 'children': {'readonly': True}, - } - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'severity': {'key': 'severity', 'type': 'str'}, - 'recommendations_exist': {'key': 'recommendationsExist', 'type': 'bool'}, - 'network_zones': {'key': 'networkZones', 'type': 'str'}, - 'topology_score': {'key': 'topologyScore', 'type': 'int'}, - 'location': {'key': 'location', 'type': 'str'}, - 'parents': {'key': 'parents', 'type': '[TopologySingleResourceParent]'}, - 'children': {'key': 'children', 'type': '[TopologySingleResourceChild]'}, - } - - def __init__(self, **kwargs) -> None: - super(TopologySingleResource, self).__init__(**kwargs) - self.resource_id = None - self.severity = None - self.recommendations_exist = None - self.network_zones = None - self.topology_score = None - self.location = None - self.parents = None - self.children = None diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/workspace_setting.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/workspace_setting.py deleted file mode 100644 index 327a5b9d8897..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/workspace_setting.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class WorkspaceSetting(Resource): - """Configures where to store the OMS agent data for workspaces under a scope. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param workspace_id: Required. The full Azure ID of the workspace to save - the data in - :type workspace_id: str - :param scope: Required. All the VMs in this scope will send their security - data to the mentioned workspace unless overridden by a setting with more - specific scope - :type scope: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'workspace_id': {'required': True}, - 'scope': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'}, - 'scope': {'key': 'properties.scope', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WorkspaceSetting, self).__init__(**kwargs) - self.workspace_id = kwargs.get('workspace_id', None) - self.scope = kwargs.get('scope', None) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/workspace_setting_paged.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/workspace_setting_paged.py deleted file mode 100644 index 95122f57b90e..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/workspace_setting_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class WorkspaceSettingPaged(Paged): - """ - A paging container for iterating over a list of :class:`WorkspaceSetting ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[WorkspaceSetting]'} - } - - def __init__(self, *args, **kwargs): - - super(WorkspaceSettingPaged, self).__init__(*args, **kwargs) diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/workspace_setting_py3.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/models/workspace_setting_py3.py deleted file mode 100644 index aaa1be0b59a9..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/models/workspace_setting_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class WorkspaceSetting(Resource): - """Configures where to store the OMS agent data for workspaces under a scope. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param workspace_id: Required. The full Azure ID of the workspace to save - the data in - :type workspace_id: str - :param scope: Required. All the VMs in this scope will send their security - data to the mentioned workspace unless overridden by a setting with more - specific scope - :type scope: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'workspace_id': {'required': True}, - 'scope': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'}, - 'scope': {'key': 'properties.scope', 'type': 'str'}, - } - - def __init__(self, *, workspace_id: str, scope: str, **kwargs) -> None: - super(WorkspaceSetting, self).__init__(**kwargs) - self.workspace_id = workspace_id - self.scope = scope diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/__init__.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/__init__.py index 23522fd792f8..525ecec68e49 100644 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/__init__.py +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/__init__.py @@ -9,25 +9,40 @@ # regenerated. # -------------------------------------------------------------------------- -from .pricings_operations import PricingsOperations -from .alerts_operations import AlertsOperations -from .settings_operations import SettingsOperations -from .allowed_connections_operations import AllowedConnectionsOperations -from .discovered_security_solutions_operations import DiscoveredSecuritySolutionsOperations -from .external_security_solutions_operations import ExternalSecuritySolutionsOperations -from .jit_network_access_policies_operations import JitNetworkAccessPoliciesOperations -from .locations_operations import LocationsOperations -from .operations import Operations -from .tasks_operations import TasksOperations -from .topology_operations import TopologyOperations -from .advanced_threat_protection_operations import AdvancedThreatProtectionOperations -from .auto_provisioning_settings_operations import AutoProvisioningSettingsOperations -from .compliances_operations import CompliancesOperations -from .information_protection_policies_operations import InformationProtectionPoliciesOperations -from .security_contacts_operations import SecurityContactsOperations -from .workspace_settings_operations import WorkspaceSettingsOperations +from ._compliance_results_operations import ComplianceResultsOperations +from ._pricings_operations import PricingsOperations +from ._alerts_operations import AlertsOperations +from ._settings_operations import SettingsOperations +from ._allowed_connections_operations import AllowedConnectionsOperations +from ._discovered_security_solutions_operations import DiscoveredSecuritySolutionsOperations +from ._external_security_solutions_operations import ExternalSecuritySolutionsOperations +from ._jit_network_access_policies_operations import JitNetworkAccessPoliciesOperations +from ._adaptive_application_controls_operations import AdaptiveApplicationControlsOperations +from ._locations_operations import LocationsOperations +from ._operations import Operations +from ._tasks_operations import TasksOperations +from ._topology_operations import TopologyOperations +from ._advanced_threat_protection_operations import AdvancedThreatProtectionOperations +from ._auto_provisioning_settings_operations import AutoProvisioningSettingsOperations +from ._compliances_operations import CompliancesOperations +from ._information_protection_policies_operations import InformationProtectionPoliciesOperations +from ._security_contacts_operations import SecurityContactsOperations +from ._workspace_settings_operations import WorkspaceSettingsOperations +from ._io_tsecurity_solutions_operations import IoTSecuritySolutionsOperations +from ._io_tsecurity_solutions_resource_group_operations import IoTSecuritySolutionsResourceGroupOperations +from ._iot_security_solution_operations import IotSecuritySolutionOperations +from ._io_tsecurity_solutions_analytics_operations import IoTSecuritySolutionsAnalyticsOperations +from ._io_tsecurity_solutions_analytics_aggregated_alerts_operations import IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations +from ._io_tsecurity_solutions_analytics_aggregated_alert_operations import IoTSecuritySolutionsAnalyticsAggregatedAlertOperations +from ._io_tsecurity_solutions_analytics_recommendation_operations import IoTSecuritySolutionsAnalyticsRecommendationOperations +from ._io_tsecurity_solutions_analytics_recommendations_operations import IoTSecuritySolutionsAnalyticsRecommendationsOperations +from ._regulatory_compliance_standards_operations import RegulatoryComplianceStandardsOperations +from ._regulatory_compliance_controls_operations import RegulatoryComplianceControlsOperations +from ._regulatory_compliance_assessments_operations import RegulatoryComplianceAssessmentsOperations +from ._server_vulnerability_assessment_operations import ServerVulnerabilityAssessmentOperations __all__ = [ + 'ComplianceResultsOperations', 'PricingsOperations', 'AlertsOperations', 'SettingsOperations', @@ -35,6 +50,7 @@ 'DiscoveredSecuritySolutionsOperations', 'ExternalSecuritySolutionsOperations', 'JitNetworkAccessPoliciesOperations', + 'AdaptiveApplicationControlsOperations', 'LocationsOperations', 'Operations', 'TasksOperations', @@ -45,4 +61,16 @@ 'InformationProtectionPoliciesOperations', 'SecurityContactsOperations', 'WorkspaceSettingsOperations', + 'IoTSecuritySolutionsOperations', + 'IoTSecuritySolutionsResourceGroupOperations', + 'IotSecuritySolutionOperations', + 'IoTSecuritySolutionsAnalyticsOperations', + 'IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations', + 'IoTSecuritySolutionsAnalyticsAggregatedAlertOperations', + 'IoTSecuritySolutionsAnalyticsRecommendationOperations', + 'IoTSecuritySolutionsAnalyticsRecommendationsOperations', + 'RegulatoryComplianceStandardsOperations', + 'RegulatoryComplianceControlsOperations', + 'RegulatoryComplianceAssessmentsOperations', + 'ServerVulnerabilityAssessmentOperations', ] diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_adaptive_application_controls_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_adaptive_application_controls_operations.py new file mode 100644 index 000000000000..bab90ed88dee --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_adaptive_application_controls_operations.py @@ -0,0 +1,228 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class AdaptiveApplicationControlsOperations(object): + """AdaptiveApplicationControlsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2015-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-06-01-preview" + + self.config = config + + def list( + self, include_path_recommendations=None, summary=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of application control VM/server groups for the + subscription. + + :param include_path_recommendations: Include the policy rules + :type include_path_recommendations: bool + :param summary: Return output in a summarized form + :type summary: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppWhitelistingGroups or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.AppWhitelistingGroups or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if include_path_recommendations is not None: + query_parameters['includePathRecommendations'] = self._serialize.query("include_path_recommendations", include_path_recommendations, 'bool') + if summary is not None: + query_parameters['summary'] = self._serialize.query("summary", summary, 'bool') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppWhitelistingGroups', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/applicationWhitelistings'} + + def get( + self, group_name, custom_headers=None, raw=False, **operation_config): + """Gets an application control VM/server group. + + :param group_name: Name of an application control VM/server group + :type group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppWhitelistingGroup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.AppWhitelistingGroup or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppWhitelistingGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName}'} + + def put( + self, group_name, body, custom_headers=None, raw=False, **operation_config): + """Update an application control VM/server group. + + :param group_name: Name of an application control VM/server group + :type group_name: str + :param body: The updated VM/server group data + :type body: ~azure.mgmt.security.models.AppWhitelistingPutGroupData + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppWhitelistingGroup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.AppWhitelistingGroup or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.put.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(body, 'AppWhitelistingPutGroupData') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AppWhitelistingGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + put.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_advanced_threat_protection_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_advanced_threat_protection_operations.py new file mode 100644 index 000000000000..57930d189083 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_advanced_threat_protection_operations.py @@ -0,0 +1,171 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class AdvancedThreatProtectionOperations(object): + """AdvancedThreatProtectionOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2017-08-01-preview". + :ivar setting_name: Advanced Threat Protection setting name. Constant value: "current". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-08-01-preview" + self.setting_name = "current" + + self.config = config + + def get( + self, resource_id, custom_headers=None, raw=False, **operation_config): + """Gets the Advanced Threat Protection settings for the specified + resource. + + :param resource_id: The identifier of the resource. + :type resource_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AdvancedThreatProtectionSetting or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.security.models.AdvancedThreatProtectionSetting or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceId': self._serialize.url("resource_id", resource_id, 'str'), + 'settingName': self._serialize.url("self.setting_name", self.setting_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AdvancedThreatProtectionSetting', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/{resourceId}/providers/Microsoft.Security/advancedThreatProtectionSettings/{settingName}'} + + def create( + self, resource_id, is_enabled=None, custom_headers=None, raw=False, **operation_config): + """Creates or updates the Advanced Threat Protection settings on a + specified resource. + + :param resource_id: The identifier of the resource. + :type resource_id: str + :param is_enabled: Indicates whether Advanced Threat Protection is + enabled. + :type is_enabled: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AdvancedThreatProtectionSetting or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.security.models.AdvancedThreatProtectionSetting or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + advanced_threat_protection_setting = models.AdvancedThreatProtectionSetting(is_enabled=is_enabled) + + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'resourceId': self._serialize.url("resource_id", resource_id, 'str'), + 'settingName': self._serialize.url("self.setting_name", self.setting_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(advanced_threat_protection_setting, 'AdvancedThreatProtectionSetting') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AdvancedThreatProtectionSetting', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create.metadata = {'url': '/{resourceId}/providers/Microsoft.Security/advancedThreatProtectionSettings/{settingName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_alerts_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_alerts_operations.py new file mode 100644 index 000000000000..984144031f99 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_alerts_operations.py @@ -0,0 +1,601 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class AlertsOperations(object): + """AlertsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list( + self, filter=None, select=None, expand=None, custom_headers=None, raw=False, **operation_config): + """List all the alerts that are associated with the subscription. + + :param filter: OData filter. Optional. + :type filter: str + :param select: OData select. Optional. + :type select: str + :param expand: OData expand. Optional. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Alert + :rtype: + ~azure.mgmt.security.models.AlertPaged[~azure.mgmt.security.models.Alert] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if select is not None: + query_parameters['$select'] = self._serialize.query("select", select, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/alerts'} + + def list_by_resource_group( + self, resource_group_name, filter=None, select=None, expand=None, custom_headers=None, raw=False, **operation_config): + """List all the alerts that are associated with the resource group. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param filter: OData filter. Optional. + :type filter: str + :param select: OData select. Optional. + :type select: str + :param expand: OData expand. Optional. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Alert + :rtype: + ~azure.mgmt.security.models.AlertPaged[~azure.mgmt.security.models.Alert] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if select is not None: + query_parameters['$select'] = self._serialize.query("select", select, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/alerts'} + + def list_subscription_level_alerts_by_region( + self, filter=None, select=None, expand=None, custom_headers=None, raw=False, **operation_config): + """List all the alerts that are associated with the subscription that are + stored in a specific location. + + :param filter: OData filter. Optional. + :type filter: str + :param select: OData select. Optional. + :type select: str + :param expand: OData expand. Optional. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Alert + :rtype: + ~azure.mgmt.security.models.AlertPaged[~azure.mgmt.security.models.Alert] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_subscription_level_alerts_by_region.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if select is not None: + query_parameters['$select'] = self._serialize.query("select", select, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_subscription_level_alerts_by_region.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts'} + + def list_resource_group_level_alerts_by_region( + self, resource_group_name, filter=None, select=None, expand=None, custom_headers=None, raw=False, **operation_config): + """List all the alerts that are associated with the resource group that + are stored in a specific location. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param filter: OData filter. Optional. + :type filter: str + :param select: OData select. Optional. + :type select: str + :param expand: OData expand. Optional. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Alert + :rtype: + ~azure.mgmt.security.models.AlertPaged[~azure.mgmt.security.models.Alert] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_resource_group_level_alerts_by_region.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if select is not None: + query_parameters['$select'] = self._serialize.query("select", select, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_resource_group_level_alerts_by_region.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts'} + + def get_subscription_level_alert( + self, alert_name, custom_headers=None, raw=False, **operation_config): + """Get an alert that is associated with a subscription. + + :param alert_name: Name of the alert object + :type alert_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Alert or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.Alert or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_subscription_level_alert.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), + 'alertName': self._serialize.url("alert_name", alert_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Alert', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_subscription_level_alert.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}'} + + def get_resource_group_level_alerts( + self, alert_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Get an alert that is associated a resource group or a resource in a + resource group. + + :param alert_name: Name of the alert object + :type alert_name: str + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Alert or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.Alert or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_resource_group_level_alerts.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), + 'alertName': self._serialize.url("alert_name", alert_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Alert', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_resource_group_level_alerts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}'} + + def update_subscription_level_alert_state( + self, alert_name, alert_update_action_type, custom_headers=None, raw=False, **operation_config): + """Update the alert's state. + + :param alert_name: Name of the alert object + :type alert_name: str + :param alert_update_action_type: Type of the action to do on the + alert. Possible values include: 'Dismiss', 'Reactivate' + :type alert_update_action_type: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_subscription_level_alert_state.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), + 'alertName': self._serialize.url("alert_name", alert_name, 'str'), + 'alertUpdateActionType': self._serialize.url("alert_update_action_type", alert_update_action_type, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update_subscription_level_alert_state.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/{alertUpdateActionType}'} + + def update_resource_group_level_alert_state( + self, alert_name, alert_update_action_type, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Update the alert's state. + + :param alert_name: Name of the alert object + :type alert_name: str + :param alert_update_action_type: Type of the action to do on the + alert. Possible values include: 'Dismiss', 'Reactivate' + :type alert_update_action_type: str + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_resource_group_level_alert_state.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), + 'alertName': self._serialize.url("alert_name", alert_name, 'str'), + 'alertUpdateActionType': self._serialize.url("alert_update_action_type", alert_update_action_type, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update_resource_group_level_alert_state.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/{alertUpdateActionType}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_allowed_connections_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_allowed_connections_operations.py new file mode 100644 index 000000000000..8aa4cd8ba546 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_allowed_connections_operations.py @@ -0,0 +1,241 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class AllowedConnectionsOperations(object): + """AllowedConnectionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2015-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-06-01-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets the list of all possible traffic between resources for the + subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AllowedConnectionsResource + :rtype: + ~azure.mgmt.security.models.AllowedConnectionsResourcePaged[~azure.mgmt.security.models.AllowedConnectionsResource] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AllowedConnectionsResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/allowedConnections'} + + def list_by_home_region( + self, custom_headers=None, raw=False, **operation_config): + """Gets the list of all possible traffic between resources for the + subscription and location. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AllowedConnectionsResource + :rtype: + ~azure.mgmt.security.models.AllowedConnectionsResourcePaged[~azure.mgmt.security.models.AllowedConnectionsResource] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_home_region.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AllowedConnectionsResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_home_region.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/allowedConnections'} + + def get( + self, resource_group_name, connection_type, custom_headers=None, raw=False, **operation_config): + """Gets the list of all possible traffic between resources for the + subscription and location, based on connection type. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param connection_type: The type of allowed connections (Internal, + External). Possible values include: 'Internal', 'External' + :type connection_type: str or + ~azure.mgmt.security.models.ConnectionType + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AllowedConnectionsResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.AllowedConnectionsResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), + 'connectionType': self._serialize.url("connection_type", connection_type, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AllowedConnectionsResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/allowedConnections/{connectionType}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_auto_provisioning_settings_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_auto_provisioning_settings_operations.py new file mode 100644 index 000000000000..3390cc0eb08b --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_auto_provisioning_settings_operations.py @@ -0,0 +1,231 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class AutoProvisioningSettingsOperations(object): + """AutoProvisioningSettingsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2017-08-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-08-01-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Exposes the auto provisioning settings of the subscriptions. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AutoProvisioningSetting + :rtype: + ~azure.mgmt.security.models.AutoProvisioningSettingPaged[~azure.mgmt.security.models.AutoProvisioningSetting] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AutoProvisioningSettingPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/autoProvisioningSettings'} + + def get( + self, setting_name, custom_headers=None, raw=False, **operation_config): + """Details of a specific setting. + + :param setting_name: Auto provisioning setting key + :type setting_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AutoProvisioningSetting or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.AutoProvisioningSetting or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'settingName': self._serialize.url("setting_name", setting_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AutoProvisioningSetting', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/autoProvisioningSettings/{settingName}'} + + def create( + self, setting_name, auto_provision, custom_headers=None, raw=False, **operation_config): + """Details of a specific setting. + + :param setting_name: Auto provisioning setting key + :type setting_name: str + :param auto_provision: Describes what kind of security agent + provisioning action to take. Possible values include: 'On', 'Off' + :type auto_provision: str or ~azure.mgmt.security.models.AutoProvision + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AutoProvisioningSetting or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.AutoProvisioningSetting or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + setting = models.AutoProvisioningSetting(auto_provision=auto_provision) + + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'settingName': self._serialize.url("setting_name", setting_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(setting, 'AutoProvisioningSetting') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AutoProvisioningSetting', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/autoProvisioningSettings/{settingName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_compliance_results_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_compliance_results_operations.py new file mode 100644 index 000000000000..9b163bbbb1e0 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_compliance_results_operations.py @@ -0,0 +1,171 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ComplianceResultsOperations(object): + """ComplianceResultsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2017-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-08-01" + + self.config = config + + def list( + self, scope, custom_headers=None, raw=False, **operation_config): + """Security compliance results in the subscription. + + :param scope: Scope of the query, can be subscription + (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management + group (/providers/Microsoft.Management/managementGroups/mgName). + :type scope: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ComplianceResult + :rtype: + ~azure.mgmt.security.models.ComplianceResultPaged[~azure.mgmt.security.models.ComplianceResult] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ComplianceResultPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/{scope}/providers/Microsoft.Security/complianceResults'} + + def get( + self, resource_id, compliance_result_name, custom_headers=None, raw=False, **operation_config): + """Security Compliance Result. + + :param resource_id: The identifier of the resource. + :type resource_id: str + :param compliance_result_name: name of the desired assessment + compliance result + :type compliance_result_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ComplianceResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.ComplianceResult or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceId': self._serialize.url("resource_id", resource_id, 'str'), + 'complianceResultName': self._serialize.url("compliance_result_name", compliance_result_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ComplianceResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/{resourceId}/providers/Microsoft.Security/complianceResults/{complianceResultName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_compliances_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_compliances_operations.py new file mode 100644 index 000000000000..90e921623526 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_compliances_operations.py @@ -0,0 +1,172 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class CompliancesOperations(object): + """CompliancesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2017-08-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-08-01-preview" + + self.config = config + + def list( + self, scope, custom_headers=None, raw=False, **operation_config): + """The Compliance scores of the specific management group. + + :param scope: Scope of the query, can be subscription + (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management + group (/providers/Microsoft.Management/managementGroups/mgName). + :type scope: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Compliance + :rtype: + ~azure.mgmt.security.models.CompliancePaged[~azure.mgmt.security.models.Compliance] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CompliancePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/{scope}/providers/Microsoft.Security/compliances'} + + def get( + self, scope, compliance_name, custom_headers=None, raw=False, **operation_config): + """Details of a specific Compliance. + + :param scope: Scope of the query, can be subscription + (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management + group (/providers/Microsoft.Management/managementGroups/mgName). + :type scope: str + :param compliance_name: name of the Compliance + :type compliance_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Compliance or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.Compliance or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str'), + 'complianceName': self._serialize.url("compliance_name", compliance_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Compliance', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/{scope}/providers/Microsoft.Security/compliances/{complianceName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_discovered_security_solutions_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_discovered_security_solutions_operations.py new file mode 100644 index 000000000000..bd553e4567fd --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_discovered_security_solutions_operations.py @@ -0,0 +1,238 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class DiscoveredSecuritySolutionsOperations(object): + """DiscoveredSecuritySolutionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2015-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-06-01-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets a list of discovered Security Solutions for the subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DiscoveredSecuritySolution + :rtype: + ~azure.mgmt.security.models.DiscoveredSecuritySolutionPaged[~azure.mgmt.security.models.DiscoveredSecuritySolution] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DiscoveredSecuritySolutionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/discoveredSecuritySolutions'} + + def list_by_home_region( + self, custom_headers=None, raw=False, **operation_config): + """Gets a list of discovered Security Solutions for the subscription and + location. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DiscoveredSecuritySolution + :rtype: + ~azure.mgmt.security.models.DiscoveredSecuritySolutionPaged[~azure.mgmt.security.models.DiscoveredSecuritySolution] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_home_region.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DiscoveredSecuritySolutionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_home_region.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/discoveredSecuritySolutions'} + + def get( + self, resource_group_name, discovered_security_solution_name, custom_headers=None, raw=False, **operation_config): + """Gets a specific discovered Security Solution. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param discovered_security_solution_name: Name of a discovered + security solution. + :type discovered_security_solution_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiscoveredSecuritySolution or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.DiscoveredSecuritySolution or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), + 'discoveredSecuritySolutionName': self._serialize.url("discovered_security_solution_name", discovered_security_solution_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DiscoveredSecuritySolution', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/discoveredSecuritySolutions/{discoveredSecuritySolutionName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_external_security_solutions_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_external_security_solutions_operations.py new file mode 100644 index 000000000000..69b6019e5e25 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_external_security_solutions_operations.py @@ -0,0 +1,238 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ExternalSecuritySolutionsOperations(object): + """ExternalSecuritySolutionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2015-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-06-01-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets a list of external security solutions for the subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ExternalSecuritySolution + :rtype: + ~azure.mgmt.security.models.ExternalSecuritySolutionPaged[~azure.mgmt.security.models.ExternalSecuritySolution] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ExternalSecuritySolutionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/externalSecuritySolutions'} + + def list_by_home_region( + self, custom_headers=None, raw=False, **operation_config): + """Gets a list of external Security Solutions for the subscription and + location. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ExternalSecuritySolution + :rtype: + ~azure.mgmt.security.models.ExternalSecuritySolutionPaged[~azure.mgmt.security.models.ExternalSecuritySolution] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_home_region.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ExternalSecuritySolutionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_home_region.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/ExternalSecuritySolutions'} + + def get( + self, resource_group_name, external_security_solutions_name, custom_headers=None, raw=False, **operation_config): + """Gets a specific external Security Solution. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param external_security_solutions_name: Name of an external security + solution. + :type external_security_solutions_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ExternalSecuritySolution or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.ExternalSecuritySolution or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), + 'externalSecuritySolutionsName': self._serialize.url("external_security_solutions_name", external_security_solutions_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ExternalSecuritySolution', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/ExternalSecuritySolutions/{externalSecuritySolutionsName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_information_protection_policies_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_information_protection_policies_operations.py new file mode 100644 index 000000000000..9ee97c1bbf93 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_information_protection_policies_operations.py @@ -0,0 +1,238 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class InformationProtectionPoliciesOperations(object): + """InformationProtectionPoliciesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2017-08-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-08-01-preview" + + self.config = config + + def get( + self, scope, information_protection_policy_name, custom_headers=None, raw=False, **operation_config): + """Details of the information protection policy. + + :param scope: Scope of the query, can be subscription + (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management + group (/providers/Microsoft.Management/managementGroups/mgName). + :type scope: str + :param information_protection_policy_name: Name of the information + protection policy. Possible values include: 'effective', 'custom' + :type information_protection_policy_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: InformationProtectionPolicy or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.InformationProtectionPolicy or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str'), + 'informationProtectionPolicyName': self._serialize.url("information_protection_policy_name", information_protection_policy_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('InformationProtectionPolicy', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/{scope}/providers/Microsoft.Security/informationProtectionPolicies/{informationProtectionPolicyName}'} + + def create_or_update( + self, scope, information_protection_policy_name, custom_headers=None, raw=False, **operation_config): + """Details of the information protection policy. + + :param scope: Scope of the query, can be subscription + (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management + group (/providers/Microsoft.Management/managementGroups/mgName). + :type scope: str + :param information_protection_policy_name: Name of the information + protection policy. Possible values include: 'effective', 'custom' + :type information_protection_policy_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: InformationProtectionPolicy or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.InformationProtectionPolicy or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str'), + 'informationProtectionPolicyName': self._serialize.url("information_protection_policy_name", information_protection_policy_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('InformationProtectionPolicy', response) + if response.status_code == 201: + deserialized = self._deserialize('InformationProtectionPolicy', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/{scope}/providers/Microsoft.Security/informationProtectionPolicies/{informationProtectionPolicyName}'} + + def list( + self, scope, custom_headers=None, raw=False, **operation_config): + """Information protection policies of a specific management group. + + :param scope: Scope of the query, can be subscription + (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management + group (/providers/Microsoft.Management/managementGroups/mgName). + :type scope: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of InformationProtectionPolicy + :rtype: + ~azure.mgmt.security.models.InformationProtectionPolicyPaged[~azure.mgmt.security.models.InformationProtectionPolicy] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.InformationProtectionPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/{scope}/providers/Microsoft.Security/informationProtectionPolicies'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_aggregated_alert_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_aggregated_alert_operations.py new file mode 100644 index 000000000000..4662adf48a3c --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_aggregated_alert_operations.py @@ -0,0 +1,162 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IoTSecuritySolutionsAnalyticsAggregatedAlertOperations(object): + """IoTSecuritySolutionsAnalyticsAggregatedAlertOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2017-08-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-08-01-preview" + + self.config = config + + def get( + self, resource_group_name, solution_name, aggregated_alert_name, custom_headers=None, raw=False, **operation_config): + """Security Analytics of a security solution. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param solution_name: The solution manager name + :type solution_name: str + :param aggregated_alert_name: Identifier of the aggregated alert + :type aggregated_alert_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IoTSecurityAggregatedAlert or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.IoTSecurityAggregatedAlert or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str'), + 'aggregatedAlertName': self._serialize.url("aggregated_alert_name", aggregated_alert_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IoTSecurityAggregatedAlert', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedAlerts/{aggregatedAlertName}'} + + def dismiss( + self, resource_group_name, solution_name, aggregated_alert_name, custom_headers=None, raw=False, **operation_config): + """Security Analytics of a security solution. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param solution_name: The solution manager name + :type solution_name: str + :param aggregated_alert_name: Identifier of the aggregated alert + :type aggregated_alert_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.dismiss.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str'), + 'aggregatedAlertName': self._serialize.url("aggregated_alert_name", aggregated_alert_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + dismiss.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedAlerts/{aggregatedAlertName}/dismiss'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_aggregated_alerts_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_aggregated_alerts_operations.py new file mode 100644 index 000000000000..8dd2c02db968 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_aggregated_alerts_operations.py @@ -0,0 +1,117 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations(object): + """IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2017-08-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-08-01-preview" + + self.config = config + + def list( + self, resource_group_name, solution_name, top=None, custom_headers=None, raw=False, **operation_config): + """Security Analytics of a security solution. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param solution_name: The solution manager name + :type solution_name: str + :param top: The number of results to retrieve. + :type top: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of IoTSecurityAggregatedAlert + :rtype: + ~azure.mgmt.security.models.IoTSecurityAggregatedAlertPaged[~azure.mgmt.security.models.IoTSecurityAggregatedAlert] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IoTSecurityAggregatedAlertPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedAlerts'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_operations.py new file mode 100644 index 000000000000..da21d05d8741 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_operations.py @@ -0,0 +1,167 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IoTSecuritySolutionsAnalyticsOperations(object): + """IoTSecuritySolutionsAnalyticsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2017-08-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-08-01-preview" + + self.config = config + + def get_all( + self, resource_group_name, solution_name, custom_headers=None, raw=False, **operation_config): + """Security Analytics of a security solution. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param solution_name: The solution manager name + :type solution_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IoTSecuritySolutionAnalyticsModelList or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModelList or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_all.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IoTSecuritySolutionAnalyticsModelList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_all.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels'} + + def get_default( + self, resource_group_name, solution_name, custom_headers=None, raw=False, **operation_config): + """Security Analytics of a security solution. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param solution_name: The solution manager name + :type solution_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IoTSecuritySolutionAnalyticsModel or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.security.models.IoTSecuritySolutionAnalyticsModel + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_default.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IoTSecuritySolutionAnalyticsModel', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_default.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_recommendation_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_recommendation_operations.py new file mode 100644 index 000000000000..9f49e92845e1 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_recommendation_operations.py @@ -0,0 +1,108 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IoTSecuritySolutionsAnalyticsRecommendationOperations(object): + """IoTSecuritySolutionsAnalyticsRecommendationOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2017-08-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-08-01-preview" + + self.config = config + + def get( + self, resource_group_name, solution_name, aggregated_recommendation_name, custom_headers=None, raw=False, **operation_config): + """Security Analytics of a security solution. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param solution_name: The solution manager name + :type solution_name: str + :param aggregated_recommendation_name: Identifier of the aggregated + recommendation + :type aggregated_recommendation_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IoTSecurityAggregatedRecommendation or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.security.models.IoTSecurityAggregatedRecommendation or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str'), + 'aggregatedRecommendationName': self._serialize.url("aggregated_recommendation_name", aggregated_recommendation_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IoTSecurityAggregatedRecommendation', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedRecommendations/{aggregatedRecommendationName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_recommendations_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_recommendations_operations.py new file mode 100644 index 000000000000..0997d1abfbb7 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_analytics_recommendations_operations.py @@ -0,0 +1,118 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IoTSecuritySolutionsAnalyticsRecommendationsOperations(object): + """IoTSecuritySolutionsAnalyticsRecommendationsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2017-08-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-08-01-preview" + + self.config = config + + def list( + self, resource_group_name, solution_name, top=None, custom_headers=None, raw=False, **operation_config): + """Security Analytics of a security solution. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param solution_name: The solution manager name + :type solution_name: str + :param top: The number of results to retrieve. + :type top: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of + IoTSecurityAggregatedRecommendation + :rtype: + ~azure.mgmt.security.models.IoTSecurityAggregatedRecommendationPaged[~azure.mgmt.security.models.IoTSecurityAggregatedRecommendation] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IoTSecurityAggregatedRecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedRecommendations'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_operations.py new file mode 100644 index 000000000000..23dd31ceb148 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_operations.py @@ -0,0 +1,111 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IoTSecuritySolutionsOperations(object): + """IoTSecuritySolutionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2017-08-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-08-01-preview" + + self.config = config + + def list( + self, filter=None, custom_headers=None, raw=False, **operation_config): + """List of security solutions. + + :param filter: filter the Security Solution with OData syntax. + supporting filter by iotHubs + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of IoTSecuritySolutionModel + :rtype: + ~azure.mgmt.security.models.IoTSecuritySolutionModelPaged[~azure.mgmt.security.models.IoTSecuritySolutionModel] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IoTSecuritySolutionModelPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/iotSecuritySolutions'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_resource_group_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_resource_group_operations.py new file mode 100644 index 000000000000..34129008ef2e --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_io_tsecurity_solutions_resource_group_operations.py @@ -0,0 +1,115 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IoTSecuritySolutionsResourceGroupOperations(object): + """IoTSecuritySolutionsResourceGroupOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2017-08-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-08-01-preview" + + self.config = config + + def list( + self, resource_group_name, filter=None, custom_headers=None, raw=False, **operation_config): + """List of security solutions. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param filter: filter the Security Solution with OData syntax. + supporting filter by iotHubs + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of IoTSecuritySolutionModel + :rtype: + ~azure.mgmt.security.models.IoTSecuritySolutionModelPaged[~azure.mgmt.security.models.IoTSecuritySolutionModel] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IoTSecuritySolutionModelPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_security_solution_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_security_solution_operations.py new file mode 100644 index 000000000000..80e79c2406fe --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_security_solution_operations.py @@ -0,0 +1,297 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IotSecuritySolutionOperations(object): + """IotSecuritySolutionOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2017-08-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-08-01-preview" + + self.config = config + + def get( + self, resource_group_name, solution_name, custom_headers=None, raw=False, **operation_config): + """Details of a specific iot security solution. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param solution_name: The solution manager name + :type solution_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IoTSecuritySolutionModel or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.IoTSecuritySolutionModel or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IoTSecuritySolutionModel', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}'} + + def create( + self, resource_group_name, solution_name, iot_security_solution_data, custom_headers=None, raw=False, **operation_config): + """Create new solution manager. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param solution_name: The solution manager name + :type solution_name: str + :param iot_security_solution_data: The security solution data + :type iot_security_solution_data: + ~azure.mgmt.security.models.IoTSecuritySolutionModel + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IoTSecuritySolutionModel or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.IoTSecuritySolutionModel or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(iot_security_solution_data, 'IoTSecuritySolutionModel') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IoTSecuritySolutionModel', response) + if response.status_code == 201: + deserialized = self._deserialize('IoTSecuritySolutionModel', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}'} + + def update( + self, resource_group_name, solution_name, update_iot_security_solution_data, custom_headers=None, raw=False, **operation_config): + """update existing Security Solution tags or user defined resources. To + update other fields use the CreateOrUpdate method. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param solution_name: The solution manager name + :type solution_name: str + :param update_iot_security_solution_data: The security solution data + :type update_iot_security_solution_data: + ~azure.mgmt.security.models.UpdateIotSecuritySolutionData + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IoTSecuritySolutionModel or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.IoTSecuritySolutionModel or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(update_iot_security_solution_data, 'UpdateIotSecuritySolutionData') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IoTSecuritySolutionModel', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}'} + + def delete( + self, resource_group_name, solution_name, custom_headers=None, raw=False, **operation_config): + """Create new solution manager. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param solution_name: The solution manager name + :type solution_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'solutionName': self._serialize.url("solution_name", solution_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_jit_network_access_policies_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_jit_network_access_policies_operations.py new file mode 100644 index 000000000000..48df52e84dba --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_jit_network_access_policies_operations.py @@ -0,0 +1,587 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class JitNetworkAccessPoliciesOperations(object): + """JitNetworkAccessPoliciesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2015-06-01-preview". + :ivar jit_network_access_policy_initiate_type: Type of the action to do on the Just-in-Time access policy. Constant value: "initiate". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-06-01-preview" + self.jit_network_access_policy_initiate_type = "initiate" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Policies for protecting resources using Just-in-Time access control. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of JitNetworkAccessPolicy + :rtype: + ~azure.mgmt.security.models.JitNetworkAccessPolicyPaged[~azure.mgmt.security.models.JitNetworkAccessPolicy] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.JitNetworkAccessPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/jitNetworkAccessPolicies'} + + def list_by_region( + self, custom_headers=None, raw=False, **operation_config): + """Policies for protecting resources using Just-in-Time access control for + the subscription, location. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of JitNetworkAccessPolicy + :rtype: + ~azure.mgmt.security.models.JitNetworkAccessPolicyPaged[~azure.mgmt.security.models.JitNetworkAccessPolicy] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_region.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.JitNetworkAccessPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_region.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Policies for protecting resources using Just-in-Time access control for + the subscription, location. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of JitNetworkAccessPolicy + :rtype: + ~azure.mgmt.security.models.JitNetworkAccessPolicyPaged[~azure.mgmt.security.models.JitNetworkAccessPolicy] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.JitNetworkAccessPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/jitNetworkAccessPolicies'} + + def list_by_resource_group_and_region( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Policies for protecting resources using Just-in-Time access control for + the subscription, location. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of JitNetworkAccessPolicy + :rtype: + ~azure.mgmt.security.models.JitNetworkAccessPolicyPaged[~azure.mgmt.security.models.JitNetworkAccessPolicy] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group_and_region.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.JitNetworkAccessPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group_and_region.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies'} + + def get( + self, resource_group_name, jit_network_access_policy_name, custom_headers=None, raw=False, **operation_config): + """Policies for protecting resources using Just-in-Time access control for + the subscription, location. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param jit_network_access_policy_name: Name of a Just-in-Time access + configuration policy. + :type jit_network_access_policy_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: JitNetworkAccessPolicy or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.JitNetworkAccessPolicy or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), + 'jitNetworkAccessPolicyName': self._serialize.url("jit_network_access_policy_name", jit_network_access_policy_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('JitNetworkAccessPolicy', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies/{jitNetworkAccessPolicyName}'} + + def create_or_update( + self, resource_group_name, jit_network_access_policy_name, body, custom_headers=None, raw=False, **operation_config): + """Create a policy for protecting resources using Just-in-Time access + control. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param jit_network_access_policy_name: Name of a Just-in-Time access + configuration policy. + :type jit_network_access_policy_name: str + :param body: + :type body: ~azure.mgmt.security.models.JitNetworkAccessPolicy + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: JitNetworkAccessPolicy or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.JitNetworkAccessPolicy or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), + 'jitNetworkAccessPolicyName': self._serialize.url("jit_network_access_policy_name", jit_network_access_policy_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(body, 'JitNetworkAccessPolicy') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('JitNetworkAccessPolicy', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies/{jitNetworkAccessPolicyName}'} + + def delete( + self, resource_group_name, jit_network_access_policy_name, custom_headers=None, raw=False, **operation_config): + """Delete a Just-in-Time access control policy. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param jit_network_access_policy_name: Name of a Just-in-Time access + configuration policy. + :type jit_network_access_policy_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), + 'jitNetworkAccessPolicyName': self._serialize.url("jit_network_access_policy_name", jit_network_access_policy_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies/{jitNetworkAccessPolicyName}'} + + def initiate( + self, resource_group_name, jit_network_access_policy_name, virtual_machines, custom_headers=None, raw=False, **operation_config): + """Initiate a JIT access from a specific Just-in-Time policy + configuration. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param jit_network_access_policy_name: Name of a Just-in-Time access + configuration policy. + :type jit_network_access_policy_name: str + :param virtual_machines: A list of virtual machines & ports to open + access for + :type virtual_machines: + list[~azure.mgmt.security.models.JitNetworkAccessPolicyInitiateVirtualMachine] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: JitNetworkAccessRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.JitNetworkAccessRequest or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + body = models.JitNetworkAccessPolicyInitiateRequest(virtual_machines=virtual_machines) + + # Construct URL + url = self.initiate.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), + 'jitNetworkAccessPolicyName': self._serialize.url("jit_network_access_policy_name", jit_network_access_policy_name, 'str'), + 'jitNetworkAccessPolicyInitiateType': self._serialize.url("self.jit_network_access_policy_initiate_type", self.jit_network_access_policy_initiate_type, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(body, 'JitNetworkAccessPolicyInitiateRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 202: + deserialized = self._deserialize('JitNetworkAccessRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + initiate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies/{jitNetworkAccessPolicyName}/{jitNetworkAccessPolicyInitiateType}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_locations_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_locations_operations.py new file mode 100644 index 000000000000..df6c428164d3 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_locations_operations.py @@ -0,0 +1,165 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class LocationsOperations(object): + """LocationsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2015-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-06-01-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """The location of the responsible ASC of the specific subscription (home + region). For each subscription there is only one responsible location. + The location in the response should be used to read or write other + resources in ASC according to their ID. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AscLocation + :rtype: + ~azure.mgmt.security.models.AscLocationPaged[~azure.mgmt.security.models.AscLocation] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AscLocationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations'} + + def get( + self, custom_headers=None, raw=False, **operation_config): + """Details of a specific location. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AscLocation or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.AscLocation or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AscLocation', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_operations.py new file mode 100644 index 000000000000..2f400c9b62e9 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_operations.py @@ -0,0 +1,102 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class Operations(object): + """Operations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2015-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-06-01-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Exposes all available operations for discovery purposes. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Operation + :rtype: + ~azure.mgmt.security.models.OperationPaged[~azure.mgmt.security.models.Operation] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Security/operations'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_pricings_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_pricings_operations.py new file mode 100644 index 000000000000..02e06e34875c --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_pricings_operations.py @@ -0,0 +1,232 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class PricingsOperations(object): + """PricingsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2018-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """A given security pricing configuration in the subscription. Azure + Security Center is available in two pricing tiers: Free and Standard, + on multiple resource types, including Virtual machines, SQL Servers, + App service plans and Storage accounts. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PricingList or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.PricingList or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PricingList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/pricings'} + + def get( + self, pricing_name, custom_headers=None, raw=False, **operation_config): + """A given security pricing configuration in the subscription. Azure + Security Center is available in two pricing tiers: Free and Standard, + on multiple resource types, including Virtual machines, SQL Servers, + App service plans and Storage accounts. + + :param pricing_name: name of the pricing configuration + :type pricing_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Pricing or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.Pricing or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'pricingName': self._serialize.url("pricing_name", pricing_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Pricing', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/pricings/{pricingName}'} + + def update( + self, pricing_name, pricing_tier, custom_headers=None, raw=False, **operation_config): + """A given security pricing configuration in the subscription. Azure + Security Center is available in two pricing tiers: Free and Standard, + on multiple resource types, including Virtual machines, SQL Servers, + App service plans and Storage accounts. + + :param pricing_name: name of the pricing configuration + :type pricing_name: str + :param pricing_tier: The pricing tier value. Azure Security Center is + provided in two pricing tiers: free and standard, with the standard + tier available with a trial period. The standard tier offers advanced + security capabilities, while the free tier offers basic security + features. Possible values include: 'Free', 'Standard' + :type pricing_tier: str or ~azure.mgmt.security.models.PricingTier + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Pricing or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.Pricing or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + pricing = models.Pricing(pricing_tier=pricing_tier) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'pricingName': self._serialize.url("pricing_name", pricing_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(pricing, 'Pricing') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Pricing', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/pricings/{pricingName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_regulatory_compliance_assessments_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_regulatory_compliance_assessments_operations.py new file mode 100644 index 000000000000..353ea103d365 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_regulatory_compliance_assessments_operations.py @@ -0,0 +1,188 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class RegulatoryComplianceAssessmentsOperations(object): + """RegulatoryComplianceAssessmentsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2019-01-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01-preview" + + self.config = config + + def list( + self, regulatory_compliance_standard_name, regulatory_compliance_control_name, filter=None, custom_headers=None, raw=False, **operation_config): + """Details and state of assessments mapped to selected regulatory + compliance control. + + :param regulatory_compliance_standard_name: Name of the regulatory + compliance standard object + :type regulatory_compliance_standard_name: str + :param regulatory_compliance_control_name: Name of the regulatory + compliance control object + :type regulatory_compliance_control_name: str + :param filter: OData filter. Optional. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of RegulatoryComplianceAssessment + :rtype: + ~azure.mgmt.security.models.RegulatoryComplianceAssessmentPaged[~azure.mgmt.security.models.RegulatoryComplianceAssessment] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'regulatoryComplianceStandardName': self._serialize.url("regulatory_compliance_standard_name", regulatory_compliance_standard_name, 'str'), + 'regulatoryComplianceControlName': self._serialize.url("regulatory_compliance_control_name", regulatory_compliance_control_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RegulatoryComplianceAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}/regulatoryComplianceAssessments'} + + def get( + self, regulatory_compliance_standard_name, regulatory_compliance_control_name, regulatory_compliance_assessment_name, custom_headers=None, raw=False, **operation_config): + """Supported regulatory compliance details and state for selected + assessment. + + :param regulatory_compliance_standard_name: Name of the regulatory + compliance standard object + :type regulatory_compliance_standard_name: str + :param regulatory_compliance_control_name: Name of the regulatory + compliance control object + :type regulatory_compliance_control_name: str + :param regulatory_compliance_assessment_name: Name of the regulatory + compliance assessment object + :type regulatory_compliance_assessment_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RegulatoryComplianceAssessment or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.security.models.RegulatoryComplianceAssessment or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'regulatoryComplianceStandardName': self._serialize.url("regulatory_compliance_standard_name", regulatory_compliance_standard_name, 'str'), + 'regulatoryComplianceControlName': self._serialize.url("regulatory_compliance_control_name", regulatory_compliance_control_name, 'str'), + 'regulatoryComplianceAssessmentName': self._serialize.url("regulatory_compliance_assessment_name", regulatory_compliance_assessment_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RegulatoryComplianceAssessment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}/regulatoryComplianceAssessments/{regulatoryComplianceAssessmentName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_regulatory_compliance_controls_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_regulatory_compliance_controls_operations.py new file mode 100644 index 000000000000..21bb45c57662 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_regulatory_compliance_controls_operations.py @@ -0,0 +1,178 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class RegulatoryComplianceControlsOperations(object): + """RegulatoryComplianceControlsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2019-01-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01-preview" + + self.config = config + + def list( + self, regulatory_compliance_standard_name, filter=None, custom_headers=None, raw=False, **operation_config): + """All supported regulatory compliance controls details and state for + selected standard. + + :param regulatory_compliance_standard_name: Name of the regulatory + compliance standard object + :type regulatory_compliance_standard_name: str + :param filter: OData filter. Optional. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of RegulatoryComplianceControl + :rtype: + ~azure.mgmt.security.models.RegulatoryComplianceControlPaged[~azure.mgmt.security.models.RegulatoryComplianceControl] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'regulatoryComplianceStandardName': self._serialize.url("regulatory_compliance_standard_name", regulatory_compliance_standard_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RegulatoryComplianceControlPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls'} + + def get( + self, regulatory_compliance_standard_name, regulatory_compliance_control_name, custom_headers=None, raw=False, **operation_config): + """Selected regulatory compliance control details and state. + + :param regulatory_compliance_standard_name: Name of the regulatory + compliance standard object + :type regulatory_compliance_standard_name: str + :param regulatory_compliance_control_name: Name of the regulatory + compliance control object + :type regulatory_compliance_control_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RegulatoryComplianceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.RegulatoryComplianceControl or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'regulatoryComplianceStandardName': self._serialize.url("regulatory_compliance_standard_name", regulatory_compliance_standard_name, 'str'), + 'regulatoryComplianceControlName': self._serialize.url("regulatory_compliance_control_name", regulatory_compliance_control_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RegulatoryComplianceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_regulatory_compliance_standards_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_regulatory_compliance_standards_operations.py new file mode 100644 index 000000000000..63cca3001264 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_regulatory_compliance_standards_operations.py @@ -0,0 +1,169 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class RegulatoryComplianceStandardsOperations(object): + """RegulatoryComplianceStandardsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2019-01-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01-preview" + + self.config = config + + def list( + self, filter=None, custom_headers=None, raw=False, **operation_config): + """Supported regulatory compliance standards details and state. + + :param filter: OData filter. Optional. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of RegulatoryComplianceStandard + :rtype: + ~azure.mgmt.security.models.RegulatoryComplianceStandardPaged[~azure.mgmt.security.models.RegulatoryComplianceStandard] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RegulatoryComplianceStandardPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards'} + + def get( + self, regulatory_compliance_standard_name, custom_headers=None, raw=False, **operation_config): + """Supported regulatory compliance details state for selected standard. + + :param regulatory_compliance_standard_name: Name of the regulatory + compliance standard object + :type regulatory_compliance_standard_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RegulatoryComplianceStandard or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.RegulatoryComplianceStandard or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'regulatoryComplianceStandardName': self._serialize.url("regulatory_compliance_standard_name", regulatory_compliance_standard_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RegulatoryComplianceStandard', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_security_contacts_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_security_contacts_operations.py new file mode 100644 index 000000000000..5b1343256321 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_security_contacts_operations.py @@ -0,0 +1,342 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class SecurityContactsOperations(object): + """SecurityContactsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2017-08-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-08-01-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Security contact configurations for the subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SecurityContact + :rtype: + ~azure.mgmt.security.models.SecurityContactPaged[~azure.mgmt.security.models.SecurityContact] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SecurityContactPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/securityContacts'} + + def get( + self, security_contact_name, custom_headers=None, raw=False, **operation_config): + """Security contact configurations for the subscription. + + :param security_contact_name: Name of the security contact object + :type security_contact_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SecurityContact or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.SecurityContact or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'securityContactName': self._serialize.url("security_contact_name", security_contact_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SecurityContact', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/securityContacts/{securityContactName}'} + + def create( + self, security_contact_name, security_contact, custom_headers=None, raw=False, **operation_config): + """Security contact configurations for the subscription. + + :param security_contact_name: Name of the security contact object + :type security_contact_name: str + :param security_contact: Security contact object + :type security_contact: ~azure.mgmt.security.models.SecurityContact + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SecurityContact or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.SecurityContact or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'securityContactName': self._serialize.url("security_contact_name", security_contact_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(security_contact, 'SecurityContact') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SecurityContact', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/securityContacts/{securityContactName}'} + + def delete( + self, security_contact_name, custom_headers=None, raw=False, **operation_config): + """Security contact configurations for the subscription. + + :param security_contact_name: Name of the security contact object + :type security_contact_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'securityContactName': self._serialize.url("security_contact_name", security_contact_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/securityContacts/{securityContactName}'} + + def update( + self, security_contact_name, security_contact, custom_headers=None, raw=False, **operation_config): + """Security contact configurations for the subscription. + + :param security_contact_name: Name of the security contact object + :type security_contact_name: str + :param security_contact: Security contact object + :type security_contact: ~azure.mgmt.security.models.SecurityContact + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SecurityContact or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.SecurityContact or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'securityContactName': self._serialize.url("security_contact_name", security_contact_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(security_contact, 'SecurityContact') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SecurityContact', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/securityContacts/{securityContactName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_server_vulnerability_assessment_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_server_vulnerability_assessment_operations.py new file mode 100644 index 000000000000..18722ae2855b --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_server_vulnerability_assessment_operations.py @@ -0,0 +1,315 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ServerVulnerabilityAssessmentOperations(object): + """ServerVulnerabilityAssessmentOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2019-01-01-preview". + :ivar server_vulnerability_assessment: ServerVulnerabilityAssessment status. only a 'default' value is supported. Constant value: "default". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01-preview" + self.server_vulnerability_assessment = "default" + + self.config = config + + def list_by_extended_resource( + self, resource_group_name, resource_namespace, resource_type, resource_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of server vulnerability assessment onboarding statuses on a + given resource. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param resource_namespace: The Namespace of the resource. + :type resource_namespace: str + :param resource_type: The type of the resource. + :type resource_type: str + :param resource_name: Name of the resource. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServerVulnerabilityAssessmentsList or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.security.models.ServerVulnerabilityAssessmentsList + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_by_extended_resource.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceNamespace': self._serialize.url("resource_namespace", resource_namespace, 'str'), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ServerVulnerabilityAssessmentsList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_by_extended_resource.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/serverVulnerabilityAssessments'} + + def get( + self, resource_group_name, resource_namespace, resource_type, resource_name, custom_headers=None, raw=False, **operation_config): + """Gets a server vulnerability assessment onboarding statuses on a given + resource. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param resource_namespace: The Namespace of the resource. + :type resource_namespace: str + :param resource_type: The type of the resource. + :type resource_type: str + :param resource_name: Name of the resource. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServerVulnerabilityAssessment or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.security.models.ServerVulnerabilityAssessment or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceNamespace': self._serialize.url("resource_namespace", resource_namespace, 'str'), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'serverVulnerabilityAssessment': self._serialize.url("self.server_vulnerability_assessment", self.server_vulnerability_assessment, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ServerVulnerabilityAssessment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/serverVulnerabilityAssessments/{serverVulnerabilityAssessment}'} + + def create_or_update( + self, resource_group_name, resource_namespace, resource_type, resource_name, custom_headers=None, raw=False, **operation_config): + """Creating a server vulnerability assessment on a resource, which will + onboard a resource for having a vulnerability assessment on it. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param resource_namespace: The Namespace of the resource. + :type resource_namespace: str + :param resource_type: The type of the resource. + :type resource_type: str + :param resource_name: Name of the resource. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServerVulnerabilityAssessment or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.security.models.ServerVulnerabilityAssessment or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceNamespace': self._serialize.url("resource_namespace", resource_namespace, 'str'), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'serverVulnerabilityAssessment': self._serialize.url("self.server_vulnerability_assessment", self.server_vulnerability_assessment, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 202: + deserialized = self._deserialize('ServerVulnerabilityAssessment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/serverVulnerabilityAssessments/{serverVulnerabilityAssessment}'} + + def delete( + self, resource_group_name, resource_namespace, resource_type, resource_name, custom_headers=None, raw=False, **operation_config): + """Removing server vulnerability assessment from a resource. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param resource_namespace: The Namespace of the resource. + :type resource_namespace: str + :param resource_type: The type of the resource. + :type resource_type: str + :param resource_name: Name of the resource. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceNamespace': self._serialize.url("resource_namespace", resource_namespace, 'str'), + 'resourceType': self._serialize.url("resource_type", resource_type, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'serverVulnerabilityAssessment': self._serialize.url("self.server_vulnerability_assessment", self.server_vulnerability_assessment, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/serverVulnerabilityAssessments/{serverVulnerabilityAssessment}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_settings_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_settings_operations.py new file mode 100644 index 000000000000..5dcbe3cd8d9f --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_settings_operations.py @@ -0,0 +1,234 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class SettingsOperations(object): + """SettingsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2019-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Settings about different configurations in security center. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Setting + :rtype: + ~azure.mgmt.security.models.SettingPaged[~azure.mgmt.security.models.Setting] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SettingPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/settings'} + + def get( + self, setting_name, custom_headers=None, raw=False, **operation_config): + """Settings of different configurations in security center. + + :param setting_name: Name of setting: (MCAS/WDATP). Possible values + include: 'MCAS', 'WDATP' + :type setting_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Setting or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.Setting or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'settingName': self._serialize.url("setting_name", setting_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Setting', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/settings/{settingName}'} + + def update( + self, setting_name, kind, custom_headers=None, raw=False, **operation_config): + """updating settings about different configurations in security center. + + :param setting_name: Name of setting: (MCAS/WDATP). Possible values + include: 'MCAS', 'WDATP' + :type setting_name: str + :param kind: the kind of the settings string (DataExportSetting). + Possible values include: 'DataExportSetting', + 'AlertSuppressionSetting' + :type kind: str or ~azure.mgmt.security.models.SettingKind + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Setting or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.Setting or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + setting = models.Setting(kind=kind) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'settingName': self._serialize.url("setting_name", setting_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(setting, 'Setting') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Setting', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/settings/{settingName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_tasks_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_tasks_operations.py new file mode 100644 index 000000000000..3fed53ee15dc --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_tasks_operations.py @@ -0,0 +1,501 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class TasksOperations(object): + """TasksOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2015-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-06-01-preview" + + self.config = config + + def list( + self, filter=None, custom_headers=None, raw=False, **operation_config): + """Recommended tasks that will help improve the security of the + subscription proactively. + + :param filter: OData filter. Optional. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SecurityTask + :rtype: + ~azure.mgmt.security.models.SecurityTaskPaged[~azure.mgmt.security.models.SecurityTask] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SecurityTaskPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/tasks'} + + def list_by_home_region( + self, filter=None, custom_headers=None, raw=False, **operation_config): + """Recommended tasks that will help improve the security of the + subscription proactively. + + :param filter: OData filter. Optional. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SecurityTask + :rtype: + ~azure.mgmt.security.models.SecurityTaskPaged[~azure.mgmt.security.models.SecurityTask] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_home_region.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SecurityTaskPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_home_region.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/tasks'} + + def get_subscription_level_task( + self, task_name, custom_headers=None, raw=False, **operation_config): + """Recommended tasks that will help improve the security of the + subscription proactively. + + :param task_name: Name of the task object, will be a GUID + :type task_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SecurityTask or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.SecurityTask or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_subscription_level_task.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), + 'taskName': self._serialize.url("task_name", task_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SecurityTask', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_subscription_level_task.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/tasks/{taskName}'} + + def update_subscription_level_task_state( + self, task_name, task_update_action_type, custom_headers=None, raw=False, **operation_config): + """Recommended tasks that will help improve the security of the + subscription proactively. + + :param task_name: Name of the task object, will be a GUID + :type task_name: str + :param task_update_action_type: Type of the action to do on the task. + Possible values include: 'Activate', 'Dismiss', 'Start', 'Resolve', + 'Close' + :type task_update_action_type: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_subscription_level_task_state.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), + 'taskName': self._serialize.url("task_name", task_name, 'str'), + 'taskUpdateActionType': self._serialize.url("task_update_action_type", task_update_action_type, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update_subscription_level_task_state.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/tasks/{taskName}/{taskUpdateActionType}'} + + def list_by_resource_group( + self, resource_group_name, filter=None, custom_headers=None, raw=False, **operation_config): + """Recommended tasks that will help improve the security of the + subscription proactively. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param filter: OData filter. Optional. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SecurityTask + :rtype: + ~azure.mgmt.security.models.SecurityTaskPaged[~azure.mgmt.security.models.SecurityTask] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SecurityTaskPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/tasks'} + + def get_resource_group_level_task( + self, resource_group_name, task_name, custom_headers=None, raw=False, **operation_config): + """Recommended tasks that will help improve the security of the + subscription proactively. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param task_name: Name of the task object, will be a GUID + :type task_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SecurityTask or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.SecurityTask or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_resource_group_level_task.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), + 'taskName': self._serialize.url("task_name", task_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SecurityTask', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_resource_group_level_task.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/tasks/{taskName}'} + + def update_resource_group_level_task_state( + self, resource_group_name, task_name, task_update_action_type, custom_headers=None, raw=False, **operation_config): + """Recommended tasks that will help improve the security of the + subscription proactively. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param task_name: Name of the task object, will be a GUID + :type task_name: str + :param task_update_action_type: Type of the action to do on the task. + Possible values include: 'Activate', 'Dismiss', 'Start', 'Resolve', + 'Close' + :type task_update_action_type: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update_resource_group_level_task_state.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), + 'taskName': self._serialize.url("task_name", task_name, 'str'), + 'taskUpdateActionType': self._serialize.url("task_update_action_type", task_update_action_type, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update_resource_group_level_task_state.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/tasks/{taskName}/{taskUpdateActionType}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_topology_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_topology_operations.py new file mode 100644 index 000000000000..1d6e616bb498 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_topology_operations.py @@ -0,0 +1,238 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class TopologyOperations(object): + """TopologyOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2015-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-06-01-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets a list that allows to build a topology view of a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TopologyResource + :rtype: + ~azure.mgmt.security.models.TopologyResourcePaged[~azure.mgmt.security.models.TopologyResource] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TopologyResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/topologies'} + + def list_by_home_region( + self, custom_headers=None, raw=False, **operation_config): + """Gets a list that allows to build a topology view of a subscription and + location. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TopologyResource + :rtype: + ~azure.mgmt.security.models.TopologyResourcePaged[~azure.mgmt.security.models.TopologyResource] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_home_region.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TopologyResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_home_region.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/topologies'} + + def get( + self, resource_group_name, topology_resource_name, custom_headers=None, raw=False, **operation_config): + """Gets a specific topology component. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param topology_resource_name: Name of a topology resources + collection. + :type topology_resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TopologyResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.TopologyResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), + 'topologyResourceName': self._serialize.url("topology_resource_name", topology_resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('TopologyResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/topologies/{topologyResourceName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_workspace_settings_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_workspace_settings_operations.py new file mode 100644 index 000000000000..5717490464d3 --- /dev/null +++ b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_workspace_settings_operations.py @@ -0,0 +1,362 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class WorkspaceSettingsOperations(object): + """WorkspaceSettingsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2017-08-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-08-01-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Settings about where we should store your security data and logs. If + the result is empty, it means that no custom-workspace configuration + was set. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WorkspaceSetting + :rtype: + ~azure.mgmt.security.models.WorkspaceSettingPaged[~azure.mgmt.security.models.WorkspaceSetting] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WorkspaceSettingPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/workspaceSettings'} + + def get( + self, workspace_setting_name, custom_headers=None, raw=False, **operation_config): + """Settings about where we should store your security data and logs. If + the result is empty, it means that no custom-workspace configuration + was set. + + :param workspace_setting_name: Name of the security setting + :type workspace_setting_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkspaceSetting or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.WorkspaceSetting or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'workspaceSettingName': self._serialize.url("workspace_setting_name", workspace_setting_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkspaceSetting', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/workspaceSettings/{workspaceSettingName}'} + + def create( + self, workspace_setting_name, workspace_id, scope, custom_headers=None, raw=False, **operation_config): + """creating settings about where we should store your security data and + logs. + + :param workspace_setting_name: Name of the security setting + :type workspace_setting_name: str + :param workspace_id: The full Azure ID of the workspace to save the + data in + :type workspace_id: str + :param scope: All the VMs in this scope will send their security data + to the mentioned workspace unless overridden by a setting with more + specific scope + :type scope: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkspaceSetting or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.WorkspaceSetting or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + workspace_setting = models.WorkspaceSetting(workspace_id=workspace_id, scope=scope) + + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'workspaceSettingName': self._serialize.url("workspace_setting_name", workspace_setting_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(workspace_setting, 'WorkspaceSetting') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkspaceSetting', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/workspaceSettings/{workspaceSettingName}'} + + def update( + self, workspace_setting_name, workspace_id, scope, custom_headers=None, raw=False, **operation_config): + """Settings about where we should store your security data and logs. + + :param workspace_setting_name: Name of the security setting + :type workspace_setting_name: str + :param workspace_id: The full Azure ID of the workspace to save the + data in + :type workspace_id: str + :param scope: All the VMs in this scope will send their security data + to the mentioned workspace unless overridden by a setting with more + specific scope + :type scope: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkspaceSetting or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.security.models.WorkspaceSetting or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + workspace_setting = models.WorkspaceSetting(workspace_id=workspace_id, scope=scope) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'workspaceSettingName': self._serialize.url("workspace_setting_name", workspace_setting_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(workspace_setting, 'WorkspaceSetting') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkspaceSetting', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/workspaceSettings/{workspaceSettingName}'} + + def delete( + self, workspace_setting_name, custom_headers=None, raw=False, **operation_config): + """Deletes the custom workspace settings for this subscription. new VMs + will report to the default workspace. + + :param workspace_setting_name: Name of the security setting + :type workspace_setting_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'workspaceSettingName': self._serialize.url("workspace_setting_name", workspace_setting_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/workspaceSettings/{workspaceSettingName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/advanced_threat_protection_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/advanced_threat_protection_operations.py deleted file mode 100644 index 2bdef2916fbc..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/advanced_threat_protection_operations.py +++ /dev/null @@ -1,171 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class AdvancedThreatProtectionOperations(object): - """AdvancedThreatProtectionOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API version for the operation. Constant value: "2017-08-01-preview". - :ivar setting_name: Advanced Threat Protection setting name. Constant value: "current". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-08-01-preview" - self.setting_name = "current" - - self.config = config - - def get( - self, resource_id, custom_headers=None, raw=False, **operation_config): - """Gets the Advanced Threat Protection settings for the specified - resource. - - :param resource_id: The identifier of the resource. - :type resource_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AdvancedThreatProtectionSetting or ClientRawResponse if - raw=true - :rtype: ~azure.mgmt.security.models.AdvancedThreatProtectionSetting or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceId': self._serialize.url("resource_id", resource_id, 'str'), - 'settingName': self._serialize.url("self.setting_name", self.setting_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AdvancedThreatProtectionSetting', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/{resourceId}/providers/Microsoft.Security/advancedThreatProtectionSettings/{settingName}'} - - def create( - self, resource_id, is_enabled=None, custom_headers=None, raw=False, **operation_config): - """Creates or updates the Advanced Threat Protection settings on a - specified resource. - - :param resource_id: The identifier of the resource. - :type resource_id: str - :param is_enabled: Indicates whether Advanced Threat Protection is - enabled. - :type is_enabled: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AdvancedThreatProtectionSetting or ClientRawResponse if - raw=true - :rtype: ~azure.mgmt.security.models.AdvancedThreatProtectionSetting or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - advanced_threat_protection_setting = models.AdvancedThreatProtectionSetting(is_enabled=is_enabled) - - # Construct URL - url = self.create.metadata['url'] - path_format_arguments = { - 'resourceId': self._serialize.url("resource_id", resource_id, 'str'), - 'settingName': self._serialize.url("self.setting_name", self.setting_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(advanced_threat_protection_setting, 'AdvancedThreatProtectionSetting') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AdvancedThreatProtectionSetting', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create.metadata = {'url': '/{resourceId}/providers/Microsoft.Security/advancedThreatProtectionSettings/{settingName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/alerts_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/alerts_operations.py deleted file mode 100644 index d0d86845ded3..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/alerts_operations.py +++ /dev/null @@ -1,593 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class AlertsOperations(object): - """AlertsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API version for the operation. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list( - self, filter=None, select=None, expand=None, custom_headers=None, raw=False, **operation_config): - """List all the alerts that are associated with the subscription. - - :param filter: OData filter. Optional. - :type filter: str - :param select: OData select. Optional. - :type select: str - :param expand: OData expand. Optional. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Alert - :rtype: - ~azure.mgmt.security.models.AlertPaged[~azure.mgmt.security.models.Alert] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if select is not None: - query_parameters['$select'] = self._serialize.query("select", select, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/alerts'} - - def list_by_resource_group( - self, resource_group_name, filter=None, select=None, expand=None, custom_headers=None, raw=False, **operation_config): - """List all the alerts that are associated with the resource group. - - :param resource_group_name: The name of the resource group within the - user's subscription. The name is case insensitive. - :type resource_group_name: str - :param filter: OData filter. Optional. - :type filter: str - :param select: OData select. Optional. - :type select: str - :param expand: OData expand. Optional. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Alert - :rtype: - ~azure.mgmt.security.models.AlertPaged[~azure.mgmt.security.models.Alert] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if select is not None: - query_parameters['$select'] = self._serialize.query("select", select, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/alerts'} - - def list_subscription_level_alerts_by_region( - self, filter=None, select=None, expand=None, custom_headers=None, raw=False, **operation_config): - """List all the alerts that are associated with the subscription that are - stored in a specific location. - - :param filter: OData filter. Optional. - :type filter: str - :param select: OData select. Optional. - :type select: str - :param expand: OData expand. Optional. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Alert - :rtype: - ~azure.mgmt.security.models.AlertPaged[~azure.mgmt.security.models.Alert] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_subscription_level_alerts_by_region.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if select is not None: - query_parameters['$select'] = self._serialize.query("select", select, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_subscription_level_alerts_by_region.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts'} - - def list_resource_group_level_alerts_by_region( - self, resource_group_name, filter=None, select=None, expand=None, custom_headers=None, raw=False, **operation_config): - """List all the alerts that are associated with the resource group that - are stored in a specific location. - - :param resource_group_name: The name of the resource group within the - user's subscription. The name is case insensitive. - :type resource_group_name: str - :param filter: OData filter. Optional. - :type filter: str - :param select: OData select. Optional. - :type select: str - :param expand: OData expand. Optional. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Alert - :rtype: - ~azure.mgmt.security.models.AlertPaged[~azure.mgmt.security.models.Alert] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_resource_group_level_alerts_by_region.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if select is not None: - query_parameters['$select'] = self._serialize.query("select", select, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_resource_group_level_alerts_by_region.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts'} - - def get_subscription_level_alert( - self, alert_name, custom_headers=None, raw=False, **operation_config): - """Get an alert that is associated with a subscription. - - :param alert_name: Name of the alert object - :type alert_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Alert or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.security.models.Alert or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_subscription_level_alert.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), - 'alertName': self._serialize.url("alert_name", alert_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Alert', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_subscription_level_alert.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}'} - - def get_resource_group_level_alerts( - self, alert_name, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Get an alert that is associated a resource group or a resource in a - resource group. - - :param alert_name: Name of the alert object - :type alert_name: str - :param resource_group_name: The name of the resource group within the - user's subscription. The name is case insensitive. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Alert or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.security.models.Alert or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_resource_group_level_alerts.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), - 'alertName': self._serialize.url("alert_name", alert_name, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Alert', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_resource_group_level_alerts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}'} - - def update_subscription_level_alert_state( - self, alert_name, alert_update_action_type, custom_headers=None, raw=False, **operation_config): - """Update the alert's state. - - :param alert_name: Name of the alert object - :type alert_name: str - :param alert_update_action_type: Type of the action to do on the - alert. Possible values include: 'Dismiss', 'Reactivate' - :type alert_update_action_type: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update_subscription_level_alert_state.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), - 'alertName': self._serialize.url("alert_name", alert_name, 'str'), - 'alertUpdateActionType': self._serialize.url("alert_update_action_type", alert_update_action_type, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update_subscription_level_alert_state.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/{alertUpdateActionType}'} - - def update_resource_group_level_alert_state( - self, alert_name, alert_update_action_type, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Update the alert's state. - - :param alert_name: Name of the alert object - :type alert_name: str - :param alert_update_action_type: Type of the action to do on the - alert. Possible values include: 'Dismiss', 'Reactivate' - :type alert_update_action_type: str - :param resource_group_name: The name of the resource group within the - user's subscription. The name is case insensitive. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update_resource_group_level_alert_state.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), - 'alertName': self._serialize.url("alert_name", alert_name, 'str'), - 'alertUpdateActionType': self._serialize.url("alert_update_action_type", alert_update_action_type, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update_resource_group_level_alert_state.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/{alertUpdateActionType}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/allowed_connections_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/allowed_connections_operations.py deleted file mode 100644 index 2d97b7366913..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/allowed_connections_operations.py +++ /dev/null @@ -1,236 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class AllowedConnectionsOperations(object): - """AllowedConnectionsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API version for the operation. Constant value: "2015-06-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-06-01-preview" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets the list of all possible traffic between resources for the - subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AllowedConnectionsResource - :rtype: - ~azure.mgmt.security.models.AllowedConnectionsResourcePaged[~azure.mgmt.security.models.AllowedConnectionsResource] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.AllowedConnectionsResourcePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.AllowedConnectionsResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/allowedConnections'} - - def list_by_home_region( - self, custom_headers=None, raw=False, **operation_config): - """Gets the list of all possible traffic between resources for the - subscription and location. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AllowedConnectionsResource - :rtype: - ~azure.mgmt.security.models.AllowedConnectionsResourcePaged[~azure.mgmt.security.models.AllowedConnectionsResource] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_home_region.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.AllowedConnectionsResourcePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.AllowedConnectionsResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_home_region.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/allowedConnections'} - - def get( - self, resource_group_name, connection_type, custom_headers=None, raw=False, **operation_config): - """Gets the list of all possible traffic between resources for the - subscription and location, based on connection type. - - :param resource_group_name: The name of the resource group within the - user's subscription. The name is case insensitive. - :type resource_group_name: str - :param connection_type: The type of allowed connections (Internal, - External). Possible values include: 'Internal', 'External' - :type connection_type: str or - ~azure.mgmt.security.models.ConnectionType - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AllowedConnectionsResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.security.models.AllowedConnectionsResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), - 'connectionType': self._serialize.url("connection_type", connection_type, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AllowedConnectionsResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/allowedConnections/{connectionType}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/auto_provisioning_settings_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/auto_provisioning_settings_operations.py deleted file mode 100644 index 9d6eccd8d530..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/auto_provisioning_settings_operations.py +++ /dev/null @@ -1,229 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class AutoProvisioningSettingsOperations(object): - """AutoProvisioningSettingsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API version for the operation. Constant value: "2017-08-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-08-01-preview" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Exposes the auto provisioning settings of the subscriptions. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AutoProvisioningSetting - :rtype: - ~azure.mgmt.security.models.AutoProvisioningSettingPaged[~azure.mgmt.security.models.AutoProvisioningSetting] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.AutoProvisioningSettingPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.AutoProvisioningSettingPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/autoProvisioningSettings'} - - def get( - self, setting_name, custom_headers=None, raw=False, **operation_config): - """Details of a specific setting. - - :param setting_name: Auto provisioning setting key - :type setting_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AutoProvisioningSetting or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.security.models.AutoProvisioningSetting or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'settingName': self._serialize.url("setting_name", setting_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AutoProvisioningSetting', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/autoProvisioningSettings/{settingName}'} - - def create( - self, setting_name, auto_provision, custom_headers=None, raw=False, **operation_config): - """Details of a specific setting. - - :param setting_name: Auto provisioning setting key - :type setting_name: str - :param auto_provision: Describes what kind of security agent - provisioning action to take. Possible values include: 'On', 'Off' - :type auto_provision: str or ~azure.mgmt.security.models.AutoProvision - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AutoProvisioningSetting or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.security.models.AutoProvisioningSetting or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - setting = models.AutoProvisioningSetting(auto_provision=auto_provision) - - # Construct URL - url = self.create.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'settingName': self._serialize.url("setting_name", setting_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(setting, 'AutoProvisioningSetting') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AutoProvisioningSetting', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/autoProvisioningSettings/{settingName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/compliances_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/compliances_operations.py deleted file mode 100644 index 3edc73a4fc32..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/compliances_operations.py +++ /dev/null @@ -1,169 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class CompliancesOperations(object): - """CompliancesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API version for the operation. Constant value: "2017-08-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-08-01-preview" - - self.config = config - - def list( - self, scope, custom_headers=None, raw=False, **operation_config): - """The Compliance scores of the specific management group. - - :param scope: Scope of the query, can be subscription - (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management - group (/providers/Microsoft.Management/managementGroups/mgName). - :type scope: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Compliance - :rtype: - ~azure.mgmt.security.models.CompliancePaged[~azure.mgmt.security.models.Compliance] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'scope': self._serialize.url("scope", scope, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.CompliancePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.CompliancePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/{scope}/providers/Microsoft.Security/compliances'} - - def get( - self, scope, compliance_name, custom_headers=None, raw=False, **operation_config): - """Details of a specific Compliance. - - :param scope: Scope of the query, can be subscription - (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management - group (/providers/Microsoft.Management/managementGroups/mgName). - :type scope: str - :param compliance_name: name of the Compliance - :type compliance_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Compliance or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.security.models.Compliance or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'scope': self._serialize.url("scope", scope, 'str'), - 'complianceName': self._serialize.url("compliance_name", compliance_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Compliance', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/{scope}/providers/Microsoft.Security/compliances/{complianceName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/discovered_security_solutions_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/discovered_security_solutions_operations.py deleted file mode 100644 index 339bbfddd5bf..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/discovered_security_solutions_operations.py +++ /dev/null @@ -1,233 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class DiscoveredSecuritySolutionsOperations(object): - """DiscoveredSecuritySolutionsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API version for the operation. Constant value: "2015-06-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-06-01-preview" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of discovered Security Solutions for the subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DiscoveredSecuritySolution - :rtype: - ~azure.mgmt.security.models.DiscoveredSecuritySolutionPaged[~azure.mgmt.security.models.DiscoveredSecuritySolution] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DiscoveredSecuritySolutionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DiscoveredSecuritySolutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/discoveredSecuritySolutions'} - - def list_by_home_region( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of discovered Security Solutions for the subscription and - location. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DiscoveredSecuritySolution - :rtype: - ~azure.mgmt.security.models.DiscoveredSecuritySolutionPaged[~azure.mgmt.security.models.DiscoveredSecuritySolution] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_home_region.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.DiscoveredSecuritySolutionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DiscoveredSecuritySolutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_home_region.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/discoveredSecuritySolutions'} - - def get( - self, resource_group_name, discovered_security_solution_name, custom_headers=None, raw=False, **operation_config): - """Gets a specific discovered Security Solution. - - :param resource_group_name: The name of the resource group within the - user's subscription. The name is case insensitive. - :type resource_group_name: str - :param discovered_security_solution_name: Name of a discovered - security solution. - :type discovered_security_solution_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DiscoveredSecuritySolution or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.security.models.DiscoveredSecuritySolution or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), - 'discoveredSecuritySolutionName': self._serialize.url("discovered_security_solution_name", discovered_security_solution_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('DiscoveredSecuritySolution', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/discoveredSecuritySolutions/{discoveredSecuritySolutionName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/external_security_solutions_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/external_security_solutions_operations.py deleted file mode 100644 index 3286ae570426..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/external_security_solutions_operations.py +++ /dev/null @@ -1,233 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class ExternalSecuritySolutionsOperations(object): - """ExternalSecuritySolutionsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API version for the operation. Constant value: "2015-06-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-06-01-preview" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of external security solutions for the subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ExternalSecuritySolution - :rtype: - ~azure.mgmt.security.models.ExternalSecuritySolutionPaged[~azure.mgmt.security.models.ExternalSecuritySolution] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ExternalSecuritySolutionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ExternalSecuritySolutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/externalSecuritySolutions'} - - def list_by_home_region( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list of external Security Solutions for the subscription and - location. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ExternalSecuritySolution - :rtype: - ~azure.mgmt.security.models.ExternalSecuritySolutionPaged[~azure.mgmt.security.models.ExternalSecuritySolution] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_home_region.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ExternalSecuritySolutionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ExternalSecuritySolutionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_home_region.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/ExternalSecuritySolutions'} - - def get( - self, resource_group_name, external_security_solutions_name, custom_headers=None, raw=False, **operation_config): - """Gets a specific external Security Solution. - - :param resource_group_name: The name of the resource group within the - user's subscription. The name is case insensitive. - :type resource_group_name: str - :param external_security_solutions_name: Name of an external security - solution. - :type external_security_solutions_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ExternalSecuritySolution or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.security.models.ExternalSecuritySolution or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), - 'externalSecuritySolutionsName': self._serialize.url("external_security_solutions_name", external_security_solutions_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ExternalSecuritySolution', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/ExternalSecuritySolutions/{externalSecuritySolutionsName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/information_protection_policies_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/information_protection_policies_operations.py deleted file mode 100644 index d4c5fe7329b4..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/information_protection_policies_operations.py +++ /dev/null @@ -1,236 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class InformationProtectionPoliciesOperations(object): - """InformationProtectionPoliciesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API version for the operation. Constant value: "2017-08-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-08-01-preview" - - self.config = config - - def get( - self, scope, information_protection_policy_name, custom_headers=None, raw=False, **operation_config): - """Details of the information protection policy. - - :param scope: Scope of the query, can be subscription - (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management - group (/providers/Microsoft.Management/managementGroups/mgName). - :type scope: str - :param information_protection_policy_name: Name of the information - protection policy. Possible values include: 'effective', 'custom' - :type information_protection_policy_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: InformationProtectionPolicy or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.security.models.InformationProtectionPolicy or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'scope': self._serialize.url("scope", scope, 'str'), - 'informationProtectionPolicyName': self._serialize.url("information_protection_policy_name", information_protection_policy_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('InformationProtectionPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/{scope}/providers/Microsoft.Security/informationProtectionPolicies/{informationProtectionPolicyName}'} - - def create_or_update( - self, scope, information_protection_policy_name, custom_headers=None, raw=False, **operation_config): - """Details of the information protection policy. - - :param scope: Scope of the query, can be subscription - (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management - group (/providers/Microsoft.Management/managementGroups/mgName). - :type scope: str - :param information_protection_policy_name: Name of the information - protection policy. Possible values include: 'effective', 'custom' - :type information_protection_policy_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: InformationProtectionPolicy or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.security.models.InformationProtectionPolicy or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'scope': self._serialize.url("scope", scope, 'str'), - 'informationProtectionPolicyName': self._serialize.url("information_protection_policy_name", information_protection_policy_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('InformationProtectionPolicy', response) - if response.status_code == 201: - deserialized = self._deserialize('InformationProtectionPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/{scope}/providers/Microsoft.Security/informationProtectionPolicies/{informationProtectionPolicyName}'} - - def list( - self, scope, custom_headers=None, raw=False, **operation_config): - """Information protection policies of a specific management group. - - :param scope: Scope of the query, can be subscription - (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management - group (/providers/Microsoft.Management/managementGroups/mgName). - :type scope: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of InformationProtectionPolicy - :rtype: - ~azure.mgmt.security.models.InformationProtectionPolicyPaged[~azure.mgmt.security.models.InformationProtectionPolicy] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'scope': self._serialize.url("scope", scope, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.InformationProtectionPolicyPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.InformationProtectionPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/{scope}/providers/Microsoft.Security/informationProtectionPolicies'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/jit_network_access_policies_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/jit_network_access_policies_operations.py deleted file mode 100644 index a8b9c88bed35..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/jit_network_access_policies_operations.py +++ /dev/null @@ -1,580 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class JitNetworkAccessPoliciesOperations(object): - """JitNetworkAccessPoliciesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API version for the operation. Constant value: "2015-06-01-preview". - :ivar jit_network_access_policy_initiate_type: Type of the action to do on the Just-in-Time access policy. Constant value: "initiate". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-06-01-preview" - self.jit_network_access_policy_initiate_type = "initiate" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Policies for protecting resources using Just-in-Time access control. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of JitNetworkAccessPolicy - :rtype: - ~azure.mgmt.security.models.JitNetworkAccessPolicyPaged[~azure.mgmt.security.models.JitNetworkAccessPolicy] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.JitNetworkAccessPolicyPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.JitNetworkAccessPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/jitNetworkAccessPolicies'} - - def list_by_region( - self, custom_headers=None, raw=False, **operation_config): - """Policies for protecting resources using Just-in-Time access control for - the subscription, location. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of JitNetworkAccessPolicy - :rtype: - ~azure.mgmt.security.models.JitNetworkAccessPolicyPaged[~azure.mgmt.security.models.JitNetworkAccessPolicy] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_region.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.JitNetworkAccessPolicyPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.JitNetworkAccessPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_region.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Policies for protecting resources using Just-in-Time access control for - the subscription, location. - - :param resource_group_name: The name of the resource group within the - user's subscription. The name is case insensitive. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of JitNetworkAccessPolicy - :rtype: - ~azure.mgmt.security.models.JitNetworkAccessPolicyPaged[~azure.mgmt.security.models.JitNetworkAccessPolicy] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.JitNetworkAccessPolicyPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.JitNetworkAccessPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/jitNetworkAccessPolicies'} - - def list_by_resource_group_and_region( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Policies for protecting resources using Just-in-Time access control for - the subscription, location. - - :param resource_group_name: The name of the resource group within the - user's subscription. The name is case insensitive. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of JitNetworkAccessPolicy - :rtype: - ~azure.mgmt.security.models.JitNetworkAccessPolicyPaged[~azure.mgmt.security.models.JitNetworkAccessPolicy] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group_and_region.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.JitNetworkAccessPolicyPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.JitNetworkAccessPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group_and_region.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies'} - - def get( - self, resource_group_name, jit_network_access_policy_name, custom_headers=None, raw=False, **operation_config): - """Policies for protecting resources using Just-in-Time access control for - the subscription, location. - - :param resource_group_name: The name of the resource group within the - user's subscription. The name is case insensitive. - :type resource_group_name: str - :param jit_network_access_policy_name: Name of a Just-in-Time access - configuration policy. - :type jit_network_access_policy_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: JitNetworkAccessPolicy or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.security.models.JitNetworkAccessPolicy or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), - 'jitNetworkAccessPolicyName': self._serialize.url("jit_network_access_policy_name", jit_network_access_policy_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('JitNetworkAccessPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies/{jitNetworkAccessPolicyName}'} - - def create_or_update( - self, resource_group_name, jit_network_access_policy_name, body, custom_headers=None, raw=False, **operation_config): - """Create a policy for protecting resources using Just-in-Time access - control. - - :param resource_group_name: The name of the resource group within the - user's subscription. The name is case insensitive. - :type resource_group_name: str - :param jit_network_access_policy_name: Name of a Just-in-Time access - configuration policy. - :type jit_network_access_policy_name: str - :param body: - :type body: ~azure.mgmt.security.models.JitNetworkAccessPolicy - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: JitNetworkAccessPolicy or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.security.models.JitNetworkAccessPolicy or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), - 'jitNetworkAccessPolicyName': self._serialize.url("jit_network_access_policy_name", jit_network_access_policy_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(body, 'JitNetworkAccessPolicy') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('JitNetworkAccessPolicy', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies/{jitNetworkAccessPolicyName}'} - - def delete( - self, resource_group_name, jit_network_access_policy_name, custom_headers=None, raw=False, **operation_config): - """Delete a Just-in-Time access control policy. - - :param resource_group_name: The name of the resource group within the - user's subscription. The name is case insensitive. - :type resource_group_name: str - :param jit_network_access_policy_name: Name of a Just-in-Time access - configuration policy. - :type jit_network_access_policy_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), - 'jitNetworkAccessPolicyName': self._serialize.url("jit_network_access_policy_name", jit_network_access_policy_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies/{jitNetworkAccessPolicyName}'} - - def initiate( - self, resource_group_name, jit_network_access_policy_name, virtual_machines, custom_headers=None, raw=False, **operation_config): - """Initiate a JIT access from a specific Just-in-Time policy - configuration. - - :param resource_group_name: The name of the resource group within the - user's subscription. The name is case insensitive. - :type resource_group_name: str - :param jit_network_access_policy_name: Name of a Just-in-Time access - configuration policy. - :type jit_network_access_policy_name: str - :param virtual_machines: A list of virtual machines & ports to open - access for - :type virtual_machines: - list[~azure.mgmt.security.models.JitNetworkAccessPolicyInitiateVirtualMachine] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: JitNetworkAccessRequest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.security.models.JitNetworkAccessRequest or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - body = models.JitNetworkAccessPolicyInitiateRequest(virtual_machines=virtual_machines) - - # Construct URL - url = self.initiate.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), - 'jitNetworkAccessPolicyName': self._serialize.url("jit_network_access_policy_name", jit_network_access_policy_name, 'str'), - 'jitNetworkAccessPolicyInitiateType': self._serialize.url("self.jit_network_access_policy_initiate_type", self.jit_network_access_policy_initiate_type, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(body, 'JitNetworkAccessPolicyInitiateRequest') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 202: - deserialized = self._deserialize('JitNetworkAccessRequest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - initiate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies/{jitNetworkAccessPolicyName}/{jitNetworkAccessPolicyInitiateType}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/locations_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/locations_operations.py deleted file mode 100644 index 5aa7ba17569f..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/locations_operations.py +++ /dev/null @@ -1,162 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class LocationsOperations(object): - """LocationsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API version for the operation. Constant value: "2015-06-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-06-01-preview" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """The location of the responsible ASC of the specific subscription (home - region). For each subscription there is only one responsible location. - The location in the response should be used to read or write other - resources in ASC according to their ID. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AscLocation - :rtype: - ~azure.mgmt.security.models.AscLocationPaged[~azure.mgmt.security.models.AscLocation] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.AscLocationPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.AscLocationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations'} - - def get( - self, custom_headers=None, raw=False, **operation_config): - """Details of a specific location. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AscLocation or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.security.models.AscLocation or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AscLocation', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/operations.py deleted file mode 100644 index 5a2cacc56e2f..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/operations.py +++ /dev/null @@ -1,98 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API version for the operation. Constant value: "2015-06-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-06-01-preview" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Exposes all available operations for discovery purposes. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Operation - :rtype: - ~azure.mgmt.security.models.OperationPaged[~azure.mgmt.security.models.Operation] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/providers/Microsoft.Security/operations'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/pricings_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/pricings_operations.py deleted file mode 100644 index 85177f446714..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/pricings_operations.py +++ /dev/null @@ -1,221 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class PricingsOperations(object): - """PricingsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API version for the operation. Constant value: "2018-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Security pricing configurations in the subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PricingList or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.security.models.PricingList or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('PricingList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/pricings'} - - def get( - self, pricing_name, custom_headers=None, raw=False, **operation_config): - """Security pricing configuration in the subscription. - - :param pricing_name: name of the pricing configuration - :type pricing_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Pricing or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.security.models.Pricing or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'pricingName': self._serialize.url("pricing_name", pricing_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Pricing', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/pricings/{pricingName}'} - - def update( - self, pricing_name, pricing_tier, custom_headers=None, raw=False, **operation_config): - """Security pricing configuration in the subscription. - - :param pricing_name: name of the pricing configuration - :type pricing_name: str - :param pricing_tier: The pricing tier value. Possible values include: - 'Free', 'Standard' - :type pricing_tier: str or ~azure.mgmt.security.models.PricingTier - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Pricing or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.security.models.Pricing or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - pricing = models.Pricing(pricing_tier=pricing_tier) - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'pricingName': self._serialize.url("pricing_name", pricing_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(pricing, 'Pricing') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Pricing', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/pricings/{pricingName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/security_contacts_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/security_contacts_operations.py deleted file mode 100644 index 9a1c12a66205..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/security_contacts_operations.py +++ /dev/null @@ -1,341 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class SecurityContactsOperations(object): - """SecurityContactsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API version for the operation. Constant value: "2017-08-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-08-01-preview" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Security contact configurations for the subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SecurityContact - :rtype: - ~azure.mgmt.security.models.SecurityContactPaged[~azure.mgmt.security.models.SecurityContact] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.SecurityContactPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.SecurityContactPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/securityContacts'} - - def get( - self, security_contact_name, custom_headers=None, raw=False, **operation_config): - """Security contact configurations for the subscription. - - :param security_contact_name: Name of the security contact object - :type security_contact_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SecurityContact or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.security.models.SecurityContact or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'securityContactName': self._serialize.url("security_contact_name", security_contact_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SecurityContact', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/securityContacts/{securityContactName}'} - - def create( - self, security_contact_name, security_contact, custom_headers=None, raw=False, **operation_config): - """Security contact configurations for the subscription. - - :param security_contact_name: Name of the security contact object - :type security_contact_name: str - :param security_contact: Security contact object - :type security_contact: ~azure.mgmt.security.models.SecurityContact - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SecurityContact or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.security.models.SecurityContact or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'securityContactName': self._serialize.url("security_contact_name", security_contact_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(security_contact, 'SecurityContact') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SecurityContact', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/securityContacts/{securityContactName}'} - - def delete( - self, security_contact_name, custom_headers=None, raw=False, **operation_config): - """Security contact configurations for the subscription. - - :param security_contact_name: Name of the security contact object - :type security_contact_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'securityContactName': self._serialize.url("security_contact_name", security_contact_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/securityContacts/{securityContactName}'} - - def update( - self, security_contact_name, security_contact, custom_headers=None, raw=False, **operation_config): - """Security contact configurations for the subscription. - - :param security_contact_name: Name of the security contact object - :type security_contact_name: str - :param security_contact: Security contact object - :type security_contact: ~azure.mgmt.security.models.SecurityContact - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SecurityContact or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.security.models.SecurityContact or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'securityContactName': self._serialize.url("security_contact_name", security_contact_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(security_contact, 'SecurityContact') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SecurityContact', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/securityContacts/{securityContactName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/settings_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/settings_operations.py deleted file mode 100644 index b36f8f8b2b4b..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/settings_operations.py +++ /dev/null @@ -1,232 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class SettingsOperations(object): - """SettingsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API version for the operation. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Settings about different configurations in security center. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Setting - :rtype: - ~azure.mgmt.security.models.SettingPaged[~azure.mgmt.security.models.Setting] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.SettingPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.SettingPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/settings'} - - def get( - self, setting_name, custom_headers=None, raw=False, **operation_config): - """Settings of different configurations in security center. - - :param setting_name: Name of setting: (MCAS/WDATP). Possible values - include: 'MCAS', 'WDATP' - :type setting_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Setting or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.security.models.Setting or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'settingName': self._serialize.url("setting_name", setting_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Setting', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/settings/{settingName}'} - - def update( - self, setting_name, kind, custom_headers=None, raw=False, **operation_config): - """updating settings about different configurations in security center. - - :param setting_name: Name of setting: (MCAS/WDATP). Possible values - include: 'MCAS', 'WDATP' - :type setting_name: str - :param kind: the kind of the settings string (DataExportSetting). - Possible values include: 'DataExportSetting', - 'AlertSuppressionSetting' - :type kind: str or ~azure.mgmt.security.models.SettingKind - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Setting or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.security.models.Setting or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - setting = models.Setting(kind=kind) - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'settingName': self._serialize.url("setting_name", setting_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(setting, 'Setting') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Setting', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/settings/{settingName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/tasks_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/tasks_operations.py deleted file mode 100644 index fc002b8368ed..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/tasks_operations.py +++ /dev/null @@ -1,495 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class TasksOperations(object): - """TasksOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API version for the operation. Constant value: "2015-06-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-06-01-preview" - - self.config = config - - def list( - self, filter=None, custom_headers=None, raw=False, **operation_config): - """Recommended tasks that will help improve the security of the - subscription proactively. - - :param filter: OData filter. Optional. - :type filter: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SecurityTask - :rtype: - ~azure.mgmt.security.models.SecurityTaskPaged[~azure.mgmt.security.models.SecurityTask] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.SecurityTaskPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.SecurityTaskPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/tasks'} - - def list_by_home_region( - self, filter=None, custom_headers=None, raw=False, **operation_config): - """Recommended tasks that will help improve the security of the - subscription proactively. - - :param filter: OData filter. Optional. - :type filter: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SecurityTask - :rtype: - ~azure.mgmt.security.models.SecurityTaskPaged[~azure.mgmt.security.models.SecurityTask] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_home_region.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.SecurityTaskPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.SecurityTaskPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_home_region.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/tasks'} - - def get_subscription_level_task( - self, task_name, custom_headers=None, raw=False, **operation_config): - """Recommended tasks that will help improve the security of the - subscription proactively. - - :param task_name: Name of the task object, will be a GUID - :type task_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SecurityTask or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.security.models.SecurityTask or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_subscription_level_task.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), - 'taskName': self._serialize.url("task_name", task_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SecurityTask', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_subscription_level_task.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/tasks/{taskName}'} - - def update_subscription_level_task_state( - self, task_name, task_update_action_type, custom_headers=None, raw=False, **operation_config): - """Recommended tasks that will help improve the security of the - subscription proactively. - - :param task_name: Name of the task object, will be a GUID - :type task_name: str - :param task_update_action_type: Type of the action to do on the task. - Possible values include: 'Activate', 'Dismiss', 'Start', 'Resolve', - 'Close' - :type task_update_action_type: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update_subscription_level_task_state.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), - 'taskName': self._serialize.url("task_name", task_name, 'str'), - 'taskUpdateActionType': self._serialize.url("task_update_action_type", task_update_action_type, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update_subscription_level_task_state.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/tasks/{taskName}/{taskUpdateActionType}'} - - def list_by_resource_group( - self, resource_group_name, filter=None, custom_headers=None, raw=False, **operation_config): - """Recommended tasks that will help improve the security of the - subscription proactively. - - :param resource_group_name: The name of the resource group within the - user's subscription. The name is case insensitive. - :type resource_group_name: str - :param filter: OData filter. Optional. - :type filter: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SecurityTask - :rtype: - ~azure.mgmt.security.models.SecurityTaskPaged[~azure.mgmt.security.models.SecurityTask] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.SecurityTaskPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.SecurityTaskPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/tasks'} - - def get_resource_group_level_task( - self, resource_group_name, task_name, custom_headers=None, raw=False, **operation_config): - """Recommended tasks that will help improve the security of the - subscription proactively. - - :param resource_group_name: The name of the resource group within the - user's subscription. The name is case insensitive. - :type resource_group_name: str - :param task_name: Name of the task object, will be a GUID - :type task_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SecurityTask or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.security.models.SecurityTask or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_resource_group_level_task.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), - 'taskName': self._serialize.url("task_name", task_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SecurityTask', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_resource_group_level_task.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/tasks/{taskName}'} - - def update_resource_group_level_task_state( - self, resource_group_name, task_name, task_update_action_type, custom_headers=None, raw=False, **operation_config): - """Recommended tasks that will help improve the security of the - subscription proactively. - - :param resource_group_name: The name of the resource group within the - user's subscription. The name is case insensitive. - :type resource_group_name: str - :param task_name: Name of the task object, will be a GUID - :type task_name: str - :param task_update_action_type: Type of the action to do on the task. - Possible values include: 'Activate', 'Dismiss', 'Start', 'Resolve', - 'Close' - :type task_update_action_type: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update_resource_group_level_task_state.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), - 'taskName': self._serialize.url("task_name", task_name, 'str'), - 'taskUpdateActionType': self._serialize.url("task_update_action_type", task_update_action_type, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update_resource_group_level_task_state.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/tasks/{taskName}/{taskUpdateActionType}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/topology_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/topology_operations.py deleted file mode 100644 index 75ba584c21f7..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/topology_operations.py +++ /dev/null @@ -1,233 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class TopologyOperations(object): - """TopologyOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API version for the operation. Constant value: "2015-06-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-06-01-preview" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list that allows to build a topology view of a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TopologyResource - :rtype: - ~azure.mgmt.security.models.TopologyResourcePaged[~azure.mgmt.security.models.TopologyResource] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.TopologyResourcePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.TopologyResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/topologies'} - - def list_by_home_region( - self, custom_headers=None, raw=False, **operation_config): - """Gets a list that allows to build a topology view of a subscription and - location. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TopologyResource - :rtype: - ~azure.mgmt.security.models.TopologyResourcePaged[~azure.mgmt.security.models.TopologyResource] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_home_region.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.TopologyResourcePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.TopologyResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_home_region.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/topologies'} - - def get( - self, resource_group_name, topology_resource_name, custom_headers=None, raw=False, **operation_config): - """Gets a specific topology component. - - :param resource_group_name: The name of the resource group within the - user's subscription. The name is case insensitive. - :type resource_group_name: str - :param topology_resource_name: Name of a topology resources - collection. - :type topology_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: TopologyResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.security.models.TopologyResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'ascLocation': self._serialize.url("self.config.asc_location", self.config.asc_location, 'str'), - 'topologyResourceName': self._serialize.url("topology_resource_name", topology_resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('TopologyResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/topologies/{topologyResourceName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/workspace_settings_operations.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/workspace_settings_operations.py deleted file mode 100644 index 7c25fa3c51ab..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/operations/workspace_settings_operations.py +++ /dev/null @@ -1,361 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class WorkspaceSettingsOperations(object): - """WorkspaceSettingsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API version for the operation. Constant value: "2017-08-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-08-01-preview" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Settings about where we should store your security data and logs. If - the result is empty, it means that no custom-workspace configuration - was set. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of WorkspaceSetting - :rtype: - ~azure.mgmt.security.models.WorkspaceSettingPaged[~azure.mgmt.security.models.WorkspaceSetting] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.WorkspaceSettingPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.WorkspaceSettingPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/workspaceSettings'} - - def get( - self, workspace_setting_name, custom_headers=None, raw=False, **operation_config): - """Settings about where we should store your security data and logs. If - the result is empty, it means that no custom-workspace configuration - was set. - - :param workspace_setting_name: Name of the security setting - :type workspace_setting_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkspaceSetting or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.security.models.WorkspaceSetting or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'workspaceSettingName': self._serialize.url("workspace_setting_name", workspace_setting_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkspaceSetting', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/workspaceSettings/{workspaceSettingName}'} - - def create( - self, workspace_setting_name, workspace_id, scope, custom_headers=None, raw=False, **operation_config): - """creating settings about where we should store your security data and - logs. - - :param workspace_setting_name: Name of the security setting - :type workspace_setting_name: str - :param workspace_id: The full Azure ID of the workspace to save the - data in - :type workspace_id: str - :param scope: All the VMs in this scope will send their security data - to the mentioned workspace unless overridden by a setting with more - specific scope - :type scope: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkspaceSetting or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.security.models.WorkspaceSetting or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - workspace_setting = models.WorkspaceSetting(workspace_id=workspace_id, scope=scope) - - # Construct URL - url = self.create.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'workspaceSettingName': self._serialize.url("workspace_setting_name", workspace_setting_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(workspace_setting, 'WorkspaceSetting') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkspaceSetting', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/workspaceSettings/{workspaceSettingName}'} - - def update( - self, workspace_setting_name, workspace_id, scope, custom_headers=None, raw=False, **operation_config): - """Settings about where we should store your security data and logs. - - :param workspace_setting_name: Name of the security setting - :type workspace_setting_name: str - :param workspace_id: The full Azure ID of the workspace to save the - data in - :type workspace_id: str - :param scope: All the VMs in this scope will send their security data - to the mentioned workspace unless overridden by a setting with more - specific scope - :type scope: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: WorkspaceSetting or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.security.models.WorkspaceSetting or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - workspace_setting = models.WorkspaceSetting(workspace_id=workspace_id, scope=scope) - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'workspaceSettingName': self._serialize.url("workspace_setting_name", workspace_setting_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(workspace_setting, 'WorkspaceSetting') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkspaceSetting', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/workspaceSettings/{workspaceSettingName}'} - - def delete( - self, workspace_setting_name, custom_headers=None, raw=False, **operation_config): - """Deletes the custom workspace settings for this subscription. new VMs - will report to the default workspace. - - :param workspace_setting_name: Name of the security setting - :type workspace_setting_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), - 'workspaceSettingName': self._serialize.url("workspace_setting_name", workspace_setting_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Security/workspaceSettings/{workspaceSettingName}'} diff --git a/sdk/security/azure-mgmt-security/azure/mgmt/security/security_center.py b/sdk/security/azure-mgmt-security/azure/mgmt/security/security_center.py deleted file mode 100644 index 38888caff012..000000000000 --- a/sdk/security/azure-mgmt-security/azure/mgmt/security/security_center.py +++ /dev/null @@ -1,169 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.pricings_operations import PricingsOperations -from .operations.alerts_operations import AlertsOperations -from .operations.settings_operations import SettingsOperations -from .operations.allowed_connections_operations import AllowedConnectionsOperations -from .operations.discovered_security_solutions_operations import DiscoveredSecuritySolutionsOperations -from .operations.external_security_solutions_operations import ExternalSecuritySolutionsOperations -from .operations.jit_network_access_policies_operations import JitNetworkAccessPoliciesOperations -from .operations.locations_operations import LocationsOperations -from .operations.operations import Operations -from .operations.tasks_operations import TasksOperations -from .operations.topology_operations import TopologyOperations -from .operations.advanced_threat_protection_operations import AdvancedThreatProtectionOperations -from .operations.auto_provisioning_settings_operations import AutoProvisioningSettingsOperations -from .operations.compliances_operations import CompliancesOperations -from .operations.information_protection_policies_operations import InformationProtectionPoliciesOperations -from .operations.security_contacts_operations import SecurityContactsOperations -from .operations.workspace_settings_operations import WorkspaceSettingsOperations -from . import models - - -class SecurityCenterConfiguration(AzureConfiguration): - """Configuration for SecurityCenter - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID - :type subscription_id: str - :param asc_location: The location where ASC stores the data of the - subscription. can be retrieved from Get locations - :type asc_location: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, asc_location, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if asc_location is None: - raise ValueError("Parameter 'asc_location' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(SecurityCenterConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-security/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - self.asc_location = asc_location - - -class SecurityCenter(SDKClient): - """API spec for Microsoft.Security (Azure Security Center) resource provider - - :ivar config: Configuration for client. - :vartype config: SecurityCenterConfiguration - - :ivar pricings: Pricings operations - :vartype pricings: azure.mgmt.security.operations.PricingsOperations - :ivar alerts: Alerts operations - :vartype alerts: azure.mgmt.security.operations.AlertsOperations - :ivar settings: Settings operations - :vartype settings: azure.mgmt.security.operations.SettingsOperations - :ivar allowed_connections: AllowedConnections operations - :vartype allowed_connections: azure.mgmt.security.operations.AllowedConnectionsOperations - :ivar discovered_security_solutions: DiscoveredSecuritySolutions operations - :vartype discovered_security_solutions: azure.mgmt.security.operations.DiscoveredSecuritySolutionsOperations - :ivar external_security_solutions: ExternalSecuritySolutions operations - :vartype external_security_solutions: azure.mgmt.security.operations.ExternalSecuritySolutionsOperations - :ivar jit_network_access_policies: JitNetworkAccessPolicies operations - :vartype jit_network_access_policies: azure.mgmt.security.operations.JitNetworkAccessPoliciesOperations - :ivar locations: Locations operations - :vartype locations: azure.mgmt.security.operations.LocationsOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.security.operations.Operations - :ivar tasks: Tasks operations - :vartype tasks: azure.mgmt.security.operations.TasksOperations - :ivar topology: Topology operations - :vartype topology: azure.mgmt.security.operations.TopologyOperations - :ivar advanced_threat_protection: AdvancedThreatProtection operations - :vartype advanced_threat_protection: azure.mgmt.security.operations.AdvancedThreatProtectionOperations - :ivar auto_provisioning_settings: AutoProvisioningSettings operations - :vartype auto_provisioning_settings: azure.mgmt.security.operations.AutoProvisioningSettingsOperations - :ivar compliances: Compliances operations - :vartype compliances: azure.mgmt.security.operations.CompliancesOperations - :ivar information_protection_policies: InformationProtectionPolicies operations - :vartype information_protection_policies: azure.mgmt.security.operations.InformationProtectionPoliciesOperations - :ivar security_contacts: SecurityContacts operations - :vartype security_contacts: azure.mgmt.security.operations.SecurityContactsOperations - :ivar workspace_settings: WorkspaceSettings operations - :vartype workspace_settings: azure.mgmt.security.operations.WorkspaceSettingsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID - :type subscription_id: str - :param asc_location: The location where ASC stores the data of the - subscription. can be retrieved from Get locations - :type asc_location: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, asc_location, base_url=None): - - self.config = SecurityCenterConfiguration(credentials, subscription_id, asc_location, base_url) - super(SecurityCenter, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.pricings = PricingsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.alerts = AlertsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.settings = SettingsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.allowed_connections = AllowedConnectionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.discovered_security_solutions = DiscoveredSecuritySolutionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.external_security_solutions = ExternalSecuritySolutionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.jit_network_access_policies = JitNetworkAccessPoliciesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.locations = LocationsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.tasks = TasksOperations( - self._client, self.config, self._serialize, self._deserialize) - self.topology = TopologyOperations( - self._client, self.config, self._serialize, self._deserialize) - self.advanced_threat_protection = AdvancedThreatProtectionOperations( - self._client, self.config, self._serialize, self._deserialize) - self.auto_provisioning_settings = AutoProvisioningSettingsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.compliances = CompliancesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.information_protection_policies = InformationProtectionPoliciesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.security_contacts = SecurityContactsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.workspace_settings = WorkspaceSettingsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/__init__.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/__init__.py index 9a9b15f10c6b..b29ecd7f6e57 100644 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/__init__.py +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .signal_rmanagement_client import SignalRManagementClient -from .version import VERSION +from ._configuration import SignalRManagementClientConfiguration +from ._signal_rmanagement_client import SignalRManagementClient +__all__ = ['SignalRManagementClient', 'SignalRManagementClientConfiguration'] -__all__ = ['SignalRManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/_configuration.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/_configuration.py new file mode 100644 index 000000000000..1693ad648a32 --- /dev/null +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/_configuration.py @@ -0,0 +1,50 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class SignalRManagementClientConfiguration(AzureConfiguration): + """Configuration for SignalRManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Gets subscription Id which uniquely identify the + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(SignalRManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-signalr/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/_signal_rmanagement_client.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/_signal_rmanagement_client.py new file mode 100644 index 000000000000..49c4bcbbb641 --- /dev/null +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/_signal_rmanagement_client.py @@ -0,0 +1,61 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import SignalRManagementClientConfiguration +from .operations import Operations +from .operations import SignalROperations +from .operations import UsagesOperations +from . import models + + +class SignalRManagementClient(SDKClient): + """REST API for Azure SignalR Service + + :ivar config: Configuration for client. + :vartype config: SignalRManagementClientConfiguration + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.signalr.operations.Operations + :ivar signal_r: SignalR operations + :vartype signal_r: azure.mgmt.signalr.operations.SignalROperations + :ivar usages: Usages operations + :vartype usages: azure.mgmt.signalr.operations.UsagesOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Gets subscription Id which uniquely identify the + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = SignalRManagementClientConfiguration(credentials, subscription_id, base_url) + super(SignalRManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2018-10-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.signal_r = SignalROperations( + self._client, self.config, self._serialize, self._deserialize) + self.usages = UsagesOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/__init__.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/__init__.py index 9ba920b7ea83..a3431b59bf59 100644 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/__init__.py +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/__init__.py @@ -10,74 +10,80 @@ # -------------------------------------------------------------------------- try: - from .operation_display_py3 import OperationDisplay - from .dimension_py3 import Dimension - from .metric_specification_py3 import MetricSpecification - from .service_specification_py3 import ServiceSpecification - from .operation_properties_py3 import OperationProperties - from .operation_py3 import Operation - from .name_availability_parameters_py3 import NameAvailabilityParameters - from .name_availability_py3 import NameAvailability - from .resource_sku_py3 import ResourceSku - from .signal_rresource_py3 import SignalRResource - from .tracked_resource_py3 import TrackedResource - from .resource_py3 import Resource - from .signal_rcreate_or_update_properties_py3 import SignalRCreateOrUpdateProperties - from .signal_rkeys_py3 import SignalRKeys - from .regenerate_key_parameters_py3 import RegenerateKeyParameters - from .signal_rcreate_parameters_py3 import SignalRCreateParameters - from .signal_rupdate_parameters_py3 import SignalRUpdateParameters - from .signal_rusage_name_py3 import SignalRUsageName - from .signal_rusage_py3 import SignalRUsage + from ._models_py3 import Dimension + from ._models_py3 import MetricSpecification + from ._models_py3 import NameAvailability + from ._models_py3 import NameAvailabilityParameters + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import OperationProperties + from ._models_py3 import RegenerateKeyParameters + from ._models_py3 import Resource + from ._models_py3 import ResourceSku + from ._models_py3 import ServiceSpecification + from ._models_py3 import SignalRCorsSettings + from ._models_py3 import SignalRCreateOrUpdateProperties + from ._models_py3 import SignalRCreateParameters + from ._models_py3 import SignalRFeature + from ._models_py3 import SignalRKeys + from ._models_py3 import SignalRResource + from ._models_py3 import SignalRUpdateParameters + from ._models_py3 import SignalRUsage + from ._models_py3 import SignalRUsageName + from ._models_py3 import TrackedResource except (SyntaxError, ImportError): - from .operation_display import OperationDisplay - from .dimension import Dimension - from .metric_specification import MetricSpecification - from .service_specification import ServiceSpecification - from .operation_properties import OperationProperties - from .operation import Operation - from .name_availability_parameters import NameAvailabilityParameters - from .name_availability import NameAvailability - from .resource_sku import ResourceSku - from .signal_rresource import SignalRResource - from .tracked_resource import TrackedResource - from .resource import Resource - from .signal_rcreate_or_update_properties import SignalRCreateOrUpdateProperties - from .signal_rkeys import SignalRKeys - from .regenerate_key_parameters import RegenerateKeyParameters - from .signal_rcreate_parameters import SignalRCreateParameters - from .signal_rupdate_parameters import SignalRUpdateParameters - from .signal_rusage_name import SignalRUsageName - from .signal_rusage import SignalRUsage -from .operation_paged import OperationPaged -from .signal_rresource_paged import SignalRResourcePaged -from .signal_rusage_paged import SignalRUsagePaged -from .signal_rmanagement_client_enums import ( + from ._models import Dimension + from ._models import MetricSpecification + from ._models import NameAvailability + from ._models import NameAvailabilityParameters + from ._models import Operation + from ._models import OperationDisplay + from ._models import OperationProperties + from ._models import RegenerateKeyParameters + from ._models import Resource + from ._models import ResourceSku + from ._models import ServiceSpecification + from ._models import SignalRCorsSettings + from ._models import SignalRCreateOrUpdateProperties + from ._models import SignalRCreateParameters + from ._models import SignalRFeature + from ._models import SignalRKeys + from ._models import SignalRResource + from ._models import SignalRUpdateParameters + from ._models import SignalRUsage + from ._models import SignalRUsageName + from ._models import TrackedResource +from ._paged_models import OperationPaged +from ._paged_models import SignalRResourcePaged +from ._paged_models import SignalRUsagePaged +from ._signal_rmanagement_client_enums import ( SignalRSkuTier, ProvisioningState, KeyType, ) __all__ = [ - 'OperationDisplay', 'Dimension', 'MetricSpecification', - 'ServiceSpecification', - 'OperationProperties', - 'Operation', - 'NameAvailabilityParameters', 'NameAvailability', - 'ResourceSku', - 'SignalRResource', - 'TrackedResource', + 'NameAvailabilityParameters', + 'Operation', + 'OperationDisplay', + 'OperationProperties', + 'RegenerateKeyParameters', 'Resource', + 'ResourceSku', + 'ServiceSpecification', + 'SignalRCorsSettings', 'SignalRCreateOrUpdateProperties', - 'SignalRKeys', - 'RegenerateKeyParameters', 'SignalRCreateParameters', + 'SignalRFeature', + 'SignalRKeys', + 'SignalRResource', 'SignalRUpdateParameters', - 'SignalRUsageName', 'SignalRUsage', + 'SignalRUsageName', + 'TrackedResource', 'OperationPaged', 'SignalRResourcePaged', 'SignalRUsagePaged', diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_models.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_models.py new file mode 100644 index 000000000000..8715c93ca571 --- /dev/null +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_models.py @@ -0,0 +1,726 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class Dimension(Model): + """Specifications of the Dimension of metrics. + + :param name: The public facing name of the dimension. + :type name: str + :param display_name: Localized friendly display name of the dimension. + :type display_name: str + :param internal_name: Name of the dimension as it appears in MDM. + :type internal_name: str + :param to_be_exported_for_shoebox: A Boolean flag indicating whether this + dimension should be included for the shoebox export scenario. + :type to_be_exported_for_shoebox: bool + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'internal_name': {'key': 'internalName', 'type': 'str'}, + 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(Dimension, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.internal_name = kwargs.get('internal_name', None) + self.to_be_exported_for_shoebox = kwargs.get('to_be_exported_for_shoebox', None) + + +class MetricSpecification(Model): + """Specifications of the Metrics for Azure Monitoring. + + :param name: Name of the metric. + :type name: str + :param display_name: Localized friendly display name of the metric. + :type display_name: str + :param display_description: Localized friendly description of the metric. + :type display_description: str + :param unit: The unit that makes sense for the metric. + :type unit: str + :param aggregation_type: Only provide one value for this field. Valid + values: Average, Minimum, Maximum, Total, Count. + :type aggregation_type: str + :param fill_gap_with_zero: Optional. If set to true, then zero will be + returned for time duration where no metric is emitted/published. + Ex. a metric that returns the number of times a particular error code was + emitted. The error code may not appear + often, instead of the RP publishing 0, Shoebox can auto fill in 0s for + time periods where nothing was emitted. + :type fill_gap_with_zero: str + :param category: The name of the metric category that the metric belongs + to. A metric can only belong to a single category. + :type category: str + :param dimensions: The dimensions of the metrics. + :type dimensions: list[~azure.mgmt.signalr.models.Dimension] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'dimensions': {'key': 'dimensions', 'type': '[Dimension]'}, + } + + def __init__(self, **kwargs): + super(MetricSpecification, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.display_description = kwargs.get('display_description', None) + self.unit = kwargs.get('unit', None) + self.aggregation_type = kwargs.get('aggregation_type', None) + self.fill_gap_with_zero = kwargs.get('fill_gap_with_zero', None) + self.category = kwargs.get('category', None) + self.dimensions = kwargs.get('dimensions', None) + + +class NameAvailability(Model): + """Result of the request to check name availability. It contains a flag and + possible reason of failure. + + :param name_available: Indicates whether the name is available or not. + :type name_available: bool + :param reason: The reason of the availability. Required if name is not + available. + :type reason: str + :param message: The message of the operation. + :type message: str + """ + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NameAvailability, self).__init__(**kwargs) + self.name_available = kwargs.get('name_available', None) + self.reason = kwargs.get('reason', None) + self.message = kwargs.get('message', None) + + +class NameAvailabilityParameters(Model): + """Data POST-ed to the nameAvailability action. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The resource type. Should be always + "Microsoft.SignalRService/SignalR". + :type type: str + :param name: Required. The SignalR service name to validate. + e.g."my-signalR-name-here" + :type name: str + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NameAvailabilityParameters, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.name = kwargs.get('name', None) + + +class Operation(Model): + """REST API operation supported by SignalR resource provider. + + :param name: Name of the operation with format: + {provider}/{resource}/{operation} + :type name: str + :param display: The object that describes the operation. + :type display: ~azure.mgmt.signalr.models.OperationDisplay + :param origin: Optional. The intended executor of the operation; governs + the display of the operation in the RBAC UX and the audit logs UX. + :type origin: str + :param properties: Extra properties for the operation. + :type properties: ~azure.mgmt.signalr.models.OperationProperties + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'OperationProperties'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + self.properties = kwargs.get('properties', None) + + +class OperationDisplay(Model): + """The object that describes a operation. + + :param provider: Friendly name of the resource provider + :type provider: str + :param resource: Resource type on which the operation is performed. + :type resource: str + :param operation: The localized friendly name for the operation. + :type operation: str + :param description: The localized friendly description for the operation + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class OperationProperties(Model): + """Extra Operation properties. + + :param service_specification: The service specifications. + :type service_specification: + ~azure.mgmt.signalr.models.ServiceSpecification + """ + + _attribute_map = { + 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__(self, **kwargs): + super(OperationProperties, self).__init__(**kwargs) + self.service_specification = kwargs.get('service_specification', None) + + +class RegenerateKeyParameters(Model): + """Parameters describes the request to regenerate access keys. + + :param key_type: The keyType to regenerate. Must be either 'primary' or + 'secondary'(case-insensitive). Possible values include: 'Primary', + 'Secondary' + :type key_type: str or ~azure.mgmt.signalr.models.KeyType + """ + + _attribute_map = { + 'key_type': {'key': 'keyType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RegenerateKeyParameters, self).__init__(**kwargs) + self.key_type = kwargs.get('key_type', None) + + +class Resource(Model): + """The core properties of ARM resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the service - e.g. + "Microsoft.SignalRService/SignalR" + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class ResourceSku(Model): + """The billing information of the SignalR resource. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU. Required. + Allowed values: Standard_S1, Free_F1 + :type name: str + :param tier: Optional tier of this particular SKU. 'Standard' or 'Free'. + `Basic` is deprecated, use `Standard` instead. Possible values include: + 'Free', 'Basic', 'Standard', 'Premium' + :type tier: str or ~azure.mgmt.signalr.models.SignalRSkuTier + :param size: Optional string. For future use. + :type size: str + :param family: Optional string. For future use. + :type family: str + :param capacity: Optional, integer. The unit count of SignalR resource. 1 + by default. + If present, following values are allowed: + Free: 1 + Standard: 1,2,5,10,20,50,100 + :type capacity: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ResourceSku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + self.size = kwargs.get('size', None) + self.family = kwargs.get('family', None) + self.capacity = kwargs.get('capacity', None) + + +class ServiceSpecification(Model): + """An object that describes a specification. + + :param metric_specifications: Specifications of the Metrics for Azure + Monitoring. + :type metric_specifications: + list[~azure.mgmt.signalr.models.MetricSpecification] + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + } + + def __init__(self, **kwargs): + super(ServiceSpecification, self).__init__(**kwargs) + self.metric_specifications = kwargs.get('metric_specifications', None) + + +class SignalRCorsSettings(Model): + """Cross-Origin Resource Sharing (CORS) settings. + + :param allowed_origins: Gets or sets the list of origins that should be + allowed to make cross-origin calls (for example: + http://example.com:12345). Use "*" to allow all. If omitted, allow all by + default. + :type allowed_origins: list[str] + """ + + _attribute_map = { + 'allowed_origins': {'key': 'allowedOrigins', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(SignalRCorsSettings, self).__init__(**kwargs) + self.allowed_origins = kwargs.get('allowed_origins', None) + + +class SignalRCreateOrUpdateProperties(Model): + """Settings used to provision or configure the resource. + + :param host_name_prefix: Prefix for the hostName of the SignalR service. + Retained for future use. + The hostname will be of format: + <hostNamePrefix>.service.signalr.net. + :type host_name_prefix: str + :param features: List of SignalR featureFlags. e.g. ServiceMode. + FeatureFlags that are not included in the parameters for the update + operation will not be modified. + And the response will only include featureFlags that are explicitly set. + When a featureFlag is not explicitly set, SignalR service will use its + globally default value. + But keep in mind, the default value doesn't mean "false". It varies in + terms of different FeatureFlags. + :type features: list[~azure.mgmt.signalr.models.SignalRFeature] + :param cors: Cross-Origin Resource Sharing (CORS) settings. + :type cors: ~azure.mgmt.signalr.models.SignalRCorsSettings + """ + + _attribute_map = { + 'host_name_prefix': {'key': 'hostNamePrefix', 'type': 'str'}, + 'features': {'key': 'features', 'type': '[SignalRFeature]'}, + 'cors': {'key': 'cors', 'type': 'SignalRCorsSettings'}, + } + + def __init__(self, **kwargs): + super(SignalRCreateOrUpdateProperties, self).__init__(**kwargs) + self.host_name_prefix = kwargs.get('host_name_prefix', None) + self.features = kwargs.get('features', None) + self.cors = kwargs.get('cors', None) + + +class SignalRUpdateParameters(Model): + """Parameters for SignalR service update operation. + + :param tags: A list of key value pairs that describe the resource. + :type tags: dict[str, str] + :param sku: The billing information of the resource.(e.g. basic vs. + standard) + :type sku: ~azure.mgmt.signalr.models.ResourceSku + :param properties: Settings used to provision or configure the resource + :type properties: + ~azure.mgmt.signalr.models.SignalRCreateOrUpdateProperties + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'ResourceSku'}, + 'properties': {'key': 'properties', 'type': 'SignalRCreateOrUpdateProperties'}, + } + + def __init__(self, **kwargs): + super(SignalRUpdateParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) + self.properties = kwargs.get('properties', None) + + +class SignalRCreateParameters(SignalRUpdateParameters): + """Parameters for SignalR service create/update operation. + Keep the same schema as AzSignalR.Models.SignalRResource. + + All required parameters must be populated in order to send to Azure. + + :param tags: A list of key value pairs that describe the resource. + :type tags: dict[str, str] + :param sku: The billing information of the resource.(e.g. basic vs. + standard) + :type sku: ~azure.mgmt.signalr.models.ResourceSku + :param properties: Settings used to provision or configure the resource + :type properties: + ~azure.mgmt.signalr.models.SignalRCreateOrUpdateProperties + :param location: Required. Azure GEO region: e.g. West US | East US | + North Central US | South Central US | West Europe | North Europe | East + Asia | Southeast Asia | etc. + The geo region of a resource never changes after it is created. + :type location: str + """ + + _validation = { + 'location': {'required': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'ResourceSku'}, + 'properties': {'key': 'properties', 'type': 'SignalRCreateOrUpdateProperties'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SignalRCreateParameters, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + + +class SignalRFeature(Model): + """Feature of a SignalR resource, which controls the SignalR runtime behavior. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar flag: Required. Kind of feature. Required. Default value: + "ServiceMode" . + :vartype flag: str + :param value: Required. Value of the feature flag. See Azure SignalR + service document https://docs.microsoft.com/en-us/azure/azure-signalr/ for + allowed values. + :type value: str + :param properties: Optional properties related to this feature. + :type properties: dict[str, str] + """ + + _validation = { + 'flag': {'required': True, 'constant': True}, + 'value': {'required': True, 'max_length': 128, 'min_length': 1}, + } + + _attribute_map = { + 'flag': {'key': 'flag', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + } + + flag = "ServiceMode" + + def __init__(self, **kwargs): + super(SignalRFeature, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.properties = kwargs.get('properties', None) + + +class SignalRKeys(Model): + """A class represents the access keys of SignalR service. + + :param primary_key: The primary access key. + :type primary_key: str + :param secondary_key: The secondary access key. + :type secondary_key: str + :param primary_connection_string: SignalR connection string constructed + via the primaryKey + :type primary_connection_string: str + :param secondary_connection_string: SignalR connection string constructed + via the secondaryKey + :type secondary_connection_string: str + """ + + _attribute_map = { + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + 'primary_connection_string': {'key': 'primaryConnectionString', 'type': 'str'}, + 'secondary_connection_string': {'key': 'secondaryConnectionString', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SignalRKeys, self).__init__(**kwargs) + self.primary_key = kwargs.get('primary_key', None) + self.secondary_key = kwargs.get('secondary_key', None) + self.primary_connection_string = kwargs.get('primary_connection_string', None) + self.secondary_connection_string = kwargs.get('secondary_connection_string', None) + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the service - e.g. + "Microsoft.SignalRService/SignalR" + :vartype type: str + :param location: The GEO location of the SignalR service. e.g. West US | + East US | North Central US | South Central US. + :type location: str + :param tags: Tags of the service which is a list of key value pairs that + describe the resource. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class SignalRResource(TrackedResource): + """A class represent a SignalR service resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the service - e.g. + "Microsoft.SignalRService/SignalR" + :vartype type: str + :param location: The GEO location of the SignalR service. e.g. West US | + East US | North Central US | South Central US. + :type location: str + :param tags: Tags of the service which is a list of key value pairs that + describe the resource. + :type tags: dict[str, str] + :param sku: SKU of the service. + :type sku: ~azure.mgmt.signalr.models.ResourceSku + :param host_name_prefix: Prefix for the hostName of the SignalR service. + Retained for future use. + The hostname will be of format: + <hostNamePrefix>.service.signalr.net. + :type host_name_prefix: str + :param features: List of SignalR featureFlags. e.g. ServiceMode. + FeatureFlags that are not included in the parameters for the update + operation will not be modified. + And the response will only include featureFlags that are explicitly set. + When a featureFlag is not explicitly set, SignalR service will use its + globally default value. + But keep in mind, the default value doesn't mean "false". It varies in + terms of different FeatureFlags. + :type features: list[~azure.mgmt.signalr.models.SignalRFeature] + :param cors: Cross-Origin Resource Sharing (CORS) settings. + :type cors: ~azure.mgmt.signalr.models.SignalRCorsSettings + :ivar provisioning_state: Provisioning state of the resource. Possible + values include: 'Unknown', 'Succeeded', 'Failed', 'Canceled', 'Running', + 'Creating', 'Updating', 'Deleting', 'Moving' + :vartype provisioning_state: str or + ~azure.mgmt.signalr.models.ProvisioningState + :ivar external_ip: The publicly accessible IP of the SignalR service. + :vartype external_ip: str + :ivar host_name: FQDN of the SignalR service instance. Format: + xxx.service.signalr.net + :vartype host_name: str + :ivar public_port: The publicly accessible port of the SignalR service + which is designed for browser/client side usage. + :vartype public_port: int + :ivar server_port: The publicly accessible port of the SignalR service + which is designed for customer server side usage. + :vartype server_port: int + :param version: Version of the SignalR resource. Probably you need the + same or higher version of client SDKs. + :type version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'external_ip': {'readonly': True}, + 'host_name': {'readonly': True}, + 'public_port': {'readonly': True}, + 'server_port': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'ResourceSku'}, + 'host_name_prefix': {'key': 'properties.hostNamePrefix', 'type': 'str'}, + 'features': {'key': 'properties.features', 'type': '[SignalRFeature]'}, + 'cors': {'key': 'properties.cors', 'type': 'SignalRCorsSettings'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'external_ip': {'key': 'properties.externalIP', 'type': 'str'}, + 'host_name': {'key': 'properties.hostName', 'type': 'str'}, + 'public_port': {'key': 'properties.publicPort', 'type': 'int'}, + 'server_port': {'key': 'properties.serverPort', 'type': 'int'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SignalRResource, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.host_name_prefix = kwargs.get('host_name_prefix', None) + self.features = kwargs.get('features', None) + self.cors = kwargs.get('cors', None) + self.provisioning_state = None + self.external_ip = None + self.host_name = None + self.public_port = None + self.server_port = None + self.version = kwargs.get('version', None) + + +class SignalRUsage(Model): + """Object that describes a specific usage of SignalR resources. + + :param id: Fully qualified ARM resource id + :type id: str + :param current_value: Current value for the usage quota. + :type current_value: long + :param limit: The maximum permitted value for the usage quota. If there is + no limit, this value will be -1. + :type limit: long + :param name: Localizable String object containing the name and a localized + value. + :type name: ~azure.mgmt.signalr.models.SignalRUsageName + :param unit: Representing the units of the usage quota. Possible values + are: Count, Bytes, Seconds, Percent, CountPerSecond, BytesPerSecond. + :type unit: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'long'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'SignalRUsageName'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SignalRUsage, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.current_value = kwargs.get('current_value', None) + self.limit = kwargs.get('limit', None) + self.name = kwargs.get('name', None) + self.unit = kwargs.get('unit', None) + + +class SignalRUsageName(Model): + """Localizable String object containing the name and a localized value. + + :param value: The identifier of the usage. + :type value: str + :param localized_value: Localized name of the usage. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SignalRUsageName, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.localized_value = kwargs.get('localized_value', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_models_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_models_py3.py new file mode 100644 index 000000000000..a460a639402f --- /dev/null +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_models_py3.py @@ -0,0 +1,726 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class Dimension(Model): + """Specifications of the Dimension of metrics. + + :param name: The public facing name of the dimension. + :type name: str + :param display_name: Localized friendly display name of the dimension. + :type display_name: str + :param internal_name: Name of the dimension as it appears in MDM. + :type internal_name: str + :param to_be_exported_for_shoebox: A Boolean flag indicating whether this + dimension should be included for the shoebox export scenario. + :type to_be_exported_for_shoebox: bool + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'internal_name': {'key': 'internalName', 'type': 'str'}, + 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, internal_name: str=None, to_be_exported_for_shoebox: bool=None, **kwargs) -> None: + super(Dimension, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.internal_name = internal_name + self.to_be_exported_for_shoebox = to_be_exported_for_shoebox + + +class MetricSpecification(Model): + """Specifications of the Metrics for Azure Monitoring. + + :param name: Name of the metric. + :type name: str + :param display_name: Localized friendly display name of the metric. + :type display_name: str + :param display_description: Localized friendly description of the metric. + :type display_description: str + :param unit: The unit that makes sense for the metric. + :type unit: str + :param aggregation_type: Only provide one value for this field. Valid + values: Average, Minimum, Maximum, Total, Count. + :type aggregation_type: str + :param fill_gap_with_zero: Optional. If set to true, then zero will be + returned for time duration where no metric is emitted/published. + Ex. a metric that returns the number of times a particular error code was + emitted. The error code may not appear + often, instead of the RP publishing 0, Shoebox can auto fill in 0s for + time periods where nothing was emitted. + :type fill_gap_with_zero: str + :param category: The name of the metric category that the metric belongs + to. A metric can only belong to a single category. + :type category: str + :param dimensions: The dimensions of the metrics. + :type dimensions: list[~azure.mgmt.signalr.models.Dimension] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'dimensions': {'key': 'dimensions', 'type': '[Dimension]'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, display_description: str=None, unit: str=None, aggregation_type: str=None, fill_gap_with_zero: str=None, category: str=None, dimensions=None, **kwargs) -> None: + super(MetricSpecification, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.display_description = display_description + self.unit = unit + self.aggregation_type = aggregation_type + self.fill_gap_with_zero = fill_gap_with_zero + self.category = category + self.dimensions = dimensions + + +class NameAvailability(Model): + """Result of the request to check name availability. It contains a flag and + possible reason of failure. + + :param name_available: Indicates whether the name is available or not. + :type name_available: bool + :param reason: The reason of the availability. Required if name is not + available. + :type reason: str + :param message: The message of the operation. + :type message: str + """ + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, name_available: bool=None, reason: str=None, message: str=None, **kwargs) -> None: + super(NameAvailability, self).__init__(**kwargs) + self.name_available = name_available + self.reason = reason + self.message = message + + +class NameAvailabilityParameters(Model): + """Data POST-ed to the nameAvailability action. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The resource type. Should be always + "Microsoft.SignalRService/SignalR". + :type type: str + :param name: Required. The SignalR service name to validate. + e.g."my-signalR-name-here" + :type name: str + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, type: str, name: str, **kwargs) -> None: + super(NameAvailabilityParameters, self).__init__(**kwargs) + self.type = type + self.name = name + + +class Operation(Model): + """REST API operation supported by SignalR resource provider. + + :param name: Name of the operation with format: + {provider}/{resource}/{operation} + :type name: str + :param display: The object that describes the operation. + :type display: ~azure.mgmt.signalr.models.OperationDisplay + :param origin: Optional. The intended executor of the operation; governs + the display of the operation in the RBAC UX and the audit logs UX. + :type origin: str + :param properties: Extra properties for the operation. + :type properties: ~azure.mgmt.signalr.models.OperationProperties + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'OperationProperties'}, + } + + def __init__(self, *, name: str=None, display=None, origin: str=None, properties=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin + self.properties = properties + + +class OperationDisplay(Model): + """The object that describes a operation. + + :param provider: Friendly name of the resource provider + :type provider: str + :param resource: Resource type on which the operation is performed. + :type resource: str + :param operation: The localized friendly name for the operation. + :type operation: str + :param description: The localized friendly description for the operation + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class OperationProperties(Model): + """Extra Operation properties. + + :param service_specification: The service specifications. + :type service_specification: + ~azure.mgmt.signalr.models.ServiceSpecification + """ + + _attribute_map = { + 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__(self, *, service_specification=None, **kwargs) -> None: + super(OperationProperties, self).__init__(**kwargs) + self.service_specification = service_specification + + +class RegenerateKeyParameters(Model): + """Parameters describes the request to regenerate access keys. + + :param key_type: The keyType to regenerate. Must be either 'primary' or + 'secondary'(case-insensitive). Possible values include: 'Primary', + 'Secondary' + :type key_type: str or ~azure.mgmt.signalr.models.KeyType + """ + + _attribute_map = { + 'key_type': {'key': 'keyType', 'type': 'str'}, + } + + def __init__(self, *, key_type=None, **kwargs) -> None: + super(RegenerateKeyParameters, self).__init__(**kwargs) + self.key_type = key_type + + +class Resource(Model): + """The core properties of ARM resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the service - e.g. + "Microsoft.SignalRService/SignalR" + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class ResourceSku(Model): + """The billing information of the SignalR resource. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU. Required. + Allowed values: Standard_S1, Free_F1 + :type name: str + :param tier: Optional tier of this particular SKU. 'Standard' or 'Free'. + `Basic` is deprecated, use `Standard` instead. Possible values include: + 'Free', 'Basic', 'Standard', 'Premium' + :type tier: str or ~azure.mgmt.signalr.models.SignalRSkuTier + :param size: Optional string. For future use. + :type size: str + :param family: Optional string. For future use. + :type family: str + :param capacity: Optional, integer. The unit count of SignalR resource. 1 + by default. + If present, following values are allowed: + Free: 1 + Standard: 1,2,5,10,20,50,100 + :type capacity: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__(self, *, name: str, tier=None, size: str=None, family: str=None, capacity: int=None, **kwargs) -> None: + super(ResourceSku, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.size = size + self.family = family + self.capacity = capacity + + +class ServiceSpecification(Model): + """An object that describes a specification. + + :param metric_specifications: Specifications of the Metrics for Azure + Monitoring. + :type metric_specifications: + list[~azure.mgmt.signalr.models.MetricSpecification] + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + } + + def __init__(self, *, metric_specifications=None, **kwargs) -> None: + super(ServiceSpecification, self).__init__(**kwargs) + self.metric_specifications = metric_specifications + + +class SignalRCorsSettings(Model): + """Cross-Origin Resource Sharing (CORS) settings. + + :param allowed_origins: Gets or sets the list of origins that should be + allowed to make cross-origin calls (for example: + http://example.com:12345). Use "*" to allow all. If omitted, allow all by + default. + :type allowed_origins: list[str] + """ + + _attribute_map = { + 'allowed_origins': {'key': 'allowedOrigins', 'type': '[str]'}, + } + + def __init__(self, *, allowed_origins=None, **kwargs) -> None: + super(SignalRCorsSettings, self).__init__(**kwargs) + self.allowed_origins = allowed_origins + + +class SignalRCreateOrUpdateProperties(Model): + """Settings used to provision or configure the resource. + + :param host_name_prefix: Prefix for the hostName of the SignalR service. + Retained for future use. + The hostname will be of format: + <hostNamePrefix>.service.signalr.net. + :type host_name_prefix: str + :param features: List of SignalR featureFlags. e.g. ServiceMode. + FeatureFlags that are not included in the parameters for the update + operation will not be modified. + And the response will only include featureFlags that are explicitly set. + When a featureFlag is not explicitly set, SignalR service will use its + globally default value. + But keep in mind, the default value doesn't mean "false". It varies in + terms of different FeatureFlags. + :type features: list[~azure.mgmt.signalr.models.SignalRFeature] + :param cors: Cross-Origin Resource Sharing (CORS) settings. + :type cors: ~azure.mgmt.signalr.models.SignalRCorsSettings + """ + + _attribute_map = { + 'host_name_prefix': {'key': 'hostNamePrefix', 'type': 'str'}, + 'features': {'key': 'features', 'type': '[SignalRFeature]'}, + 'cors': {'key': 'cors', 'type': 'SignalRCorsSettings'}, + } + + def __init__(self, *, host_name_prefix: str=None, features=None, cors=None, **kwargs) -> None: + super(SignalRCreateOrUpdateProperties, self).__init__(**kwargs) + self.host_name_prefix = host_name_prefix + self.features = features + self.cors = cors + + +class SignalRUpdateParameters(Model): + """Parameters for SignalR service update operation. + + :param tags: A list of key value pairs that describe the resource. + :type tags: dict[str, str] + :param sku: The billing information of the resource.(e.g. basic vs. + standard) + :type sku: ~azure.mgmt.signalr.models.ResourceSku + :param properties: Settings used to provision or configure the resource + :type properties: + ~azure.mgmt.signalr.models.SignalRCreateOrUpdateProperties + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'ResourceSku'}, + 'properties': {'key': 'properties', 'type': 'SignalRCreateOrUpdateProperties'}, + } + + def __init__(self, *, tags=None, sku=None, properties=None, **kwargs) -> None: + super(SignalRUpdateParameters, self).__init__(**kwargs) + self.tags = tags + self.sku = sku + self.properties = properties + + +class SignalRCreateParameters(SignalRUpdateParameters): + """Parameters for SignalR service create/update operation. + Keep the same schema as AzSignalR.Models.SignalRResource. + + All required parameters must be populated in order to send to Azure. + + :param tags: A list of key value pairs that describe the resource. + :type tags: dict[str, str] + :param sku: The billing information of the resource.(e.g. basic vs. + standard) + :type sku: ~azure.mgmt.signalr.models.ResourceSku + :param properties: Settings used to provision or configure the resource + :type properties: + ~azure.mgmt.signalr.models.SignalRCreateOrUpdateProperties + :param location: Required. Azure GEO region: e.g. West US | East US | + North Central US | South Central US | West Europe | North Europe | East + Asia | Southeast Asia | etc. + The geo region of a resource never changes after it is created. + :type location: str + """ + + _validation = { + 'location': {'required': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'ResourceSku'}, + 'properties': {'key': 'properties', 'type': 'SignalRCreateOrUpdateProperties'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, sku=None, properties=None, **kwargs) -> None: + super(SignalRCreateParameters, self).__init__(tags=tags, sku=sku, properties=properties, **kwargs) + self.location = location + + +class SignalRFeature(Model): + """Feature of a SignalR resource, which controls the SignalR runtime behavior. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar flag: Required. Kind of feature. Required. Default value: + "ServiceMode" . + :vartype flag: str + :param value: Required. Value of the feature flag. See Azure SignalR + service document https://docs.microsoft.com/en-us/azure/azure-signalr/ for + allowed values. + :type value: str + :param properties: Optional properties related to this feature. + :type properties: dict[str, str] + """ + + _validation = { + 'flag': {'required': True, 'constant': True}, + 'value': {'required': True, 'max_length': 128, 'min_length': 1}, + } + + _attribute_map = { + 'flag': {'key': 'flag', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + } + + flag = "ServiceMode" + + def __init__(self, *, value: str, properties=None, **kwargs) -> None: + super(SignalRFeature, self).__init__(**kwargs) + self.value = value + self.properties = properties + + +class SignalRKeys(Model): + """A class represents the access keys of SignalR service. + + :param primary_key: The primary access key. + :type primary_key: str + :param secondary_key: The secondary access key. + :type secondary_key: str + :param primary_connection_string: SignalR connection string constructed + via the primaryKey + :type primary_connection_string: str + :param secondary_connection_string: SignalR connection string constructed + via the secondaryKey + :type secondary_connection_string: str + """ + + _attribute_map = { + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + 'primary_connection_string': {'key': 'primaryConnectionString', 'type': 'str'}, + 'secondary_connection_string': {'key': 'secondaryConnectionString', 'type': 'str'}, + } + + def __init__(self, *, primary_key: str=None, secondary_key: str=None, primary_connection_string: str=None, secondary_connection_string: str=None, **kwargs) -> None: + super(SignalRKeys, self).__init__(**kwargs) + self.primary_key = primary_key + self.secondary_key = secondary_key + self.primary_connection_string = primary_connection_string + self.secondary_connection_string = secondary_connection_string + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the service - e.g. + "Microsoft.SignalRService/SignalR" + :vartype type: str + :param location: The GEO location of the SignalR service. e.g. West US | + East US | North Central US | South Central US. + :type location: str + :param tags: Tags of the service which is a list of key value pairs that + describe the resource. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(TrackedResource, self).__init__(**kwargs) + self.location = location + self.tags = tags + + +class SignalRResource(TrackedResource): + """A class represent a SignalR service resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the service - e.g. + "Microsoft.SignalRService/SignalR" + :vartype type: str + :param location: The GEO location of the SignalR service. e.g. West US | + East US | North Central US | South Central US. + :type location: str + :param tags: Tags of the service which is a list of key value pairs that + describe the resource. + :type tags: dict[str, str] + :param sku: SKU of the service. + :type sku: ~azure.mgmt.signalr.models.ResourceSku + :param host_name_prefix: Prefix for the hostName of the SignalR service. + Retained for future use. + The hostname will be of format: + <hostNamePrefix>.service.signalr.net. + :type host_name_prefix: str + :param features: List of SignalR featureFlags. e.g. ServiceMode. + FeatureFlags that are not included in the parameters for the update + operation will not be modified. + And the response will only include featureFlags that are explicitly set. + When a featureFlag is not explicitly set, SignalR service will use its + globally default value. + But keep in mind, the default value doesn't mean "false". It varies in + terms of different FeatureFlags. + :type features: list[~azure.mgmt.signalr.models.SignalRFeature] + :param cors: Cross-Origin Resource Sharing (CORS) settings. + :type cors: ~azure.mgmt.signalr.models.SignalRCorsSettings + :ivar provisioning_state: Provisioning state of the resource. Possible + values include: 'Unknown', 'Succeeded', 'Failed', 'Canceled', 'Running', + 'Creating', 'Updating', 'Deleting', 'Moving' + :vartype provisioning_state: str or + ~azure.mgmt.signalr.models.ProvisioningState + :ivar external_ip: The publicly accessible IP of the SignalR service. + :vartype external_ip: str + :ivar host_name: FQDN of the SignalR service instance. Format: + xxx.service.signalr.net + :vartype host_name: str + :ivar public_port: The publicly accessible port of the SignalR service + which is designed for browser/client side usage. + :vartype public_port: int + :ivar server_port: The publicly accessible port of the SignalR service + which is designed for customer server side usage. + :vartype server_port: int + :param version: Version of the SignalR resource. Probably you need the + same or higher version of client SDKs. + :type version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'external_ip': {'readonly': True}, + 'host_name': {'readonly': True}, + 'public_port': {'readonly': True}, + 'server_port': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'ResourceSku'}, + 'host_name_prefix': {'key': 'properties.hostNamePrefix', 'type': 'str'}, + 'features': {'key': 'properties.features', 'type': '[SignalRFeature]'}, + 'cors': {'key': 'properties.cors', 'type': 'SignalRCorsSettings'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'external_ip': {'key': 'properties.externalIP', 'type': 'str'}, + 'host_name': {'key': 'properties.hostName', 'type': 'str'}, + 'public_port': {'key': 'properties.publicPort', 'type': 'int'}, + 'server_port': {'key': 'properties.serverPort', 'type': 'int'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, sku=None, host_name_prefix: str=None, features=None, cors=None, version: str=None, **kwargs) -> None: + super(SignalRResource, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.host_name_prefix = host_name_prefix + self.features = features + self.cors = cors + self.provisioning_state = None + self.external_ip = None + self.host_name = None + self.public_port = None + self.server_port = None + self.version = version + + +class SignalRUsage(Model): + """Object that describes a specific usage of SignalR resources. + + :param id: Fully qualified ARM resource id + :type id: str + :param current_value: Current value for the usage quota. + :type current_value: long + :param limit: The maximum permitted value for the usage quota. If there is + no limit, this value will be -1. + :type limit: long + :param name: Localizable String object containing the name and a localized + value. + :type name: ~azure.mgmt.signalr.models.SignalRUsageName + :param unit: Representing the units of the usage quota. Possible values + are: Count, Bytes, Seconds, Percent, CountPerSecond, BytesPerSecond. + :type unit: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'long'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'SignalRUsageName'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, current_value: int=None, limit: int=None, name=None, unit: str=None, **kwargs) -> None: + super(SignalRUsage, self).__init__(**kwargs) + self.id = id + self.current_value = current_value + self.limit = limit + self.name = name + self.unit = unit + + +class SignalRUsageName(Model): + """Localizable String object containing the name and a localized value. + + :param value: The identifier of the usage. + :type value: str + :param localized_value: Localized name of the usage. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: + super(SignalRUsageName, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_paged_models.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_paged_models.py new file mode 100644 index 000000000000..c8c6f4172a18 --- /dev/null +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_paged_models.py @@ -0,0 +1,53 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class SignalRResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`SignalRResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SignalRResource]'} + } + + def __init__(self, *args, **kwargs): + + super(SignalRResourcePaged, self).__init__(*args, **kwargs) +class SignalRUsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`SignalRUsage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SignalRUsage]'} + } + + def __init__(self, *args, **kwargs): + + super(SignalRUsagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rmanagement_client_enums.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_signal_rmanagement_client_enums.py similarity index 100% rename from sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rmanagement_client_enums.py rename to sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_signal_rmanagement_client_enums.py diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/dimension.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/dimension.py deleted file mode 100644 index b85f606bcf94..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/dimension.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Dimension(Model): - """Specifications of the Dimension of metrics. - - :param name: The public facing name of the dimension. - :type name: str - :param display_name: Localized friendly display name of the dimension. - :type display_name: str - :param internal_name: Name of the dimension as it appears in MDM. - :type internal_name: str - :param to_be_exported_for_shoebox: A Boolean flag indicating whether this - dimension should be included for the shoebox export scenario. - :type to_be_exported_for_shoebox: bool - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'internal_name': {'key': 'internalName', 'type': 'str'}, - 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(Dimension, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display_name = kwargs.get('display_name', None) - self.internal_name = kwargs.get('internal_name', None) - self.to_be_exported_for_shoebox = kwargs.get('to_be_exported_for_shoebox', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/dimension_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/dimension_py3.py deleted file mode 100644 index 52390cd419c7..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/dimension_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Dimension(Model): - """Specifications of the Dimension of metrics. - - :param name: The public facing name of the dimension. - :type name: str - :param display_name: Localized friendly display name of the dimension. - :type display_name: str - :param internal_name: Name of the dimension as it appears in MDM. - :type internal_name: str - :param to_be_exported_for_shoebox: A Boolean flag indicating whether this - dimension should be included for the shoebox export scenario. - :type to_be_exported_for_shoebox: bool - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'internal_name': {'key': 'internalName', 'type': 'str'}, - 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, - } - - def __init__(self, *, name: str=None, display_name: str=None, internal_name: str=None, to_be_exported_for_shoebox: bool=None, **kwargs) -> None: - super(Dimension, self).__init__(**kwargs) - self.name = name - self.display_name = display_name - self.internal_name = internal_name - self.to_be_exported_for_shoebox = to_be_exported_for_shoebox diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/metric_specification.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/metric_specification.py deleted file mode 100644 index 1e36394f1aef..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/metric_specification.py +++ /dev/null @@ -1,63 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricSpecification(Model): - """Specifications of the Metrics for Azure Monitoring. - - :param name: Name of the metric. - :type name: str - :param display_name: Localized friendly display name of the metric. - :type display_name: str - :param display_description: Localized friendly description of the metric. - :type display_description: str - :param unit: The unit that makes sense for the metric. - :type unit: str - :param aggregation_type: Only provide one value for this field. Valid - values: Average, Minimum, Maximum, Total, Count. - :type aggregation_type: str - :param fill_gap_with_zero: Optional. If set to true, then zero will be - returned for time duration where no metric is emitted/published. - Ex. a metric that returns the number of times a particular error code was - emitted. The error code may not appear - often, instead of the RP publishing 0, Shoebox can auto fill in 0s for - time periods where nothing was emitted. - :type fill_gap_with_zero: str - :param category: The name of the metric category that the metric belongs - to. A metric can only belong to a single category. - :type category: str - :param dimensions: The dimensions of the metrics. - :type dimensions: list[~azure.mgmt.signalr.models.Dimension] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'display_description': {'key': 'displayDescription', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, - 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'dimensions': {'key': 'dimensions', 'type': '[Dimension]'}, - } - - def __init__(self, **kwargs): - super(MetricSpecification, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display_name = kwargs.get('display_name', None) - self.display_description = kwargs.get('display_description', None) - self.unit = kwargs.get('unit', None) - self.aggregation_type = kwargs.get('aggregation_type', None) - self.fill_gap_with_zero = kwargs.get('fill_gap_with_zero', None) - self.category = kwargs.get('category', None) - self.dimensions = kwargs.get('dimensions', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/metric_specification_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/metric_specification_py3.py deleted file mode 100644 index 7ac715b718ca..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/metric_specification_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricSpecification(Model): - """Specifications of the Metrics for Azure Monitoring. - - :param name: Name of the metric. - :type name: str - :param display_name: Localized friendly display name of the metric. - :type display_name: str - :param display_description: Localized friendly description of the metric. - :type display_description: str - :param unit: The unit that makes sense for the metric. - :type unit: str - :param aggregation_type: Only provide one value for this field. Valid - values: Average, Minimum, Maximum, Total, Count. - :type aggregation_type: str - :param fill_gap_with_zero: Optional. If set to true, then zero will be - returned for time duration where no metric is emitted/published. - Ex. a metric that returns the number of times a particular error code was - emitted. The error code may not appear - often, instead of the RP publishing 0, Shoebox can auto fill in 0s for - time periods where nothing was emitted. - :type fill_gap_with_zero: str - :param category: The name of the metric category that the metric belongs - to. A metric can only belong to a single category. - :type category: str - :param dimensions: The dimensions of the metrics. - :type dimensions: list[~azure.mgmt.signalr.models.Dimension] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'display_description': {'key': 'displayDescription', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, - 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'dimensions': {'key': 'dimensions', 'type': '[Dimension]'}, - } - - def __init__(self, *, name: str=None, display_name: str=None, display_description: str=None, unit: str=None, aggregation_type: str=None, fill_gap_with_zero: str=None, category: str=None, dimensions=None, **kwargs) -> None: - super(MetricSpecification, self).__init__(**kwargs) - self.name = name - self.display_name = display_name - self.display_description = display_description - self.unit = unit - self.aggregation_type = aggregation_type - self.fill_gap_with_zero = fill_gap_with_zero - self.category = category - self.dimensions = dimensions diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/name_availability.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/name_availability.py deleted file mode 100644 index 7b56e67c6704..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/name_availability.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NameAvailability(Model): - """Result of the request to check name availability. It contains a flag and - possible reason of failure. - - :param name_available: Indicates whether the name is available or not. - :type name_available: bool - :param reason: The reason of the availability. Required if name is not - available. - :type reason: str - :param message: The message of the operation. - :type message: str - """ - - _attribute_map = { - 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'reason': {'key': 'reason', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NameAvailability, self).__init__(**kwargs) - self.name_available = kwargs.get('name_available', None) - self.reason = kwargs.get('reason', None) - self.message = kwargs.get('message', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/name_availability_parameters.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/name_availability_parameters.py deleted file mode 100644 index 69d961776458..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/name_availability_parameters.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NameAvailabilityParameters(Model): - """Data POST-ed to the nameAvailability action. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. The resource type. Should be always - "Microsoft.SignalRService/SignalR". - :type type: str - :param name: Required. The SignalR service name to validate. - e.g."my-signalR-name-here" - :type name: str - """ - - _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NameAvailabilityParameters, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.name = kwargs.get('name', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/name_availability_parameters_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/name_availability_parameters_py3.py deleted file mode 100644 index caefb77011fd..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/name_availability_parameters_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NameAvailabilityParameters(Model): - """Data POST-ed to the nameAvailability action. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. The resource type. Should be always - "Microsoft.SignalRService/SignalR". - :type type: str - :param name: Required. The SignalR service name to validate. - e.g."my-signalR-name-here" - :type name: str - """ - - _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, type: str, name: str, **kwargs) -> None: - super(NameAvailabilityParameters, self).__init__(**kwargs) - self.type = type - self.name = name diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/name_availability_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/name_availability_py3.py deleted file mode 100644 index 9792b3765937..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/name_availability_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NameAvailability(Model): - """Result of the request to check name availability. It contains a flag and - possible reason of failure. - - :param name_available: Indicates whether the name is available or not. - :type name_available: bool - :param reason: The reason of the availability. Required if name is not - available. - :type reason: str - :param message: The message of the operation. - :type message: str - """ - - _attribute_map = { - 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'reason': {'key': 'reason', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, name_available: bool=None, reason: str=None, message: str=None, **kwargs) -> None: - super(NameAvailability, self).__init__(**kwargs) - self.name_available = name_available - self.reason = reason - self.message = message diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation.py deleted file mode 100644 index 77f115a4d2fc..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """REST API operation supported by SignalR resource provider. - - :param name: Name of the operation with format: - {provider}/{resource}/{operation} - :type name: str - :param display: The object that describes the operation. - :type display: ~azure.mgmt.signalr.models.OperationDisplay - :param origin: Optional. The intended executor of the operation; governs - the display of the operation in the RBAC UX and the audit logs UX. - :type origin: str - :param properties: Extra properties for the operation. - :type properties: ~azure.mgmt.signalr.models.OperationProperties - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'OperationProperties'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) - self.origin = kwargs.get('origin', None) - self.properties = kwargs.get('properties', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation_display.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation_display.py deleted file mode 100644 index d368ed731f5b..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation_display.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """The object that describes a operation. - - :param provider: Friendly name of the resource provider - :type provider: str - :param resource: Resource type on which the operation is performed. - :type resource: str - :param operation: The localized friendly name for the operation. - :type operation: str - :param description: The localized friendly description for the operation - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.resource = kwargs.get('resource', None) - self.operation = kwargs.get('operation', None) - self.description = kwargs.get('description', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation_display_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation_display_py3.py deleted file mode 100644 index 6e8283000f0a..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation_display_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """The object that describes a operation. - - :param provider: Friendly name of the resource provider - :type provider: str - :param resource: Resource type on which the operation is performed. - :type resource: str - :param operation: The localized friendly name for the operation. - :type operation: str - :param description: The localized friendly description for the operation - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation_paged.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation_paged.py deleted file mode 100644 index 60109137961f..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation_properties.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation_properties.py deleted file mode 100644 index 5884decce60a..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation_properties.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationProperties(Model): - """Extra Operation properties. - - :param service_specification: The service specifications. - :type service_specification: - ~azure.mgmt.signalr.models.ServiceSpecification - """ - - _attribute_map = { - 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, - } - - def __init__(self, **kwargs): - super(OperationProperties, self).__init__(**kwargs) - self.service_specification = kwargs.get('service_specification', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation_properties_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation_properties_py3.py deleted file mode 100644 index c78e2043ebff..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation_properties_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationProperties(Model): - """Extra Operation properties. - - :param service_specification: The service specifications. - :type service_specification: - ~azure.mgmt.signalr.models.ServiceSpecification - """ - - _attribute_map = { - 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, - } - - def __init__(self, *, service_specification=None, **kwargs) -> None: - super(OperationProperties, self).__init__(**kwargs) - self.service_specification = service_specification diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation_py3.py deleted file mode 100644 index 47e90891f0cd..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """REST API operation supported by SignalR resource provider. - - :param name: Name of the operation with format: - {provider}/{resource}/{operation} - :type name: str - :param display: The object that describes the operation. - :type display: ~azure.mgmt.signalr.models.OperationDisplay - :param origin: Optional. The intended executor of the operation; governs - the display of the operation in the RBAC UX and the audit logs UX. - :type origin: str - :param properties: Extra properties for the operation. - :type properties: ~azure.mgmt.signalr.models.OperationProperties - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'OperationProperties'}, - } - - def __init__(self, *, name: str=None, display=None, origin: str=None, properties=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = name - self.display = display - self.origin = origin - self.properties = properties diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/regenerate_key_parameters.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/regenerate_key_parameters.py deleted file mode 100644 index 5e313a7a9fce..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/regenerate_key_parameters.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RegenerateKeyParameters(Model): - """Parameters describes the request to regenerate access keys. - - :param key_type: The keyType to regenerate. Must be either 'primary' or - 'secondary'(case-insensitive). Possible values include: 'Primary', - 'Secondary' - :type key_type: str or ~azure.mgmt.signalr.models.KeyType - """ - - _attribute_map = { - 'key_type': {'key': 'keyType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RegenerateKeyParameters, self).__init__(**kwargs) - self.key_type = kwargs.get('key_type', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/regenerate_key_parameters_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/regenerate_key_parameters_py3.py deleted file mode 100644 index 84996057d07f..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/regenerate_key_parameters_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RegenerateKeyParameters(Model): - """Parameters describes the request to regenerate access keys. - - :param key_type: The keyType to regenerate. Must be either 'primary' or - 'secondary'(case-insensitive). Possible values include: 'Primary', - 'Secondary' - :type key_type: str or ~azure.mgmt.signalr.models.KeyType - """ - - _attribute_map = { - 'key_type': {'key': 'keyType', 'type': 'str'}, - } - - def __init__(self, *, key_type=None, **kwargs) -> None: - super(RegenerateKeyParameters, self).__init__(**kwargs) - self.key_type = key_type diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/resource.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/resource.py deleted file mode 100644 index 68f3fe6e233c..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/resource.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The core properties of ARM resources. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the service - e.g. - "Microsoft.SignalRService/SignalR" - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/resource_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/resource_py3.py deleted file mode 100644 index 132b0a6a2a88..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/resource_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The core properties of ARM resources. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the service - e.g. - "Microsoft.SignalRService/SignalR" - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/resource_sku.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/resource_sku.py deleted file mode 100644 index 2f9804893c80..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/resource_sku.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSku(Model): - """The billing information of the resource.(e.g. basic vs. standard). - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the SKU. This is typically a letter + - number code, such as A0 or P3. Required (if sku is specified) - :type name: str - :param tier: Optional tier of this particular SKU. `Basic` is deprecated, - use `Standard` instead. Possible values include: 'Free', 'Basic', - 'Standard', 'Premium' - :type tier: str or ~azure.mgmt.signalr.models.SignalRSkuTier - :param size: Optional, string. When the name field is the combination of - tier and some other value, this would be the standalone code. - :type size: str - :param family: Optional, string. If the service has different generations - of hardware, for the same SKU, then that can be captured here. - :type family: str - :param capacity: Optional, integer. If the SKU supports scale out/in then - the capacity integer should be included. If scale out/in is not - possible for the resource this may be omitted. - :type capacity: int - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ResourceSku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - self.size = kwargs.get('size', None) - self.family = kwargs.get('family', None) - self.capacity = kwargs.get('capacity', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/resource_sku_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/resource_sku_py3.py deleted file mode 100644 index bed8cd3f7077..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/resource_sku_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceSku(Model): - """The billing information of the resource.(e.g. basic vs. standard). - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the SKU. This is typically a letter + - number code, such as A0 or P3. Required (if sku is specified) - :type name: str - :param tier: Optional tier of this particular SKU. `Basic` is deprecated, - use `Standard` instead. Possible values include: 'Free', 'Basic', - 'Standard', 'Premium' - :type tier: str or ~azure.mgmt.signalr.models.SignalRSkuTier - :param size: Optional, string. When the name field is the combination of - tier and some other value, this would be the standalone code. - :type size: str - :param family: Optional, string. If the service has different generations - of hardware, for the same SKU, then that can be captured here. - :type family: str - :param capacity: Optional, integer. If the SKU supports scale out/in then - the capacity integer should be included. If scale out/in is not - possible for the resource this may be omitted. - :type capacity: int - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__(self, *, name: str, tier=None, size: str=None, family: str=None, capacity: int=None, **kwargs) -> None: - super(ResourceSku, self).__init__(**kwargs) - self.name = name - self.tier = tier - self.size = size - self.family = family - self.capacity = capacity diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/service_specification.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/service_specification.py deleted file mode 100644 index 3c1c6a87bcea..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/service_specification.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceSpecification(Model): - """An object that describes a specification. - - :param metric_specifications: Specifications of the Metrics for Azure - Monitoring. - :type metric_specifications: - list[~azure.mgmt.signalr.models.MetricSpecification] - """ - - _attribute_map = { - 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, - } - - def __init__(self, **kwargs): - super(ServiceSpecification, self).__init__(**kwargs) - self.metric_specifications = kwargs.get('metric_specifications', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/service_specification_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/service_specification_py3.py deleted file mode 100644 index 16125e83ba09..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/service_specification_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceSpecification(Model): - """An object that describes a specification. - - :param metric_specifications: Specifications of the Metrics for Azure - Monitoring. - :type metric_specifications: - list[~azure.mgmt.signalr.models.MetricSpecification] - """ - - _attribute_map = { - 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, - } - - def __init__(self, *, metric_specifications=None, **kwargs) -> None: - super(ServiceSpecification, self).__init__(**kwargs) - self.metric_specifications = metric_specifications diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rcreate_or_update_properties.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rcreate_or_update_properties.py deleted file mode 100644 index 4735f85fd6b2..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rcreate_or_update_properties.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SignalRCreateOrUpdateProperties(Model): - """Settings used to provision or configure the resource. - - :param host_name_prefix: Prefix for the hostName of the SignalR service. - Retained for future use. - The hostname will be of format: - <hostNamePrefix>.service.signalr.net. - :type host_name_prefix: str - """ - - _attribute_map = { - 'host_name_prefix': {'key': 'hostNamePrefix', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SignalRCreateOrUpdateProperties, self).__init__(**kwargs) - self.host_name_prefix = kwargs.get('host_name_prefix', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rcreate_or_update_properties_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rcreate_or_update_properties_py3.py deleted file mode 100644 index dd051d50d0af..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rcreate_or_update_properties_py3.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SignalRCreateOrUpdateProperties(Model): - """Settings used to provision or configure the resource. - - :param host_name_prefix: Prefix for the hostName of the SignalR service. - Retained for future use. - The hostname will be of format: - <hostNamePrefix>.service.signalr.net. - :type host_name_prefix: str - """ - - _attribute_map = { - 'host_name_prefix': {'key': 'hostNamePrefix', 'type': 'str'}, - } - - def __init__(self, *, host_name_prefix: str=None, **kwargs) -> None: - super(SignalRCreateOrUpdateProperties, self).__init__(**kwargs) - self.host_name_prefix = host_name_prefix diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rcreate_parameters.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rcreate_parameters.py deleted file mode 100644 index 69ee100c20c8..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rcreate_parameters.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .signal_rupdate_parameters import SignalRUpdateParameters - - -class SignalRCreateParameters(SignalRUpdateParameters): - """Parameters for SignalR service create/update operation. - Keep the same schema as AzSignalR.Models.SignalRResource. - - All required parameters must be populated in order to send to Azure. - - :param tags: A list of key value pairs that describe the resource. - :type tags: dict[str, str] - :param sku: The billing information of the resource.(e.g. basic vs. - standard) - :type sku: ~azure.mgmt.signalr.models.ResourceSku - :param properties: Settings used to provision or configure the resource - :type properties: - ~azure.mgmt.signalr.models.SignalRCreateOrUpdateProperties - :param location: Required. Azure GEO region: e.g. West US | East US | - North Central US | South Central US | West Europe | North Europe | East - Asia | Southeast Asia | etc. - The geo region of a resource never changes after it is created. - :type location: str - """ - - _validation = { - 'location': {'required': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'ResourceSku'}, - 'properties': {'key': 'properties', 'type': 'SignalRCreateOrUpdateProperties'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SignalRCreateParameters, self).__init__(**kwargs) - self.location = kwargs.get('location', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rcreate_parameters_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rcreate_parameters_py3.py deleted file mode 100644 index 23a3a44488cc..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rcreate_parameters_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .signal_rupdate_parameters_py3 import SignalRUpdateParameters - - -class SignalRCreateParameters(SignalRUpdateParameters): - """Parameters for SignalR service create/update operation. - Keep the same schema as AzSignalR.Models.SignalRResource. - - All required parameters must be populated in order to send to Azure. - - :param tags: A list of key value pairs that describe the resource. - :type tags: dict[str, str] - :param sku: The billing information of the resource.(e.g. basic vs. - standard) - :type sku: ~azure.mgmt.signalr.models.ResourceSku - :param properties: Settings used to provision or configure the resource - :type properties: - ~azure.mgmt.signalr.models.SignalRCreateOrUpdateProperties - :param location: Required. Azure GEO region: e.g. West US | East US | - North Central US | South Central US | West Europe | North Europe | East - Asia | Southeast Asia | etc. - The geo region of a resource never changes after it is created. - :type location: str - """ - - _validation = { - 'location': {'required': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'ResourceSku'}, - 'properties': {'key': 'properties', 'type': 'SignalRCreateOrUpdateProperties'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, sku=None, properties=None, **kwargs) -> None: - super(SignalRCreateParameters, self).__init__(tags=tags, sku=sku, properties=properties, **kwargs) - self.location = location diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rkeys.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rkeys.py deleted file mode 100644 index ff01c2aa4aeb..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rkeys.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SignalRKeys(Model): - """A class represents the access keys of SignalR service. - - :param primary_key: The primary access key. - :type primary_key: str - :param secondary_key: The secondary access key. - :type secondary_key: str - :param primary_connection_string: SignalR connection string constructed - via the primaryKey - :type primary_connection_string: str - :param secondary_connection_string: SignalR connection string constructed - via the secondaryKey - :type secondary_connection_string: str - """ - - _attribute_map = { - 'primary_key': {'key': 'primaryKey', 'type': 'str'}, - 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, - 'primary_connection_string': {'key': 'primaryConnectionString', 'type': 'str'}, - 'secondary_connection_string': {'key': 'secondaryConnectionString', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SignalRKeys, self).__init__(**kwargs) - self.primary_key = kwargs.get('primary_key', None) - self.secondary_key = kwargs.get('secondary_key', None) - self.primary_connection_string = kwargs.get('primary_connection_string', None) - self.secondary_connection_string = kwargs.get('secondary_connection_string', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rkeys_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rkeys_py3.py deleted file mode 100644 index 77c5768eff41..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rkeys_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SignalRKeys(Model): - """A class represents the access keys of SignalR service. - - :param primary_key: The primary access key. - :type primary_key: str - :param secondary_key: The secondary access key. - :type secondary_key: str - :param primary_connection_string: SignalR connection string constructed - via the primaryKey - :type primary_connection_string: str - :param secondary_connection_string: SignalR connection string constructed - via the secondaryKey - :type secondary_connection_string: str - """ - - _attribute_map = { - 'primary_key': {'key': 'primaryKey', 'type': 'str'}, - 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, - 'primary_connection_string': {'key': 'primaryConnectionString', 'type': 'str'}, - 'secondary_connection_string': {'key': 'secondaryConnectionString', 'type': 'str'}, - } - - def __init__(self, *, primary_key: str=None, secondary_key: str=None, primary_connection_string: str=None, secondary_connection_string: str=None, **kwargs) -> None: - super(SignalRKeys, self).__init__(**kwargs) - self.primary_key = primary_key - self.secondary_key = secondary_key - self.primary_connection_string = primary_connection_string - self.secondary_connection_string = secondary_connection_string diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rresource.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rresource.py deleted file mode 100644 index 8059c8a353aa..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rresource.py +++ /dev/null @@ -1,98 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class SignalRResource(TrackedResource): - """A class represent a SignalR service resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the service - e.g. - "Microsoft.SignalRService/SignalR" - :vartype type: str - :param location: The GEO location of the SignalR service. e.g. West US | - East US | North Central US | South Central US. - :type location: str - :param tags: Tags of the service which is a list of key value pairs that - describe the resource. - :type tags: dict[str, str] - :param sku: SKU of the service. - :type sku: ~azure.mgmt.signalr.models.ResourceSku - :param host_name_prefix: Prefix for the hostName of the SignalR service. - Retained for future use. - The hostname will be of format: - <hostNamePrefix>.service.signalr.net. - :type host_name_prefix: str - :ivar provisioning_state: Provisioning state of the resource. Possible - values include: 'Unknown', 'Succeeded', 'Failed', 'Canceled', 'Running', - 'Creating', 'Updating', 'Deleting', 'Moving' - :vartype provisioning_state: str or - ~azure.mgmt.signalr.models.ProvisioningState - :ivar external_ip: The publicly accessible IP of the SignalR service. - :vartype external_ip: str - :ivar host_name: FQDN of the SignalR service instance. Format: - xxx.service.signalr.net - :vartype host_name: str - :ivar public_port: The publicly accessible port of the SignalR service - which is designed for browser/client side usage. - :vartype public_port: int - :ivar server_port: The publicly accessible port of the SignalR service - which is designed for customer server side usage. - :vartype server_port: int - :param version: Version of the SignalR resource. Probably you need the - same or higher version of client SDKs. - :type version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'external_ip': {'readonly': True}, - 'host_name': {'readonly': True}, - 'public_port': {'readonly': True}, - 'server_port': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'ResourceSku'}, - 'host_name_prefix': {'key': 'properties.hostNamePrefix', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'external_ip': {'key': 'properties.externalIP', 'type': 'str'}, - 'host_name': {'key': 'properties.hostName', 'type': 'str'}, - 'public_port': {'key': 'properties.publicPort', 'type': 'int'}, - 'server_port': {'key': 'properties.serverPort', 'type': 'int'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SignalRResource, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.host_name_prefix = kwargs.get('host_name_prefix', None) - self.provisioning_state = None - self.external_ip = None - self.host_name = None - self.public_port = None - self.server_port = None - self.version = kwargs.get('version', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rresource_paged.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rresource_paged.py deleted file mode 100644 index 98b0225b9fa0..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rresource_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SignalRResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`SignalRResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SignalRResource]'} - } - - def __init__(self, *args, **kwargs): - - super(SignalRResourcePaged, self).__init__(*args, **kwargs) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rresource_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rresource_py3.py deleted file mode 100644 index 4d0e9ff97977..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rresource_py3.py +++ /dev/null @@ -1,98 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class SignalRResource(TrackedResource): - """A class represent a SignalR service resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the service - e.g. - "Microsoft.SignalRService/SignalR" - :vartype type: str - :param location: The GEO location of the SignalR service. e.g. West US | - East US | North Central US | South Central US. - :type location: str - :param tags: Tags of the service which is a list of key value pairs that - describe the resource. - :type tags: dict[str, str] - :param sku: SKU of the service. - :type sku: ~azure.mgmt.signalr.models.ResourceSku - :param host_name_prefix: Prefix for the hostName of the SignalR service. - Retained for future use. - The hostname will be of format: - <hostNamePrefix>.service.signalr.net. - :type host_name_prefix: str - :ivar provisioning_state: Provisioning state of the resource. Possible - values include: 'Unknown', 'Succeeded', 'Failed', 'Canceled', 'Running', - 'Creating', 'Updating', 'Deleting', 'Moving' - :vartype provisioning_state: str or - ~azure.mgmt.signalr.models.ProvisioningState - :ivar external_ip: The publicly accessible IP of the SignalR service. - :vartype external_ip: str - :ivar host_name: FQDN of the SignalR service instance. Format: - xxx.service.signalr.net - :vartype host_name: str - :ivar public_port: The publicly accessible port of the SignalR service - which is designed for browser/client side usage. - :vartype public_port: int - :ivar server_port: The publicly accessible port of the SignalR service - which is designed for customer server side usage. - :vartype server_port: int - :param version: Version of the SignalR resource. Probably you need the - same or higher version of client SDKs. - :type version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'external_ip': {'readonly': True}, - 'host_name': {'readonly': True}, - 'public_port': {'readonly': True}, - 'server_port': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'ResourceSku'}, - 'host_name_prefix': {'key': 'properties.hostNamePrefix', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'external_ip': {'key': 'properties.externalIP', 'type': 'str'}, - 'host_name': {'key': 'properties.hostName', 'type': 'str'}, - 'public_port': {'key': 'properties.publicPort', 'type': 'int'}, - 'server_port': {'key': 'properties.serverPort', 'type': 'int'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, sku=None, host_name_prefix: str=None, version: str=None, **kwargs) -> None: - super(SignalRResource, self).__init__(location=location, tags=tags, **kwargs) - self.sku = sku - self.host_name_prefix = host_name_prefix - self.provisioning_state = None - self.external_ip = None - self.host_name = None - self.public_port = None - self.server_port = None - self.version = version diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rupdate_parameters.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rupdate_parameters.py deleted file mode 100644 index 2f177255176b..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rupdate_parameters.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SignalRUpdateParameters(Model): - """Parameters for SignalR service update operation. - - :param tags: A list of key value pairs that describe the resource. - :type tags: dict[str, str] - :param sku: The billing information of the resource.(e.g. basic vs. - standard) - :type sku: ~azure.mgmt.signalr.models.ResourceSku - :param properties: Settings used to provision or configure the resource - :type properties: - ~azure.mgmt.signalr.models.SignalRCreateOrUpdateProperties - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'ResourceSku'}, - 'properties': {'key': 'properties', 'type': 'SignalRCreateOrUpdateProperties'}, - } - - def __init__(self, **kwargs): - super(SignalRUpdateParameters, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.sku = kwargs.get('sku', None) - self.properties = kwargs.get('properties', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rupdate_parameters_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rupdate_parameters_py3.py deleted file mode 100644 index da20f519dd5d..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rupdate_parameters_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SignalRUpdateParameters(Model): - """Parameters for SignalR service update operation. - - :param tags: A list of key value pairs that describe the resource. - :type tags: dict[str, str] - :param sku: The billing information of the resource.(e.g. basic vs. - standard) - :type sku: ~azure.mgmt.signalr.models.ResourceSku - :param properties: Settings used to provision or configure the resource - :type properties: - ~azure.mgmt.signalr.models.SignalRCreateOrUpdateProperties - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'ResourceSku'}, - 'properties': {'key': 'properties', 'type': 'SignalRCreateOrUpdateProperties'}, - } - - def __init__(self, *, tags=None, sku=None, properties=None, **kwargs) -> None: - super(SignalRUpdateParameters, self).__init__(**kwargs) - self.tags = tags - self.sku = sku - self.properties = properties diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage.py deleted file mode 100644 index c745ce0603eb..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SignalRUsage(Model): - """Object that describes a specific usage of SignalR resources. - - :param id: Fully qualified ARM resource id - :type id: str - :param current_value: Current value for the usage quota. - :type current_value: long - :param limit: The maximum permitted value for the usage quota. If there is - no limit, this value will be -1. - :type limit: long - :param name: Localizable String object containing the name and a localized - value. - :type name: ~azure.mgmt.signalr.models.SignalRUsageName - :param unit: Representing the units of the usage quota. Possible values - are: Count, Bytes, Seconds, Percent, CountPerSecond, BytesPerSecond. - :type unit: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'long'}, - 'limit': {'key': 'limit', 'type': 'long'}, - 'name': {'key': 'name', 'type': 'SignalRUsageName'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SignalRUsage, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.current_value = kwargs.get('current_value', None) - self.limit = kwargs.get('limit', None) - self.name = kwargs.get('name', None) - self.unit = kwargs.get('unit', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage_name.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage_name.py deleted file mode 100644 index d750ca741cbc..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage_name.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SignalRUsageName(Model): - """Localizable String object containing the name and a localized value. - - :param value: The identifier of the usage. - :type value: str - :param localized_value: Localized name of the usage. - :type localized_value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SignalRUsageName, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.localized_value = kwargs.get('localized_value', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage_name_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage_name_py3.py deleted file mode 100644 index 0ab09ab51882..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage_name_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SignalRUsageName(Model): - """Localizable String object containing the name and a localized value. - - :param value: The identifier of the usage. - :type value: str - :param localized_value: Localized name of the usage. - :type localized_value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: - super(SignalRUsageName, self).__init__(**kwargs) - self.value = value - self.localized_value = localized_value diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage_paged.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage_paged.py deleted file mode 100644 index 08faca32802b..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SignalRUsagePaged(Paged): - """ - A paging container for iterating over a list of :class:`SignalRUsage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SignalRUsage]'} - } - - def __init__(self, *args, **kwargs): - - super(SignalRUsagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage_py3.py deleted file mode 100644 index 2c46b4a391de..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SignalRUsage(Model): - """Object that describes a specific usage of SignalR resources. - - :param id: Fully qualified ARM resource id - :type id: str - :param current_value: Current value for the usage quota. - :type current_value: long - :param limit: The maximum permitted value for the usage quota. If there is - no limit, this value will be -1. - :type limit: long - :param name: Localizable String object containing the name and a localized - value. - :type name: ~azure.mgmt.signalr.models.SignalRUsageName - :param unit: Representing the units of the usage quota. Possible values - are: Count, Bytes, Seconds, Percent, CountPerSecond, BytesPerSecond. - :type unit: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'long'}, - 'limit': {'key': 'limit', 'type': 'long'}, - 'name': {'key': 'name', 'type': 'SignalRUsageName'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, current_value: int=None, limit: int=None, name=None, unit: str=None, **kwargs) -> None: - super(SignalRUsage, self).__init__(**kwargs) - self.id = id - self.current_value = current_value - self.limit = limit - self.name = name - self.unit = unit diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/tracked_resource.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/tracked_resource.py deleted file mode 100644 index da0c0fee8e9d..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/tracked_resource.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the service - e.g. - "Microsoft.SignalRService/SignalR" - :vartype type: str - :param location: The GEO location of the SignalR service. e.g. West US | - East US | North Central US | South Central US. - :type location: str - :param tags: Tags of the service which is a list of key value pairs that - describe the resource. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TrackedResource, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/tracked_resource_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/tracked_resource_py3.py deleted file mode 100644 index 3cad20d9175e..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/tracked_resource_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the service - e.g. - "Microsoft.SignalRService/SignalR" - :vartype type: str - :param location: The GEO location of the SignalR service. e.g. West US | - East US | North Central US | South Central US. - :type location: str - :param tags: Tags of the service which is a list of key value pairs that - describe the resource. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: - super(TrackedResource, self).__init__(**kwargs) - self.location = location - self.tags = tags diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/__init__.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/__init__.py index 31c21decde4f..20867572040a 100644 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/__init__.py +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/__init__.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- -from .operations import Operations -from .signal_roperations import SignalROperations -from .usages_operations import UsagesOperations +from ._operations import Operations +from ._signal_roperations import SignalROperations +from ._usages_operations import UsagesOperations __all__ = [ 'Operations', diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_operations.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_operations.py new file mode 100644 index 000000000000..d35eafe8d7f5 --- /dev/null +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_operations.py @@ -0,0 +1,103 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class Operations(object): + """Operations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-10-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the available REST API operations of the + Microsoft.SignalRService provider. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Operation + :rtype: + ~azure.mgmt.signalr.models.OperationPaged[~azure.mgmt.signalr.models.Operation] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.SignalRService/operations'} diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_signal_roperations.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_signal_roperations.py new file mode 100644 index 000000000000..3572e3a20fa2 --- /dev/null +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_signal_roperations.py @@ -0,0 +1,864 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class SignalROperations(object): + """SignalROperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-10-01" + + self.config = config + + def check_name_availability( + self, location, type, name, custom_headers=None, raw=False, **operation_config): + """Checks that the SignalR name is valid and is not already in use. + + :param location: the region + :type location: str + :param type: The resource type. Should be always + "Microsoft.SignalRService/SignalR". + :type type: str + :param name: The SignalR service name to validate. + e.g."my-signalR-name-here" + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: NameAvailability or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.signalr.models.NameAvailability or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = None + if type is not None or name is not None: + parameters = models.NameAvailabilityParameters(type=type, name=name) + + # Construct URL + url = self.check_name_availability.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if parameters is not None: + body_content = self._serialize.body(parameters, 'NameAvailabilityParameters') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('NameAvailability', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/locations/{location}/checkNameAvailability'} + + def list_by_subscription( + self, custom_headers=None, raw=False, **operation_config): + """Handles requests to list all resources in a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SignalRResource + :rtype: + ~azure.mgmt.signalr.models.SignalRResourcePaged[~azure.mgmt.signalr.models.SignalRResource] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SignalRResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/SignalR'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Handles requests to list all resources in a resource group. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SignalRResource + :rtype: + ~azure.mgmt.signalr.models.SignalRResourcePaged[~azure.mgmt.signalr.models.SignalRResource] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SignalRResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR'} + + def list_keys( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Get the access keys of the SignalR resource. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param resource_name: The name of the SignalR resource. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SignalRKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.signalr.models.SignalRKeys or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_keys.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SignalRKeys', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR/{resourceName}/listKeys'} + + + def _regenerate_key_initial( + self, resource_group_name, resource_name, key_type=None, custom_headers=None, raw=False, **operation_config): + parameters = None + if key_type is not None: + parameters = models.RegenerateKeyParameters(key_type=key_type) + + # Construct URL + url = self.regenerate_key.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if parameters is not None: + body_content = self._serialize.body(parameters, 'RegenerateKeyParameters') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('SignalRKeys', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def regenerate_key( + self, resource_group_name, resource_name, key_type=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Regenerate SignalR service access key. PrimaryKey and SecondaryKey + cannot be regenerated at the same time. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param resource_name: The name of the SignalR resource. + :type resource_name: str + :param key_type: The keyType to regenerate. Must be either 'primary' + or 'secondary'(case-insensitive). Possible values include: 'Primary', + 'Secondary' + :type key_type: str or ~azure.mgmt.signalr.models.KeyType + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns SignalRKeys or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.signalr.models.SignalRKeys] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.signalr.models.SignalRKeys]] + :raises: :class:`CloudError` + """ + raw_result = self._regenerate_key_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + key_type=key_type, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SignalRKeys', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + regenerate_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR/{resourceName}/regenerateKey'} + + def get( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Get the SignalR service and its properties. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param resource_name: The name of the SignalR resource. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SignalRResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.signalr.models.SignalRResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SignalRResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}'} + + + def _create_or_update_initial( + self, resource_group_name, resource_name, parameters=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if parameters is not None: + body_content = self._serialize.body(parameters, 'SignalRCreateParameters') + else: + body_content = None + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('SignalRResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, resource_name, parameters=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Create a new SignalR service and update an exiting SignalR service. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param resource_name: The name of the SignalR resource. + :type resource_name: str + :param parameters: Parameters for the create or update operation + :type parameters: ~azure.mgmt.signalr.models.SignalRCreateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns SignalRResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.signalr.models.SignalRResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.signalr.models.SignalRResource]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SignalRResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}'} + + + def _delete_initial( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Operation to delete a SignalR service. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param resource_name: The name of the SignalR resource. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}'} + + + def _update_initial( + self, resource_group_name, resource_name, parameters=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if parameters is not None: + body_content = self._serialize.body(parameters, 'SignalRUpdateParameters') + else: + body_content = None + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SignalRResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, resource_name, parameters=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Operation to update an exiting SignalR service. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param resource_name: The name of the SignalR resource. + :type resource_name: str + :param parameters: Parameters for the update operation + :type parameters: ~azure.mgmt.signalr.models.SignalRUpdateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns SignalRResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.signalr.models.SignalRResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.signalr.models.SignalRResource]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SignalRResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}'} + + + def _restart_initial( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restart( + self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Operation to restart a SignalR service. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param resource_name: The name of the SignalR resource. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._restart_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/restart'} diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_usages_operations.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_usages_operations.py new file mode 100644 index 000000000000..15d3d051bd1a --- /dev/null +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_usages_operations.py @@ -0,0 +1,109 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class UsagesOperations(object): + """UsagesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-10-01" + + self.config = config + + def list( + self, location, custom_headers=None, raw=False, **operation_config): + """List usage quotas for Azure SignalR service by location. + + :param location: the location like "eastus" + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SignalRUsage + :rtype: + ~azure.mgmt.signalr.models.SignalRUsagePaged[~azure.mgmt.signalr.models.SignalRUsage] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SignalRUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/locations/{location}/usages'} diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/operations.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/operations.py deleted file mode 100644 index c51cf01a512e..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/operations.py +++ /dev/null @@ -1,99 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Possible values include: '2018-03-01-preview', '2018-10-01'. Constant value: "2018-10-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-10-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all of the available REST API operations of the - Microsoft.SignalRService provider. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Operation - :rtype: - ~azure.mgmt.signalr.models.OperationPaged[~azure.mgmt.signalr.models.Operation] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/providers/Microsoft.SignalRService/operations'} diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/signal_roperations.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/signal_roperations.py deleted file mode 100644 index 738d56b752be..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/signal_roperations.py +++ /dev/null @@ -1,861 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class SignalROperations(object): - """SignalROperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Possible values include: '2018-03-01-preview', '2018-10-01'. Constant value: "2018-10-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-10-01" - - self.config = config - - def check_name_availability( - self, location, type, name, custom_headers=None, raw=False, **operation_config): - """Checks that the SignalR name is valid and is not already in use. - - :param location: the region - :type location: str - :param type: The resource type. Should be always - "Microsoft.SignalRService/SignalR". - :type type: str - :param name: The SignalR service name to validate. - e.g."my-signalR-name-here" - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: NameAvailability or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.signalr.models.NameAvailability or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - parameters = None - if type is not None or name is not None: - parameters = models.NameAvailabilityParameters(type=type, name=name) - - # Construct URL - url = self.check_name_availability.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if parameters is not None: - body_content = self._serialize.body(parameters, 'NameAvailabilityParameters') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('NameAvailability', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/locations/{location}/checkNameAvailability'} - - def list_by_subscription( - self, custom_headers=None, raw=False, **operation_config): - """Handles requests to list all resources in a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SignalRResource - :rtype: - ~azure.mgmt.signalr.models.SignalRResourcePaged[~azure.mgmt.signalr.models.SignalRResource] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.SignalRResourcePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.SignalRResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/SignalR'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Handles requests to list all resources in a resource group. - - :param resource_group_name: The name of the resource group that - contains the resource. You can obtain this value from the Azure - Resource Manager API or the portal. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SignalRResource - :rtype: - ~azure.mgmt.signalr.models.SignalRResourcePaged[~azure.mgmt.signalr.models.SignalRResource] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.SignalRResourcePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.SignalRResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR'} - - def list_keys( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Get the access keys of the SignalR resource. - - :param resource_group_name: The name of the resource group that - contains the resource. You can obtain this value from the Azure - Resource Manager API or the portal. - :type resource_group_name: str - :param resource_name: The name of the SignalR resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SignalRKeys or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.signalr.models.SignalRKeys or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_keys.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SignalRKeys', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR/{resourceName}/listKeys'} - - - def _regenerate_key_initial( - self, resource_group_name, resource_name, key_type=None, custom_headers=None, raw=False, **operation_config): - parameters = None - if key_type is not None: - parameters = models.RegenerateKeyParameters(key_type=key_type) - - # Construct URL - url = self.regenerate_key.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if parameters is not None: - body_content = self._serialize.body(parameters, 'RegenerateKeyParameters') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('SignalRKeys', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def regenerate_key( - self, resource_group_name, resource_name, key_type=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Regenerate SignalR service access key. PrimaryKey and SecondaryKey - cannot be regenerated at the same time. - - :param resource_group_name: The name of the resource group that - contains the resource. You can obtain this value from the Azure - Resource Manager API or the portal. - :type resource_group_name: str - :param resource_name: The name of the SignalR resource. - :type resource_name: str - :param key_type: The keyType to regenerate. Must be either 'primary' - or 'secondary'(case-insensitive). Possible values include: 'Primary', - 'Secondary' - :type key_type: str or ~azure.mgmt.signalr.models.KeyType - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns SignalRKeys or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.signalr.models.SignalRKeys] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.signalr.models.SignalRKeys]] - :raises: :class:`CloudError` - """ - raw_result = self._regenerate_key_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - key_type=key_type, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SignalRKeys', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - regenerate_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR/{resourceName}/regenerateKey'} - - def get( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - """Get the SignalR service and its properties. - - :param resource_group_name: The name of the resource group that - contains the resource. You can obtain this value from the Azure - Resource Manager API or the portal. - :type resource_group_name: str - :param resource_name: The name of the SignalR resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SignalRResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.signalr.models.SignalRResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SignalRResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}'} - - - def _create_or_update_initial( - self, resource_group_name, resource_name, parameters=None, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if parameters is not None: - body_content = self._serialize.body(parameters, 'SignalRCreateParameters') - else: - body_content = None - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('SignalRResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, resource_name, parameters=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Create a new SignalR service and update an exiting SignalR service. - - :param resource_group_name: The name of the resource group that - contains the resource. You can obtain this value from the Azure - Resource Manager API or the portal. - :type resource_group_name: str - :param resource_name: The name of the SignalR resource. - :type resource_name: str - :param parameters: Parameters for the create or update operation - :type parameters: ~azure.mgmt.signalr.models.SignalRCreateParameters - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns SignalRResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.signalr.models.SignalRResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.signalr.models.SignalRResource]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SignalRResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}'} - - - def _delete_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Operation to delete a SignalR service. - - :param resource_group_name: The name of the resource group that - contains the resource. You can obtain this value from the Azure - Resource Manager API or the portal. - :type resource_group_name: str - :param resource_name: The name of the SignalR resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}'} - - - def _update_initial( - self, resource_group_name, resource_name, parameters=None, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if parameters is not None: - body_content = self._serialize.body(parameters, 'SignalRUpdateParameters') - else: - body_content = None - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SignalRResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, resource_name, parameters=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Operation to update an exiting SignalR service. - - :param resource_group_name: The name of the resource group that - contains the resource. You can obtain this value from the Azure - Resource Manager API or the portal. - :type resource_group_name: str - :param resource_name: The name of the SignalR resource. - :type resource_name: str - :param parameters: Parameters for the update operation - :type parameters: ~azure.mgmt.signalr.models.SignalRUpdateParameters - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns SignalRResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.signalr.models.SignalRResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.signalr.models.SignalRResource]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SignalRResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}'} - - - def _restart_initial( - self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restart( - self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Operation to restart a SignalR service. - - :param resource_group_name: The name of the resource group that - contains the resource. You can obtain this value from the Azure - Resource Manager API or the portal. - :type resource_group_name: str - :param resource_name: The name of the SignalR resource. - :type resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._restart_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/restart'} diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/usages_operations.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/usages_operations.py deleted file mode 100644 index bbe03a59d187..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/usages_operations.py +++ /dev/null @@ -1,105 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class UsagesOperations(object): - """UsagesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Possible values include: '2018-03-01-preview', '2018-10-01'. Constant value: "2018-10-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-10-01" - - self.config = config - - def list( - self, location, custom_headers=None, raw=False, **operation_config): - """List usage quotas for Azure SignalR service by location. - - :param location: the location like "eastus" - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SignalRUsage - :rtype: - ~azure.mgmt.signalr.models.SignalRUsagePaged[~azure.mgmt.signalr.models.SignalRUsage] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.SignalRUsagePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.SignalRUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/locations/{location}/usages'} diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/signal_rmanagement_client.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/signal_rmanagement_client.py deleted file mode 100644 index c29ac66baef4..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/signal_rmanagement_client.py +++ /dev/null @@ -1,95 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.operations import Operations -from .operations.signal_roperations import SignalROperations -from .operations.usages_operations import UsagesOperations -from . import models - - -class SignalRManagementClientConfiguration(AzureConfiguration): - """Configuration for SignalRManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Gets subscription Id which uniquely identify the - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(SignalRManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-signalr/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class SignalRManagementClient(SDKClient): - """REST API for Azure SignalR Service - - :ivar config: Configuration for client. - :vartype config: SignalRManagementClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.signalr.operations.Operations - :ivar signal_r: SignalR operations - :vartype signal_r: azure.mgmt.signalr.operations.SignalROperations - :ivar usages: Usages operations - :vartype usages: azure.mgmt.signalr.operations.UsagesOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Gets subscription Id which uniquely identify the - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = SignalRManagementClientConfiguration(credentials, subscription_id, base_url) - super(SignalRManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2018-10-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.signal_r = SignalROperations( - self._client, self.config, self._serialize, self._deserialize) - self.usages = UsagesOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/__init__.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/__init__.py index ce1112dc9c59..399e93fb102f 100644 --- a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/__init__.py +++ b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .subscription_client import SubscriptionClient -from .version import VERSION +from ._configuration import SubscriptionClientConfiguration +from ._subscription_client import SubscriptionClient +__all__ = ['SubscriptionClient', 'SubscriptionClientConfiguration'] -__all__ = ['SubscriptionClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/_configuration.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/_configuration.py new file mode 100644 index 000000000000..ad45d175c06e --- /dev/null +++ b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/_configuration.py @@ -0,0 +1,43 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class SubscriptionClientConfiguration(AzureConfiguration): + """Configuration for SubscriptionClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param str base_url: Service URL + """ + + def __init__( + self, credentials, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(SubscriptionClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-subscription/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/_subscription_client.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/_subscription_client.py new file mode 100644 index 000000000000..55d8c43f4c2b --- /dev/null +++ b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/_subscription_client.py @@ -0,0 +1,56 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import SubscriptionClientConfiguration +from .operations import Operations +from .operations import SubscriptionsOperations +from .operations import TenantsOperations +from . import models + + +class SubscriptionClient(SDKClient): + """The subscription client + + :ivar config: Configuration for client. + :vartype config: SubscriptionClientConfiguration + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.subscription.operations.Operations + :ivar subscriptions: Subscriptions operations + :vartype subscriptions: azure.mgmt.subscription.operations.SubscriptionsOperations + :ivar tenants: Tenants operations + :vartype tenants: azure.mgmt.subscription.operations.TenantsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param str base_url: Service URL + """ + + def __init__( + self, credentials, base_url=None): + + self.config = SubscriptionClientConfiguration(credentials, base_url) + super(SubscriptionClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.subscriptions = SubscriptionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.tenants = TenantsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/__init__.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/__init__.py index 7fc069102b31..28911d355abc 100644 --- a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/__init__.py +++ b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/__init__.py @@ -10,48 +10,51 @@ # -------------------------------------------------------------------------- try: - from .error_response_py3 import ErrorResponse, ErrorResponseException - from .canceled_subscription_id_py3 import CanceledSubscriptionId - from .renamed_subscription_id_py3 import RenamedSubscriptionId - from .subscription_name_py3 import SubscriptionName - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .operation_list_result_py3 import OperationListResult - from .location_py3 import Location - from .subscription_policies_py3 import SubscriptionPolicies - from .subscription_py3 import Subscription - from .tenant_id_description_py3 import TenantIdDescription + from ._models_py3 import CanceledSubscriptionId + from ._models_py3 import EnabledSubscriptionId + from ._models_py3 import ErrorResponse, ErrorResponseException + from ._models_py3 import Location + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import OperationListResult + from ._models_py3 import RenamedSubscriptionId + from ._models_py3 import Subscription + from ._models_py3 import SubscriptionName + from ._models_py3 import SubscriptionPolicies + from ._models_py3 import TenantIdDescription except (SyntaxError, ImportError): - from .error_response import ErrorResponse, ErrorResponseException - from .canceled_subscription_id import CanceledSubscriptionId - from .renamed_subscription_id import RenamedSubscriptionId - from .subscription_name import SubscriptionName - from .operation_display import OperationDisplay - from .operation import Operation - from .operation_list_result import OperationListResult - from .location import Location - from .subscription_policies import SubscriptionPolicies - from .subscription import Subscription - from .tenant_id_description import TenantIdDescription -from .location_paged import LocationPaged -from .subscription_paged import SubscriptionPaged -from .tenant_id_description_paged import TenantIdDescriptionPaged -from .subscription_client_enums import ( + from ._models import CanceledSubscriptionId + from ._models import EnabledSubscriptionId + from ._models import ErrorResponse, ErrorResponseException + from ._models import Location + from ._models import Operation + from ._models import OperationDisplay + from ._models import OperationListResult + from ._models import RenamedSubscriptionId + from ._models import Subscription + from ._models import SubscriptionName + from ._models import SubscriptionPolicies + from ._models import TenantIdDescription +from ._paged_models import LocationPaged +from ._paged_models import SubscriptionPaged +from ._paged_models import TenantIdDescriptionPaged +from ._subscription_client_enums import ( SubscriptionState, SpendingLimit, ) __all__ = [ - 'ErrorResponse', 'ErrorResponseException', 'CanceledSubscriptionId', - 'RenamedSubscriptionId', - 'SubscriptionName', - 'OperationDisplay', + 'EnabledSubscriptionId', + 'ErrorResponse', 'ErrorResponseException', + 'Location', 'Operation', + 'OperationDisplay', 'OperationListResult', - 'Location', - 'SubscriptionPolicies', + 'RenamedSubscriptionId', 'Subscription', + 'SubscriptionName', + 'SubscriptionPolicies', 'TenantIdDescription', 'LocationPaged', 'SubscriptionPaged', diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/_models.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/_models.py new file mode 100644 index 000000000000..0e91857f6ec1 --- /dev/null +++ b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/_models.py @@ -0,0 +1,374 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class CanceledSubscriptionId(Model): + """The ID of the canceled subscription. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The ID of the canceled subscription + :vartype value: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CanceledSubscriptionId, self).__init__(**kwargs) + self.value = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class EnabledSubscriptionId(Model): + """Enabled Subscription Id. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: Enabled Subscription Id + :vartype value: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EnabledSubscriptionId, self).__init__(**kwargs) + self.value = None + + +class ErrorResponse(Model): + """Describes the error if the operation is not successful. + + :param code: Error code + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class Location(Model): + """Location information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The fully qualified ID of the location. For example, + /subscriptions/00000000-0000-0000-0000-000000000000/locations/westus. + :vartype id: str + :ivar subscription_id: The subscription ID. + :vartype subscription_id: str + :ivar name: The location name. + :vartype name: str + :ivar display_name: The display name of the location. + :vartype display_name: str + :ivar latitude: The latitude of the location. + :vartype latitude: str + :ivar longitude: The longitude of the location. + :vartype longitude: str + """ + + _validation = { + 'id': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'latitude': {'readonly': True}, + 'longitude': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'latitude': {'key': 'latitude', 'type': 'str'}, + 'longitude': {'key': 'longitude', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Location, self).__init__(**kwargs) + self.id = None + self.subscription_id = None + self.name = None + self.display_name = None + self.latitude = None + self.longitude = None + + +class Operation(Model): + """REST API operation. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: The object that represents the operation. + :type display: ~azure.mgmt.subscription.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + + +class OperationDisplay(Model): + """The object that represents the operation. + + :param provider: Service provider: Microsoft.Subscription + :type provider: str + :param resource: Resource on which the operation is performed: Profile, + endpoint, etc. + :type resource: str + :param operation: Operation type: Read, write, delete, etc. + :type operation: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + + +class OperationListResult(Model): + """Result of the request to list operations. It contains a list of operations + and a URL link to get the next set of results. + + :param value: List of operations. + :type value: list[~azure.mgmt.subscription.models.Operation] + :param next_link: URL to get the next set of operation list results if + there are any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class RenamedSubscriptionId(Model): + """The ID of the subscriptions that is being renamed. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The ID of the subscriptions that is being renamed + :vartype value: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RenamedSubscriptionId, self).__init__(**kwargs) + self.value = None + + +class Subscription(Model): + """Subscription information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The fully qualified ID for the subscription. For example, + /subscriptions/00000000-0000-0000-0000-000000000000. + :vartype id: str + :ivar subscription_id: The subscription ID. + :vartype subscription_id: str + :ivar display_name: The subscription display name. + :vartype display_name: str + :ivar state: The subscription state. Possible values are Enabled, Warned, + PastDue, Disabled, and Deleted. Possible values include: 'Enabled', + 'Warned', 'PastDue', 'Disabled', 'Deleted' + :vartype state: str or ~azure.mgmt.subscription.models.SubscriptionState + :param subscription_policies: The subscription policies. + :type subscription_policies: + ~azure.mgmt.subscription.models.SubscriptionPolicies + :param authorization_source: The authorization source of the request. + Valid values are one or more combinations of Legacy, RoleBased, Bypassed, + Direct and Management. For example, 'Legacy, RoleBased'. + :type authorization_source: str + """ + + _validation = { + 'id': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'display_name': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'SubscriptionState'}, + 'subscription_policies': {'key': 'subscriptionPolicies', 'type': 'SubscriptionPolicies'}, + 'authorization_source': {'key': 'authorizationSource', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Subscription, self).__init__(**kwargs) + self.id = None + self.subscription_id = None + self.display_name = None + self.state = None + self.subscription_policies = kwargs.get('subscription_policies', None) + self.authorization_source = kwargs.get('authorization_source', None) + + +class SubscriptionName(Model): + """The new name of the subscription. + + :param subscription_name: New subscription name + :type subscription_name: str + """ + + _attribute_map = { + 'subscription_name': {'key': 'subscriptionName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubscriptionName, self).__init__(**kwargs) + self.subscription_name = kwargs.get('subscription_name', None) + + +class SubscriptionPolicies(Model): + """Subscription policies. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar location_placement_id: The subscription location placement ID. The + ID indicates which regions are visible for a subscription. For example, a + subscription with a location placement Id of Public_2014-09-01 has access + to Azure public regions. + :vartype location_placement_id: str + :ivar quota_id: The subscription quota ID. + :vartype quota_id: str + :ivar spending_limit: The subscription spending limit. Possible values + include: 'On', 'Off', 'CurrentPeriodOff' + :vartype spending_limit: str or + ~azure.mgmt.subscription.models.SpendingLimit + """ + + _validation = { + 'location_placement_id': {'readonly': True}, + 'quota_id': {'readonly': True}, + 'spending_limit': {'readonly': True}, + } + + _attribute_map = { + 'location_placement_id': {'key': 'locationPlacementId', 'type': 'str'}, + 'quota_id': {'key': 'quotaId', 'type': 'str'}, + 'spending_limit': {'key': 'spendingLimit', 'type': 'SpendingLimit'}, + } + + def __init__(self, **kwargs): + super(SubscriptionPolicies, self).__init__(**kwargs) + self.location_placement_id = None + self.quota_id = None + self.spending_limit = None + + +class TenantIdDescription(Model): + """Tenant Id information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The fully qualified ID of the tenant. For example, + /tenants/00000000-0000-0000-0000-000000000000. + :vartype id: str + :ivar tenant_id: The tenant ID. For example, + 00000000-0000-0000-0000-000000000000. + :vartype tenant_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TenantIdDescription, self).__init__(**kwargs) + self.id = None + self.tenant_id = None diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/_models_py3.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/_models_py3.py new file mode 100644 index 000000000000..2e68e8dbbeb2 --- /dev/null +++ b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/_models_py3.py @@ -0,0 +1,374 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class CanceledSubscriptionId(Model): + """The ID of the canceled subscription. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The ID of the canceled subscription + :vartype value: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CanceledSubscriptionId, self).__init__(**kwargs) + self.value = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class EnabledSubscriptionId(Model): + """Enabled Subscription Id. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: Enabled Subscription Id + :vartype value: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(EnabledSubscriptionId, self).__init__(**kwargs) + self.value = None + + +class ErrorResponse(Model): + """Describes the error if the operation is not successful. + + :param code: Error code + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.code = code + self.message = message + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class Location(Model): + """Location information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The fully qualified ID of the location. For example, + /subscriptions/00000000-0000-0000-0000-000000000000/locations/westus. + :vartype id: str + :ivar subscription_id: The subscription ID. + :vartype subscription_id: str + :ivar name: The location name. + :vartype name: str + :ivar display_name: The display name of the location. + :vartype display_name: str + :ivar latitude: The latitude of the location. + :vartype latitude: str + :ivar longitude: The longitude of the location. + :vartype longitude: str + """ + + _validation = { + 'id': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'latitude': {'readonly': True}, + 'longitude': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'latitude': {'key': 'latitude', 'type': 'str'}, + 'longitude': {'key': 'longitude', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Location, self).__init__(**kwargs) + self.id = None + self.subscription_id = None + self.name = None + self.display_name = None + self.latitude = None + self.longitude = None + + +class Operation(Model): + """REST API operation. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: The object that represents the operation. + :type display: ~azure.mgmt.subscription.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, name: str=None, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display + + +class OperationDisplay(Model): + """The object that represents the operation. + + :param provider: Service provider: Microsoft.Subscription + :type provider: str + :param resource: Resource on which the operation is performed: Profile, + endpoint, etc. + :type resource: str + :param operation: Operation type: Read, write, delete, etc. + :type operation: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + + +class OperationListResult(Model): + """Result of the request to list operations. It contains a list of operations + and a URL link to get the next set of results. + + :param value: List of operations. + :type value: list[~azure.mgmt.subscription.models.Operation] + :param next_link: URL to get the next set of operation list results if + there are any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value=None, next_link: str=None, **kwargs) -> None: + super(OperationListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class RenamedSubscriptionId(Model): + """The ID of the subscriptions that is being renamed. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The ID of the subscriptions that is being renamed + :vartype value: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(RenamedSubscriptionId, self).__init__(**kwargs) + self.value = None + + +class Subscription(Model): + """Subscription information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The fully qualified ID for the subscription. For example, + /subscriptions/00000000-0000-0000-0000-000000000000. + :vartype id: str + :ivar subscription_id: The subscription ID. + :vartype subscription_id: str + :ivar display_name: The subscription display name. + :vartype display_name: str + :ivar state: The subscription state. Possible values are Enabled, Warned, + PastDue, Disabled, and Deleted. Possible values include: 'Enabled', + 'Warned', 'PastDue', 'Disabled', 'Deleted' + :vartype state: str or ~azure.mgmt.subscription.models.SubscriptionState + :param subscription_policies: The subscription policies. + :type subscription_policies: + ~azure.mgmt.subscription.models.SubscriptionPolicies + :param authorization_source: The authorization source of the request. + Valid values are one or more combinations of Legacy, RoleBased, Bypassed, + Direct and Management. For example, 'Legacy, RoleBased'. + :type authorization_source: str + """ + + _validation = { + 'id': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'display_name': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'SubscriptionState'}, + 'subscription_policies': {'key': 'subscriptionPolicies', 'type': 'SubscriptionPolicies'}, + 'authorization_source': {'key': 'authorizationSource', 'type': 'str'}, + } + + def __init__(self, *, subscription_policies=None, authorization_source: str=None, **kwargs) -> None: + super(Subscription, self).__init__(**kwargs) + self.id = None + self.subscription_id = None + self.display_name = None + self.state = None + self.subscription_policies = subscription_policies + self.authorization_source = authorization_source + + +class SubscriptionName(Model): + """The new name of the subscription. + + :param subscription_name: New subscription name + :type subscription_name: str + """ + + _attribute_map = { + 'subscription_name': {'key': 'subscriptionName', 'type': 'str'}, + } + + def __init__(self, *, subscription_name: str=None, **kwargs) -> None: + super(SubscriptionName, self).__init__(**kwargs) + self.subscription_name = subscription_name + + +class SubscriptionPolicies(Model): + """Subscription policies. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar location_placement_id: The subscription location placement ID. The + ID indicates which regions are visible for a subscription. For example, a + subscription with a location placement Id of Public_2014-09-01 has access + to Azure public regions. + :vartype location_placement_id: str + :ivar quota_id: The subscription quota ID. + :vartype quota_id: str + :ivar spending_limit: The subscription spending limit. Possible values + include: 'On', 'Off', 'CurrentPeriodOff' + :vartype spending_limit: str or + ~azure.mgmt.subscription.models.SpendingLimit + """ + + _validation = { + 'location_placement_id': {'readonly': True}, + 'quota_id': {'readonly': True}, + 'spending_limit': {'readonly': True}, + } + + _attribute_map = { + 'location_placement_id': {'key': 'locationPlacementId', 'type': 'str'}, + 'quota_id': {'key': 'quotaId', 'type': 'str'}, + 'spending_limit': {'key': 'spendingLimit', 'type': 'SpendingLimit'}, + } + + def __init__(self, **kwargs) -> None: + super(SubscriptionPolicies, self).__init__(**kwargs) + self.location_placement_id = None + self.quota_id = None + self.spending_limit = None + + +class TenantIdDescription(Model): + """Tenant Id information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The fully qualified ID of the tenant. For example, + /tenants/00000000-0000-0000-0000-000000000000. + :vartype id: str + :ivar tenant_id: The tenant ID. For example, + 00000000-0000-0000-0000-000000000000. + :vartype tenant_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(TenantIdDescription, self).__init__(**kwargs) + self.id = None + self.tenant_id = None diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/_paged_models.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/_paged_models.py new file mode 100644 index 000000000000..584cf32fd6a2 --- /dev/null +++ b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/_paged_models.py @@ -0,0 +1,53 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class LocationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Location ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Location]'} + } + + def __init__(self, *args, **kwargs): + + super(LocationPaged, self).__init__(*args, **kwargs) +class SubscriptionPaged(Paged): + """ + A paging container for iterating over a list of :class:`Subscription ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Subscription]'} + } + + def __init__(self, *args, **kwargs): + + super(SubscriptionPaged, self).__init__(*args, **kwargs) +class TenantIdDescriptionPaged(Paged): + """ + A paging container for iterating over a list of :class:`TenantIdDescription ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TenantIdDescription]'} + } + + def __init__(self, *args, **kwargs): + + super(TenantIdDescriptionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/subscription_client_enums.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/_subscription_client_enums.py similarity index 100% rename from sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/subscription_client_enums.py rename to sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/_subscription_client_enums.py diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/canceled_subscription_id.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/canceled_subscription_id.py deleted file mode 100644 index 2eb67562fc5f..000000000000 --- a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/canceled_subscription_id.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CanceledSubscriptionId(Model): - """Canceled Subscription Id. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: Canceled Subscription Id - :vartype value: str - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CanceledSubscriptionId, self).__init__(**kwargs) - self.value = None diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/canceled_subscription_id_py3.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/canceled_subscription_id_py3.py deleted file mode 100644 index 59c22be16568..000000000000 --- a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/canceled_subscription_id_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CanceledSubscriptionId(Model): - """Canceled Subscription Id. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: Canceled Subscription Id - :vartype value: str - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(CanceledSubscriptionId, self).__init__(**kwargs) - self.value = None diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/error_response.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/error_response.py deleted file mode 100644 index b3d490a49503..000000000000 --- a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/error_response.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class ErrorResponse(Model): - """Describes the format of Error response. - - :param code: Error code - :type code: str - :param message: Error message indicating why the operation failed. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ErrorResponse, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - - -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/error_response_py3.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/error_response_py3.py deleted file mode 100644 index 5504940d6873..000000000000 --- a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/error_response_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class ErrorResponse(Model): - """Describes the format of Error response. - - :param code: Error code - :type code: str - :param message: Error message indicating why the operation failed. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: - super(ErrorResponse, self).__init__(**kwargs) - self.code = code - self.message = message - - -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/location.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/location.py deleted file mode 100644 index 691616984d27..000000000000 --- a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/location.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Location(Model): - """Location information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The fully qualified ID of the location. For example, - /subscriptions/00000000-0000-0000-0000-000000000000/locations/westus. - :vartype id: str - :ivar subscription_id: The subscription ID. - :vartype subscription_id: str - :ivar name: The location name. - :vartype name: str - :ivar display_name: The display name of the location. - :vartype display_name: str - :ivar latitude: The latitude of the location. - :vartype latitude: str - :ivar longitude: The longitude of the location. - :vartype longitude: str - """ - - _validation = { - 'id': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'latitude': {'readonly': True}, - 'longitude': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'latitude': {'key': 'latitude', 'type': 'str'}, - 'longitude': {'key': 'longitude', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Location, self).__init__(**kwargs) - self.id = None - self.subscription_id = None - self.name = None - self.display_name = None - self.latitude = None - self.longitude = None diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/location_paged.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/location_paged.py deleted file mode 100644 index 3203f73dd27c..000000000000 --- a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/location_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class LocationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Location ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Location]'} - } - - def __init__(self, *args, **kwargs): - - super(LocationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/location_py3.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/location_py3.py deleted file mode 100644 index 40af216a6647..000000000000 --- a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/location_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Location(Model): - """Location information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The fully qualified ID of the location. For example, - /subscriptions/00000000-0000-0000-0000-000000000000/locations/westus. - :vartype id: str - :ivar subscription_id: The subscription ID. - :vartype subscription_id: str - :ivar name: The location name. - :vartype name: str - :ivar display_name: The display name of the location. - :vartype display_name: str - :ivar latitude: The latitude of the location. - :vartype latitude: str - :ivar longitude: The longitude of the location. - :vartype longitude: str - """ - - _validation = { - 'id': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'latitude': {'readonly': True}, - 'longitude': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'latitude': {'key': 'latitude', 'type': 'str'}, - 'longitude': {'key': 'longitude', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(Location, self).__init__(**kwargs) - self.id = None - self.subscription_id = None - self.name = None - self.display_name = None - self.latitude = None - self.longitude = None diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/operation.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/operation.py deleted file mode 100644 index c07607304e25..000000000000 --- a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/operation.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """REST API operation. - - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param display: The object that represents the operation. - :type display: ~azure.mgmt.subscription.models.OperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/operation_display.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/operation_display.py deleted file mode 100644 index 990aaa272913..000000000000 --- a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/operation_display.py +++ /dev/null @@ -1,37 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """The object that represents the operation. - - :param provider: Service provider: Microsoft.Subscription - :type provider: str - :param resource: Resource on which the operation is performed: Profile, - endpoint, etc. - :type resource: str - :param operation: Operation type: Read, write, delete, etc. - :type operation: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.resource = kwargs.get('resource', None) - self.operation = kwargs.get('operation', None) diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/operation_display_py3.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/operation_display_py3.py deleted file mode 100644 index 7f6ba3c819db..000000000000 --- a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/operation_display_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """The object that represents the operation. - - :param provider: Service provider: Microsoft.Subscription - :type provider: str - :param resource: Resource on which the operation is performed: Profile, - endpoint, etc. - :type resource: str - :param operation: Operation type: Read, write, delete, etc. - :type operation: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - } - - def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/operation_list_result.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/operation_list_result.py deleted file mode 100644 index 1833b37c8c70..000000000000 --- a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/operation_list_result.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationListResult(Model): - """Result of the request to list operations. It contains a list of operations - and a URL link to get the next set of results. - - :param value: List of operations. - :type value: list[~azure.mgmt.subscription.models.Operation] - :param next_link: URL to get the next set of operation list results if - there are any. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/operation_list_result_py3.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/operation_list_result_py3.py deleted file mode 100644 index 573e35ed80c1..000000000000 --- a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/operation_list_result_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationListResult(Model): - """Result of the request to list operations. It contains a list of operations - and a URL link to get the next set of results. - - :param value: List of operations. - :type value: list[~azure.mgmt.subscription.models.Operation] - :param next_link: URL to get the next set of operation list results if - there are any. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, *, value=None, next_link: str=None, **kwargs) -> None: - super(OperationListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/operation_py3.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/operation_py3.py deleted file mode 100644 index e6823f8d5618..000000000000 --- a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/operation_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """REST API operation. - - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param display: The object that represents the operation. - :type display: ~azure.mgmt.subscription.models.OperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, *, name: str=None, display=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = name - self.display = display diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/renamed_subscription_id.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/renamed_subscription_id.py deleted file mode 100644 index fa6813ffc476..000000000000 --- a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/renamed_subscription_id.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RenamedSubscriptionId(Model): - """Renamed Subscription Id. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: Renamed Subscription Id - :vartype value: str - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RenamedSubscriptionId, self).__init__(**kwargs) - self.value = None diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/renamed_subscription_id_py3.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/renamed_subscription_id_py3.py deleted file mode 100644 index 61ec746346fa..000000000000 --- a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/renamed_subscription_id_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RenamedSubscriptionId(Model): - """Renamed Subscription Id. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: Renamed Subscription Id - :vartype value: str - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(RenamedSubscriptionId, self).__init__(**kwargs) - self.value = None diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/subscription.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/subscription.py deleted file mode 100644 index 0af82c0632b4..000000000000 --- a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/subscription.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Subscription(Model): - """Subscription information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The fully qualified ID for the subscription. For example, - /subscriptions/00000000-0000-0000-0000-000000000000. - :vartype id: str - :ivar subscription_id: The subscription ID. - :vartype subscription_id: str - :ivar display_name: The subscription display name. - :vartype display_name: str - :ivar state: The subscription state. Possible values are Enabled, Warned, - PastDue, Disabled, and Deleted. Possible values include: 'Enabled', - 'Warned', 'PastDue', 'Disabled', 'Deleted' - :vartype state: str or ~azure.mgmt.subscription.models.SubscriptionState - :param subscription_policies: The subscription policies. - :type subscription_policies: - ~azure.mgmt.subscription.models.SubscriptionPolicies - :param authorization_source: The authorization source of the request. - Valid values are one or more combinations of Legacy, RoleBased, Bypassed, - Direct and Management. For example, 'Legacy, RoleBased'. - :type authorization_source: str - """ - - _validation = { - 'id': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'display_name': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'SubscriptionState'}, - 'subscription_policies': {'key': 'subscriptionPolicies', 'type': 'SubscriptionPolicies'}, - 'authorization_source': {'key': 'authorizationSource', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Subscription, self).__init__(**kwargs) - self.id = None - self.subscription_id = None - self.display_name = None - self.state = None - self.subscription_policies = kwargs.get('subscription_policies', None) - self.authorization_source = kwargs.get('authorization_source', None) diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/subscription_name.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/subscription_name.py deleted file mode 100644 index e2a4751b85c4..000000000000 --- a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/subscription_name.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubscriptionName(Model): - """New name of the subscription. - - :param subscription_name: New subscription name - :type subscription_name: str - """ - - _attribute_map = { - 'subscription_name': {'key': 'subscriptionName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubscriptionName, self).__init__(**kwargs) - self.subscription_name = kwargs.get('subscription_name', None) diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/subscription_name_py3.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/subscription_name_py3.py deleted file mode 100644 index de01e7797011..000000000000 --- a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/subscription_name_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubscriptionName(Model): - """New name of the subscription. - - :param subscription_name: New subscription name - :type subscription_name: str - """ - - _attribute_map = { - 'subscription_name': {'key': 'subscriptionName', 'type': 'str'}, - } - - def __init__(self, *, subscription_name: str=None, **kwargs) -> None: - super(SubscriptionName, self).__init__(**kwargs) - self.subscription_name = subscription_name diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/subscription_paged.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/subscription_paged.py deleted file mode 100644 index a555b8f217a4..000000000000 --- a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/subscription_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SubscriptionPaged(Paged): - """ - A paging container for iterating over a list of :class:`Subscription ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Subscription]'} - } - - def __init__(self, *args, **kwargs): - - super(SubscriptionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/subscription_policies.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/subscription_policies.py deleted file mode 100644 index 2d6c5bbc3497..000000000000 --- a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/subscription_policies.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubscriptionPolicies(Model): - """Subscription policies. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar location_placement_id: The subscription location placement ID. The - ID indicates which regions are visible for a subscription. For example, a - subscription with a location placement Id of Public_2014-09-01 has access - to Azure public regions. - :vartype location_placement_id: str - :ivar quota_id: The subscription quota ID. - :vartype quota_id: str - :ivar spending_limit: The subscription spending limit. Possible values - include: 'On', 'Off', 'CurrentPeriodOff' - :vartype spending_limit: str or - ~azure.mgmt.subscription.models.SpendingLimit - """ - - _validation = { - 'location_placement_id': {'readonly': True}, - 'quota_id': {'readonly': True}, - 'spending_limit': {'readonly': True}, - } - - _attribute_map = { - 'location_placement_id': {'key': 'locationPlacementId', 'type': 'str'}, - 'quota_id': {'key': 'quotaId', 'type': 'str'}, - 'spending_limit': {'key': 'spendingLimit', 'type': 'SpendingLimit'}, - } - - def __init__(self, **kwargs): - super(SubscriptionPolicies, self).__init__(**kwargs) - self.location_placement_id = None - self.quota_id = None - self.spending_limit = None diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/subscription_policies_py3.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/subscription_policies_py3.py deleted file mode 100644 index 3597539f7076..000000000000 --- a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/subscription_policies_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubscriptionPolicies(Model): - """Subscription policies. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar location_placement_id: The subscription location placement ID. The - ID indicates which regions are visible for a subscription. For example, a - subscription with a location placement Id of Public_2014-09-01 has access - to Azure public regions. - :vartype location_placement_id: str - :ivar quota_id: The subscription quota ID. - :vartype quota_id: str - :ivar spending_limit: The subscription spending limit. Possible values - include: 'On', 'Off', 'CurrentPeriodOff' - :vartype spending_limit: str or - ~azure.mgmt.subscription.models.SpendingLimit - """ - - _validation = { - 'location_placement_id': {'readonly': True}, - 'quota_id': {'readonly': True}, - 'spending_limit': {'readonly': True}, - } - - _attribute_map = { - 'location_placement_id': {'key': 'locationPlacementId', 'type': 'str'}, - 'quota_id': {'key': 'quotaId', 'type': 'str'}, - 'spending_limit': {'key': 'spendingLimit', 'type': 'SpendingLimit'}, - } - - def __init__(self, **kwargs) -> None: - super(SubscriptionPolicies, self).__init__(**kwargs) - self.location_placement_id = None - self.quota_id = None - self.spending_limit = None diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/subscription_py3.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/subscription_py3.py deleted file mode 100644 index e7b0830a8782..000000000000 --- a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/subscription_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Subscription(Model): - """Subscription information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The fully qualified ID for the subscription. For example, - /subscriptions/00000000-0000-0000-0000-000000000000. - :vartype id: str - :ivar subscription_id: The subscription ID. - :vartype subscription_id: str - :ivar display_name: The subscription display name. - :vartype display_name: str - :ivar state: The subscription state. Possible values are Enabled, Warned, - PastDue, Disabled, and Deleted. Possible values include: 'Enabled', - 'Warned', 'PastDue', 'Disabled', 'Deleted' - :vartype state: str or ~azure.mgmt.subscription.models.SubscriptionState - :param subscription_policies: The subscription policies. - :type subscription_policies: - ~azure.mgmt.subscription.models.SubscriptionPolicies - :param authorization_source: The authorization source of the request. - Valid values are one or more combinations of Legacy, RoleBased, Bypassed, - Direct and Management. For example, 'Legacy, RoleBased'. - :type authorization_source: str - """ - - _validation = { - 'id': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'display_name': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'SubscriptionState'}, - 'subscription_policies': {'key': 'subscriptionPolicies', 'type': 'SubscriptionPolicies'}, - 'authorization_source': {'key': 'authorizationSource', 'type': 'str'}, - } - - def __init__(self, *, subscription_policies=None, authorization_source: str=None, **kwargs) -> None: - super(Subscription, self).__init__(**kwargs) - self.id = None - self.subscription_id = None - self.display_name = None - self.state = None - self.subscription_policies = subscription_policies - self.authorization_source = authorization_source diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/tenant_id_description.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/tenant_id_description.py deleted file mode 100644 index dc4ddc3edde9..000000000000 --- a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/tenant_id_description.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TenantIdDescription(Model): - """Tenant Id information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The fully qualified ID of the tenant. For example, - /tenants/00000000-0000-0000-0000-000000000000. - :vartype id: str - :ivar tenant_id: The tenant ID. For example, - 00000000-0000-0000-0000-000000000000. - :vartype tenant_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TenantIdDescription, self).__init__(**kwargs) - self.id = None - self.tenant_id = None diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/tenant_id_description_paged.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/tenant_id_description_paged.py deleted file mode 100644 index b9ff7ae415a7..000000000000 --- a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/tenant_id_description_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class TenantIdDescriptionPaged(Paged): - """ - A paging container for iterating over a list of :class:`TenantIdDescription ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[TenantIdDescription]'} - } - - def __init__(self, *args, **kwargs): - - super(TenantIdDescriptionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/tenant_id_description_py3.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/tenant_id_description_py3.py deleted file mode 100644 index 3b1103d1b9dd..000000000000 --- a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/models/tenant_id_description_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TenantIdDescription(Model): - """Tenant Id information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The fully qualified ID of the tenant. For example, - /tenants/00000000-0000-0000-0000-000000000000. - :vartype id: str - :ivar tenant_id: The tenant ID. For example, - 00000000-0000-0000-0000-000000000000. - :vartype tenant_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(TenantIdDescription, self).__init__(**kwargs) - self.id = None - self.tenant_id = None diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/operations/__init__.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/operations/__init__.py index f6906611d0e7..5b07794f3097 100644 --- a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/operations/__init__.py +++ b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/operations/__init__.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- -from .operations import Operations -from .subscriptions_operations import SubscriptionsOperations -from .tenants_operations import TenantsOperations +from ._operations import Operations +from ._subscriptions_operations import SubscriptionsOperations +from ._tenants_operations import TenantsOperations __all__ = [ 'Operations', diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/operations/_operations.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/operations/_operations.py new file mode 100644 index 000000000000..ae8e9e23b2ef --- /dev/null +++ b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/operations/_operations.py @@ -0,0 +1,89 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class Operations(object): + """Operations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Current version is 2019-03-01-preview. Constant value: "2019-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-03-01-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the available Microsoft.Subscription API operations. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationListResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.subscription.models.OperationListResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationListResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Subscription/operations'} diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/operations/_subscriptions_operations.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/operations/_subscriptions_operations.py new file mode 100644 index 000000000000..84c4ae7275d6 --- /dev/null +++ b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/operations/_subscriptions_operations.py @@ -0,0 +1,417 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class SubscriptionsOperations(object): + """SubscriptionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + + self.config = config + + def cancel( + self, subscription_id, custom_headers=None, raw=False, **operation_config): + """The operation to cancel a subscription. + + :param subscription_id: Subscription Id. + :type subscription_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CanceledSubscriptionId or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.subscription.models.CanceledSubscriptionId or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + api_version = "2019-03-01-preview" + + # Construct URL + url = self.cancel.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("subscription_id", subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CanceledSubscriptionId', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + cancel.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/cancel'} + + def rename( + self, subscription_id, subscription_name=None, custom_headers=None, raw=False, **operation_config): + """The operation to rename a subscription. + + :param subscription_id: Subscription Id. + :type subscription_id: str + :param subscription_name: New subscription name + :type subscription_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RenamedSubscriptionId or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.subscription.models.RenamedSubscriptionId or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + body = models.SubscriptionName(subscription_name=subscription_name) + + api_version = "2019-03-01-preview" + + # Construct URL + url = self.rename.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("subscription_id", subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(body, 'SubscriptionName') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RenamedSubscriptionId', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + rename.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/rename'} + + def enable( + self, subscription_id, custom_headers=None, raw=False, **operation_config): + """Enables the subscription. + + :param subscription_id: Subscription Id. + :type subscription_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: EnabledSubscriptionId or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.subscription.models.EnabledSubscriptionId or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + api_version = "2019-03-01-preview" + + # Construct URL + url = self.enable.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("subscription_id", subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('EnabledSubscriptionId', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + enable.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/enable'} + + def list_locations( + self, subscription_id, custom_headers=None, raw=False, **operation_config): + """Gets all available geo-locations. + + This operation provides all the locations that are available for + resource providers; however, each resource provider may support a + subset of this list. + + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Location + :rtype: + ~azure.mgmt.subscription.models.LocationPaged[~azure.mgmt.subscription.models.Location] + :raises: :class:`CloudError` + """ + api_version = "2016-06-01" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_locations.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("subscription_id", subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.LocationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_locations.metadata = {'url': '/subscriptions/{subscriptionId}/locations'} + + def get( + self, subscription_id, custom_headers=None, raw=False, **operation_config): + """Gets details about a specified subscription. + + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Subscription or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.subscription.models.Subscription or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + api_version = "2016-06-01" + + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("subscription_id", subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Subscription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets all subscriptions for a tenant. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Subscription + :rtype: + ~azure.mgmt.subscription.models.SubscriptionPaged[~azure.mgmt.subscription.models.Subscription] + :raises: :class:`CloudError` + """ + api_version = "2016-06-01" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SubscriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions'} diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/operations/_tenants_operations.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/operations/_tenants_operations.py new file mode 100644 index 000000000000..77db5488f038 --- /dev/null +++ b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/operations/_tenants_operations.py @@ -0,0 +1,102 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class TenantsOperations(object): + """TenantsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for the operation. Constant value: "2016-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-06-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets the tenants for your account. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TenantIdDescription + :rtype: + ~azure.mgmt.subscription.models.TenantIdDescriptionPaged[~azure.mgmt.subscription.models.TenantIdDescription] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TenantIdDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/tenants'} diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/operations/operations.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/operations/operations.py deleted file mode 100644 index 4ec01caf714c..000000000000 --- a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/operations/operations.py +++ /dev/null @@ -1,88 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class Operations(object): - """Operations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Current version is 2019-03-01-preview. Constant value: "2019-03-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-03-01-preview" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all of the available Microsoft.Subscription API operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: OperationListResult or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.subscription.models.OperationListResult or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('OperationListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/providers/Microsoft.Subscription/operations'} diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/operations/subscriptions_operations.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/operations/subscriptions_operations.py deleted file mode 100644 index a80b49283de1..000000000000 --- a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/operations/subscriptions_operations.py +++ /dev/null @@ -1,356 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class SubscriptionsOperations(object): - """SubscriptionsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - - self.config = config - - def cancel( - self, subscription_id, custom_headers=None, raw=False, **operation_config): - """Cancels the subscription. - - :param subscription_id: Subscription Id. - :type subscription_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CanceledSubscriptionId or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.subscription.models.CanceledSubscriptionId or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - api_version = "2019-03-01-preview" - - # Construct URL - url = self.cancel.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("subscription_id", subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('CanceledSubscriptionId', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - cancel.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/cancel'} - - def rename( - self, subscription_id, subscription_name=None, custom_headers=None, raw=False, **operation_config): - """Renames the subscription. - - :param subscription_id: Subscription Id. - :type subscription_id: str - :param subscription_name: New subscription name - :type subscription_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RenamedSubscriptionId or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.subscription.models.RenamedSubscriptionId or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - body = models.SubscriptionName(subscription_name=subscription_name) - - api_version = "2019-03-01-preview" - - # Construct URL - url = self.rename.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("subscription_id", subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(body, 'SubscriptionName') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RenamedSubscriptionId', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - rename.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/rename'} - - def list_locations( - self, subscription_id, custom_headers=None, raw=False, **operation_config): - """Gets all available geo-locations. - - This operation provides all the locations that are available for - resource providers; however, each resource provider may support a - subset of this list. - - :param subscription_id: The ID of the target subscription. - :type subscription_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Location - :rtype: - ~azure.mgmt.subscription.models.LocationPaged[~azure.mgmt.subscription.models.Location] - :raises: :class:`CloudError` - """ - api_version = "2016-06-01" - - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_locations.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("subscription_id", subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.LocationPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.LocationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_locations.metadata = {'url': '/subscriptions/{subscriptionId}/locations'} - - def get( - self, subscription_id, custom_headers=None, raw=False, **operation_config): - """Gets details about a specified subscription. - - :param subscription_id: The ID of the target subscription. - :type subscription_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Subscription or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.subscription.models.Subscription or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - api_version = "2016-06-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("subscription_id", subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Subscription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets all subscriptions for a tenant. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Subscription - :rtype: - ~azure.mgmt.subscription.models.SubscriptionPaged[~azure.mgmt.subscription.models.Subscription] - :raises: :class:`CloudError` - """ - api_version = "2016-06-01" - - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.SubscriptionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.SubscriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions'} diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/operations/tenants_operations.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/operations/tenants_operations.py deleted file mode 100644 index 9e350c167a0d..000000000000 --- a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/operations/tenants_operations.py +++ /dev/null @@ -1,98 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class TenantsOperations(object): - """TenantsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for the operation. Constant value: "2016-06-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2016-06-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets the tenants for your account. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of TenantIdDescription - :rtype: - ~azure.mgmt.subscription.models.TenantIdDescriptionPaged[~azure.mgmt.subscription.models.TenantIdDescription] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.TenantIdDescriptionPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.TenantIdDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/tenants'} diff --git a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/subscription_client.py b/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/subscription_client.py deleted file mode 100644 index a5dfa5ea3c15..000000000000 --- a/sdk/subscription/azure-mgmt-subscription/azure/mgmt/subscription/subscription_client.py +++ /dev/null @@ -1,83 +0,0 @@ -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.operations import Operations -from .operations.subscriptions_operations import SubscriptionsOperations -from .operations.tenants_operations import TenantsOperations -from . import models - - -class SubscriptionClientConfiguration(AzureConfiguration): - """Configuration for SubscriptionClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param str base_url: Service URL - """ - - def __init__( - self, credentials, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(SubscriptionClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-subscription/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - - -class SubscriptionClient(SDKClient): - """The subscription client - - :ivar config: Configuration for client. - :vartype config: SubscriptionClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.subscription.operations.Operations - :ivar subscriptions: Subscriptions operations - :vartype subscriptions: azure.mgmt.subscription.operations.SubscriptionsOperations - :ivar tenants: Tenants operations - :vartype tenants: azure.mgmt.subscription.operations.TenantsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param str base_url: Service URL - """ - - def __init__( - self, credentials, base_url=None): - - self.config = SubscriptionClientConfiguration(credentials, base_url) - super(SubscriptionClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.subscriptions = SubscriptionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.tenants = TenantsOperations( - self._client, self.config, self._serialize, self._deserialize)